1import{a as Tr}from"./chunk-IWNMWJ2W.js";import{b as ct,c as Ar}from"./chunk-3O5P3I7K.js";import{a as Rr}from"./chunk-RONWZDWR.js";import{C as Ir,z as Er}from"./chunk-KFRE25U2.js";import{a as mi}from"./chunk-N3AFMFPM.js";import{a as ui}from"./chunk-H7CCOU6M.js";import{a as Dt,b as lt,c as Lt,e as on,f as kr,g as Lr}from"./chunk-UX35NMJM.js";import{a as wr}from"./chunk-LZL2LC4I.js";import{n as Pr,o as Or,p as Mr}from"./chunk-WIJLTONJ.js";import{Ga as Di,Oa as Cr,Qa as xr,Ra as vr,a as gr,ab as pi,b as nn,bb as br,cb as yr,eb as di,ib as De}from"./chunk-L6EN2BW6.js";import{b as we,c as _r,f as li,i as Qe,r as ci}from"./chunk-IZDLYJRE.js";import{c as mr}from"./chunk-LAXJI4NM.js";import{a as Dr}from"./chunk-BR5LA4PI.js";import{a as ni}from"./chunk-OULBKL7V.js";import{a as Ke}from"./chunk-CE5WL3A7.js";import{b as ir}from"./chunk-ZMETWN4U.js";import{a as er,c as Rt,d as tr,g as nr,j as Ie}from"./chunk-DR5W6CQF.js";import{b as dr}from"./chunk-2W7PDVXL.js";import{a as tn}from"./chunk-SXGFXLNS.js";import{a as cr}from"./chunk-6WMWEIOS.js";import{b as rr}from"./chunk-ZO4CFGV3.js";import{E as ai,L as ar,Q as lr}from"./chunk-X6WXLEJ5.js";import{a as or}from"./chunk-UMM552OB.js";import{a as Kt,d as xn,e as Tt,g as Xo,h as Jo,i as At,m as Ri,o as qe}from"./chunk-XUZPMCRD.js";import{D as ur,E as hr,F as fr,g as Xt}from"./chunk-JW3HVCPM.js";import{h as vn}from"./chunk-TMASSOMY.js";import{c as Qo,f as Zo,h as Re}from"./chunk-D3VLNOII.js";import{a as at}from"./chunk-5N6ZNYUY.js";import{a as Pt,b as Sr}from"./chunk-SUMO55QQ.js";import{a as si}from"./chunk-QCZIRXSN.js";import{c as sr}from"./chunk-CZQPPCI2.js";import{a as pr}from"./chunk-EDINK3NC.js";import{a as Jt,b as en,e as ri}from"./chunk-P6SMF36Q.js";import{N as Qt,ea as Zt,ia as be,ja as Ye}from"./chunk-G7MMMJCH.js";import{e as st}from"./chunk-W74VQ2ZW.js";import{f as St}from"./chunk-MIXPOUNZ.js";import{a as ii,b as oi}from"./chunk-7IEM6YIL.js";import{Ba as Yo,H as ei,g as Kn,ga as Ho,ia as Wo,j as Qn,ja as K,k as Uo,n as Zn,q as Xn,sb as Ko,u as Jn,va as qo,wa as ti}from"./chunk-ROAQJP46.js";import{$b as ze,$d as _e,$f as qn,A as jn,Ac as q,Ae as Bo,B as po,Bd as Wn,Ca as w,Ch as zo,D as mo,Da as Co,Dc as A,Dh as Go,Ea as xo,Eh as Vo,F as uo,Gd as To,H as V,Hb as g,Hd as Ao,He as ot,Ia as Vn,Ib as _,Id as Ro,Ja as L,Jb as b,K as It,Ka as B,Kb as P,Kc as Me,Lb as O,Mb as ve,Nb as U,Ng as he,Oe as rt,Og as No,P as jt,Qa as Un,Qb as F,Qc as We,R as $,S as go,Sa as Ue,Sb as p,Ta as $e,Tb as Po,U as G,Ub as Oo,Ud as Ht,V as zn,Vb as He,Wa as le,Wc as Pe,Xc as Te,Xd as Do,Yc as z,Za as vo,Zd as Wt,_a as W,_b as je,_f as Fo,a as Se,aa as Ti,ab as xe,ac as Ge,ad as Eo,ba as et,bb as bo,bc as k,c as $n,cc as M,cd as N,d as ge,da as _o,dc as re,eb as c,ec as D,fb as f,ga as Ce,ha as kt,i as fn,if as yt,ja as zt,jd as Io,ka as oe,kd as pe,kg as Yn,la as ho,lc as Mo,ld as Ut,mc as Ai,na as tt,nb as yo,nd as ko,ob as wt,od as wo,oe as qt,oh as Ee,p as Y,pa as Gn,pb as Hn,pc as X,q as co,qc as gt,qe as _t,rb as it,rc as vt,sa as ee,sc as bt,sd as Ae,ta as fo,tb as u,tc as Gt,u as Nn,ua as Cn,ub as ce,uc as Vt,v as I,va as S,vb as l,vh as jo,w as ne,wb as me,we as Lo,xb as Ne,xg as $o,yc as m,yg as Yt,zb as So,zc as C}from"./chunk-ADQO3XXX.js";import{a as R,b as te,e as lo,g as Fn,i as _a,k as se,m as Z}from"./chunk-3JMZ37NM.js";var Qi=Fn(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});var Rp=function(i){if("getBBox"in i){var o=i.getBBox();return Object.freeze({height:o.height,left:0,top:0,width:o.width})}else{var t=window.getComputedStyle(i);return Object.freeze({height:parseFloat(t.height||"0"),left:parseFloat(t.paddingLeft||"0"),top:parseFloat(t.paddingTop||"0"),width:parseFloat(t.width||"0")})}};Ki.ContentRect=Rp});var ws=Fn(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});var Dp=Qi(),Lp=function(){function i(o){this.target=o,this.$$broadcastWidth=this.$$broadcastHeight=0}return Object.defineProperty(i.prototype,"broadcastWidth",{get:function(){return this.$$broadcastWidth},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"broadcastHeight",{get:function(){return this.$$broadcastHeight},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){var o=Dp.ContentRect(this.target);return!!o&&(o.width!==this.broadcastWidth||o.height!==this.broadcastHeight)},i}();Zi.ResizeObservation=Lp});var Ts=Fn(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});var Bp=Qi(),Fp=function(){function i(o){this.target=o,this.contentRect=Bp.ContentRect(o)}return i}();Xi.ResizeObserverEntry=Fp});var Ns=Fn(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});var $p=ws(),Np=Ts(),xt=[],Bs=function(){function i(o){this.$$observationTargets=[],this.$$activeTargets=[],this.$$skippedTargets=[];var t=zp(o);if(t)throw TypeError(t);this.$$callback=o}return i.prototype.observe=function(o){var t=Rs("observe",o);if(t)throw TypeError(t);var e=Ds(this.$$observationTargets,o);e>=0||(this.$$observationTargets.push(new $p.ResizeObservation(o)),jp(this))},i.prototype.unobserve=function(o){var t=Rs("unobserve",o);if(t)throw TypeError(t);var e=Ds(this.$$observationTargets,o);e<0||(this.$$observationTargets.splice(e,1),this.$$observationTargets.length===0&&As(this))},i.prototype.disconnect=function(){this.$$observationTargets=[],this.$$activeTargets=[],As(this)},i}();ki.ResizeObserver=Bs;function jp(i){var o=xt.indexOf(i);o<0&&(xt.push(i),qp())}function As(i){var o=xt.indexOf(i);o>=0&&(xt.splice(o,1),Yp())}function zp(i){if(typeof i>"u")return"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if(typeof i!="function")return"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."}function Rs(i,o){if(typeof o>"u")return"Failed to execute '"+i+"' on 'ResizeObserver': 1 argument required, but only 0 present.";if(!(o&&o.nodeType===window.Node.ELEMENT_NODE))return"Failed to execute '"+i+"' on 'ResizeObserver': parameter 1 is not of type 'Element'."}function Ds(i,o){for(var t=0;t<i.length;t+=1)if(i[t].target===o)return t;return-1}var Ls=function(i){xt.forEach(function(o){o.$$activeTargets=[],o.$$skippedTargets=[],o.$$observationTargets.forEac
1h(function(t){if(t.isActive()){var e=Fs(t.target);e>i?o.$$activeTargets.push(t):o.$$skippedTargets.push(t)}})})},Gp=function(){return xt.some(function(i){return!!i.$$activeTargets.length})},Vp=function(){return xt.some(function(i){return!!i.$$skippedTargets.length})},Up=function(){var i=1/0;return xt.forEach(function(o){if(o.$$activeTargets.length){var t=[];o.$$activeTargets.forEach(function(e){var n=new Np.ResizeObserverEntry(e.target);t.push(n),e.$$broadcastWidth=n.contentRect.width,e.$$broadcastHeight=n.contentRect.height;var r=Fs(e.target);r<i&&(i=r)}),o.$$callback(t,o),o.$$activeTargets=[]}}),i},Hp=function(){var i=new window.ErrorEvent("ResizeLoopError",{message:"ResizeObserver loop completed with undelivered notifications."});window.dispatchEvent(i)},Fs=function(i){for(var o=0;i.parentNode;)i=i.parentNode,o+=1;return o},Wp=function(){var i=0;for(Ls(i);Gp();)i=Up(),Ls(i);Vp()&&Hp()},Tn,qp=function(){Tn||$s()},$s=function(){Tn=window.requestAnimationFrame(function(){Wp(),$s()})},Yp=function(){Tn&&!xt.some(function(i){return!!i.$$observationTargets.length})&&(window.cancelAnimationFrame(Tn),Tn=void 0)},Kp=function(){return window.ResizeObserver=Bs};ki.install=Kp});function ha(i,o){if(i&1&&(P(0),g(1,"div"),b(2,"h2",7),m(3,"safeHtml"),_(),O()),i&2){let t=p().ngIf;c(2),l("innerHTML",C(3,1,t),W)}}function fa(i,o){if(i&1&&(b(0,"div",7),m(1,"safeHtml")),i&2){let t=p().ngIf;l("innerHTML",C(1,1,t),W)}}function Ca(i,o){if(i&1&&(P(0),u(1,ha,4,3,"ng-container",6)(2,fa,2,3,"ng-template",null,0,A),O()),i&2){let t=k(3),e=p(3);c(),l("ngIf",e.includeH2Tag)("ngIfElse",t)}}function xa(i,o){if(i&1&&(g(0,"div",3),u(1,Ca,4,2,"ng-container",1),m(2,"async"),g(3,"div",4),b(4,"sip-carousel",5),_()()),i&2){let t=p().ngIf,e=p();l("ngClass",e.isContentStackPage?"costco-carousel-component-border-top":""),c(),l("ngIf",C(2,5,e.title)),c(3),l("items",t)("template",e.template)("options",e.options)}}function va(i,o){if(i&1&&(P(0),u(1,xa,5,7,"div",2),O()),i&2){let t=o.ngIf;c(),l("ngIf",t.length>0)}}var rn=(()=>{let o=class o{constructor(e){this.contentStackConfigService=e}ngOnInit(){this.contentStackConfigService.getContentStackPage().subscribe(e=>{this.isContentStackPage=e})}};o.\u0275fac=function(n){return new(n||o)(f(ir))},o.\u0275cmp=w({type:o,selectors:[["sip-product-carousel-base"]],inputs:{title:"title",items:"items",options:"options",template:"template",includeH2Tag:"includeH2Tag"},decls:2,vars:3,consts:[["divContent",""],[4,"ngIf"],["class","carousel-component costco-carousel-component clearfix",3,"ngClass",4,"ngIf"],[1,"carousel-component","costco-carousel-component","clearfix",3,"ngClass"],[1,"carousel"],[3,"items","template","options"],[4,"ngIf","ngIfElse"],[1,"headline",3,"innerHTML"]],template:function(n,r){n&1&&(u(0,va,2,1,"ng-container",1),m(1,"async")),n&2&&l("ngIf",C(1,1,r.items))},dependencies:[Pe,z,mr,N,Ke],styles:["[_nghost-%COMP%] .costco-carousel-component-border-top[_ngcontent-%COMP%]{border-top:1px solid #cccccc}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%]{margin:10px 10px 0}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{margin:20px 0 10px;text-align:left;font-size:20px;padding:0 10px}@media screen and (min-width: 768px) and (max-width: 1024px){[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{font-size:22px}}@media screen and (min-width: 1024px){[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .headline[_ngcontent-%COMP%]{font-size:30px}}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%]{text-align:left;margin-bottom:40px}@media screen and (min-width: 1024px){[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .carousel[_ngcontent-%COMP%]{margin-bottom:60px}}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-dots{bottom:-20px;position:absolute;text-align:center;left:0;right:0}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-nav .owl-prev, [_nghost-%COMP%] .costco-carousel-component[_ng
1content-%COMP%] .owl-nav .owl-next{transform:translateY(-100%);height:38px;width:38px;line-height:80px;vertical-align:middle;padding:4px;border-radius:100%;opacity:1;border:1px solid #cacaca;box-shadow:0 0 5px #0000004d}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-nav .owl-next:active, [_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-nav .owl-next:focus{border:1px solid black}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-nav .carousel-nav-icon:before{color:#333;text-shadow:none;font-size:20px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:1}@media screen and (min-width: 1024px){[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] {max-width:1360px}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%] .owl-item{max-width:340px}}"],changeDetection:0});let i=o;return i})();var gi=(()=>{let o=class o extends Vo{constructor(e){super(e),this.store=e,this.searchResults$=super.getResults().pipe(Ce(1)),this.categorySelector=Ro(Go.getSearchResults,n=>n.category)}search(e,n){this.store.dispatch(new zo.SearchProducts({queryText:e,searchConfig:n}))}getResults(){return this.searchResults$}getCurrentCategory(){return this.store.pipe(Ao(this.categorySelector))}};o.\u0275fac=function(n){return new(n||o)(S(To))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var ke=(()=>{let o=class o{constructor(e,n,r,s,a,d){this.http=e,this.occEndpointsService=n,this.router=r,this.cookieService=s,this.sessionService=a,this.productService=d,this.cookiePostalCode$=new ge(null),this.sessionPostalCode$=this.sessionService.getSessionPostalCode(),this.cookieAddress$=new ge(null),this.sessionAddress$=this.sessionService.getSessionAddress(),this.subscriptions=new Se;let h=this.getAddressFromCookie(),x=this.getPostalCodeFromCookie();h?this.setAddressAndPostalCode(h):x&&this.cookiePostalCode$.next(this.getPostalCodeFromCookie()),this.subscriptions.add(this.getCookiePostalCodeForCurrentPage().pipe(kt(1)).subscribe(v=>{this.productService.clearAllProducts()})),this.subscriptions.add(this.getCookieAddressForCurrentPage().pipe(kt(1)).subscribe(v=>{this.productService.clearAllProducts()})),this.subscriptions.add(this.router.events.pipe(V(v=>v instanceof Ht),Gn(ne(this.getCookieAddressForCurrentPage(),this.getCookiePostalCodeForCurrentPage())),et(1),tt(v=>{let y=v[0],E=v[1],H=this.getPostalCodeFromCookie(),T=this.getAddressFromCookie();T||y?Dt(T,y)||this.setAddressAndPostalCode(T):H!==E&&this.cookiePostalCode$.next(H)})).subscribe())}decodeLocationCookie(e){let n=this.cookieService.get(e);return!n||!n.length?null:gr(n)}getPostalCodeFromCookie(){return this.decodeLocationCookie(o.COOKIE_DELIVERY)}getAddressFromCookie(){return JSON.parse(this.decodeLocationCookie(o.COOKIE_ADDRESS))}getCookiePostalCodeForCurrentPage(){return this.cookiePostalCode$.asObservable().pipe(G())}getCookieAddressForCurrentPage(){return this.cookieAddress$.asObservable().pipe(G())}getDeliveryPostalCode(){return ne([this.cookiePostalCode$,this.sessionPostalCode$]).pipe(I(([e,n])=>e||n),G())}getDeliveryAddress(){return ne([this.cookieAddress$,this.sessionAddress$]).pipe(I(([e,n])=>e||n),G())}setAddress(e,n=!1){return Z(this,null,function*(){let r=this.occEndpointsService.buildUrl(o.BASIC_DELIVERY_BASE_URL_KEY),s=typeof e=="string",a=s?{postalCode:e,postalCodeChecked:n}:{address:e,postalCodeChecked:n},d=yield this.http.post(r,a).toPromise();if(s){if(d)return this.cookiePostalCode$.next(this.getPostalCodeFromCookie()),d;this.cookiePostalCode$.next(null)}else{if(d)return this.setAddressAndPostalCode(this.getAddressFromCookie()),d;this.setAddressAndPostalCode(null)}})}setLocation(e,n=!1,r=!1){return Z(this,null,function*(){let s=this.occEndpointsService.buildUrl(o.BASIC_DELIVERY_BASE_URL_KEY),a=r?{address:e,postalCodeChecked:n}:{postalCode:e,postalCodeChecked:n},d=yield this.http.post(s,a).toPromise();if(d)return r?this.setAddressAndPostalCode(this.getAddressFromCookie()):this.cookiePostalCode$.next(this.getPostalCodeFromCookie()),d;this.cookiePostalCode$.next(null)})}getPostalCodeCGWarning(e,n,r,s,a){return Z(this,null,function*(){let d=this.occEndpointsService.buildUrl("deliveryWarningCartGroup"),h={params:new wo().set("oldPostalCode",e).set("newPostalCode",n).set("addressId",r).set("cartGroupId",s).set("displayWarningForUnserviceablePostalCode",a.toString())};return yield this.http.get(d,h).toPromise()})}setAddressAndPostalCode(e){this.cookieAddress$.next(e),this.cookiePostalCode$.next(e?.postalCode)}ngOnDestroy(){this.subscriptions.unsubscribe()}};o.BASIC_DELIVERY_BASE_URL_KEY="basicDeliveryBase",o.COOKIE_DELIVERY="generic-postal",o.COOKIE_ADDRESS="delivery-address",o.\u0275fac=function(n){return new(n||o)(S(Ae),S(yt),S(_e),S(qe),S(rr),S(Xt))}
1,o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var ba="storefront.search.pageSize",ya="storefront.search.prefetchSize",Xe=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y,E,H){this.productSearchService=e,this.cmsComponentService=n,this.routing=r,this.activatedRoute=s,this.currencyService=a,this.languageService=d,this.router=h,this.postalCodeService=x,this.sipSiteConfigService=v,this.siteService=y,this.categoryCode=E,this.searchText=H,this.model$=this.productSearchService.getResults(),this.tireSearchCriteria$=this.model$.pipe(et("tireSearch","tireSearchCriteria"),I(T=>T)),this.defaultPageSize=48,this.defaultPrefetchSize=10,this.subscriptions=new Se,this.searchByRouting$=ne([this.languageService.getActive(),this.currencyService.getActive(),this.postalCodeService.getCookiePostalCodeForCurrentPage()]).pipe(Gn(this.routing.getRouterState()),et(1,"state"),tt(T=>{let J=this.getCriteriaFromRoute(T.params,T.queryParams);J.category||J.query||J.fitmentType?this.search(J):(!T.context||T.context.id!==o.SEARCH_EMPTY_PAGE_ID)&&this.productSearchService.clearResults()})),this.facetComparator=(T,J)=>{if(!T.facetName&&!J.facetName)return 0;if(T.facetName){if(!J.facetName)return 1}else return-1;let Je=T.facetName.localeCompare(J.facetName);if(Je!==0)return Je;if(!T.facetValueName&&!J.facetValueName)return 0;if(T.facetValueName){if(!J.facetValueName)return 1}else return-1;return T.facetValueName.localeCompare(J.facetValueName)},this.subscriptions.add(this.searchByRouting$.subscribe()),this.subscriptions.add(v.getSiteConfigs().subscribe(T=>{let J=T[ba],Je=T[ya];this.searchPageSize=J?+J:this.defaultPageSize,this.prefetchSize=Je?+Je:this.defaultPrefetchSize}))}static getQueryFromRouteParams(e){return e.query||""}static sanitizeQuery(e){return e&&e.replace(/:/g," ")}viewPage(e){this.setQueryParams({page:e})}sort(e){this.setQueryParams({sort:e})}searchByRoute(e){let n=this.getCriteriaFromRoute(e.params,e.queryParams);return n.category||n.query||n.fitmentType||n.isBatteriesSearch?(this.search(n),!0):(this.productSearchService.clearResults(),!1)}prefetchByRoute(e){this.searchByRoute(te(R({},e),{queryParams:te(R({},e.queryParams),{fetchSize:this.prefetchSize})}))}setQuery(e){this.setQueryParams({query:e,page:void 0})}getPageItems(e){this.routing.getRouterState().subscribe(n=>{let r=this.getCriteriaFromRoute(n.state.params,n.state.queryParams),s=te(R({},r),{page:e});this.search(s)}).unsubscribe()}ngOnDestroy(){this.subscriptions.unsubscribe()}filterByPostalCode(e){this.setQueryParams({filterByPostalCode:e})}setQueryParams(e){this.router.navigate([],{queryParams:e,queryParamsHandling:"merge",relativeTo:this.activatedRoute}).then(n=>n)}handleNavigationForPostalCodeChange(){return Z(this,null,function*(){let e=this.router.onSameUrlNavigation;this.router.onSameUrlNavigation="reload",yield this.router.navigateByUrl(this.router.url),this.router.onSameUrlNavigation=e})}shouldLoadMore(e){if(!e?.pagination)return!0;if(this.prefetchSize>=this.searchPageSize)return!1;let n=e.pagination.totalPages||0,r=e.pagination.currentPage||0;return n>0&&r<n-1?!0:e.products?.length>=this.prefetchSize}getCriteriaFromRoute(e,n){return{query:this.searchText?this.searchText:n.q||n.query||o.sanitizeQuery(n.text)||o.getQueryFromRouteParams(e),pageSize:n.pageSize||this.searchPageSize,page:n.page,sort:n.sort,category:this.categoryCode?this.categoryCode:e.categoryCode,fitmentType:e.fitmentType,filterByPostalCode:n.filterByPostalCode,frontfilters:n.frontfilters,rearfilters:n.rearfilters,multifilters:n.multifilters,storeId:n.storeId,searchOption:n.searchOption,fetchSize:n.fetchSize,sizeSearch:n.sizeSearch,isBatteriesSearch:n.isBatteriesSearch}}search(e){let n=e.query,r=this.getSearchConfig(e);this.productSearchService.search(n,r)}getSearchConfig(e){let n={currentPage:e.page,pageSize:e.pageSize,sortCode:e.sort,category:e.category,filterByPostalCode:e.filterByPostalCode,fitmentType:e.fitmentType,frontfilters:e.frontfilters,rearfilters:e.rearfilters,multifilters:e.multifilters,storeId:e.storeId,searchOption:e.searchOption,fetchSize:e.fetchSize,sizeSearch:e.sizeSearch,isBatteriesSearch:e.isBatteriesSearch};
1return Object.keys(n).forEach(r=>!n[r]&&delete n[r]),n}};o.TITLE_WORD_SEPARATOR=" | ",o.TITLE_LIMIT_PROPERTY_ID="page.title.h1.limit",o.DEFAULT_TITLE_MAX_LENGTH=60,o.SEARCH_EMPTY_PAGE_ID="/searchEmpty",o.\u0275fac=function(n){return new(n||o)(S(gi),S(nn),S(rt),S(Wt),S(Yt),S($o),S(_e),S(ke),S(Re),S(St),S("CATEGORY_CODE",8),S("SEARCH_TEXT",8))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Sa=(i,o,t,e,n)=>({0:i,1:o,2:t,3:e,4:n}),Pa=(i,o,t)=>({0:i,1:o,2:t}),Oa=(i,o,t,e,n,r)=>({0:i,1:o,2:t,3:e,4:n,5:r}),Ma=(i,o,t,e)=>({0:i,1:o,2:t,3:e});function Ea(i,o){if(i&1&&(b(0,"span",10),m(1,"async"),m(2,"cxTranslate"),m(3,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(3,6,t.warningMessage?t.warningMessage:q(2,3,"business.delivery.change.delivery.msg.address",Gt(8,Sa,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,C(1,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Ia(i,o){if(i&1&&(P(0),u(1,Ea,4,14,"span",9),O()),i&2){let t=p(),e=k(8);c(),l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function ka(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.delivery.msg",vt(10,Pa,C(1,1,t.oldPostalCode$),t.newPostalCode,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function wa(i,o){if(i&1&&u(0,ka,5,14,"span",11),i&2){let t=p(),e=k(8);l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function Ta(i,o){if(i&1&&(P(0),b(1,"span",10),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml"),O()),i&2){let t=p(2);c(),l("innerHTML",C(4,6,t.warningMessage?t.warningMessage:q(3,3,"business.delivery.change.cartgroup.delivery.msg.address",Vt(8,Oa,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,t.cartGroupDisplayName,C(2,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Aa(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.cartgroup.delivery.msg",bt(10,Ma,C(1,1,t.oldPostalCode$),t.newPostalCode,t.cartGroupDisplayName,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Ra(i,o){if(i&1&&u(0,Ta,5,15,"ng-container",5)(1,Aa,5,15,"ng-template",null,2,A),i&2){let t=k(2),e=p();l("ngIf",e.isFullAddress)("ngIfElse",t)}}var pt=(()=>{let o=class o{constructor(e,n,r,s,a,d){this.modalService=e,this.translationService=n,this.sipPostalCodeService=r,this.productListingService=s,this.sipSiteConfigService=a,this.baseStoreService=d,this.isFullAddress=!1,this.ADDRESS=".address",this.enableEstimatedDeliveryDateMessage$=this.sipSiteConfigService.getBooleanConfig("edd.enabled").pipe(oe(h=>h?this.translationService.translate("business.delivery.change.edd.msg"+(this.isFullAddress?this.ADDRESS:"")):Y(""))),this.isAddingToCart=!1,this.subscriptions=new Se}ngOnInit(){this.subscriptions.add(this.baseStoreService.getCurrentBaseStore().subscribe(e=>this.isFullAddress=e.inputDeliveryByAddress))}ngOnDestroy(){this.subscriptions.unsubscribe()}closeModal(){this.cancelSplitAddress&&this.cancelSplitAddress.apply(this),this.modalService.dismissActiveModal()}onConfirm(){return Z(this,null,function*(){this.isAddingToCart?this.modalService.closeActiveModal(!0):(this.isFullAddress?yield this.sipPostalCodeService.setLocation(this.newLocation,!0,this.isFullAddress):yield this.sipPostalCodeService.setLocation(this.newPostalCode,!0,this.isFullAddress),this.modalService.closeActiveModal(!0),yield this.productListingService.handleNavigationForPostalCodeChange())})}};o.\u0275fac=function(n){return new(n||o)(f(be),f(he),f(ke),f(Xe),f(Re),f(st))},o.\u0275cmp=w({type:o,selectors:[["sip-delivery-postal-code-change-warning"]],decls:14,vars:11,consts:[["postalCodeMessage",""],["cartGroup",""],["postalCodeCGMessage",""],[3,"modalId","modalTitle"],[1,"postalCodeChangeWarningContent"],[4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsgQuestion",3,"innerHTML"],["footer",""],["cancelKey","business.delivery.change.delivery.cancel","confirmKey","business.delivery.change.delivery","confirmId","btnPostalCodeWarning",3,"cancelled","confirmed"],["sipMessageMaskPii","","class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],["sipMessageMaskPii","",1,"postalCodeWarningMsg",3,"innerHTML"],["class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsg",3,"innerHTML"]],template:function(n,r){if(n&1){let s=U();g(0,"sip-modal-dialog",3),m(1,"cxTranslate"),g(2,"div",4),P(3),u(4,Ia,2,2,"ng-container",5)(5,wa,1,2,"ng-template",null,0,A),O(),u(7,Ra,3,2,"ng-template",null,1,A),b(9,"span",6),m(10,"cxTranslate"),m(11,"safeHtml"),_(),P(12,7),g(13,"sip-modal-actions",8),F("cancelled",function(){return L(s),B(r.closeModal())})("confirmed",function(){return L(s),B(r.onConfirm())}),_(),O(),_()}if(n&2){let s=k(6);l("modalId","postalCodeChangeWarning")("modalTitle",C(1,5,"business.delivery.change.delivery"+(r.isFullAddress?r.ADDRESS:".t
1itle"))),c(4),l("ngIf",r.isFullAddress)("ngIfElse",s),c(5),l("innerHTML",C(11,9,C(10,7,"business.delivery.change.delivery.msg.question"+(r.isFullAddress?r.ADDRESS:""))),W)}},dependencies:[z,Ye,at,Pt,N,Ee,Ke],encapsulation:2});let i=o;return i})();var Le=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y,E,H){this.userIdService=e,this.cartService=n,this.http=r,this.occEndpointsService=s,this.productSearchService=a,this.currentProductService=d,this.globalMessageService=h,this.sipPostalCodeService=x,this.router=v,this.modalService=y,this.cmsService=E,this.platformId=H,this.deliveryDetails$=fn,this.unserviceablePostalCode$=new ge(""),this.unserviceableAddress$=new ge(null),this.setupDeliveryObjects(),this.router.events.pipe(V(T=>T instanceof Do)).subscribe(()=>{this.modalRef=null})}fetchDeliveryDetails(e,n){let r=this.occEndpointsService.buildUrl(n?o.FULL_DELIVERY_BASE_URL_KEY:o.BASIC_DELIVERY_BASE_URL_KEY,{urlParams:{userId:e,cartId:n},queryParams:n?{refreshCart:!1}:void 0});return this.http.get(r).pipe(_o(o.RETRY_ATTEMPTS),Ce(1),It(s=>(this.globalMessageService.addMessage({key:"delivery.error",params:{0:"displayName"}},Jt.MSG_TYPE_ERROR),Y(null))))}getDeliveryDetails(){return this.deliveryDetails$}getServiceablePostalCode(){return this.serviceablePostalCode$}getServiceableAddress(){return this.serviceableAddress$}getUnserviceableAddress(){return this.unserviceableAddress$}getUnserviceablePostalCode(){return this.unserviceablePostalCode$}clearUnserviceablePostalCode(){this.unserviceablePostalCode$.next("")}isModalOpen(){return!!this.modalRef?.componentInstance}hidePostalCodeModal(){this.modalRef&&(this.modalRef.close(),this.modalRef=null)}triggerLocationModalForNewCartGroup(e,n,r,s=null,a=!1,d){return this.triggerLocationModal(r,s??null,a??!1,d??void 0,!0,n,e)}triggerLocationModal(e,n=null,r=!1,s,a,d,h){if(this.modalRef=this.modalService.open(e),
1!this.modalRef)return;let x=this.modalRef.componentInstance;return a&&(x.moveToNewCartGroup=a,x.entryNumber=d,x.deliveryOption=h),r?(x.fromClick=!1,x.baseStore=s,this.unserviceableAddress$.next(n)):this.unserviceablePostalCode$.next(n),this.modalRef}shouldDisplayPostalCodeHeader(){return this.shouldDisplayPostalCodeHeader$}setupDeliveryObjects(){let e=this.cmsService.getCurrentPage().pipe(V(s=>!!s),G((s,a)=>!s&&!a||s&&a&&s.pageId===a.pageId),Ce(1)),n=this.getCategory$(e),r=this.getProduct$(e);pe(this.platformId)?this.deliveryDetails$=ne([this.userIdService.getUserId().pipe(G()),this.cartService.getActive().pipe(G()),this.cartService.getNavigatingToCart().pipe(zt(!1)),this.sipPostalCodeService.getCookiePostalCodeForCurrentPage(),this.sipPostalCodeService.getCookieAddressForCurrentPage()]).pipe(I(([s,a,d])=>[s,s===Lo?a.guid:a.code,d,a.totalItems]),oe(([s,a,d,h])=>!d&&s&&a&&h>0?this.fetchDeliveryDetails(s,a):Y([])),Ce(1)):this.deliveryDetails$=fn,this.shouldDisplayPostalCodeHeader$=ne([n.pipe(I(s=>s&&s.displayPostalCodeHeader)),r.pipe(I(s=>s&&s.inRestrictedZone))]).pipe(jt(0),I(([s,a])=>s||a),Ce({bufferSize:1,refCount:!0})),this.serviceablePostalCode$=ne([this.sipPostalCodeService.getDeliveryPostalCode(),this.deliveryDetails$]).pipe(I(([s])=>s),G()),this.serviceableAddress$=ne([this.sipPostalCodeService.getDeliveryAddress(),this.deliveryDetails$]).pipe(I(([s])=>s),G())}getCategory$(e){return ne([this.productSearchService.getCurrentCategory().pipe(zt({}),Ti()),this.router.events.pipe(V(n=>n instanceof Ht),zt({}),Ti()),e]).pipe(V(([n,r,s])=>{let a=n[0]?.code,d=n[1]?.code,h=r[0]?.url,x=r[1]?.url;return a!==d||h!==x}),I(([n,r,s])=>s.type===qt.CATEGORY_PAGE||s.type===qt.CONTENT_PAGE&&s.pageId===Tt.NO_RESULT_PAGE?n[1]:null))}getProduct$(e){return ne([this.currentProductService.getUnfilteredProduct(),e.pipe(et("type"))]).pipe(I(([n,r])=>r!==qt.PRODUCT_PAGE?null:n),G((n,r)=>!n&&!r||n&&r&&n.code===r.code))}triggerPostalCodeWarningModelWhenAddToCart(e){let n=this.modalService.open(pt);if(!n)return;let r=n.componentInstance;return r.warningMessage=e,r.isAddingToCart=!0,n.result}};o.RETRY_ATTEMPTS=3,o.FULL_DELIVERY_BASE_URL_KEY="fullDeliveryBase",o.BASIC_DELIVERY_BASE_URL_KEY="basicDeliveryBase",o.\u0275fac=function(n){return new(n||o)(S(Bo),S(De),S(Ae),S(yt),S(gi),S(fr),S(en),S(ke),S(_e),S(be),S(pi),S(le))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var La=["formElement"],zr=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v){this.deliveryService=e,this.routingService=n,this.translationService=r,this.postalCodeService=s,this.productListingService=a,this.modalService=d,this.router=h,this.ref=x,this.formBuilder=v,this.closeModal=new $e}getShowRequiredError(e){let n=e.controls.postalCode;return n.invalid&&n.dirty&&n.errors.required}getPostalCodeForm(){return this.formBuilder.group({postalCode:[null,Kn.required]})}onDestroy(e){e.unsubscribe()}submitPostalCode(e,n){return Z(this,null,function*(){cr(e);let r=e.value.postalCode;r===null&&(e.controls.postalCode.markAsDirty(),this.ref.markForCheck()),e.valid&&this.displayWarnings(e,r,n)})}displayWarnings(e,n,r){return Z(this,null,function*(){try{let s=yield this.postalCodeService.setLocation(n);this.closeModal.emit(!0),e.reset(),this.triggerPostalCodeWarning(s,r)}catch{this.setPostalCodeError(e,e.value.postalCode)}})}triggerPostalCodeWarning(e,n){return Z(this,null,function*(){e?.displayWarning?(this.modalService.closeActiveModal(),this.triggerPostalCodeWarningModal(e.postalCode,n)):yield this.productListingService.handleNavigationForPostalCodeChange()})}triggerPostalCodeWarningModal(e,n){let r=this.modalService.open(pt);if(!r)return;let s=r.componentInstance;s.newPostalCode=e,s.oldPostalCode$=this.deliveryService.getServiceablePostalCode(),n&&(s.productCode=n.code)}modalClosed(){this.closeModal.emit(!0)}setPostalCodeError(e,n){e.setErrors({invalid:this.translationService.translate("business.delivery.postalCode.invalid",{0:n})}),this.ref.markForCheck()}};o.\u0275fac=function(n){return new(n||o)(f(Le),f(rt),f(he),f(ke),f(Xe),f(be),f(_e),f(Me),f(ei))},o.\u0275cmp=w({type:o,selectors:[["sip-postal-code-form"]],viewQuery:function(n,r){if(n&1&&je(La,5),n&2){let s;ze(s=Ge())&&(r.formElement=s.first)}},inputs:{isDropdown:"isDropdown",postalCodeTitle:"postalCodeTitle",unserviceablePostalCode:"unserviceablePostalCode",id:"id",submitButtonId:"submitButtonId"},outputs:{closeModal:"closeModal"},decls:0,vars:0,template:function(n,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Ba=(i,o,t,e,n)=>({0:i,1:o,2:t,3:e,4:n}),Fa=(i,o,t)=>({0:i,1:o,2:t}),$a=(i,o,t,e,n,r)=>({0:i,1:o,2:t,3:e,4:n,5:r}),Na=(i,o,t,e)=>({0:i,1:o,2:t,3:e});function ja(i,o){if(i&1&&(b(0,"span",10),m(1,"async"),m(2,"cxTranslate"),m(3,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(3,6,t.warningMessage?t.warningMessage:q(2,3,"business.delivery.change.delivery.msg.address",Gt(8,Ba,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,C(1,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function za(i,o){if(i&1&&(P(0),u(1,ja,4,14,"span",9),O()),i&2){let t=p(),e=k(8);c(),l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function Ga(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.delivery.msg",vt(10,Fa,C(1,1,t.oldPostalCode$),t.newPostalCode,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Va(i,o){if(i&1&&u(0,Ga,5,14,"span",11),i&2){let t=p(),e=k(8);l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function Ua(i,o){if(i&1&&(P(0),b(1,"span",10),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml"),O()),i&2){let t=p(2);c(),l("innerHTML",C(4,6,t.warningMessage?t.warningMessage:q(3,3,"business.delivery.change.cartgroup.delivery.msg.address",Vt(8,$a,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,t.cartGroupDisplayName,C(2,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Ha(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.cartgroup.delivery.msg",bt(10,Na,C(1,1,t.oldPostalCode$),t.newPostalCode,t.cartGroupDisplayName,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Wa(i,o){if(i&1&&u(0,Ua,5,15,"ng-container",5)(1,Ha,5,15,"ng-template",null,2,A),i&2){let t=k(2),e=p();l("ngIf",e.isFullAddress)("ngIfElse",t)}}var Gr=(()=>{let o=class o extends pt{constructor(e,n,r,s,a,d,h){super(e,n,r,s,a,h),this.modalService=e,this.activeCartService=d,this.baseStoreService=h}onConfirm(){return Z(this,null,function*(){this.subscriptions.add(ne([this.activeCartService.updateCartGroupPostalCode(this.newPostalCode,this.cartGroupId),this.cartLoaded$]).pipe(V(([e,n])=>!!n)).subscribe(([e,n])=>{e?this.modalService.dismissActiveModal(e):this.modalService.closeActiveModal(!0)}))})}};o.\u0275fac=function(n){return new(n||o)(f(be),f(he),f(ke),f(Xe),f(Re),f(De),f(st))}
1,o.\u0275cmp=w({type:o,selectors:[["sip-cart-delivery-postal-code-change-warning"]],features:[it],decls:14,vars:11,consts:[["postalCodeMessage",""],["cartGroup",""],["postalCodeCGMessage",""],[3,"modalId","modalTitle"],[1,"postalCodeChangeWarningContent"],[4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsgQuestion",3,"innerHTML"],["footer",""],["cancelKey","business.delivery.change.delivery.cancel","confirmKey","business.delivery.change.delivery","confirmId","btnPostalCodeWarning",3,"cancelled","confirmed"],["sipMessageMaskPii","","class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],["sipMessageMaskPii","",1,"postalCodeWarningMsg",3,"innerHTML"],["class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsg",3,"innerHTML"]],template:function(n,r){if(n&1){let s=U();g(0,"sip-modal-dialog",3),m(1,"cxTranslate"),g(2,"div",4),P(3),u(4,za,2,2,"ng-container",5)(5,Va,1,2,"ng-template",null,0,A),O(),u(7,Wa,3,2,"ng-template",null,1,A),b(9,"span",6),m(10,"cxTranslate"),m(11,"safeHtml"),_(),P(12,7),g(13,"sip-modal-actions",8),F("cancelled",function(){return L(s),B(r.closeModal())})("confirmed",function(){return L(s),B(r.onConfirm())}),_(),O(),_()}if(n&2){let s=k(6);l("modalId","postalCodeChangeWarning")("modalTitle",C(1,5,"business.delivery.change.delivery"+(r.isFullAddress?r.ADDRESS:".title"))),c(4),l("ngIf",r.isFullAddress)("ngIfElse",s),c(5),l("innerHTML",C(11,9,C(10,7,"business.delivery.change.delivery.msg.question"+(r.isFullAddress?r.ADDRESS:""))),W)}},dependencies:[z,Ye,at,Pt,N,Ee,Ke],encapsulation:2});let i=o;return i})();var Za=["submitButtonId",""],Vr=i=>({0:i}),Ur=i=>({static:i}),Xa=(i,o)=>({dynamic:i,static:o});function Ja(i,o){if(i&1&&(g(0,"h3",16),M(1),_()),i&2){let t=p();c(),re(t.postalCodeTitle)}}function el(i,o){if(i&1&&(g(0,"p",17),M(1),m(2,"cxTranslate"),_()),i&2){let t=p();c(),D(" ",q(2,1,"postalCode.error.invalid",X(4,Vr,t.unserviceablePostalCode))," ")}}function tl(i,o){if(i&1&&(b(0,"p",7),m(1,"cxTranslate")),i&2){let t=p();l("innerHTML",C(1,1,"business.delivery.cart.group.current.postal.code")+t.currentPostalCode,W)}}function nl(i,o){if(i&1&&(g(0,"label",18),M(1),m(2,"cxTranslate"),m(3,"cxTranslate"),_()),i&2){let t=p();He("for",t.id),c(),D(" ",t.cartGroupDisplayName?C(2,2,"business.delivery.cart.group.new.postal.code"):C(3,4,"text.header.delivery.postal.code")," ")}}function il(i,o){i&1&&b(0,"sip-field-error",19)}function ol(i,o){i&1&&(P(0),b(1,"sip-spinner"),O())}function rl(i,o){if(i&1&&(g(0,"p",21),M(1),m(2,"async"),_()),i&2){let t=p(2);l("ngClass",t.cartGroupDisplayName?"alert-warning":"alert-danger"),c(),D(" ",C(2,2,t.postalCodeForm.errors.invalid)," ")}}function sl(i,o){if(i&1&&u(0,rl,3,4,"p",20),i&2){let t=p();l("ngIf",t.postalCodeForm.hasError("invalid"))}}function al(i,o){if(i&1){let t=U();g(0,"button",24),F("click",function(){L(t);let n=p(2);return B(n.cancelPostalCode())}),M(1),m(2,"cxTranslate"),_()}if(i&2){let t=p(2);l("sipDataSelector",gt(4,Xa,t.SIP_DATA_SELECTOR.CANCEL,t.SIP_DATA_SELECTOR.BUTTON_LINK)),c(),D(" ",C(2,2,"business.delivery.change.delivery.cancel")," ")}}function ll(i,o){if(i&1){let t=U();P(0),g(1,"button",22,2),F("click",function(){L(t);let n=k(2);return B(n.focus())}),M(3),m(4,"cxTranslate"),m(5,"cxTranslate"),_(),u(6,al,3,7,"button",23),O()}if(i&2){let t=p();c(),l("id",t.submitButtonId)("sipDataSelector",X(8,Ur,t.SIP_DATA_SELECTOR.SUBMIT_BUTTON)),c(2),D(" ",t.cartGroupDisplayName?C(4,4,"business.delivery.cart.group.postal.code.update"):C(5,6,"text.header.set.delivery.postal.code")," "),c(3),l("ngIf",t.cartGroupDisplayName)}}function cl(i,o){if(i&1){let t=U();g(0,"button",25),F("click",function(){L(t);let n=p();return B(n.modalClosed())}),M(1),m(2,"cxTranslate"),_()}if(i&2){let t=p();Ne("btn-primary",t.unserviceablePostalCode)("btn-secondary",!t.unserviceablePostalCode),c(),D(" ",C(2,5,"expedited.delivery.postalCode.continue.shopping")," ")}}var Hr=(()=>{let o=class o extends zr{constructor(e,n,r,s,a,d,h,x,v,y,E,H,T){super(e,n,r,s,a,d,h,x,v),this.deliveryService=e,this.routingService=n,this.translationService=r,this.postalCodeService=s,this.productListingService=a,this.modalService=d,this.router=h,this.ref=x,this.formBuilder=v,this.activeCartService=y,this.cartMessageService=E,this.globalMessageService=H,this.ariaService=T,this.errorShowing=new $e,this.isLoading=!1,this.SIP_DATA_SELECTOR=ii}get showRequiredError(){return this.currentPostalCode?null:this.getShowRequiredError(this.postalCodeForm)}ngOnInit(){this.postalCodeForm=this.getPostalCodeForm(),this.subscription=this.routingService.getRouterState().subscribe(()=>{this.postalCodeForm.reset(),this.ref.markForCheck()}),this.dropdownId&&this.subscription.add(this.ariaService.getState(this.dropdownId).pipe(kt(1),V(e=>e)).subscribe(()=>{this.postalCodeForm.setErrors(null),this.postalCodeForm.reset(),this.ref.markForCheck()}))}ngAfterViewInit(){this.subscription.add(po(this.formElement.nativeElement,"submit").pipe(jt(300)).subscribe(e=>this.submitPostalCode(this.postalCodeForm,null)))}cancelPostalCode(){this.postalCodeForm.reset(),this.errorShowing.emit(!1)}ngOnDestroy(){this.onDestroy(this.subscription)}displayWarnings(e,n,r){return Z(this,null,function*(){let s=this.postalCodeService.getPostalCodeFromCookie();if(s&&n.trim().toUpperCase()===s.trim().toUpperCase()){e.reset(),this.dropdownId?this.ariaService.setState(this.dropdownId,!0):this.closeModal.emit();return}try{if(this.isLoading=!0,this.ref.markForCheck(),this.deliveryService.clearUnserviceablePostalCode(),e.setErrors(null),e.reset(),this.cartGroupId)if(this.errorShowing.emit(!0),(yield this.postalCodeService.getPostalCodeCGWarning(this.currentPostalCode,n,"",this.cartGroupId,!1)).displayWarning)this.triggerCartPostalCodeWarningModal(n);else{let d=yield this.activeCartService.updateCartGroupPostalCode(n,this.cartGroupId);d&&d.length>0&&Qe.hasModificationOfType(d,we.INVALID_POSTAL_CODE_WARNING)?this.setPostalCodeError(this.postalCodeForm,n):this.errorShowing.emit(!1)}else if(this.moveToNewCartGroup&&this.deliveryOption&&this.entryNumber!==void 0){this.errorShowing.emit(!0);let a=yield this.activeCartService.updateDeliveryOption(this.entryNumber,this.deliveryOption.deliveryOptionCode,n);a&&a.length>
10&&li.hasDeliveryModeFailureMessage(a)?Qe.hasModificationOfType(a,we.DELIVERY_MODE_INVALID_POSTAL_CODE)?this.setPostalCodeError(this.postalCodeForm,n):this.modalService.closeActiveModal(a):(this.errorShowing.emit(!1),this.modalService.closeActiveModal(a))}else if(!this.isDropdown)yield this.postalCodeService.setLocation(n,!0,!1),this.closeModal.emit(),yield this.productListingService.handleNavigationForPostalCodeChange();else{let a=yield this.postalCodeService.setLocation(n,!!this.cartGroupId,!1);this.triggerPostalCodeWarning(a,r)}}catch{this.setPostalCodeError(this.postalCodeForm,n)}finally{this.isLoading=!1,this.ref.markForCheck()}})}triggerCartPostalCodeWarningModal(e){return Z(this,null,function*(){let n=this.modalService.open(Gr);if(!n)return;let r=n.componentInstance;r.newPostalCode=e,r.oldPostalCode$=Y(this.currentPostalCode),r.cartGroupDisplayName=this.cartGroupDisplayName,r.cartGroupId=this.cartGroupId,r.formGroup=this.postalCodeForm,r.cartLoaded$=this.cartLoaded$,n.result.then(s=>{this.closeModalWithNoErrorShowing(),this.modalService.dismissActiveModal()}).catch(s=>{s.forEach(a=>{a?.postalCode&&a?.statusCode===we.INVALID_POSTAL_CODE_WARNING&&this.setPostalCodeError(this.postalCodeForm,a?.postalCode)}),(s.length===0||!Qe.hasModificationOfType(s,we.INVALID_POSTAL_CODE_WARNING))&&this.closeModalWithNoErrorShowing(),Qe.hasAllModificationsOfType(s,we.BD_PRICE_CHANGED)&&(this.globalMessageService.removeMessage(Jt.MSG_TYPE_ERROR),this.closeModalWithNoErrorShowing()),this.cartMessageService.setCartModifications(s)})})}closeModalWithNoErrorShowing(){this.closeModal.emit(),this.errorShowing.emit(!1)}};o.\u0275fac=function(n){return new(n||o)(f(Le),f(rt),f(he),f(ke),f(Xe),f(be),f(_e),f(Me),f(ei),f(De),f(ci),f(en),f(Sr))},o.\u0275cmp=w({type:o,selectors:[["sip-delivery-postal-code-form","submitButtonId",""],["sip-delivery-postal-code-form","hideButtons",""]],inputs:{currentPostalCode:"currentPostalCode",cartGroupDisplayName:"cartGroupDisplayName",cartGroupId:"cartGroupId",moveToNewCartGroup:"moveToNewCartGroup",deliveryOption:"deliveryOption",entryNumber:"entryNumber",cartLoaded$:"cartLoaded$",hideButtons:"hideButtons",dropdownId:"dropdownId"},outputs:{errorShowing:"errorShowing"},features:[it],attrs:Za,decls:19,vars:28,consts:[["formElement",""],["formErrors",""],["postalCodeSubmitBtnEl",""],["aria-labelledby","postal-code-title",1,"delivery-postal__dropdown","menu-container"],[1,"menu-arrow"],["id","postal-code-title",4,"ngIf"],["class","invalid-code alert alert-dismissible alert-warning",4,"ngIf"],[1,"postal-code-prompt",3,"innerHTML"],["class","postal-code-prompt",3,"innerHTML",4,"ngIf"],["novalidate","",3,"formGroup","sipDataSelector"],[3,"for",4,"ngIf"],["autocomplete","off",3,"control","idKey","label"],["formErrorKey","costcoValidation.field.required",4,"ngIf"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","btn close-modal",3,"btn-primary","btn-secondary","click",4,"ngIf"],["id","postal-code-title"],[1,"invalid-code","alert","alert-dismissible","alert-warning"],[3,"for"],["formErrorKey","costcoValidation.field.required"],["class","alert alert-dismissible",3,"ngClass",4,"ngIf"],[1,"alert","alert-dismissible",3,"ngClass"],["type","submit",1,"btn","btn-primary",3,"click","id","sipDataSelector"],["type","button","class","btn btn-secondary",3,"sipDataSelector","click",4,"ngIf"],["type","button",1,"btn","btn-secondary",3,"click","sipDataSelector"],[1,"btn","close-modal",3,"click"]],template:function(n,r){if(n&1&&(g(0,"div",3),b(1,"span",4),u(2,Ja,2,1,"h3",5)(3,el,3,6,"p",6),b(4,"p",7),m(5,"cxTranslate"),m(6,"cxTranslate"),u(7,tl,2,3,"p",8),g(8,"form",9,0),u(10,nl,4,6,"label",10),b(11,"sip-text-input",11),m(12,"cxTranslate"),u(13,il,1,0,"sip-field-error",12)(14,ol,2,0,"ng-container",13)(15,sl,1,1,"ng-template",null,1,A)(17,ll,7,10,"ng-container",14),_(),u(18,cl,3,7,"button",15),_()),n&2){let s=k(16);Ne("postal-code-dropdown",r.isDropdown),c(2),l("ngIf",r.isDropdown),c(),l("ngIf",r.unserviceablePostalCode),c(),l("innerHTML",r.cartGroupDisplayName?q(5,17,"business.delivery.postal.enter.your.delivery.postal.cart.group",X(24,Vr,r.cartGroupDisplayName)):C(6,20,"text.header.enter.your.delivery.postal.code"),W),c(3),l("ngIf",r.cartGroupDisplayName),c(),l("formGroup",r.postalCodeForm)("sipDataSelector",X(26,Ur,r.SIP_DATA_SELECTOR.FORM)),c(2),l("ngIf",r.isDropdown),c(),He("idKey",r.id),l("control",r.postalCodeForm.get("postalCode"))("label",C(12,22,"address.postalcode")),c(2),l("ngIf",r.showRequiredError),c(),l("ngIf",r.isLoading)("ngIfElse",s),c(3),l("ngIf",!r.hideButtons),c(),l("ngIf",!r.isDropdown&&!r.hideButtons)}},dependencies:[Pe,z,Xn,Qn,Jn,oi,si,ar,ai,N,Ee],styles:["input.error[_ngcontent-%COMP%]{border-color:#d32029}.error[_ngcontent-%COMP%]{color:#d32029}.invalid-code.alert-warning[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:0;color:#333}"],changeDetection:0});let i=o;return i})();var dl=["postalCodeFormComponent"],ml="unserviceable.loggedin.title",ul="text.header.set.delivery.postal.code",Wr=(()=>{let o=class o{constructor(e,n,r){this.modalService=e,this.deliveryService=n,this.translationService=r,this.unserviceablePostalCode$=this.deliveryService.getUnserviceablePostalCode(),this.unserviceableAddress$=this.deliveryService.getUnserviceableAddress(),this.title$=this.unserviceablePostalCode$.pipe(oe(s=>this.translationService.translate(s?ml:ul))),this.submitBtnId="postalCodeSubmitBtnDialog_"+o.instanceCounter++}
1submitForm(){this.postalCodeForm.submitPostalCode(this.postalCodeForm.postalCodeForm,null)}closeModal(){this.modalService.dismissActiveModal()}};o.instanceCounter=0,o.\u0275fac=function(n){return new(n||o)(f(be),f(Le),f(he))},o.\u0275cmp=w({type:o,selectors:[["sip-delivery-postal-code-dialog"]],viewQuery:function(n,r){if(n&1&&je(dl,5),n&2){let s;ze(s=Ge())&&(r.postalCodeForm=s.first)}},decls:7,vars:15,consts:[["postalCodeFormComponent",""],[3,"modalId","modalTitle"],[1,"modal-form",3,"closeModal","unserviceablePostalCode","moveToNewCartGroup","entryNumber","deliveryOption","cartGroupId","hideButtons"],["footer",""],[3,"cancelled","confirmed","cancelKey","confirmKey","confirmId"]],template:function(n,r){if(n&1){let s=U();g(0,"sip-modal-dialog",1),m(1,"async"),g(2,"sip-delivery-postal-code-form",2,0),m(4,"async"),F("closeModal",function(){return L(s),B(r.closeModal())}),_(),P(5,3),g(6,"sip-modal-actions",4),F("cancelled",function(){return L(s),B(r.closeModal())})("confirmed",function(){return L(s),B(r.submitForm())}),_(),O(),_()}n&2&&(l("modalId","postal-code-modal")("modalTitle",C(1,11,r.title$)),c(2),l("unserviceablePostalCode",C(4,13,r.unserviceablePostalCode$))("moveToNewCartGroup",r.moveToNewCartGroup)("entryNumber",r.entryNumber)("deliveryOption",r.deliveryOption)("cartGroupId",r.cartGroupId)("hideButtons",!0),c(4),l("cancelKey","expedited.delivery.postalCode.continue.shopping")("confirmKey","text.header.set.delivery.postal.code")("confirmId",r.submitBtnId))},dependencies:[Ye,at,Hr,N],styles:["[_nghost-%COMP%] .delivery-postal__dropdown{display:flex;flex-direction:column;padding:8px 16px 24px;justify-content:center;align-items:center}[_nghost-%COMP%] .modal-header{background-color:transparent;padding:16px 24px 0;border:none}[_nghost-%COMP%] .modal-header .close{display:none}[_nghost-%COMP%] .modal-title{font-size:24px;width:100%;color:#005dab;text-align:center;font-weight:700;border-bottom:1px solid #cccccc;padding:0 0 12px;line-height:1.1}[_nghost-%COMP%] .modal-body-wrapper button{margin-top:20px;width:100%;max-width:100%;margin-bottom:0;padding:0 24px}[_nghost-%COMP%] .modal-body-wrapper button.close-modal{max-width:50%;margin-bottom:8px}@media screen and (max-width: 767px){[_nghost-%COMP%] .modal-body-wrapper button.close-modal{max-width:80%}}[_nghost-%COMP%] form{display:flex;flex-direction:column;max-width:50%;width:100%;margin-top:12px}@media screen and (max-width: 767px){[_nghost-%COMP%] form{max-width:80%}}[_nghost-%COMP%] .postal-code-prompt{max-width:75%;font-size:18px;margin:12px 0;color:#000}[_nghost-%COMP%] .alert-warning, [_nghost-%COMP%] .alert-danger{margin-top:24px;margin-bottom:0;color:#333}"],changeDetection:0});let i=o;return i})();var gl=(i,o,t,e,n)=>({0:i,1:o,2:t,3:e,4:n}),_l=(i,o,t)=>({0:i,1:o,2:t}),hl=(i,o,t,e,n,r)=>({0:i,1:o,2:t,3:e,4:n,5:r}),fl=(i,o,t,e)=>({0:i,1:o,2:t,3:e});function Cl(i,o){if(i&1&&(b(0,"span",10),m(1,"async"),m(2,"cxTranslate"),m(3,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(3,6,t.warningMessage?t.warningMessage:q(2,3,"business.delivery.change.delivery.msg.address",Gt(8,gl,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,C(1,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function xl(i,o){if(i&1&&(P(0),u(1,Cl,4,14,"span",9),O()),i&2){let t=p(),e=k(8);c(),l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function vl(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.delivery.msg",vt(10,_l,C(1,1,t.oldPostalCode$),t.newPostalCode,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function bl(i,o){if(i&1&&u(0,vl,5,14,"span",11),i&2){let t=p(),e=k(8);l("ngIf",!t.cartGroupDisplayName)("ngIfElse",e)}}function yl(i,o){if(i&1&&(P(0),b(1,"span",10),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml"),O()),i&2){let t=p(2);c(),l("innerHTML",C(4,6,t.warningMessage?t.warningMessage:q(3,3,"business.delivery.change.cartgroup.delivery.msg.address",Vt(8,hl,t.oldAddressShort,t.oldAddressLong,t.newAddressShort,t.newAddressLong,t.cartGroupDisplayName,C(2,1,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Sl(i,o){if(i&1&&(b(0,"span",12),m(1,"async"),m(2,"async"),m(3,"cxTranslate"),m(4,"safeHtml")),i&2){let t=p(2);l("innerHTML",C(4,8,t.warningMessage?t.warningMessage:q(3,5,"business.delivery.change.cartgroup.delivery.msg",bt(10,fl,C(1,1,t.oldPostalCode$),t.newPostalCode,t.cartGroupDisplayName,C(2,3,t.enableEstimatedDeliveryDateMessage$)))),W)}}function Pl(i,o){if(i&1&&u(0,yl,5,15,"ng-container",5)(1,Sl,5,15,"ng-template",null,2,A),i&2){let t=k(2),e=p();l("ngIf",e.isFullAddress)("ngIfElse",t)}}var qr=(()=>{let o=class o extends pt{constructor(e,n,r,s,a,d,h,x,v){super(e,s,a,d,h,r),this.modalService=e,this.router=n,this.baseStoreService=r,this._translationService=s,this._sipSiteConfigService=h,this.deliveryService=x,this.activeCartService=v,this.enableEstimatedDeliveryDateMessage$=this._sipSiteConfigService.getBooleanConfig("edd.enabled").pipe(oe(y=>y?this._translationService.translate("business.delivery.change.edd.msg"+(this.isFullAddress?this.ADDRESS:"")):Y("")))}onConfirm(){return Z(this,null,function*(){this.subscriptions.add(ne([this.activeCartService.updateCartGroupDeliveryAddress(this.newLocation,this.cartGroupId),this.cartLoaded$]).pipe(V(([e,n])=>!!n)).subscribe(([e,n])=>{e?this.modalService.dismissActiveModal(e):this.modalService.dismissActiveModal()}))})}};o.\u0275fac=function(n){return new(n||o)(f(be),f(_e),f(st),f(he),f(ke),f(Xe),f(Re),f(Le),f(De))}
1,o.\u0275cmp=w({type:o,selectors:[["sip-cart-delivery-change-warning"]],features:[it],decls:14,vars:11,consts:[["postalCodeMessage",""],["cartGroup",""],["postalCodeCGMessage",""],[3,"modalId","modalTitle"],[1,"postalCodeChangeWarningContent"],[4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsgQuestion",3,"innerHTML"],["footer",""],["cancelKey","business.delivery.change.delivery.cancel","confirmKey","business.delivery.change.delivery","confirmId","btnPostalCodeWarning",3,"cancelled","confirmed"],["sipMessageMaskPii","","class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],["sipMessageMaskPii","",1,"postalCodeWarningMsg",3,"innerHTML"],["class","postalCodeWarningMsg",3,"innerHTML",4,"ngIf","ngIfElse"],[1,"postalCodeWarningMsg",3,"innerHTML"]],template:function(n,r){if(n&1){let s=U();g(0,"sip-modal-dialog",3),m(1,"cxTranslate"),g(2,"div",4),P(3),u(4,xl,2,2,"ng-container",5)(5,bl,1,2,"ng-template",null,0,A),O(),u(7,Pl,3,2,"ng-template",null,1,A),b(9,"span",6),m(10,"cxTranslate"),m(11,"safeHtml"),_(),P(12,7),g(13,"sip-modal-actions",8),F("cancelled",function(){return L(s),B(r.closeModal())})("confirmed",function(){return L(s),B(r.onConfirm())}),_(),O(),_()}if(n&2){let s=k(6);l("modalId","postalCodeChangeWarning")("modalTitle",C(1,5,"business.delivery.change.delivery"+(r.isFullAddress?r.ADDRESS:".title"))),c(4),l("ngIf",r.isFullAddress)("ngIfElse",s),c(5),l("innerHTML",C(11,9,C(10,7,"business.delivery.change.delivery.msg.question"+(r.isFullAddress?r.ADDRESS:""))),W)}},dependencies:[z,Ye,at,Pt,N,Ee,Ke],encapsulation:2});let i=o;return i})();var Ml=i=>({checked:i});function El(i,o){if(i&1&&(P(0),b(1,"sip-masked-pii",5),O()),i&2){let t=p();c(),l("piiInformation",t.label)}}function Il(i,o){if(i&1&&(g(0,"p"),M(1),_()),i&2){let t=p();c(),re(t.label)}}var Yr=(()=>{let o=class o{constructor(){this.valueSelectedEvent=new $e}valueSelected(e){this.valueSelectedEvent.emit(e)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["sip-radio"]],inputs:{checked:"checked",applyMasking:"applyMasking",label:"label",name:"name",value:"value"},outputs:{valueSelectedEvent:"valueSelectedEvent"},decls:7,vars:5,consts:[["regularRadio",""],[1,"radio-container","d-flex",3,"click"],[1,"custom-radio",3,"ngClass"],[1,"custom-radio-label"],[4,"ngIf","ngIfElse"],["piiFieldType","ADDRESS",1,"zip-code","notranslate",3,"piiInformation"]],template:function(n,r){if(n&1){let s=U();g(0,"div",1),F("click",function(){return L(s),B(r.valueSelected(r.value))}),g(1,"div")(2,"span",2),b(3,"span",3),_()(),u(4,El,2,1,"ng-container",4)(5,Il,2,1,"ng-template",null,0,A),_()}if(n&2){let s=k(6);c(2),l("ngClass",X(3,Ml,r.checked)),c(2),l("ngIf",r.applyMasking)("ngIfElse",s)}},dependencies:[Pe,z,mi],styles:['input[type=radio][_ngcontent-%COMP%]{display:none}.custom-radio[_ngcontent-%COMP%]{display:inline-block;min-width:20px;height:20px;border:1px solid #5f5f5f;border-radius:50%;position:relative;margin-right:4px}.custom-radio[_ngcontent-%COMP%]:after{content:"";display:block;width:12px;height:12px;background-color:#005dab;border-radius:50%;position:absolute;top:9px;left:9px;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease-in-out}.custom-radio.checked[_ngcontent-%COMP%]:after{transform:translate(-50%,-50%) scale(1)}.custom-radio-label[_ngcontent-%COMP%]{cursor:pointer}'],changeDetection:0});let i=o;return i})();
1var Tl=["scrollContainer"],Al=["submitButtonId",""],Rl=(i,o)=>({0:i,1:o}),Dl=i=>({0:i}),Kr=i=>({static:i}),Ll=(i,o)=>({dynamic:i,static:o});function Bl(i,o){if(i&1&&(P(0),b(1,"p",7),m(2,"sipOneLineConcat"),m(3,"cxTranslate"),O()),i&2){let t=p();c(),l("innerHTML",q(3,4,"address.error.invalid",gt(7,Rl,t.unserviceableAddress,q(2,1,t.unserviceableAddress,t.baseStore.abbreviationLength))),W)}}function Fl(i,o){i&1&&(b(0,"span",13),m(1,"cxTranslate")),i&2&&l("innerHTML",C(1,1,"business.delivery.cart.group.current.address.code"),W)}function $l(i,o){if(i&1){let t=U();g(0,"div",23)(1,"sip-radio",24),m(2,"sipOneLineAddress"),F("valueSelectedEvent",function(n){L(t);let r=p(3);return B(r.handleAddressChosen(n))}),_()()}if(i&2){let t=p(3);c(),l("name","address-0")("label",q(2,4,t.chosenAddressFromInput,t.addressFormat))("value",t.chosenAddressFromInput)("checked",t.chosenAddressFromInput===t.deliveryAddressForm.get("address").value)}}function Nl(i,o){i&1&&(g(0,"div"),b(1,"hr",28),g(2,"h3",29),M(3),m(4,"cxTranslate"),_()()),i&2&&(c(3),D(" ",C(4,1,"text.header.delivery.address.book")," "))}function jl(i,o){if(i&1){let t=U();g(0,"div",23)(1,"sip-radio",24),m(2,"sipOneLineAddress"),F("valueSelectedEvent",function(n){L(t);let r=p(4);return B(r.handleAddressChosen(n))}),_()()}if(i&2){let t=p(4);c(),l("name","address-1")("label",q(2,4,t.chosenAddressFromInput,t.addressFormat))("value",t.chosenAddressFromInput)("checked",t.chosenAddressFromInput===t.deliveryAddressForm.get("address").value)}}function zl(i,o){if(i&1){let t=U();g(0,"div",23)(1,"sip-radio",30),m(2,"sipOneLineAddress"),F("valueSelectedEvent",function(n){L(t);let r=p(4);return B(r.handleAddressChosen(n))}),_()()}if(i&2){let t=o.$implicit,e=o.index,n=p(4);c(),l("name","address"+(e+2))("value",t)("label",q(2,4,t,n.addressFormat))("checked",t===n.deliveryAddressForm.get("address").value)}}function Gl(i,o){i&1&&(g(0,"div",31),b(1,"sip-spinner"),_())}function Vl(i,o){if(i&1&&(g(0,"div"),u(1,Nl,5,3,"div",25)(2,jl,3,7,"div",17),m(3,"sipOneLineAddress"),P(4),u(5,zl,3,7,"div",26)(6,Gl,2,0,"div",27),O(),_()),i&2){let t=o.sipLet,e=p(3);c(),l("ngIf",(t==null?null:t.length)>0),c(),l("ngIf",(e.chosenAddressFromInput==null?null:e.chosenAddressFromInput.visibleInAddressBook)&&!!q(3,4,e.chosenAddressFromInput,e.addressFormat)),c(3),l("ngForOf",t),c(),l("ngIf",e.loadingAddresses)}}function Ul(i,o){i&1&&(g(0,"p",32),M(1),m(2,"cxTranslate"),_()),i&2&&(c(),D(" ",C(2,1,"costcoValidation.field.required")," "))}function Hl(i,o){if(i&1&&(b(0,"span",13),m(1,"async")),i&2){let t=p(4);l("innerHTML",C(1,1,t.deliveryAddressForm.errors.invalid),W)}}function Wl(i,o){if(i&1&&(g(0,"sip-field-error",33),u(1,Hl,2,3,"span",10),_()),i&2){let t=p(3);l("ngClass",t.cartGroupDisplayName?"alert-warning":"alert-danger"),c(),l("ngIf",!t.cartGroupDisplayName)}}function ql(i,o){if(i&1){let t=U();g(0,"button",34),F("click",function(){L(t);let n=p(3);return B(n.cancelDeliveryAddress())}),M(1),m(2,"cxTranslate"),_()}if(i&2){let t=p(3);l("sipDataSelector",gt(4,Ll,t.SIP_DATA_SELECTOR.CANCEL,t.SIP_DATA_SELECTOR.BUTTON_LINK)),c(),D(" ",C(2,2,"business.delivery.change.delivery.cancel")," ")}}function Yl(i,o){if(i&1){let t=U();g(0,"form",14),F("ngSubmit",function(n){L(t);let r=p(2);return B(r.submitForm(n))}),g(1,"sip-address-autofill",15),m(2,"sipSiteConfig"),F("addressChosen",function(n){L(t);let r=p(2);return B(r.handleAddressChosenFromInput(n))}),_(),g(3,"div",16,1),F("scroll",function(){L(t);let n=p(2);return B(n.checkLastItemVisibility())}),u(5,$l,3,7,"div",17),m(6,"sipOneLineAddress"),u(7,Vl,7,7,"div",18),m(8,"async"),_(),u(9,Ul,3,3,"p",19)(10,Wl,2,2,"sip-field-error",20),g(11,"button",21,2),F("click",function(){L(t);let n=k(12);return B(n.focus())}),M(13),m(14,"cxTranslate"),m(15,"cxTranslate"),_(),u(16,ql,3,7,"button",22),_()}if(i&2){let t=p(2);l("formGroup",t.deliveryAddressForm)("sipDataSelector",X(25,Kr,t.SIP_DATA_SELECTOR.FORM)),c(),l("swapLinesDisplay",q(2,13,"address.quick.capture.swap.lines.display","boolean"))("showRequiredError",t.showRequiredError),c(4),l("ngIf",!(t.chosenAddressFromInput!=null&&t.chosenAddressFromInput.visibleInAddressBook)&&!!q(6,16,t.chosenAddressFromInput,t.addressFormat)),c(2),l("sipLet",C(8,19,t.addresses$)),c(2),l("ngIf",t.showRequiredError),c(),l("ngIf",t.deliveryAddressForm.hasError("invalid")),c(),l("disabled",t.deliveryAddressForm.get("address").invalid||t.initialAddress===t.deliveryAddressForm.get("address").value)("id",t.submitButtonId)("sipDataSelector",X(27,Kr,t.SIP_DATA_SELECTOR.SUBMIT_BUTTON)),c(2),D(" ",t.cartGroupDisplayName||t.initialAddress?C(14,21,"basket.add.to.basket.update.delivery.address"):C(15,23,"text.header.set.delivery.address")," "),c(3),l("ngIf",t.cartGroupDisplayName)}}function Kl(i,o){if(i&1&&(b(0,"p",8),m(1,"cxTranslate"),m(2,"cxTranslate"),g(3,"div",9),u(4,Fl,2,3,"span",10),b(5,"sip-masked-pii",11),_(),u(6,Yl,17,29,"form",12)),i&2){let t=p();l("innerHTML",t.cartGroupDisplayName?q(1,4,"business.delivery.address.enter.your.delivery.address.cart.group",X(9,Dl,t.cartGroupDisplayName)):C(2,7,"text.header.enter.your.delivery.address"),W),c(4),l("ngIf",t.cartGroupDisplayName),c(),l("piiInformation",t.pipedAddress),c(),l("ngIf",t.deliveryAddressForm)}}function Ql(i,o){if(i&1){let t=U();g(0,"button",35),F("click",function(){L(t);let n=p();return B(n.modalClosed())}),M(1),m(2,"cxTranslate"),_()}i&2&&(c(),D(" ",C(2,1,"expedited.delivery.postalCode.continue.shopping")," "))}var Qr=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y,E,H,T,J){this.addressService=e,this.deliveryService=n,this.routingService=r,this.translationService=s,this.postalCodeService=a,this.productListingService=d,this.modalService=h,this.router=x,this.ref=v,this.activeCartService=y,this.cartMessageService=E,this.globalMessageService=H,this.baseStoreService=T,this.sipOneLineAddressPipe=J,this.errorShowing=new $e,this.closeModal=new $e,this.SIP_DATA_SELECTOR=ii,this.SIP_PAGE_TYPE=vn,this.page=0,this.maxPages=0,this.deliveryAddressForm=new Uo({address:new Zn(null,[Kn.required]),addressInput
1:new Zn(null),postalCodeChecked:new Zn(!1)}),this.lastAddressChosenFromInput=!1,this.loadingAddresses=!1}ngOnInit(){this.baseStoreService.getCurrentBaseStore().pipe($(1)).subscribe(e=>this.baseStore=e),this.addresses$=this.addressService.getAddressesForPage(this.page).pipe($(1),tt(e=>{this.maxPages=e?.pagination?.totalPages,this.setAddresses(e?.addressList)}),I(e=>e?.addressList.filter(n=>!Dt(n,this.initialAddress))),Ce(1))}get showRequiredError(){return this.initialAddress?null:this.getShowRequiredError(this.deliveryAddressForm)}checkLastItemVisibility(){let e=this.scrollContainer.nativeElement;e.scrollTop+e.clientHeight>=e.scrollHeight-75&&this.page<this.maxPages&&!this.loadingAddresses?(this.loadingAddresses=!0,this.page=this.page+1,this.page!==0&&ne([this.addressService.getAddressesForPage(this.page),this.addresses$]).pipe($(1)).subscribe(([s,a])=>{let d=s.addressList.filter(x=>!Dt(x,this.initialAddress)),h=a.concat(d);this.setAddresses([...h]),this.addresses$=Y([...h]),this.loadingAddresses=!1,this.ref.detectChanges()})):this.page>=this.maxPages&&(this.loadingAddresses=!1)}getShowRequiredError(e){let n=e.controls.address;return n.invalid&&n.dirty&&n.errors.required}setAddresses(e){let n=this.postalCodeService.getAddressFromCookie();this.isDefaultAddress=e[0]?.defaultAddress,this.initialAddress&&this.cartGroupId?(this.chosenAddressFromInput=this.initialAddress,this.pipedAddress=this.sipOneLineAddressPipe.transform(this.initialAddress,this.addressFormat)):(this.chosenAddressFromInput=n,this.initialAddress=n,this.pipedAddress=this.sipOneLineAddressPipe.transform(n,this.addressFormat)),this.deliveryAddressForm.get("address").setValue(this.initialAddress),this.deliveryAddressForm.get("postalCodeChecked").setValue(!!this.initialAddress)}submitForm(e){this.submitDeliveryAddress(this.deliveryAddressForm,null)}cancelDeliveryAddress(){this.deliveryAddressForm.reset(),this.closeModalWithNoErrorShowing()}handleAddressChosenFromInput(e){this.chosenAddressFromInput=e,this.handleAddressChosen(e)}handleAddressChosen(e){this.deliveryAddressForm.get("address").setValue(e)}submitDeliveryAddress(e,n){return Z(this,null,function*(){e.markAllAsTouched();let r=e.value.address;r===null&&(e.controls.address.markAsDirty(),this.ref.markForCheck()),e.valid&&this.displayWarnings(e,r,n)})}displayWarnings(e,n,r){return Z(this,null,function*(){try{if(e.reset(),this.moveToNewCartGroup&&this.deliveryOption&&this.entryNumber!==void 0){this.errorShowing.emit(!0);let s=yield this.activeCartService.updateDeliveryOption(this.entryNumber,this.deliveryOption.deliveryOptionCode,null,n);s&&s.length>0&&li.hasDeliveryModeFailureMessage(s)?Qe.hasModificationOfType(s,we.DELIVERY_MODE_INVALID_POSTAL_CODE)?this.setDeliveryAddressError(this.deliveryAddressForm,n):this.modalService.closeActiveModal(s):this.closeModalWithNoErrorShowing()}else if(this.pageType!==vn.CART_PAGE)if(!this.cartGroupId&&!this.initialAddress)this.postalCodeService.setLocation(n,!1,!0).then(s=>this.closeModalWithNoErrorShowing()).catch(s=>this.setDeliveryAddressError(this.deliveryAddressForm,n));else if(this.initialAddress&&!Dt(n,this.initialAddress)){let s=yield this.postalCodeService.setAddress(n,!!this.cartGroupId);this.triggerDeliveryAddressWarning(s,r)}else this.closeModalWithNoErrorShowing();else if(this.cartGroupId)if(this.errorShowing.emit(!0),(yield this.postalCodeService.getPostalCodeCGWarning(this.initialAddress?.postalCode,n.postalCode,"",this.cartGroupId,!1))?.displayWarning)this.triggerCartDeliveryAddressWarningModal(n);else{let a=yield this.activeCartService.updateCartGroupDeliveryAddress(n,this.cartGroupId);a&&a.length>0&&Qe.hasModificationOfType(a,we.INVALID_POSTAL_CODE_WARNING)?this.setDeliveryAddressError(this.deliveryAddressForm,n):this.closeModalWithNoErrorShowing()}}catch{this.setDeliveryAddressError(this.deliveryAddressForm,n)}})}triggerDeliveryAddressWarning(e,n){return Z(this,null,function*(){e?.displayWarning?this.triggerDeliveryAddressWarningModal(e.address):yield this.productListingService.handleNavigationForPostalCodeChange()})}triggerDeliveryAddressWarningModal(e){return Z(this,null,function*(){let n=this.modalService.open(pt);if(!n)return;let r=n.componentInstance;r.newLocation=e,r.newAddressShort=Lt(lt(e,this.addressFormat),this.addressLength),r.newAddressLong=lt(e,this.addressFormat),r.oldAddressShort=Lt(lt(this.initialAddress,this.addressFormat),this.addressLength),r.oldAddressLong=Lt(lt(this.initialAddress,this.addressFormat),this.addressLength),r.cartGroupDisplayName=this.cartGroupDisplayName,r.cartGroupId=this.cartGroupId,r.formGroup=this.deliveryAddressForm,n.result.then(s=>{this.closeModalWithNoErrorShowing()}).catch(s=>{this.handleDeliveryMods(s)})})}triggerCartDeliveryAddressWarningModal(e){return Z(this,null,function*(){let n=this.modalService.open(qr);if(!n)return;let r=n.componentInstance;r.newLocation=e,r.newAddressShort=Lt(lt(e,this.addressFormat),this.baseStore.abbreviationLength),r.newAddressLong=lt(e,this.addressFormat),r.oldAddressShort=Lt(lt(this.initialAddress,this.addressFormat),this.baseStore.abbreviationLength),r.oldAddressLong=lt(this.initialAddress,this.addressFormat),r.cartGroupDisplayName=this.cartGroupDisplayName,r.cartGroupId=this.cartGroupId,r.formGroup=this.deliveryAddressForm,r.cartLoaded$=this.cartLoaded$,n.result.then(s=>{this.closeModalWithNoErrorShowing()}).catch(s=>{this.handleDeliveryMods(s)})})}handleDeliveryMods(e){e||this.closeModalWithNoErrorShowing(),e?.forEach(n=>
1{n?.address&&n?.statusMessage===we.INVALID_DELIVERY_ADDRESS&&this.setDeliveryAddressError(this.deliveryAddressForm,n?.address)}),(e?.length===0||!Qe.hasModificationOfType(e,we.INVALID_DELIVERY_ADDRESS))&&this.closeModalWithNoErrorShowing(),(Qe.hasAllModificationsOfType(e,we.BD_NO_PRICE)||Qe.hasAllModificationsOfType(e,we.BD_PRICE_CHANGED))&&(this.globalMessageService.removeMessage(Jt.MSG_TYPE_ERROR),this.closeModalWithNoErrorShowing()),Qe.hasAllModificationsOfType(e,we.INVALID_DELIVERY_ADDRESS)||this.cartMessageService.setCartModifications(e)}setDeliveryAddressError(e,n){let r=lt(n,this.addressFormat),s=Lt(r,this.addressLength);e.get("address").setValue(this.initialAddress),e.setErrors({invalid:this.translationService.translate(we.INVALID_DELIVERY_ADDRESS,{0:r,1:s})}),this.ref.markForCheck()}addressesAreEqual(e,n){return Dt(e,n)}modalClosed(){this.closeModal.emit()}closeModalWithNoErrorShowing(){this.closeModal.emit(),this.errorShowing.emit(!1)}};o.\u0275fac=function(n){return new(n||o)(f(dr),f(Le),f(rt),f(he),f(ke),f(Xe),f(be),f(_e),f(Me),f(De),f(ci),f(en),f(st),f(on))},o.\u0275cmp=w({type:o,selectors:[["sip-delivery-address-form","submitButtonId",""]],viewQuery:function(n,r){if(n&1&&je(Tl,5),n&2){let s;ze(s=Ge())&&(r.scrollContainer=s.first)}},inputs:{submitButtonId:"submitButtonId",cartGroupDisplayName:"cartGroupDisplayName",cartGroupId:"cartGroupId",addressFormat:"addressFormat",addressLength:"addressLength",fromClick:"fromClick",pageType:"pageType",cartLoaded$:"cartLoaded$",unserviceableAddress:"unserviceableAddress",initialAddress:"initialAddress",moveToNewCartGroup:"moveToNewCartGroup",deliveryOption:"deliveryOption",entryNumber:"entryNumber"},outputs:{errorShowing:"errorShowing",closeModal:"closeModal"},features:[Mo([on,Er])],attrs:Al,decls:6,vars:3,consts:[["deliveryAddressFormBlock",""],["scrollContainer",""],["postalCodeSubmitBtnEl",""],["aria-labelledby","postal-code-title",1,"delivery-postal__dropdown","menu-container"],[1,"menu-arrow"],[4,"ngIf","ngIfElse"],["class","btn close-modal btn-secondary",3,"click",4,"ngIf"],["sipMessageMaskPii","",1,"invalid-code","alert","alert-dismissable","alert-warning",3,"innerHTML"],[1,"postal-code-prompt",3,"innerHTML"],[1,"postal-code-prompt"],[3,"innerHTML",4,"ngIf"],["piiFieldType","ADDRESS",1,"notranslate",3,"piiInformation"],["class","delivery-address-form","novalidate","",3,"formGroup","sipDataSelector","ngSubmit",4,"ngIf"],[3,"innerHTML"],["novalidate","",1,"delivery-address-form",3,"ngSubmit","formGroup","sipDataSelector"],["labelKey","basket.add.to.basket.set.delivery.address",3,"addressChosen","swapLinesDisplay","showRequiredError"],[1,"address-container",3,"scroll"],["class","address-item",4,"ngIf"],[4,"sipLet"],["class","error",4,"ngIf"],["class","alert alert-dismissable","sipMessageMaskPii","",3,"ngClass",4,"ngIf"],["type","submit",1,"btn","btn-primary",3,"click","disabled","id","sipDataSelector"],["type","button","class","btn btn-secondary",3,"sipDataSelector","click",4,"ngIf"],[1,"address-item"],["applyMasking","true",3,"valueSelectedEvent","name","label","value","checked"],[4,"ngIf"],["class","address-item",4,"ngFor","ngForOf"],["class","d-flex center-spinner",4,"ngIf"],[1,"seperator"],[1,"title"],["applyMasking","true",3,"valueSelectedEvent","name","value","label","checked"],[1,"d-flex","center-spinner"],[1,"error"],["sipMessageMaskPii","",1,"alert","alert-dismissable",3,"ngClass"],["type","button",1,"btn","btn-secondary",3,"click","sipDataSelector"],[1,"btn","close-modal","btn-secondary",3,"click"]],template:function(n,r){if(n&1&&(g(0,"div",3),b(1,"span",4),u(2,Bl,4,10,"ng-container",5)(3,Kl,7,11,"ng-template",null,0,A)(5,Ql,3,3,"button",6),_()),n&2){let s=k(4);c(2),l("ngIf",r.unserviceableAddress&&!r.fromClick)("ngIfElse",s),c(3),l("ngIf",r.pageType!==r.SIP_PAGE_TYPE.CART_PAGE)}},dependencies:[Pe,Te,z,Yr,Xn,Qn,Jn,sr,oi,Pt,Ir,si,mi,ai,N,Ee,on,kr,wr],styles:[".address-item[_ngcontent-%COMP%]{margin-bottom:12px}.address-container[_ngcontent-%COMP%]{max-height:300px;overflow:scroll}.center-spinner[_ngcontent-%COMP%]{width:100%;justify-content:center}input[_ngcontent-%COMP%]{-webkit-appearance:radio}input.error[_ngcontent-%COMP%]{border-color:#d32029}.error[_ngcontent-%COMP%]{color:#d32029}.invalid-code.alert-warning[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:0;color:#333}@media screen and (min-width: 768px) and (max-width: 1024px),screen and (min-width: 1024px){.invalid-code.alert-warning[_ngcontent-%COMP%]{max-width:75%}}.invalid-code.alert-warning[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-top:24px;padding:0 16px;width:100%;max-width:50%}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#005dab;margin-bottom:12px}.delivery-address-form[_ngcontent-%COMP%]{max-width:70%}"],changeDetection:0});let i=o;return i})();var Xl="unserviceable.loggedin.title",Jl="text.header.set.delivery.address",Zr=(()=>{let o=class o{constructor(e,n,r){this.modalService=e,this.deliveryService=n,this.translationService=r,this.fromClick=!0,this.unserviceableAddress$=this.deliveryService.getUnserviceableAddress(),this.title$=this.unserviceableAddress$.pipe(oe(s=>this.translationService.translate(s?Xl:Jl)))}closeModal(){this.modalService.dismissActiveModal()}};o.\u0275fac=function(n){return new(n||o)(f(be),f(Le),f(he))}
1,o.\u0275cmp=w({type:o,selectors:[["sip-delivery-address-dialog"]],decls:4,vars:19,consts:[[3,"modalId","modalTitle"],[1,"modal-form",3,"closeModal","pageType","cartLoaded$","initialAddress","cartGroupDisplayName","moveToNewCartGroup","entryNumber","deliveryOption","cartGroupId","addressLength","addressFormat","fromClick","submitButtonId","unserviceableAddress"]],template:function(n,r){if(n&1&&(g(0,"sip-modal-dialog",0),m(1,"async"),g(2,"sip-delivery-address-form",1),m(3,"async"),F("closeModal",function(){return r.closeModal()}),_()()),n&2){let s;l("modalId","postal-code-modal")("modalTitle",C(1,15,r.title$)),c(2),l("pageType",r.pageType)("cartLoaded$",r.cartLoaded$)("initialAddress",r.initialAddress)("cartGroupDisplayName",r.cartGroupDisplayName)("moveToNewCartGroup",r.moveToNewCartGroup)("entryNumber",r.entryNumber)("deliveryOption",r.deliveryOption)("cartGroupId",r.cartGroupId)("addressLength",r.baseStore==null?null:r.baseStore.abbreviationLength)("addressFormat",r.baseStore==null?null:r.baseStore.addressFormatter)("fromClick",r.fromClick)("submitButtonId","postalCodeSubmitBtnDialog")("unserviceableAddress",(s=C(3,17,r.unserviceableAddress$))==null?null:s.formattedAddress)}},dependencies:[Ye,Qr,N],styles:["[_nghost-%COMP%] #postal-code-modal{min-height:200px;max-height:900px;overflow:scroll}[_nghost-%COMP%] .delivery-postal__dropdown{display:flex;flex-direction:column;padding:8px 16px 24px;justify-content:center;align-items:center}[_nghost-%COMP%] .modal-header{background-color:transparent;padding:16px 24px 0;border:none}[_nghost-%COMP%] .modal-header .close{display:none}[_nghost-%COMP%] .modal-title{font-size:25px;width:100%;color:#005dab;text-align:center;font-weight:700;border-bottom:1px solid #cccccc;padding:0 0 12px;line-height:1.1}[_nghost-%COMP%] .modal-body-wrapper button{margin-top:16px;width:100%;max-width:100%;margin-bottom:0;padding:0 16px}[_nghost-%COMP%] .modal-body-wrapper button.close-modal{max-width:70%;margin-bottom:8px}@media screen and (max-width: 767px){[_nghost-%COMP%] .modal-body-wrapper button.close-modal{max-width:80%}}[_nghost-%COMP%] form{display:flex;flex-direction:column;max-width:50%;width:100%;margin-top:12px}@media screen and (max-width: 767px){[_nghost-%COMP%] form{max-width:80%}}[_nghost-%COMP%] .postal-code-prompt{max-width:65%;font-size:16px;margin:12px 0;color:#000}@media screen and (max-width: 767px){[_nghost-%COMP%] .postal-code-prompt{max-width:80%}}[_nghost-%COMP%] .alert-warning, [_nghost-%COMP%] .alert-danger{margin-top:16px;margin-bottom:0;color:#333}"],changeDetection:0});let i=o;return i})();var de=function(i){return i.PRODUCT_IMPRESSIONS="productImpressions",i.GA4_VIEW_ITEM_LIST="view_item_list",i.PRODUCT_DETAILS="productDetails",i.GA4_SELECT_ITEM="select_item",i.GA4_VIEW_ITEM="view_item",i.SEARCH_RESULTS="searchResults",i.RETAIL_EVENT="retail",i.ZERO_SEARCH_RESULTS="zero_search_results",i.GA4_SEARCH_RESULTS="search",i.ADD_TO_CART="addToCart",i.GA4_ADD_TO_CART="add_to_cart",i.REMOVE_FROM_CART="removeFromCart",i.GA4_REMOVE_FROM_CART="remove_from_cart",i.PROMOTION_IMPRESSIONS="promotionImpressionClick",i.PROMOTION_IMPRESSIONS_VIEW="promotionImpressionsView",i.GA4_VIEW_PROMOTION="view_promotion",i.GA4_SELECT_PROMOTION="select_promotion",i.GA4_VIEW_CART="view_cart",i}(de||{}),Mt=function(i){return i.PRODUCT_DETAILS="detail-page-view",i.ADD_TO_CART="add-to-cart",i.SEARCH="search",i.HOME_PAGE="home-page-view",i.CATEGORY_PAGE="category-page-view",i.CART_PAGE="shopping-cart-page-view",i}(Mt||{}),dt=function(i){return i.PRODUCT_DETAILS="Product Details",i.CATEGORY_RESULTS="Category Results",i.SEARCH_RESULTS="Search Results",i.HOMEPAGE="Homepage",i.E_COMMERCE="Ecommerce",i}(dt||{}),Pn=function(i){return i.ZERO_RESULTS="Zero Results",i.ADD_TO_CART="Add to Cart",i.HOME_PAGE="Home Page",i.REMOVE_FROM_CART="Remove from Cart",i.PROMOTION_CLICK="Click on promotion",i}(Pn||{}),On=function(i){return i.VIEW_ITEM_LIST_ID="product_impressions_ga4",i.VIEW_ITEM_LIST_NAME_CAT="Product Impressions on Category Page",i.VIEW_ITEM_LIST_NAME_PLP="Product Impressions on PLP",i.SELECT_ITEM_LIST_ID="product_clicks_ga4",i.SELECT_ITEM_LIST_NAME="Product Clicks on PLP",i}(On||{});var pn=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y,E){this.currencyService=e,this.cookieService=n,this.windowRef=r,this.router=s,this.http=a,this.siteService=d,this.sipSiteConfigService=h,this.ngZone=x,this.docRef=v,this.platformId=y,this.request=E,this.subscription=new Se,this.GTM_ID_CONFIG="google.tag.manager.id",this.GA4_ID_CONFIG="ga4.measurement.id",this.GA4_PROTOCOL_VERSION_CONFIG="ga4.protocol.version",this.GDPR_GOOGLE_ANALYTICS_ENABLED_CONFIG="google.analytics.tracking.enabled",this.GDPR_GA4_ENABLED_CONFIG="ga4.tracking.enabled",this.isGA4Enabled=!1,this.GA4_MAX_PRODUCTS_IN_VIEW_ITEM_LIST=200,this.pendingGA4Events=[],this.pendingUAEvents=[],this.visibilityListenerScheduled=!1,this.SST_GA4_ENABLED_CONFIG="sst.ga4.tracking.enabled",this.SST_URL_CONFIG="sst.google.tag.manager.url",this.RESTRICTED_URL_CONFIG="sst.google.tag.manager.restricted.url",this.SST_WHITELIST_PARAMS_CONFIG="sst.google.tag.manager.whitelist.params",this.SST_WHITELIST_ENABLED_CONFIG="sst.google.tag.manager.whitelist.params",this.isSSTEnabled=!1,this.GA_MAX_PAYLOAD_SIZE=8e3,this.GA_PAYLOAD_HEADER_SIZE=1500,this.BATCH_SIZE_LIMIT=this.GA_MAX_PAYLOAD_SIZE-this.GA_PAYLOAD_HEADER_SIZE,this.MAX_LENGTH_GA_PROP_NAME=11,this.hasPageView$=new ge(!0)}static getProductImpressionEventsTemplate(e,n,r,s){return{event:de.PRODUCT_IMPRESSIONS,gaEventCategory:e,gaEventAction:n,gaEventLabel:r,list:s}}
1static getGtmProduct(e,n){return R({name:e.name,englishName:e.englishName,price:e.price?.value,departmentNumber:e.departmentNumber,id:e.code},n)}injectGTM(e){let n=this.docRef.createElement("noscript");n.id="googleTagManagerIframe",n.innerHTML=`<iframe src="//www.googletagmanager.com/ns.html?id=${e}" 2 height="0" width="0" style="display:none;visibility:hidden"></iframe>`,this.docRef.getElementsByTagName("body")[0].appendChild(n);let r=this.docRef.createElement("script");r.innerHTML=` 3 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 4 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 5 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 6 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 7 })(window,document,'script','dataLayer','${e}'); 8 `,this.docRef.getElementsByTagName("head")[0].appendChild(r)}init(){this.subscription.add(this.router.events.pipe(V(e=>e instanceof Ht&&e.urlAfterRedirects!==`/${Tt.NO_RESULT_PAGE}`),tt(e=>{this.windowRef.nativeWindow&&this.postPageViewEvent()}),kt(1)).subscribe(e=>{if(!this.windowRef.nativeWindow)return;this.windowRef.nativeWindow.dataLayer.length=0;let n={event:"pageview"};this.windowRef.nativeWindow.dataLayer.push(n),this.hasPageView$.next(!0)})),this.subscription.add(this.siteService.getSite().subscribe(e=>{let n=e.configs[this.GTM_ID_CONFIG],r=e.configs[this.GA4_ID_CONFIG],s=e.configs[this.GDPR_GOOGLE_ANALYTICS_ENABLED_CONFIG]==="true";this.sstURL=e.configs[this.SST_URL_CONFIG],this.restrictedURLs=e.configs[this.RESTRICTED_URL_CONFIG],this.isSSTWhiteListEnabled=e.configs[this.SST_WHITELIST_ENABLED_CONFIG],this.sstWhiteListParams=e.configs[this.SST_WHITELIST_PARAMS_CONFIG],this.protocolVersion=e.configs[this.GA4_PROTOCOL_VERSION_CONFIG],this.ga4Id=r,this.sipSiteConfigService.getBooleanConfig(this.GDPR_GA4_ENABLED_CONFIG).subscribe(a=>{this.isGA4Enabled=a},a=>{this.isGA4Enabled=!1}),this.sipSiteConfigService.getBooleanConfig(this.SST_GA4_ENABLED_CONFIG).subscribe(a=>{this.isSSTEnabled=a},a=>{this.isSSTEnabled=!1}),this.isSSTEnabled&&this.fetchSiteSalt(),n&&s&&!Ut(this.platformId)&&this.injectGTM(n)})),this.currencyService.getActive().pipe(V(Boolean),$(1)).subscribe(e=>this.currencyCode=e)}generateSearchGta4AttributionId(){return this.generateUUID()}generateUUID(){return Date.now().toString()+Math.floor(Math.random()*1e4)}pushEvent(e){if(!this.windowRef.nativeWindow)return;this.windowRef.nativeWindow.dataLayer=this.windowRef.nativeWindow.dataLayer||[];let n=this.windowRef.nativeWindow.dataLayer,r=(this.windowRef.document.readyState==="complete"||this.windowRef.document.readyState==="interactive")&&n.findIndex(a=>a.event==="gtm.dom"||a.event==="pageView")>=0;this.visibilityListenerScheduled||this.windowRef.nativeWindow&&(this.windowRef.nativeWindow.document.addEventListener("visibilitychange",()=>{this.visibilityChange()}),this.visibilityListenerScheduled=!0);let s=this.cookieService.get("UserPreferences");s&&s.indexOf("analyticsEnabled")>=0&&this.pendingUAEvents.push(e),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.pushPendingUAEvents()},r?100:1e3)})}pushGA4Event(e){if(this.windowRef.nativeWindow&&(this.isSSTEnabled&&this.postGA4Event(e),this.isGA4Enabled)){this.windowRef.nativeWindow.dataLayer=this.windowRef.nativeWindow.dataLayer||[];let n=this.windowRef.nativeWindow.dataLayer,r=(this.windowRef.document.readyState==="complete"||this.windowRef.document.readyState==="interactive")&&n.findIndex(a=>a.event==="gtm.dom"||a.event==="pageView")>=0;this.visibilityListenerScheduled||this.windowRef.nativeWindow&&(this.windowRef.nativeWindow.document.addEventListener("visibilitychange",()=>{this.visibilityChange()}),this.visibilityListenerScheduled=!0),this.cookieService.get("UserPreferences")&&this.pendingGA4Events.push(e),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.pushPendingGA4Events()},r?100:1e3)})}}pushPendingGA4Events(){this.windowRef.nativeWindow.dataLayer=this.windowRef.nativeWindow.dataLayer||[];let e=this.windowRef.nativeWindow.dataLayer;this.ngZone.runOutsideAngular(()=>
8{this.pendingGA4Events.forEach(n=>{e.push({items:null,ecommerce:null,cloud_retail:null}),e.push(n)}),this.pendingGA4Events=[]})}pushPendingUAEvents(){this.windowRef.nativeWindow.dataLayer=this.windowRef.nativeWindow.dataLayer||[];let e=this.windowRef.nativeWindow.dataLayer;this.ngZone.runOutsideAngular(()=>{this.pendingUAEvents.forEach(n=>{e.push(n)}),this.pendingUAEvents=[]})}pushProductImpressionEvents(e,n,r){let s=e.map((y,E)=>o.getGtmProduct(y,{position:E+1,list:n.label})),a=Array.isArray(n.link)?n.link.join(", "):n.link,d=o.getProductImpressionEventsTemplate(r,n.label,a,r===dt.CATEGORY_RESULTS?n.label:"Search Results"),h=s.map(y=>this.lengthOfProductImpression(y)),x=this.calculateBatchSizes(h,this.BATCH_SIZE_LIMIT),v=0;for(;s.length>0;){let y=s.splice(0,x[v]);v++;let E=te(R({},d),{ecommerce:{impressions:y}});this.pushEvent(E)}}calculateBatchSizes(e,n){let r=e[0],s=1,a=[1],d=[r];for(let h=1;h<e.length;h++){let x=r+e[h];x<=n?(r=x,a[s-1]++,d[s-1]=r):(s++,r=e[h],a.push(1),d[s-1]=r)}return a}lengthOfProductImpression(e){let n=[e.id,e.price,e.position,e.list,e.name,e.englishName,e.departmentNumber],r=n.length*this.MAX_LENGTH_GA_PROP_NAME,s=n.map(a=>{if(a)return typeof a=="number"?a.toFixed(2).length:encodeURI(a).length}).reduce((a,d)=>d?a+d:a);return r+s}pushGA4ViewItemListEvent(e,n,r,s,a){if(e.length<=0)return;let d=[];for(let x=0;x<Math.min(e.length,this.GA4_MAX_PRODUCTS_IN_VIEW_ITEM_LIST);x++){let v=this.convertProductToGA4Item(e[x]);d.push(v)}let h={event:de.GA4_VIEW_ITEM_LIST,item_list_id:On.VIEW_ITEM_LIST_ID,item_list_name:r,items:d,attributionToken:s,resultSize:a};this.pushGA4Event(h)}pushProductDetailsEvent(e,n){let r=e.categories.map(a=>a.name).join(),s={event:de.PRODUCT_DETAILS,gaEventCategory:dt.PRODUCT_DETAILS,productCategories:r,ecommerce:{detail:{products:[o.getGtmProduct(e,{category:r})]}}};return n.concat(Array(o.BREADCRUMB_SIZE).fill("")).slice(0,o.BREADCRUMB_SIZE).forEach((a,d)=>s[`breadcrumb${d+1}`]=a||""),s}postPageViewEvent(){let e={event:"page_view"};this.isSSTEnabled&&this.postGA4Event(e)}pushGA4ViewItemEvent(e,n){let r=this.convertProductToGA4Item(e),s={event:de.GA4_VIEW_ITEM,currency:e.price?.currencyIso,value:e.price?.value,items:[r]};this.pushGA4Event(s)}pushSearchResultEvent(e,n,r,s){let a={event:de.SEARCH_RESULTS,gaEventCategory:dt.SEARCH_RESULTS,gaEventAction:e,gaEventLabel:n,results:r,"search-term":s};this.pushEvent(a)}pushGA4SearchResultEvent(e){return{event:de.GA4_SEARCH_RESULTS,search_term:e}}pushZeroSearchResultEvent(e){let n;if(e)n={event:de.ZERO_SEARCH_RESULTS,category:dt.SEARCH_RESULTS,source:e,zeroResults:e};else{let r=this.request?this.request.host+this.request.url:this.windowRef.nativeWindow?.location.href;n={event:de.ZERO_SEARCH_RESULTS,category:dt.CATEGORY_RESULTS,source:this.maskURLInPath(r),zeroResults:this.maskURLInPath(r)}}this.pushGA4Event(n)}pushGA4SelectItemEvent(e,n){let r=this.convertProductToGA4Item(e,n),s={event:de.GA4_SELECT_ITEM,item_list_id:On.SELECT_ITEM_LIST_ID,item_list_name:On.SELECT_ITEM_LIST_NAME,items:[r]};this.pushGA4Event(s)}pushAddToCartEvent(e,n){let r=this.currencyCode||this.windowRef.sessionStorage.getItem("currency");if(!r)throw new Error("currency is undefined");return{event:de.ADD_TO_CART,gaEventCategory:dt.E_COMMERCE,gaEventAction:Pn.ADD_TO_CART,ecommerce:{currencyCode:r,add:{products:[o.getGtmProduct(e,{quantity:n})]}}}}pushGA4AddToCartEvent(e,n){let r=this.convertProductToGA4Item(e);r.quantity=n;let s={event:de.GA4_ADD_TO_CART,currency:e.price?.currencyIso,value:e.price?.value,items:[r]};this.pushGA4Event(s)}pushRemoveFromCartEvent(e,n){let r={event:de.REMOVE_FROM_CART,gaEventCategory:dt.E_COMMERCE,gaEventAction:Pn.REMOVE_FROM_CART,ecommerce:{remove:{products:[o.getGtmProduct(e,{quantity:n})]}}};this.pushEvent(r)}convertProductToGA4Item(e,n){let r={item_id:e.code,item_name:e.name,department_number:e.departmentNumber,english_name:e.englishName};return e.cartGroup?.displayName&&(r.cart_group=e.cartGroup?.displayName),e.topBaseProduct&&e.topBaseProduct!==e.code&&(r.item_id=e.topBaseProduct,r.item_variant=e.code),typeof n<"u"&&(r.index=n),e.categories&&e.categories.length>
80&&e.categories.forEach((s,a)=>{a===0?r.item_category=s.name:r[`item_category${a+1}`]=s.name}),r}pushGA4RemoveFromCartEvent(e,n){let r=this.convertProductToGA4Item(e);r.quantity=n;let s={event:de.GA4_REMOVE_FROM_CART,currency:e.price?.currencyIso,value:e.price?.value,items:[r]};this.pushGA4Event(s)}pushPromotionImpressionEvent(e,n){let r={event:n,gaEventCategory:dt.HOMEPAGE,gaEventAction:Pn.PROMOTION_CLICK,ecommerce:{promoClick:{promotions:[e]}}};this.pushEvent(r)}pushGA4ViewCartEvent(e,n,r){let s={event:de.GA4_VIEW_CART,currency:e.totalPrice?.currencyIso,value:e.totalPrice?.value,items:n.map(a=>this.convertProductToGA4Item(a.product)),cloud_retail:r};this.pushGA4Event(s)}pushGA4ViewPromotionEvent(e){let n={item_id:e.id,item_name:e.name,creative_name:e.creative,creative_slot:e.position,promotion_id:e.id,promotion_name:e.name},r={event:de.GA4_VIEW_PROMOTION,items:[n]};this.pushGA4Event(r)}pushGA4SelectPromotionEvent(e){let n={item_id:e.id,item_name:e.name,creative_name:e.creative,creative_slot:e.position,promotion_id:e.id,promotion_name:e.name},r={event:de.GA4_SELECT_PROMOTION,items:[n]};this.pushGA4Event(r)}visibilityChange(){this.pendingGA4Events.length>0&&this.pushPendingGA4Events(),this.pendingUAEvents.length>0&&this.pushPendingUAEvents()}ngOnDestroy(){this.subscription.unsubscribe(),this.windowRef.nativeWindow&&this.visibilityListenerScheduled&&this.windowRef.nativeWindow.document.removeEventListener("visibilitychange",this.visibilityChange)}fetchSiteSalt(){this.siteService.fetchSalt().pipe($(1)).subscribe(e=>{this.sstSalt=e})}postGA4Event(e){let n=R({},e),r=this.cookieService.get("session_uuid"),s=new ko({"Content-Type":"text/plain;charset=UTF-8",Accept:"*/*"}),a=typeof screen<"u"?screen.height:"",d=typeof screen<"u"?screen.width:"",h=typeof navigator<"u"?navigator.language:"",x=this.sstSalt?this.sstSalt:"3948k29";this.generateSHA256Hash(r,x).then(v=>{if(typeof v<"u"){let y=(BigInt("0x"+v)&BigInt("0x7FFFFFFFFFFFFFFF")).toString();if(n.event_name=n.event,n.screen_resolution=`${a}X${d}`,n.language=h,n.ga_session_id=y,n.client_id=`${v}.${y}`,n["x-ga-protocol_version"]=this.protocolVersion,n["x-ga-measurement_id"]=this.ga4Id,n.page_title=document.title,n.page_location=this.maskURLInPath(this.windowRef.location.href),n.page_referrer=this.sanitizeReferer(this.windowRef.document.referrer),n["x-ga-gcs"]="G111",n.session_engaged=1,n.event="",n.language&&n.language.indexOf("-")!==-1&&(n.event_location={country:n.language.split("-")[1]}),"cloud_retail"in n&&n.cloud_retail!==void 0){let H=n;delete H.cloud_retail,n=H}n=lo(n,[]),this.http.post(`${this.sstURL}v=${this.protocolVersion}&tid=${this.ga4Id}&richsstsse`,n,{headers:s,withCredentials:!0,responseType:"text"}).pipe(It(H=>co("Something went wrong; please try again later."))).subscribe()}}).catch(v=>console.error("Error generating hash:",v))}generateSHA256Hash(e,n){return Z(this,null,function*(){if(typeof crypto>"u")return;let r=new TextEncoder().encode(e+n),s=yield crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(s)).map(h=>h.toString(16).padStart(2,"0")).join("")})}maskURLInPath(e){let n=this.restrictedURLs.split(",").filter(r=>r.trim()!=="");for(let r of n){let s=e.indexOf(r);if(s!==-1){let a=s+r.length,d=e.indexOf("/",a);d===-1&&(d=e.indexOf("?",a),d===-1&&(d=e.indexOf("&",a)));let h=e.substring(a,d!==-1?d:void 0);e=e.replace(h,"******")}}if(this.isSSTWhiteListEnabled){let r=e.indexOf("?")!==-1?e.indexOf("?"):e.indexOf("&");if(r!==-1){let a=e.substring(r+1).split("&");for(let d of a){let h=d.split("=")[0];!h.includes("utm")&&this.sstWhiteListParams.indexOf(h)===-1&&(e=e.replace(d,"******"))}}}return e}sanitizeReferer(e){if(typeof e<"u"){let n=e.split("/").slice(0,3).join("/");if(typeof n<"u"&&n!==this.windowRef.location.origin&&n.indexOf("costco")===-1)return n;e=this.maskURLInPath(e)}return e||""}};o.BREADCRUMB_SIZE=3,o.\u0275fac=function(n){return new(n||o)(S(Yt),S(qe),S(ot),S(_e),S(Ae),S(St),S(Re),S(wt),S(We),S(le),S(ni,8))},o.\u0275prov=ee({token:o,factory:o.\u0275fac});let i=o;return i})();var fi=(()=>{let o=class o extends jo{constructor(e,n,r,s,a,d){super(e,n,r,s),this.cms=e,this.unifiedInjector=n,this.pageMetaConfig=r,this.platformId=s,this.cmsComponentService=a,this.routerService=d,this.meta$=this.routerService.currentUrl$.pipe(G((h,x)=>o.compareRoutes(h,x)),jt(0),oe(()=>this.cms.getUntamperedCurrentPage().pipe($(1),oe(h=>h?this.getMetaResolver(h).pipe(oe(x=>x?this.resolve(x):Y(null))):Y(null)))),Ce(1))}getMeta(){return this.meta$}static compareRoutes(e,n){let r=e===n;if(!r&&(n.includes(o.SEARCH_QUERY_PARAM)||e.includes(o.SEARCH_QUERY_PARAM))){let s=n.includes(o.SEARCH_QUERY_PARAM)?n.substring(0,n.indexOf(o.SEARCH_QUERY_PARAM)):n,a=e.includes(o.SEARCH_QUERY_PARAM)?e.substring(0,e.indexOf(o.SEARCH_QUERY_PARAM)):e;r=s===a}return r}resolve(e){return this.cmsComponentService.shouldRenderSkeleton()?Y(null):e.resolveMetaData()}getMetaResolver(e){return or.isFirstRender?null:super.getMetaResolver(e)}};o.SEARCH_QUERY_PARAM="?q=",o.\u0275fac=function(n){return new(n||o)(S(tn),S(Fo),S(No),S(le),S(nn),S(Kt))}
8,o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:qo});let i=o;return i})();var ns=(()=>{let o=class o extends pn{constructor(e,n,r,s,a,d,h,x,v,y,E,H,T,J){super(e,n,s,a,d,h,x,E,H,T,J),this.currencyService=e,this.cookieService=n,this.localStorageService=r,this.windowRef=s,this.router=a,this.http=d,this.siteService=h,this.siteConfigService=x,this.sipPageMetaService=v,this.sipUserService=y,this.docRef=H,this.platformId=T,this.request=J,this.recommendationTrackingKey="googleRetailRecommendationTracking",this.DEFAULT_EVENT={event:de.RETAIL_EVENT,_clear:!0}}getProductRecommendationTracking(){return JSON.parse(this.localStorageService.retrieve(this.recommendationTrackingKey)??"{}")}trackProduct(e){if(!e.attributionToken)return;let n=this.getProductRecommendationTracking();n[e.code]={attributionToken:e.attributionToken},this.localStorageService.store(this.recommendationTrackingKey,JSON.stringify(n))}getRecommendationTracking(e){return this.getProductRecommendationTracking()[e.code]}removeRecommendationTracking(){this.localStorageService.clear(this.recommendationTrackingKey)}pushAddToCartEvent(e,n){let r=this.getRecommendationTracking(e);return this.getCloudRetailEvent(Mt.ADD_TO_CART).subscribe(s=>{this.pushEvent(te(R({},this.DEFAULT_EVENT),{cloud_retail:te(R({},s),{attributionToken:r?.attributionToken,productDetails:[{product:{id:e.code},quantity:n}]})}))}),super.pushAddToCartEvent(e,n)}pushProductDetailsEvent(e,n){let r=super.pushProductDetailsEvent(e,n),s=this.getRecommendationTracking(e);return this.getCloudRetailEvent(Mt.PRODUCT_DETAILS).subscribe(a=>{this.pushEvent(te(R({},r),{cloud_retail:te(R({},a),{attributionToken:s?.attributionToken,productDetails:r.ecommerce.detail.products.map(d=>({product:{id:d.id}}))})}))}),r}pushRetailSearchEvent(e,n,r){let s=super.pushGA4SearchResultEvent(n);return this.getCloudRetailEvent(Mt.SEARCH).subscribe(a=>{this.pushGA4Event(te(R({},s),{cloud_retail:te(R({},a),{attributionToken:r,searchQuery:n,productDetails:e.map(d=>({product:{id:d.code}}))})}))}),s}pushHomePageEvent(){return this.getCloudRetailEvent(Mt.HOME_PAGE).subscribe(e=>{this.pushEvent(te(R({},this.DEFAULT_EVENT),{cloud_retail:e}))}),this.DEFAULT_EVENT}pushCategoryPageEvent(){let e=this.sipPageMetaService.getMeta().pipe(V(Boolean),I(n=>n.breadcrumbs.map(r=>r.label)));return ne([this.getCloudRetailEvent(Mt.CATEGORY_PAGE),e]).pipe($(1)).subscribe(([n,r])=>{let s=[r.join(" > ")],a=te(R({},this.DEFAULT_EVENT),{cloud_retail:te(R({},n),{pageCategories:s})});this.pushEvent(a)}),this.DEFAULT_EVENT}pushCartPageEvent(e,n){return this.getCloudRetailEvent(Mt.CART_PAGE).pipe($(1)).subscribe(r=>{let s=te(R({},this.DEFAULT_EVENT),{cloud_retail:te(R({},r),{productDetails:e.cartGroupEntries?.flatMap(a=>a.entries.map(d=>({product:{id:d.product.code}})))})});super.pushGA4ViewCartEvent(e,n,s)}),this.DEFAULT_EVENT}getCloudRetailEvent(e){return this.getUser().pipe(I(n=>({eventType:e,userInfo:{userId:n.recommendationsUserId},visitorId:this.getVisitorId()})))}getUser(){return this.sipUserService.get().pipe($(1))}getVisitorId(){return this.cookieService.get(Zo)}};o.\u0275fac=function(n){return new(n||o)(S(Yt),S(qe),S(br),S(ot),S(_e),S(Ae),S(St),S(Re),S(fi),S(ri),S(wt),S(We),S(le),S(ni,8))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function ic(i,o){if(i&1&&b(0,"sip-age-restriction-overlay",15),i&2){let t=p(2);l("customClass","overlay-carousel")("minimumRequiredAge",t.product.minimumVerificationAge)}}function oc(i,o){if(i&1&&b(0,"sip-media",16),i&2){let t=p(2);l("container",t.mediaContainer)("loading",t.ImageLoadingStrategy.LAZY)}}function rc(i,o){if(i&1&&(b(0,"img",17),m(1,"cxTranslate")),i&2){let t=p(2);l("src",C(1,2,"img.missingProductImage.carousel"),xe)("alt",t.product.name)}}function sc(i,o){if(i&1&&(g(0,"div",18),M(1),_()),i&2){let t=p(2);c(),D(" ",t.product.deliveryName," ")}}function ac(i,o){if(i&1&&(g(0,"span",19),M(1),_()),i&2){let t=p(2);c(),re(t.product.shippingPurchaseMethodExceptionMessage)}}function lc(i,o){i&1&&(P(0),b(1,"i",20),g(2,"span"),M(3),m(4,"cxTranslate"),_(),O()),i&2&&(c(3),re(C(4,1,"product.membership.restrictions.apply")||"Membership Restrictions Apply"))}function cc(i,o){i&1&&(P(0),b(1,"i",20),g(2,"span"),M(3),m(4,"cxTranslate"),_(),O()
8),i&2&&(c(3),re(C(4,1,"product.shipping.restrictions.apply")||"Shipping Restrictions"))}function pc(i,o){i&1&&(P(0),b(1,"i",23),g(2,"span"),M(3),m(4,"cxTranslate"),_(),O()),i&2&&(c(3),re(C(4,1,"text.product.loginToCheckPrices")||"Member Only Item"))}function dc(i,o){if(i&1&&b(0,"sip-product-price-panel",24),i&2){let t=p(3);l("product",t.product)("isDetailPage",!1)}}function mc(i,o){if(i&1&&(g(0,"div",21),u(1,pc,5,3,"ng-container",11)(2,dc,1,2,"sip-product-price-panel",22),m(3,"async"),m(4,"sipSiteConfig"),_()),i&2){let t=p(2);c(),l("ngIf",t.shouldShowSignIn&&t.isMemberOnly),c(),l("ngIf",C(3,2,t.showPrice$)||q(4,4,"product.memberonly.show.as400.discount.to.anonymous.enabled","boolean"))}}function uc(i,o){if(i&1){let t=U();g(0,"div",27)(1,"a",6),F("click",function(){L(t);let n=p(3);return B(n.trackRecommendation())}),M(2),_()()}if(i&2){let t=p(3);c(),l("routerLink",t.product.url),c(),re(t.product.englishName)}}function gc(i,o){if(i&1){let t=U();g(0,"span")(1,"div",25)(2,"a",6),F("click",function(){L(t);let n=p(2);return B(n.trackRecommendation())}),M(3),_()(),u(4,uc,3,2,"div",26),m(5,"sipSiteConfig"),_()}if(i&2){let t=p(2);c(2),l("routerLink",t.product.url),c(),re(t.product.name),c(),l("ngIf",t.product.englishName&&q(5,3,t.CONFIG_DISPLAY_ENGLISH_TITLE,"boolean"))}}function _c(i,o){i&1&&(P(0),b(1,"i",23),g(2,"span"),M(3),m(4,"cxTranslate"),_(),O()),i&2&&(c(3),re(C(4,1,"text.product.loginToCheckPrices")||"Member Only Item"))}function hc(i,o){if(i&1&&b(0,"sip-product-price-panel",24),i&2){let t=p(3);l("product",t.product)("isDetailPage",!1)}}function fc(i,o){if(i&1&&(g(0,"div",21),u(1,_c,5,3,"ng-container",11)(2,hc,1,2,"sip-product-price-panel",22),m(3,"async"),m(4,"sipSiteConfig"),_()),i&2){let t=p(2);c(),l("ngIf",t.shouldShowSignIn&&t.isMemberOnly),c(),l("ngIf",C(3,2,t.showPrice$)||q(4,4,"product.memberonly.show.as400.discount.to.anonymous.enabled","boolean"))}}function Cc(i,o){if(i&1&&b(0,"sip-inline-ratings-bazaarvoice",28),i&2){let t=p(2);l("product",t.product)}}function xc(i,o){if(i&1&&b(0,"sip-product-min-qty-msg",32),i&2){let t=p(3);l("route",t.SIP_PAGE_TYPE.PRODUCT_LIST_PAGE)("product",t.product)}}function vc(i,o){if(i&1&&(g(0,"div"),u(1,xc,1,2,"sip-product-min-qty-msg",29),g(2,"div",30),b(3,"sip-add-to-cart-panel",31),_()()),i&2){let t=p(2);c(),l("ngIf",t.routeType!==t.SIP_PAGE_TYPE.PRODUCT_DETAILS_PAGE),c(2),l("product",t.product)("route",t.routeType)("addToCartUrl",t.ADD_TO_CART_URL)("addToCartFeature",!0)("addToCartFromWishList",!1)}}function bc(i,o){if(i&1){let t=U();g(0,"button",34),F("click",function(){L(t);let n=p(3);return B(n.displayPostalCodeModal())}),M(1),m(2,"cxTranslate"),_()}if(i&2){let t=p(3);c(),D(" ",C(2,1,t.baseStore.inputDeliveryByAddress?"basket.add.to.basket.set.delivery.address":"basket.add.to.basket.set.postal.code")," ")}}function yc(i,o){if(i&1&&(u(0,bc,3,3,"button",33),m(1,"async"),m(2,"async")),i&2){let t=p(2);l("ngIf",t.product.inRestrictedZone&&!(C(1,1,!t.baseStore.inputDeliveryByAddress&&t.postalCode$)||C(2,3,t.baseStore.inputDeliveryByAddress&&t.deliveryAddress$)))}}function Sc(i,o){if(i&1){let t=U();g(0,"div",3)(1,"div",4),u(2,ic,1,2,"sip-age-restriction-overlay",5),m(3,"async"),g(4,"a",6),F("click",function(){L(t);let n=p();return B(n.trackRecommendation())}),u(5,oc,1,2,"sip-media",7)(6,rc,2,4,"ng-template",null,0,A),_(),b(8,"sip-decals",8),_(),u(9,sc,2,1,"div",9)(10,ac,2,1,"span",10)(11,lc,5,3,"ng-container",11)(12,cc,5,3,"ng-container",11)(13,mc,5,7,"div",12)(14,gc,6,6,"span",11)(15,fc,5,7,"div",12)(16,Cc,1,1,"sip-inline-ratings-bazaarvoice",13)(17,vc,4,6,"div",14),m(18,"async"),m(19,"async"),m(20,"async"),u(21,yc,3,5,"ng-template",null,1,A),_()}if(i&2){let t=k(7),e=k(22),n=p();c(2),l("ngIf",C(3,15,n.showOverlay$)),c(2),l("routerLink",n.product.url),c(),l("ngIf",n.mediaContainer)("ngIfElse",t),c(3),l("decalData",n.product.decalData),c(),l("ngIf",n.product.deliveryName),c(),l("ngIf",n.baseStore.shippingPurchaseMethodExceptionMessagingEnabled&&n.product.shippingPurchaseMethodExceptionMessage),c(),l("ngIf",n.product.membershipRestrictionApplied),c(),l("ngIf",!n.product.membershipRestrictionApplied&&n.product.shippingRestrictionApplied),c(),l("ngIf",n.showPriceOnTop&&n.displayProductPrices),c(),l("ngIf",n.displayProductTitles),c(),l("ngIf",n.displayProductPrices&&!n.showPriceOnTop),c(),l("ngIf",n.product),c(),l("ngIf",n.addToCart&&n.product.addableToCartFromCarousel&&n.product.purchasable&&!n.product.tire&&C(18,17,n.showPrice$)&&(!n.product.inRestrictedZ
8one||C(19,19,!n.baseStore.inputDeliveryByAddress&&n.postalCode$)||C(20,21,n.baseStore.inputDeliveryByAddress&&n.deliveryAddress$)))("ngIfElse",e)}}var dn=(()=>{let o=class o{constructor(e,n,r,s,a){this.googleRetailService=e,this.userService=n,this.deliveryService=r,this.baseStoreService=s,this.memberVerificationService=a,this.CONFIG_DISPLAY_ENGLISH_TITLE="product.display.english.title",this.CAROUSEL_IMAGE_FORMAT="carousel",this.ADD_TO_CART_URL=xn.ADD_TO_CART,this.SIP_PAGE_TYPE=vn,this.showPriceOnTop=!0,this.displayProductTitles=!0,this.displayProductPrices=!0,this.addToCart=!1,this.routeType=this.SIP_PAGE_TYPE.CAROUSEL_PAGE,this.ImageLoadingStrategy=Yo}ngOnInit(){this.hasAnonymousRole$=this.userService.hasAnonymousRole(),this.baseStoreService.getCurrentBaseStore().pipe($(1)).subscribe(e=>this.baseStore=e),this.showPrice$=this.hasAnonymousRole$.pipe(I(e=>ur.shouldShowPrice(this.product,e)&&!!this.product.price)),this.isMemberOnly=this.product?.hidePriceValue,this.shouldShowSignIn=!(this.product?.hidePriceValue&&this.product?.warehouseHidePriceValue),this.mediaContainer=this.getMediaContainer(this.product),this.addToCart=String(this.addToCart)==="true",this.postalCode$=this.deliveryService.getServiceablePostalCode(),this.deliveryAddress$=this.deliveryService.getServiceableAddress(),this.product.idVerificationEnabled&&this.product.minimumVerificationAge>=0&&(this.isMemberVerified$=this.userService.isMemberVerified(),this.memberHasMinimumAge$=this.memberVerificationService.memberHasMinimumAge(this.product),this.showOverlay$=this.memberVerificationService.showOverlay(this.product))}displayPostalCodeModal(){this.baseStore.inputDeliveryByAddress?this.deliveryService.triggerLocationModal(Zr,null,!0,this.baseStore):this.deliveryService.triggerLocationModal(Wr)}buildFallbackCarouselImage(e){let n=this.CAROUSEL_IMAGE_FORMAT,r=`${this.CAROUSEL_IMAGE_FORMAT}-webp`,s=e[n],a=e[r];return{[n]:{url:s},[r]:{url:a}}}getMediaContainer(e){let n=e.images||{},r=e.thumbnailImage,s=_t.GALLERY in n?_t.GALLERY:_t.PRIMARY;if(!n[s]&&!r)return null;r&&(n[s]=this.buildFallbackCarouselImage(r));let a=n[s];if(Array.isArray(a)){for(let d in a)if(a[d]&&Object.prototype.hasOwnProperty.call(a[d],this.CAROUSEL_IMAGE_FORMAT))return a[d]}return a}trackRecommendation(){this.product.attributionToken&&this.googleRetailService.trackProduct(this.product)}};o.\u0275fac=function(n){return new(n||o)(f(ns),f(ri),f(Le),f(st),f(pr))},o.\u0275cmp=w({type:o,selectors:[["sip-product-carousel-item"]],inputs:{product:"product",showPriceOnTop:"showPriceOnTop",displayProductTitles:"displayProductTitles",displayProductPrices:"displayProductPrices",bvContainerPrefix:"bvContainerPrefix",addToCart:"addToCart",routeType:"routeType"},decls:1,vars:1,consts:[["missingImageTpl",""],["setPostalCodeButton",""],["class","item product-item","tabindex","0",4,"ngIf"],["tabindex","0",1,"item","product-item"],[1,"thumb"],[3,"customClass","minimumRequiredAge",4,"ngIf"],["tabindex","0",3,"click","routerLink"],["format","carousel",3,"container","loading",4,"ngIf","ngIfElse"],[3,"decalData"],["class","product-title-delivery",4,"ngIf"],["class","shipping-purchase-method-exception-message",4,"ngIf"],[4,"ngIf"],["class","item-price",4,"ngIf"],[3,"product",4,"ngIf"],[4,"ngIf","ngIfElse"],[3,"customClass","minimumRequiredAge"],["format","carousel",3,"container","loading"],[3,"src","alt"],[1,"product-title-delivery"],[1,"shipping-purchase-method-exception-message"],[1,"costco-icons","costco-icon-membership-restrictions"],[1,"item-price"],[3,"product","isDetailPage",4,"ngIf"],[1,"costco-icons","costco-icon-member-only"],[3,"product","isDetailPage"],[1,"item-name","notranslate"],["class","item-name en-name notranslate",4,"ngIf"],[1,"item-name","en-name","notranslate"],[3,"product"],[3,"route","product",4,"ngIf"],[1,"add-to-cart-wrapper"],[3,"product","route","addToCartUrl","addToCartFeature","addToCartFromWishList"],[3,"route","product"],["class","btn btn-primary btn-set-postal-code",3,"click",4,"ngIf"],[1,"btn","btn-primary","btn-set-postal-code",3,"click"]],template:function(n,r){n&1&&u(0,Sc,23,23,"div",2),n&2&&l("ngIf",r.product)},styles:['.costco-icon-member-only[_ngcontent-%COMP%]{color:#e51937;font-size:16px}.costco-icon-member-only[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{font-size:16px;margin-left:4px}.costco-icon-membership-restrictions[_ngcontent-%COMP%]{color:#e51937;font-size:16px}.costco-icon-membership-restrictions[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{font-size:16px;margin-left:4px}.costco-icon-shipping-restrictions[_ngcontent-%COMP%]{color:#e51937;font-size:16px}.costco-icon-shipping-restrictions[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{font-size:16px;margin-left:4px}[_nghost-%COMP%] .price-panel{float:none;display:block;text-align:left;clear:none}[_nghost-%COMP%] .lister-name, [_nghost-%COMP%] .lister-name-en{color:inherit;display:block;max-height:54px;line-height:18px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3}[_nghost-%COMP%] .add-to-cart{display:-webkit-flex;-webkit-flex-flow:row wrap;display:flex;flex-flow:row wrap;margin-top:10px}[_nghost-%COMP%] .add-to-cart__qty, [_nghost-%COMP%] .add-to-cart__btn, [_nghost-%COMP%] .add-to-cart__qty .input-group{width:100%}[_nghost-%COMP%] .add-to-cart .button-wrapper{width:100%;margin-top:8px}[_nghost-%COMP%] .add-to-cart .input-plp{width:100%}@media screen and (min-width: 1400px){[_nghost-%COMP%] .add-to-cart{justify-content:space-between}[_nghost-%COMP%] .add-to-cart .input-plp{width:50%}[_nghost-%COMP%] .add-to-cart .button-wrapper{width:calc(50% - 20px);margin-top:0}[_nghost-%COMP%] .add-to-cart__btn{float:right;font-size:16px}}[_nghost-%COMP%] .add-to-cart__minus, [_nghost-%COMP%] .add-to-cart__plus{font-size:16px;padding:0;margin-top:-1px;border:1px solid #cccccc}[_nghost-%COMP%] .add-to-cart__input{font-size:16px;border:1px solid #cccccc;width:100%}@media screen and (min-width: 1400px){[_nghost-%COMP%] .add-to-cart__input{width:40px}}[_nghost-%COMP%] .items-in-cart, [_nghost-%COMP%] .qty-status, [_nghost-%COMP%] .min-qty-status{text-align:left;font-size:16px;color:green;padding:0 0 10px}[_nghost-%COMP%] .items-in-cart, [_nghost-%COMP%] .qty-status, [_nghost-%COMP%] .max-qty-status{text-align:left;font-size:16px;color:green;padding:0 0 10px}[_nghost-%COMP%] .items-in-cart{width:100%;text-align:center}@media screen and (min-width: 1400px){[_nghost-%COMP%] .items-in-cart{clear:both}}[_nghost-%COMP%] .qty-selector{width:100%}@media screen and (min-width: 1400px){[_nghost-%COMP%] .qty-selector{width:50%;float:left}}[_nghost-%COMP%] .qty-selector .qty-selector__input{width:100%}@media screen and (min-width: 1400px){[_nghost-%COMP%] .qty-selector .qty-selector__input{min-width:40px}}[_nghost-%COMP%] .qty-selector .form-control{text-align:center}@media screen and (max-width: 1024px){[_nghost-%COMP%] .qty{width:100px}}[_nghost-%COMP%] .product-list-item--grid .add-to-cart__qty.in-cart{width:100%}[_nghost-%COMP%] .product-list-item--grid .price-panel{float:none;display:block;text-align:left;clear:none;margin:0;max-width:100%;line-height:1.4}[_nghost-%COMP%] .product-list-item--grid .product-listing .price-panel{text-align:left}[_nghost-%COMP%] .product-list-item--grid .warning-in-cart, [_nghost-%COMP%] .product-list-item--grid .qty-warning-in-cart{text-align:center;font-size:16px;color:#e51937;padding:0 0 10px}[_nghost-%COMP%] .product-list-item--grid .product-price .original-price{font-size:24px;color:#333}@media screen and (min-width: 768px) and (max-width: 1024px),screen and (max-width: 767px){[_nghost-%COMP%] .product-list-item--grid .product-price .original-price{font-size:20px}}[_nghost-%COMP%] .product-list-item--grid .product-price .incvat-price .from-price{padding-right:5px}[_nghost-%COMP%] .product-list-item--grid .product-price .free-shipping{font-size:16px;color:#707070;line-height:20px;padding-bottom:5px;font-weight:400}@media screen and (min-width: 768px) and (max-width: 1024px),screen and (max-width: 767px){[_nghost-%COMP%] .product-list-item--grid .product-price .free-shipping{font-size:14px}}@media screen and (min-width: 1024px){[_nghost-%COMP%] .product-list-item--list .add-to-cart{justify-content:flex-start}[_nghost-%COMP%] .product-list-item--list .add-to-cart__qty{width:120px;margin-right:12px}[_nghost-%COMP%] .product-list-item--list .add-to-cart__qty.in-cart{width:225px}[_nghost-%COMP%] .product-list-item--list .add-to-cart .qty-selector{float:left}[_nghost-%COMP%] .product-list-item--list .add-to-cart__btn{width:initial;min-width:90px}[_nghost-%COMP%] .product-list-item--list .add-to-cart .items-in-cart__text{display:block;width:225px}}.product-list-details[_ngcontent-%COMP%]{width:100%;display:block;text-align:left;font-size:16px;color:#0060a9;line-height:20px;padding-bottom:8px}.product-list-details[_ngcontent-%COMP%] .name[_ngcontent-%COMP%], .product-list-details[_ngcontent-%COMP%] .name_en[_ngcontent-%COMP%]{margin-left:0}@media screen and (max-width: 767px){.product-list-details[_ngcontent-%COMP%] .name_en[_ngcontent-%COMP%]{display:none}}.product-image[_ngcontent-%COMP%]{position:relative;min-height:150px}.out-of-stock[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%]{position:relative}.out-of-stock[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{opacity:.3}.out-of-stock[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%] .stock-status[_ngcontent-%COMP%]{position:absolute;top:calc(50% - 24px);width:100%;left:0;font-size:21px;background:#eaeaea;opacity:.7;z-index:1800;height:48px}.out-of-stock[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%] .stock-status[_ngcontent-%COMP%] .out-of-stock-message[_ngcontent-%COMP%]{color:#5f5f5f;padding-top:8px;text-align:center}.price-panel-login[_ngcontent-%COMP%]{display:block;float:none;clear:none;margin:0;text-align:left;line-height:20px;padding-bottom:5px;color:#707070;text-transform:capitalize;font-size:16px}.price-panel-login[_ngcontent-%COMP%] .costco-icon-member-only[_ngcontent-%COMP%]{color:#e51937;font-size:12px}.price-panel-login[_ngcontent-%COMP%] .costco-icon-member-only[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{vertical-align:text-top}.price-panel-login[_ngcontent-%COMP%] .costco-icon-membership-restrictions[_ngcontent-%COMP%]{color:#e51937;font-size:12px}.price-panel-login[_ngcontent-%COMP%] .costco-icon-membership-restrictions[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{vertical-align:text-top}.price-panel-login[_ngcontent-%COMP%] .costco-icon-shipping-restrictions[_ngcontent-%COMP%]{color:#e51937;font-size:12px}.price-panel-login[_ngcontent-%COMP%] .costco-icon-shipping-restrictions[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{vertical-align:text-top}.product-summary-container[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .tire-product-summary-container{display:block}[_nghost-%COMP%] .tire-product-summary-container .tire-summary__wide{columns:2;-webkit-columns:2;-moz-columns:2}[_nghost-%COMP%] .tire-product-summary-container .result-info--column{width:100%;float:left;padding-right:40px;margin:0;line-height:normal;font-size:16px}[_nghost-%COMP%] .tire-product-summary-container .result-info--column .list-value{display:contents;font-weight:700}[_nghost-%COMP%] .tire-product-summary-container .result-info--column .list-value:after{content:"";display:table;clear:both}[_nghost-%COMP%] .tire-product-summary-container .result-info--column .list-title{font-weight:400;display:inline-block;margin:0 3px 6px 0}@media screen and (min-width: 768px) and (max-width: 1023px){[_nghost-%COMP%] .tire-product-summary-container .result-info--column{padding-right:5px;font-size:14px}[_nghost-%COMP%] .tire-product-summary-container .result-info--column .list-head{margin:0 3px 0 0}}@media screen and (max-width: 767px){[_nghost-%COMP%] .tire-product-summary-container .result-info--column{padding-right:0;font-size:14px}}[_nghost-%COMP%] .tire-product-summary-container:after{display:block;clear:both;content:""}@supports (-ms-ime-align: auto){[_nghost-%COMP%] .tire-product-summary-container .result-info--column .list-value{display:inline}}[_nghost-%COMP%] .tire-product-summary-container{display:block;color:#333;margin-top:16px;margin-bottom:8px;font-size:16px}[_nghost-%COMP%] .product-list-item--grid .tire-product-summary-container{display:none}.product-price[_ngcontent-%COMP%] .discount-info[_ngcontent-%COMP%], .promo[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:green;line-height:20px;padding-bottom:5px;margin-bottom:8px}@media screen and (min-width: 768px) and (max-width: 1024px),screen and (max-width: 767px){.product-price[_ngcontent-%COMP%] .discount-info[_ngcontent-%COMP%], .promo[_ngcontent-%COMP%]{font-size:14px}}.product-list-item[_ngcontent-%COMP%] .product-image--wrapper[_ngcontent-%COMP%]{display:block;margin-bottom:16px}.product-list-item[_ngcontent-%COMP%] .btn-set-postal-code[_ngcontent-%COMP%]{font-size:16px}.product-list-item--list[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%]{display:inline-block;width:calc(100% / 3);margin-right:20px}.product-list-item--list[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%] .product-image--wrapper[_ngcontent-%COMP%]{display:block;float:none;clear:none;margin:0 auto}.product-list-item--list[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%] .product-image--wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:200px}.product-list-item--list[_ngcontent-%COMP%] .product-info-wrapper[_ngcontent-%COMP%]{display:inline-block;vertical-align:top;width:calc(100% * 2/3 - 20px)}.product-list-item--list[_ngcontent-%COMP%] .product-info-wrapper[_ngcontent-%COMP%] .price-panel[_ngcontent-%COMP%], .product-list-item--list[_ngcontent-%COMP%] .product-info-wrapper[_ngcontent-%COMP%] .price-panel-login[_ngcontent-%COMP%]{text-align:left;float:none;clear:both;line-height:inherit;margin-left:inherit}.product-list-item--list[_ngcontent-%COMP%] .product-list-warehouse-only[_ngcontent-%COMP%], .product-list-item--list[_ngcontent-%COMP%] .product-list-details[_ngcontent-%COMP%]{display:inline-block}.product-list-item--list[_ngcontent-%COMP%] .shipping-include[_ngcontent-%COMP%]{clear:both;float:right;color:#025ea9}.product-list-item--list[_ngcontent-%COMP%] .product-summary-container[_ngcontent-%COMP%]{display:inline-block;color:#333;margin-bottom:8px;font-size:16px}@media screen and (min-width: 1024px){.product-list-item--list[_ngcontent-%COMP%] .product-image[_ngcontent-%COMP%]{width:30%}.product-list-item--list[_ngcontent-%COMP%] .product-info-wrapper[_ngcontent-%COMP%]{width:calc(70% - 20px);padding:0}.product-list-item--list[_ngcontent-%COMP%] .product-image--wrapper[_ngcontent-%COMP%]{width:200
8px}.product-list-item--list[_ngcontent-%COMP%] .product-image--wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:inherit;margin:0 auto;max-height:200px}}sip-age-restriction-overlay[_ngcontent-%COMP%]{position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%}.shipping-purchase-method-exception-message[_ngcontent-%COMP%]{color:green;font-weight:700;display:block}[_nghost-%COMP%] .product-item[_ngcontent-%COMP%] .product-price[_ngcontent-%COMP%] .original-price[_ngcontent-%COMP%]{font-size:24px;color:#333}[_nghost-%COMP%] .product-item.item[_ngcontent-%COMP%]{padding:10px 8px}[_nghost-%COMP%] .product-item[_ngcontent-%COMP%] .product-price[_ngcontent-%COMP%] .free-shipping[_ngcontent-%COMP%]{font-size:16px;color:#707070;line-height:20px;padding-bottom:5px;font-weight:400}[_nghost-%COMP%] .product-title-delivery[_ngcontent-%COMP%]{color:#005dab;margin-bottom:5px;font-weight:700;font-size:large}[_nghost-%COMP%] .item-price[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .costco-carousel-component[_ngcontent-%COMP%]{margin:10px 10px 0;border-top:1px solid #cccccc}[_nghost-%COMP%] .thumb[_ngcontent-%COMP%]{max-width:300px;justify-self:center}[_nghost-%COMP%] .item-name[_ngcontent-%COMP%]{margin:0;text-transform:capitalize;height:auto;font-weight:400;text-align:left}[_nghost-%COMP%] .item-name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005dab;line-height:20px;font-size:16px} .button-wrapper{width:100%} .input-plp{width:100%}@media screen and (min-width: 1400px){ .button-wrapper{width:calc(50% - 20px)} .input-plp{width:50%}} .carousel__item .add-to-cart__btn{float:right} .carousel__item .qty-selector .qty-selector__input{width:100%} .carousel__item .add-to-cart{display:-webkit-flex;-webkit-flex-flow:row wrap;display:flex;flex-flow:row wrap;margin-top:10px} .carousel__item .add-to-cart__qty, .carousel__item .add-to-cart__btn, .carousel__item .add-to-cart__qty .input-group{width:100%}@media screen and (min-width: 1400px){ .carousel__item .add-to-cart{justify-content:space-between} .carousel__item .add-to-cart__qty{width:50%} .carousel__item .add-to-cart__btn{float:right}} .carousel__item .add-to-cart__minus, .carousel__item .add-to-cart__plus{font-size:16px;padding:0;margin-top:-1px;border:1px solid #cccccc} .carousel__item .add-to-cart__input{font-size:16px;border:1px solid #cccccc;width:100%}@media screen and (min-width: 1400px){ .carousel__item .add-to-cart__input{width:40px}} .carousel__item .items-in-cart{color:green;font-size:16px;padding:10px 0;flex-flow:row wrap} .overlay-carousel{position:absolute}'],changeDetection:0});let i=o;return i})();function Pc(i,o){if(i&1&&b(0,"sip-product-carousel-item",4),i&2){let t=o.ngIf,e=p().ngIf;l("product",e)("addToCart",t.addToCart)}}function Oc(i,o){if(i&1&&(P(0),u(1,Pc,1,2,"sip-product-carousel-item",3),m(2,"async"),O()),i&2){let t=p(2);c(),l("ngIf",C(2,1,t.data$))}}function Mc(i,o){if(i&1&&(u(0,Oc,3,3,"ng-container",2),m(1,"async")),i&2){let t=o.item;l("ngIf",C(1,1,t))}}var is=(()=>{let o=class o extends Ko{constructor(e,n,r,s,a){super(n,r),this.translationService=e,this.componentData=n,this.productService=r,this.sipRoutingService=s,this.platformId=a,this.hidden=!1,this.hasTitle=!0,this.includeH2Tag=!1,this.isPLPPage=new RegExp("(/c/(?!.*/p/))"),this.data$=this.componentData.data$.pipe(V(Boolean),I(d=>o.normalizeComponentData(d))),this.title$=this.data$.pipe(oe(d=>{let h=d.typeCode==="CostcoTopSellerCarouselComponent";return this.sipRoutingService.currentUrl$.pipe(oe(x=>{let v=this.isPLPPage.test(x);return this.includeH2Tag=h&&v,(h?this.translationService.translate("topseller.carousel.title",{0:d.title||""}):Y(d.title)).pipe(tt(E=>{this.hasTitle=!!E}))}))})),this.items$=this.data$.pipe(oe(d=>{if(d.products?.length)return Y(d.products.map(h=>Y(h)));{let h=d.productCodes?d.productCodes.trim().split(" "):[];if(h.length===0)return Y([]).pipe(tt(v=>{this.hidden=!0}));let x;return"useSolrSearch"in d?x=this.productService.fetch(h,{useSolrSearch:d.typeCode==="CostcoTopSellerCarouselComponent"||d.useSolrSearch,doStockCheck:d.doStockCheck||!1}):x=jn(h.map(v=>this.productService.get(v,this.PRODUCT_SCOPE)).map(v=>v.pipe(V(y=>!!y),Nn(7e3),$(1),It(y=>(this.hidden=!0,fn))))),x.pipe(It(v=>(this.hidden=!0,Y([]))),I((v=[])=>v.map(y=>Y(y))))}})),this.serverMode=Ut(this.platformId),this.options$=this.componentData.data$.pipe(V(d=>!!d),I(d=>({lazyLoad:!this.serverMode&&String(d.lazyLoad)==="true",lazyLoadEager:parseInt(String(d.lazyLoadEager),10)})))}static normalizeComponentData(e){let n=R({},e);
8return"useSolrSearch"in n&&(n.useSolrSearch=String(e.useSolrSearch)==="true"),n.addToCart=String(e.addToCart)==="true",n.doStockCheck=String(e.doStockCheck)==="true",n}};o.\u0275fac=function(n){return new(n||o)(f(he),f(K),f(Xt),f(Kt),f(le))},o.\u0275cmp=w({type:o,selectors:[["sip-product-carousel"]],hostVars:4,hostBindings:function(n,r){n&2&&Ne("hidden",r.hidden)("has-title",r.hasTitle)},features:[it],decls:4,vars:7,consts:[["carouselItem",""],[3,"title","items","template","options","includeH2Tag"],[4,"ngIf"],[3,"product","addToCart",4,"ngIf"],[3,"product","addToCart"]],template:function(n,r){if(n&1&&(b(0,"sip-product-carousel-base",1),m(1,"async"),u(2,Mc,2,3,"ng-template",null,0,A)),n&2){let s=k(3);l("title",r.title$)("items",r.items$)("template",s)("options",C(1,5,r.options$))("includeH2Tag",r.includeH2Tag)}},dependencies:[z,rn,dn,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let i=o;return i})();var os=(()=>{let o=class o{constructor(e,n,r){this.http=e,this.occEndpoints=n,this.converter=r}load(e,n,r,s){return this.http.get(this.getEndpoint(e,n,r,s)).pipe(this.converter.pipeable(Yn))}getEndpoint(e,n,r,s){let a={},d={currentPage:s,pageSize:r};this.hasProductCodes(e)&&(e.sort(),a.productCodes=e),n&&(a.referenceType=n),(this.hasProductCodes(e)||n)&&(d.useExternalRef=!0);let h=this.hasProductCodes(e)&&n?"productReferencesByProductCodesAndReferenceType":this.hasProductCodes(e)?"productReferencesByProductCodes":n?"productReferencesByReferenceType":"productReferencesMultiple";return this.occEndpoints.buildUrl(h,{urlParams:a,queryParams:d})}hasProductCodes(e){return Array.isArray(e)&&e.length>0}};o.\u0275fac=function(n){return new(n||o)(S(Ae),S(yt),S(qn))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var rs=(()=>{let o=class o{constructor(e){this.adapter=e}get(e,n,r,s){return this.adapter.load(e,n,r,s)}};o.\u0275fac=function(n){return new(n||o)(S(os))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ci=(()=>{let o=class o{constructor(e,n,r,s){this.productReferencesConnector=e,this.http=n,this.occEndpointsService=r,this.converter=s}get(e,n,r,s){return this.productReferencesConnector.get(e,n,r,s).pipe(Ce(1))}getMany(e,n,r){return this.http.get(this.getEndpoint(e,n,r)).pipe(this.converter.pipeable(Yn),Ce(1))}getEndpoint(e,n,r){let s={},a={pageSize:r,useExternalRef:!1},d=e.split("/");d.sort(),s.productCodes=d,n&&(s.referenceType=n);let h=n?"productReferencesByProductCodesAndReferenceType":"productReferencesByProductCodes";return this.occEndpointsService.buildUrl(h,{urlParams:s,queryParams:a})}};o.\u0275fac=function(n){return new(n||o)(S(rs),S(Ae),S(yt),S(qn))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var xi=class i{static containsAll(o,t){return t.every(e=>o.includes(e))}static sameMembers(o,t){return i.containsAll(o,t)&&i.containsAll(t,o)}static setItemCountInGroupMap(o,t){t&&o.has(t?.statusCode)&&o.set(t.statusCode,o.get(t.statusCode)+1)}static isItemCountInGroupMap(o,t){let e;for(let n of o.keys())if(t>1&&o.get(n)===t){e=n;break}return e}static mapStatusCodeToMessage(o,t){return t&&_r[o]||o}};function kc(i,o){if(i&1&&b(0,"sip-product-carousel-item",4),i&2){let t=o.ngIf,e=p().ngIf;l("product",e)("displayProductPrices",t.displayProductPrices)("displayProductTitles",t.displayProductTitles)("addToCart",t.addToCart)}}function wc(i,o){if(i&1&&(P(0),u(1,kc,1,4,"sip-product-carousel-item",3),m(2,"async"),O()),i&2){let t=p(2);c(),l("ngIf",C(2,1,t.componentData$))}}function Tc(i,o){if(i&1&&(u(0,wc,3,3,"ng-container",2),m(1,"async")),i&2){let t=o.item;l("ngIf",C(1,1,t))}}var vi=(()=>{let o=class o{constructor(e,n,r,s,a,d){this.component=e,this.current=n,this.referenceService=r,this.cms=s,this.activeCartService=a,this.platformId=d,this.currentPageId$=this.cms.getCurrentPage().pipe(I(h=>h.pageId)),this.componentData$=this.component.data$,this.title$=this.componentData$.pipe(I(h=>h.title),V(Boolean),Ce(1)),this.serverMode=Ut(this.platformId),this.options$=this.component.data$.pipe(V(h=>!!h),I(h=>({lazyLoad:!this.serverMode&&String(h.lazyLoad)==="true",lazyLoadEager:parseInt(String(h.lazyLoadEager),10)}))),this.currentProductCodes$=this.currentPageId$.pipe(oe(h=>{switch(h){case Xo.CART_PAGE:return this.activeCartService.getEntries().pipe(V(x=>x.length>0),I(x=>x.map(v=>v.product.code)));case Tt.PDP_TIRES:case Tt.PDP:return this.current.getProduct().pipe(V(Boolean),I(x=>[x.code]));default:return Y([])}}),G()),this.items$=ne([this.currentProductCodes$.pipe(G((h,x)=>xi.sameMembers(h,x))),this.componentData$.pipe(G((h,x)=>h.productReferenceTypes===x.productReferenceTypes&&h.maximumNumberProducts===x.maximumNumberProducts)),this.currentPageId$.pipe(G())]).pipe(oe(([h,x,v])=>this.getProducts(h,x.productReferenceTypes,x.maximumNumberProducts,v)))}
8getProducts(e,n,r,s){return this.getProductReferences(e,n,r,s).pipe(V(Boolean),G(),I(a=>a.map(d=>Y(d.target))),Ce(1))}getProductReferences(e,n,r,s){return this.referenceService.get(e,n,r,s)}};o.\u0275fac=function(n){return new(n||o)(f(K),f(ti),f(Ci),f(tn),f(De),f(le))},o.\u0275cmp=w({type:o,selectors:[["sip-product-references"]],decls:4,vars:6,consts:[["carouselItem",""],[3,"title","items","template","options"],[4,"ngIf"],[3,"product","displayProductPrices","displayProductTitles","addToCart",4,"ngIf"],[3,"product","displayProductPrices","displayProductTitles","addToCart"]],template:function(n,r){if(n&1&&(b(0,"sip-product-carousel-base",1),m(1,"async"),u(2,Tc,2,3,"ng-template",null,0,A)),n&2){let s=k(3);l("title",r.title$)("items",r.items$)("template",s)("options",C(1,4,r.options$))}},dependencies:[z,rn,dn,N],encapsulation:2,changeDetection:0});let i=o;return i})();function Ac(i,o){if(i&1&&b(0,"sip-product-carousel-item",4),i&2){let t=o.ngIf,e=p().ngIf;l("product",e)("showPriceOnTop",!1)("displayProductPrices",t.displayProductPrices)("displayProductTitles",t.displayProductTitles)}}function Rc(i,o){if(i&1&&(P(0),u(1,Ac,1,4,"sip-product-carousel-item",3),m(2,"async"),O()),i&2){let t=p(2);c(),l("ngIf",C(2,1,t.componentData$))}}function Dc(i,o){if(i&1&&(u(0,Rc,3,3,"ng-container",2),m(1,"async")),i&2){let t=o.item;l("ngIf",C(1,1,t))}}var as=(()=>{let o=class o extends vi{constructor(e,n,r,s,a,d,h,x){super(e,n,r,d,h,le),this.component=e,this.current=n,this.referenceService=r,this.recentlyViewedProductService=s,this.route=a,this.cms=d,this.activeCartService=h,this.routingService=x,this.componentData$=this.component.data$.pipe(I(v=>o.normalizeComponentData(v))),this.recentlyViewedProductCodes$=ne([this.componentData$.pipe(V(v=>!!v),et("maximumNumberProducts")),this.routingService.getRouterState().pipe(I(v=>v.state.params.productCode),G())]).pipe(I(([v,y])=>this.recentlyViewedProductService.getProductList(v,[y]).join("/")),Ce(1),G()),this.items$=ne([this.recentlyViewedProductCodes$,this.componentData$.pipe(G((v,y)=>v.productReferenceTypes===y.productReferenceTypes&&v.maximumNumberProducts===y.maximumNumberProducts))]).pipe(V(([v,y])=>!!v),oe(([v,y])=>this.getProducts([v],y.productReferenceTypes,y.maximumNumberProducts)))}static normalizeComponentData(e){return te(R({},e),{displayProductTitles:String(e.displayProductTitles)==="true",displayProductPrices:String(e.displayProductPrices)==="true",popup:String(e.popup)==="true"})}getProductReferences(e,n,r,s){return this.referenceService.getMany(e[0],n,r)}};o.\u0275fac=function(n){return new(n||o)(f(K),f(ti),f(Ci),f(hr),f(Wt),f(tn),f(De),f(rt))},o.\u0275cmp=w({type:o,selectors:[["sip-recently-viewed-carousel-references"]],features:[it],decls:4,vars:6,consts:[["carouselItem",""],[3,"title","items","template","options"],[4,"ngIf"],[3,"product","showPriceOnTop","displayProductPrices","displayProductTitles",4,"ngIf"],[3,"product","showPriceOnTop","displayProductPrices","displayProductTitles"]],template:function(n,r){if(n&1&&(b(0,"sip-product-carousel-base",1),m(1,"async"),u(2,Dc,2,3,"ng-template",null,0,A)),n&2){let s=k(3);l("title",r.title$)("items",r.items$)("template",s)("options",C(1,4,r.options$))}},dependencies:[z,rn,dn,N],encapsulation:2,changeDetection:0});let i=o;return i})();var bi=(()=>{let o=class o{constructor(e){this.viewContainerRef=e}};o.\u0275fac=function(n){return new(n||o)(f(Hn))},o.\u0275dir=xo({type:o,selectors:[["","sipCsHost",""]],inputs:{sipCsHost:"sipCsHost"}});let i=o;return i})();function Bc(i,o){if(i&1&&b(0,"img",1),i&2){let t=p();l("src",t.optimizedSrc,xe),ce("alt",t.imgAttributes.alt)("width",t.imgAttributes.width)("height",t.imgAttributes.height)("decoding",t.imgAttributes.decoding)("loading",t.imgAttributes.loading)("referrerpolicy",t.imgAttributes.referrerPolicy)("sizes",t.imgAttributes.sizes)("srcset",t.imgAttributes.srcset)("usemap",t.imgAttributes.usemap)("crossorigin",t.imgAttributes.crossOrigin)}}var yi=(()=>{let o=class o{constructor(){this.imgAttributes={}}ngOnInit(){this.optimizedSrc=this.getOptimizedUrl(this.src);let e={alt:this.alt,width:this.width,height:this.height,decoding:this.decoding,loading:this.loading,referrerPolicy:this.referrerPolicy,sizes:this.sizes,srcset:this.srcset,usemap:this.usemap,crossOrigin:this.crossOrigin};for(let n of Object.keys(e))e[n]!==void 0&&e[n]!==null&&(this.imgAttributes[n]=e[n])}getOptimizedUrl(e){if(!e)return e;let n=e.includes("azure-na-images.contentstack.com"),r=e.includes("auto=")||e.includes("format=")||e.includes("quality=");if(n&&!r){let s=e.includes("?")?"&":"?";return`${e}${s}auto=avif&format=pjpg&quality=80`}return e}};o.\u0275fac=function(n){return new(n||o)}
vendor: 5,783 bytes, lines 8-20
8,o.\u0275cmp=w({type:o,selectors:[["sip-image"]],inputs:{src:"src",alt:"alt",width:"width",height:"height",decoding:"decoding",loading:"loading",referrerPolicy:"referrerPolicy",sizes:"sizes",srcset:"srcset",usemap:"usemap",crossOrigin:"crossOrigin"},decls:1,vars:1,consts:[[3,"src",4,"ngIf"],[3,"src"]],template:function(n,r){n&1&&u(0,Bc,1,11,"img",0),n&2&&l("ngIf",r.optimizedSrc)},dependencies:[z],encapsulation:2,changeDetection:0});let i=o;return i})();function zi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=zi();function gs(i){Nt=i}var _s=/[&<>"']/,Fc=new RegExp(_s.source,"g"),hs=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,$c=new RegExp(hs.source,"g"),Nc={"&":"&","<":"<",">":">",'"':""","'":"'"},cs=i=>Nc[i];function Ve(i,o){if(o){if(_s.test(i))return i.replace(Fc,cs)}else if(hs.test(i))return i.replace($c,cs);return i}var jc=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function zc(i){return i.replace(jc,(o,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}var Gc=/(^|[^\[])\^/g;function ie(i,o){let t=typeof i=="string"?i:i.source;o=o||"";let e={replace:(n,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Gc,"$1"),t=t.replace(n,s),e},getRegex:()=>new RegExp(t,o)};return e}function ps(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}var En={exec:()=>null};function ds(i,o){let t=i.replace(/\|/g,(r,s,a)=>{let d=!1,h=s;for(;--h>=0&&a[h]==="\\";)d=!d;return d?"|":" |"}),e=t.split(/ \|/),n=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),o)if(e.length>o)e.splice(o);else for(;e.length<o;)e.push("");for(;n<e.length;n++)e[n]=e[n].trim().replace(/\\\|/g,"|");return e}function Si(i,o,t){let e=i.length;if(e===0)return"";let n=0;for(;n<e;){let r=i.charAt(e-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return i.slice(0,e-n)}function Vc(i,o){if(i.indexOf(o[1])===-1)return-1;let t=0;for(let e=0;e<i.length;e++)if(i[e]==="\\")e++;else if(i[e]===o[0])t++;else if(i[e]===o[1]&&(t--,t<0))return e;return-1}function ms(i,o,t,e){let n=o.href,r=o.title?Ve(o.title):null,s=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){e.state.inLink=!0;let a={type:"link",raw:t,href:n,title:r,text:s,tokens:e.inlineTokens(s)};return e.state.inLink=!1,a}return{type:"image",raw:t,href:n,title:r,text:Ve(s)}}function Uc(i,o){let t=i.match(/^(\s+)(?:```)/);if(t===null)return o;let e=t[1];return o.split(` 9`).map(n=>{let r=n.match(/^\s+/);if(r===null)return n;let[s]=r;return s.length>=e.length?n.slice(e.length):n}).join(` 10`)}var mn=class{constructor(o){se(this,"options");se(this,"rules");se(this,"lexer");this.options=o||Nt}space(o){let t=this.rules.block.newline.exec(o);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(o){let t=this.rules.block.code.exec(o);if(t){let e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Si(e,` 11`)}}}fences(o){let t=this.rules.block.fences.exec(o);if(t){let e=t[0],n=Uc(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(o){let t=this.rules.block.heading.exec(o);if(t){let e=t[2].trim();if(/#$/.test(e)){let n=Si(e,"#");(this.options.pedantic||!n||/ $/.test(n))&&(e=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(o){let t=this.rules.block.hr.exec(o);if(t)return{type:"hr",raw:t[0]}}blockquote(o){let t=this.rules.block.blockquote.exec(o);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` 12 $1`);e=Si(e.replace(/^ *>[ \t]?/gm,""),` 13`);let n=this.lexer.state.top;this.lexer.state.top=!0;let r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(o){let t=this.rules.block.list.exec(o);if(t){let e=t[1].trim(),n=e.length>1,r={type:"list",raw:"",ordered:n,start:n?+e.slice(0,-1):"",loose:!1,items:[]};e=n?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=n?e:"[*+-]");let s=new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),a="",d="",h=!1;for(;o;){let x=!1;if(!(t=s.exec(o))||this.rules.block.hr.test(o))break;a=t[0],o=o.substring(a.length);let v=t[2].split(` 14`,1)[0].replace(/^\t+/,Je=>" ".repeat(3*Je.length)),y=o.split(` 15`,1)[0],E=0;this.options.pedantic?(E=2,d=v.trimStart()):(E=t[2].search(/[^ ]/),E=E>4?1:E,d=v.slice(E),E+=t[1].length);let H=!1;if(!v&&/^ *$/.test(y)&&(a+=y+` 16`,o=o.substring(y.length+1),x=!0),!x){let Je=new RegExp(`^ {0,${Math.min(3,E-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),An=new RegExp(`^ {0,${Math.min(3,E-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Rn=new RegExp(`^ {0,${Math.min(3,E-1)}}(?:\`\`\`|~~~)`),Dn=new RegExp(`^ {0,${Math.min(3,E-1)}}#`);for(;o;){let _n=o.split(` 17`,1)[0];if(y=_n,this.options.pedantic&&(y=y.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Rn.test(y)||Dn.test(y)||Je.test(y)||An.test(o))break;if(y.search(/[^ ]/)>=E||!y.trim())d+=` 18`+y.slice(E);else{if(H||v.search(/[^ ]/)>=4||Rn.test(v)||Dn.test(v)||An.test(v))break;d+=` 19`+y}!H&&!y.trim()&&(H=!0),a+=_n+` 20`,o=o.substring(_n.length+1),v=y.slice(E)}}r.loose||(h?r.loose=!0:/\n *\n *$/.test(a)&&(h=!0));let T=null,J;this.options.gfm&&(T=/^\[[ xX]\] /.exec(d),T&&(J=T[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:a,task:!!T,checked:J,loose:!1,text:d,tokens:[]}),r.raw+=a}r.items[r.items.length-1].raw=a.trimEnd(),r.items[r.items.length-1].text=d.trimEnd(),r.raw=r.raw.trimEnd();for(let x=0;x<r.items.length;x++)if(this.lexer.state.top=!1,r.items[x].tokens=this.lexer.blockTokens(r.items[x].text,[]),!r.loose){let v=r.
20items[x].tokens.filter(E=>E.type==="space"),y=v.length>0&&v.some(E=>/\n.*\n/.test(E.raw));r.loose=y}if(r.loose)for(let x=0;x<r.items.length;x++)r.items[x].loose=!0;return r}}html(o){let t=this.rules.block.html.exec(o);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(o){let t=this.rules.block.def.exec(o);if(t){let e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(o){let t=this.rules.block.table.exec(o);if(!t||!/[:|]/.test(t[2]))return;let e=ds(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` 21`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===n.length){for(let a of n)/^ *-+: *$/.test(a)?s.align.push("right"):/^ *:-+: *$/.test(a)?s.align.push("center"):/^ *:-+ *$/.test(a)?s.align.push("left"):s.align.push(null);for(let a of e)s.header.push({text:a,tokens:this.lexer.inline(a)});for(let a of r)s.rows.push(ds(a,s.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return s}}lheading(o){let t=this.rules.block.lheading.exec(o);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(o){let t=this.rules.block.paragraph.exec(o);if(t){let e=t[1].charAt(t[1].length-1)===` 22`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(o){let t=this.rules.block.text.exec(o);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(o){let t=this.rules.inline.escape.exec(o);if(t)return{type:"escape",raw:t[0],text:Ve(t[1])}}tag(o){let t=this.rules.inline.tag.exec(o);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(o){let t=this.rules.inline.link.exec(o);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let s=Si(e.slice(0,-1),"\\");if((e.length-s.length)%2===0)return}else{let s=Vc(t[2],"()");if(s>-1){let d=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,d).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);s&&(n=s[1],r=s[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(e)?n=n.slice(1):n=n.slice(1,-1)),ms(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(o,t){let e;if((e=this.rules.inline.reflink.exec(o))||(e=this.rules.inline.nolink.exec(o))){let n=(e[2]||e[1]).replace(/\s+/g," "),r=t[n.toLowerCase()];if(!r){let s=e[0].charAt(0);return{type:"text",raw:s,text:s}}return ms(e,r,e[0],this.lexer)}}emStrong(o,t,e=""){let n=this.rules.inline.emStrongLDelim.exec(o);if(!n||n[3]&&e.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!e||this.rules.inline.punctuation.exec(e)){let s=[...n[0]].length-1,a,d,h=s,x=0,v=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,t=t.slice(-1*o.length+s);(n=v.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(d=[...a].length,n[3]||n[4]){h+=d;continue}else if((n[5]||n[6])&&s%3&&!((s+d)%3)){x+=d;continue}if(h-=d,h>0)continue;d=Math.min(d,d+h+x);let y=[...n[0]][0].length,E=o.slice(0,s+n.index+y+d);if(Math.min(s,d)%2){let T=E.slice(1,-1);return{type:"em",raw:E,text:T,tokens:this.lexer.inlineTokens(T)}}let H=E.slice(2,-2);return{type:"strong",raw:E,text:H,tokens:this.lexer.inlineTokens(H)}}}}codespan(o){let t=this.rules.inline.code.exec(o);if(t){let e=t[2].replace(/\n/g," "),n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Ve(e,!0),{type:"codespan",raw:t[0],text:e}}}br(o){let t=this.rules.inline.br.exec(o);if(t)return{type:"br",raw:t[0]}}del(o){let t=this.rules.inline.del.exec(o);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(o){let t=this.rules.inline.autolink.exec(o);if(t){let e,n;return t[2]==="@"?(e=Ve(t[1]),n="mailto:"+e):(e=Ve(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(o){let t;if(t=this.rules.inline.url.exec(o)){let e,n;if(t[2]==="@")e=Ve(t[0]),n="mailto:"+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);e=Ve(t[0]),t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(o){let t=this.rules.inline.text.exec(o);if(t){let e;return this.lexer.state.inRawBlock?e=t[0]:e=Ve(t[0]),{type:"text",raw:t[0],text:e}}}},Hc=/^(?: *(?:\n|$))+/,Wc=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,qc=/^ {0,3}(`{3,}
22(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,kn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fs=/(?:[*+-]|\d{1,9}[.)])/,Cs=ie(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,fs).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Kc=/^[^\n]+/,Vi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Qc=ie(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Vi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zc=ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fs).getRegex(),Mi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ui=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Xc=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Ui).replace("tag",Mi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xs=ie(Gi).replace("hr",kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mi).getRegex(),Jc=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xs).getRegex(),Hi={blockquote:Jc,code:Wc,def:Qc,fences:qc,heading:Yc,hr:kn,html:Xc,lheading:Cs,list:Zc,newline:Hc,paragraph:xs,table:En,text:Kc},us=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mi).getRegex(),ep=te(R({},Hi),{table:us,paragraph:ie(Gi).replace("hr",kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",us).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mi).getRegex()}),tp=te(R({},Hi),{html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ui).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Gi).replace("hr",kn).replace("heading",` *#{1,6} *[^ 23]`).replace("lheading",Cs).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),vs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,np=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bs=/^( {2,}|\\)\n(?!\s*$)/,ip=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,wn="\\p{P}\\p{S}",op=ie(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,wn).getRegex(),rp=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,sp=ie(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,wn).getRegex(),ap=ie("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,wn).getRegex(),lp=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,wn).getRegex(),cp=ie(/\\([punct])/,"gu").replace(/punct/g,wn).getRegex(),p
23p=ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),dp=ie(Ui).replace("(?:-->|$)","-->").getRegex(),mp=ie("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",dp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Oi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,up=ie(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Oi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ys=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Oi).replace("ref",Vi).getRegex(),Ss=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Vi).getRegex(),gp=ie("reflink|nolink(?!\\()","g").replace("reflink",ys).replace("nolink",Ss).getRegex(),Wi={_backpedal:En,anyPunctuation:cp,autolink:pp,blockSkip:rp,br:bs,code:np,del:En,emStrongLDelim:sp,emStrongRDelimAst:ap,emStrongRDelimUnd:lp,escape:vs,link:up,nolink:Ss,punctuation:op,reflink:ys,reflinkSearch:gp,tag:mp,text:ip,url:En},_p=te(R({},Wi),{link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Oi).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oi).getRegex()}),Ni=te(R({},Wi),{escape:ie(vs).replace("])","~|])").getRegex(),url:ie(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),hp=te(R({},Ni),{br:ie(bs).replace("{2,}","*").getRegex(),text:ie(Ni.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Pi={normal:Hi,gfm:ep,pedantic:tp},Mn={normal:Wi,gfm:Ni,breaks:hp,pedantic:_p},ft=class i{constructor(o){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Nt,this.options.tokenizer=this.options.tokenizer||new mn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={block:Pi.normal,inline:Mn.normal};this.options.pedantic?(t.block=Pi.pedantic,t.inline=Mn.pedantic):this.options.gfm&&(t.block=Pi.gfm,this.options.breaks?t.inline=Mn.breaks:t.inline=Mn.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pi,inline:Mn}}static lex(o,t){return new i(t).lex(o)}static lexInline(o,t){return new i(t).inlineTokens(o)}lex(o){o=o.replace(/\r\n|\r/g,` 24`),this.blockTokens(o,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(o,t=[]){this.options.pedantic?o=o.replace(/\t/g," ").replace(/^ +$/gm,""):o=o.replace(/^( *)(\t+)/gm,(a,d,h)=>d+" ".repeat(h.length));let e,n,r,s;for(;o;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(e=a.call({lexer:this},o,t))?(o=o.substring(e.raw.length),t.push(e),!0):!1))){if(e=this.tokenizer.space(o)){o=o.substring(e.raw.length),e.raw.length===1&&t.length>0?t[t.length-1].raw+=` 25`:t.push(e);continue}if(e=this.tokenizer.code(o)){o=o.substring(e.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=` 26`+e.raw,n.text+=` 27`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(e);continue}if(e=this.tokenizer.fences(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.heading(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.hr(o)){o=o.substring(e.raw.length),t.push(e);continue}
vendor: 8,796 bytes, lines 27-52
27if(e=this.tokenizer.blockquote(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.list(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.html(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.def(o)){o=o.substring(e.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=` 28`+e.raw,n.text+=` 29`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.lheading(o)){o=o.substring(e.raw.length),t.push(e);continue}if(r=o,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,d=o.slice(1),h;this.options.extensions.startBlock.forEach(x=>{h=x.call({lexer:this},d),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(r=o.substring(0,a+1))}if(this.state.top&&(e=this.tokenizer.paragraph(r))){n=t[t.length-1],s&&n.type==="paragraph"?(n.raw+=` 30`+e.raw,n.text+=` 31`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(e),s=r.length!==o.length,o=o.substring(e.raw.length);continue}if(e=this.tokenizer.text(o)){o=o.substring(e.raw.length),n=t[t.length-1],n&&n.type==="text"?(n.raw+=` 32`+e.raw,n.text+=` 33`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(e);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){let e,n,r,s=o,a,d,h;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)x.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;o;)if(d||(h=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(x=>(e=x.call({lexer:this},o,t))?(o=o.substring(e.raw.length),t.push(e),!0):!1))){if(e=this.tokenizer.escape(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.tag(o)){o=o.substring(e.raw.length),n=t[t.length-1],n&&e.type==="text"&&n.type==="text"?(n.raw+=e.raw,n.text+=e.text):t.push(e);continue}if(e=this.tokenizer.link(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(e.raw.length),n=t[t.length-1],n&&e.type==="text"&&n.type==="text"?(n.raw+=e.raw,n.text+=e.text):t.push(e);continue}if(e=this.tokenizer.emStrong(o,s,h)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.codespan(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.br(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.del(o)){o=o.substring(e.raw.length),t.push(e);continue}if(e=this.tokenizer.autolink(o)){o=o.substring(e.raw.length),t.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(o))){o=o.substring(e.raw.length),t.push(e);continue}if(r=o,this.options.extensions&&this.options.extensions.startInline){let x=1/0,v=o.slice(1),y;this.options.extensions.startInline.forEach(E=>{y=E.call({lexer:this},v),typeof y=="number"&&y>=0&&(x=Math.min(x,y))}),x<1/0&&x>=0&&(r=o.substring(0,x+1))}if(e=this.tokenizer.inlineText(r)){o=o.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(h=e.raw.slice(-1)),d=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=e.raw,n.text+=e.text):t.push(e);continue}if(o){let x="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return t}},mt=class{constructor(o){se(this,"options");this.options=o||Nt}code(o,t,e){let n=(t||"").match(/^\S*/)?.[0];return o=o.replace(/\n$/,"")+` 34`,n?'<pre><code class="language-'+Ve(n)+'">'+(e?o:Ve(o,!0))+`</code></pre> 35`:"<pre><code>"+(e?o:Ve(o,!0))+`</code></pre> 36`}blockquote(o){return`<blockquote> 37${o}</blockquote> 38`}html(o,t){return o}heading(o,t,e){return`<h${t}>${o}</h${t}> 39`}hr(){return`<hr> 40`}list(o,t,e){let n=t?"ol":"ul",r=t&&e!==1?' start="'+e+'"':"";return"<"+n+r+`> 41`+o+"</"+n+`> 42`}listitem(o,t,e){return`<li>${o}</li> 43`}checkbox(o){return"<input "+(o?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(o){return`<p>${o}</p> 44`}table(o,t){return t&&(t=`<tbody>${t}</tbody>`),`<table> 45<thead> 46`+o+`</thead> 47`+t+`</table> 48`}tablerow(o){return`<tr> 49${o}</tr> 50`}tablecell(o,t){let e=t.header?"th":"td";return(t.align?`<${e} align="${t.align}">`:`<${e}>`)+o+`</${e}> 51`}strong(o){return`<strong>${o}</strong>`}em(o){return`<em>${o}</em>`}codespan(o){return`<code>${o}</code>`}br(){return"<br>"}del(o){return`<del>${o}</del>`}link(o,t,e){let n=ps(o);if(n===null)return e;o=n;let r='<a href="'+o+'"';return t&&(r+=' title="'+t+'"'),r+=">"+e+"</a>",r}image(o,t,e){let n=ps(o);if(n===null)return e;o=n;let r=`<img src="${o}" alt="${e}"`;return t&&(r+=` title="${t}"`),r+=">",r}text(o){return o}},In=class{strong(o){return o}em(o){return o}codespan(o){return o}del(o){return o}html(o){return o}text(o){return o}link(o,t,e){return""+e}image(o,t,e){return""+e}br(){return""}},Ct=class i{constructor(o){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=o||Nt,this.options.renderer=this.options.renderer||new mt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new In}static parse(o,t){return new i(t).parse(o)}static parseInline(o,t){return new i(t).parseInline(o)}parse(o,t=!0){let e="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let s=r,a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){e+=a||"";continue}}switch(r.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{let s=r;e+=this.renderer.heading(this.parseInline(s.tokens),s.depth,zc(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{let s=r;e+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{let s=r,a="",d="";for(let x=0;x<s.header.length;x++)d+=this.renderer.tablecell(this.parseInline(s.header[x].tokens),{header:!0,align:s.align[x]});a+=this.renderer.tablerow(d);let h="";for(let x=0;x<s.rows.length;x++){let v=s.rows[x];d="";for(let y=0;y<v.length;y++)d+=this.renderer.tablecell(this.parseInline(v[y].tokens),{header:!1,align:s.align[y]});h+=this.renderer.tablerow(d)}e+=this.renderer.table(a,h);continue}case"blockquote":{let s=r,a=this.parse(s.tokens);e+=this.renderer.blockquote(a);continue}case"list":{let s=r,a=s.ordered,d=s.start,h=s.loose,x="";for(let v=0;v<s.items.length;v++){let y=s.items[v],E=y.checked,H=y.task,T="";if(y.task){let J=this.renderer.checkbox(!!E);h?y.tokens.length>0&&y.tokens[0].type==="paragraph"?(y.tokens[0].text=J+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&y.tokens[0].tokens[0].type==="text"&&(y.tokens[0].tokens[0].text=J+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:J+" "}):T+=J+" "}T+=this.parse(y.tokens,h),x+=this.renderer.listitem(T,H,!!E)}e+=this.renderer.list(x,a,d);continue}case"html":{let s=r;e+=this.renderer.html(s.text,s.block);continue}case"paragraph":{let s=r;e+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=r,a=s.tokens?this.parseInline(s.tokens):s.text;for(;n+1<o.length&&o[n+1].type==="text";)s=o[++n],a+=` 52`+(s.tokens?this.parseInline(s.tokens):s.text);e+=t?this.renderer.paragraph(a):a;continue}default:{let s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return e}parseInline(o,t){t=t||this.renderer;let e="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){e+=s||"";continue}}switch(r.type){case"escape":{let s=r;e+=t.text(s.text);break}case"html":{let s=r;e+=t.html(s.text);break}case"link":{let s=r;e+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break}case"image":{let s=r;
52e+=t.image(s.href,s.title,s.text);break}case"strong":{let s=r;e+=t.strong(this.parseInline(s.tokens,t));break}case"em":{let s=r;e+=t.em(this.parseInline(s.tokens,t));break}case"codespan":{let s=r;e+=t.codespan(s.text);break}case"br":{e+=t.br();break}case"del":{let s=r;e+=t.del(this.parseInline(s.tokens,t));break}case"text":{let s=r;e+=t.text(s.text);break}default:{let s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return e}},Ft=class{constructor(o){se(this,"options");this.options=o||Nt}preprocess(o){return o}postprocess(o){return o}processAllTokens(o){return o}};se(Ft,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var ji=class{constructor(...o){se(this,"defaults",zi());se(this,"options",this.setOptions);se(this,"parse",this.#e(ft.lex,Ct.parse));se(this,"parseInline",this.#e(ft.lexInline,Ct.parseInline));se(this,"Parser",Ct);se(this,"Renderer",mt);se(this,"TextRenderer",In);se(this,"Lexer",ft);se(this,"Tokenizer",mn);se(this,"Hooks",Ft);this.use(...o)}walkTokens(o,t){let e=[];for(let n of o)switch(e=e.concat(t.call(this,n)),n.type){case"table":{let r=n;for(let s of r.header)e=e.concat(this.walkTokens(s.tokens,t));for(let s of r.rows)for(let a of s)e=e.concat(this.walkTokens(a.tokens,t));break}case"list":{let r=n;e=e.concat(this.walkTokens(r.items,t));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(s=>{let a=r[s].flat(1/0);e=e.concat(this.walkTokens(a,t))}):r.tokens&&(e=e.concat(this.walkTokens(r.tokens,t)))}}return e}use(...o){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return o.forEach(e=>{let n=R({},e);if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let s=t.renderers[r.name];s?t.renderers[r.name]=function(...a){let d=r.renderer.apply(this,a);return d===!1&&(d=s.apply(this,a)),d}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[r.level];s?s.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),n.extensions=t),e.renderer){let r=this.defaults.renderer||new mt(this.defaults);for(let s in e.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;let a=s,d=e.renderer[a],h=r[a];r[a]=(...x)=>{let v=d.apply(r,x);return v===!1&&(v=h.apply(r,x)),v||""}}n.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new mn(this.defaults);for(let s in e.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,d=e.tokenizer[a],h=r[a];r[a]=(...x)=>{let v=d.apply(r,x);return v===!1&&(v=h.apply(r,x)),v}}n.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new Ft;for(let s in e.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;let a=s,d=e.hooks[a],h=r[a];Ft.passThroughHooks.has(s)?r[a]=x=>{if(this.defaults.async)return Promise.resolve(d.call(r,x)).then(y=>h.call(r,y));let v=d.call(r,x);return h.call(r,v)}:r[a]=(...x)=>{let v=d.apply(r,x);return v===!1&&(v=h.apply(r,x)),v}}n.hooks=r}if(e.walkTokens){let r=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(a){let d=[];return d.push(s.call(this,a)),r&&(d=d.concat(r.call(this,a))),d}}this.defaults=R(R({},this.defaults),n)}),this}setOptions(o){return this.defaults=R(R({},this.defaults),o),this}lexer(o,t){return ft.lex(o,t??this.defaults)}parser(o,t){return Ct.parse(o,t??this.defaults)}#e(o,t){return(e,n)=>{let r=R({},n),s=R(R({},this.defaults),r);this.defaults.async===!0&&r.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let a=this.#t(!!s.silent,!!s.async);if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(e):e).then(d=>o(d,s)).then(d=>s.hooks?s.hooks.processAllTokens(d):d).then(d=>s.walkTokens?Promise.all(this.walkTokens(d,s.walkTokens)).then(()=>d):d).then(d=>t(d,s)).then(d=>s.hooks?s.hooks.postprocess(d):d).catch(a);try{s.hooks&&(e=s.hooks.preprocess(e));let d=o(e,s);s.hooks&&(d=s.hooks.processAllTokens(d)),s.walkTokens&&this.walkTokens(d,s.walkTokens);let h=t(d,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(d){return a(d)}}}#t(o,t){return e=>{if(e.message+=` 53Please report this to https://github.com/markedjs/marked.`,o){let n="<p>An error occurred:</p><pre>"+Ve(e.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(e);throw e}}},$t=new ji;function Q(i,o){return $t.parse(i,o)}Q.options=Q.setOptions=function(i){return $t.setOptions(i),Q.defaults=$t.defaults,gs(Q.defaults),Q};Q.getDefaults=zi;Q.defaults=Nt;Q.use=function(...i){return $t.use(...i),Q.defaults=$t.defaults,gs(Q.defaults),Q};Q.walkTokens=function(i,o){return $t.walkTokens(i,o)};Q.parseInline=$t.parseInline;Q.Parser=Ct;Q.parser=Ct.parse;Q.Renderer=mt;Q.TextRenderer=In;Q.Lexer=ft;Q.lexer=ft.lex;Q.Tokenizer=mn;Q.Hooks=Ft;Q.parse=Q;
53var T0=Q.options,A0=Q.setOptions,R0=Q.use,D0=Q.walkTokens,L0=Q.parseInline;var B0=Ct.parse,F0=ft.lex;var Cp=["*"],xp="Copy",vp="Copied",bp=(()=>{let o=class o{constructor(){this._buttonClick$=new $n,this.copied$=this._buttonClick$.pipe(oe(()=>uo(Y(!0),mo(3e3).pipe(go(!1)))),G(),Ce(1)),this.copiedText$=this.copied$.pipe(zt(!1),I(e=>e?vp:xp))}onCopyToClipboardClick(){this._buttonClick$.next()}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["markdown-clipboard"]],standalone:!0,features:[Ai],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(n,r){n&1&&(g(0,"button",0),m(1,"async"),F("click",function(){return r.onCopyToClipboardClick()}),M(2),m(3,"async"),_()),n&2&&(Ne("copied",C(1,3,r.copied$)),c(2),re(C(3,5,r.copiedText$)))},dependencies:[N],encapsulation:2,changeDetection:0});let i=o;return i})(),yp=new Cn("CLIPBOARD_OPTIONS");var qi=function(i){return i.CommandLine="command-line",i.LineHighlight="line-highlight",i.LineNumbers="line-numbers",i}(qi||{}),Os=new Cn("MARKED_EXTENSIONS"),Sp=new Cn("MARKED_OPTIONS"),Pp="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",Op="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",Mp="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",Ep="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",Ip="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",kp="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",Ms=new Cn("SECURITY_CONTEXT");var Es=(()=>{let o=class o{get options(){return this._options}set options(e){this._options=R(R({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(e,n,r,s,a,d,h){this.clipboardOptions=e,this.extensions=n,this.platform=s,this.securityContext=a,this.http=d,this.sanitizer=h,this.DEFAULT_MARKED_OPTIONS={renderer:new mt},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new $n,this.reload$=this._reload$.asObservable(),this.options=r}parse(e,n=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:r,inline:s,emoji:a,mermaid:d,disableSanitizer:h}=n,x=R(R({},this.options),n.markedOptions),v=x.renderer||this.renderer||new mt;this.extensions&&(this.renderer=this.extendsRendererForExtensions(v)),d&&(this.renderer=this.extendsRendererForMermaid(v));let y=this.trimIndentation(e),E=r?this.decodeHtml(y):y,H=a?this.parseEmoji(E):E,T=this.parseMarked(H,x,s);return(h?T:this.sanitizer.sanitize(this.securityContext,T))||""}render(e,n=this.DEFAULT_RENDER_OPTIONS,r){let{clipboard:s,clipboardOptions:a,katex:d,katexOptions:h,mermaid:x,mermaidOptions:v}=n;d&&this.renderKatex(e,R(R({},this.DEFAULT_KATEX_OPTIONS),h)),x&&this.renderMermaid(e,R(R({},this.DEFAULT_MERMAID_OPTIONS),v)),s&&this.renderClipboard(e,r,R(R(R({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),a)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(kp);return this.http.get(e,{responseType:"text"}).pipe(I(n=>this.handleExtension(e,n)))}highlight(e){if(!pe(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let n=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(n,r=>r.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!pe(this.platform))return e;let n=document.createElement("textarea");return n.innerHTML=e,n.value}extendsRendererForExtensions(e){let n=e;return n.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&Q.use(...this.extensions),n.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let n=e;if(n.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let r=e.code;return e.code=function(s,a,d){return a==="mermaid"?`<div class="mermaid">${s}</div>`:r.call(this,s,a,d)},n.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,n){let r=e.lastIndexOf("://"),s=r>-1?e.substring(r+4):e,a=s.lastIndexOf("/"),d=a>-1?s.substring(a+1).split("?")[0]:"",h=d.lastIndexOf("."),x=h>-1?d.substring(h+1):"";return x&&x!=="md"?"```"+x+`
54`+n+"\n```":n}parseMarked(e,n,r=!1){if(n.renderer){let s=R({},n.renderer);delete s.\u0275NgxMarkdownRendererExtendedForExtensions,delete s.\u0275NgxMarkdownRendererExtendedForMermaid,delete n.renderer,Q.use({renderer:s})}return r?Q.parseInline(e,n):Q.parse(e,n)}parseEmoji(e){if(!pe(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(Pp);return joypixels.shortnameToUnicode(e)}renderKatex(e,n){if(pe(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(Op);renderMathInElement(e,n)}}renderClipboard(e,n,r){if(!pe(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(Ep);if(!n)throw new Error(Ip);let{buttonComponent:s,buttonTemplate:a}=r,d=e.querySelectorAll("pre");for(let h=0;h<d.length;h++){let x=d.item(h),v=document.createElement("div");v.style.position="relative",x.parentNode.insertBefore(v,x),v.appendChild(x);let y=document.createElement("div");y.style.position="absolute",y.style.top=".5em",y.style.right=".5em",y.style.opacity="0",y.style.transition="opacity 250ms ease-out",y.style.zIndex="1",v.insertAdjacentElement("beforeend",y),x.onmouseover=()=>y.style.opacity="1",x.onmouseout=()=>y.style.opacity="0";let E;if(s){let T=n.createComponent(s);E=T.hostView,T.changeDetectorRef.markForCheck()}else if(a)E=n.createEmbeddedView(a);else{let T=n.createComponent(bp);E=T.hostView,T.changeDetectorRef.markForCheck()}let H;E.rootNodes.forEach(T=>{T.onmouseover=()=>y.style.opacity="1",y.appendChild(T),H=new ClipboardJS(T,{text:()=>x.innerText})}),E.onDestroy(()=>H.destroy())}}renderMermaid(e,n=this.DEFAULT_MERMAID_OPTIONS){if(!pe(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(Mp);let r=e.querySelectorAll(".mermaid");r.length!==0&&(mermaid.initialize(n),mermaid.run({nodes:r}))}trimIndentation(e){if(!e)return"";let n;return e.split(` 55`).map(r=>{let s=n;return r.length>0&&(s=isNaN(s)?r.search(/\S|$/):Math.min(r.search(/\S|$/),s)),isNaN(n)&&(n=s),s?r.substring(s):r}).join(` 56`)}};o.\u0275fac=function(n){return new(n||o)(S(yp,8),S(Os,8),S(Sp,8),S(le),S(Ms),S(Ae,8),S(Wn))},o.\u0275prov=ee({token:o,factory:o.\u0275fac});let i=o;return i})(),Is=(()=>{let o=class o{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}constructor(e,n,r){this.element=e,this.markdownService=n,this.viewContainerRef=r,this.error=new $e,this.load=new $e,this.ready=new $e,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new $n}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(ho(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,n=!1){return Z(this,null,function*(){let r={decodeHtml:n,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},s={clipboard:this.clipboard,clipboardOptions:{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate},katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},a=yield this.markdownService.parse(e,r);this.element.nativeElement.innerHTML=a,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,s,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,qi.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,qi.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,n){let r=e.querySelectorAll("pre");for(let s=0;s<r.length;s++){let a=n instanceof Array?n:[n];r.item(s).classList.add(...a)}}setPluginOptions(e,n){let r=e.querySelectorAll("pre");for(let s=0;s<r.length;
56s++)Object.keys(n).forEach(a=>{let d=n[a];if(d){let h=this.toLispCase(a);r.item(s).setAttribute(h,d.toString())}})}toLispCase(e){let n=e.match(/([A-Z])/g);if(!n)return e;let r=e.toString();for(let s=0,a=n.length;s<a;s++)r=r.replace(new RegExp(n[s]),"-"+n[s].toLowerCase());return r.slice(0,1)==="-"&&(r=r.slice(1)),r}};o.\u0275fac=function(n){return new(n||o)(f(Ue),f(Es),f(Hn))},o.\u0275cmp=w({type:o,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},standalone:!0,features:[Vn,Ai],ngContentSelectors:Cp,decls:1,vars:0,template:function(n,r){n&1&&(Po(),Oo(0))},encapsulation:2});let i=o;return i})();function wp(i){return[Es,i?.loader??[],i?.clipboardOptions??[],i?.markedOptions??[],{provide:Os,useValue:i?.markedExtensions??[]},{provide:Ms,useValue:i?.sanitize??vo.HTML}]}var nf=(()=>{let o=class o{static forRoot(e){return{ngModule:o,providers:[wp(e)]}}static forChild(){return{ngModule:o}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=Co({type:o}),o.\u0275inj=fo({imports:[Io]});let i=o;return i})(),Ps;(function(i){let o;(function(n){n.Strict="strict",n.Loose="loose",n.Antiscript="antiscript",n.Sandbox="sandbox"})(o=i.SecurityLevel||(i.SecurityLevel={}));let t;(function(n){n.Base="base",n.Forest="forest",n.Dark="dark",n.Default="default",n.Neutral="neutral"})(t=i.Theme||(i.Theme={}));let e;(function(n){n[n.Debug=1]="Debug",n[n.Info=2]="Info",n[n.Warn=3]="Warn",n[n.Error=4]="Error",n[n.Fatal=5]="Fatal"})(e=i.LogLevel||(i.LogLevel={}))})(Ps||(Ps={}));var Yi=function(i){return i.PERSISTED_PRODUCTS_SESSION_STORAGE_KEY="comparedProducts",i.WIDGET_STATE_SESSION_STORAGE_KEY="comparedProductsWidgetState",i.PERSISTED_PRODUCTS_COOKIE_KEY="comparedProductsIDs",i[i.MAX_PRODUCTS=4]="MAX_PRODUCTS",i[i.TIMEOUT_MED=500]="TIMEOUT_MED",i[i.TIMEOUT_NORMAL=700]="TIMEOUT_NORMAL",i[i.ENTER_KEY_CODE=13]="ENTER_KEY_CODE",i.CHECKBOXES_ID_PREFIX="compare-",i.COMPARE_PAGE_PATH="/compare-products/",i.WIDGET_STATE_CLOSE="product-compare-widget--close",i.WIDGET_STATE_OPEN="product-compare-widget--open",i.WIDGET_STATE_REMOVE="product-compare-widget--remove",i}(Yi||{});var Ei="|",ks=(()=>{let o=class o{constructor(e,n,r,s,a,d){this.cookieService=e,this.sessionStorageService=n,this.translationService=r,this.productService=s,this.platformId=a,this.cmsService=d,this.CONSTANTS=Yi,this.showErrorMessage$=new ge(!1),this.comparedProductsIDs$=new ge([]),this.comparedProducts$=new ge([]),this.widgetState$=new ge(null),this.widgetStateOb$=this.widgetState$.pipe(V(Boolean),G()),this.containsAllTireProducts$=new ge(!1),this.containsAllBatteryProducts$=new ge(!1),this.subscription=new Se,this.initCompareProducts(),this.initCompareProductsIDs(),this.subscription.add(this.widgetStateOb$.subscribe(h=>{this._comparedProductsWidgetStateSession=h,pe(this.platformId)&&this.sessionStorageService.store(this.CONSTANTS.WIDGET_STATE_SESSION_STORAGE_KEY,this._comparedProductsWidgetStateSession)})),this.subscription.add(this.comparedProducts$.subscribe(h=>{h.length===0?(this._comparedProductsSession=[],pe(this.platformId)&&this.sessionStorageService.store(this.CONSTANTS.PERSISTED_PRODUCTS_SESSION_STORAGE_KEY,this._comparedProductsSession),this.cookieService.delete(this.CONSTANTS.PERSISTED_PRODUCTS_COOKIE_KEY,"/"),this.widgetState$.next(this.CONSTANTS.WIDGET_STATE_REMOVE)):(this._comparedProductsSession=h,pe(this.platformId)&&this.sessionStorageService.store(this.CONSTANTS.PERSISTED_PRODUCTS_SESSION_STORAGE_KEY,this._comparedProductsSession),this.widgetState$.next(this.CONSTANTS.WIDGET_STATE_OPEN),this.cookieService.set(this.CONSTANTS.PERSISTED_PRODUCTS_COOKIE_KEY,h.map(x=>x.id).join(Ei),void 0,"/",void 0,!0,"Strict")),this._comparedProductsIDsCookie=h.map(x=>x.id).join(Ei)})),this.subscription.add(this.translationService.translate("img.missingProductImage.product").subscribe(h=>this.missingImgSrc=h))}ngOnDestroy(){this.subscription.unsubscribe()}getProductsByIds(e){return e.length===0?Y([]):jn(e.map(n=>this.productService.get(n,this.productScope).pipe(V(r=>
56!!r),Nn(7e3),$(1))))}isCompareProductPage(){return this.cmsService.getCurrentPage().pipe(V(e=>!!e),I(e=>(e.pageId?.endsWith(Ri.PAGE_ID_SUFFIX)??!1)||(e.label?.endsWith(Ri.PAGE_ID_SUFFIX)??!1)))}initCompareProductsIDs(){if(pe(this.platformId)&&(this.cookieService.get(this.CONSTANTS.PERSISTED_PRODUCTS_COOKIE_KEY)==="undefined"&&this.cookieService.delete(this.CONSTANTS.PERSISTED_PRODUCTS_COOKIE_KEY,"/"),this._comparedProductsIDsCookie=this.cookieService.get(this.CONSTANTS.PERSISTED_PRODUCTS_COOKIE_KEY)||this._comparedProductsSession?.map(e=>e.id).join(Ei),this._comparedProductsIDsCookie)){let e=this._comparedProductsIDsCookie.split(Ei);this.comparedProductsIDs$.next(e)}}initCompareProducts(){pe(this.platformId)&&(this._comparedProductsSession=this.sessionStorageService.retrieve(this.CONSTANTS.PERSISTED_PRODUCTS_SESSION_STORAGE_KEY),Array.isArray(this._comparedProductsSession)&&this.comparedProducts$.next(this._comparedProductsSession))}_transformComparedProductsToMap(e){let n=new Map;return e.forEach(r=>{n.set(r.id,r)}),n}_handleProductCompare({productCode:e,status:n}){let r=new Set(this.comparedProductsIDs$.value),s=this._transformComparedProductsToMap(this.comparedProducts$.value);if(n==="ADD"){let a=s.size>=this.CONSTANTS.MAX_PRODUCTS;this.showErrorMessage$.next(a),r.add(e),a||s.set(e,this.getComparedProductData(this._productList.find(d=>d.code===e)))}else this.showErrorMessage$.next(!1),r.delete(e),s.delete(e);this.comparedProductsIDs$.next([...r]),this.comparedProducts$.next([...s].map(a=>a[1]))}setProductList(e){this._productList=e}updateWidgetState(e){this.widgetState$.next(e)}addProduct(e){this._handleProductCompare({productCode:e,status:"ADD"})}removeProduct(e){this._handleProductCompare({productCode:e,status:"REMOVE"})}removeAllProducts(){this.showErrorMessage$.next(!1),this.widgetState$.next(this.CONSTANTS.WIDGET_STATE_REMOVE),this.comparedProductsIDs$.next([]),this.comparedProducts$.next([])}toggleProductSelection(e){this.comparedProductsIDs$.value.includes(e)?this.removeProduct(e):this.addProduct(e)}getComparedProductData(e){if(!e)return{};if(e.multiProduct){let n,r;return e.defaultProduct?.product&&(n=this.getProductImage(e.defaultProduct.product)),e.associateProducts?.length>0&&(r=this.getProductImage(e.associateProducts[0].product)),{id:e.code,frontImgAlt:n?.altText||e.name,rearImgAlt:r?.altText||e.name,frontImgSrc:n?.url||this.missingImgSrc,rearImgSrc:r?.url||this.missingImgSrc,name:e.name,pdp:e.url,multiProduct:!0,isTire:e.tire}}else{let n;return n=this.getProductImage(e),{id:e.code,imgAlt:n?.altText||e.name,imgSrc:n?.url||this.missingImgSrc,name:e.name,pdp:e.url,multiProduct:!1,isTire:e.tire,cartGroupId:e?.groupId||e.cartGroup?.groupId}}}getProductImage(e){if(e.images){if(e.images[_t.PRIMARY]){let n=Object.values(e.images[_t.PRIMARY]);return n.length>0?n[0]:null}else if(e.images[_t.GALLERY])return Object.values(e.images[_t.GALLERY][0]).find(r=>r.format==="thumbnail")}}};o.\u0275fac=function(n){return new(n||o)(S(qe),S(yr),S(he),S(Xt),S(le),S(pi))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Ii=class extends K{};var un={TOP_BANNER:"top_banner",TOP_STRIP:"top_strip",BOTTOM_STRIP:"bottom_strip",BOTTOM_BANNER:"bottom_banner"};var js=_a(Ns());var zs=(()=>{let o=class o{constructor(e,n){this.platformId=e,this.document=n,this.isMobileSubject=new ge(this.checkIsMobile()),this.isTabletSubject=new ge(this.checkIsTablet()),this.isMobile$=this.isMobileSubject.asObservable(),this.isTablet$=this.isTabletSubject.asObservable(),this.mobileBreakpoint=768,this.tabletBreakpoint=1024,pe(this.platformId)&&(this.resizeObserver=new js.ResizeObserver(()=>{this.isMobileSubject.next(this.checkIsMobile()),this.isTabletSubject.next(this.checkIsTablet())})),this.resizeObserver?.observe(this.document.body)}checkIsMobile(){return pe(this.platformId)?Math.min(window.innerWidth,window.screen.width)<this.mobileBreakpoint:!1}checkIsTablet(){if(!pe(this.platformId))return!1;let e=Math.min(window.innerWidth,window.screen.width);return e<this.tabletBreakpoint&&e>=this.mobileBreakpoint}ngOnDestroy(){this.resizeObserver?.disconnect()}};o.\u0275fac=function(n){return new(n||o)(S(le),S(We))}
56,o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function Zp(i,o){i&1&&ve(0)}function Xp(i,o){if(i&1){let t=U();P(0),g(1,"a",10),m(2,"async"),F("click",function(){L(t);let n=p(2).ngIf,r=p();return B((n==null||n.ga_ref==null?null:n.ga_ref[0])&&r.onClick(n.ga_ref[0]))}),u(3,Zp,1,0,"ng-container",11),_(),O()}if(i&2){let t;p();let e=k(6),n=p().ngIf,r=p();c(),l("ngClass",!(n==null||n.image==null)&&n.image.url?"":(t=n.ad_type)!==null&&t!==void 0?t:"full"),ce("href",r.showMobileImage&&(n!=null&&n.mobile_url)&&C(2,5,r.screenSizeService.isMobile$)?n==null?null:n.mobile_url:n==null||n.costco_url==null?null:n.costco_url.url,xe)("title",n==null||n.costco_url==null?null:n.costco_url.title)("aria-describedby",r.describedByIds),c(2),l("ngTemplateOutlet",e)}}function Jp(i,o){i&1&&ve(0)}function ed(i,o){if(i&1&&(g(0,"div",12),u(1,Jp,1,0,"ng-container",11),_()),i&2){let t;p();let e=k(6),n=p().ngIf,r=p();l("ngClass",!(n==null||n.image==null)&&n.image.url?"":(t=n.ad_type)!==null&&t!==void 0?t:"full"),ce("aria-describedby",r.describedByIds),c(),l("ngTemplateOutlet",e)}}function td(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",18),i&2){let t=p().$implicit;l("componentInfo",t)}}function nd(i,o){if(i&1&&(P(0),u(1,td,1,1,"sip-cs-dynamic-component",17),O()),i&2){let t=o.$implicit,e=p(4);c(),l("ngIf",t.add_text_banner.text_banner_type===e.TextBannerType.TOP_BANNER)}}function id(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",18),i&2){let t=p().$implicit;l("componentInfo",t)}}function od(i,o){if(i&1&&(P(0),u(1,id,1,1,"sip-cs-dynamic-component",17),O()),i&2){let t=o.$implicit,e=p(5);c(),l("ngIf",t.strip.strip_type===e.TextBannerType.TOP_STRIP)}}function rd(i,o){if(i&1&&b(0,"sip-image",27),i&2){let t=p(7).ngIf,e=p();l("ngClass",e.borderRadius)("src",t==null||t.image==null?null:t.image.url)("alt",t==null?null:t.image_alt_text)}}function sd(i,o){if(i&1&&b(0,"sip-image",27),i&2){let t=p(7).ngIf,e=p();l("ngClass",e.borderRadius)("src",t==null||t.mobile_image==null?null:t.mobile_image.url)("alt",(t==null?null:t.use_mobile_image_alt_text)===!0?t==null?null:t.mobile_image_alt_text:"")}}function ad(i,o){if(i&1&&(g(0,"video",28),b(1,"source",29),_()),i&2){let t=p(7).ngIf;He("title",t==null?null:t.image_alt_text),c(),He("src",t==null||t.image==null?null:t.image.url,xe),He("type",t==null||t.image==null?null:t.image.content_type)}}function ld(i,o){if(i&1&&(g(0,"div",24),u(1,rd,1,3,"sip-image",25),m(2,"async"),u(3,sd,1,3,"sip-image",25),m(4,"async"),u(5,ad,2,3,"video",26),_()),i&2){let t=p(6).ngIf,e=p();c(),l("ngIf",(t==null||t.image==null?null:t.image.content_type.includes("image"))&&(e.showMobileImage?!C(2,3,e.screenSizeService.isMobile$):!0)),c(2),l("ngIf",(t==null?null:t.enable_mobile_image_variation)&&(t==null||t.mobile_image==null?null:t.mobile_image.url)&&C(4,5,e.screenSizeService.isMobile$)),c(2),l("ngIf",t==null||t.image==null?null:t.image.content_type.includes("video"))}}function cd(i,o){if(i&1&&(P(0),u(1,ld,6,7,"div",22),O()),i&2){let t=p(5).ngIf;c(),l("ngIf",(t==null||t.image==null?null:t.image.url)||(t==null||t.mobile_image==null?null:t.mobile_image.url))}}function pd(i,o){if(i&1&&(P(0),b(1,"sip-cs-dynamic-component",18),O()),i&2){let t=o.$implicit;c(),l("componentInfo",t)}}function dd(i,o){if(i&1&&(g(0,"div",24),u(1,pd,2,1,"ng-container",15),_()),i&2){let t=p(5).ngIf;c(),l("ngForOf",t==null?null:t.online_image_video)}}function md(i,o){if(i&1&&(g(0,"div",38),M(1),_()),i&2){let t=p(2).$implicit;c(),D(" ",t.prices_and_percentages==null?null:t.prices_and_percentages.prepend_text," ")}}function ud(i,o){if(i&1&&(g(0,"div",39),M(1),_()),i&2){let t=p(2).$implicit;c(),D(" ",t.prices_and_percentages.value[0]," ")}}function gd(i,o){if(i&1&&(g(0,"div",40),M(1),_()),i&2){let t=p(2).$implicit;c(),D(" ",t.prices_and_percentages==null?null:t.prices_and_percentages.append_text," ")}}function _d(i,o){if(i&1&&(g(0,"div",34),u(1,md,2,1,"div",35)(2,ud,2,1,"div",36)(3,gd,2,1,"div",37),_()),i&2){let t=p().$implicit;me("color",t==null?null:t.prices_and_percentages.text_color),c(),l("ngIf",t.prices_and_percentages==null?null:t.prices_and_percentages.prepend_text),c(),l("ngIf",(t.prices_and_percentages==null?null:t.prices_and_percentages.value.length)>0),c(),l("ngIf",t.prices_and_percentages==null?null:t.prices_and_percentages.append_text)}}function hd(i,o){if(i&1&&(g(0,"div",13),M(1),_()),i&2){let t=p().$implicit;me("color",t==null||t.content==null?null:t.content.text_color),l("ngClass",t==null||t.content==null?null:t.content.content_type),c(),D(" ",t==null||t.content==null?null:t.content.text," ")}}function fd(i,o){if(i&1&&(g(0,"div",41),M(1),_()),i&2){let t=p().$implicit;me("color",t==null||t.content==null?null:t.content.text_color),c(),D(" ",t==null||t.content==null?null:t.content.text," ")}}function Cd(i,o){if(i&1&&(g(0,"div")(1,"button",42),M(2),_()()),i&2){let t=p().$implicit;c(),me("color",t==null||t.content==null?null:t.content.text_color),c(),D(" ",t==null||t.content==null?null:t.content.text," ")}}function xd(i,o){if(i&1&&(P(0),u(1,_d,4,5,"div",31)(2,hd,2,4,"div",32)(3,fd,2,3,"div",33)(4,Cd,3,3,"div",4),O()),i&2){let t=o.$implicit;c(),l("ngIf",t==null||t.prices_and_percentages==null?null:t.prices_and_percentages.add_currency),c(),l("ngIf",(t==null||t.content==null?null:t.content.content_type)==="title"||(t==null||t.content==null?null:t.content.content_type)==="subtitle"),c(),l("ngIf",(t==null||t.content==null?null:t.content.content_type)==="url"),c(),l("ngIf",(t==null||t.content==null?null:t.content.content_type)==="button")}}function vd(i,o){if(i&1&&(g(0,"div",30),u(1,xd,5,4,"ng-container",15),_()),i&2){let t=p(5).ngIf,e=p();l("ngStyle",e.alignContent(t)),c(),l("ngForOf",t.text_content)}}function bd(i,o){if(i&1&&(g(0,"div",21),u(1,cd,2,1,"ng-container",4)(2,dd,2,1,"div",22)(3,vd,2,2,"div",23),_()),i&2){let t=p(4).ngIf,e=p();l("ngClass",e.bgClass(t)),c(),l("ngIf",t==null?null:t.is_image_video_from_assets),c(),l("ngIf",!(t!=null&&t.is_image_video_from_assets)),c(),l("ngIf",(t==null?null:t.text_content_placement)&&t.enable_text_content)}}function yd(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",18),i&2){let t=p().$implicit;l("componentInfo",t)}}function Sd(i,o){if(i&1&&(P(0),u(1,yd,1,1,"sip-cs-dynamic-component",17),O()),i&2){let t=o.$implicit,e=p(5);c(),l("ngIf",t.strip.strip_type===e.TextBannerType.BOTTOM_STRIP)}}function Pd(i,o){if(i&1&&(g(0,"div",19),u(1,od,2,1,"ng-container",15)(2,bd,4,4,"div",20)(3,Sd,2,1,"ng-container",15),_()),i&2){let t=p(3).ngIf;c(),l("ngForOf",t.top_and_bottom_strip),c(),l("ngIf",(t==null?null:t.is_image_video_from_assets)&&(t==null||t.image==null?null:t.image.url)||(t==null||t.mobile_image==null?null:t.mobile_image.url)||!(t!=null&&t.is_image_video_from_assets)&&(t==null||t.online_image_video==null?null:t.online_image_video.length)>0||(t==null?null:t.text_content_placement)&&t.enable_text_content),c(),l("ngForOf",t.top_and_bottom_strip)}}function Od(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",18),i&2){let t=p().$implicit;l("componentInfo",t)}}function Md(i,o){if(i&1&&(P(0),u(1,Od,1,1,"sip-cs-dynamic-component",17),O()),i&2){let t=o.$implicit,e=p(4);c(),l("ngIf",t.add_text_banner.text_banner_type===e.TextBannerType.BOTTOM_BANNER)}}function Ed(i,o){if(i&1&&(g(0,"div",13)(1,"div",14),u(2,nd,2,1,"ng-container",15)(3,Pd,4,3,"div",16)(4,Md,2,1,"ng-container",15),_()()),i&2){let t,e=p(2).ngIf;l("ngClass",(t=e.ad_type)!==null&&t!==void 0?t:"full"),c(2),l("ngForOf",e.top_and_bottom_text_banner),c(),l("ngIf",(e==null||e.top_and_bottom_strip==null?null:e.top_and_bottom_strip.length)>
560||(e==null?null:e.is_image_video_from_assets)&&((e==null||e.image==null?null:e.image.url)||(e==null||e.mobile_image==null?null:e.mobile_image.url))||(e==null||e.online_image_video==null?null:e.online_image_video.length)>0||(e==null?null:e.text_content_placement)&&e.enable_text_content),c(),l("ngForOf",e.top_and_bottom_text_banner)}}function Id(i,o){if(i&1&&(g(0,"div",43),M(1),_()),i&2){let t=p(2).ngIf;l("id","disclaimer-tag-"+(t==null?null:t.uid)),c(),D(" ",t==null?null:t.disclaimer," ")}}function kd(i,o){if(i&1&&(g(0,"div",44),M(1),_()),i&2){let t,e=p(2).ngIf;c(),D(" ",(t=e==null?null:e.sponsored)!==null&&t!==void 0?t:"Sponsored"," ")}}function wd(i,o){if(i&1&&(b(0,"div",45),m(1,"safeHtml")),i&2){let t=p(2).ngIf;l("id","caption-tag-"+(t==null?null:t.uid))("innerHtml",C(1,2,t.caption),W)}}function Td(i,o){if(i&1&&(P(0),u(1,Xp,4,7,"ng-container",5),m(2,"async"),u(3,ed,2,3,"ng-template",null,0,A)(5,Ed,5,4,"ng-template",null,1,A),g(7,"div",6),u(8,Id,2,2,"div",7)(9,kd,2,1,"div",8),_(),u(10,wd,2,4,"div",9),O()),i&2){let t=k(4),e=p().ngIf,n=p();c(),l("ngIf",n.showMobileImage&&(e==null?null:e.mobile_url)&&C(2,5,n.screenSizeService.isMobile$)||(e==null||e.costco_url==null?null:e.costco_url.url))("ngIfElse",t),c(7),l("ngIf",e==null?null:e.enable_disclaimer),c(),l("ngIf",e==null?null:e.enable_sponsored),c(),l("ngIf",e.enable_caption)}}function Ad(i,o){if(i&1&&(g(0,"div",3),u(1,Td,11,7,"ng-container",4),_()),i&2){let t=p();l("sipObserve",t.handleComponentVisible.bind(t)),c(),l("ngIf",t.showExpiryAdBuilder)}}var Gs=(()=>{let o=class o{constructor(e,n,r,s,a,d){this.component=e,this.cd=n,this.elemRef=r,this.screenSizeService=s,this.sipGtmService=a,this.cookieService=d,this.subscriptions=new Se,this.TextBannerType=un,this.describedByIds="",this.borderRadius="",this.showExpiryAdBuilder=!0}handleComponentVisible(){this.subscriptions.add(this.component.data$.pipe(V(e=>!!e?.ga_ref?.[0]?.promotion_id),G()).subscribe(e=>{this.saveGtmEvent(e?.ga_ref[0],de.PROMOTION_IMPRESSIONS_VIEW)}))}saveGtmEvent(e,n){if(e?.promotion_id&&e?.promotion_enabled){let r={id:e.promotion_id,name:e.promotion_name,creative:e.promotion_creative,position:e.promotion_position,urlTarget:e.link_url};this.sipGtmService.pushPromotionImpressionEvent(r,n),this.sipGtmService.pushGA4ViewPromotionEvent(r)}}onClick(e){if(e?.promotion_id&&e?.promotion_enabled){let n={id:e.promotion_id,name:e.promotion_name,creative:e.promotion_creative,position:e.promotion_position,urlTarget:e.link_url};this.sipGtmService.pushGA4SelectPromotionEvent(n)}}ngOnInit(){this.component.data$.pipe($(1),I(e=>{let n={};if(e?.enable_custom_background){let r=e?.background_group;e.background_group?.background_gradient_style!=="no-background"&&(n={bgColor:r?.background_color?.hex||"",color1:r?.background_gradient_color?.color1?.hex||"",color2:r?.background_gradient_color?.color2?.hex||""})}return e?.enable_mobile_image_variation&&(this.showMobileImage=!0),e?.enable_disclaimer&&(this.describedByIds+="disclaimer-tag-"+e?.uid),e?.enable_sponsored&&(this.describedByIds+=" sponsored-tag"),e?.enable_caption&&(this.describedByIds+=" caption-tag-"+e?.uid),(e?.image?.url||e?.mobile_image?.url)&&(this.borderRadius=this.applyBorderRadius(e)),e?.content_restriction?.length&&e.content_restriction[0]?.membership_expiry_fields?.enable_membership_expiry&&this.cookieService.get("dismissExpiryBanner")&&(this.showExpiryAdBuilder=!1),{colorValues:n}})).subscribe(e=>{this.colorValues=e.colorValues})}ngAfterViewInit(){this.colorValues?.bgColor?Ie(this.elemRef.nativeElement,"--bgColor",this.colorValues?.bgColor):this.colorValues?.color1&&this.colorValues?.color2&&(Ie(this.elemRef.nativeElement,"--color1",this.colorValues?.color1),Ie(this.elemRef.nativeElement,"--color2",this.colorValues?.color2)),this.cd.detectChanges()}alignContent(e){let n={};if(e?.text_content_overlay_styles.length>0){let r=e.text_content_overlay_styles[0];switch(r.overlay_style.text_alignment){case"bottom":n["justify-content"]="flex-end";break;case"middle":n["justify-content"]="center";break;case"center":n["align-items"]="center";break}switch(r.overlay_style.overlay_position){case"bottom":n["justify-content"]="flex-end";break;case"center":n["align-items"]="center";break;case"right":n["align-items"]="flex-end";break}}return n}bgClass(e){return e?.enable_custom_background&&!e?.image?.url?`has-bg ${e?.background_group?.background_gradient_style}`:""}applyBorderRadius(e){let n="all-rounded";if(Array.isArray(e?.top_and_bottom_strip)){let r=e?.top_and_bottom_strip.some(a=>a?.strip?.strip_type===un.TOP_STRIP),s=e?.top_and_bottom_strip.some(a=>a?.strip?.strip_type===un.BOTTOM_STRIP);r&&s?n="":r?n="bottom-rounded":s&&(n="top-rounded")}return"image "+n}ngOnDestroy(){this.subscriptions.unsubscribe()}};o.\u0275fac=function(n){return new(n||o)(f(K),f(Me),f(Ue),f(zs),f(pn),f(qe))}
vendor: 10,190 bytes, line 56
56,o.\u0275cmp=w({type:o,selectors:[["sip-ad-builder"]],decls:2,vars:3,consts:[["noLink",""],["adBuilderContent",""],["class","ad-builder",3,"sipObserve",4,"ngIf"],[1,"ad-builder",3,"sipObserve"],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"bottom-container"],["class","disclaimer",3,"id",4,"ngIf"],["class","sponsored","id","sponsored-tag",4,"ngIf"],["class","caption",3,"id","innerHtml",4,"ngIf"],[1,"link",3,"click","ngClass"],[4,"ngTemplateOutlet"],[1,"link",3,"ngClass"],[3,"ngClass"],[1,"ad-builder-container"],[4,"ngFor","ngForOf"],["class","inner-container",4,"ngIf"],[3,"componentInfo",4,"ngIf"],[3,"componentInfo"],[1,"inner-container"],["class","ad-builder-section",3,"ngClass",4,"ngIf"],[1,"ad-builder-section",3,"ngClass"],["class","image-section",4,"ngIf"],["class","overlay-section",3,"ngStyle",4,"ngIf"],[1,"image-section"],[3,"ngClass","src","alt",4,"ngIf"],["controls","","class","video-section",3,"title",4,"ngIf"],[3,"ngClass","src","alt"],["controls","",1,"video-section",3,"title"],[3,"src","type"],[1,"overlay-section",3,"ngStyle"],["class","price",3,"color",4,"ngIf"],[3,"ngClass","color",4,"ngIf"],["class","btn-link",3,"color",4,"ngIf"],[1,"price"],["class","prepend",4,"ngIf"],["class","price-value",4,"ngIf"],["class","append",4,"ngIf"],[1,"prepend"],[1,"price-value"],[1,"append"],[1,"btn-link"],[1,"btn-overlay"],[1,"disclaimer",3,"id"],["id","sponsored-tag",1,"sponsored"],[1,"caption",3,"id","innerHtml"]],template:function(n,r){n&1&&(u(0,Ad,2,2,"div",2),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},styles:[".ad-builder[_ngcontent-%COMP%]{display:flex;flex-direction:column}.ad-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]:hover, .ad-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]:visited{text-decoration:none}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;width:100%;grid-area:1 / 1;position:relative;flex:1 1 0%}.ad-builder[_ngcontent-%COMP%] .ad-builder-section.has-bg[_ngcontent-%COMP%]{min-height:343px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section.linear[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(linear,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-linear-gradient(var(--color1),var(--color2));background:-moz-linear-gradient(var(--color1),var(--color2));background:-o-linear-gradient(var(--color1),var(--color2));background:-ms-linear-gradient(var(--color1),var(--color2));background:linear-gradient(var(--color1),var(--color2))}.ad-builder[_ngcontent-%COMP%] .ad-builder-section.radial[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(radial,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-radial-gradient(var(--color1),var(--color2));background:-moz-radial-gradient(var(--color1),var(--color2));background:-o-radial-gradient(var(--color1),var(--color2));background:-ms-radial-gradient(var(--color1),var(--color2));background:radial-gradient(var(--color1),var(--color2))}.ad-builder[_ngcontent-%COMP%] .ad-builder-section.solid[_ngcontent-%COMP%]{background-color:var(--bgColor)}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .image-section[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .video-section[_ngcontent-%COMP%]{grid-area:1 / 1;height:auto;width:100%}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%]{position:relative;display:flex;grid-area:1 / 1;height:auto;width:100%;flex:0 1 0%;flex-direction:column;justify-content:flex-start;align-items:flex-start;opacity:1;padding-top:16px;padding-left:16px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{padding:8px 0;font-weight:700;display:flex;align-items:flex-start}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .prepend[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .append[_ngcontent-%COMP%]{font-size:18px;line-height:16px;vertical-align:top}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .price-value[_ngcontent-%COMP%]{font-size:28px;line-height:22px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;font-size:24px;line-height:28px;padding:4px 0}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:1.5}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .btn-link[_ngcontent-%COMP%]{margin-top:8px;font-weight:400;text-decoration-line:underline;padding:10px 0;font-size:14px;line-height:1.3}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .btn-overlay[_ngcontent-%COMP%]{margin-top:8px;padding:3px 16px 5px;border-radius:3px;font-weight:500;font-size:12px!important;line-height:1.3!important;letter-spacing:.2px;min-height:auto!important;height:auto;background:#005dab;outline:none;border:none}@media screen and (min-width: 768px) and (max-width: 1023px){.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section.has-bg[_ngcontent-%COMP%]{min-height:736px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:8px}}@media screen and (min-width: 1024px){.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%]{padding:32px 48px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section.has-bg[_ngcontent-%COMP%]{min-height:249px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] .price-value[_ngcontent-%COMP%]{font-size:40px;line-height:32px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:42px;line-height:1.3;margin-bottom:12px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:22px;line-height:1.3}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .btn-link[_ngcontent-%COMP%]{font-size:16px}.ad-builder[_ngcontent-%COMP%] .ad-builder-section[_ngcontent-%COMP%] .overlay-section[_ngcontent-%COMP%] .btn-overlay[_ngcontent-%COMP%]{margin-top:12px;padding:10px 16px;font-size:16px!important;line-height:1.3!important;min-height:40px!important;letter-spacing:0px}}.ad-builder[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{object-fit:contain;grid-area:1 / 1;height:auto;width:100%;display:block}.ad-builder[_ngcontent-%COMP%] .image.all-rounded[_ngcontent-%COMP%] img{border-radius:10px}.ad-builder[_ngcontent-%COMP%] .image.top-rounded[_ngcontent-%COMP%] img{border-top-right-radius:10px;border-top-left-radius:10px}.ad-builder[_ngcontent-%COMP%] .image.bottom-rounded[_ngcontent-%COMP%] img{border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ad-builder[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] img{object-fit:contain;grid-area:1 / 1;height:auto;width:100%;display:block}.ad-builder[_ngcontent-%COMP%] .ad-builder-container[_ngcontent-%COMP%]{position:relative;gap:16px;display:flex;flex-direction:column}.ad-builder[_ngcontent-%COMP%] .bottom-container[_ngcontent-%COMP%]{align-items:flex-start;align-self:stretch;display:flex;gap:16px;justify-content:space-between;padding:0 16px}.ad-builder[_ngcontent-%COMP%] .bottom-container[_ngcontent-%COMP%] .disclaimer[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .bottom-container[_ngcontent-%COMP%] .sponsored[_ngcontent-%COMP%]{font-size:12px;line-height:18px;font-weight:400}.ad-builder[_ngcontent-%COMP%] .bottom-container[_ngcontent-%COMP%] .disclaimer[_ngcontent-%COMP%]{word-break:break-word}.ad-builder[_ngcontent-%COMP%] .full[_ngcontent-%COMP%]{flex-grow:1}.ad-builder[_ngcontent-%COMP%] .half[_ngcontent-%COMP%]{flex:1 1 calc(50% - 24px)}.ad-builder[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%]{flex:1 1 calc(25% - 24px)}.ad-builder[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{flex:1 1 calc(75% - 24px)}@media screen and (min-width: 768px) and (max-width: 1023px){.ad-builder[_ngcontent-%COMP%] .full[_ngcontent-%COMP%]{flex-grow:1}.ad-builder[_ngcontent-%COMP%] .half[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{flex-grow:0}}@media screen and (min-width: 1024px){.ad-builder[_ngcontent-%COMP%] .full[_ngcontent-%COMP%]{flex-grow:1}.ad-builder[_ngcontent-%COMP%] .half[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%], .ad-builder[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{flex-grow:0}}"],changeDetection:0});let i=o;return i})();function Rd(i,o){if(i&1&&(g(0,"span"),M(1),_()),i&2){let t=p(2).ngIf;me("color",t.add_text_banner.text_color),ce("aria-label",t.add_text_banner.text),c(),D(" ",t.add_text_banner.text," ")}}function Dd(i,o){if(i&1&&b(0,"mat-icon",9),i&2){let t=p(3).ngIf,e=p();me("color",t.add_text_banner.text_color),l("fontIcon",e.SipCostcoIcon.CALENDAR_ADD_ON)}}function Ld(i,o){if(i&1&&b(0,"mat-icon",9),i&2){let t=p(3).ngIf,e=p();me("color",t.add_text_banner.text_color),l("fontIcon",e.SipCostcoIcon.CALENDAR_ADD_ON)}}function Bd(i,o){if(i&1&&(g(0,"a",7),u(1,Dd,1,3,"mat-icon",8),g(2,"span"),M(3),_(),u(4,Ld,1,3,"mat-icon",8),_(
56)),i&2){let t=p(2).ngIf;me("color",t.add_text_banner.text_color),He("href",t==null||t.add_text_banner==null?null:t.add_text_banner.add_to_calendar_link,xe),c(),l("ngIf",(t==null||t.add_text_banner==null?null:t.add_text_banner.show_calendar_icon)&&(t==null||t.add_text_banner==null?null:t.add_text_banner.calendar_icon_position)==="left_of_text"),c(),me("color",t.add_text_banner.text_color),ce("aria-label",t.add_text_banner.text),c(),re(t.add_text_banner.text),c(),l("ngIf",(t==null||t.add_text_banner==null?null:t.add_text_banner.show_calendar_icon)&&(t==null||t.add_text_banner==null?null:t.add_text_banner.calendar_icon_position)!=="left_of_text")}}function Fd(i,o){if(i&1&&(g(0,"div",3)(1,"div",4),u(2,Rd,2,4,"span",5)(3,Bd,5,9,"a",6),_()()),i&2){let t=p().ngIf,e=p();c(),l("ngClass",e.setClass(t.add_text_banner.banner_background_color,t.add_text_banner.text_banner_type,t.add_text_banner.font_size)),c(),l("ngIf",(t==null||t.add_text_banner==null?null:t.add_text_banner.add_to_calendar_link)===""),c(),l("ngIf",(t==null||t.add_text_banner==null?null:t.add_text_banner.add_to_calendar_link)!=="")}}function $d(i,o){if(i&1&&(g(0,"div",10)(1,"div",4)(2,"p"),M(3),_()()()),i&2){let t=p().ngIf,e=p();c(),l("ngClass",e.setClass(t.strip.background_color,t.strip.strip_type)),c(),me("color",t.strip.text_color),ce("aria-label",t.strip.text),c(),D(" ",t.strip.text," ")}}function Nd(i,o){if(i&1&&(g(0,"div",1),u(1,Fd,4,3,"ng-template",2)(2,$d,4,5,"ng-template",2),_()),i&2){let t=o.ngIf;c(),l("ngIf",t.add_text_banner),c(),l("ngIf",t.strip)}}var Ji=(()=>{let o=class o{constructor(e,n){this.component=e,this.elemRef=n,this.SipCostcoIcon=Qt}ngOnInit(){return Z(this,null,function*(){this.component.data$.pipe($(1),I(e=>{let n=e?.add_text_banner?.banner_background_color?e?.add_text_banner?.banner_background_color:e?.strip?.background_color,r=n?.background_gradient_style,s={};return r!=="no-background"&&(s={bgColor:n?.background_color?.hex||"",color1:n?.background_gradient_color?.color1?.hex||"",color2:n?.background_gradient_color?.color2?.hex||""}),{colorValues:s}})).subscribe(e=>{this.colorValues=e.colorValues})})}ngAfterViewInit(){this.colorValues?.bgColor?Ie(this.elemRef.nativeElement,"--bgColor",this.colorValues?.bgColor):this.colorValues?.color1&&this.colorValues?.color2&&(Ie(this.elemRef.nativeElement,"--color1",this.colorValues?.color1),Ie(this.elemRef.nativeElement,"--color2",this.colorValues?.color2))}setClass(e,n,r){let s=Object.keys(e).length===0||e.background_gradient_style==="no-background"?"no-bg":"has-bg";return n==="top_banner"?s+=" top-banner":n==="bottom_banner"&&(s+=" bottom-banner"),n==="top_strip"?s+=" top-strip":n==="bottom_strip"&&(s+=" bottom-strip"),e.background_gradient_style&&(s+=" "+e?.background_gradient_style),r==="large"&&(s+=" large"),s}};o.\u0275fac=function(n){return new(n||o)(f(K),f(Ue))},o.\u0275cmp=w({type:o,selectors:[["sip-text-banner"]],decls:2,vars:3,consts:[["class","text-banner",4,"ngIf"],[1,"text-banner"],[3,"ngIf"],[1,"add-text-banner"],[3,"ngClass"],[3,"color",4,"ngIf"],["class","calendar-banner-link",3,"href","color",4,"ngIf"],[1,"calendar-banner-link",3,"href"],["class","add-to-calendar-icon",3,"color","fontIcon",4,"ngIf"],[1,"add-to-calendar-icon",3,"fontIcon"],[1,"strip"]],template:function(n,r){n&1&&(u(0,Nd,3,2,"div",0),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[Pe,z,Zt,N],styles:[".text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .top-banner[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .bottom-banner[_ngcontent-%COMP%]{border-radius:10px;text-align:center}.text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .top-banner[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .bottom-banner[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .top-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .bottom-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .to
56p-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .bottom-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#333}.text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center;font-size:14px;line-height:150%;font-weight:700}.text-banner[_ngcontent-%COMP%] .add-text-banner[_ngcontent-%COMP%] .calendar-banner-link[_ngcontent-%COMP%]{text-align:center;font-size:14px;line-height:150%;font-weight:700;display:block;cursor:pointer;text-decoration:none}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%]{width:100%}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .bottom-strip[_ngcontent-%COMP%]{border-radius:10px;justify-content:center;padding:8px 16px;text-align:center}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .bottom-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%]{top:0;border-radius:10px 10px 0 0}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:22px;line-height:22px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .bottom-strip[_ngcontent-%COMP%]{bottom:0;border-radius:0 0 10px 10px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .bottom-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:10px;line-height:15px}.text-banner[_ngcontent-%COMP%] .large.top-banner[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:24px;line-height:116.667%;font-weight:400}.text-banner[_ngcontent-%COMP%] .large.top-banner[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{height:18px;width:18px}.text-banner[_ngcontent-%COMP%] .large.top-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .large.top-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;font-size:24px;line-height:116.667%;font-weight:400}.text-banner[_ngcontent-%COMP%] .large.bottom-banner[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .large.bottom-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .large.bottom-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px;line-height:125%;font-weight:700}.text-banner[_ngcontent-%COMP%] .has-bg[_ngcontent-%COMP%]{border-radius:10px;padding:8px 16px;background-color:#005dab}.text-banner[_ngcontent-%COMP%] .has-bg.top-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .has-bg.bottom-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .has-bg.top-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .has-bg.bottom-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.text-banner[_ngcontent-%COMP%] .has-bg.top-strip[_ngcontent-%COMP%]{background:#005dab}.text-banner[_ngcontent-%COMP%] .has-bg.bottom-strip[_ngcontent-%COMP%]{background:#333}.text-banner[_ngcontent-%COMP%] .has-bg.linear[_ngcontent-%COMP%]{background:linear-gradient(var(--color1),var(--color2))}.text-banner[_ngcontent-%COMP%] .has-bg.radial[_ngcontent-%COMP%]{background:radial-gradient(var(--color1),var(--color2))}.text-banner[_ngcontent-%COMP%] .has-bg.solid[_ngcontent-%COMP%]{background-color:var(--bgColor)}@media screen and (min-width: 768px) and (max-width: 1023px){.text-banner.top-banner.large[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner.top-banner.large[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner.top-banner.large[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:28px;line-height:114.286%}
56.text-banner.top-banner.large[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{height:24px;width:24px}.text-banner.bottom-banner[_ngcontent-%COMP%]{min-width:240px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:22px;line-height:27px}}@media screen and (min-width: 1024px){.text-banner[_ngcontent-%COMP%] .top-banner.large[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .top-banner.large[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .top-banner.large[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:24px;line-height:130%}.text-banner[_ngcontent-%COMP%] .top-banner.large[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{height:30px;width:30px}.text-banner[_ngcontent-%COMP%] .bottom-banner[_ngcontent-%COMP%]{min-width:240px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:32px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .top-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:26px}.text-banner[_ngcontent-%COMP%] .strip[_ngcontent-%COMP%] .bottom-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:14px}}.add-to-calendar-icon[_ngcontent-%COMP%]{margin:0 1rem}"],changeDetection:0});let i=o;return i})();var ut=function(i){return i.AD="ad",i.PRODUCT="product",i.CATEGORY="category",i}(ut||{}),gn=function(i){return i.STATIC="static",i.ROTATING="rotating",i}(gn||{}),wi=function(i){return i.Market="market",i.ThirdParty="thirdparty",i}(wi||{}),eo=function(i){return i.TOP_SELLER="TOP_SELLER",i.RECENTLY_VIEWED="RECENTLY_VIEWED_RECOMMENDED_PRODUCT",i}(eo||{}),jd=function(i){return i.MULTI_ROW="multi_row",i.FOUR_CORNER="four_corner",i}(jd||{});var zd=(i,o,t,e)=>({"background-color":i,"background-image":o,"background-position":t,"border-radius":e}),Gd=i=>({"horizontal-alignment":i}),Et=i=>({data:i}),Vd=(i,o)=>({data:i,layout:o});function Ud(i,o){if(i&1&&(g(0,"div",22),M(1),_()),i&2){let t=p().$implicit;me("color",t==null||t.content==null?null:t.content.text_color),l("ngClass",t==null||t.content==null?null:t.content.content_type),c(),D(" ",t==null||t.content==null?null:t.content.text," ")}}function Hd(i,o){if(i&1&&(P(0),u(1,Ud,2,4,"div",21),O()),i&2){let t=o.$implicit;c(),l("ngIf",(t==null||t.content==null?null:t.content.content_type)==="title"||(t==null||t.content==null?null:t.content.content_type)==="subtitle")}}function Wd(i,o){if(i&1){let t=U();g(0,"div")(1,"button",24),F("click",function(){L(t);let n=p(2).ngIf,r=p(2);return B(r.backgroundButtonClick(n==null||n.background_banner_reference==null||n.background_banner_reference[0]==null||n.background_banner_reference[0].costco_url==null?null:n.background_banner_reference[0].costco_url.url))}),M(2),_()()}if(i&2){let t=p().$implicit,e=p().ngIf;c(),me("color",t==null||t.content==null?null:t.content.text_color),ce("aria-label",(t==null||t.content==null?null:t.content.text)+(!(e==null||e.background_banner_reference==null||e.background_banner_reference[0]==null||e.background_banner_reference[0].costco_url==null)&&e.background_banner_reference[0].costco_url.url?", link":"")),c(),D(" ",t==null||t.content==null?null:t.content.text," ")}}function qd(i,o){if(i&1&&(P(0),u(1,Wd,3,4,"div",23),O()),i&2){let t=o.$implicit;c(),l("ngIf",(t==null||t.content==null?null:t.content.content_type)==="button")}}function Yd(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",26),i&2){let t=p().$implicit;l("componentInfo",t)}}function Kd(i,o){if(i&1&&(P(0),u(1,Yd,1,1,"sip-cs-dynamic-component",25),O()),i&2){let t=o.$implicit;c(),l("ngIf",t)}}function Qd(i,o){i&1&&ve(0)}function Zd(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=p().$implicit;l("componentInfo",t)}}function Xd(i,o){if(i&1&&(P(0),u(1,Zd,1,1,"sip-cs-dynamic-component",27),O()),i&2){let t=o.$implicit,e=p(3);c(),l("ngIf",t.strip.strip_type===e.TextBannerType.BOTTOM_STRIP)}}function Jd(i,o){if(i&1&&(P(0),g(1,"div",14)(2,"div",15)(3,"div",16),u(4,Hd,2,1,"ng-container",17),_(),g(5,"div",18),u(6,qd,2,1,"ng-container",17),_()(),g(7,"div",19),u(8,Kd,2,1,"ng-container",17),_(),u(9,Qd,1,0,"ng-container",20),_(),u(10,Xd,2,1,"ng-container",17),O()),i&2){let t=o.ngIf;p();let e=k(4),n=p();
56c(),l("ngStyle",bt(7,zd,n.computeBackgroundColor(t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null?null:t.background_banner_reference[0].background_group),!(t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null||t.background_banner_reference[0].image==null)&&t.background_banner_reference[0].image.url?"url("+(t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null||t.background_banner_reference[0].image==null?null:t.background_banner_reference[0].image.url)+")":"none",n.getBackgroundPosition(t==null?null:t.background_banner_image_alignment),n.getBorderRadius(t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null?null:t.background_banner_reference[0].top_and_bottom_strip))),c(),l("ngClass",X(12,Gd,(t==null?null:t.background_banner_button_alignment)==="Horizontal")),c(2),l("ngForOf",t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null?null:t.background_banner_reference[0].text_content),c(2),l("ngForOf",t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null?null:t.background_banner_reference[0].text_content),c(2),l("ngForOf",t.foreground_banner_group),c(),l("ngTemplateOutlet",e),c(),l("ngForOf",t==null||t.background_banner_reference==null||t.background_banner_reference[0]==null?null:t.background_banner_reference[0].top_and_bottom_strip)}}function em(i,o){i&1&&ve(0)}function tm(i,o){i&1&&ve(0)}function nm(i,o){if(i&1&&(P(0),u(1,em,1,0,"ng-container",29)(2,tm,1,0,"ng-container",29),m(3,"async"),O()),i&2){let t=p(2).ngIf,e=p(),n=k(3),r=k(15);c(),l("ngTemplateOutlet",r)("ngTemplateOutletContext",X(6,Et,t)),c(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",gt(8,Vd,t.ad_content,C(3,4,e.layoutClass$)))}}function im(i,o){i&1&&ve(0)}function om(i,o){i&1&&ve(0)}function rm(i,o){if(i&1&&(P(0),u(1,im,1,0,"ng-container",29)(2,om,1,0,"ng-container",29),O()),i&2){let t=p(2).ngIf;p();let e=k(5),n=k(15);c(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",X(4,Et,t)),c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(6,Et,t.ad_content))}}function sm(i,o){i&1&&ve(0)}function am(i,o){if(i&1&&(P(0),u(1,sm,1,0,"ng-container",29),O()),i&2){let t=p(2).ngIf;p();let e=k(7);c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(2,Et,t))}}function lm(i,o){i&1&&ve(0)}function cm(i,o){if(i&1&&(P(0),u(1,lm,1,0,"ng-container",29),O()),i&2){let t=p(2).ngIf;p();let e=k(9);c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(2,Et,t))}}function pm(i,o){i&1&&ve(0)}function dm(i,o){if(i&1&&(P(0),u(1,pm,1,0,"ng-container",29),O()),i&2){let t=p(3).ngIf,e=p(),n=k(11);c(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",X(2,Et,e.normalizeCarouselComponentData(t)))}}function mm(i,o){i&1&&ve(0)}function um(i,o){if(i&1&&(P(0),u(1,mm,1,0,"ng-container",29),O()),i&2){let t=p(4).ngIf,e=p(),n=k(11);c(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",X(2,Et,e.normalizeCarouselComponentData(t)))}}function gm(i,o){i&1&&ve(0)}function _m(i,o){if(i&1&&u(0,gm,1,0,"ng-container",29),i&2){let t=p(4).ngIf,e=p(),n=k(13);l("ngTemplateOutlet",n)("ngTemplateOutletContext",X(2,Et,e.normalizeRecommendationCarouselComponentData(t)))}}function hm(i,o){if(i&1&&(P(0),u(1,um,2,4,"ng-container",13)(2,_m,1,4,"ng-template",null,8,A),O()),i&2){let t=k(3),e=p(3).ngIf;c(),l("ngIf",e.product_content.third_party_recommendation_types==="TOP_SELLER")("ngIfElse",t)}}function fm(i,o){if(i&1&&(P(0),u(1,dm,2,4,"ng-container",23),m(2,"async"),u(3,hm,4,2,"ng-container",23),m(4,"async"),O()),i&2){let t=p(3);c(),l("ngIf",C(2,2,t.showMarketProduct$)),c(2),l("ngIf",C(4,4,t.showThirdPartyProduct$))}}function Cm(i,o){if(i&1&&(u(0,nm,4,11,"ng-container",23),m(1,"async"),u(2,rm,3,8,"ng-container",23),m(3,"async"),u(4,am,2,4,"ng-container",23),m(5,"async"),u(6,cm,2,4,"ng-container",23),m(7,"async"),u(8,fm,5,6,"ng-container",23)),i&2){let t=p().ngIf,e=p();l("ngIf",C(1,5,e.showStaticBanner$)),c(2),l("ngIf",C(3,7,e.showRotatingBanner$)),c(2),l("ngIf",C(5,9,e.showCategoryMultiRowOrFourSquare$)),c(2),l("ngIf",C(7,11,e.showCategorySet$)),c(2),l("ngIf",t.product_recommendation)}}function xm(i,o){if(i&1&&(g(0,"div",12),u(1,Jd,11,14,"ng-container",13),m(2,"async"),u(3,Cm,9,13,"ng-template",null,7,A),_()),i&2){let t=k(4),e=p();l("sipObserve",e.handleComponentVisible.bind(e)),c(),l("ngIf",C(2,3,e.backgroundForegroundData$))("ngIfElse",t)}}function vm(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=p().$implicit;l("componentInfo",t)}}function bm(i,o){if(i&1&&(g(0,"div",31),u(1,vm,1,1,"sip-cs-dynamic-component",27),_()),i&2){let t=o.$implicit;c(),l("ngIf",t)}}function ym(i,o){if(i&1&&(P(0),u(1,bm,2,1,"div",30),O()),i&2){let t=p().data;c(),l("ngForOf",t)}}function Sm(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=p().$implicit;l("componentInfo",t)}}function Pm(i,o){if(i&1&&(g(0,"div"),u(1,Sm,1,1,"sip-cs-dynamic-component",27),_()),i&2){let t=o.$implicit;c(),l("ngIf",t)}}
56function Om(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=p().$implicit;l("componentInfo",t)}}function Mm(i,o){if(i&1&&(g(0,"div"),u(1,Om,1,1,"sip-cs-dynamic-component",27),_()),i&2){let t=o.$implicit;c(),l("ngIf",t)}}function Em(i,o){if(i&1&&(g(0,"div",31),u(1,Pm,2,1,"div",17),_(),g(2,"div",31),u(3,Mm,2,1,"div",17),_()),i&2){let t=p().data,e=p();c(),l("ngForOf",e.getItems(t,0,1)),c(2),l("ngForOf",e.getItems(t,1))}}function Im(i,o){if(i&1&&(g(0,"div",22),m(1,"async"),u(2,ym,2,1,"ng-container",13)(3,Em,4,2,"ng-template",null,9,A),_()),i&2){let t=o.layout,e=k(4),n=p();l("ngClass",C(1,3,n.layoutClass$)),c(2),l("ngIf",t!==n.AdType.OneFourthMix)("ngIfElse",e)}}function km(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=p().item;l("componentInfo",t)}}function wm(i,o){if(i&1&&u(0,km,1,1,"sip-cs-dynamic-component",27),i&2){let t=o.item;l("ngIf",t)}}function Tm(i,o){if(i&1&&(P(0),g(1,"div",32),b(2,"sip-carousel",33),u(3,wm,1,1,"ng-template",null,10,A),_(),O()),i&2){let t=o.data,e=k(4),n=p();c(2),l("items",t)("template",e)("options",n.options)}}function Am(i,o){if(i&1&&b(0,"sip-category-multi-row-or-four-square",34),i&2){let t=o.data;l("data$",t)}}function Rm(i,o){if(i&1&&b(0,"sip-category-set",34),i&2){let t=o.data;l("data$",t)}}function Dm(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=o.data;l("componentInfo",t)}}function Lm(i,o){if(i&1&&b(0,"sip-cs-dynamic-component",28),i&2){let t=o.data;l("componentInfo",t)}}function Bm(i,o){if(i&1&&(g(0,"h2"),M(1),_()),i&2){let t=p(2).ngIf;c(),D(" ",t.title," ")}}function Fm(i,o){if(i&1&&(g(0,"a",38),M(1," See All "),g(2,"div",39),b(3,"mat-icon",40),_()()),i&2){let t=p(2).ngIf;l("href",t.url,xe)}}function $m(i,o){if(i&1&&(g(0,"section",36),u(1,Bm,2,1,"h2",23)(2,Fm,4,1,"a",37),_()),i&2){let t=p().ngIf;c(),l("ngIf",t.title),c(),l("ngIf",t.url)}}function Nm(i,o){if(i&1&&(P(0),u(1,$m,3,2,"section",35),O()),i&2){let t=o.ngIf;c(),l("ngIf",t.title||t.url)}}function jm(i,o){if(i&1&&u(0,Nm,2,1,"ng-container",23),i&2){let t=o.data;l("ngIf",t==null?null:t.ad_set_heading_and_costco_url)}}var Us=(()=>{let o=class o{constructor(e,n,r,s){this.component=e,this.sipGtmService=n,this.router=r,this.windowRef=s,this.subscriptions=new Se,this.AdType=tr,this.TextBannerType=un,this.options={loop:!1,rewind:!0,autoplay:!1,navSpeed:500,autoplaySpeed:500,autoplayTimeout:4e3,dots:!0,items:1,slideBy:1,responsive:{0:{items:1,slideBy:1}},showPausePlayButtons:!1,showMatIcons:!0},this.showStaticBanner$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.AD&&a.ad_set_style===gn.STATIC)return!0}),G()),this.showRotatingBanner$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.AD&&a.ad_set_style===gn.ROTATING){if(this.options.autoplay=a.rotating_options?.enable_autoplay,this.options.showPausePlayButtons=a.rotating_options?.enable_autoplay,a.rotating_options?.multi_item_carousel){if(this.windowRef.nativeWindow){let d=this.windowRef?.nativeWindow?.screen?.width;d<Rt.md?this.options.showMatIcons=!1:d>=Rt.md&&d<Rt.lg?this.options.showMatIcons=a.ad_content.length>3:d>=Rt.lg&&(this.options.showMatIcons=a.ad_content.length>5)}this.options.responsive={0:{items:2,slideBy:"page"},[Rt.md-56]:{items:3,slideBy:"page"},[Rt.lg-48]:{items:5,slideBy:"page"}}}return!0}}),G()),this.showCategoryMultiRowOrFourSquare$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.CATEGORY&&a.ad_set_style===gn.STATIC)return!0}),G()),this.showCategorySet$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.CATEGORY&&a.ad_set_style===gn.ROTATING)return!0})),this.showMarketProduct$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.PRODUCT&&a.product_recommendation_types===wi.Market)return!0}),G()),this.showThirdPartyProduct$=this.component.data$.pipe($(1),I(a=>{if(a.item_type===ut.PRODUCT&&a.product_recommendation_types===wi.ThirdParty)return!0}),G()),this.layoutClass$=this.component.data$.pipe($(1),et("ad_content"),I((a,d)=>{let h=a[0]?.ad_builder_block?.ad_builder_ref[0].ad_type===void 0?"":a[0]?.ad_builder_block?.ad_builder_ref[0].ad_type;return a.map((x,v)=>{if(x?.ad_builder_block?.ad_builder_ref){let y=x?.ad_builder_block?.ad_builder_ref[0].ad_type===void 0?"":x?.ad_builder_block?.ad_builder_ref[0].ad_type;h=h===y?h:"one_fourth_mix"}}),h}),G()),this.backgroundForegroundData$=this.component.data$.pipe($(1),I(a=>(a.item_type===ut.AD||a.item_type===ut.PRODUCT)&&a.enable_background_foreground_banner?te(R({},a.background_foreground_banner_group),{foreground_banner_group:a.background_foreground_banner_group.foreground_banner_group?.map(d=>({ad_builder_block:d}))??[]}):!1),G())}handleComponentVisible(){this.subscriptions.add(this.component.data$.pipe(V(e=>!!e?.ga_ref?.[0]?.promotion_id),G()).subscribe(e=>{this.saveGtmEvent(e?.ga_ref[0],de.PROMOTION_IMPRESSIONS_VIEW)}))}saveGtmEvent(e,n){if(e?.promotion_id&&e?.promotion_enabled){let r={id:e.promotion_id,name:e.promotion_name,creative:e.promotion_creative,position:e.promotion_position,urlTarget:e.link_url};this.sipGtmService.pushPromotionImpressionEvent(r,n),this.sipGtmService.pushGA4ViewPromotionEvent(r)}}onClick(e){if(e?.promotion_id&&e?.promotion_enabled){let n={id:e.promotion_id,name:e.promotion_name,creative:e.promotion_creative,position:e.promotion_position,urlTarget:e.link_url};this.sipGtmService.pushGA4SelectPromotionEvent(n)}}
56computeBackgroundColor(e){let n=e?.background_gradient_style,r=e?.background_color?.hex,s=e?.background_gradient_color?.color1?.hex,a=e?.background_gradient_color?.color2?.hex;switch(n){case"solid":return r;case"linear":if(s&&a)return`linear-gradient(to right, ${s}, ${a})`;break;case"radial":if(s&&a)return`radial-gradient(circle, ${s}, ${a})`;break;case"no-background":return"none";default:return""}}getBackgroundPosition(e){switch(e){case"Top":return"top";case"Middle":return"center";case"Bottom":return"bottom";default:return"center"}}getBorderRadius(e){return e?.some(r=>r.strip?.strip_type==="bottom_strip")?"16px 16px 0 0":"16px"}backgroundButtonClick(e){this.router.navigateByUrl(e)}getItems(e,n,r){let s=[...e];return s.splice(n,r??s.length)}normalizeCarouselComponentData(e){return{marketing_product_slider_block:{title:this.formatAdSetTitle(e?.ad_set_heading_and_costco_url?.title,e?.ad_set_heading_and_costco_url?.url),useSolrSearch:e.product_display_style.use_solr,productCodes:e.product_content.product_codes.replace(","," "),addToCart:e.product_display_style.add_to_cart,lazyLoad:e.product_display_style.lazy_load,lazyLoadEager:e.product_display_style.lazy_load_eager,doStockCheck:e?.product_display_style?.inventory_aware_listings}}}normalizeRecommendationCarouselComponentData(e){let n=e?.product_content?.third_party_recommendation_types,r=this.buildBaseCarouselFields(e);return n===eo.RECENTLY_VIEWED?{recently_viewed_product_slider_block:te(R({},r),{scroll:e?.product_display_style?.scroll_type,popup:e?.product_display_style?.popup_view_enabled})}:{third_party_recommendation_product_slider_block:R({},r)}}buildBaseCarouselFields(e){return{title:this.formatAdSetTitle(e?.ad_set_heading_and_costco_url?.title,e?.ad_set_heading_and_costco_url?.url),displayProductTitles:e?.product_display_style?.display_product_titles,productReferenceTypes:e?.product_content?.third_party_recommendation_types,addToCart:e?.product_display_style?.add_to_cart,lazyLoad:e?.product_display_style?.lazy_load,lazyLoadEager:e?.product_display_style?.lazy_load_eager,doStockCheck:e?.product_display_style?.inventory_aware_listings,displayProductPrices:e?.product_display_style?.display_product_prices,maximumNumberProducts:e?.product_display_style?.maximum_number_of_products}}formatAdSetTitle(e,n){return e?n?`<a href="${n}" target='_self'>${e}</a>`:e:""}ngOnDestroy(){this.subscriptions.unsubscribe()}};o.\u0275fac=function(n){return new(n||o)(f(K),f(pn),f(_e),f(ot))},o.\u0275cmp=w({type:o,selectors:[["sip-ad-set"]],decls:16,vars:3,consts:[["singleBanner",""],["rotatingBanner",""],["categoryMultiRowOrFourSquare",""],["categorySet",""],["marketingProductCarouselContent",""],["thirdPartyProductRecommendationCarouselContent",""],["titleAndUrl",""],["adSetContent",""],["thirdPartyRecommendationTemplate",""],["oneFourthTmp",""],["itemTpl",""],["class","ad-set",3,"sipObserve",4,"ngIf"],[1,"ad-set",3,"sipObserve"],[4,"ngIf","ngIfElse"],[1,"background-banner-group",3,"ngStyle"],[1,"background-text-content",3,"ngClass"],[1,"background-text-content-title-subtitle"],[4,"ngFor","ngForOf"],[1,"background-text-content-button"],[1,"foreground-banner-group"],[4,"ngTemplateOutlet"],[3,"ngClass","color",4,"ngIf"],[3,"ngClass"],[4,"ngIf"],[1,"bg-btn",3,"click"],["class","foreground-banner",3,"componentInfo",4,"ngIf"],[1,"foreground-banner",3,"componentInfo"],[3,"componentInfo",4,"ngIf"],[3,"componentInfo"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ad-type",4,"ngFor","ngForOf"],[1,"ad-type"],[1,"mat-carousel","rotating-banner-carousel"],[3,"items","template","options"],[3,"data$"],["class","header",4,"ngIf"],[1,"header"],["class","see-all",3,"href",4,"ngIf"],[1,"see-all",3,"href"],[1,"chevron"],["svgIcon","chevron-right","aria-hidden","true"]],template:function(n,r){n&1&&(u(0,xm,5,5,"div",11),m(1,"async"),u(2,Im,5,5,"ng-template",null,0,A)(4,Tm,5,3,"ng-template",null,1,A)(6,Am,1,1,"ng-template",null,2,A)(8,Rm,1,1,"ng-template",null,3,A)(10,Dm,1,1,"ng-template",null,4,A)(12,Lm,1,1,"ng-template",null,5,A)(14,jm,1,1,"ng-template",null,6,A)),n&2&&l("ngIf",C(1,1,r.component.data$))},styles:[".mat-carousel{position:relative} .mat-carousel .mat-arrows.owl-nav{display:flex;justify-content:space-between;width:100%;position:absolute;bottom:0%;z-index:1;transform:translateY(1rem);pointer-events:none}@media screen and (min-width: 768px) and (max-width: 1023px){ .mat-carousel .mat-arrows.owl-nav{bottom:50%;transform:translateY(0)}}@media screen and (min-width: 1024px){ .mat-carousel .mat-arrows.owl-nav{bottom:50%;transform:translateY(0)}} .mat-carousel .mat-arrows.owl-nav .owl-prev, .mat-carousel .mat-arrows.owl-nav .owl-next{display:flex;padding:8px;justify-content:center;align-items:center;background-color:#fff;border-radius:100px;box-shadow:0 0 5px #0000004d;pointer-events:auto} .mat-carousel .mat-arrows.owl-nav .owl-prev:focus, .mat-carousel .mat-arrows.owl-nav .owl-next:focus{outline:0px!important} .mat-carousel .mat-arrows.owl-nav .owl-next{margin-right:-.5rem}@media screen and (min-width: 1024px){ .mat-carousel .mat-arrows.owl-nav .owl-next{margin-right:-1.8rem}} .mat-carousel .mat-arrows.owl-nav .owl-prev{margin-left:-.8rem}@media screen and (min-width: 1024px){ .mat-carousel .mat-arrows.owl-nav .owl-prev{margin-left:-1.8rem}} .mat-carousel owl-carousel-o.owl-mat-icons .owl-dots{display:none} .mat-carousel owl-carousel-o.owl-mat-icons .owl-nav{display:none} .mat-carousel .mat-dots .carousel-button{padding:0;vertical-align:top;background:transparent;border:none;cursor:pointer} .mat-carousel .mat-dots .carousel-button .mat-pause-play-icon{font-size:18px;width:20px;height:20px;line-height:20px;margin:5px 0} .mat-carousel .mat-dots{text-align:center;-webkit-tap-highlight-color:transparent;margin-top:10px} .mat-carousel .mat-dots .owl-dot{display:inline-block;zoom:1;border:none;background:transparent;padding:0;cursor:pointer} .mat-carousel .mat-dots .owl-dot:focus{outline:none} .mat-carousel .mat-dots .owl-dot mat-icon{margin:5px 7px}.ad-set[_ngcontent-%COMP%] .half[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(1,1fr);gap:16px}.ad-set[_ngcontent-%COMP%] .half[_ngcontent-%COMP%] .ad-builder{flex-flow:column}.ad-set[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(1,1fr);gap:16px}.ad-set[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%] .ad-builder{flex-flow:column}.ad-set[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.ad-set[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%] .ad-builder{flex-flow:column}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(1,1fr);gap:16px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-builder{flex-flow:column}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 calc(50% - 16px)}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:8px 0}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#333}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .see-all[_ng
56content-%COMP%]{color:#333;text-decoration:none;display:flex;align-items:center}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%]:hover{text-decoration:underline}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{margin-left:8px;display:flex;align-items:center;width:14px;height:14px}.ad-set[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:empty{padding:0}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%]{padding:16px;background-repeat:no-repeat}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] owl-carousel-o .owl-carousel{display:block!important}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .horizontal-alignment[_ngcontent-%COMP%]{width:100%;justify-content:space-between;display:flex}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%]{padding-bottom:24px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;font-size:24px;line-height:28px;padding:4px 0}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:1.5}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .bg-btn[_ngcontent-%COMP%]{margin-top:8px;padding:3px 16px 5px;border-radius:3px;font-weight:500;font-size:12px!important;line-height:1.3!important;letter-spacing:.2px;min-height:auto!important;height:auto;background:#005dab;outline:none;border:none}@media screen and (min-width: 768px) and (max-width: 1023px){.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content.has-bg[_ngcontent-%COMP%]{min-height:736px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin-bottom:8px}}@media screen and (min-width: 1024px){.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content.has-bg[_ngcontent-%COMP%]{min-height:249px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:42px;line-height:1.3}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-size:22px;line-height:1.3}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .background-text-content[_ngcontent-%COMP%] .bg-btn[_ngcontent-%COMP%]{margin-top:12px;padding:10px 16px;font-size:16px!important;line-height:1.3!important;min-height:40px!important;letter-spacing:0px}}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .foreground-banner-group[_ngcontent-%COMP%]{display:flex;box-sizing:border-box;gap:16px;margin-bottom:16px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .foreground-banner-group[_ngcontent-%COMP%] .foreground-banner[_ngcontent-%COMP%]{flex:1 1 100%;min-width:0}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .costco-carousel-component{margin:10px 0 0}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] .costco-carousel-component-border-top{border-top:none}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] sip-product-carousel-base .item.product-item{background-color:#fff;border-radius:8px;margin:0 8px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] owl-carousel-o:not(.owl-mat-icons) .owl-dots{bottom:unset!important;left:unset;right:unset;background-color:#fffc;display:flex;justify-content:center;padding:4px;justify-self:center;border-radius:16px}.ad-set[_ngcontent-%COMP%] .background-banner-group[_ngcontent-%COMP%] owl-carousel-o:not(.owl-mat-icons) .owl-dots .owl-dot{width:unset}.ad-set[_ngcontent-%COMP%] .rotating-banner-carousel .embla-slide{padding:0 5px}@media screen and (max-width: 480px){ .ad-set .carousel-component{margin-left:0!important;margin-right:0!important}}@media screen and (min-width: 768px) and (max-width: 1023px){.ad-set[_ngcontent-%COMP%] .half[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 calc(50% - 24px)}}@media screen and (min-width: 1024px){.ad-set[_ngcontent-%COMP%] .half[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_third[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:24px}.ad-set[_ngcontent-%COMP%] .one_fourth_mix[_ngcontent-%COMP%] .ad-type[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1 1 calc(50% - 24px)}} .ad-set .costco-carousel-component{margin-top:0!important} .ad-set .costco-carousel-component.clearfix:before, .ad-set .costco-carousel-component.clearfix:after{content:none;display:initial} .ad-set .costco-carousel-component .carousel{margin-bottom:20px!important}@media screen and (min-width: 768px) and (max-width: 1023px){ .ad-set .costco-carousel-component .carousel{margin-bottom:24px!important}}@media screen and (min-width: 1024px){ .ad-set .costco-carousel-component .carousel{margin-bottom:30px!important}} .ad-set .costco-carousel-component .carousel .owl-dots{bottom:-8px!important}"],changeDetection:0});let i=o;return i})();var zm=["buttonSliderList"];function Gm(i,o){if(i&1&&(g(0,"h2",8),M(1),_()),i&2){let t=p().ngIf;c(),D(" ",t.costco_url.title," ")}}function Vm(i,o){if(i&1&&(g(0,"a",9)(1,"div",10),M(2),_(),b(3,"mat-icon",11),_()),i&2){let t=p().ngIf,e=p();l("href",t.see_all.href,xe),ce("aria-label","See all, "+t.costco_url.title),c(2),re(t.see_all.title),c(),l("fontIcon",e.SipCostcoIcon.CHEVRON_RIGHT)}}function Um(i,o){if(i&1&&(g(0,"a",15),M(1),_()),i&2){let t=p().$implicit,e=p(2).ngIf;me("color",e.button_text_color),l("href",t.button_label_and_url.url,xe)("ngClass",e==null||e.button_background_color==null?null:e.button_background_color.background_gradient_style),c(),D(" ",t.button_label_and_url.title," ")}}function Hm(i,o){if(i&1&&(P(0),u(1,Um,2,5,"a",14),O()),i&2){let t=o.$implicit;c(),l("ngIf",t.button_label_and_url.title)}}function Wm(i,o){if(i&1&&(g(0,"div",12,0),u(2,Hm,2,1,"ng-container",13),_()),i&2){let t=p().ngIf,e=p();Ne("expanded",e.showMore),c(2),l("ngForOf",t.button_set)}}function qm(i,o){if(i&1){let t=U();g(0,"button",16),F("click",function(){L(t);let n=p(2);return B(n.toggleShowMore())}),g(1,"div",17),M(2),_(),b(3,"mat-icon",18),_()}if(i&2){let t=p().ngIf,e=p();ce("aria-expanded",e.showMore?"true":"false")("aria-label",e.showMore?"See Less, "+t.costco_url.title:"See More, "+t.costco_url.title),c(2),re(e.showMore?"See Less":"See More"),c(),l("fontIcon",e.showMore?e.SipCostcoIcon.CHEVRON_UP:e.SipCostcoIcon.CHEVRON_DOWN)}}function Ym(i,o){if(i&1&&(g(0,"div",2)(1,"section",3),u(2,Gm,2,1,"h2",4)(3,Vm,4,4,"a",5),_(),u(4,Wm,3,3,"div",6)(5,qm,4,4,"button",7),_()),i&2){let t=o.ngIf,e=p();c(2),l("ngIf",t.costco_url.title),c(),l("ngIf",t.see_all.href&&t.see_all.title),c(),l("ngIf",t.button_set.length>0),c(),l("ngIf",e.showMoreToggle)}}var Hs=(()=>{let o=class o{constructor(e,n,r){this.component=e,this.cd=n,this.elemRef=r,this.SipCostcoIcon=Qt}ngOnInit(){this.component.data$.pipe($(1),I(e=>{let n=e?.button_background_color,r=e.button_background_color?.background_gradient_style,s={};return r!=="no-background"&&(s={bgColor:n?.background_color?.hex||"",color1:n?.background_gradient_color?.color1?.hex||"",color2:n?.background_gradient_color?.color2?.hex||""}),{colorValues:s}})).subscribe(e=>{this.colorValues=e.colorValues})}ngAfterViewInit(){this.colorValues?.bgColor?Ie(this.elemRef.nativeElement,"--bgColor",this.colorValues?.bgColor):this.colorValues?.color1&&this.colorValues?.color2&&(Ie(this.elemRef.nativeElement,"--color1",this.colorValues?.color1),Ie(this.elemRef.nativeElement,"--color2",this.colorValues?.color2));let e=this.buttonSliderList.nativeElement;e.scrollHeight>e.clientHeight&&(this.showMoreToggle=!0),this.cd.detectChanges()}toggleShowMore(){this.showMore=!this.showMore}};o.\u0275fac=function(n){return new(n||o)(f(K),f(Me),f(Ue))}
vendor: 4,309 bytes, line 56
56,o.\u0275cmp=w({type:o,selectors:[["sip-button-slider"]],viewQuery:function(n,r){if(n&1&&je(zm,5),n&2){let s;ze(s=Ge())&&(r.buttonSliderList=s.first)}},decls:2,vars:3,consts:[["buttonSliderList",""],["class","button-slider",4,"ngIf"],[1,"button-slider"],["aria-labelledby","button-slider-section-heading",1,"heading-section"],["id","button-slider-section-heading","class","heading",4,"ngIf"],["class","see-all","aria-describedby","button-slider-section-heading","role","link","tabindex","0",3,"href",4,"ngIf"],["class","button-slider-list",3,"expanded",4,"ngIf"],["href","javascript:void(0)","class","btn btn-link see-more-btn",3,"click",4,"ngIf"],["id","button-slider-section-heading",1,"heading"],["aria-describedby","button-slider-section-heading","role","link","tabindex","0",1,"see-all",3,"href"],[1,"title"],["aria-hidden","true","aria-label","See All",3,"fontIcon"],[1,"button-slider-list"],[4,"ngFor","ngForOf"],["class","list-button",3,"href","ngClass","color",4,"ngIf"],[1,"list-button",3,"href","ngClass"],["href","javascript:void(0)",1,"btn","btn-link","see-more-btn",3,"click"],[1,"btn-title"],[3,"fontIcon"]],template:function(n,r){n&1&&(u(0,Ym,6,4,"div",1),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[Pe,Te,z,Zt,N],styles:[".button-slider[_ngcontent-%COMP%] .heading-section[_ngcontent-%COMP%]{display:flex;align-items:flex-end;align-self:stretch;padding-bottom:16px}.button-slider[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{color:#333;flex:1 0 0px;font-size:24px;line-height:28px;font-weight:700}.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%]{align-items:center;display:flex;gap:8px}.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;color:#333;font-size:14px;line-height:21px}.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:14px;height:14px}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%]{display:flex;align-items:flex-start;align-content:flex-start;gap:6px;align-self:stretch;flex-wrap:wrap;overflow:hidden;height:3.5rem}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button[_ngcontent-%COMP%]{flex-shrink:0;padding:6px 8px;border-radius:3px;margin:0;background:#fff;color:#333;min-width:50px;font-size:14px;font-weight:400;line-height:21px;box-shadow:0 1px 4px #00000014;border:1px solid #D9D9D9}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button.linear[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(linear,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-linear-gradient(var(--color1),var(--color2));background:-moz-linear-gradient(var(--color1),var(--color2));background:-o-linear-gradient(var(--color1),var(--color2));background:-ms-linear-gradient(var(--color1),var(--color2));background:linear-gradient(var(--color1),var(--color2))}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button.radial[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(radial,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-radial-gradient(var(--color1),var(--color2));background:-moz-radial-gradient(var(--color1),var(--color2));background:-o-radial-gradient(var(--color1),var(--color2));background:-ms-radial-gradient(var(--color1),var(--color2));background:radial-gradient(var(--color1),var(--color2))}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button.solid[_ngcontent-%COMP%]{background-color:var(--bgColor)}.button-slider[_ngcontent-%COMP%] .expanded[_ngcontent-%COMP%]{height:fit-content}.button-slider[_ngcontent-%COMP%] .see-more-btn[_ngcontent-%COMP%]{margin-top:16px;align-items:center;gap:8px;display:inline-flex}.button-slider[_ngcontent-%COMP%] .see-more-btn[_ngcontent-%COMP%] .btn-title[_ngcontent-%COMP%]{font-size:16px;color:#333;line-height:24px}.button-slider[_ngcontent-%COMP%] .see-more-btn[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:20px;height:20px}@media screen and (min-width: 768px) and (max-width: 1023px){.button-slider[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:28px;line-height:32px}
56.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:16px;line-height:24px}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%]{height:4.5rem;overflow:hidden;flex-wrap:wrap}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button[_ngcontent-%COMP%]{padding:8px 12px;min-width:60px;font-size:18px;line-height:24px}.button-slider[_ngcontent-%COMP%] .expanded[_ngcontent-%COMP%]{height:fit-content}}@media screen and (min-width: 1024px){.button-slider[_ngcontent-%COMP%] .heading[_ngcontent-%COMP%]{font-size:42px}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%]{height:4.5rem;overflow:hidden;flex-wrap:wrap}.button-slider[_ngcontent-%COMP%] .button-slider-list[_ngcontent-%COMP%] .list-button[_ngcontent-%COMP%]{padding:8px 12px;min-width:60px;font-size:18px;line-height:23.4px}.button-slider[_ngcontent-%COMP%] .expanded[_ngcontent-%COMP%]{height:fit-content}.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%]{padding-bottom:4px}.button-slider[_ngcontent-%COMP%] .see-all[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:16px;line-height:24px}}"],changeDetection:0});let i=o;return i})();function Km(i,o){if(i&1&&b(0,"sip-image",5),i&2){let t=p().$implicit;l("src",t==null||t.icon==null||t.icon.image==null?null:t.icon.image.url)("alt",t==null||t.icon==null?null:t.icon.alt_text)}}function Qm(i,o){if(i&1){let t=U();g(0,"button",3),F("click",function(){let n=L(t).$implicit,r=p(2);return B(r.navigateTo(n==null?null:n.button_label_and_url.url))}),u(1,Km,1,2,"sip-image",4),M(2),_()}if(i&2){let t=o.$implicit,e=p().ngIf;me("color",e==null||e.button_text_color==null||e.button_text_color.text_color==null?null:e.button_text_color.text_color.hex),c(),l("ngIf",t==null||t.icon==null||t.icon.image==null?null:t.icon.image.url),c(),D(" ",t==null||t.button_label_and_url==null?null:t.button_label_and_url.title," ")}}function Zm(i,o){if(i&1&&(g(0,"div",1),m(1,"async"),u(2,Qm,3,4,"button",2),_()),i&2){let t=o.ngIf,e=p();l("ngClass",C(1,2,e.buttonClass$)),c(2),l("ngForOf",t==null?null:t.button_set)}}var Ws=(()=>{let o=class o{constructor(e,n,r,s){this.component=e,this.router=n,this.elemRef=r,this.winRef=s,this.buttonClass$=this.component.data$.pipe($(1),I(a=>[a?.corner_radius?a?.corner_radius:"",a?.button_text_color?.background_gradient_style?a?.button_text_color?.background_gradient_style:"",a?.button_set?.length>2?"flex-col":"",a?.button_set?.length===3?"three-col":""]),G())}ngOnInit(){this.component.data$.pipe($(1),I(e=>{let n=e?.button_text_color,r=e?.button_text_color?.background_gradient_style,s={};return r!=="no-background"&&(s={bgColor:n?.background_color?.hex||"",color1:n?.background_gradient_color?.color1?.hex||"",color2:n?.background_gradient_color?.color2?.hex||""}),{colorValues:s}})).subscribe(e=>{this.colorValues=e.colorValues})}ngAfterViewInit(){this.colorValues?.bgColor?Ie(this.elemRef.nativeElement,"--bgColor",this.colorValues?.bgColor):this.colorValues?.color1&&this.colorValues?.color2&&(Ie(this.elemRef.nativeElement,"--color1",this.colorValues?.color1),Ie(this.elemRef.nativeElement,"--color2",this.colorValues?.color2))}navigateTo(e){let n=this.winRef.nativeWindow;return e&&e.includes("http")&&n?(n.location.href=e,!0):this.router.navigateByUrl(e)}};o.\u0275fac=function(n){return new(n||o)(f(K),f(_e),f(Ue),f(ot))},o.\u0275cmp=w({type:o,selectors:[["sip-icon-text-button"]],decls:2,vars:3,consts:[["class","icon-text-button",3,"ngClass",4,"ngIf"],[1,"icon-text-button",3,"ngClass"],["class","icon-button",3,"color","click",4,"ngFor","ngForOf"],[1,"icon-button",3,"click"],["class","icon-image",3,"src","alt",4,"ngIf"],[1,"icon-image",3,"src","alt"]],template:function(n,r){n&1&&(u(0,Zm,3,4,"div",0),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[Pe,Te,z,yi,N],styles:[".icon-text-button[_ngcontent-%COMP%]{display:flex;gap:16px;flex-wrap:wrap}.icon-text-button[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{display:flex;min-height:50px;padding:16px 24px;align-items:center;flex:1 0 40%;border-radius:10px;text-align:center;flex-direction:column;border:0px;color:#fff;background:transparent;font-size:16px;line-height:130%;font-weight:400}.icon-text-button[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%] > .icon-image{height:auto;max-width:46px;margin-bottom:4px}.icon-text-button[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%] > .icon-image img{height:auto;max-width:46px}.icon-text-button.solid[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{background-color:var(--bgColor)}.icon-text-button.linear[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(linear,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-linear-gradient(var(--color1),var(--color2));background:-moz-linear-gradient(var(--color1),var(--color2));background:-o-linear-gradient(var(--color1),var(--color2));background:-ms-linear-gradient(var(--color1),var(--color2));background:linear-gradient(var(--color1),var(--color2))}.icon-text-button.radial[_ngcontent-%COMP%] .icon-button[_ngcontent-%COMP%]{background-color:var(--color2);background:-webkit-gradient(radial,left top,left bottom,from(var(--color1)),to(var(--color2)));background:-webkit-radial-gradient(var(--color1),var(--color2));background:-moz-radial-gradient(var(--color1),var(--color2));background:-o-radial-gradient(var(--color1),var(--color2));background:-ms-radial-gradient(var(--color1),var(--color2));background:radial-gradient(var(--color1),var(--color2))}.icon-text-button.three-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{padding:16px 0;flex:1 0 0!important}.icon-text-button.flex-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{flex-direction:column}.icon-text-button.flex-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%] > .icon-image{margin-right:0;margin-bottom:10px}@media screen and (min-width: 768px) and (max-width: 1023px){.icon-text-button[_ngcontent-%COMP%]{gap:16px}.icon-text-button[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{padding:12px 24px;flex-direction:row;justify-content:center;flex:1 0 20%;font-size:18px;line-height:130%;font-weight:400}.icon-text-button[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%] > .icon-image{margin-right:8px;margin-bottom:0}}@media screen and (min-width: 1024px){.icon-text-button[_ngcontent-%COMP%]{gap:24px}.icon-text-button[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{padding:12px 24px;justify-content:center;flex-direction:row;flex:1 1 0;font-size:18px;line-height:130%;font-weight:400}.icon-text-button[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%] > .icon-image{margin-right:8px;margin-bottom:0}.icon-text-button.round_corner[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{border-radius:50px}.icon-text-button.three-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{padding:16px 24px}.icon-text-button.flex-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%]{flex-direction:row}.icon-text-button.flex-col[_ngcontent-%COMP%] button.icon-button[_ngcontent-%COMP%] > .icon-image{margin-right:8px;margin-bottom:0}}"],changeDetection:0});let i=o;return i})();function Xm(i,o){if(i&1&&(g(0,"div"),b(1,"div",1),m(2,"safeHtml"),_()),i&2){let t=p();c(),l("innerHTML",C(2,1,t.html),W)}}var qs=(()=>{let o=class o{constructor(e,n){this.component=e,this.document=n}render(){this.component.data$.pipe($(1),I(e=>{let n=e?.html,r=e?.javascript,s=e?.css_styles;return{html:n,javascript:r,cssStyles:s}})).subscribe(e=>{this.html=e.html,this.cssStyles=e.cssStyles,this.cssStyles&&(this.html=`<style>${this.cssStyles}</style>${this.html}`),this.javascript=e.javascript,this.injectJavaScript()})}ngOnInit(){this.render()}injectJavaScript(){let e=this.document.createElement("script");e.text=this.javascript,this.document.body.appendChild(e)}};o.\u0275fac=function(n){return new(n||o)(f(K),f(We))}
56,o.\u0275cmp=w({type:o,selectors:[["sip-html-render-component"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"innerHTML"]],template:function(n,r){n&1&&(u(0,Xm,3,3,"div",0),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[z,N,Ke],encapsulation:2,changeDetection:0});let i=o;return i})();var to={SimpleList:"SimpleList",NavSimpleList:"NavSimpleList"};var Jm=i=>({linkData:i,layout:"inline"}),eu=i=>({linkData:i,layout:"inlineNav"}),tu=(i,o)=>({linkHeader:i,headerStyle:o}),nu=i=>({"column-count":i}),iu=i=>({systemLinkItem:i}),ou=i=>({linkItem:i});function ru(i,o){i&1&&ve(0)}function su(i,o){if(i&1&&(g(0,"div",5),u(1,ru,1,0,"ng-container",6),_()),i&2){let t=p(),e=k(3);c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(2,Jm,t.linkData))}}function au(i,o){i&1&&ve(0)}function lu(i,o){if(i&1&&(g(0,"nav",5),u(1,au,1,0,"ng-container",6),_()),i&2){let t=p(),e=k(3);ce("aria-label",t.linkData==null?null:t.linkData.navigation_label),c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(3,eu,t.linkData))}}function cu(i,o){i&1&&ve(0)}function pu(i,o){if(i&1&&(g(0,"div",9),u(1,cu,1,0,"ng-container",6),_()),i&2){let t=p().linkData;p();let e=k(7);c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",gt(2,tu,t==null?null:t.listheader,t==null?null:t.list_header_style))}}function du(i,o){i&1&&ve(0)}function mu(i,o){if(i&1&&(P(0),u(1,du,1,0,"ng-container",6),O()),i&2){let t=p().$implicit,e=p(3),n=k(9);c(),l("ngTemplateOutlet",n)("ngTemplateOutletContext",X(2,iu,e.normalizeCountryLangSelectorData(t==null?null:t.system_defined_link)))}}function uu(i,o){i&1&&ve(0)}function gu(i,o){if(i&1&&(P(0),u(1,uu,1,0,"ng-container",6),O()),i&2){let t=p().$implicit;p(3);let e=k(5);c(),l("ngTemplateOutlet",e)("ngTemplateOutletContext",X(2,ou,t==null?null:t.user_defined_link))}}function _u(i,o){if(i&1&&(g(0,"li"),u(1,mu,2,4,"ng-container",12)(2,gu,2,4,"ng-container",12),_()),i&2){let t=o.$implicit;c(),l("ngIf",t==null?null:t.system_defined_link),c(),l("ngIf",t==null?null:t.user_defined_link)}}function hu(i,o){if(i&1&&(g(0,"ul",10),u(1,_u,3,2,"li",11),_()),i&2){let t=p(),e=t.linkData,n=t.layout,r=p();l("ngClass",n)("ngStyle",X(3,nu,r.columnCount?r.columnCount:0)),c(),l("ngForOf",e==null?null:e.links_composer)}}function fu(i,o){if(i&1&&u(0,pu,2,5,"div",7)(1,hu,2,5,"ul",8),i&2){let t=o.linkData;l("ngIf",t==null||t.listheader==null?null:t.listheader.title),c(),l("ngIf",t)}}function Cu(i,o){if(i&1&&(g(0,"div",17),b(1,"img",18),_()),i&2){let t=o.ngIf,e=p(2).linkItem;c(),l("src",t==null?null:t.url,xe)("alt",e==null?null:e.link_alt_text)}}function xu(i,o){if(i&1&&(g(0,"a",14),u(1,Cu,2,2,"div",15),g(2,"div",16),M(3),_()()),i&2){let t=p().linkItem;l("ngClass",t==null?null:t.link_style),ce("href",t==null||t.link==null?null:t.link.url,xe)("target",t==null?null:t.target_new_same_window_)("aria-label",t!=null&&t.link_alt_text?t==null?null:t.link_alt_text:t==null||t.link==null?null:t.link.title),c(),l("ngIf",t==null?null:t.icon),c(),l("ngClass",!(t==null||t.icon==null)&&t.icon.url&&(!(t==null||t.link==null)&&t.link.title)?"text-padding":""),c(),D(" ",t==null||t.link==null?null:t.link.title," ")}}function vu(i,o){if(i&1&&u(0,xu,4,7,"a",13),i&2){let t=o.linkItem;l("ngIf",t)}}function bu(i,o){if(i&1&&(P(0),M(1),O()),i&2){let t=p().linkHeader;c(),D(" ",t==null?null:t.title," ")}}function yu(i,o){if(i&1&&(g(0,"a",21)(1,"span",22),M(2),_()()),i&2){let t=p().linkHeader;ce("href",t==null?null:t.url,xe)("aria-label",t==null?null:t.title),c(2),D("",t==null?null:t.title," ")}}function Su(i,o){if(i&1&&(g(0,"h2",19),u(1,bu,2,1,"ng-container",12)(2,yu,3,3,"a",20),_()),i&2){let t=o.linkHeader,e=o.headerStyle;l("ngClass",e||""),c(),l("ngIf",!(t!=null&&t.url)),c(),l("ngIf",t==null?null:t.url)}}function Pu(i,o){if(i&1&&(P(0),b(1,"sip-cs-dynamic-component",23),O()),i&2){let t=p().systemLinkItem;c(),l("componentInfo",t)}}function Ou(i,o){if(i&1&&(P(0),b(1,"sip-language-currency",24),O()),i&2){let t=p().systemLinkItem;c(),l("csLanguages",t.languagesList)("csCurrentLanguage",t.currentLang)}}function Mu(i,o){if(i&1&&u(0,Pu,2,1,"ng-container",12)(1,Ou,2,2,"ng-container",12),i&2){let t=o.systemLinkItem;l("ngIf",(t==null?null:t.countries_flag)&&t.selectorType==="country"),c(),l("ngIf",t&&t.selectorType==="lang")}}var Ys=(()=>{let o=class o{constructor(){this.variant=to.SimpleList,this.linksPerColumn=0,this.LinkVariants=to}ngOnInit(){this.linkData?.links_composer?.length&&this.linksPerColumn&&(this.columnCount=Math.round(this.linkData?.links_composer?.length/this.linksPerColumn))}normalizeCountryLangSelectorData(e){if(!e.system_link?.length)return null;let n=e.system_link.filter(s=>s.link_type==="location-selector"),r=e.system_link.filter(s=>s.link_type==="language-selector");if(r.length){let s=r[0],a=s.active_state?.active_state_link?.href,d=a?a.replace("/",""):"",h=[];return s?.active_state?.linked_list_simple_ref?.forEach(x=>{x?.links_composer?.forEach(y=>{if(y?.user_defined_link){let E=y?.user_defined_link?.link?.url,H=E?E.replace("/",""):"",T={active:!0,name:y?.user_defined_link?.link.title,isocode:H,nativeName:y?.user_defined_link?.link.title};h.push(T)}})}),{selectorType:"lang",languagesList:h,currentLang:d}}else if(n.length){let s=n[0];if(!s)return null;let a;s?.active_state?.linked_list_simple_ref?.length&&(a=s.active_state.linked_list_simple_ref[0]?.listheader?.title);let d={countryName:s?.active_state?.active_state_link?.title,urlLink:s?.active_state?.active_state_link?.href,headline:a??""},h={};return s?.active_state?.linked_list_simple_ref?.forEach(v=>{v?.links_composer?.forEach(E=>{E?.user_defined_link&&(h[E.user_defined_link.link.title]={countryName:E.user_defined_link.link.title,urlLink:E.user_defined_link.link.url,name:E.user_defined_link.link.title,target:E.user_defined_link.target_new_s
56ame_window_})})}),{countries_flag:{name:s?.title,myCountry:d,countryName:s?.title,otherCountries:h,description:s?.active_state?.properties?.[0]?.description},selectorType:"country"}}return null}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=w({type:o,selectors:[["sip-link-list"]],inputs:{linkData:"linkData",variant:"variant",linksPerColumn:"linksPerColumn"},decls:10,vars:2,consts:[["list",""],["link",""],["linkHeader",""],["langCountrySelector",""],["class","list-container",4,"ngIf"],[1,"list-container"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","link-list-header",4,"ngIf"],["class","link-list","role","list",3,"ngClass","ngStyle",4,"ngIf"],[1,"link-list-header"],["role","list",1,"link-list",3,"ngClass","ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","link",3,"ngClass",4,"ngIf"],[1,"link",3,"ngClass"],["class","icon",4,"ngIf"],["aria-hidden","true",3,"ngClass"],[1,"icon"],[3,"src","alt"],[3,"ngClass"],["target","_self",4,"ngIf"],["target","_self"],["aria-hidden","true"],[3,"componentInfo"],[3,"csLanguages","csCurrentLanguage"]],template:function(n,r){n&1&&u(0,su,2,4,"div",4)(1,lu,2,5,"nav",4)(2,fu,2,2,"ng-template",null,0,A)(4,vu,1,1,"ng-template",null,1,A)(6,Su,3,3,"ng-template",null,2,A)(8,Mu,2,2,"ng-template",null,3,A),n&2&&(l("ngIf",r.variant===r.LinkVariants.SimpleList),c(),l("ngIf",r.variant===r.LinkVariants.NavSimpleList))},styles:[".list-container[_ngcontent-%COMP%] .link-list-header[_ngcontent-%COMP%]{padding:0}.list-container[_ngcontent-%COMP%] .link-list-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#333;font-size:18px;font-style:normal;font-weight:400;line-height:133.333%}.list-container[_ngcontent-%COMP%] .link-list-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit}.list-container[_ngcontent-%COMP%] .link-list-header[_ngcontent-%COMP%] h2.bold[_ngcontent-%COMP%]{font-weight:700}.list-container[_ngcontent-%COMP%] .link-list-header[_ngcontent-%COMP%] h2.italics[_ngcontent-%COMP%]{font-style:italic}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%]{padding:12px 0 0;row-gap:16px}@media screen and (min-width: 768px) and (max-width: 1023px){.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%]{padding:8px 0 0!important;row-gap:12px!important}}.list-container[_ngcontent-%COMP%] .link-list.inline[_ngcontent-%COMP%]{color:#005dab;font-size:18px;font-style:normal;font-weight:400;line-height:133.333%}.list-container[_ngcontent-%COMP%] .link-list.inline[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]{line-height:200%}.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%]{display:flex;color:#005dab;flex-wrap:nowrap;justify-content:flex-end;align-items:center;text-wrap-mode:nowrap}.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-right:32px}@media screen and (min-width: 768px) and (max-width: 1023px){.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding-right:16px}}.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{padding-right:0}.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .language-selector-main, .list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .country-selector-main{font-size:14px!important;font-weight:400;line-height:10px!important}.list-container[_ngcontent-%COMP%] .link-list.inlineNav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .country-flags__label{color:#3d3d3d}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]{font-size:14px!important;font-weight:400;line-height:20px;color:inherit;display:flex;align-items:center}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%] a.link.bold[_ngcontent-%COMP%]{font-weight:700}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%] a.link.italics[_ngcontent-%COMP%]{font-style:italic}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;max-width:24px;align-items:center}.list-container[_ngcontent-%COMP%] .link-list[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%] .text-padding[_ngcontent-%COMP%]{padding-left:6px}"],changeDetection:0});let i=o;return i})();function ku(i,o){if(i&1&&(g(0,"li")(1,"a",5),M(2),_()()),i&2){let t=o.$implicit;c(),l("sipRouterLink",t.url)("title",t.linkName),c(),re(t.linkName)}}function wu(i,o){if(i&1&&(g(0,"ul",3),u(1,ku,3,3,"li",4),m(2,"async"),_()),i&2){let t=p();c(),l("ngForOf",C(2,1,t.$links))}}function Tu(i,o){if(i&1&&b(0,"sip-link-list",7),i&2){let t,e=o.$implicit;l("ngClass",(t=e==null||e.device_type==null?null:e.device_type.toLowerCase())!==null&&t!==void 0?t:"")("linkData",e==null?null:e.menu_list_reference[0])}}function Au(i,o){if(i&1&&(u(0,Tu,1,2,"sip-link-list",6),m(1,"async")),i&2){let t=p();l("ngForOf",C(1,1,t.component.data$))}}var Ks=(()=>{let o=class o{constructor(e){this.component=e,this.$links=this.component.data$.pipe(zn("linksList"),I(n=>{let r=n.linksList||{};return Array.from(Object.values(r))})),this.$IsContentStackMenuItems=this.component.data$.pipe(I((n,r)=>{if(n&&n[r]&&"device_type"in n[r])return!0}),$(1))}};o.\u0275fac=function(n){return new(n||o)(f(K))},o.\u0275cmp=w({type:o,selectors:[["sip-responsive-header"]],hostAttrs:[1,"top-header-wrapper-item"],decls:5,vars:7,consts:[["showUtilityMenu",""],["class","d-flex",4,"ngIf","ngIfElse"],[3,"ngIf"],[1,"d-flex"],[4,"ngFor","ngForOf"],[3,"sipRouterLink","title"],["variant","NavSimpleList","class","utility-menu",3,"ngClass","linkData",4,"ngFor","ngForOf"],["variant","NavSimpleList",1,"utility-menu",3,"ngClass","linkData"]],template:function(n,r){if(n&1&&(u(0,wu,3,3,"ul",1),m(1,"async"),u(2,Au,2,3,"ng-template",2,0,A),m(4,"async")),n&2){let s=k(3);l("ngIf",C(1,3,r.$links))("ngIfElse",s),c(2),l("ngIf",C(4,5,r.$IsContentStackMenuItems))}},dependencies:[Pe,Te,z,ui,Ys,N],styles:[".utility-menu.tablet[_ngcontent-%COMP%], .utility-menu.desktop[_ngcontent-%COMP%], .utility-menu.default[_ngcontent-%COMP%]{display:none}@media screen and (min-width: 768px) and (max-width: 1023px){.utility-menu.tablet[_ngcontent-%COMP%]{display:block}.utility-menu.desktop[_ngcontent-%COMP%]{display:none}.utility-menu.default[_ngcontent-%COMP%]{display:block}}@media screen and (min-width: 1024px){.utility-menu.tablet[_ngcontent-%COMP%]{display:none}.utility-menu.desktop[_ngcontent-%COMP%], .utility-menu.default[_ngcontent-%COMP%]{display:block}}"],changeDetection:0});let i=o;return i})();function Ru(i,o){if(i&1&&(g(0,"div"),b(1,"iframe",1),_()),i&2){let t=p();c(),l("src",t.source,bo)("title",t.title)("width",t.width)("height",t.height)}}var Qs=(()=>{let o=class o{constructor(e,n){this.component=e,this.sanitizer=n}ngOnInit(){this.component.data$.pipe($(1),I(e=>{let n=e?.source,r=e?.title,s=e?.width,a=e?.height;return{source:n,title:r,width:s,height:a}})).subscribe(e=>{this.source=this.sanitizer.bypassSecurityTrustResourceUrl(e.source),this.title=e.title,this.width=e.width,this.height=e.height})}};o.\u0275fac=function(n){return new(n||o)(f(K),f(Wn))},o.\u0275cmp=w({type:o,selectors:[["sip-iframe"]],decls:2,vars:3,consts:[[4,"ngIf"],["max-width","100%","max-height","100%","allowfullscreen","",3,"src","title","width","height"]],template:function(n,r){if(n&1&&(u(0,Ru,2,4,"div",0),m(1,"async")),n&2){let s;l("ngIf",(s=C(1,1,r.component.data$))==null?null:s.source)}},dependencies:[z,N],styles:["iframe[_ngcontent-%COMP%]{display:block;border:none;width:100%;overflow:hidden}"],changeDetection:0});let i=o;return i})();var Du=i=>({0:i});function Lu(i,o){if(i&1&&(g(0,"a",11)(1,"span",12),M(2),_()()),i&2){let t=p().$implicit;l("href",t.urlLink,xe)("target",t.target?t.target:"_self"),c(2),re(t.countryName)}}function Bu(i,o){if(i&1&&(g(0,"span",12),M(1),_()),i&2){let t=p().$implicit;c(),re(t.countryName)}}function Fu(i,o){if(i&1&&(g(0,"li"),u(1,Lu,3,3,"a",10)(2,Bu,2,1,"ng-template",null,0,A),_()),i&2){let t=o.$implicit,e=k(3);c(),l("ngIf",t.urlLink&&t.urlLink!=="#")("ngIfElse",e)}}function $u(i,o){if(i&1&&(g(0,"div",2)(1,"button",3),m(2,"cxTranslate"),m(3,"async"),M(4),b(5,"span",4),_(),g(6,"div",5),b(7,"span",6),g(8,"h3",7),M(9),m(10,"cxTranslate"),_(),g(11,"ul",8),u(12,Fu,4,2,"li",9),m(13,"async"),_()()()),i&2){let t=o.ngIf,e=p();l("sip-aria-mouse-events","country-select-dropdown"),c(),l("sip-aria-controls","country-select-dropdown"),ce("aria-label",q(2,8,"text.countrySelector.ariaLabel",X(17,Du,t.countryName)))("aria-description",C(3,11,e.$description)),c(3),D(" ",t.countryName," "),c(2),l("sip-aria-hidden","country-select-dropdown"),c(3),D(" ",t.headline?t.headline:C(10,13,"text.header.select.country.and.region.label")," "),c(3),l("ngForOf",C(13,15,e.$countries))}}var Zs=(()=>{let o=class o{constructor(e){this.component=e,this.$expanded=new ge(!1),this.$countries=this.component.data$.pipe(zn("otherCountries"),I(n=>Array.from(Object.values(n.otherCountries)))),this.$myCountry=this.component.data$.pipe(I(n=>n.myCountry)),this.$description=this.component.data$.pipe(I(n=>n.description))}};o.\u0275fac=function(n){return new(n||o)(f(K))},o.\u0275cmp=w({type:o,selectors:[["sip-countries-flags"]],hostAttrs:[1,"top-header-wrapper-item"],decls:2,vars:3,consts:[["countryNameOnly",""],["class","top-header country-flags-component",3,"sip-aria-mouse-events",4,"ngIf"],[1,"top-header","country-flags-component",3,"sip-aria-mouse-events"],["id","languageMenuTrigger","aria-haspopup","true",1,"btn","btn-link","country-selector-main","
56js-country-selector-main",3,"sip-aria-controls"],["role","presentation",1,"js-country-selector","costco-icons","costco-icon-down-chevron"],["id","country-select-dropdown","aria-labelledby","flag-label",1,"country-select-dropdown__wrapper",3,"sip-aria-hidden"],["role","presentation",1,"glyphicon","glyphicon-triangle-top"],["id","flag-label",1,"country-flags__label","no-flag"],[1,"country-select-dropdown"],[4,"ngFor","ngForOf"],["class","js-country-selector",3,"href","target",4,"ngIf","ngIfElse"],[1,"js-country-selector",3,"href","target"],[1,"text-body","country-name","notranslate"]],template:function(n,r){n&1&&(u(0,$u,14,19,"div",1),m(1,"async")),n&2&&l("ngIf",C(1,1,r.$myCountry))},dependencies:[Te,z,Pr,Or,Mr,N,Ee],styles:[".country-selector-main[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:0});let i=o;return i})();var Nu=["container"],ju=["cookieConsentModal"];function zu(i,o){if(i&1){let t=U();g(0,"div",3,1),m(2,"async"),g(3,"div",4),b(4,"div",5),m(5,"cxTranslate"),m(6,"safeHtml"),g(7,"div",6)(8,"button",7),F("click",function(){L(t);let n=p();return B(n.acceptAction())}),M(9),m(10,"cxTranslate"),_(),g(11,"button",8),F("click",function(){L(t);let n=p(),r=k(3);return B(n.reviewAction(r))}),M(12),m(13,"cxTranslate"),_(),g(14,"button",9),F("click",function(){L(t);let n=p();return B(n.rejectAction())}),M(15),m(16,"cxTranslate"),_()()()()}if(i&2){let t=o.ngIf,e=p();Ne("invisible",!C(2,6,e.display$)),c(4),l("innerHTML",C(6,10,t.isContentStack?t.messageContent.footerContent:C(5,8,"text.gdpr.footer.content")),W),c(5),D(" ",t.isContentStack?t.messageContent.buttonAccept:C(10,12,"text.gdpr.button.accept")," "),c(3),D(" ",t.isContentStack?t.messageContent.buttonReview:C(13,14,"text.gdpr.button.review")," "),c(3),D(" ",t.isContentStack?t.messageContent.buttonReject:C(16,16,"text.gdpr.button.reject")," ")}}function Gu(i,o){if(i&1&&(g(0,"div",24)(1,"div",14)(2,"div",25),M(3),m(4,"cxTranslate"),_()(),b(5,"hr"),_()),i&2){let t=p().ngIf;c(3),D(" ",t.isContentStack?t.messageContent.modalMainCookieDeletion:C(4,1,"text.gdpr.modal.main.cookie.deletion")," ")}}function Vu(i,o){if(i&1){let t=U();g(0,"sip-modal-dialog",11),m(1,"cxTranslate"),g(2,"div",12),b(3,"div",13),m(4,"cxTranslate"),b(5,"hr"),g(6,"div",14)(7,"div",15),b(8,"sip-checkbox",16),m(9,"cxTranslate"),_(),g(10,"div",17),M(11),m(12,"cxTranslate"),_()(),b(13,"hr"),g(14,"div",14)(15,"div",15)(16,"sip-checkbox",18),m(17,"cxTranslate"),F("handleChange",function(n){L(t);let r=p(2);return B(r.analyticsCookieCheckboxChange(n))}),_()(),g(18,"div",17),M(19),m(20,"cxTranslate"),_()(),b(21,"hr"),g(22,"div",14)(23,"div",15)(24,"sip-checkbox",19),m(25,"cxTranslate"),F("handleChange",function(n){L(t);let r=p(2);return B(r.preferencesCookieCheckboxChange(n))}),_()(),g(26,"div",17)(27,"span"),M(28),m(29,"cxTranslate"),_(),M(30,"\xA0 "),g(31,"span",20),M(32),m(33,"cxTranslate"),_()()(),b(34,"hr"),u(35,Gu,6,3,"div",21),_(),P(36,22),g(37,"sip-modal-actions",23),m(38,"cxTranslate"),m(39,"cxTranslate"),F("cancelled",function(){L(t);let n=p(2);return B(n.modal.dismiss("review"))})("confirmed",function(){L(t);let n=p(2);return B(n.modal.close({analyticsEnabled:n.preferences.analyticsEnabled,preferencesEnabled:n.preferences.preferencesEnabled}))}),_(),O(),_()}if(i&2){let t=o.ngIf,e=p(2);l("modalTitle",t.isContentStack?t.messageContent.modalHeader:C(1,15,"text.gdpr.modal.header"))("hideDismiss",!0),c(3),l("innerHTML",t.isContentStack?t.messageContent.modalMainContent:C(4,17,"text.gdpr.modal.main.content"),W),c(5),l("label",t.isContentStack?t.messageContent.modalRequiredCookiesName:C(9,19,"text.gdpr.modal.required.cookies.name")),c(3),D(" ",t.isContentStack?t.messageContent.modalRequiredCookiesContent:C(12,21,"text.gdpr.modal.required.cookies.content")," "),c(5),l("checked",e.preferences.analyticsEnabled)("label",t.isContentStack?t.messageContent.modalAnalyticsCookiesName:C(17,23,"text.gdpr.modal.analytics.cookies.name")),c(3),D(" ",t.isContentStack?t.messageContent.modalAnalyticsCookiesContent:C(20,25,"text.gdpr.modal.analytics.cookies.content")," "),c(5),l("checked",e.preferences.preferencesEnabled)("label",t.isContentStack?t.messageContent.modalPreferencesCookiesName:C(25,27,"text.gdpr.modal.preferences.cookies.name")),c(4),re(t.isContentStack?t.messageContent.modalPreferencesCookiesContent:C(29,29,"text.gdpr.modal.preferences.cookies.content")),c(4),re(t.isContentStack?t.messageContent.modalPreferencesCookiesBoldContent:C(33,31,"text.gdpr.modal.preferences.cookies.boldcontent")),c(3),l("ngIf",e.consentWithdrawn),c(2),l("cancelText",t.isContentStack?t.messageContent.modalReviewCookiePolicyButton:C(38,33,"text.gdpr.modal.review.cookie.policy.button"))("confirmText",t.isContentStack?t.messageContent.modalSaveButton:C(39,35,"text.gdpr.modal.save.button"))}}function Uu(i,o){if(i&1&&(u(0,Vu,40,37,"sip-modal-dialog",10),m(1,"async")),i&2){let t=p();l("ngIf",C(1,1,t.component.data$))}}var Xs=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y){this.component=e,this.cookieService=n,this.windowRef=r,this.cdr=s,this.document=a,this.sipSiteService=d,this.modalService=h,this.ngZone=x,this.platformId=v,this.sipRememberMeService=y,this.display$=new ge(!1),this.cookieName="UserPreferences",this.preferences={},this.subscriptions=new Se,this.ANGULAR_COMPONENT_REFERNCE="angularComponentReference",this.PREFERENCES="preferences",this.scriptElementName="script",this.consentWithdrawn=!1}ngOnInit(){if(pe(this.platformId))window[this.ANGULAR_COMPONENT_REFERNCE]={component:this,zone:this.ngZone,loadAngularFunction:()=>this.reviewAction(this.cookieConsentModal)};else return;this.readPreferencesFromCookie(),this.sipSiteService.getSite().subscribe(e=>{this.cookieConsentEnforcement=e.stores[0].cookieConsentEnforcement,this.cookieExpiredDays=e.stores[0].cookieExpiredDays,this.cookiePolicyUrl=e.stores[0].cookiePolicyUrl,this.cookieConsentEnforcement?this.applyPreferences():(this.preferences.visited=!0,this.preferences.analyticsEnabled=!0,this.preferences.preferencesEnabled=!0,this.saveCookie())}).unsubscribe(),this.injectCookieModalClickScript()}ngOnDestroy(){this.subscriptions.unsubscribe()}createScriptElement(e){return this.document.createElement(e)}injectCookieModalClickScript(){if(this.cookieConsentEnforcement){let e=this.createScriptElement(this.scriptElementName);e.text=` 57 function docReady(fn) { 58 // see if DOM is already available 59 if (document.readyState === "complete" || document.readyState === "interactive") { 60 // call on next available tick 61 setTimeout(fn, 1); 62 } else { 63 document.addEventListener("DOMContentLoaded", fn); 64 } 65 } 66 67 docReady(function() { 68 let cookieSettingsLink = document.getElementById('cookieSettingsLink'); 69 let loginCookieSettingsLink = document.getElementById('loginCookieSettingsLink'); 70 if (cookieSettingsLink || loginCookieSettingsLink) { 71 cookieSettingsLink.onclick = callAngularFunction; 72 loginCookieSettingsLink.onclick = callAngularFunction; 73 } 74 }) 75 76 function callAngularFunction() { 77 if (window.angularComponentReference !== undefined) { 78 window.angularComponentReference.zone.run(() => { 79 window.angularComponentReference.loadAngularFunction(); 80 }); 81 } 82 } 83 `,this.document.head.appendChild(e)}}acceptAction(){this.preferences.analyticsEnabled=!0,this.preferences.visited=!0,this.preferences.preferencesEnabled=!0,this.saveCookie()}reviewAction(e){this.closeComponent(),this.modal=this.modalService.open(e,{panelClass:"gdpr-modal-override"}),this.modal.result.then(n=>{this.preferences.preferencesEnabled&&!n.preferencesEnabled&&this.sipRememberMeService.expireRememberMeCookie(),this.preferences.analyticsEnabled=n.analyticsEnabled,this.preferences.preferencesEnabled=n.preferencesEnabled,this.preferences.visited=!0,this.saveCookie()},n=>{this.windowRef.document.location.href=this.cookiePolicyUrl})}rejectAction(){this.preferences.analyticsEnabled=!1,this.preferences.visited=!0,this.saveCookie()}closeComponent(){this.display$.next(!1),this.cdr.detectChanges()}openComponent(){this.display$.next(!0),this.cdr.detectChanges()}readPreferencesFromCookie(){this.cookieService.check(this.cookieName)&&(this.preferences=this.getGDPRCookie()),this.windowRef.nativeWindow&&(this.windowRef.nativeWindow[this.PREFERENCES]=this.preferences)}getGDPRCookie(){try{let e=this.cookieService.get(this.cookieName);return{visited:e.indexOf("visited")>=0,analyticsEnabled:e.indexOf("analyticsEnabled")>=0,preferencesEnabled:e.indexOf("preferencesEnabled")>=0}}catch{return{}}}applyPreferences(){let e=this.cookieService.get(this.cookieName);this.preferences.visited===void 0||this.preferences.visited===!1||e.split("-").length===2?this.openComponent():this.closeComponent()}saveCookie(){let e=(this.preferences.visited?"visited":"")+"-"+(this.preferences.analyticsEnabled?"analyticsEnabled":"")+"-"+(this.preferences.preferencesEnabled?"preferencesEnabled":"");this.cookieService.set(this.cookieName,e,Number(this.cookieExpiredDays),"/",void 0,!0,"Strict"),this.closeComponent(),this.sipRememberMeService.showRememberMeValue(!0)}analyticsCookieCheckboxChange(e){this.preferences.analyticsEnabled=e,this.consentWithdrawn=!e&&this.preferences.visited}preferencesCookieCheckboxChange(e){this.preferences.preferencesEnabled=e,this.consentWithdrawn=!e&&this.preferences.visited}};o.\u0275fac=function(n){return new(n||o)(f(K),f(qe),f(ot),f(Me),f(We),f(St),f(be),f(wt),f(le),f(Tr))}
83,o.\u0275cmp=w({type:o,selectors:[["sip-sip-gdpr-options-component"]],viewQuery:function(n,r){if(n&1&&(je(Nu,5),je(ju,5)),n&2){let s;ze(s=Ge())&&(r.containerElement=s.first),ze(s=Ge())&&(r.cookieConsentModal=s.first)}},decls:4,vars:3,consts:[["cookieConsentModal",""],["container",""],["id","gdprMessage","class","gdpr-message-item",3,"invisible",4,"ngIf"],["id","gdprMessage",1,"gdpr-message-item"],[1,"container","gdpr-message-container"],[1,"col-md-10","col-sm-8","col-xs-12","gdpr-message-item_content",3,"innerHTML"],["role","group",1,"col-md-2","col-sm-4","col-xs-12","gdpr-buttons"],["type","button",1,"btn","btn-primary","gdpr-accept",3,"click"],["type","button",1,"btn","btn-secondary","gdpr-review",3,"click"],["type","button",1,"btn","btn-secondary","gdpr-reject",3,"click"],[3,"modalTitle","hideDismiss",4,"ngIf"],[3,"modalTitle","hideDismiss"],[1,"gdpr-modal"],[1,"gdpr-modal-content",3,"innerHTML"],[1,"gdpr-modal-container"],[1,"gdpr-modal-left","gdpr-modal-left-text"],["idKey","requiredCookieCheckbox","disabled","","checked","",3,"label"],[1,"gdpr-modal-right"],["idKey","essentialCookieCheckbox",3,"handleChange","checked","label"],["idKey","preferencesCookieCheckbox",3,"handleChange","checked","label"],[1,"gdpr-modal-right-emphasized"],["id","withdrawConsentContainer",4,"ngIf"],["footer",""],[3,"cancelled","confirmed","cancelText","confirmText"],["id","withdrawConsentContainer"],[1,"gdpr-modal-content","cookie-consent-withdrawn-message"]],template:function(n,r){n&1&&(u(0,zu,17,18,"div",2),m(1,"async"),u(2,Uu,2,3,"ng-template",null,0,A)),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[z,lr,Ye,at,N,Ke,Ee],styles:["#gdprMessage[_ngcontent-%COMP%]{display:block}.gdpr-message-item[_ngcontent-%COMP%]{background-color:#eff7fb;width:100vw;margin-bottom:-126px;padding:12px 12px 12px 0;text-align:center;box-shadow:0 8px 12px -11px #9c9c9c,0 -10px 10px -14px #9c9c9c;border:1px solid #2a6293;display:none;position:fixed;bottom:126px;left:0;z-index:2000}.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-container[_ngcontent-%COMP%]{display:flex;flex-direction:row}@media screen and (max-width: 767px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-container[_ngcontent-%COMP%]{flex-direction:column}}.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-item_content[_ngcontent-%COMP%]{font-size:14px;margin:0 auto;flex:1}.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-item_content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:700}@media screen and (max-width: 767px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-item_content[_ngcontent-%COMP%]{max-width:100%;font-size:1em;padding-bottom:10px}}@media screen and (min-width: 768px) and (max-width: 1024px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-message-item_content[_ngcontent-%COMP%]{font-size:1.2em}}.gdpr-message-item[_ngcontent-%COMP%] .gdpr-buttons[_ngcontent-%COMP%]{display:flex;padding-right:0;gap:12px;min-width:40%}@media screen and (min-width: 768px) and (max-width: 1024px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-buttons[_ngcontent-%COMP%]{display:inline-block}}@media screen and (max-width: 767px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-buttons[_ngcontent-%COMP%]{width:100%}}.gdpr-message-item[_ngcontent-%COMP%] .gdpr-reject[_ngcontent-%COMP%]{display:inline-block}@media screen and (max-width: 767px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-accept[_ngcontent-%COMP%]{margin-bottom:8px}}@media screen and (max-width: 767px){.gdpr-message-item[_ngcontent-%COMP%] .gdpr-review[_ngcontent-%COMP%]{margin-bottom:0}}.gdpr-modal[_ngcontent-%COMP%] div.modal-header[_ngcontent-%COMP%]{display:none;text-align:center}.gdpr-modal-override[_ngcontent-%COMP%]{opacity:1!important}.gdpr-modal-override[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%], .gdpr-input[_ngcontent-%COMP%]{-webkit-appearance:checkbox}@media screen and (max-width: 767px){.gdpr-modal-save[_ngcontent-%COMP%] .gdpr-modal-review[_ngcontent-%COMP%]{margin-bottom:5px}}.gdpr-modal-container[_ngcontent-%COMP%]{display:flex}@media screen and (min-width: 768px) and (max-width: 1024px),screen and (max-width: 767px){.gdpr-modal-container[_ngcontent-%COMP%]{flex-direction:column}}.gdpr-modal-left[_ngcontent-%COMP%]{order:1;margin-right:10px}.gdpr-modal-left-text[_ngcontent-%COMP%]{min-width:190px;font-weight:700}.gdpr-modal-right[_ngcontent-%COMP%]{order:2}.gdpr-modal-right-emphasized[_ngcontent-%COMP%]{font-weight:700}.gdpr-modal-header[_ngcontent-%COMP%]{text-align:center;font-weight:700;font-size:20px;margin:15px;color:#0060a9}.cookie-consent-withdrawn-message[_ngcontent-%COMP%]{font-weight:700}"],changeDetection:0});let i=o;return i})();var Hu=i=>({"pointer-events":i}),Wu=(i,o,t)=>[i,o,t];function qu(i,o){if(i&1&&(g(0,"div",9),b(1,"sip-image",10),_()),i&2){let t=p().$implicit;c(),l("tabindex",!(t==null||t.text_section_icon==null)&&t.text_section_icon.icon_alt_text?0:-1)("src",t==null||t.text_section_icon==null||t.text_section_icon.icon_image==null?null:t.text_section_icon.icon_image.url)("alt",t==null||t.text_section_icon==null?null:t.text_section_icon.icon_alt_text)("ngStyle",X(4,Hu,!(t==null||t.text_section_icon==null)&&t.text_section_icon.icon_alt_text?"auto":"none"))}}function Yu(i,o){if(i&1&&(g(0,"div")(1,"div",11),b(2,"markdown",12),_()()),i&2){let t=o.$implicit,e=p().index,n=p(2);c(),me("color",t==null?null:t.color),Ne("clamp",!(n.isExpanded!=null&&n.isExpanded[e])&&n.truncate&&(n.ifLinesExceed==null?null:n.ifLinesExceed[e])),l("ngClass",vt(6,Wu,"group-"+e,"text-align-"+((t==null?null:t.text_alignment)||""),"group-"+((t==null?null:t.select_text_type)||""))),c(),l("data",n.getFormattedMarkdown(t==null?null:t.markdown_text))}}function Ku(i,o){if(i&1){let t=U();g(0,"button",13),F("click",function(){L(t);let n=p().index,r=p(2);return B(r.toggleExpand(n))}),M(1),b(2,"mat-icon",14),_()}if(i&2){let t=p().index,e=p().ngIf,n=p();me("color",n.bodyTextColor),ce("aria-expanded",n.isExpanded==null?null:n.isExpanded[t]),c(),D(" ",n.isExpanded!=null&&n.isExpanded[t]?e==null?null:e.text_section_config.see_less_label:e==null?null:e.text_section_config.see_more_label," "),c(),l("fontIcon",n.isExpanded!=null&&n.isExpanded[t]?n.SipCostcoIcon.CHEVRON_UP:n.SipCostcoIcon.CHEVRON_DOWN)}}function Qu(i,o){if(i&1&&(g(0,"div",3)(1,"div",4),u(2,qu,2,6,"div",5),g(3,"div",6),u(4,Yu,3,10,"div",7)(5,Ku,3,5,"button",8),_(
83)()()),i&2){let t=o.$implicit,e=o.index,n=p().ngIf,r=p();c(),me("background",r.getBackgroundCss(t==null?null:t.color_config)),l("ngClass","text-align-"+((n==null?null:n.text_section_config.text_section_alignment)||"left")),c(),l("ngIf",t==null||t.text_section_icon==null||t.text_section_icon.icon_image==null?null:t.text_section_icon.icon_image.url),c(2),l("ngForOf",t==null?null:t.text_section_content),c(),l("ngIf",(r.ifLinesExceed==null?null:r.ifLinesExceed[e])&&r.truncate)}}function Zu(i,o){if(i&1&&(g(0,"div",1),u(1,Qu,6,6,"div",2),_()),i&2){let t=o.ngIf;So(t==null||t.text_section_config==null?null:t.text_section_config.text_section_type),c(),l("ngForOf",t==null?null:t.multiple_text_section_group)}}var Js=(()=>{let o=class o{constructor(e,n,r,s){this.component=e,this.cd=n,this.elemRef=r,this.platformId=s,this.isExpanded=[],this.ifLinesExceed=[],this.DEFAULT_BACKGROUND="#FAFAFA",this.SipCostcoIcon=Qt}ngOnInit(){this.component.data$.pipe($(1),I(e=>{let n=e,r=n?.multiple_text_section_group,s=n?.text_section_config,a=r?.length??0;this.isExpanded=Array(a).fill(!1),this.ifLinesExceed=Array(a).fill(!1),this.truncate=!!s?.see_more_see_less_capability&&s?.text_section_type==="full",this.groupAlignment=s?.text_section_alignment;let d=r?.map(x=>x.text_section_content??[]).flat().filter(x=>x.select_text_type==="body"),h=d?.[d.length-1];return this.bodyTextColor=h?.color,n})).subscribe()}ngAfterViewInit(){pe(this.platformId)&&(this.ifLinesExceed=this.ifLinesExceed.map((e,n)=>{let r=document.querySelectorAll(`.group-${n}`),s=0,a=0;return r.forEach(h=>{let x=window.getComputedStyle(h),v=parseInt(x.lineHeight,10),y=h.getBoundingClientRect().height;a||(a=isNaN(v)?0:v),h.className.includes("group-title")||(s+=y)}),s>=a*6})),this.cd.detectChanges()}toggleExpand(e){this.isExpanded&&typeof this.isExpanded[e]<"u"&&(this.isExpanded[e]=!this.isExpanded[e],this.isExpanded[e]&&pe(this.platformId)&&this.elemRef.nativeElement.querySelector(`.group-body.group-${e}`)?.focus())}getBackgroundCss({background_gradient_style:e,background_gradient_color:n,background_color:r}){let s=n?.color1?.hex||"",a=n?.color2?.hex||"",d=r?.hex??this.DEFAULT_BACKGROUND;switch(e){case"radial":return`radial-gradient(circle, ${s}, ${a})`;case"linear":case"gradient":return`linear-gradient(to right, ${s}, ${a})`;case"solid":return d;default:return null}}
vendor: 6,853 bytes, lines 83-84
83getFormattedMarkdown(e){return e.replace(/\\n/g,` 84`)}};o.\u0275fac=function(n){return new(n||o)(f(K),f(Me),f(Ue),f(le))},o.\u0275cmp=w({type:o,selectors:[["sip-text-builder"]],decls:2,vars:3,consts:[["class","text-builder",3,"class",4,"ngIf"],[1,"text-builder"],["class","outer-flex-items",4,"ngFor","ngForOf"],[1,"outer-flex-items"],[1,"text-group",3,"ngClass"],["class","inner-flex-first-col",4,"ngIf"],[1,"inner-flex-second-col"],[4,"ngFor","ngForOf"],["class","toggle-btn",3,"color","click",4,"ngIf"],[1,"inner-flex-first-col"],[1,"image",3,"tabindex","src","alt","ngStyle"],["tabindex","0",3,"ngClass"],["lineNumbers","","role","none",3,"data"],[1,"toggle-btn",3,"click"],["aria-hidden","true",3,"fontIcon"]],template:function(n,r){n&1&&(u(0,Zu,2,3,"div",0),m(1,"async")),n&2&&l("ngIf",C(1,1,r.component.data$))},dependencies:[Pe,Te,z,Eo,Is,yi,Zt,N],styles:[".text-builder[_ngcontent-%COMP%]{gap:10px;height:100%;display:flex;flex-flow:column nowrap}.text-builder.half[_ngcontent-%COMP%], .text-builder.one_third[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.text-builder.half[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%], .text-builder.one_third[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%]{padding:0}.text-builder.one_fourth[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px}.text-builder.one_fourth[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%]{padding:0}.text-builder.half[_ngcontent-%COMP%] div.outer-flex-items[_ngcontent-%COMP%]{flex:1 1 45%}.text-builder.one_third[_ngcontent-%COMP%] div.outer-flex-items[_ngcontent-%COMP%]{flex:1 1 30%}.text-builder.one_fourth[_ngcontent-%COMP%] div.outer-flex-items[_ngcontent-%COMP%]{flex:1 1 calc(50% - 16px)}.text-builder.half[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%], .text-builder.one_third[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%], .text-builder.one_fourth[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%]{padding:16px}.text-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%], .text-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]:hover, .text-builder[_ngcontent-%COMP%] a.link[_ngcontent-%COMP%]:visited{text-decoration:none}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%]{height:100%}.text-builder[_ngcontent-%COMP%] .text-group.text-align-left[_ngcontent-%COMP%]{gap:16px;direction:column;display:flex;text-align:left}.text-builder[_ngcontent-%COMP%] .text-group.text-align-left[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{margin-top:12px}.text-builder[_ngcontent-%COMP%] .text-group.text-align-left[_ngcontent-%COMP%] .inner-flex-first-col[_ngcontent-%COMP%]{width:fit-content}.text-builder[_ngcontent-%COMP%] .text-group.text-align-left[_ngcontent-%COMP%] .inner-flex-second-col[_ngcontent-%COMP%]{width:100%}.text-builder[_ngcontent-%COMP%] .text-group.text-align-center[_ngcontent-%COMP%]{display:block;padding:24px 0;text-align:center}.text-builder[_ngcontent-%COMP%] .text-group.text-align-center[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{margin:0 auto}.text-builder[_ngcontent-%COMP%] .text-group.text-align-center[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%]{padding:16px;width:100%}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{display:block;height:56px;width:56px}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .clamp[_ngcontent-%COMP%]{display:-webkit-box;line-clamp:4;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:4}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .clamp[_ngcontent-%COMP%] ol[_ngcontent-%COMP%], .text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .clamp[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style-position:inside}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-title[_ngcontent-%COMP%] p{font-size:26px;word-break:break-word}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-subtitle[_ngcontent-%COMP%] p{font-size:18px;word-break:break-word}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-body[_ngcontent-%COMP%] p{font-size:16px;word-break:break-word}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-disclaimer[_ngcontent-%COMP%] p{font-size:12px;word-break:break-word}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] markdown ul{padding-inline-start:16px}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] markdown ul li{list-style:disc;list-style-position:outside}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] markdown ol{padding-inline-start:16px}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] markdown ol li{list-style:decimal;list-style-position:outside}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-body[_ngcontent-%COMP%] markdown ul, .text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-body[_ngcontent-%COMP%] markdown ol, .text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-body[_ngcontent-%COMP%] markdown li{font-size:16px;word-break:break-word}.text-builder[_ngcontent-%COMP%] button.toggle-btn[_ngcontent-%COMP%]{background-color:transparent;border:none;font-size:16px;padding:0}.text-builder[_ngcontent-%COMP%] button.toggle-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;margin-left:2px;padding-top:1px}@media screen and (min-width: 768px) and (max-width: 1023px),screen and (min-width: 1024px){.text-builder.one_fourth[_ngcontent-%COMP%] div.outer-flex-items[_ngcontent-%COMP%]{flex:1 1 23%}.text-builder.half[_ngcontent-%COMP%], .text-builder.one_third[_ngcontent-%COMP%], .text-builder.one_fourth[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;gap:16px}.text-builder.half[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%], .text-builder.one_third[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%], .text-builder.one_fourth[_ngcontent-%COMP%] div.inner-flex-second-col[_ngcontent-%COMP%]{padding:0}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-title[_ngcontent-%COMP%] p{font-size:42px}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-subtitle[_ngcontent-%COMP%] p{font-size:18px}.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{height:80px;width:80px}}@media 1440px{.text-builder[_ngcontent-%COMP%] .text-group[_ngcontent-%COMP%] .group-title[_ngcontent-%COMP%] p{font-size:56px}}"],changeDetection:0});let i=o;return i})();var ea=(()=>{let o=class o{constructor(e,n){this.route=e,this.sipTireService=n}
84getURL(e,n,r){let s=r??this.route.snapshot.queryParamMap,a=s.get("frontfilters"),d=s.get("rearfilters");return a&&this.sipTireService.setTireSearchFiltersCookie(a,d),this.sipTireService.getTireSearchURL(e,n,a,d)}};o.\u0275fac=function(n){return new(n||o)(S(Wt),S(di))},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function eg(i,o){i&1&&(P(0),g(1,"ol",4)(2,"li")(3,"span"),b(4,"sip-skeleton"),_()()(),O())}function tg(i,o){if(i&1&&(g(0,"a",7),m(1,"decodeURIComponent"),M(2),_()),i&2){let t=p().$implicit;He("title",t.label),l("sipRouterLink",C(1,3,t.link)),c(2),D(" ",t.label," ")}}function ng(i,o){if(i&1&&(g(0,"span",8),M(1),_()),i&2){let t=p().$implicit;He("title",t.label),c(),D(" ",t.label," ")}}function ig(i,o){if(i&1&&(g(0,"li"),u(1,tg,3,5,"a",6)(2,ng,2,2,"ng-template",null,1,A),_()),i&2){let t=o.$implicit,e=k(3);c(),l("ngIf",t.link)("ngIfElse",e)}}function og(i,o){if(i&1&&(g(0,"ol",4),u(1,ig,4,2,"li",5),m(2,"async"),_()),i&2){let t=p();c(),l("ngForOf",C(2,1,t.crumbs$))}}var ta=(()=>{let o=class o{constructor(e,n,r,s,a,d,h,x,v,y,E,H){this.translation=e,this.sipPageMetaService=n,this.sipSiteConfigService=r,this.sipTireProductSearchService=s,this.renderer=a,this.cmsComponentService=d,this.tireService=h,this.myAccountService=x,this.onlineRegisterService=v,this.routingService=y,this.sipProductCompareService=E,this.document=H,this.BREADCRUMB_HOME="breadcrumb.home",this.BREADCRUMB_MY_ACCOUNT="header.link.account",this.BREADCRUMB_ONLINE_REGISTRATION="onlineregister.multi.breadcrumb",this.BREADCRUMB_COMPARE_PRODUCTS="product-compare.compare-page-breadcrumb",this.BREADCRUMB_ORDERS="text.account.orderHistory.viewOrders",this.BREADCRUMB_ORDER_DETAILS="text.account.order.title.details",this.BREADCRUMB_ORDER_CANCEL=ct.ORDER_CANCEL?.labelKey??"",this.BREADCRUMB_ORDER_CANCEL_REVIEW=ct.ORDER_CANCEL_REVIEW?.labelKey??"",this.BREADCRUMB_ORDER_CANCEL_CONFIRMATION=ct.ORDER_CANCEL_CONFIRMATION?.labelKey??"",this.BREADCRUMB_ORDER_RETURN=ct.ORDER_RETURNS?.labelKey??"",this.BREADCRUMB_ORDER_RETURN_REVIEW=ct.ORDER_RETURN_REVIEW?.labelKey??"",this.BREADCRUMB_ORDER_RETURN_METHOD=ct.ORDER_RETURN_METHOD?.labelKey??"",this.BREADCRUMB_ORDER_RETURN_COMPLETED=ct.ORDER_RETURN_COMPLETED?.labelKey??"",this.pageType=qt,this.jsonLdId="schemaorg_breadcrumb",this.shouldRenderSkeleton=this.cmsComponentService.shouldRenderSkeleton()}ngOnInit(){this.shouldRenderSkeleton||(this.crumbs$=ne([this.sipPageMetaService.getMeta(),this.translation.translate(this.BREADCRUMB_HOME),this.sipSiteConfigService.getConfig(Cr),this.tireService.isTirePdp(),this.translation.translate("text.search.results"),this.getStoreFinderPageLabel(),this.translation.translate(this.BREADCRUMB_MY_ACCOUNT),this.myAccountService.isMyAccountPage(),this.onlineRegisterService.isOnlineRegisterPage(),this.translation.translate(this.BREADCRUMB_ONLINE_REGISTRATION),this.routingService.getParams(),this.tireService.getSessionSearchType(),this.tireService.isBatteriesPlp$,this.tireService.isBatteryPdp(),this.sipSiteConfigService.getConfig(vr),this.sipSiteConfigService.getConfig(xr),this.translation.translate("automotive.breadcrumb.search.chooseservice"),this.sipProductCompareService.isCompareProductPage(),this.translation.translate(this.BREADCRUMB_COMPARE_PRODUCTS),this.translation.translate(this.BREADCRUMB_ORDERS),this.translation.translate(this.BREADCRUMB_ORDER_DETAILS),this.routingService.currentUrl$,this.translation.translate(this.BREADCRUMB_ORDER_CANCEL),this.translation.translate(this.BREADCRUMB_ORDER_CANCEL_REVIEW),this.translation.translate(this.BREADCRUMB_ORDER_CANCEL_CONFIRMATION),this.translation.translate(this.BREADCRUMB_ORDER_RETURN),this.translation.translate(this.BREADCRUMB_ORDER_RETURN_REVIEW),this.translation.translate(this.BREADCRUMB_ORDER_RETURN_METHOD),this.translation.translate(this.BREADCRUMB_ORDER_RETURN_COMPLETED)]).pipe(I(([e,n,r,s,a,d,h,x,v,y,E,H,T,J,Je,An,Rn,Dn,_n,ia,oa,Fe,ra,sa,aa,la,ca,pa,da])=>{let Oe={label:n,link:"/"},Ln={label:Rn,link:An+"/selectservice"},hn=this.tireService.isAutomotiveVehicleSearchEnabled&&H===Di.VEHICLE,no="?isBatteriesSearch="+this.tireService.tireSearchCriteriaValue$.getValue();if(!e)return[Oe];
84if(s){let ye={label:a,link:this.tireService.tireSearchURLFromCookie(r,At.FRONT)},ae={label:e.heading,link:new URL(e.canonicalLink).pathname},nt=hn?[Oe,Ln,ye,ae]:[Oe,ye,ae];return this.injectJsonLd(nt),nt}else if(J){let ye={label:a,link:H===Di.VEHICLE?Je+no:r},ae={label:e.heading,link:new URL(e.canonicalLink).pathname},nt=hn?[Oe,Ln,ye,ae]:[Oe,ye,ae];return this.injectJsonLd(nt),nt}else if(!d&&hn&&E.fitmentType){let ye={label:a,link:new URL(e.canonicalLink).pathname},ae={label:a,link:this.tireService.tireSearchURLFromCookie(r,At.FRONT)},nt=hn?[Oe,Ln,ae]:[Oe,ye];return this.injectJsonLd(nt),nt}else if(!d&&hn&&T){let ye={label:a,link:new URL(e.canonicalLink).pathname+no},ae=[Oe,Ln,ye];return this.injectJsonLd(ae),ae}else if(v){let ye={label:y,link:xn.ONLINE_REGISTER};return[Oe,ye]}else if(Dn){let ye={label:_n,link:xn.COMPARE_PRODUCTS};return[Oe,ye]}else{e.breadcrumbs.forEach(ae=>{ae.link=ae.link!=null&&ae.link.length>0?ae.link.indexOf("results/"+At.FRONT)>-1?this.sipTireProductSearchService.getURL(r,At.FRONT):ae.link.indexOf("results/"+At.REAR)>-1?this.getTireProductSearchUrl(r):ae.link:ae.link,d&&(ae.label=d)});let ye=e.breadcrumbs?[Oe,...e.breadcrumbs]:[Oe];if(x){let ae={label:h,link:"/my-account"},nt=ct.ORDERDETAILS?.pageId,ma=ct.REORDER?.pageId;if(x.pageId===nt||x.pageId===ma){let io={label:ia,link:"/my-account/orders"},oo=!!Fe&&Fe.includes("/cancel/"),ua=!!Fe&&Fe.includes("/reorder/"),ro=!!Fe&&Fe.includes("/return-"),so=(oo||ua||ro)&&E.orderCode?{label:oa,link:`/my-account/order/${E.orderCode}`}:null,ao=so?[Oe,ae,io,so]:[Oe,ae,io],Bn=e.breadcrumbs;oo?Bn=[{label:Fe.includes("/cancel-review")?sa:Fe.includes("/cancel-confirmation")?aa:ra,link:Fe}]:ro&&(Bn=[{label:Fe.includes("/return-review")?ca:Fe.includes("/return-delivery-method")?pa:Fe.includes("/return-completed")?da:la,link:Fe}]),ye=Bn?[...ao,...Bn]:ao}else ye=e.breadcrumbs?[Oe,ae,...e.breadcrumbs]:[Oe,ae]}return this.injectJsonLd(ye),ye}})))}getStoreFinderPageLabel(){return this.tireService.currentPage$.pipe(oe(e=>e.label===Jo?this.translation.translate("storeFinder.link"):Y(null)))}getTireProductSearchUrl(e){return this.sipTireProductSearchService.getURL(e,At.REAR)}injectJsonLd(e){let n=this.document.getElementById(this.jsonLdId);n&&this.document.body.removeChild(n);let r=this.renderer.createElement("script"),s=this.document.location.host?"https://"+this.document.location.host:"";r.type="application/ld+json",r.id=this.jsonLdId,r.text=Qo({"@context":"https://schema.org","@type":"BreadcrumbList",name:"Breadcrumb",itemListElement:e.map((a,d)=>({"@type":"ListItem",position:d+1,item:{"@id":s+a.link,name:a.label}}))}),this.renderer.appendChild(this.document.body,r)}};o.\u0275fac=function(n){return new(n||o)(f(he),f(fi),f(Re),f(ea),f(yo),f(nn),f(di),f(Ar),f(Rr),f(Kt),f(ks),f(We))},o.\u0275cmp=w({type:o,selectors:[["sip-cms-breadcrumb"]],decls:5,vars:5,consts:[["breadcrumbs",""],["crumbWithoutLink",""],["role","region",1,"breadcrumb-section"],[4,"ngIf","ngIfElse"],[1,"breadcrumb"],[4,"ngFor","ngForOf"],[3,"sipRouterLink","title",4,"ngIf","ngIfElse"],[3,"sipRouterLink","title"],[3,"title"]],template:function(n,r){if(n&1&&(g(0,"div",2),m(1,"cxTranslate"),u(2,eg,5,0,"ng-container",3)(3,og,3,3,"ng-template",null,0,A),_()),n&2){let s=k(4);ce("aria-label",C(1,3,"text.headline.breadcrumbs")),c(2),l("ngIf",r.shouldRenderSkeleton)("ngIfElse",s)}},dependencies:[Te,z,ui,Dr,N,Ee,Lr],styles:["[_nghost-%COMP%] sip-skeleton[_ngcontent-%COMP%]{width:15em;height:20px}"],changeDetection:0});let i=o;return i})();var na=(()=>{let o=class o{constructor(){}getComponentMapping(e){if(this.searchComponentByName(e,"ad_builder_block"))return this.constructComponentWithData(e,"ad_builder_block",!0,Gs);if(this.searchComponentByName(e,"add_text_banner"))return this.constructComponentWithData(e,"add_text_banner",!1,Ji);if(this.searchComponentByName(e,"strip"))return this.constructComponentWithData(e,"strip",!1,Ji);if(this.searchComponentByName(e,"ad_set_costco_block"))return this.constructComponentWithData(e,"ad_set_costco_block",!0,Us);if(this.searchComponentByName(e,"button_set_block"))return this.constructComponentWithData(e,"button_set_block",!0,Hs);if(this.searchComponentByName(e,"icon_text_button_set_block"))return this.constructComponentWithData(e,"icon_text_button_set_block",!0,Ws);if(this.searchComponentByName(e,"marketing_product_slider_block"))return this.constructComponentWithData(e.marketing_product_slider_block,"marketing_product_slider_block",!1,is);if(this.searchComponentByName(e,"html_render_component_block"))return this.constructComponentWithData(e,"html_render_component_block",!0,qs);if(this.searchComponentByName(e,"third_party_recommendation_product_slider_block"))return this.constructComponentWithData(e.third_party_recommendation_product_slider_block,"third_party_recommendation_product_slider_block",!1,vi);if(this.searchComponentByName(e,"recently_viewed_product_slider_block"))return this.constructComponentWithData(e.recently_viewed_product_slider_block,"recently_viewed_product_slider_block",!1,as);if(this.searchComponentByName(e,"utility_menu"))return this.constructComponentWithData(e.utility_menu,"utility_menu",!1,Ks);if(this.searchComponentByName(e,"iframe_block"))return this.constructComponentWithData(e,"iframe_block",!0,Qs);if(this.searchComponentByName(e,"countries_flag"))return this.constructComponentWithData(e.countries_flag,"countries_flag",!1,Zs);if(this.searchComponentByName(e,"gdpr_options"))return this.constructComponentWithData(e.gdpr_options,"gdpr_options",!1,Xs);if(this.searchComponentByName(e,"text_builder_block"))return this.constructComponentWithData(e,"text_builder_block",!0,Js);if(this.searchComponentByName(e,"breadcrumb"))return this.constructComponentWithData(e.breadcrumb,"breadcrumb",!1,ta);console.warn(`Unable to load ${e} component. Something went wrong!`)}validateData(e,n){let r=nr(e,er[n]);return!r||!Array.isArray(r)||!r.length?console.warn(`${n} component is missing Component Data. Something went wrong!`):r.length>=1?r[0]:r}searchComponentByName(e,n){return Object.prototype.hasOwnProperty.call(e,n)}
84constructComponentWithData(e,n,r,s){return{data:r?this.validateData(e,n):e,Component:s,name:n,uid:n}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=ee({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function sg(i,o){}var yx=(()=>{let o=class o{constructor(e,n,r,s,a){this.cmsComponentsService=e,this.componentHandler=n,this.injector=r,this.cdr=s,this.compMappingService=a,this.sub=new Se}ngOnInit(){this.loadComponent()}ngOnChanges({componentInfo:e}){e?.previousValue!==e?.currentValue&&!e.isFirstChange()&&!this.ignoreReloadForComponents(e)&&this.reloadComponent()}ignoreReloadForComponents(e){return e?.previousValue?.marketing_product_slider_block||e?.currentValue?.marketing_product_slider_block||e?.previousValue?.third_party_recommendation_product_slider_block||e?.currentValue?.third_party_recommendation_product_slider_block||e?.previousValue?.recently_viewed_product_slider_block||e?.currentValue?.recently_viewed_product_slider_block?!0:!!(e?.previousValue?.countries_flag||e?.currentValue?.countries_flag)}createInjector(e,n,r){return Un.create({providers:[{provide:e,useValue:R({uid:"",data$:Y(n??{})},r)}],parent:this.injector})}reloadComponent(){this.loadComponent()}loadComponent(){if(this.sipCsHost.viewContainerRef.clear(),!this.componentInfo)return;let e=this.componentInfo,n=this.componentInfo?.key;if(e)try{let r=this.compMappingService.getComponentMapping(e);if(r?.Component){let s=this.createInjector(K,r.data);this.sipCsHost.viewContainerRef.createComponent(r.Component,{injector:s});return}if(!n)return;this.sub.add(this.cmsComponentsService.determineMappings([n]).subscribe(()=>{let s=this.cmsComponentsService.getMapping(n);s&&this.launchSpartacusComponent(n,this.componentInfo?.data,s,this.componentInfo?.position??"")}))}catch(r){console.warn(`Error loading component ${this.componentInfo}:`,r)}}launchSpartacusComponent(e,n,r,s){if(!this.cmsComponentsService.shouldRender(e))return;let a=e==="CheckoutComponent"?this.createInjector(Ii,n,{position:s}):this.createInjector(K,n),d=this.componentHandler.getLauncher(r,this.sipCsHost.viewContainerRef,a);d&&this.sub.add(d.subscribe(()=>{this.cdr.markForCheck()}))}ngOnDestroy(){this.sub.unsubscribe()}};o.\u0275fac=function(n){return new(n||o)(f(Ho),f(Wo),f(Un),f(Me),f(na))},o.\u0275cmp=w({type:o,selectors:[["sip-cs-dynamic-component"]],viewQuery:function(n,r){if(n&1&&je(bi,7),n&2){let s;ze(s=Ge())&&(r.sipCsHost=s.first)}},hostAttrs:["ngSkipHydration","true"],inputs:{componentInfo:"componentInfo"},features:[Vn],decls:1,vars:0,consts:[["sipCsHost",""]],template:function(n,r){n&1&&u(0,sg,0,0,"ng-template",0)},dependencies:[bi],encapsulation:2,changeDetection:0});let i=o;return i})();export{Ii as a,de as b,dt as c,On as d,Ns as e,zs as f,pn as g,Gs as h,Ji as i,wi as j,eo as k,jd as l,Us as m,Hs as n,yi as o,Ws as p,ke as q,gi as r,Xe as s,pt as t,Le as u,zr as v,Hr as w,Wr as x,qr as y,Zr as z,fi as A,ns as B,dn as C,is as D,qs as E,Ys as F,Ks as G,Qs as H,xi as I,Ci as J,vi as K,Zs as L,Xs as M,Sp as N,nf as O,Js as P,ea as Q,ks as R,ta as S,as as T,yx as U};
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.