@pronto-tools-and-more/files 6.40.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/files/framework/src/default/storefront/buildInfo.json +4 -4
  2. package/files/framework/src/default/storefront/deep-link-landing/purple-deep-link-landing.js +80 -80
  3. package/files/framework/src/default/storefront/index.html +2 -2
  4. package/files/framework/src/default/storefront/modules/common.js +1 -1
  5. package/files/framework/src/default/storefront/modules/default-projects_storefront_src_app_component_content_content_module_ts.js +1 -1
  6. package/files/framework/src/default/storefront/modules/default-projects_storefront_src_app_component_issue_issue_module_ts.js +1 -1
  7. package/files/framework/src/default/storefront/modules/default-projects_storefront_src_app_service_tts_tts_service_ts.js +1 -1
  8. package/files/framework/src/default/storefront/modules/main.js +1 -1
  9. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_common-pipes_common-pipes_module_ts-projects_storefront_src_app_c-94b9b6.js +1 -1
  10. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_ad_ad_module_ts.js +1 -1
  11. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_base-component_base-datacollection_component_ts-project-6cb588.js +1 -1
  12. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_bookmark_bookmark_module_ts.js +1 -1
  13. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_catalog-content_content-body_content-body_module_ts.js +1 -1
  14. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_catalog-content_content-featured-image_content-featured-c9ba26.js +1 -1
  15. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_category_category_module_ts.js +1 -1
  16. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_collection_collection_module_ts.js +1 -1
  17. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_coupon_coupon_module_ts.js +1 -1
  18. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_dev-components_user-tag-testing_user-tag-testing_module_ts.js +1 -1
  19. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_download-issues_download-issues_module_ts.js +1 -1
  20. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_dropdown_dropdown_module_ts.js +1 -1
  21. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_embeddable-view_embeddable-view_module_ts.js +1 -1
  22. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_iframe_iframe_module_ts.js +1 -1
  23. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_issue-search-result_issue-search-result_module_ts.js +1 -1
  24. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_login_login_module_ts.js +1 -1
  25. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_menu_menu_module_ts.js +1 -1
  26. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_product_product_module_ts.js +1 -1
  27. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_publication-completion_publication-completion_module_ts.js +1 -1
  28. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_publication_publication_module_ts.js +1 -1
  29. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_recommendations_recommendations_module_ts.js +1 -1
  30. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_search-field_search-field_module_ts.js +1 -1
  31. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_subscription_subscription_module_ts.js +1 -1
  32. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_swiper_swiper_module_ts.js +1 -1
  33. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_toggle_toggle_module_ts.js +1 -1
  34. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_toolbar_toolbar_module_ts.js +1 -1
  35. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_web-presenter_presenter_presenter_module_ts.js +1 -1
  36. package/files/framework/src/default/storefront/modules/projects_storefront_src_app_component_widget_widget_module_ts.js +1 -1
  37. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_issue-search-result_issue-search-result_module_ts"],{4767:(M,R,r)=>{r.d(R,{d:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},2914:(M,R,r)=>{r.d(R,{w:()=>d});var m=r(4049),o=r(7370),p=r(3953),g=r(9516);let d=(()=>{var f;class v{constructor(C){this.contextService=C}transform(C,O){if(!C||(0,o.vh)(C))return C;let I=C?(0,m.K)(C,O):"";const D=this.contextService.getIsCustomerDomainUsed()?"":"/".concat(this.contextService.getBrand(),"/"),P=new URL(window.location.href),_="true"===P.searchParams.get("preview")||0===P.pathname.indexOf("/preview");return"/"===I&&(I=""),I="".concat(D).concat(I).concat(_?"?preview=true":""),I}}return(f=v).\u0275fac=function(C){return new(C||f)(p.rXU(g.V,16))},f.\u0275pipe=p.EJ8({name:"urlTransform",type:f,pure:!0}),f.\u0275prov=p.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),v})()},2932:(M,R,r)=>{r.d(R,{h:()=>D,q:()=>P});var m=r(177),o=r(3953),p=r(8251),g=r(8890),d=r(9876),f=r(345),v=r(4748),U=r(9516),C=r(8471);const O=["image"];function I(_,k){if(1&_){const T=o.RV6();o.j41(0,"img",2,0),o.bIt("error",function(){o.eBV(T);const l=o.XpG();return o.Njj(l.onError())}),o.k0s()}if(2&_){const T=o.XpG();o.Y8G("src",T.safeResizeSrc,o.B4B)("alt",T.alt)("title",T.title),o.BMQ("aria-label",T.ariaLabel)}}let D=(()=>{var _;class k{set image(c){c&&this.onLoad(c),this._image=c}get image(){return this._image}constructor(c,l,x,b,$,A,L,H){this.sanitizer=c,this.changeDetectorRef=l,this.elementRef=x,this.subscriptions=b,this.platformId=$,this.ssrService=A,this.contextService=L,this.purpleService=H,this.error=new o.bkB,this.height=P.AUTO}get empty(){return!this.src}ngOnInit(){this.initProperties(),(0,m.UE)(this.platformId)&&this.subscriptions.subscribe((0,g.eh)(this,this.elementRef,{skipWait:!1}),c=>this.load())}initProperties(){var c,l,x,b;this.alt=(null===(c=this.extendedThumbnail)||void 0===c?void 0:c.properties.alt)||(null===(l=this.extendedThumbnail)||void 0===l?void 0:l.properties.caption)||"",this.title=this.alt,this.ariaLabel=null!==(x=this.label)&&void 0!==x?x:this.alt,this.focalPoint=null===(b=this.extendedThumbnail)||void 0===b?void 0:b.properties.focuspoint}initAndLoad(){this.initProperties(),this.load()}load(){this.loaded||(this.loaded=!0,this.src&&this.update(),this.changeDetectorRef.detectChanges())}ngOnChanges(c){c.src&&this.loaded&&this.update()}update(){this.updateImageRatio(),this.updateResizeSrc()}onLoad(c){c.nativeElement.classList.add("loaded"),this.elementRef.nativeElement.classList.add("loaded"),this.changeDetectorRef.detectChanges(),c.nativeElement.addEventListener("load",()=>{this.updateImageRatio(!0,c),this.changeDetectorRef.markForCheck()}),c.nativeElement.addEventListener("error",function(){c.nativeElement.style.display="none",c.nativeElement.nextElementSibling&&(c.nativeElement.nextElementSibling.style.display="inline")}),this.purpleService.addImageSrc(this.resizeSrc)}onError(){if(!this.safeResizeSrc)return;const c=this.purpleService.getAlternativeSrc(this.src);var l;c&&c!==this.resizeSrc?(this.setResizeSrc(c),this.changeDetectorRef.detectChanges()):(null===(l=this.image)||void 0===l||l.nativeElement.classList.add("error"),this.elementRef.nativeElement.classList.add("error"),this.error.emit(this))}updateImageRatio(c=!1,l=this.image){this.imageRatio=this.height===P.AUTO?(0,d.z)(!c,null==l?void 0:l.nativeElement,this.src)+"%":void 0}updateResizeSrc(){this.setResizeSrc((0,d.G)(this.elementRef.nativeElement,this.src,this.imageResolutionStrategy,this.focalPoint)),this.changeDetectorRef.detectChanges()}setResizeSrc(c){const l=this.contextService.toResourceUrl(c);this.resizeSrc=l,this.safeResizeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(l)}}return(_=k).\u0275fac=function(c){return new(c||_)(o.rXU(f.up),o.rXU(o.gRc),o.rXU(o.aKT),o.rXU(p.v),o.rXU(o.Agw),o.rXU(v.i),o.rXU(U.V),o.rXU(C.Wj))},_.\u0275cmp=o.VBU({type:_,selectors:[["storefront-image"]],viewQuery:function(c,l){if(1&c&&o.GBs(O,5),2&c){let x;o.mGM(x=o.lsd())&&(l.image=x.first)}},hostAttrs:["ngSkipHydration","true"],hostVars:12,hostBindings:function(c,l){2&c&&(o.BMQ("src",l.src)("label",l.label)("resolution-strategy",l.imageResolutionStrategy)("alt",l.alt)("title",l.title)("aria-label",l.ariaLabel)("focal-point",l.focalPoint)("height-strategy",l.height),o.xc7("padding-top",l.imageRatio),o.AVh("empty",l.empty))},inputs:{src:"src",label:"label",extendedThumbnail:"extendedThumbnail",imageResolutionStrategy:"imageResolutionStrategy",height:"height"},outputs:{error:"error"},features:[o.Jv_([p.v]),o.OA$],decls:1,vars:1,consts:[["image",""],[3,"src","alt","title","error",4,"ngIf"],[3,"error","src","alt","title"]],template:function(c,l){1&c&&o.DNE(0,I,2,4,"img",1),2&c&&o.Y8G("ngIf",l.loaded&&l.src)},dependencies:[m.bT],styles:["storefront-image{display:flex;justify-content:center;align-items:center;position:relative;background-color:var(--imageLoadingColor);transition:.2s background-color ease-in}storefront-image[height-strategy=FIXED]>img,storefront-image[height-strategy=AUTO]>img{position:absolute;width:auto;max-width:100%;top:0;object-fit:contain;height:100%;left:50%;transform:translate(-50%)}storefront-image.img-with-hidden-alt{content:attr(data-alt);display:none}storefront-image>img{display:block;transition:opacity .2s ease-in,background-color .2s ease-in;background-color:#fff0;max-width:100%;max-height:100%;opacity:0}storefront-image>img.loaded{opacity:1;background-color:var(--imageBackgroundColor)}storefront-image.loaded{background:#fff0}\n"],encapsulation:2,changeDetection:0}),k})();var P=function(_){return _.AUTO="AUTO",_.FIXED="FIXED",_.DEFAULT="DEFAULT",_}(P||{})},4403:(M,R,r)=>{r.d(R,{U:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},8609:(M,R,r)=>{r.r(R),r.d(R,{IssueSearchResultModule:()=>xe,component:()=>Ie});var m=r(177),o=r(467),p=r(4404),g=r(362),d=r(8179),f=r(8471),v=r(9745),U=r(2628),C=r(7010),O=r(4579),I=r(9085),D=r(8890);const P=(0,C.UX)(O.$);var k=r(8251),T=r(610),c=r(3178),l=r(5706),x=r(7879),b=r(1210),$=r(2932),A=function(n){return n.KIOSK="kiosk",n.FEED="feed",n}(A||{});const L={pageHitLimit:1,pageHitExcerptMessage:"SEARCH_RESULT_PAGE_HIT_EXCERPT",pageLabelMessage:"SEARCH_RESULT_PAGE_LABEL_MESSAGE"};var H=r(4412),e=r(3953),X=r(8004),j=r(9516),K=r(1652),V=r(4748),N=r(5820),Y=r(8909),W=r(2813),B=r(2914),z=r(5964),Q=r(6697),J=r(5558),w=r(1985);let Z=(()=>{var n;class h{constructor(t){this.urlTransformPipe=t}transform(t,s){return t.pipe((0,z.p)(a=>!!a),(0,Q.s)(1),(0,J.n)(a=>{const u=this.urlTransformPipe.transform(a,s);return new w.c(E=>{E.next(u),E.complete()})}))}}return(n=h).\u0275fac=function(t){return new(t||n)(e.rXU(B.w,16))},n.\u0275pipe=e.EJ8({name:"asyncUrlTransform",type:n,pure:!0}),h})();const G=n=>[n];function q(n,h){1&n&&(e.qex(0),e.j41(1,"div",4),e.nrm(2,"storefront-image",5),e.k0s(),e.j41(3,"div",6),e.nrm(4,"h3",7)(5,"div",8),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.Y8G("height","css"))}function ee(n,h){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"a",16),e.nI1(2,"urlTransform"),e.bIt("click",function(s){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickCover(s))}),e.nrm(3,"storefront-image",17),e.k0s(),e.bVm()}if(2&n){const i=h.ngIf,t=e.XpG(2);e.R7$(),e.Y8G("href",e.i5U(2,5,i,t.context),e.B4B),e.R7$(2),e.Y8G("src",t.searchResultContent.thumbnails.default)("imageResolutionStrategy",null==t.config?null:t.config.imageResolutionStrategy)("height",t.getImageHeight())("extendedThumbnail",null==t.searchResultContent||null==t.searchResultContent.thumbnailsExtended?null:t.searchResultContent.thumbnailsExtended.default)}}function te(n,h){if(1&n){const i=e.RV6();e.j41(0,"div",18),e.bIt("click",function(s){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickCover(s))}),e.nrm(1,"storefront-image",17),e.k0s()}if(2&n){const i=e.XpG(2);e.R7$(),e.Y8G("src",i.searchResultContent.thumbnails.default)("imageResolutionStrategy",null==i.config?null:i.config.imageResolutionStrategy)("height",i.getImageHeight())("extendedThumbnail",null==i.searchResultContent||null==i.searchResultContent.thumbnailsExtended?null:i.searchResultContent.thumbnailsExtended.default)}}function se(n,h){if(1&n&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&n){const i=h.$implicit;e.ZWY("issue-property issue-property-",i.key," issue-property-",i.key,"-",i.value,""),e.R7$(2),e.JRh(i.value),e.R7$(),e.ee0("'icon icon-",i.key," icon-",i.value," icon-",i.key,"-",i.value,"")}}function ne(n,h){if(1&n&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&n){const i=h.$implicit;e.ZvI("issue-category issue-category-",i,""),e.R7$(2),e.JRh(i),e.R7$(),e.ZvI("icon icon-",i,"")}}function ie(n,h){if(1&n&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&n){const i=h.$implicit;e.ZvI("issue-tag issue-tag-",i,""),e.R7$(2),e.JRh(i),e.R7$(),e.ZvI("icon icon-",i,"")}}function re(n,h){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"a",19),e.nI1(2,"urlTransform"),e.bIt("click",function(s){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickTitle(s))}),e.j41(3,"h3",7),e.EFF(4),e.k0s()(),e.bVm()}if(2&n){const i=h.ngIf,t=e.XpG(2);e.R7$(),e.Y8G("href",e.i5U(2,2,i,t.context),e.B4B),e.R7$(3),e.SpI(" ",t.searchResultContent.name," ")}}function ae(n,h){if(1&n&&(e.j41(0,"h3",7),e.EFF(1),e.k0s()),2&n){const i=e.XpG(2);e.R7$(),e.SpI(" ",i.searchResultContent.name," ")}}function oe(n,h){if(1&n&&e.nrm(0,"div",24),2&n){const i=e.XpG().$implicit,t=e.XpG(4);e.Y8G("storefrontTranslate",t.config.pageLabelMessage)("storefrontTranslateArgs",e.eq3(2,G,i.pageLabel))}}function le(n,h){if(1&n){const i=e.RV6();e.j41(0,"a",19),e.nI1(1,"asyncUrlTransform"),e.nI1(2,"async"),e.bIt("click",function(s){const a=e.eBV(i).$implicit,u=e.XpG(4);return e.Njj(u.onClickPageHit(s,a))}),e.nrm(3,"div",22),e.DNE(4,oe,1,4,"div",23),e.k0s()}if(2&n){const i=h.$implicit,t=e.XpG(4);e.ZvI("issue-page-hit issue-",t.searchResultContent.id,""),e.Y8G("href",e.bMT(2,10,e.i5U(1,7,t.getPageHitAnchorPath(i),t.context)),e.B4B),e.R7$(3),e.Y8G("storefrontTranslate",i.replacedExcerpt)("storefrontTranslateArgs",e.eq3(12,G,i.excerpt)),e.R7$(),e.Y8G("ngIf",i.pageLabel&&"ISSUE"!==(null==t.searchResult?null:t.searchResult.contentType))}}function ce(n,h){if(1&n&&(e.qex(0),e.DNE(1,le,5,14,"a",21),e.bVm()),2&n){const i=e.XpG(3);e.R7$(),e.Y8G("ngForOf",i.currentPageHits.slice(0,i.pageHitLimit))}}function ue(n,h){if(1&n&&e.nrm(0,"div",24),2&n){const i=e.XpG().$implicit,t=e.XpG(4);e.Y8G("storefrontTranslate",t.config.pageLabelMessage)("storefrontTranslateArgs",e.eq3(2,G,i.pageLabel))}}function he(n,h){if(1&n){const i=e.RV6();e.j41(0,"div",26),e.bIt("click",function(s){const a=e.eBV(i).$implicit,u=e.XpG(4);return e.Njj(u.onClickPageHit(s,a))}),e.nrm(1,"div",22),e.DNE(2,ue,1,4,"div",23),e.k0s()}if(2&n){const i=h.$implicit,t=e.XpG(4);e.ZvI("issue-page-hit issue-",t.searchResultContent.id,""),e.R7$(),e.Y8G("storefrontTranslate",i.replacedExcerpt)("storefrontTranslateArgs",e.eq3(6,G,i.excerpt)),e.R7$(),e.Y8G("ngIf",i.pageLabel)}}function ge(n,h){if(1&n&&e.DNE(0,he,3,8,"div",25),2&n){const i=e.XpG(3);e.Y8G("ngForOf",i.currentPageHits.slice(0,i.pageHitLimit))}}function pe(n,h){if(1&n&&(e.j41(0,"span",31),e.EFF(1),e.k0s()),2&n){const i=e.XpG(4);e.R7$(),e.JRh(i.currentPageHits.length-i.pageHitLimit)}}function de(n,h){if(1&n){const i=e.RV6();e.j41(0,"div",27),e.bIt("click",function(){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onClickToggleExpanded())}),e.DNE(1,pe,2,1,"span",28),e.nrm(2,"span",29)(3,"i",30),e.k0s()}if(2&n){const i=e.XpG(3);e.R7$(),e.Y8G("ngIf",!i.pageHitExpanded),e.R7$(),e.Y8G("storefrontTranslate",i.pageHitExpanded?"SEARCH_RESULT_TOGGLE_COLLAPSE":"SEARCH_RESULT_TOGGLE_EXPAND")}}function fe(n,h){if(1&n&&(e.j41(0,"div",8),e.DNE(1,ce,2,1,"ng-container",9)(2,ge,1,1,"ng-template",null,2,e.C5r)(4,de,4,2,"div",20),e.k0s()),2&n){const i=e.sdS(3),t=e.XpG(2);e.AVh("expanded",t.pageHitExpanded),e.R7$(),e.Y8G("ngIf",t.anchorFeatureEnabled)("ngIfElse",i),e.R7$(3),e.Y8G("ngIf",t.currentPageHits.length>t.config.pageHitLimit)}}function me(n,h){if(1&n&&(e.qex(0),e.DNE(1,ee,4,8,"ng-container",9),e.nI1(2,"async"),e.DNE(3,te,2,4,"ng-template",null,0,e.C5r),e.j41(5,"div",10),e.DNE(6,se,4,12,"div",11),e.k0s(),e.j41(7,"div",12),e.DNE(8,ne,4,7,"div",11),e.k0s(),e.j41(9,"div",13),e.DNE(10,ie,4,7,"div",11),e.k0s(),e.j41(11,"div",6),e.DNE(12,re,5,5,"ng-container",9),e.nI1(13,"async"),e.DNE(14,ae,2,1,"ng-template",null,1,e.C5r),e.j41(16,"div",14),e.EFF(17),e.nI1(18,"storefrontDate"),e.k0s(),e.DNE(19,fe,5,5,"div",15),e.k0s(),e.bVm()),2&n){const i=e.sdS(4),t=e.sdS(15),s=e.XpG();e.R7$(),e.Y8G("ngIf",e.bMT(2,9,s.contentPath$))("ngIfElse",i),e.R7$(5),e.Y8G("ngForOf",s.visibleProperties),e.R7$(2),e.Y8G("ngForOf",s.searchResultCategories),e.R7$(2),e.Y8G("ngForOf",s.searchResultTags),e.R7$(2),e.Y8G("ngIf",e.bMT(13,11,s.contentPath$))("ngIfElse",t),e.R7$(5),e.SpI(" ",e.bMT(18,13,s.searchResultContent.publicationDate)," "),e.R7$(2),e.Y8G("ngIf",(null==s.currentPageHits?null:s.currentPageHits.length)>0)}}let _e=(()=>{var n;class h extends b.${get contentType(){var t;return null===(t=this.searchResult)||void 0===t?void 0:t.contentType}get postType(){return this.searchResult&&(0,l.QO)(this.searchResult)?this.searchResult.post.postType:void 0}constructor(t,s,a,u,E,y,S,Pe,F,ye,Se,De){super(u,t,y,S,F),this.elementRef=t,this.changeDetectorRef=s,this.store=a,this.injector=u,this.eventActionService=E,this.contextService=y,this.document=S,this.purpleService=Pe,this.globalService=F,this.purpleEnv=ye,this.ssrService=Se,this.anchorService=De,this.defaultConfig={...L},this.pageHitsAnchorMap={},this.anchorPathCover=null,this.contentPath$=new H.t(null),this.pageHitExpanded=!1}get searchResultContent(){return this.searchResult?(0,l.tr)(this.searchResult):null}get searchResultCategories(){return this.taxonomies.filter(t=>"category"===t.type).map(t=>t.id)}get searchResultTags(){return this.taxonomies.filter(t=>"tag"===t.type).map(t=>t.id)}get taxonomies(){var t;return null!==(t=this.searchResultContent.taxonomies)&&void 0!==t?t:[]}get purchasable(){var t;return(null===(t=this.searchResultContent)||void 0===t?void 0:t.access)===p.Access.PURCHASABLE}ngOnInit(){this.anchorFeatureEnabled=this.anchorService.isAnchorFeatureEnabled(),this.anchorFeatureEnabled||this.contentPath$.next(null),super.ngOnInit()}onConfigChanges(){if(this.setPageHitLimit(),this.context[h.type]){this.searchResult=this.context[h.type];const t=this.searchResultContent;t&&(this.handleSearchResult(t),this.changeDetectorRef.markForCheck())}}hasContextChanged(t){return!g(t[h.type],this.searchResult)||!g(t.issue,this.context.issue)||super.hasContextChanged(t)}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"pageHitExcerptMessage"]}onClickCover(t){var s=this;return(0,o.A)(function*(){s.processing.emit(!0),s.config.tapCover?(t.stopPropagation(),t.preventDefault(),yield s.handleOnClick(s.config.tapCover,s.currentPageHits[0],"COVER_CLICKED"),s.processing.emit(!1)):s.processing.emit(!1)})()}onClickTitle(t){var s=this;return(0,o.A)(function*(){s.onClickPageHit(t,s.currentPageHits[0])})()}onClickPageHit(t,s){var a=this;return(0,o.A)(function*(){a.processing.emit(!0),a.config.tapPageHit?(t.stopPropagation(),t.preventDefault(),yield a.handleOnClick(a.config.tapPageHit,s,"PAGE_HIT_CLICKED"),a.processing.emit(!1)):a.processing.emit(!1)})()}onClickToggleExpanded(){this.pageHitExpanded=!this.pageHitExpanded,this.setPageHitLimit(),this.changeDetectorRef.detectChanges()}handleOnClick(t,s,a){var u=this;return(0,o.A)(function*(){(0,l.xl)(u.searchResultContent)&&u.purpleService.getDownloadHandler(u.searchResultContent).then(y=>u.handleTrackAction(a,y,s));const E=u.createEventActionConfig(t,s);yield u.eventActionService.processEventAction(E,u)})()}createEventActionConfig(t,s){const a={...t};return a.type!==v.H.OPEN_CONTENT||((0,l.o$)(this.searchResult)?a.bundle||(a.bundle={bundleId:this.searchResultContent.id,postId:null==s?void 0:s.catalogContent.id}):(0,l.n7)(this.searchResult)&&(a.pageIndex=s.pageIndex,a.elementAlias=s.pageElementAlias)),a}getId(){var t;return null===(t=this.searchResultContent)||void 0===t?void 0:t.id}getData(){return this.searchResult}setPageHitLimit(){this.searchResult&&(this.pageHitLimit=this.pageHitExpanded?this.currentPageHits.length:this.config.pageHitLimit)}getPageHitId(t){return t.id}getPageTitle(t){if((0,d.Ol)(this.config.showPageTitle)){if((0,l.o$)(this.searchResult))return t.post.name;if((0,l.n7)(this.searchResult))return t.pageTitle}}getPageHitAnchorPath(t){if(this.anchorFeatureEnabled){const a=this.pageHitsAnchorMap[t.id];return this.anchorService.getAnchorPathForContent(t.catalogContent).then(u=>{u&&a.next(u)}),a}return null}getImageHeight(){return this.config.coverHeight||this.getDefaultImageHeight()}getDefaultImageHeight(){return this.template===A.KIOSK?$.q.AUTO:$.q.FIXED}isGhost(){return!this.searchResult}handleSearchResult(t){this.updateCurrentPageHits(this.searchResult),this.baseConfig.template||this.handleMissingTemplate(t),this.setComponentContext("issue",t),this.handleVisibleProperties(t),this.handleSubscribeTo(),this.handleAnchorTags()}updateCurrentPageHits(t){if(this.hasSearchResults(t)){switch(t.contentType){case p.CatalogContentType.ISSUE:this.currentPageHits=this.mapIssueSearchResult(t);break;case p.CatalogContentType.POST:this.currentPageHits=this.mapPostSearchResult(t);break;case p.CatalogContentType.BUNDLE:this.currentPageHits=this.mapBundleSearchResult(t);break;default:this.currentPageHits=[]}(0,f.GA)(this.searchResultContent,this.purpleService).then(s=>this.locked=s)}else this.currentPageHits=[]}hasSearchResults(t){if(!t)return!1;switch(t.contentType){case p.CatalogContentType.ISSUE:return t.pageHits.length>0;case p.CatalogContentType.POST:return t.excerpt.length>0;case p.CatalogContentType.BUNDLE:return t.posts.length>0;default:return!1}}mapIssueSearchResult(t){const s=this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage,a=new Array;return t.pageHits.forEach((u,E)=>{const y=(0,d.uQ)(s.slice(),{...this.context,index:E},this.contextService.$functions,this.globalService.getGlobalData()),S={id:"issue_page_".concat(E),catalogContent:t.issue,contentId:t.issue.id,pageTitle:u.pageTitle,pageLabel:u.pageLabel,pageIndex:u.pageIndex,pageNumber:u.pageNumber,elementAlias:u.elementAlias,excerpt:u.excerpt,replacedExcerpt:y};a.push(S),this.assertPageHitSubject(S)}),a}mapPostSearchResult(t){const a=(0,d.uQ)((this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage).slice(),{...this.context},this.contextService.$functions,this.globalService.getGlobalData()),u={id:"post_".concat(t.post.id),contentId:t.post.id,catalogContent:t.post,pageLabel:t.post.name,pageIndex:0,elementAlias:"",excerpt:t.excerpt,replacedExcerpt:a},E=new Array;return E.push(u),this.assertPageHitSubject(u),E}mapBundleSearchResult(t){const s=this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage,a=new Array;return t.posts.forEach((u,E)=>{const y=(0,d.uQ)(s.slice(),{...this.context,index:E},this.contextService.$functions,this.globalService.getGlobalData()),S={id:"post_".concat(u.post.id),contentId:u.post.id,catalogContent:u.post,pageLabel:u.post.name,pageIndex:0,elementAlias:"",excerpt:u.excerpt,replacedExcerpt:y};a.push(S),this.assertPageHitSubject(S)}),a}assertPageHitSubject(t){var s,a,u;null!==(u=(s=this.pageHitsAnchorMap)[a=t.id])&&void 0!==u||(s[a]=new H.t(null))}handleMissingTemplate(t){(0,l.xl)(t)?this.config.template=t.type===p.IssueType.ISSUE?A.KIOSK:A.FEED:(0,l.mF)(t)&&(this.config.template=A.FEED)}handleVisibleProperties(t){var s;this.visibleProperties=(null!==(s=this.config.renderProperties)&&void 0!==s?s:[]).map(a=>(0,d.v3)(a)).filter(a=>!!a&&void 0!==t.properties[a]).map(a=>({key:a,value:t.properties[a]}))}handleSubscribeTo(){this.store.subscribe((0,D.eh)(this,this.elementRef,{skipWait:this.purpleEnv.isUniversal&&!this.ssrService.currentPrebootStatus}),t=>{this.loadIssueState(),this.loadPublication()},c.lQ,c.lQ,"visible")}loadIssueState(){(0,l.xl)(this.searchResultContent)&&this.baseConfig.stateful&&(this.installState=this.searchResultContent.state,this.store.select(function _(n){return h=>h.select(P).pipe((0,I.E)(n),D.TM,(0,D.ZE)())}(this.searchResultContent.id),t=>this.installState=t,c.lQ,c.lQ,"issue-state"),this.store.dispatch((0,U.Uo)({issues:[this.searchResultContent]})))}loadPublication(){var t=this;return(0,o.A)(function*(){t.searchResultContent&&(t.publication=yield t.purpleService.getPublication(t.searchResultContent.publicationId),t.changeDetectorRef.detectChanges())})()}handleAnchorTags(){var t=this;return(0,o.A)(function*(){if(t.anchorFeatureEnabled){const s=yield t.anchorService.getAnchorPathForContent(t.searchResultContent);s&&t.contentPath$.next(s)}})()}handleTrackAction(t,s,a){this.store.dispatch((0,T.k4)({url:window.location.href,key:"".concat(this.getTrackingBaseKey(s),"_").concat(t),params:this.getTrackingParams(s,a)}))}getTrackingBaseKey(t){return this.elementId||t&&"".concat(t.getContentType(),"_").concat(this.getType())||this.getType()}getTrackingParams(t,s){if(!(0,l.n7)(this.searchResult))return void console.error("search result component: tracking non-issues not supported");const a=(0,x.bJ)(this.searchResult.issue,this.publication),u=t&&(0,x.Gw)(t.getContentType())?(0,x.bJ)(t.issue,t.publication,null,"SOURCE_"):{},E=s?{"page-number":""+s.pageNumber,"page-index":""+s.pageIndex,"page-label":s.pageLabel,"page-title":s.pageTitle}:{};return{...super.getTrackingParams(),...u,...a,...E}}}return(n=h).type="search-result",n.\u0275fac=function(t){return new(t||n)(e.rXU(e.aKT),e.rXU(e.gRc),e.rXU(k.B),e.rXU(e.zZn),e.rXU(X.G),e.rXU(j.V),e.rXU(m.qQ),e.rXU(f.Wj),e.rXU(K.d),e.rXU(x.r6),e.rXU(V.i),e.rXU(N.X))},n.\u0275cmp=e.VBU({type:n,selectors:[["storefront-issue-search-result"]],hostVars:6,hostBindings:function(t,s){2&t&&(e.BMQ("content-type",s.contentType)("post-type",s.postType),e.AVh("locked",s.locked)("purchasable",s.purchasable))},features:[e.Jv_([k.B]),e.Vt3],decls:2,vars:2,consts:[["noAnchorTemplateCover",""],["noAnchorTemplateTitle",""],["noAnchorTemplateExcerpt",""],[4,"ngIf"],[1,"issue-image"],[3,"height"],[1,"issue-data"],[1,"issue-title"],[1,"issue-page-hits"],[4,"ngIf","ngIfElse"],[1,"issue-properties"],[3,"class",4,"ngFor","ngForOf"],[1,"issue-categories"],[1,"issue-tags"],[1,"issue-pub-date"],["class","issue-page-hits",3,"expanded",4,"ngIf"],[1,"issue-image",3,"click","href"],[3,"src","imageResolutionStrategy","height","extendedThumbnail"],[1,"issue-image",3,"click"],[3,"click","href"],["class","issue-page-hit-expand-toggle",3,"click",4,"ngIf"],[3,"class","href","click",4,"ngFor","ngForOf"],[1,"issue-page-hit-excerpt",3,"storefrontTranslate","storefrontTranslateArgs"],["class","issue-page-hit-page-label",3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[1,"issue-page-hit-page-label",3,"storefrontTranslate","storefrontTranslateArgs"],[3,"class","click",4,"ngFor","ngForOf"],[3,"click"],[1,"issue-page-hit-expand-toggle",3,"click"],["class","issue-page-hit-number",4,"ngIf"],[1,"issue-page-hit-text",3,"storefrontTranslate"],[1,"icon","icon-arrow-down"],[1,"issue-page-hit-number"]],template:function(t,s){1&t&&e.DNE(0,q,6,1,"ng-container",3)(1,me,20,15,"ng-container",3),2&t&&(e.Y8G("ngIf",s.ghost),e.R7$(),e.Y8G("ngIf",!s.ghost&&s.searchResultContent))},dependencies:[m.Sq,m.bT,$.h,Y.M,m.Jj,W.Z,B.w,Z],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-issue-search-result{display:flex;flex-direction:row;position:relative;background-color:#fff;overflow:hidden}storefront-issue-search-result:nth-child(n+2){margin-top:var(--gutter)}storefront-issue-search-result .issue-image storefront-image{width:100%}storefront-issue-search-result .issue-properties,storefront-issue-search-result .issue-categories,storefront-issue-search-result .issue-tags{display:none}storefront-issue-search-result .issue-properties .issue-tag,storefront-issue-search-result .issue-properties .issue-category,storefront-issue-search-result .issue-categories .issue-tag,storefront-issue-search-result .issue-categories .issue-category,storefront-issue-search-result .issue-tags .issue-tag,storefront-issue-search-result .issue-tags .issue-category{display:none}storefront-issue-search-result .issue-data{display:flex;flex-direction:row;overflow:hidden;flex-grow:1;width:75%;flex-wrap:wrap;align-content:flex-start}storefront-issue-search-result .issue-data .issue-title{margin:0}storefront-issue-search-result .issue-data .issue-state{display:none}storefront-issue-search-result .issue-data>*{max-width:100%}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit strong{font-weight:700}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit:nth-child(n+2){padding-top:var(--gutter)}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle{display:flex;justify-content:flex-end;align-items:center}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle .issue-page-hit-number{padding-right:4px}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle i{display:inline-block;transition:transform .3s ease;font-size:12px;padding:0 8px}storefront-issue-search-result .issue-data .issue-page-hits.expanded .issue-page-hit-expand-toggle i{transform:rotate(180deg)}storefront-issue-search-result[template=kiosk]{padding:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-image{width:25%}storefront-issue-search-result[template=kiosk] .issue-data{padding-left:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data .issue-state{display:flex;margin-left:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data .issue-state i{font-size:22px;height:22px;width:22px;color:var(--secondaryColor)}storefront-issue-search-result[template=kiosk] storefront-image[height-strategy=FIXED]{padding-top:133%}storefront-issue-search-result[template=feed] .issue-image{width:35%;flex-shrink:0}storefront-issue-search-result[template=feed] .issue-image storefront-image[height-strategy=FIXED]{padding-top:75%;height:100%}storefront-issue-search-result[template=feed] .issue-image storefront-image[height-strategy=FIXED]>img{object-fit:cover}storefront-issue-search-result[template=feed] .issue-data{padding:var(--gutter);width:65%}storefront-issue-search-result[template=feed] .issue-data .issue-page-hits .issue-page-hit .issue-page-hit-page-title{display:block;color:#000;margin-bottom:10px;font-weight:700;font-size:14px}storefront-issue-search-result[template=feed] .issue-data .issue-page-hits .issue-page-hit .issue-page-hit-page-label{display:none}storefront-issue-search-result.ghost{pointer-events:none}storefront-issue-search-result.ghost storefront-image{background-color:var(--ghostColor);animation:ghost-opacity 2s infinite linear}storefront-issue-search-result.ghost .issue-title,storefront-issue-search-result.ghost .issue-page-hits{color:transparent;border-radius:4px;width:100%;height:1.2em;background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear}@media (max-width: 330px) and (orientation: portrait),(max-height: 330px) and (orientation: landscape){storefront-issue-search-result.ghost .issue-title,storefront-issue-search-result.ghost .issue-page-hits{height:.8em}}storefront-issue-search-result.ghost .issue-title{margin:0 0 .5em}storefront-issue-search-result.ghost .issue-page-hits{height:3em}@media (max-width: 330px) and (orientation: portrait),(max-height: 330px) and (orientation: landscape){storefront-issue-search-result.ghost .issue-page-hits{height:2em}}storefront-issue-search-result.ghost[template=kiosk] storefront-image{padding-top:133%}@media (max-width: 533px) and (orientation: portrait){storefront-issue-search-result{flex-direction:column}storefront-issue-search-result .issue-data{width:100%}storefront-issue-search-result[template=kiosk] .issue-image{width:50%;margin:0 auto}storefront-issue-search-result[template=kiosk] .issue-image storefront-image{margin-bottom:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data{padding:0}storefront-issue-search-result[template=feed] .issue-data,storefront-issue-search-result[template=feed] .issue-image{width:100%}}\n'],encapsulation:2}),h})();var ve=r(6483),Ee=r(4403),Re=r(6953),Ce=r(6215),Te=r(4767);let xe=(()=>{var n;class h{}return(n=h).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[m.MD,Ee.U,ve.h,Re.n,Ce.O,Te.d]}),h})();const Ie=_e},6953:(M,R,r)=>{r.d(R,{n:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},2813:(M,R,r)=>{r.d(R,{Z:()=>p});var m=r(3178),o=r(3953);let p=(()=>{var g;class d{transform(v,U){return new Date(v).toLocaleDateString((0,m.JK)())}}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275pipe=o.EJ8({name:"storefrontDate",type:g,pure:!0}),d})()}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_issue-search-result_issue-search-result_module_ts"],{4767:(M,C,r)=>{r.d(C,{d:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},2914:(M,C,r)=>{r.d(C,{w:()=>d});var m=r(4049),o=r(7370),p=r(3953),g=r(9516);let d=(()=>{var f;class v{constructor(T){this.contextService=T}transform(T,O){if(!T||(0,o.vh)(T))return T;let I=T?(0,m.K)(T,O):"";const D=this.contextService.getIsCustomerDomainUsed()?"":"/".concat(this.contextService.getBrand(),"/"),P=new URL(window.location.href),_="true"===P.searchParams.get("preview")||0===P.pathname.indexOf("/preview");return"/"===I&&(I=""),I="".concat(D).concat(I).concat(_?"?preview=true":""),I}}return(f=v).\u0275fac=function(T){return new(T||f)(p.rXU(g.V,16))},f.\u0275pipe=p.EJ8({name:"urlTransform",type:f,pure:!0}),f.\u0275prov=p.jDH({token:f,factory:f.\u0275fac,providedIn:"root"}),v})()},2932:(M,C,r)=>{r.d(C,{h:()=>D,q:()=>P});var m=r(177),o=r(3953),p=r(8251),g=r(8890),d=r(9876),f=r(345),v=r(4748),U=r(9516),T=r(5102);const O=["image"];function I(_,k){if(1&_){const R=o.RV6();o.j41(0,"img",2,0),o.bIt("error",function(){o.eBV(R);const l=o.XpG();return o.Njj(l.onError())}),o.k0s()}if(2&_){const R=o.XpG();o.Y8G("priority",R.lcpPrioritized())("ngSrc",R.safeResizeSrc)("alt",R.alt)("title",R.title),o.BMQ("aria-label",R.ariaLabel)}}let D=(()=>{var _;class k{set image(c){c&&this.onLoad(c),this._image=c}get image(){return this._image}constructor(c,l,x,b,$,A,L,G){this.sanitizer=c,this.changeDetectorRef=l,this.elementRef=x,this.subscriptions=b,this.platformId=$,this.ssrService=A,this.contextService=L,this.purpleService=G,this.lcpPrioritized=(0,o.hFB)(!1),this.error=new o.bkB,this.height=P.AUTO}get empty(){return!this.src}ngOnInit(){this.initProperties(),(0,m.UE)(this.platformId)&&this.subscriptions.subscribe((0,g.eh)(this,this.elementRef,{skipWait:!1}),c=>this.load())}initProperties(){var c,l,x,b;this.alt=(null===(c=this.extendedThumbnail)||void 0===c?void 0:c.properties.alt)||(null===(l=this.extendedThumbnail)||void 0===l?void 0:l.properties.caption)||"",this.title=this.alt,this.ariaLabel=null!==(x=this.label)&&void 0!==x?x:this.alt,this.focalPoint=null===(b=this.extendedThumbnail)||void 0===b?void 0:b.properties.focuspoint}initAndLoad(){this.initProperties(),this.load()}load(){this.loaded||(this.loaded=!0,this.src&&this.update(),this.changeDetectorRef.detectChanges())}ngOnChanges(c){c.src&&this.loaded&&this.update()}update(){this.updateImageRatio(),this.updateResizeSrc()}onLoad(c){c.nativeElement.classList.add("loaded"),this.elementRef.nativeElement.classList.add("loaded"),this.changeDetectorRef.detectChanges(),c.nativeElement.addEventListener("load",()=>{this.updateImageRatio(!0,c),this.changeDetectorRef.markForCheck()}),c.nativeElement.addEventListener("error",function(){c.nativeElement.style.display="none",c.nativeElement.nextElementSibling&&(c.nativeElement.nextElementSibling.style.display="inline")}),this.purpleService.addImageSrc(this.resizeSrc)}onError(){if(!this.safeResizeSrc)return;const c=this.purpleService.getAlternativeSrc(this.src);var l;c&&c!==this.resizeSrc?(this.setResizeSrc(c),this.changeDetectorRef.detectChanges()):(null===(l=this.image)||void 0===l||l.nativeElement.classList.add("error"),this.elementRef.nativeElement.classList.add("error"),this.error.emit(this))}updateImageRatio(c=!1,l=this.image){this.imageRatio=this.height===P.AUTO?(0,d.z)(!c,null==l?void 0:l.nativeElement,this.src)+"%":void 0}updateResizeSrc(){this.setResizeSrc((0,d.G)(this.elementRef.nativeElement,this.src,this.imageResolutionStrategy,this.focalPoint)),this.changeDetectorRef.detectChanges()}setResizeSrc(c){const l=this.contextService.toResourceUrl(c);this.resizeSrc=l,this.safeResizeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(l)}}return(_=k).\u0275fac=function(c){return new(c||_)(o.rXU(f.up),o.rXU(o.gRc),o.rXU(o.aKT),o.rXU(p.v),o.rXU(o.Agw),o.rXU(v.i),o.rXU(U.V),o.rXU(T.Wj))},_.\u0275cmp=o.VBU({type:_,selectors:[["storefront-image"]],viewQuery:function(c,l){if(1&c&&o.GBs(O,5),2&c){let x;o.mGM(x=o.lsd())&&(l.image=x.first)}},hostAttrs:["ngSkipHydration","true"],hostVars:12,hostBindings:function(c,l){2&c&&(o.BMQ("src",l.src)("label",l.label)("resolution-strategy",l.imageResolutionStrategy)("alt",l.alt)("title",l.title)("aria-label",l.ariaLabel)("focal-point",l.focalPoint)("height-strategy",l.height),o.xc7("padding-top",l.imageRatio),o.AVh("empty",l.empty))},inputs:{src:"src",label:"label",extendedThumbnail:"extendedThumbnail",imageResolutionStrategy:"imageResolutionStrategy",lcpPrioritized:[1,"lcpPrioritized"],height:"height"},outputs:{error:"error"},features:[o.Jv_([p.v]),o.OA$],decls:1,vars:1,consts:[["image",""],["fill","true",3,"priority","ngSrc","alt","title","error",4,"ngIf"],["fill","true",3,"error","priority","ngSrc","alt","title"]],template:function(c,l){1&c&&o.DNE(0,I,2,5,"img",1),2&c&&o.Y8G("ngIf",l.loaded&&l.src)},dependencies:[m.bT,m.kt],styles:["storefront-image{display:flex;justify-content:center;align-items:center;position:relative;background-color:var(--imageLoadingColor);transition:.2s background-color ease-in}storefront-image[height-strategy=FIXED]>img,storefront-image[height-strategy=AUTO]>img{position:absolute;width:auto;max-width:100%;top:0;object-fit:contain}storefront-image[height-strategy=DEFAULT]>img{position:static!important}storefront-image.img-with-hidden-alt{content:attr(data-alt);display:none}storefront-image>img{display:block;transition:opacity .2s ease-in,background-color .2s ease-in;background-color:#fff0;max-width:100%;max-height:100%;opacity:0}storefront-image>img.loaded{opacity:1;background-color:var(--imageBackgroundColor)}storefront-image.loaded{background:#fff0}\n"],encapsulation:2,changeDetection:0}),k})();var P=function(_){return _.AUTO="AUTO",_.FIXED="FIXED",_.DEFAULT="DEFAULT",_}(P||{})},4403:(M,C,r)=>{r.d(C,{U:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},8609:(M,C,r)=>{r.r(C),r.d(C,{IssueSearchResultModule:()=>Pe,component:()=>ye});var m=r(177),o=r(467),p=r(4404),g=r(362),d=r(8179),f=r(5102),v=r(9745),U=r(2628),T=r(7010),O=r(4579),I=r(9085),D=r(8890);const P=(0,T.UX)(O.$);var k=r(8251),R=r(610),c=r(3178),l=r(5706),x=r(7879),b=r(1210),$=r(2932),A=function(s){return s.KIOSK="kiosk",s.FEED="feed",s}(A||{});const L={pageHitLimit:1,pageHitExcerptMessage:"SEARCH_RESULT_PAGE_HIT_EXCERPT",pageLabelMessage:"SEARCH_RESULT_PAGE_LABEL_MESSAGE"};var G=r(4412),e=r(3953),X=r(8004),j=r(9516),K=r(1652),V=r(4748),N=r(5820),Y=r(8909),W=r(2813),B=r(2914),z=r(5964),w=r(6697),Q=r(5558),J=r(1985);let Z=(()=>{var s;class u{constructor(t){this.urlTransformPipe=t}transform(t,n){return t.pipe((0,z.p)(a=>!!a),(0,w.s)(1),(0,Q.n)(a=>{const h=this.urlTransformPipe.transform(a,n);return new J.c(E=>{E.next(h),E.complete()})}))}}return(s=u).\u0275fac=function(t){return new(t||s)(e.rXU(B.w,16))},s.\u0275pipe=e.EJ8({name:"asyncUrlTransform",type:s,pure:!0}),u})();const H=s=>[s];function q(s,u){1&s&&(e.qex(0),e.j41(1,"div",4),e.nrm(2,"storefront-image",5),e.k0s(),e.j41(3,"div",6),e.nrm(4,"h3",7)(5,"div",8),e.k0s(),e.bVm()),2&s&&(e.R7$(2),e.Y8G("height","css"))}function ee(s,u){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"a",16),e.nI1(2,"urlTransform"),e.bIt("click",function(n){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickCover(n))}),e.nrm(3,"storefront-image",17),e.k0s(),e.bVm()}if(2&s){const i=u.ngIf,t=e.XpG(2);e.R7$(),e.Y8G("href",e.i5U(2,5,i,t.context),e.B4B),e.R7$(2),e.Y8G("src",t.searchResultContent.thumbnails.default)("imageResolutionStrategy",null==t.config?null:t.config.imageResolutionStrategy)("height",t.getImageHeight())("extendedThumbnail",null==t.searchResultContent||null==t.searchResultContent.thumbnailsExtended?null:t.searchResultContent.thumbnailsExtended.default)}}function te(s,u){if(1&s){const i=e.RV6();e.j41(0,"div",18),e.bIt("click",function(n){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickCover(n))}),e.nrm(1,"storefront-image",17),e.k0s()}if(2&s){const i=e.XpG(2);e.R7$(),e.Y8G("src",i.searchResultContent.thumbnails.default)("imageResolutionStrategy",null==i.config?null:i.config.imageResolutionStrategy)("height",i.getImageHeight())("extendedThumbnail",null==i.searchResultContent||null==i.searchResultContent.thumbnailsExtended?null:i.searchResultContent.thumbnailsExtended.default)}}function se(s,u){if(1&s&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&s){const i=u.$implicit;e.ZWY("issue-property issue-property-",i.key," issue-property-",i.key,"-",i.value,""),e.R7$(2),e.JRh(i.value),e.R7$(),e.ee0("'icon icon-",i.key," icon-",i.value," icon-",i.key,"-",i.value,"")}}function ne(s,u){if(1&s&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&s){const i=u.$implicit;e.ZvI("issue-category issue-category-",i,""),e.R7$(2),e.JRh(i),e.R7$(),e.ZvI("icon icon-",i,"")}}function ie(s,u){if(1&s&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.nrm(3,"i"),e.k0s()),2&s){const i=u.$implicit;e.ZvI("issue-tag issue-tag-",i,""),e.R7$(2),e.JRh(i),e.R7$(),e.ZvI("icon icon-",i,"")}}function re(s,u){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"a",19),e.nI1(2,"urlTransform"),e.bIt("click",function(n){e.eBV(i);const a=e.XpG(2);return e.Njj(a.onClickTitle(n))}),e.j41(3,"h3",7),e.EFF(4),e.k0s()(),e.bVm()}if(2&s){const i=u.ngIf,t=e.XpG(2);e.R7$(),e.Y8G("href",e.i5U(2,2,i,t.context),e.B4B),e.R7$(3),e.SpI(" ",t.searchResultContent.name," ")}}function ae(s,u){if(1&s&&(e.j41(0,"h3",7),e.EFF(1),e.k0s()),2&s){const i=e.XpG(2);e.R7$(),e.SpI(" ",i.searchResultContent.name," ")}}function oe(s,u){if(1&s&&e.nrm(0,"div",24),2&s){const i=e.XpG().$implicit;e.Y8G("storefrontTranslate",i.replacedExcerpt)("storefrontTranslateArgs",e.eq3(2,H,i.excerpt))}}function le(s,u){if(1&s&&e.nrm(0,"div",25),2&s){const i=e.XpG().$implicit,t=e.XpG(4);e.Y8G("storefrontTranslate",t.config.pageLabelMessage)("storefrontTranslateArgs",e.eq3(2,H,i.pageLabel))}}function ce(s,u){if(1&s){const i=e.RV6();e.j41(0,"a",19),e.nI1(1,"asyncUrlTransform"),e.nI1(2,"async"),e.bIt("click",function(n){const a=e.eBV(i).$implicit,h=e.XpG(4);return e.Njj(h.onClickPageHit(n,a))}),e.DNE(3,oe,1,4,"div",22)(4,le,1,4,"div",23),e.k0s()}if(2&s){const i=u.$implicit,t=e.XpG(4);e.ZvI("issue-page-hit issue-",t.searchResultContent.id,""),e.Y8G("href",e.bMT(2,9,e.i5U(1,6,t.getPageHitAnchorPath(i),t.context)),e.B4B),e.R7$(3),e.Y8G("ngIf",t.showExcerpts),e.R7$(),e.Y8G("ngIf",i.pageLabel&&"ISSUE"!==(null==t.searchResult?null:t.searchResult.contentType))}}function ue(s,u){if(1&s&&(e.qex(0),e.DNE(1,ce,5,11,"a",21),e.bVm()),2&s){const i=e.XpG(3);e.R7$(),e.Y8G("ngForOf",i.currentPageHits.slice(0,i.pageHitLimit))}}function he(s,u){if(1&s&&e.nrm(0,"div",24),2&s){const i=e.XpG().$implicit;e.Y8G("storefrontTranslate",i.replacedExcerpt)("storefrontTranslateArgs",e.eq3(2,H,i.excerpt))}}function ge(s,u){if(1&s&&e.nrm(0,"div",25),2&s){const i=e.XpG().$implicit,t=e.XpG(4);e.Y8G("storefrontTranslate",t.config.pageLabelMessage)("storefrontTranslateArgs",e.eq3(2,H,i.pageLabel))}}function pe(s,u){if(1&s){const i=e.RV6();e.j41(0,"div",27),e.bIt("click",function(n){const a=e.eBV(i).$implicit,h=e.XpG(4);return e.Njj(h.onClickPageHit(n,a))}),e.DNE(1,he,1,4,"div",22)(2,ge,1,4,"div",23),e.k0s()}if(2&s){const i=u.$implicit,t=e.XpG(4);e.ZvI("issue-page-hit issue-",t.searchResultContent.id,""),e.R7$(),e.Y8G("ngIf",t.showExcerpts),e.R7$(),e.Y8G("ngIf",i.pageLabel)}}function de(s,u){if(1&s&&e.DNE(0,pe,3,5,"div",26),2&s){const i=e.XpG(3);e.Y8G("ngForOf",i.currentPageHits.slice(0,i.pageHitLimit))}}function fe(s,u){if(1&s&&(e.j41(0,"span",32),e.EFF(1),e.k0s()),2&s){const i=e.XpG(4);e.R7$(),e.JRh(i.currentPageHits.length-i.pageHitLimit)}}function me(s,u){if(1&s){const i=e.RV6();e.j41(0,"div",28),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.onClickToggleExpanded())}),e.DNE(1,fe,2,1,"span",29),e.nrm(2,"span",30)(3,"i",31),e.k0s()}if(2&s){const i=e.XpG(3);e.R7$(),e.Y8G("ngIf",!i.pageHitExpanded),e.R7$(),e.Y8G("storefrontTranslate",i.pageHitExpanded?"SEARCH_RESULT_TOGGLE_COLLAPSE":"SEARCH_RESULT_TOGGLE_EXPAND")}}function _e(s,u){if(1&s&&(e.j41(0,"div",8),e.DNE(1,ue,2,1,"ng-container",9)(2,de,1,1,"ng-template",null,2,e.C5r)(4,me,4,2,"div",20),e.k0s()),2&s){const i=e.sdS(3),t=e.XpG(2);e.AVh("expanded",t.pageHitExpanded),e.R7$(),e.Y8G("ngIf",t.anchorFeatureEnabled)("ngIfElse",i),e.R7$(3),e.Y8G("ngIf",t.currentPageHits.length>t.config.pageHitLimit)}}function ve(s,u){if(1&s&&(e.qex(0),e.DNE(1,ee,4,8,"ng-container",9),e.nI1(2,"async"),e.DNE(3,te,2,4,"ng-template",null,0,e.C5r),e.j41(5,"div",10),e.DNE(6,se,4,12,"div",11),e.k0s(),e.j41(7,"div",12),e.DNE(8,ne,4,7,"div",11),e.k0s(),e.j41(9,"div",13),e.DNE(10,ie,4,7,"div",11),e.k0s(),e.j41(11,"div",6),e.DNE(12,re,5,5,"ng-container",9),e.nI1(13,"async"),e.DNE(14,ae,2,1,"ng-template",null,1,e.C5r),e.j41(16,"div",14),e.EFF(17),e.nI1(18,"storefrontDate"),e.k0s(),e.DNE(19,_e,5,5,"div",15),e.k0s(),e.bVm()),2&s){const i=e.sdS(4),t=e.sdS(15),n=e.XpG();e.R7$(),e.Y8G("ngIf",e.bMT(2,9,n.contentPath$))("ngIfElse",i),e.R7$(5),e.Y8G("ngForOf",n.visibleProperties),e.R7$(2),e.Y8G("ngForOf",n.searchResultCategories),e.R7$(2),e.Y8G("ngForOf",n.searchResultTags),e.R7$(2),e.Y8G("ngIf",e.bMT(13,11,n.contentPath$))("ngIfElse",t),e.R7$(5),e.SpI(" ",e.bMT(18,13,n.searchResultContent.publicationDate)," "),e.R7$(2),e.Y8G("ngIf",(null==n.currentPageHits?null:n.currentPageHits.length)>0)}}let Ee=(()=>{var s;class u extends b.${get contentType(){var t;return null===(t=this.searchResult)||void 0===t?void 0:t.contentType}get postType(){return this.searchResult&&(0,l.QO)(this.searchResult)?this.searchResult.post.postType:void 0}constructor(t,n,a,h,E,y,S,Se,F,De,be,Ae){super(h,t,y,S,F),this.elementRef=t,this.changeDetectorRef=n,this.store=a,this.injector=h,this.eventActionService=E,this.contextService=y,this.document=S,this.purpleService=Se,this.globalService=F,this.purpleEnv=De,this.ssrService=be,this.anchorService=Ae,this.defaultConfig={...L},this.pageHitsAnchorMap={},this.anchorPathCover=null,this.contentPath$=new G.t(null),this.pageHitExpanded=!1}get searchResultContent(){return this.searchResult?(0,l.tr)(this.searchResult):null}get searchResultCategories(){return this.taxonomies.filter(t=>"category"===t.type).map(t=>t.id)}get searchResultTags(){return this.taxonomies.filter(t=>"tag"===t.type).map(t=>t.id)}get taxonomies(){var t;return null!==(t=this.searchResultContent.taxonomies)&&void 0!==t?t:[]}get purchasable(){var t;return(null===(t=this.searchResultContent)||void 0===t?void 0:t.access)===p.Access.PURCHASABLE}ngOnInit(){this.anchorFeatureEnabled=this.anchorService.isAnchorFeatureEnabled(),this.anchorFeatureEnabled||this.contentPath$.next(null),super.ngOnInit()}onConfigChanges(){if(this.setPageHitLimit(),this.context[u.type]){this.searchResult=this.context[u.type],this.showExcerpts=this.searchResult.contentType!==p.CatalogContentType.POST;const t=this.searchResultContent;t&&this.handleSearchResult(t)}this.changeDetectorRef.markForCheck()}hasContextChanged(t){return!g(t[u.type],this.searchResult)||!g(t.issue,this.context.issue)||super.hasContextChanged(t)}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"pageHitExcerptMessage"]}onClickCover(t){var n=this;return(0,o.A)(function*(){n.processing.emit(!0),n.config.tapCover?(t.stopPropagation(),t.preventDefault(),yield n.handleOnClick(n.config.tapCover,n.currentPageHits[0],"COVER_CLICKED"),n.processing.emit(!1)):n.processing.emit(!1)})()}onClickTitle(t){var n=this;return(0,o.A)(function*(){n.onClickPageHit(t,n.currentPageHits[0])})()}onClickPageHit(t,n){var a=this;return(0,o.A)(function*(){a.processing.emit(!0),a.config.tapPageHit?(t.stopPropagation(),t.preventDefault(),yield a.handleOnClick(a.config.tapPageHit,n,"PAGE_HIT_CLICKED"),a.processing.emit(!1)):a.processing.emit(!1)})()}onClickToggleExpanded(){this.pageHitExpanded=!this.pageHitExpanded,this.setPageHitLimit(),this.changeDetectorRef.detectChanges()}handleOnClick(t,n,a){var h=this;return(0,o.A)(function*(){(0,l.xl)(h.searchResultContent)&&h.purpleService.getDownloadHandler(h.searchResultContent).then(y=>h.handleTrackAction(a,y,n));const E=h.createEventActionConfig(t,n);yield h.eventActionService.processEventAction(E,h)})()}createEventActionConfig(t,n){const a={...t};return a.type!==v.H.OPEN_CONTENT||((0,l.o$)(this.searchResult)?a.bundle||(a.bundle={bundleId:this.searchResultContent.id,postId:null==n?void 0:n.catalogContent.id}):(0,l.n7)(this.searchResult)&&(a.pageIndex=n.pageIndex,a.elementAlias=n.pageElementAlias)),a}getId(){var t;return null===(t=this.searchResultContent)||void 0===t?void 0:t.id}getData(){return this.searchResult}setPageHitLimit(){this.searchResult&&(this.pageHitLimit=this.pageHitExpanded?this.currentPageHits.length:this.config.pageHitLimit)}getPageHitId(t){return t.id}getPageTitle(t){if((0,d.Ol)(this.config.showPageTitle)){if((0,l.o$)(this.searchResult))return t.post.name;if((0,l.n7)(this.searchResult))return t.pageTitle}}getPageHitAnchorPath(t){if(this.anchorFeatureEnabled){const a=this.pageHitsAnchorMap[t.id];return this.anchorService.getAnchorPathForContent(t.catalogContent).then(h=>{h&&a.next(h)}),a}return null}getImageHeight(){return this.config.coverHeight||this.getDefaultImageHeight()}getDefaultImageHeight(){return this.template===A.KIOSK?$.q.AUTO:$.q.FIXED}isGhost(){return!this.searchResult}handleSearchResult(t){this.updateCurrentPageHits(this.searchResult),this.baseConfig.template||this.handleMissingTemplate(t),this.setComponentContext("issue",t),this.handleVisibleProperties(t),this.handleSubscribeTo(),this.handleAnchorTags()}updateCurrentPageHits(t){if(this.hasSearchResults(t)){switch(t.contentType){case p.CatalogContentType.ISSUE:this.currentPageHits=this.mapIssueSearchResult(t);break;case p.CatalogContentType.POST:this.currentPageHits=this.mapPostSearchResult(t);break;case p.CatalogContentType.BUNDLE:this.currentPageHits=this.mapBundleSearchResult(t);break;default:this.currentPageHits=[]}(0,f.GA)(this.searchResultContent,this.purpleService).then(n=>this.locked=n)}else this.currentPageHits=[]}hasSearchResults(t){if(!t)return!1;switch(t.contentType){case p.CatalogContentType.ISSUE:return t.pageHits.length>0;case p.CatalogContentType.POST:return t.excerpt.length>0;case p.CatalogContentType.BUNDLE:return t.posts.length>0;default:return!1}}mapIssueSearchResult(t){const n=this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage,a=new Array;return t.pageHits.forEach((h,E)=>{const y=(0,d.uQ)(n.slice(),{...this.context,index:E},this.contextService.$functions,this.globalService.getGlobalData()),S={id:"issue_page_".concat(E),catalogContent:t.issue,contentId:t.issue.id,pageTitle:h.pageTitle,pageLabel:h.pageLabel,pageIndex:h.pageIndex,pageNumber:h.pageNumber,elementAlias:h.elementAlias,excerpt:h.excerpt,replacedExcerpt:y};a.push(S),this.assertPageHitSubject(S)}),a}mapPostSearchResult(t){const a=(0,d.uQ)((this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage).slice(),{...this.context},this.contextService.$functions,this.globalService.getGlobalData()),h={id:"post_".concat(t.post.id),contentId:t.post.id,catalogContent:t.post,pageLabel:t.post.name,pageIndex:0,elementAlias:"",excerpt:t.excerpt,replacedExcerpt:a},E=new Array;return E.push(h),this.assertPageHitSubject(h),E}mapBundleSearchResult(t){const n=this.baseConfig.pageHitExcerptMessage||this.config.pageHitExcerptMessage,a=new Array;return t.posts.forEach((h,E)=>{const y=(0,d.uQ)(n.slice(),{...this.context,index:E},this.contextService.$functions,this.globalService.getGlobalData()),S={id:"post_".concat(h.post.id),contentId:h.post.id,catalogContent:h.post,pageLabel:h.post.name,pageIndex:0,elementAlias:"",excerpt:h.excerpt,replacedExcerpt:y};a.push(S),this.assertPageHitSubject(S)}),a}assertPageHitSubject(t){var n,a,h;null!==(h=(n=this.pageHitsAnchorMap)[a=t.id])&&void 0!==h||(n[a]=new G.t(null))}handleMissingTemplate(t){(0,l.xl)(t)?this.config.template=t.type===p.IssueType.ISSUE?A.KIOSK:A.FEED:(0,l.mF)(t)&&(this.config.template=A.FEED)}handleVisibleProperties(t){var n;this.visibleProperties=(null!==(n=this.config.renderProperties)&&void 0!==n?n:[]).map(a=>(0,d.v3)(a)).filter(a=>!!a&&void 0!==t.properties[a]).map(a=>({key:a,value:t.properties[a]}))}handleSubscribeTo(){this.store.subscribe((0,D.eh)(this,this.elementRef,{skipWait:this.purpleEnv.isUniversal&&!this.ssrService.currentPrebootStatus}),t=>{this.loadIssueState(),this.loadPublication()},c.lQ,c.lQ,"visible")}loadIssueState(){(0,l.xl)(this.searchResultContent)&&this.baseConfig.stateful&&(this.installState=this.searchResultContent.state,this.store.select(function _(s){return u=>u.select(P).pipe((0,I.E)(s),D.TM,(0,D.ZE)())}(this.searchResultContent.id),t=>this.installState=t,c.lQ,c.lQ,"issue-state"),this.store.dispatch((0,U.Uo)({issues:[this.searchResultContent]})))}loadPublication(){var t=this;return(0,o.A)(function*(){t.searchResultContent&&(t.publication=yield t.purpleService.getPublication(t.searchResultContent.publicationId),t.changeDetectorRef.detectChanges())})()}handleAnchorTags(){var t=this;return(0,o.A)(function*(){if(t.anchorFeatureEnabled){const n=yield t.anchorService.getAnchorPathForContent(t.searchResultContent);n&&t.contentPath$.next(n)}})()}handleTrackAction(t,n,a){this.store.dispatch((0,R.k4)({url:window.location.href,key:"".concat(this.getTrackingBaseKey(n),"_").concat(t),params:this.getTrackingParams(n,a)}))}getTrackingBaseKey(t){return this.elementId||t&&"".concat(t.getContentType(),"_").concat(this.getType())||this.getType()}getTrackingParams(t,n){if(!(0,l.n7)(this.searchResult))return void console.error("search result component: tracking non-issues not supported");const a=(0,x.bJ)(this.searchResult.issue,this.publication),h=t&&(0,x.Gw)(t.getContentType())?(0,x.VP)(t.content,t.publication,null,"SOURCE_"):{},E=n?{"page-number":""+n.pageNumber,"page-index":""+n.pageIndex,"page-label":n.pageLabel,"page-title":n.pageTitle}:{};return{...super.getTrackingParams(),...h,...a,...E}}}return(s=u).type="search-result",s.\u0275fac=function(t){return new(t||s)(e.rXU(e.aKT),e.rXU(e.gRc),e.rXU(k.B),e.rXU(e.zZn),e.rXU(X.G),e.rXU(j.V),e.rXU(m.qQ),e.rXU(f.Wj),e.rXU(K.d),e.rXU(x.r6),e.rXU(V.i),e.rXU(N.X))},s.\u0275cmp=e.VBU({type:s,selectors:[["storefront-issue-search-result"]],hostVars:6,hostBindings:function(t,n){2&t&&(e.BMQ("content-type",n.contentType)("post-type",n.postType),e.AVh("locked",n.locked)("purchasable",n.purchasable))},features:[e.Jv_([k.B]),e.Vt3],decls:2,vars:2,consts:[["noAnchorTemplateCover",""],["noAnchorTemplateTitle",""],["noAnchorTemplateExcerpt",""],[4,"ngIf"],[1,"issue-image"],[3,"height"],[1,"issue-data"],[1,"issue-title"],[1,"issue-page-hits"],[4,"ngIf","ngIfElse"],[1,"issue-properties"],[3,"class",4,"ngFor","ngForOf"],[1,"issue-categories"],[1,"issue-tags"],[1,"issue-pub-date"],["class","issue-page-hits",3,"expanded",4,"ngIf"],[1,"issue-image",3,"click","href"],[3,"src","imageResolutionStrategy","height","extendedThumbnail"],[1,"issue-image",3,"click"],[3,"click","href"],["class","issue-page-hit-expand-toggle",3,"click",4,"ngIf"],[3,"class","href","click",4,"ngFor","ngForOf"],["class","issue-page-hit-excerpt",3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],["class","issue-page-hit-page-label",3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[1,"issue-page-hit-excerpt",3,"storefrontTranslate","storefrontTranslateArgs"],[1,"issue-page-hit-page-label",3,"storefrontTranslate","storefrontTranslateArgs"],[3,"class","click",4,"ngFor","ngForOf"],[3,"click"],[1,"issue-page-hit-expand-toggle",3,"click"],["class","issue-page-hit-number",4,"ngIf"],[1,"issue-page-hit-text",3,"storefrontTranslate"],[1,"icon","icon-arrow-down"],[1,"issue-page-hit-number"]],template:function(t,n){1&t&&e.DNE(0,q,6,1,"ng-container",3)(1,ve,20,15,"ng-container",3),2&t&&(e.Y8G("ngIf",n.ghost),e.R7$(),e.Y8G("ngIf",!n.ghost&&n.searchResultContent))},dependencies:[m.Sq,m.bT,$.h,Y.M,m.Jj,W.Z,B.w,Z],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-issue-search-result{display:flex;flex-direction:row;position:relative;background-color:#fff;overflow:hidden}storefront-issue-search-result:nth-child(n+2){margin-top:var(--gutter)}storefront-issue-search-result .issue-image storefront-image{width:100%}storefront-issue-search-result .issue-properties,storefront-issue-search-result .issue-categories,storefront-issue-search-result .issue-tags{display:none}storefront-issue-search-result .issue-properties .issue-tag,storefront-issue-search-result .issue-properties .issue-category,storefront-issue-search-result .issue-categories .issue-tag,storefront-issue-search-result .issue-categories .issue-category,storefront-issue-search-result .issue-tags .issue-tag,storefront-issue-search-result .issue-tags .issue-category{display:none}storefront-issue-search-result .issue-data{display:flex;flex-direction:row;overflow:hidden;flex-grow:1;width:75%;flex-wrap:wrap;align-content:flex-start}storefront-issue-search-result .issue-data .issue-title{margin:0}storefront-issue-search-result .issue-data .issue-state{display:none}storefront-issue-search-result .issue-data>*{max-width:100%}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit strong{font-weight:700}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit:nth-child(n+2){padding-top:var(--gutter)}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle{display:flex;justify-content:flex-end;align-items:center}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle .issue-page-hit-number{padding-right:4px}storefront-issue-search-result .issue-data .issue-page-hits .issue-page-hit-expand-toggle i{display:inline-block;transition:transform .3s ease;font-size:12px;padding:0 8px}storefront-issue-search-result .issue-data .issue-page-hits.expanded .issue-page-hit-expand-toggle i{transform:rotate(180deg)}storefront-issue-search-result[template=kiosk]{padding:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-image{width:25%}storefront-issue-search-result[template=kiosk] .issue-data{padding-left:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data .issue-state{display:flex;margin-left:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data .issue-state i{font-size:22px;height:22px;width:22px;color:var(--secondaryColor)}storefront-issue-search-result[template=kiosk] storefront-image[height-strategy=FIXED]{padding-top:133%}storefront-issue-search-result[template=feed] .issue-image{width:35%;flex-shrink:0}storefront-issue-search-result[template=feed] .issue-image storefront-image[height-strategy=FIXED]{padding-top:75%;height:100%}storefront-issue-search-result[template=feed] .issue-image storefront-image[height-strategy=FIXED]>img{object-fit:cover}storefront-issue-search-result[template=feed] .issue-data{padding:var(--gutter);width:65%}storefront-issue-search-result[template=feed] .issue-data .issue-page-hits .issue-page-hit .issue-page-hit-page-title{display:block;color:#000;margin-bottom:10px;font-weight:700;font-size:14px}storefront-issue-search-result[template=feed] .issue-data .issue-page-hits .issue-page-hit .issue-page-hit-page-label{display:none}storefront-issue-search-result.ghost{pointer-events:none}storefront-issue-search-result.ghost storefront-image{background-color:var(--ghostColor);animation:ghost-opacity 2s infinite linear}storefront-issue-search-result.ghost .issue-title,storefront-issue-search-result.ghost .issue-page-hits{color:transparent;border-radius:4px;width:100%;height:1.2em;background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear}@media (max-width: 330px) and (orientation: portrait),(max-height: 330px) and (orientation: landscape){storefront-issue-search-result.ghost .issue-title,storefront-issue-search-result.ghost .issue-page-hits{height:.8em}}storefront-issue-search-result.ghost .issue-title{margin:0 0 .5em}storefront-issue-search-result.ghost .issue-page-hits{height:3em}@media (max-width: 330px) and (orientation: portrait),(max-height: 330px) and (orientation: landscape){storefront-issue-search-result.ghost .issue-page-hits{height:2em}}storefront-issue-search-result.ghost[template=kiosk] storefront-image{padding-top:133%}@media (max-width: 533px) and (orientation: portrait){storefront-issue-search-result{flex-direction:column}storefront-issue-search-result .issue-data{width:100%}storefront-issue-search-result[template=kiosk] .issue-image{width:50%;margin:0 auto}storefront-issue-search-result[template=kiosk] .issue-image storefront-image{margin-bottom:var(--gutter)}storefront-issue-search-result[template=kiosk] .issue-data{padding:0}storefront-issue-search-result[template=feed] .issue-data,storefront-issue-search-result[template=feed] .issue-image{width:100%}}\n'],encapsulation:2}),u})();var Ce=r(6483),Re=r(4403),Te=r(6953),xe=r(6215),Ie=r(4767);let Pe=(()=>{var s;class u{}return(s=u).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[m.MD,Re.U,Ce.h,Te.n,xe.O,Ie.d]}),u})();const ye=Ee},6953:(M,C,r)=>{r.d(C,{n:()=>p});var m=r(177),o=r(3953);let p=(()=>{var g;class d{}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275mod=o.$C({type:g}),g.\u0275inj=o.G2t({imports:[m.MD]}),d})()},2813:(M,C,r)=>{r.d(C,{Z:()=>p});var m=r(3178),o=r(3953);let p=(()=>{var g;class d{transform(v,U){return new Date(v).toLocaleDateString((0,m.JK)())}}return(g=d).\u0275fac=function(v){return new(v||g)},g.\u0275pipe=o.EJ8({name:"storefrontDate",type:g,pure:!0}),d})()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_login_login_module_ts"],{3911:(ut,_,s)=>{s.r(_),s.d(_,{LoginModule:()=>rt,component:()=>st});var v=s(177),d=s(467),u=s(4404),I=s(8251),g=s(610),y=s(1210);const G={logoutButton:!0,password:!0,userInputType:"text"};var p=s(9745),m=s(8179),R=s(8091),x=s(873),N=s(5964),M=s(4074),D=s(4049),S=s(7879),t=s(3953),A=s(20),B=s(9516),U=s(8004),k=s(4559),j=s(8471),b=s(6350),X=s(1652),f=s(4341),P=s(7240),V=s(8909),E=s(6600),Y=s(6067);function H(i,a){1&i&&(t.j41(0,"p"),t.eu8(1,9),t.k0s())}function w(i,a){1&i&&(t.j41(0,"p"),t.eu8(1,10),t.k0s())}function K(i,a){if(1&i){const o=t.RV6();t.j41(0,"i",14),t.bIt("click",function(){t.eBV(o);const n=t.XpG(3);return t.Njj(n.username="")}),t.k0s()}}function $(i,a){if(1&i){const o=t.RV6();t.j41(0,"div",11)(1,"input",12),t.nI1(2,"storefrontTranslate"),t.nI1(3,"async"),t.mxI("ngModelChange",function(n){t.eBV(o);const r=t.XpG(2);return t.DH7(r.username,n)||(r.username=n),t.Njj(n)}),t.k0s(),t.DNE(4,K,1,0,"i",13),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.R50("ngModel",o.username),t.Y8G("placeholder",t.bMT(3,6,t.bMT(2,4,"LOGIN_USERNAME_PLACEHOLDER")))("type",o.config&&o.config.userInputType),t.R7$(3),t.Y8G("ngIf",o.username&&o.username.length)}}function F(i,a){if(1&i){const o=t.RV6();t.j41(0,"i",17),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(3);return t.Njj(r.onClickReveal(n))}),t.k0s()}if(2&i){const o=t.XpG(3);t.AVh("active",o.revealPassword)}}function Z(i,a){if(1&i){const o=t.RV6();t.j41(0,"div",11)(1,"input",15),t.nI1(2,"storefrontTranslate"),t.nI1(3,"async"),t.mxI("ngModelChange",function(n){t.eBV(o);const r=t.XpG(2);return t.DH7(r.password,n)||(r.password=n),t.Njj(n)}),t.k0s(),t.DNE(4,F,1,2,"i",16),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("type",o.revealPassword?"text":"password"),t.R50("ngModel",o.password),t.Y8G("placeholder",t.bMT(3,6,t.bMT(2,4,"LOGIN_PASSWORD_PLACEHOLDER"))),t.R7$(3),t.Y8G("ngIf",o.password&&o.password.length)}}function z(i,a){if(1&i){const o=t.RV6();t.j41(0,"button",18),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(2);return t.Njj(r.onRegister(n))}),t.nrm(1,"span",19),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslate",o.registerButtonMessage)}}function J(i,a){1&i&&t.nrm(0,"storefront-spinner",20)}function Q(i,a){if(1&i){const o=t.RV6();t.qex(0),t.nrm(1,"h1",1),t.DNE(2,H,2,0,"p",0)(3,w,2,0,"p",0),t.j41(4,"form"),t.DNE(5,$,5,8,"div",2)(6,Z,5,8,"div",2),t.nrm(7,"p",3),t.j41(8,"div",4),t.DNE(9,z,2,1,"button",5),t.k0s()(),t.j41(10,"button",6),t.bIt("click",function(n){t.eBV(o);const r=t.XpG();return t.Njj(r.onLogin(n))}),t.nrm(11,"span",7),t.DNE(12,J,1,0,"storefront-spinner",8),t.k0s(),t.bVm()}if(2&i){const o=t.XpG();t.R7$(2),t.Y8G("ngIf",!o.isRelogin),t.R7$(),t.Y8G("ngIf",o.isRelogin),t.R7$(2),t.Y8G("ngIf",!o.isOauth),t.R7$(),t.Y8G("ngIf",o.config&&o.config.password&&!o.isOauth),t.R7$(3),t.Y8G("ngIf",o.config&&o.config.registerButton),t.R7$(),t.Y8G("disabled",!o.isValid()),t.R7$(2),t.Y8G("ngIf",o.loading)}}function W(i,a){1&i&&t.nrm(0,"storefront-spinner",20)}function q(i,a){if(1&i){const o=t.RV6();t.j41(0,"button",25),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(2);return t.Njj(r.onLogout(n))}),t.nrm(1,"span",19),t.DNE(2,W,1,0,"storefront-spinner",8),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslate",o.logoutButtonMessage),t.R7$(),t.Y8G("ngIf",o.loading)}}function tt(i,a){if(1&i&&(t.qex(0),t.nrm(1,"h1",21)(2,"p",22),t.j41(3,"form"),t.nrm(4,"p",23),t.j41(5,"div",4),t.DNE(6,q,3,2,"button",24),t.k0s()(),t.bVm()),2&i){const o=t.XpG();t.R7$(6),t.Y8G("ngIf",o.config&&o.config.logoutButton)}}let nt=(()=>{var i;class a extends y.${get loggedIn(){return this.metadata[u.METADATA_KEY.ENTITLEMENT_TOKEN]&&"relogin"!==this.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE]}constructor(e,n,r,c,l,h,T,L,at,C,ct,lt,O,gt){super(r,c,l,C,O),this.store=e,this.dialog=n,this.injector=r,this.elementRef=c,this.contextService=l,this.changeDetectorRef=h,this.eventActionService=T,this.router=L,this.ngZone=at,this.document=C,this.purpleService=ct,this.cacheService=lt,this.globalService=O,this.purpleEnv=gt,this.defaultConfig={...G},this.registerButtonMessage="",this.logoutButtonMessage="",this.revealPassword=!1,this.loading=!1,this.metadata={}}ngOnInit(){var e=()=>super.ngOnInit,n=this;return(0,d.A)(function*(){e().call(n),n.contextService.viewContext$.pipe((0,N.p)(r=>!n.loading)).subscribe(r=>n.metadata=n.contextService.getMetadata()),n.hasNavigated=n.contextService.navigationCount>0,n.metadata=yield n.purpleService.getMetadata(Object.keys(n.metadata)),n.displayMode=yield n.purpleService.getDisplayMode(),n.isOauth=n.metadata[u.METADATA_KEY.ENTITLEMENT_MODE]===u.ENTITLEMENT_MODE.OAUTH,n.isRelogin="relogin"===n.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE],n.changeDetectorRef.detectChanges()})()}onConfigChanges(){super.onConfigChanges(),this.setRegisterButton(),this.setLogoutButton()}processEventAction(e){var n=this;return(0,d.A)(function*(){if(yield n.contextService.updateMetadata(),yield n.contextService.updateParamsContext(),e=(0,m.uQ)(e,n.context,n.contextService.$functions,n.globalService.getGlobalData()),(0,m.Ol)(e)&&(e="value"in e?e.value:e,yield n.eventActionService.processEventAction(e,n),n.loading=!1,[p.H.REGISTER,p.H.NAVIGATE,p.H.COUPON,p.H.SUBSCRIPTIONS].includes(e.type)))return!0;if(n.hasNavigated)window.history.back();else if(n.displayMode===u.DisplayMode.MODAL)n.purpleService.closeView();else{const r=n.contextService.getIsCustomerDomainUsed()?"/":n.contextService.getBrand();n.ngZone.run(()=>n.router.navigate([r],{queryParamsHandling:"merge",replaceUrl:!0}))}return!1})()}calculateRedirectPath(e){var n=this;return(0,d.A)(function*(){if(e=(0,m.uQ)(e,n.context,n.contextService.$functions,n.globalService.getGlobalData()),(0,m.Ol)(e)&&(e="value"in e?e.value:e).type==p.H.NAVIGATE){var r;const c=(0,D.K)(null!==(r=e.url)&&void 0!==r?r:e.path,n.getContext(),!1);return(yield n.contextService.getIsCustomDomainUsed())?"/".concat(c):"/".concat(n.contextService.getBrand(),"/").concat(c)}return null})()}onLogin(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.isOauth||(n.loading=!0);try{var r,c;const l=n.isOauth?yield n.calculateRedirectPath(n.config.onSuccess):null;if(yield n.purpleService.login(null===(r=n.username)||void 0===r?void 0:r.trim(),n.config.password?null===(c=n.password)||void 0===c?void 0:c.trim():x.B6,{redirectUrl:l}),n.username&&n.cacheService.bustApiCache(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_CLICKED"})),n.config.accountLogin){const h=(0,M.J)(n.username.trim()),{token:T}=yield n.purpleService.getAccountUserData();if(T)try{console.debug("Old account token detected: "+T+", logging out"),yield n.purpleService.logoutAccount()}catch(L){console.warn("Logout before new login failed: ",L)}yield n.purpleService.loginAccount(h),n.config.accountLogin.assignLocalPurchases&&(yield n.purpleService.assignLocalPurchases(n.config.accountLogin.assignLocalPurchases)),yield n.contextService.updateAccountData()}if(n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_SUCCEEDED"})),"modal"===n.context.outlet){const h=(yield n.contextService.getIsCustomDomainUsed())?"/":n.contextService.getBrand();n.router.navigateByUrl(h,{skipLocationChange:!0}).then(()=>{n.router.navigate([h,{outlets:{modal:null}}],{queryParamsHandling:"merge"})})}if(n.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE])n.purpleService.closeView();else if(yield n.processEventAction(n.config.onSuccess))return}catch(l){n.loading=!1,console.error("error on login:",l),n.metadata=n.contextService.getMetadata(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_FAILED"})),n.dialog.alert({text:"ERROR_LOGIN",args:[l.code||(0,R.xn)(l.message)]},"DIALOG_ERROR")}n.changeDetectorRef.detectChanges()})()}onLogout(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.loading=!0,n.username="",n.password="",n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_CLICKED"}));try{const r=n.isOauth?yield n.calculateRedirectPath(n.config.onLogout):null;if(yield n.purpleService.logout({redirectUrl:r}),n.cacheService.bustApiCache(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_SUCCEEDED"})),"modal"===n.context.outlet){const c=(yield n.contextService.getIsCustomDomainUsed())?"/":n.contextService.getBrand();n.router.navigateByUrl(c,{skipLocationChange:!0}).then(()=>{n.router.navigate([c,{outlets:{modal:null}}],{queryParamsHandling:"merge"})})}if(yield n.processEventAction(n.config.onLogout))return}catch(r){n.loading=!1,n.metadata=n.contextService.getMetadata(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_FAILED"})),n.dialog.alert({text:"ERROR_LOGOUT",args:[r.code]},"DIALOG_ERROR")}n.changeDetectorRef.detectChanges()})()}onRegister(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"REGISTER_CLICKED"})),n.eventActionService.processRegisterAction({type:p.H.REGISTER},n)})()}onClickReveal(e){e.stopPropagation(),e.preventDefault(),this.revealPassword=!this.revealPassword}onClickLink(e){e.target.href&&!this.isOauth&&setTimeout(()=>{this.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_LINK_CLICKED",params:{TARGET_URL:e.target.href}}))},100)}isValid(){return this.metadata&&!this.loading&&(this.isOauth||this.username&&this.username.length&&(!this.config.password||this.password&&this.password.length))}setLogoutButton(){if(this.config&&this.config.logoutButton)if("string"==typeof this.config.logoutButton)this.logoutButtonMessage=this.config.logoutButton;else if("object"==typeof this.config.logoutButton){var e;this.logoutButtonMessage=null===(e=(0,m.v3)(this.config.logoutButton))||void 0===e?void 0:e.toString()}else this.logoutButtonMessage="LOGIN_LOGOUT_BUTTON"}setRegisterButton(){if(this.config&&this.config.registerButton)if("string"==typeof this.config.registerButton)this.registerButtonMessage=this.config.registerButton;else if("object"==typeof this.config.registerButton){var e;this.registerButtonMessage=null===(e=(0,m.v3)(this.config.registerButton))||void 0===e?void 0:e.toString()}else this.registerButtonMessage="LOGIN_REGISTER_BUTTON"}}return(i=a).type="login",i.\u0275fac=function(e){return new(e||i)(t.rXU(I.B),t.rXU(A.o),t.rXU(t.zZn),t.rXU(t.aKT),t.rXU(B.V),t.rXU(t.gRc),t.rXU(U.G),t.rXU(k.Ix),t.rXU(t.SKi),t.rXU(v.qQ),t.rXU(j.Wj),t.rXU(b._),t.rXU(X.d),t.rXU(S.r6))},i.\u0275cmp=t.VBU({type:i,selectors:[["storefront-login"]],hostVars:2,hostBindings:function(e,n){1&e&&t.bIt("click",function(c){return n.onClickLink(c)}),2&e&&t.AVh("logged-in",n.loggedIn)},features:[t.Jv_([I.B]),t.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],["storefrontTranslate","LOGIN_TITLE"],["class","input",4,"ngIf"],["storefrontTranslate","LOGIN_HELP"],[1,"login-actions"],["class","login-register","mat-ripple","",3,"click",4,"ngIf"],["mat-ripple","",1,"login-submit",3,"click","disabled"],["storefrontTranslate","LOGIN_SUBMIT_BUTTON"],["class","button-spinner",4,"ngIf"],["storefrontTranslate","LOGIN_TEASER"],["storefrontTranslate","LOGIN_TEASER_RELOGIN"],[1,"input"],["name","username",3,"ngModelChange","ngModel","placeholder","type"],["class","icon icon-delete",3,"click",4,"ngIf"],[1,"icon","icon-delete",3,"click"],["name","password",3,"ngModelChange","type","ngModel","placeholder"],["class","icon icon-eye",3,"active","click",4,"ngIf"],[1,"icon","icon-eye",3,"click"],["mat-ripple","",1,"login-register",3,"click"],[3,"storefrontTranslate"],[1,"button-spinner"],["storefrontTranslate","LOGIN_LOGOUT_TITLE"],["storefrontTranslate","LOGIN_LOGOUT_TEASER"],["storefrontTranslate","LOGIN_LOGOUT_HELP"],["class","login-logout","mat-ripple","",3,"click",4,"ngIf"],["mat-ripple","",1,"login-logout",3,"click"]],template:function(e,n){1&e&&t.DNE(0,Q,13,7,"ng-container",0)(1,tt,7,1,"ng-container",0),2&e&&(t.Y8G("ngIf",n.config&&!n.loggedIn),t.R7$(),t.Y8G("ngIf",n.config&&n.loggedIn))},dependencies:[v.bT,f.qT,f.me,f.BC,f.cb,f.vS,f.cV,P.t,V.M,E.r6,v.Jj,Y.D],styles:["storefront-login{display:block;padding:var(--loginPaddingVert) var(--loginPaddingHoriz)}storefront-login h1{text-align:center}storefront-login h1,storefront-login p,storefront-login h3,storefront-login .input{margin:var(--loginElementMarginVert) var(--loginElementMarginHoriz)}storefront-login p a{color:var(--primaryColor)}storefront-login form{display:flex;flex-direction:column}storefront-login form .input{position:relative}storefront-login form .input .icon{display:flex;position:absolute;top:0;right:0;color:#000;height:100%;padding:0 var(--gutter);justify-content:center;align-items:center;width:50px}storefront-login form .input .icon.active{opacity:.3}storefront-login form .input input{padding-right:50px}storefront-login form input,storefront-login form .login-actions{display:flex}storefront-login .login-submit{width:100%;position:relative}storefront-login button{background-color:var(--primaryColor);color:#fff;width:50%;flex-basis:0;flex-shrink:0;flex-grow:1}storefront-login button+button{margin-left:calc(var(--gutter) / 2)}storefront-login button.login-register{background-color:var(--secondaryColor)}storefront-login button[disabled]{opacity:.5}\n"],encapsulation:2}),a})();var et=s(6483),ot=s(6215),it=s(1605);let rt=(()=>{var i;class a{}return(i=a).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[v.MD,f.YN,ot.O,et.h,it.P,E.pZ]}),a})();const st=nt}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_login_login_module_ts"],{3911:(ut,_,s)=>{s.r(_),s.d(_,{LoginModule:()=>rt,component:()=>st});var v=s(177),d=s(467),u=s(4404),I=s(8251),g=s(610),y=s(1210);const G={logoutButton:!0,password:!0,userInputType:"text"};var p=s(9745),m=s(8179),R=s(8091),x=s(873),N=s(5964),M=s(4074),D=s(4049),S=s(7879),t=s(3953),A=s(20),B=s(9516),U=s(8004),k=s(4559),j=s(5102),b=s(6350),X=s(1652),f=s(4341),P=s(7240),V=s(8909),E=s(6600),Y=s(8448);function H(i,a){1&i&&(t.j41(0,"p"),t.eu8(1,9),t.k0s())}function w(i,a){1&i&&(t.j41(0,"p"),t.eu8(1,10),t.k0s())}function K(i,a){if(1&i){const o=t.RV6();t.j41(0,"i",14),t.bIt("click",function(){t.eBV(o);const n=t.XpG(3);return t.Njj(n.username="")}),t.k0s()}}function $(i,a){if(1&i){const o=t.RV6();t.j41(0,"div",11)(1,"input",12),t.nI1(2,"storefrontTranslate"),t.nI1(3,"async"),t.mxI("ngModelChange",function(n){t.eBV(o);const r=t.XpG(2);return t.DH7(r.username,n)||(r.username=n),t.Njj(n)}),t.k0s(),t.DNE(4,K,1,0,"i",13),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.R50("ngModel",o.username),t.Y8G("placeholder",t.bMT(3,6,t.bMT(2,4,"LOGIN_USERNAME_PLACEHOLDER")))("type",o.config&&o.config.userInputType),t.R7$(3),t.Y8G("ngIf",o.username&&o.username.length)}}function F(i,a){if(1&i){const o=t.RV6();t.j41(0,"i",17),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(3);return t.Njj(r.onClickReveal(n))}),t.k0s()}if(2&i){const o=t.XpG(3);t.AVh("active",o.revealPassword)}}function Z(i,a){if(1&i){const o=t.RV6();t.j41(0,"div",11)(1,"input",15),t.nI1(2,"storefrontTranslate"),t.nI1(3,"async"),t.mxI("ngModelChange",function(n){t.eBV(o);const r=t.XpG(2);return t.DH7(r.password,n)||(r.password=n),t.Njj(n)}),t.k0s(),t.DNE(4,F,1,2,"i",16),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("type",o.revealPassword?"text":"password"),t.R50("ngModel",o.password),t.Y8G("placeholder",t.bMT(3,6,t.bMT(2,4,"LOGIN_PASSWORD_PLACEHOLDER"))),t.R7$(3),t.Y8G("ngIf",o.password&&o.password.length)}}function z(i,a){if(1&i){const o=t.RV6();t.j41(0,"button",18),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(2);return t.Njj(r.onRegister(n))}),t.nrm(1,"span",19),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslate",o.registerButtonMessage)}}function J(i,a){1&i&&t.nrm(0,"storefront-spinner",20)}function Q(i,a){if(1&i){const o=t.RV6();t.qex(0),t.nrm(1,"h1",1),t.DNE(2,H,2,0,"p",0)(3,w,2,0,"p",0),t.j41(4,"form"),t.DNE(5,$,5,8,"div",2)(6,Z,5,8,"div",2),t.nrm(7,"p",3),t.j41(8,"div",4),t.DNE(9,z,2,1,"button",5),t.k0s()(),t.j41(10,"button",6),t.bIt("click",function(n){t.eBV(o);const r=t.XpG();return t.Njj(r.onLogin(n))}),t.nrm(11,"span",7),t.DNE(12,J,1,0,"storefront-spinner",8),t.k0s(),t.bVm()}if(2&i){const o=t.XpG();t.R7$(2),t.Y8G("ngIf",!o.isRelogin),t.R7$(),t.Y8G("ngIf",o.isRelogin),t.R7$(2),t.Y8G("ngIf",!o.isOauth),t.R7$(),t.Y8G("ngIf",o.config&&o.config.password&&!o.isOauth),t.R7$(3),t.Y8G("ngIf",o.config&&o.config.registerButton),t.R7$(),t.Y8G("disabled",!o.isValid()),t.R7$(2),t.Y8G("ngIf",o.loading)}}function W(i,a){1&i&&t.nrm(0,"storefront-spinner",20)}function q(i,a){if(1&i){const o=t.RV6();t.j41(0,"button",25),t.bIt("click",function(n){t.eBV(o);const r=t.XpG(2);return t.Njj(r.onLogout(n))}),t.nrm(1,"span",19),t.DNE(2,W,1,0,"storefront-spinner",8),t.k0s()}if(2&i){const o=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslate",o.logoutButtonMessage),t.R7$(),t.Y8G("ngIf",o.loading)}}function tt(i,a){if(1&i&&(t.qex(0),t.nrm(1,"h1",21)(2,"p",22),t.j41(3,"form"),t.nrm(4,"p",23),t.j41(5,"div",4),t.DNE(6,q,3,2,"button",24),t.k0s()(),t.bVm()),2&i){const o=t.XpG();t.R7$(6),t.Y8G("ngIf",o.config&&o.config.logoutButton)}}let nt=(()=>{var i;class a extends y.${get loggedIn(){return this.metadata[u.METADATA_KEY.ENTITLEMENT_TOKEN]&&"relogin"!==this.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE]}constructor(e,n,r,c,l,h,T,L,at,C,ct,lt,O,gt){super(r,c,l,C,O),this.store=e,this.dialog=n,this.injector=r,this.elementRef=c,this.contextService=l,this.changeDetectorRef=h,this.eventActionService=T,this.router=L,this.ngZone=at,this.document=C,this.purpleService=ct,this.cacheService=lt,this.globalService=O,this.purpleEnv=gt,this.defaultConfig={...G},this.registerButtonMessage="",this.logoutButtonMessage="",this.revealPassword=!1,this.loading=!1,this.metadata={}}ngOnInit(){var e=()=>super.ngOnInit,n=this;return(0,d.A)(function*(){e().call(n),n.contextService.viewContext$.pipe((0,N.p)(r=>!n.loading)).subscribe(r=>n.metadata=n.contextService.getMetadata()),n.hasNavigated=n.contextService.navigationCount>0,n.metadata=yield n.purpleService.getMetadata(Object.keys(n.metadata)),n.displayMode=yield n.purpleService.getDisplayMode(),n.isOauth=n.metadata[u.METADATA_KEY.ENTITLEMENT_MODE]===u.ENTITLEMENT_MODE.OAUTH,n.isRelogin="relogin"===n.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE],n.changeDetectorRef.detectChanges()})()}onConfigChanges(){super.onConfigChanges(),this.setRegisterButton(),this.setLogoutButton()}processEventAction(e){var n=this;return(0,d.A)(function*(){if(yield n.contextService.updateMetadata(),yield n.contextService.updateParamsContext(),e=(0,m.uQ)(e,n.context,n.contextService.$functions,n.globalService.getGlobalData()),(0,m.Ol)(e)&&(e="value"in e?e.value:e,yield n.eventActionService.processEventAction(e,n),n.loading=!1,[p.H.REGISTER,p.H.NAVIGATE,p.H.COUPON,p.H.SUBSCRIPTIONS].includes(e.type)))return!0;if(n.hasNavigated)window.history.back();else if(n.displayMode===u.DisplayMode.MODAL)n.purpleService.closeView();else{const r=n.contextService.getIsCustomerDomainUsed()?"/":n.contextService.getBrand();n.ngZone.run(()=>n.router.navigate([r],{queryParamsHandling:"merge",replaceUrl:!0}))}return!1})()}calculateRedirectPath(e){var n=this;return(0,d.A)(function*(){if(e=(0,m.uQ)(e,n.context,n.contextService.$functions,n.globalService.getGlobalData()),(0,m.Ol)(e)&&(e="value"in e?e.value:e).type==p.H.NAVIGATE){var r;const c=(0,D.K)(null!==(r=e.url)&&void 0!==r?r:e.path,n.getContext(),!1);return(yield n.contextService.getIsCustomDomainUsed())?"/".concat(c):"/".concat(n.contextService.getBrand(),"/").concat(c)}return null})()}onLogin(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.isOauth||(n.loading=!0);try{var r,c;const l=n.isOauth?yield n.calculateRedirectPath(n.config.onSuccess):null;if(yield n.purpleService.login(null===(r=n.username)||void 0===r?void 0:r.trim(),n.config.password?null===(c=n.password)||void 0===c?void 0:c.trim():x.B6,{redirectUrl:l}),n.username&&n.cacheService.bustApiCache(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_CLICKED"})),n.config.accountLogin){const h=(0,M.J)(n.username.trim()),{token:T}=yield n.purpleService.getAccountUserData();if(T)try{console.debug("Old account token detected: "+T+", logging out"),yield n.purpleService.logoutAccount()}catch(L){console.warn("Logout before new login failed: ",L)}yield n.purpleService.loginAccount(h),n.config.accountLogin.assignLocalPurchases&&(yield n.purpleService.assignLocalPurchases(n.config.accountLogin.assignLocalPurchases)),yield n.contextService.updateAccountData()}if(n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_SUCCEEDED"})),"modal"===n.context.outlet){const h=(yield n.contextService.getIsCustomDomainUsed())?"/":n.contextService.getBrand();n.router.navigateByUrl(h,{skipLocationChange:!0}).then(()=>{n.router.navigate([h,{outlets:{modal:null}}],{queryParamsHandling:"merge"})})}if(n.metadata[u.METADATA_KEY.ENTITLEMENT_LOGIN_MODE])n.purpleService.closeView();else if(yield n.processEventAction(n.config.onSuccess))return}catch(l){n.loading=!1,console.error("error on login:",l),n.metadata=n.contextService.getMetadata(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_FAILED"})),n.dialog.alert({text:"ERROR_LOGIN",args:[l.code||(0,R.xn)(l.message)]},"DIALOG_ERROR")}n.changeDetectorRef.detectChanges()})()}onLogout(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.loading=!0,n.username="",n.password="",n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_CLICKED"}));try{const r=n.isOauth?yield n.calculateRedirectPath(n.config.onLogout):null;if(yield n.purpleService.logout({redirectUrl:r}),n.cacheService.bustApiCache(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_SUCCEEDED"})),"modal"===n.context.outlet){const c=(yield n.contextService.getIsCustomDomainUsed())?"/":n.contextService.getBrand();n.router.navigateByUrl(c,{skipLocationChange:!0}).then(()=>{n.router.navigate([c,{outlets:{modal:null}}],{queryParamsHandling:"merge"})})}if(yield n.processEventAction(n.config.onLogout))return}catch(r){n.loading=!1,n.metadata=n.contextService.getMetadata(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGOUT_FAILED"})),n.dialog.alert({text:"ERROR_LOGOUT",args:[r.code]},"DIALOG_ERROR")}n.changeDetectorRef.detectChanges()})()}onRegister(e){var n=this;return(0,d.A)(function*(){e.preventDefault(),n.store.dispatch((0,g.k4)({url:window.location.href,key:"REGISTER_CLICKED"})),n.eventActionService.processRegisterAction({type:p.H.REGISTER},n)})()}onClickReveal(e){e.stopPropagation(),e.preventDefault(),this.revealPassword=!this.revealPassword}onClickLink(e){e.target.href&&!this.isOauth&&setTimeout(()=>{this.store.dispatch((0,g.k4)({url:window.location.href,key:"LOGIN_LINK_CLICKED",params:{TARGET_URL:e.target.href}}))},100)}isValid(){return this.metadata&&!this.loading&&(this.isOauth||this.username&&this.username.length&&(!this.config.password||this.password&&this.password.length))}setLogoutButton(){if(this.config&&this.config.logoutButton)if("string"==typeof this.config.logoutButton)this.logoutButtonMessage=this.config.logoutButton;else if("object"==typeof this.config.logoutButton){var e;this.logoutButtonMessage=null===(e=(0,m.v3)(this.config.logoutButton))||void 0===e?void 0:e.toString()}else this.logoutButtonMessage="LOGIN_LOGOUT_BUTTON"}setRegisterButton(){if(this.config&&this.config.registerButton)if("string"==typeof this.config.registerButton)this.registerButtonMessage=this.config.registerButton;else if("object"==typeof this.config.registerButton){var e;this.registerButtonMessage=null===(e=(0,m.v3)(this.config.registerButton))||void 0===e?void 0:e.toString()}else this.registerButtonMessage="LOGIN_REGISTER_BUTTON"}}return(i=a).type="login",i.\u0275fac=function(e){return new(e||i)(t.rXU(I.B),t.rXU(A.o),t.rXU(t.zZn),t.rXU(t.aKT),t.rXU(B.V),t.rXU(t.gRc),t.rXU(U.G),t.rXU(k.Ix),t.rXU(t.SKi),t.rXU(v.qQ),t.rXU(j.Wj),t.rXU(b._),t.rXU(X.d),t.rXU(S.r6))},i.\u0275cmp=t.VBU({type:i,selectors:[["storefront-login"]],hostVars:2,hostBindings:function(e,n){1&e&&t.bIt("click",function(c){return n.onClickLink(c)}),2&e&&t.AVh("logged-in",n.loggedIn)},features:[t.Jv_([I.B]),t.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],["storefrontTranslate","LOGIN_TITLE"],["class","input",4,"ngIf"],["storefrontTranslate","LOGIN_HELP"],[1,"login-actions"],["class","login-register","mat-ripple","",3,"click",4,"ngIf"],["mat-ripple","",1,"login-submit",3,"click","disabled"],["storefrontTranslate","LOGIN_SUBMIT_BUTTON"],["class","button-spinner",4,"ngIf"],["storefrontTranslate","LOGIN_TEASER"],["storefrontTranslate","LOGIN_TEASER_RELOGIN"],[1,"input"],["name","username",3,"ngModelChange","ngModel","placeholder","type"],["class","icon icon-delete",3,"click",4,"ngIf"],[1,"icon","icon-delete",3,"click"],["name","password",3,"ngModelChange","type","ngModel","placeholder"],["class","icon icon-eye",3,"active","click",4,"ngIf"],[1,"icon","icon-eye",3,"click"],["mat-ripple","",1,"login-register",3,"click"],[3,"storefrontTranslate"],[1,"button-spinner"],["storefrontTranslate","LOGIN_LOGOUT_TITLE"],["storefrontTranslate","LOGIN_LOGOUT_TEASER"],["storefrontTranslate","LOGIN_LOGOUT_HELP"],["class","login-logout","mat-ripple","",3,"click",4,"ngIf"],["mat-ripple","",1,"login-logout",3,"click"]],template:function(e,n){1&e&&t.DNE(0,Q,13,7,"ng-container",0)(1,tt,7,1,"ng-container",0),2&e&&(t.Y8G("ngIf",n.config&&!n.loggedIn),t.R7$(),t.Y8G("ngIf",n.config&&n.loggedIn))},dependencies:[v.bT,f.qT,f.me,f.BC,f.cb,f.vS,f.cV,P.t,V.M,E.r6,v.Jj,Y.D],styles:["storefront-login{display:block;padding:var(--loginPaddingVert) var(--loginPaddingHoriz)}storefront-login h1{text-align:center}storefront-login h1,storefront-login p,storefront-login h3,storefront-login .input{margin:var(--loginElementMarginVert) var(--loginElementMarginHoriz)}storefront-login p a{color:var(--primaryColor)}storefront-login form{display:flex;flex-direction:column}storefront-login form .input{position:relative}storefront-login form .input .icon{display:flex;position:absolute;top:0;right:0;color:#000;height:100%;padding:0 var(--gutter);justify-content:center;align-items:center;width:50px}storefront-login form .input .icon.active{opacity:.3}storefront-login form .input input{padding-right:50px}storefront-login form input,storefront-login form .login-actions{display:flex}storefront-login .login-submit{width:100%;position:relative}storefront-login button{background-color:var(--primaryColor);color:#fff;width:50%;flex-basis:0;flex-shrink:0;flex-grow:1}storefront-login button+button{margin-left:calc(var(--gutter) / 2)}storefront-login button.login-register{background-color:var(--secondaryColor)}storefront-login button[disabled]{opacity:.5}\n"],encapsulation:2}),a})();var et=s(6483),ot=s(6215),it=s(1605);let rt=(()=>{var i;class a{}return(i=a).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[v.MD,f.YN,ot.O,et.h,it.P,E.pZ]}),a})();const st=nt}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_menu_menu_module_ts"],{2601:(st,h,s)=>{s.r(h),s.d(h,{MenuModule:()=>tt,component:()=>et});var c=s(177),M=s(467),t=s(3953),x=s(9079),f=(s(4404),s(5343)),d=s(3726),T=s(7786),_=s(5964),S=s(6697),E=s(4452),v=s(9745),C=s(8251),B=s(7467),y=s(1210),p=s(2853),k=s(7879),R=s(9516),P=s(5204),G=s(8471),H=s(1652);const D=["menuItem"],N=(r,a)=>({items:r,depth:a}),L=r=>({items:r,depth:0});function w(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",10),t.bIt("click",function(){const n=t.eBV(i).$implicit,o=t.XpG(3);return t.Njj(o.topMenuAction(n))}),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG(3);t.Y8G("baseContext",e.baseContext)("baseConfig",i.content)}}function F(r,a){if(1&r&&(t.j41(0,"div",8),t.DNE(1,w,1,2,"storefront-button",9),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("ngForOf",i.menuActions)}}function $(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",13),t.bIt("onButtonTap",function(n){const o=t.eBV(i).$implicit,u=t.XpG().$implicit,l=t.XpG(2);return t.Njj(l.onSlideInItemClick(n,o,u))}),t.k0s()}if(2&r){const i=a.$implicit,e=a.index,n=t.XpG().$implicit,o=t.XpG(2);t.Y8G("baseConfig",o.getButtonConfig(i,e,n)),t.BMQ("title",i.description)}}function A(r,a){if(1&r&&(t.j41(0,"div",11),t.DNE(1,$,1,2,"storefront-button",12),t.k0s()),2&r){const i=a.$implicit,e=t.XpG(2);t.BMQ("menu-name",i.name),t.R7$(),t.Y8G("ngForOf",e.getCurrentItems(i))}}function j(r,a){if(1&r){const i=t.RV6();t.qex(0),t.j41(1,"div",3),t.bIt("click",function(){t.eBV(i);const n=t.XpG();return t.Njj(n.close())}),t.k0s(),t.j41(2,"div",4),t.bIt("click",function(n){return t.eBV(i),t.Njj(n.stopPropagation())}),t.j41(3,"div",5),t.DNE(4,F,2,1,"div",6)(5,A,2,2,"div",7),t.k0s()(),t.bVm()}if(2&r){const i=t.XpG();t.R7$(4),t.Y8G("ngIf",i.menuActions),t.R7$(),t.Y8G("ngForOf",i.menus)}}function V(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",10),t.bIt("click",function(){const n=t.eBV(i).$implicit,o=t.XpG(3);return t.Njj(o.topMenuAction(n))}),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG(3);t.Y8G("baseContext",e.baseContext)("baseConfig",i.content)}}function X(r,a){if(1&r&&(t.j41(0,"div",8),t.DNE(1,V,1,2,"storefront-button",9),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("ngForOf",i.menuActions)}}function O(r,a){1&r&&t.eu8(0)}function z(r,a){if(1&r&&(t.qex(0),t.j41(1,"ul",16),t.DNE(2,O,1,0,"ng-container",17),t.k0s(),t.bVm()),2&r){const i=t.XpG().$implicit,e=t.XpG().depth;t.XpG();const n=t.sdS(5);t.R7$(2),t.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",t.l_i(2,N,i.childItems,e+1))}}function Y(r,a){if(1&r){const i=t.RV6();t.j41(0,"li",15,1)(2,"storefront-button",13),t.bIt("onButtonTap",function(n){const o=t.eBV(i).$implicit,u=t.XpG(3);return t.Njj(u.onStaticItemClick(n,o))}),t.k0s(),t.DNE(3,z,3,5,"ng-container",2),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG().depth,n=t.XpG(2);t.Y8G("ngClass",n.getMenuItemLiClasses(i)),t.BMQ("depth",e)("child-items",!(null==i||null==i.childItems||!i.childItems.length))("item-id",null==i?null:i.id),t.R7$(2),t.Y8G("baseConfig",n.getButtonConfig(i)),t.BMQ("title",i.description),t.R7$(),t.Y8G("ngIf",i.childItems&&i.childItems.length>0)}}function U(r,a){1&r&&t.DNE(0,Y,4,7,"li",14),2&r&&t.Y8G("ngForOf",a.items)}function W(r,a){1&r&&t.eu8(0)}function Q(r,a){if(1&r&&(t.j41(0,"ul",11),t.DNE(1,W,1,0,"ng-container",17),t.k0s()),2&r){const i=a.$implicit;t.XpG();const e=t.sdS(5);t.BMQ("menu-name",i.name),t.R7$(),t.Y8G("ngTemplateOutlet",e)("ngTemplateOutletContext",t.eq3(3,L,i.items))}}function J(r,a){if(1&r){const i=t.RV6();t.qex(0),t.j41(1,"div",4),t.bIt("click",function(n){return t.eBV(i),t.Njj(n.stopPropagation())}),t.j41(2,"div",5),t.DNE(3,X,2,1,"div",6)(4,U,1,1,"ng-template",null,0,t.C5r)(6,Q,2,5,"ul",7),t.k0s()(),t.bVm()}if(2&r){const i=t.XpG();t.R7$(3),t.Y8G("ngIf",i.menuActions),t.R7$(3),t.Y8G("ngForOf",i.menus)}}function K(r){var a;const i=new Set(null===(a=r.items)||void 0===a?void 0:a.map(o=>({...o,childItems:[],depth:-1}))),e=new Map([...i.values()].map(o=>[o.id,o]));for(const o of i)if(o.parentId&&o.parentId!==r.id){if(!e.has(o.parentId))throw new Error("Menu ".concat(r.name,": no parent item with id ").concat(o.parentId," found"));e.get(o.parentId).childItems.push(o),i.delete(o)}const n=(o,u)=>{o.depth=u,o.childItems.forEach(l=>n(l,u+1))};return i.forEach(o=>n(o,0)),{...r,items:[...i]}}let I=(()=>{var r;class a extends y.${constructor(e,n,o,u,l,m,g,nt,ot,it,b,rt,at){super(n,e,o,l,b),this.elementRef=e,this.injector=n,this.contextService=o,this.appMenuService=u,this.document=l,this.store=m,this.destroyRef=g,this.transferState=nt,this.purpleService=ot,this.changeDetectorRef=it,this.globalService=b,this.platformId=rt,this.purpleEnv=at,this.defaultConfig={...p.ge},this.show=!1,this.fadeOutActive=!1,this.menus=[]}ngOnInit(){super.ngOnInit()}onConfigChanges(){var e=this;return(0,M.A)(function*(){e.handleConfigureAppMenuService(),e.handleConfigureOrResetDataSource(),e.handleSubscribeToStoreManager(),e.dataSource.loadData(),e.menuActions=e.config.actions})()}ngOnDestroy(){super.ngOnDestroy(),this.appMenuService.unregisterCustomSideMenuComponent(this)}handleSubscribeToStoreManager(){this.store.subscribe(this.dataSource.data$.pipe((0,_.p)(e=>!!e&&e.length>0&&this.dataSource.hasData()),(0,x.pQ)(this.destroyRef)),e=>{try{this.menus=e.map(K)}catch(n){console.error(n)}this.changeDetectorRef.detectChanges(),this.setupEventListeners()},f.l,f.l,"data")}handleConfigureOrResetDataSource(){this.dataSource?this.dataSource.hasConfigChanged(this.config.dataSource)&&(this.dataSource.setConfig(this.config.dataSource),this.dataSource.reset()):this.dataSource=(0,E.O8)(this.injector,this.config.dataSource,this.elementRef.nativeElement,this.document)}handleConfigureAppMenuService(){this.config.template!==p.oH.STATIC&&this.appMenuService.registerCustomSideMenuComponent(this),this.appMenuService.$menuOpen.subscribe(e=>{var n,o;e!==this.show&&(!e&&(null===(n=this.config)||void 0===n?void 0:n.template)!==p.oH.STATIC&&(null===(o=this.config)||void 0===o?void 0:o.animationDuration)>0?(this.fadeOutActive=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.show=!1,this.fadeOutActive=!1,this.changeDetectorRef.markForCheck()},this.config.animationDuration)):(this.show=e,this.changeDetectorRef.detectChanges()))})}getMenuItemLiClasses(e){const n=["menu-item","menu-item-".concat(e.name.replace(/ /g,"-")),...e.cssClasses];return this.hasMenuItemChildren(e)&&n.push("menu-item-has-children"),this.isExpanded(e)&&n.push("menu-item-open"),n}onStaticItemClick(e,n){this.hasMenuItemChildren(n)?this.handleStaticItemClickForMenuItemWithChildren(e,n):this.handleStaticItemClickForMenuItemWithoutChildren(n)}handleStaticItemClickForMenuItemWithChildren(e,n){if(!this.isRootSubMenu(n))return;const o=this.getSubMenuBehaviour();switch(o){case"onMouseHover":case"onClick":this.isExpanded(n)||this.handleExpand(e,n);break;case"onIconClick":this.isRightButton(e)&&(this.isExpanded(n)?this.handleCollapse(e,n):this.handleExpand(e,n));break;default:console.warn("Unknown menu item behavior for: "+o)}}handleExpand(e,n){e.preventDefault(),e.stopPropagation(),this.anyMenuItemExpanded()&&!this.isExpanded(n)&&this.closeSubMenu(n),this.openSubMenuForItem(n)}handleCollapse(e,n){e.preventDefault(),e.stopPropagation(),this.isExpanded(n)&&this.closeSubMenu(n)}handleStaticItemClickForMenuItemWithoutChildren(e){this.anyMenuItemExpanded()&&this.clearSubMenu()}onSlideInItemClick(e,n,o){if(this.isRightButton(e)){e.preventDefault(),e.stopPropagation();const l=this.getCurrentItems(o).findIndex(m=>m.id===n.id);o.currentItemsPath=o.currentItemsPath||[],o.currentItemsPath.push(l)}else this.isLeftButton(e)?(e.preventDefault(),e.stopPropagation(),o.currentItemsPath.pop()):this.appMenuService.setOpen(!1)}getButtonConfig(e,n,o){var u,l,m;const g=this.getTapAction(e);return{message:"MENU_ITEM",class:"menu-button menu-button-".concat(e.name.replace(/ /g,"-")," ").concat(null!==(u=null===(l=e.cssClasses)||void 0===l?void 0:l.join(" "))&&void 0!==u?u:""),variables:[e.title||e.name],tap:g,iconLeft:(null==o||null===(m=o.currentItemsPath)||void 0===m?void 0:m.length)>0&&0==n?{cssClasses:"icon icon-back"}:e.thumbnailsExtended.default,iconRight:this.hasMenuItemChildren(e)?{cssClasses:"icon icon-arrow-down"}:void 0}}isLeftButton(e){return e.target.classList.contains("button-icon-left")}isRightButton(e){return e.target.classList.contains("button-icon-right")}close(){this.appMenuService.setOpen(!1)}topMenuAction(e){e.name===p.F9.close&&this.close()}getCurrentItems(e){let n=e.items;return e.currentItemsPath=e.currentItemsPath||[],e.currentItemsPath.forEach(o=>{n[o].childItems.length>0&&(n=n[o].childItems)}),n}setupEventListeners(){if((0,c.UE)(this.platformId)&&"STATIC"===this.template){const e=this.getSubMenuBehaviour();this.menuItems.forEach(n=>{this.setupEventListenersForItem(n,e)})}}setupEventListenersForItem(e,n){const o=e.nativeElement,u=this.getMenuItemById(o.getAttribute("item-id"));null!==u&&this.isRootSubMenu(u)&&"onMouseHover"===n&&(0,B.Y)().isDesktop&&((0,d.R)(o,"mouseenter").subscribe(l=>this.onMenuItemMouseEnter(l,u)),(0,d.R)(o,"mouseleave",{passive:!0}).subscribe(l=>this.onMenuItemMouseLeave(l,u)))}onMenuItemMouseEnter(e,n){e.stopPropagation(),e.preventDefault(),this.openSubMenuForItem(n)}onMenuItemMouseLeave(e,n){e.stopPropagation(),e.preventDefault(),this.closeSubMenu(n)}isNavigationAction(e){return!e.url.startsWith("purple://")&&!e.url.startsWith("http://")&&!e.url.startsWith("https://")}getTapAction(e){return this.isNavigationAction(e)?{type:v.H.NAVIGATE,path:e.url}:{type:v.H.OPEN_URL,target:e.target,url:e.url}}getSubMenuBehaviour(){var e,n;return null!==(e=null===(n=this.config.openSubMenu)||void 0===n?void 0:n.behaviour)&&void 0!==e?e:"onMouseHover"}isExpanded(e){return this.expandedMenuItemId===e.id}anyMenuItemExpanded(){return null!=this.expandedMenuItemId}isRootSubMenu(e){return 0===e.depth&&this.hasMenuItemChildren(e)}hasMenuItemChildren(e){return e.childItems.length>0}getMenuItemById(e){var n=null;return this.menus.forEach(o=>{o.items.forEach(u=>{n||(n=this.getMenuItemByIdRecursive(u,e))})}),n}getMenuItemByIdRecursive(e,n){let o=null;return e.id===n&&(o=e),e.childItems.forEach(u=>{o||(o=this.getMenuItemByIdRecursive(u,n))}),o}openSubMenuForItem(e){this.expandedMenuItemId=e.id,this.setupMenuCloseHandler(e),this.changeDetectorRef.detectChanges()}closeSubMenu(e){this.isExpanded(e)&&this.clearSubMenu()}clearSubMenu(){this.expandedMenuItemId=null,this.changeDetectorRef.detectChanges()}setupMenuCloseHandler(e){(0,T.h)((0,d.R)(this.document,"touchstart",{passive:!1}),(0,d.R)(this.document,"click",{passive:!1})).pipe((0,_.p)(n=>this.expandedMenuItemId===e.id&&!this.elementRef.nativeElement.contains(n.target)),(0,S.s)(1)).subscribe(n=>{this.closeSubMenu(e)})}}return(r=a).\u0275fac=function(e){return new(e||r)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(R.V),t.rXU(P.I),t.rXU(c.qQ),t.rXU(C.B),t.rXU(t.abz),t.rXU(t.pJN),t.rXU(G.Wj),t.rXU(t.gRc),t.rXU(H.d),t.rXU(t.Agw),t.rXU(k.r6))},r.\u0275cmp=t.VBU({type:r,selectors:[["storefront-menu"]],viewQuery:function(e,n){if(1&e&&t.GBs(D,5),2&e){let o;t.mGM(o=t.lsd())&&(n.menuItems=o)}},hostVars:2,hostBindings:function(e,n){2&e&&t.AVh("menu-fade-out",n.fadeOutActive)},features:[t.Jv_([C.B]),t.Vt3],decls:2,vars:2,consts:[["menuItemsTemplate",""],["menuItem",""],[4,"ngIf"],[1,"side-menu-backdrop",3,"click"],[1,"menu",3,"click"],[1,"items"],["class","menu-actions",4,"ngIf"],["class","menu-content",4,"ngFor","ngForOf"],[1,"menu-actions"],[3,"baseContext","baseConfig","click",4,"ngFor","ngForOf"],[3,"click","baseContext","baseConfig"],[1,"menu-content"],[3,"baseConfig","onButtonTap",4,"ngFor","ngForOf"],[3,"onButtonTap","baseConfig"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"menu-item-children"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&t.DNE(0,j,6,2,"ng-container",2)(1,J,7,2,"ng-container",2),2&e&&(t.Y8G("ngIf",("SLIDE_IN_LEFT"===n.template||"SLIDE_IN_RIGHT"===n.template)&&n.show),t.R7$(),t.Y8G("ngIf","STATIC"===n.template))},styles:['html body{--primaryColor: rgb(0, 140, 190);--secondaryColor: rgb(200, 200, 200);--backgroundColor: rgb(255, 255, 255);--secondaryBackgroundColor: rgb(200, 200, 200);--textColor: rgb(0, 0, 0);--secondaryTextColor: rgb(80, 80, 80);--ghostColor: rgba(200, 200, 200);--gutter: 16px;--borderRadius: 4px;--actionButtonHeight: 50px;--appBarColor: white;--appBarTextColor: var(--textColor);--appBarHeight: 54px;--appBarDisplay: flex;--appBarShrinkDisplay: flex;--appBarShrinkHeight: 30px;--appBarFontSize: 1em;--appBarShrinkFontSize: .6em;--appBarPaddingVert: 4px;--appBarPaddingHoriz: 0;--appBarButtonWidth: 50px;--appMenuColor: white;--navigationHeight: 50px;--navigationShrinkHeight: 30px;--navigationColor: var(--textColor);--navigationBgColor: white;--navigationActiveColor: var(--primaryColor);--listPadding: var(--gutter);--listPaddingHoriz: var(--gutter);--listPaddingVert: var(--gutter);--listItemGutter: var(--gutter);--gridListColumns: 4;--listTabBorderWidth: 1px;--listTabBorderRadius: var(--borderRadius);--listTabHighlightColor: var(--primaryColor);--listTabHighlightTextColor: white;--buttonPaddingVert: calc(var(--gutter) / 2);--buttonPaddingHoriz: calc(var(--gutter) / 2);--modalBgColor: white;--modalPadding: var(--gutter);--modalPaddingBottom: var(--gutter);--issueProgressPaddingVert: 2px;--issueProgressPaddingHoriz: 2px;--issueProgressMarginVert: calc(var(--gutter) / 2);--issueProgressMarginHoriz: calc(var(--gutter) / 2);--issueProgressBgColor: var(--secondaryColor);--issueProgressColor: var(--primaryColor);--issueProgressFontColor: white;--issueUpdateBadgeBgColor: var(--primaryColor);--issueUpdateBadgeColor: white;--subscriptionPaddingVert: var(--gutter);--subscriptionPaddingHoriz: var(--gutter);--subscriptionPurchasedMarginHoriz: 6px;--subscriptionPurchasedBorderRadius: 20px;--loginPaddingVert: var(--gutter);--loginPaddingHoriz: var(--gutter);--loginElementMarginVert: calc(var(--gutter));--loginElementMarginHoriz: 0;--couponPaddingVert: var(--gutter);--couponPaddingHoriz: var(--gutter);--couponElementMarginVert: calc(var(--gutter));--couponElementMarginHoriz: 0;--couponElementPaddingVert: calc(var(--gutter));--couponElementPaddingHoriz: calc(var(--gutter));--bookmarkBgColor: transparent;--bookmarkImageBgColor: white;--sectionPadding: 0;--spinnerColor: #fff;--imageBackgroundColor: transparent;--imageLoadingColor: rgb(200, 200, 200);--dropdownPaddingX: calc(var(--gutter) / 2);--dropdownPaddingY: calc(var(--gutter) / 2);--tickerGutter: var(--gutter);--tickerPaddingY: var(--gutter);--searchFieldFontSize: 14px;--swiperPaginationTabHeight: 50px;--swiperPaginationBorderWidth: 4px;--swiperPaginationBackgroundColor: white;--swiperPaginationColor: var(--primaryColor);--switchWidth: 50px;--switchActiveColor: var(--primaryColor);--switchHandleColor: #fff;--switchBackgroundColor: #f1f1f1;--switchBorderWidth: 3px;--switchBorderRadius: calc(var(--switchWidth) * .6);--stackedCoversWidth: 40%;--stackedCoversScaleStep: .1;--stackedCoversTranslateStep: .3;--stackedCoversTopEvenCenteredGap: 4px;--toolbarbackgroundColor: transparent;--toolbarIconColor: #a9a9a9;color:var(--textColor);--primaryColor: #00adef;--primaryColorNightMode: white;--accentColor: var(--primaryColor);--contentFont: "OpenSans", sans-serif;--contentHeadlineFont: var(--contentFont);--contentIconNavigateBack: url(resource://dynamic/content/assets/ic_left.svg);--contentIconNavigateForward: url(resource://dynamic/content/assets/ic_right.svg);--contentSpinner: url(resource://dynamic/content/assets/tail-spin.svg);--contentBgColor: #ffffff;--contentTextColor: black;--contentPaddingVert: 30px;--contentPaddingHoriz: 50px;--contentHeaderMarginTop: 1em;--contentHeaderMarginBottom: 1.5em;--contentHeaderPaddingVert: 1em;--contentHeaderElementMarginTop: .5em;--contentHeaderElementMarginBottom: .5em;--contentSectionPaddingVert: 1em;--contentSectionPaddingHoriz: 1em;--contentElementMarginTop: 1em;--contentElementMarginBottom: 1em;--contentElementPaddingVert: .5em;--contentElementPaddingHoriz: 1em;--contentHeadlineBigMarginTop: 1.5em;--contentHeadlineBigMarginBottom: .5em;--contentHeadlineSmallMarginTop: 1em;--contentHeadlineSmallMarginBottom: .5em;--contentNavigateButtonColor: var(--primaryColor);--contentNavigateButtonSize: 30px;--contentNavigateButtonGap: 12px;--contentBgColorNightMode: #323232;--contentTextColorNightMode: #ffffff;--contentNavigateButtonColorNightMode: var(--primaryColorNightMode);--menuItemIconGap: calc(var(--menuItemIconHeight) / 2);--menuItemIconHeight: 14px}@media (max-width: 767px) and (orientation: portrait),(max-height: 767px) and (orientation: landscape){html body{--gridListColumns: 3}}@media (max-width: 533px) and (orientation: portrait),(max-height: 533px) and (orientation: landscape){html body{--gridListColumns: 2;--actionButtonHeight: 40px}}@media (max-height: 533px) and (orientation: landscape){html body{--gridListColumns: 3}}@media (max-width: 533px) and (orientation: portrait){html body{--contentPaddingHoriz: 30px}}.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-menu{--textColor: var(--colorTextInverted, #000)}storefront-menu .menu-content{display:flex;flex-wrap:wrap}storefront-menu[template=STATIC] .menu-content>ul{display:flex}storefront-menu[template=STATIC] .menu-item{list-style:none}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul{display:none}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button{width:100%;display:block}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button>button{width:100%}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button>button a{justify-content:flex-start}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children{display:flex;position:absolute;box-shadow:0 5px 15px #00000080;z-index:100;background-color:var(--backgroundColor);border-radius:4px}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children storefront-button>button{background-color:transparent}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children storefront-button>button:hover{background-color:var(--primaryColor)}@keyframes menu-slide-in-opacity{0%{opacity:0}to{opacity:1}}@keyframes menu-slide-out-opacity{0%{opacity:1}to{opacity:0}}storefront-menu[template=SLIDE_IN_RIGHT] .side-menu-backdrop,storefront-menu[template=SLIDE_IN_LEFT] .side-menu-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;z-index:6;background-color:#0009;animation:menu-slide-in-opacity .3s forwards}storefront-menu[template=SLIDE_IN_RIGHT] .menu,storefront-menu[template=SLIDE_IN_LEFT] .menu{position:fixed;width:100%;top:0;height:100vh;max-width:300px;z-index:8;background-color:#fff;font-family:roboto,sans-serif;padding:0 20px 20px;overflow-y:auto}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-actions,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-actions{display:flex;justify-content:end;-webkit-justify-content:flex-end;align-items:flex-end;-webkit-align-items:flex-end;position:-webkit-sticky;position:-webkit-sticky;position:sticky;top:0;padding-bottom:10%;border-bottom:.5px var(--toolbarIconColor) solid;background-color:#fff;z-index:1}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-actions storefront-element,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-actions storefront-element{margin-right:.3em;color:var(--toolbarIconColor);font-size:1.5em}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content{display:flex;flex-direction:column;margin-bottom:15px;background-color:var(--appMenuColor);overflow:hidden}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content>storefront-button,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content>storefront-button{font-size:20px;line-height:56px;letter-spacing:.38px;font-family:Helvetica Neue,sans-serif}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content>storefront-button>button,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content>storefront-button>button{text-align:left;width:100%}storefront-menu[template=SLIDE_IN_RIGHT].menu-fade-out .side-menu-backdrop,storefront-menu[template=SLIDE_IN_LEFT].menu-fade-out .side-menu-backdrop{animation:menu-slide-out-opacity .3s forwards}@keyframes menu-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes menu-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}storefront-menu[template=SLIDE_IN_RIGHT] .menu{right:0;left:auto;animation:menu-slide-in-right .3s forwards}storefront-menu[template=SLIDE_IN_RIGHT].menu-fade-out .menu{animation:menu-slide-out-right .3s forwards}@keyframes menu-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes menu-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}storefront-menu[template=SLIDE_IN_LEFT] .menu{right:auto;left:0;animation:menu-slide-in-left .3s forwards}storefront-menu[template=SLIDE_IN_LEFT].menu-fade-out .menu{animation:menu-slide-out-left .3s forwards}\n'],encapsulation:2,changeDetection:0}),a})();var Z=s(9805),q=s(395);let tt=(()=>{var r;class a{}return(r=a).\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[c.MD,Z.ButtonModule]}),a})();t.wjB(I,[c.YU,c.Sq,c.bT,c.T3,q.Q],[]);const et=I}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_menu_menu_module_ts"],{2601:(st,h,s)=>{s.r(h),s.d(h,{MenuModule:()=>tt,component:()=>et});var c=s(177),M=s(467),t=s(3953),x=s(9079),f=(s(4404),s(5343)),d=s(3726),T=s(7786),_=s(5964),S=s(6697),E=s(4452),v=s(9745),C=s(8251),B=s(7467),y=s(1210),p=s(2853),k=s(7879),R=s(9516),P=s(5204),G=s(5102),H=s(1652);const D=["menuItem"],N=(r,a)=>({items:r,depth:a}),L=r=>({items:r,depth:0});function w(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",10),t.bIt("click",function(){const n=t.eBV(i).$implicit,o=t.XpG(3);return t.Njj(o.topMenuAction(n))}),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG(3);t.Y8G("baseContext",e.baseContext)("baseConfig",i.content)}}function F(r,a){if(1&r&&(t.j41(0,"div",8),t.DNE(1,w,1,2,"storefront-button",9),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("ngForOf",i.menuActions)}}function $(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",13),t.bIt("onButtonTap",function(n){const o=t.eBV(i).$implicit,u=t.XpG().$implicit,l=t.XpG(2);return t.Njj(l.onSlideInItemClick(n,o,u))}),t.k0s()}if(2&r){const i=a.$implicit,e=a.index,n=t.XpG().$implicit,o=t.XpG(2);t.Y8G("baseConfig",o.getButtonConfig(i,e,n)),t.BMQ("title",i.description)}}function A(r,a){if(1&r&&(t.j41(0,"div",11),t.DNE(1,$,1,2,"storefront-button",12),t.k0s()),2&r){const i=a.$implicit,e=t.XpG(2);t.BMQ("menu-name",i.name),t.R7$(),t.Y8G("ngForOf",e.getCurrentItems(i))}}function j(r,a){if(1&r){const i=t.RV6();t.qex(0),t.j41(1,"div",3),t.bIt("click",function(){t.eBV(i);const n=t.XpG();return t.Njj(n.close())}),t.k0s(),t.j41(2,"div",4),t.bIt("click",function(n){return t.eBV(i),t.Njj(n.stopPropagation())}),t.j41(3,"div",5),t.DNE(4,F,2,1,"div",6)(5,A,2,2,"div",7),t.k0s()(),t.bVm()}if(2&r){const i=t.XpG();t.R7$(4),t.Y8G("ngIf",i.menuActions),t.R7$(),t.Y8G("ngForOf",i.menus)}}function V(r,a){if(1&r){const i=t.RV6();t.j41(0,"storefront-button",10),t.bIt("click",function(){const n=t.eBV(i).$implicit,o=t.XpG(3);return t.Njj(o.topMenuAction(n))}),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG(3);t.Y8G("baseContext",e.baseContext)("baseConfig",i.content)}}function X(r,a){if(1&r&&(t.j41(0,"div",8),t.DNE(1,V,1,2,"storefront-button",9),t.k0s()),2&r){const i=t.XpG(2);t.R7$(),t.Y8G("ngForOf",i.menuActions)}}function O(r,a){1&r&&t.eu8(0)}function z(r,a){if(1&r&&(t.qex(0),t.j41(1,"ul",16),t.DNE(2,O,1,0,"ng-container",17),t.k0s(),t.bVm()),2&r){const i=t.XpG().$implicit,e=t.XpG().depth;t.XpG();const n=t.sdS(5);t.R7$(2),t.Y8G("ngTemplateOutlet",n)("ngTemplateOutletContext",t.l_i(2,N,i.childItems,e+1))}}function Y(r,a){if(1&r){const i=t.RV6();t.j41(0,"li",15,1)(2,"storefront-button",13),t.bIt("onButtonTap",function(n){const o=t.eBV(i).$implicit,u=t.XpG(3);return t.Njj(u.onStaticItemClick(n,o))}),t.k0s(),t.DNE(3,z,3,5,"ng-container",2),t.k0s()}if(2&r){const i=a.$implicit,e=t.XpG().depth,n=t.XpG(2);t.Y8G("ngClass",n.getMenuItemLiClasses(i)),t.BMQ("depth",e)("child-items",!(null==i||null==i.childItems||!i.childItems.length))("item-id",null==i?null:i.id),t.R7$(2),t.Y8G("baseConfig",n.getButtonConfig(i)),t.BMQ("title",i.description),t.R7$(),t.Y8G("ngIf",i.childItems&&i.childItems.length>0)}}function U(r,a){1&r&&t.DNE(0,Y,4,7,"li",14),2&r&&t.Y8G("ngForOf",a.items)}function W(r,a){1&r&&t.eu8(0)}function Q(r,a){if(1&r&&(t.j41(0,"ul",11),t.DNE(1,W,1,0,"ng-container",17),t.k0s()),2&r){const i=a.$implicit;t.XpG();const e=t.sdS(5);t.BMQ("menu-name",i.name),t.R7$(),t.Y8G("ngTemplateOutlet",e)("ngTemplateOutletContext",t.eq3(3,L,i.items))}}function J(r,a){if(1&r){const i=t.RV6();t.qex(0),t.j41(1,"div",4),t.bIt("click",function(n){return t.eBV(i),t.Njj(n.stopPropagation())}),t.j41(2,"div",5),t.DNE(3,X,2,1,"div",6)(4,U,1,1,"ng-template",null,0,t.C5r)(6,Q,2,5,"ul",7),t.k0s()(),t.bVm()}if(2&r){const i=t.XpG();t.R7$(3),t.Y8G("ngIf",i.menuActions),t.R7$(3),t.Y8G("ngForOf",i.menus)}}function K(r){var a;const i=new Set(null===(a=r.items)||void 0===a?void 0:a.map(o=>({...o,childItems:[],depth:-1}))),e=new Map([...i.values()].map(o=>[o.id,o]));for(const o of i)if(o.parentId&&o.parentId!==r.id){if(!e.has(o.parentId))throw new Error("Menu ".concat(r.name,": no parent item with id ").concat(o.parentId," found"));e.get(o.parentId).childItems.push(o),i.delete(o)}const n=(o,u)=>{o.depth=u,o.childItems.forEach(l=>n(l,u+1))};return i.forEach(o=>n(o,0)),{...r,items:[...i]}}let I=(()=>{var r;class a extends y.${constructor(e,n,o,u,l,m,g,nt,ot,it,b,rt,at){super(n,e,o,l,b),this.elementRef=e,this.injector=n,this.contextService=o,this.appMenuService=u,this.document=l,this.store=m,this.destroyRef=g,this.transferState=nt,this.purpleService=ot,this.changeDetectorRef=it,this.globalService=b,this.platformId=rt,this.purpleEnv=at,this.defaultConfig={...p.ge},this.show=!1,this.fadeOutActive=!1,this.menus=[]}ngOnInit(){super.ngOnInit()}onConfigChanges(){var e=this;return(0,M.A)(function*(){e.handleConfigureAppMenuService(),e.handleConfigureOrResetDataSource(),e.handleSubscribeToStoreManager(),e.dataSource.loadData(),e.menuActions=e.config.actions})()}ngOnDestroy(){super.ngOnDestroy(),this.appMenuService.unregisterCustomSideMenuComponent(this)}handleSubscribeToStoreManager(){this.store.subscribe(this.dataSource.data$.pipe((0,_.p)(e=>!!e&&e.length>0&&this.dataSource.hasData()),(0,x.pQ)(this.destroyRef)),e=>{try{this.menus=e.map(K)}catch(n){console.error(n)}this.changeDetectorRef.detectChanges(),this.setupEventListeners()},f.l,f.l,"data")}handleConfigureOrResetDataSource(){this.dataSource?this.dataSource.hasConfigChanged(this.config.dataSource)&&(this.dataSource.setConfig(this.config.dataSource),this.dataSource.reset()):this.dataSource=(0,E.O8)(this.injector,this.config.dataSource,this.elementRef.nativeElement,this.document)}handleConfigureAppMenuService(){this.config.template!==p.oH.STATIC&&this.appMenuService.registerCustomSideMenuComponent(this),this.appMenuService.$menuOpen.subscribe(e=>{var n,o;e!==this.show&&(!e&&(null===(n=this.config)||void 0===n?void 0:n.template)!==p.oH.STATIC&&(null===(o=this.config)||void 0===o?void 0:o.animationDuration)>0?(this.fadeOutActive=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.show=!1,this.fadeOutActive=!1,this.changeDetectorRef.markForCheck()},this.config.animationDuration)):(this.show=e,this.changeDetectorRef.detectChanges()))})}getMenuItemLiClasses(e){const n=["menu-item","menu-item-".concat(e.name.replace(/ /g,"-")),...e.cssClasses];return this.hasMenuItemChildren(e)&&n.push("menu-item-has-children"),this.isExpanded(e)&&n.push("menu-item-open"),n}onStaticItemClick(e,n){this.hasMenuItemChildren(n)?this.handleStaticItemClickForMenuItemWithChildren(e,n):this.handleStaticItemClickForMenuItemWithoutChildren(n)}handleStaticItemClickForMenuItemWithChildren(e,n){if(!this.isRootSubMenu(n))return;const o=this.getSubMenuBehaviour();switch(o){case"onMouseHover":case"onClick":this.isExpanded(n)||this.handleExpand(e,n);break;case"onIconClick":this.isRightButton(e)&&(this.isExpanded(n)?this.handleCollapse(e,n):this.handleExpand(e,n));break;default:console.warn("Unknown menu item behavior for: "+o)}}handleExpand(e,n){e.preventDefault(),e.stopPropagation(),this.anyMenuItemExpanded()&&!this.isExpanded(n)&&this.closeSubMenu(n),this.openSubMenuForItem(n)}handleCollapse(e,n){e.preventDefault(),e.stopPropagation(),this.isExpanded(n)&&this.closeSubMenu(n)}handleStaticItemClickForMenuItemWithoutChildren(e){this.anyMenuItemExpanded()&&this.clearSubMenu()}onSlideInItemClick(e,n,o){if(this.isRightButton(e)){e.preventDefault(),e.stopPropagation();const l=this.getCurrentItems(o).findIndex(m=>m.id===n.id);o.currentItemsPath=o.currentItemsPath||[],o.currentItemsPath.push(l)}else this.isLeftButton(e)?(e.preventDefault(),e.stopPropagation(),o.currentItemsPath.pop()):this.appMenuService.setOpen(!1)}getButtonConfig(e,n,o){var u,l,m;const g=this.getTapAction(e);return{message:"MENU_ITEM",class:"menu-button menu-button-".concat(e.name.replace(/ /g,"-")," ").concat(null!==(u=null===(l=e.cssClasses)||void 0===l?void 0:l.join(" "))&&void 0!==u?u:""),variables:[e.title||e.name],tap:g,iconLeft:(null==o||null===(m=o.currentItemsPath)||void 0===m?void 0:m.length)>0&&0==n?{cssClasses:"icon icon-back"}:e.thumbnailsExtended.default,iconRight:this.hasMenuItemChildren(e)?{cssClasses:"icon icon-arrow-down"}:void 0}}isLeftButton(e){return e.target.classList.contains("button-icon-left")}isRightButton(e){return e.target.classList.contains("button-icon-right")}close(){this.appMenuService.setOpen(!1)}topMenuAction(e){e.name===p.F9.close&&this.close()}getCurrentItems(e){let n=e.items;return e.currentItemsPath=e.currentItemsPath||[],e.currentItemsPath.forEach(o=>{n[o].childItems.length>0&&(n=n[o].childItems)}),n}setupEventListeners(){if((0,c.UE)(this.platformId)&&"STATIC"===this.template){const e=this.getSubMenuBehaviour();this.menuItems.forEach(n=>{this.setupEventListenersForItem(n,e)})}}setupEventListenersForItem(e,n){const o=e.nativeElement,u=this.getMenuItemById(o.getAttribute("item-id"));null!==u&&this.isRootSubMenu(u)&&"onMouseHover"===n&&(0,B.Y)().isDesktop&&((0,d.R)(o,"mouseenter").subscribe(l=>this.onMenuItemMouseEnter(l,u)),(0,d.R)(o,"mouseleave",{passive:!0}).subscribe(l=>this.onMenuItemMouseLeave(l,u)))}onMenuItemMouseEnter(e,n){e.stopPropagation(),e.preventDefault(),this.openSubMenuForItem(n)}onMenuItemMouseLeave(e,n){e.stopPropagation(),e.preventDefault(),this.closeSubMenu(n)}isNavigationAction(e){return!e.url.startsWith("purple://")&&!e.url.startsWith("http://")&&!e.url.startsWith("https://")}getTapAction(e){return this.isNavigationAction(e)?{type:v.H.NAVIGATE,path:e.url}:{type:v.H.OPEN_URL,target:e.target,url:e.url}}getSubMenuBehaviour(){var e,n;return null!==(e=null===(n=this.config.openSubMenu)||void 0===n?void 0:n.behaviour)&&void 0!==e?e:"onMouseHover"}isExpanded(e){return this.expandedMenuItemId===e.id}anyMenuItemExpanded(){return null!=this.expandedMenuItemId}isRootSubMenu(e){return 0===e.depth&&this.hasMenuItemChildren(e)}hasMenuItemChildren(e){return e.childItems.length>0}getMenuItemById(e){var n=null;return this.menus.forEach(o=>{o.items.forEach(u=>{n||(n=this.getMenuItemByIdRecursive(u,e))})}),n}getMenuItemByIdRecursive(e,n){let o=null;return e.id===n&&(o=e),e.childItems.forEach(u=>{o||(o=this.getMenuItemByIdRecursive(u,n))}),o}openSubMenuForItem(e){this.expandedMenuItemId=e.id,this.setupMenuCloseHandler(e),this.changeDetectorRef.detectChanges()}closeSubMenu(e){this.isExpanded(e)&&this.clearSubMenu()}clearSubMenu(){this.expandedMenuItemId=null,this.changeDetectorRef.detectChanges()}setupMenuCloseHandler(e){(0,T.h)((0,d.R)(this.document,"touchstart",{passive:!1}),(0,d.R)(this.document,"click",{passive:!1})).pipe((0,_.p)(n=>this.expandedMenuItemId===e.id&&!this.elementRef.nativeElement.contains(n.target)),(0,S.s)(1)).subscribe(n=>{this.closeSubMenu(e)})}}return(r=a).\u0275fac=function(e){return new(e||r)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(R.V),t.rXU(P.I),t.rXU(c.qQ),t.rXU(C.B),t.rXU(t.abz),t.rXU(t.pJN),t.rXU(G.Wj),t.rXU(t.gRc),t.rXU(H.d),t.rXU(t.Agw),t.rXU(k.r6))},r.\u0275cmp=t.VBU({type:r,selectors:[["storefront-menu"]],viewQuery:function(e,n){if(1&e&&t.GBs(D,5),2&e){let o;t.mGM(o=t.lsd())&&(n.menuItems=o)}},hostVars:2,hostBindings:function(e,n){2&e&&t.AVh("menu-fade-out",n.fadeOutActive)},features:[t.Jv_([C.B]),t.Vt3],decls:2,vars:2,consts:[["menuItemsTemplate",""],["menuItem",""],[4,"ngIf"],[1,"side-menu-backdrop",3,"click"],[1,"menu",3,"click"],[1,"items"],["class","menu-actions",4,"ngIf"],["class","menu-content",4,"ngFor","ngForOf"],[1,"menu-actions"],[3,"baseContext","baseConfig","click",4,"ngFor","ngForOf"],[3,"click","baseContext","baseConfig"],[1,"menu-content"],[3,"baseConfig","onButtonTap",4,"ngFor","ngForOf"],[3,"onButtonTap","baseConfig"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"menu-item-children"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){1&e&&t.DNE(0,j,6,2,"ng-container",2)(1,J,7,2,"ng-container",2),2&e&&(t.Y8G("ngIf",("SLIDE_IN_LEFT"===n.template||"SLIDE_IN_RIGHT"===n.template)&&n.show),t.R7$(),t.Y8G("ngIf","STATIC"===n.template))},styles:['html body{--primaryColor: rgb(0, 140, 190);--secondaryColor: rgb(200, 200, 200);--backgroundColor: rgb(255, 255, 255);--secondaryBackgroundColor: rgb(200, 200, 200);--textColor: rgb(0, 0, 0);--secondaryTextColor: rgb(80, 80, 80);--ghostColor: rgba(200, 200, 200);--gutter: 16px;--borderRadius: 4px;--actionButtonHeight: 50px;--appBarColor: white;--appBarTextColor: var(--textColor);--appBarHeight: 54px;--appBarDisplay: flex;--appBarShrinkDisplay: flex;--appBarShrinkHeight: 30px;--appBarFontSize: 1em;--appBarShrinkFontSize: .6em;--appBarPaddingVert: 4px;--appBarPaddingHoriz: 0;--appBarButtonWidth: 50px;--appMenuColor: white;--navigationHeight: 50px;--navigationShrinkHeight: 30px;--navigationColor: var(--textColor);--navigationBgColor: white;--navigationActiveColor: var(--primaryColor);--listPadding: var(--gutter);--listPaddingHoriz: var(--gutter);--listPaddingVert: var(--gutter);--listItemGutter: var(--gutter);--gridListColumns: 4;--listTabBorderWidth: 1px;--listTabBorderRadius: var(--borderRadius);--listTabHighlightColor: var(--primaryColor);--listTabHighlightTextColor: white;--buttonPaddingVert: calc(var(--gutter) / 2);--buttonPaddingHoriz: calc(var(--gutter) / 2);--modalBgColor: white;--modalPadding: var(--gutter);--modalPaddingBottom: var(--gutter);--issueProgressPaddingVert: 2px;--issueProgressPaddingHoriz: 2px;--issueProgressMarginVert: calc(var(--gutter) / 2);--issueProgressMarginHoriz: calc(var(--gutter) / 2);--issueProgressBgColor: var(--secondaryColor);--issueProgressColor: var(--primaryColor);--issueProgressFontColor: white;--issueUpdateBadgeBgColor: var(--primaryColor);--issueUpdateBadgeColor: white;--subscriptionPaddingVert: var(--gutter);--subscriptionPaddingHoriz: var(--gutter);--subscriptionPurchasedMarginHoriz: 6px;--subscriptionPurchasedBorderRadius: 20px;--loginPaddingVert: var(--gutter);--loginPaddingHoriz: var(--gutter);--loginElementMarginVert: calc(var(--gutter));--loginElementMarginHoriz: 0;--couponPaddingVert: var(--gutter);--couponPaddingHoriz: var(--gutter);--couponElementMarginVert: calc(var(--gutter));--couponElementMarginHoriz: 0;--couponElementPaddingVert: calc(var(--gutter));--couponElementPaddingHoriz: calc(var(--gutter));--bookmarkBgColor: transparent;--bookmarkImageBgColor: white;--sectionPadding: 0;--spinnerColor: #fff;--imageBackgroundColor: transparent;--imageLoadingColor: rgb(200, 200, 200);--dropdownPaddingX: calc(var(--gutter) / 2);--dropdownPaddingY: calc(var(--gutter) / 2);--tickerGutter: var(--gutter);--tickerPaddingY: var(--gutter);--searchFieldFontSize: 14px;--swiperPaginationTabHeight: 50px;--swiperPaginationBorderWidth: 4px;--swiperPaginationBackgroundColor: white;--swiperPaginationColor: var(--primaryColor);--switchWidth: 50px;--switchActiveColor: var(--primaryColor);--switchHandleColor: #fff;--switchBackgroundColor: #f1f1f1;--switchBorderWidth: 3px;--switchBorderRadius: calc(var(--switchWidth) * .6);--stackedCoversWidth: 40%;--stackedCoversScaleStep: .1;--stackedCoversTranslateStep: .3;--stackedCoversTopEvenCenteredGap: 4px;--toolbarbackgroundColor: transparent;--toolbarIconColor: #a9a9a9;color:var(--textColor);--primaryColor: #00adef;--primaryColorNightMode: white;--accentColor: var(--primaryColor);--contentFont: "OpenSans", sans-serif;--contentHeadlineFont: var(--contentFont);--contentIconNavigateBack: url(resource://dynamic/content/assets/ic_left.svg);--contentIconNavigateForward: url(resource://dynamic/content/assets/ic_right.svg);--contentSpinner: url(resource://dynamic/content/assets/tail-spin.svg);--contentBgColor: #ffffff;--contentTextColor: black;--contentPaddingVert: 30px;--contentPaddingHoriz: 50px;--contentHeaderMarginTop: 1em;--contentHeaderMarginBottom: 1.5em;--contentHeaderPaddingVert: 1em;--contentHeaderElementMarginTop: .5em;--contentHeaderElementMarginBottom: .5em;--contentSectionPaddingVert: 1em;--contentSectionPaddingHoriz: 1em;--contentElementMarginTop: 1em;--contentElementMarginBottom: 1em;--contentElementPaddingVert: .5em;--contentElementPaddingHoriz: 1em;--contentHeadlineBigMarginTop: 1.5em;--contentHeadlineBigMarginBottom: .5em;--contentHeadlineSmallMarginTop: 1em;--contentHeadlineSmallMarginBottom: .5em;--contentNavigateButtonColor: var(--primaryColor);--contentNavigateButtonSize: 30px;--contentNavigateButtonGap: 12px;--contentBgColorNightMode: #323232;--contentTextColorNightMode: #ffffff;--contentNavigateButtonColorNightMode: var(--primaryColorNightMode);--menuItemIconGap: calc(var(--menuItemIconHeight) / 2);--menuItemIconHeight: 14px}@media (max-width: 767px) and (orientation: portrait),(max-height: 767px) and (orientation: landscape){html body{--gridListColumns: 3}}@media (max-width: 533px) and (orientation: portrait),(max-height: 533px) and (orientation: landscape){html body{--gridListColumns: 2;--actionButtonHeight: 40px}}@media (max-height: 533px) and (orientation: landscape){html body{--gridListColumns: 3}}@media (max-width: 533px) and (orientation: portrait){html body{--contentPaddingHoriz: 30px}}.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-menu{--textColor: var(--colorTextInverted, #000)}storefront-menu .menu-content{display:flex;flex-wrap:wrap}storefront-menu[template=STATIC] .menu-content>ul{display:flex}storefront-menu[template=STATIC] .menu-item{list-style:none}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul{display:none}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button{width:100%;display:block}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button>button{width:100%}storefront-menu[template=STATIC] .menu-item[depth="0"]>ul storefront-button>button a{justify-content:flex-start}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children{display:flex;position:absolute;box-shadow:0 5px 15px #00000080;z-index:100;background-color:var(--backgroundColor);border-radius:4px}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children storefront-button>button{background-color:transparent}storefront-menu[template=STATIC] .menu-item[depth="0"].menu-item-open>.menu-item-children storefront-button>button:hover{background-color:var(--primaryColor)}@keyframes menu-slide-in-opacity{0%{opacity:0}to{opacity:1}}@keyframes menu-slide-out-opacity{0%{opacity:1}to{opacity:0}}storefront-menu[template=SLIDE_IN_RIGHT] .side-menu-backdrop,storefront-menu[template=SLIDE_IN_LEFT] .side-menu-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;z-index:6;background-color:#0009;animation:menu-slide-in-opacity .3s forwards}storefront-menu[template=SLIDE_IN_RIGHT] .menu,storefront-menu[template=SLIDE_IN_LEFT] .menu{position:fixed;width:100%;top:0;height:100vh;max-width:300px;z-index:8;background-color:#fff;font-family:roboto,sans-serif;padding:0 20px 20px;overflow-y:auto}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-actions,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-actions{display:flex;justify-content:end;-webkit-justify-content:flex-end;align-items:flex-end;-webkit-align-items:flex-end;position:-webkit-sticky;position:-webkit-sticky;position:sticky;top:0;padding-bottom:10%;border-bottom:.5px var(--toolbarIconColor) solid;background-color:#fff;z-index:1}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-actions storefront-element,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-actions storefront-element{margin-right:.3em;color:var(--toolbarIconColor);font-size:1.5em}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content{display:flex;flex-direction:column;margin-bottom:15px;background-color:var(--appMenuColor);overflow:hidden}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content>storefront-button,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content>storefront-button{font-size:20px;line-height:56px;letter-spacing:.38px;font-family:Helvetica Neue,sans-serif}storefront-menu[template=SLIDE_IN_RIGHT] .menu .items .menu-content>storefront-button>button,storefront-menu[template=SLIDE_IN_LEFT] .menu .items .menu-content>storefront-button>button{text-align:left;width:100%}storefront-menu[template=SLIDE_IN_RIGHT].menu-fade-out .side-menu-backdrop,storefront-menu[template=SLIDE_IN_LEFT].menu-fade-out .side-menu-backdrop{animation:menu-slide-out-opacity .3s forwards}@keyframes menu-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes menu-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}storefront-menu[template=SLIDE_IN_RIGHT] .menu{right:0;left:auto;animation:menu-slide-in-right .3s forwards}storefront-menu[template=SLIDE_IN_RIGHT].menu-fade-out .menu{animation:menu-slide-out-right .3s forwards}@keyframes menu-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes menu-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}storefront-menu[template=SLIDE_IN_LEFT] .menu{right:auto;left:0;animation:menu-slide-in-left .3s forwards}storefront-menu[template=SLIDE_IN_LEFT].menu-fade-out .menu{animation:menu-slide-out-left .3s forwards}\n'],encapsulation:2,changeDetection:0}),a})();var Z=s(9805),q=s(395);let tt=(()=>{var r;class a{}return(r=a).\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[c.MD,Z.ButtonModule]}),a})();t.wjB(I,[c.YU,c.Sq,c.bT,c.T3,q.Q],[]);const et=I}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_product_product_module_ts"],{8866:(N,p,e)=>{e.r(p),e.d(p,{ProductModule:()=>X,component:()=>F});var a=e(177),h=e(467),f=e(4404),m=e(1210);const v={fallback:{type:"html",tag:"p",content:"ERROR_PRODUCT",variables:["$context.error"]}};var P=e(1497),x=e(8179),g=e(8251),y=e(610),b=e(4648),o=e(3953),U=e(9516),R=e(8471),I=e(1652),O=e(3648);function E(n,l){if(1&n&&o.nrm(0,"storefront-element",1),2&n){const i=o.XpG();o.Y8G("baseContext",i.childContext)("baseConfig",i.childConfig)}}let D=(()=>{var n;class l extends m.${constructor(c,t,u,s,r,d,C){super(t,c,u,r,C),this.elementRef=c,this.injector=t,this.contextService=u,this.store=s,this.document=r,this.purpleService=d,this.globalService=C,this.defaultConfig={...v}}onConfigChanges(){var c=()=>super.onConfigChanges,t=this;return(0,h.A)(function*(){c().call(t);const u=t.config.productId||new URL(t.document.location.href).searchParams.get("productId");try{const s=yield t.purpleService.getProducts(u);if(t.config.localIssueFilter){const r=(0,x.n)(t.config.localIssueFilter);s.issues=s.issues.filter(d=>(0,b.tU)(r,d))}if(s.issues.length)t.issue=s.issues[0],t.childContext={...t.context,issue:t.issue},t.childConfig={type:"issue",...t.config.issue};else if(s.subscriptions.length){const r=s.subscriptions[0],d=yield t.purpleService.getPrice(r.productId);t.subscription=P.r.toSubscriptionsWithPrice(r,d)[0],t.childContext={...t.context,subscription:t.subscription},t.childConfig={type:"subscription",...t.config.subscription}}else{if(!s.publicationProducts.length)throw{code:f.ERROR_CODE.UNKNOWN_PRODUCT};t.publicationProduct=s.publicationProducts[0],t.childContext={...t.context},t.childConfig={type:"publication-completion",...t.config.publicationCompletion,productFilter:{productId:{value:u}}}}}catch(s){let r=s;null!=s&&s.code||(r={...s,code:f.ERROR_CODE.UNKNOWN}),t.store.dispatch((0,y.k4)({url:window.location.href,key:"".concat(t.getTrackingBaseKey(),"_LOAD_FAILED"),params:{error:r.code,productId:u}})),t.childConfig={...t.config.fallback},t.childContext={...t.context,error:r.code}}})()}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"fallback"]}}return(n=l).type="product",n.\u0275fac=function(c){return new(c||n)(o.rXU(o.aKT),o.rXU(o.zZn),o.rXU(U.V),o.rXU(g.B),o.rXU(a.qQ),o.rXU(R.Wj),o.rXU(I.d))},n.\u0275cmp=o.VBU({type:n,selectors:[["storefront-product"]],features:[o.Jv_([g.B]),o.Vt3],decls:1,vars:1,consts:[[3,"baseContext","baseConfig",4,"ngIf"],[3,"baseContext","baseConfig"]],template:function(c,t){1&c&&o.DNE(0,E,1,2,"storefront-element",0),2&c&&o.Y8G("ngIf",t.childConfig)},dependencies:[a.bT,O._],encapsulation:2}),l})();var T=e(6895);let X=(()=>{var n;class l{}return(n=l).\u0275fac=function(c){return new(c||n)},n.\u0275mod=o.$C({type:n}),n.\u0275inj=o.G2t({imports:[a.MD,T.r]}),l})();const F=D}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_product_product_module_ts"],{8866:(M,p,e)=>{e.r(p),e.d(p,{ProductModule:()=>F,component:()=>T});var d=e(177),h=e(467),f=e(4404),m=e(1210);const v={fallback:{type:"html",tag:"p",content:"ERROR_PRODUCT",variables:["$context.error"]}};var P=e(1497),x=e(8179),g=e(8251),y=e(610),R=e(4648),o=e(3953),U=e(9516),b=e(5102),I=e(1652),O=e(3648);function D(n,l){if(1&n&&o.nrm(0,"storefront-element",1),2&n){const i=o.XpG();o.Y8G("baseContext",i.childContext)("baseConfig",i.childConfig)}}let E=(()=>{var n;class l extends m.${constructor(c,t,u,s,r,a,C,N){super(t,c,u,r,C),this.elementRef=c,this.injector=t,this.contextService=u,this.store=s,this.document=r,this.purpleService=a,this.globalService=C,this.changeDetectorRef=N,this.defaultConfig={...v}}onConfigChanges(){var c=()=>super.onConfigChanges,t=this;return(0,h.A)(function*(){c().call(t);const u=t.config.productId||new URL(t.document.location.href).searchParams.get("productId");try{const s=yield t.purpleService.getProducts(u);if(t.config.localIssueFilter){const r=(0,x.n)(t.config.localIssueFilter);s.issues=s.issues.filter(a=>(0,R.tU)(r,a))}if(s.issues.length)t.issue=s.issues[0],t.childContext={...t.context,issue:t.issue},t.childConfig={type:"issue",...t.config.issue};else if(s.subscriptions.length){const r=s.subscriptions[0],a=yield t.purpleService.getPrice(r.productId);t.subscription=P.r.toSubscriptionsWithPrice(r,a)[0],t.childContext={...t.context,subscription:t.subscription},t.childConfig={type:"subscription",...t.config.subscription}}else{if(!s.publicationProducts.length)throw{code:f.ERROR_CODE.UNKNOWN_PRODUCT};t.publicationProduct=s.publicationProducts[0],t.childContext={...t.context},t.childConfig={type:"publication-completion",...t.config.publicationCompletion,productFilter:{productId:{value:u}}}}}catch(s){let r=s;null!=s&&s.code||(r={...s,code:f.ERROR_CODE.UNKNOWN}),t.store.dispatch((0,y.k4)({url:window.location.href,key:"".concat(t.getTrackingBaseKey(),"_LOAD_FAILED"),params:{error:r.code,productId:u}})),t.childConfig={...t.config.fallback},t.childContext={...t.context,error:r.code}}t.changeDetectorRef.markForCheck()})()}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"fallback"]}}return(n=l).type="product",n.\u0275fac=function(c){return new(c||n)(o.rXU(o.aKT),o.rXU(o.zZn),o.rXU(U.V),o.rXU(g.B),o.rXU(d.qQ),o.rXU(b.Wj),o.rXU(I.d),o.rXU(o.gRc))},n.\u0275cmp=o.VBU({type:n,selectors:[["storefront-product"]],features:[o.Jv_([g.B]),o.Vt3],decls:1,vars:1,consts:[[3,"baseContext","baseConfig",4,"ngIf"],[3,"baseContext","baseConfig"]],template:function(c,t){1&c&&o.DNE(0,D,1,2,"storefront-element",0),2&c&&o.Y8G("ngIf",t.childConfig)},dependencies:[d.bT,O._],encapsulation:2}),l})();var X=e(6895);let F=(()=>{var n;class l{}return(n=l).\u0275fac=function(c){return new(c||n)},n.\u0275mod=o.$C({type:n}),n.\u0275inj=o.G2t({imports:[d.MD,X.r]}),l})();const T=E}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_publication-completion_publication-completion_module_ts"],{2932:(D,C,o)=>{o.d(C,{h:()=>F,q:()=>U});var d=o(177),n=o(3953),T=o(8251),m=o(8890),P=o(9876),R=o(345),_=o(4748),O=o(9516),a=o(8471);const B=["image"];function y(u,A){if(1&u){const f=n.RV6();n.j41(0,"img",2,0),n.bIt("error",function(){n.eBV(f);const s=n.XpG();return n.Njj(s.onError())}),n.k0s()}if(2&u){const f=n.XpG();n.Y8G("src",f.safeResizeSrc,n.B4B)("alt",f.alt)("title",f.title),n.BMQ("aria-label",f.ariaLabel)}}let F=(()=>{var u;class A{set image(i){i&&this.onLoad(i),this._image=i}get image(){return this._image}constructor(i,s,I,v,G,S,X,t){this.sanitizer=i,this.changeDetectorRef=s,this.elementRef=I,this.subscriptions=v,this.platformId=G,this.ssrService=S,this.contextService=X,this.purpleService=t,this.error=new n.bkB,this.height=U.AUTO}get empty(){return!this.src}ngOnInit(){this.initProperties(),(0,d.UE)(this.platformId)&&this.subscriptions.subscribe((0,m.eh)(this,this.elementRef,{skipWait:!1}),i=>this.load())}initProperties(){var i,s,I,v;this.alt=(null===(i=this.extendedThumbnail)||void 0===i?void 0:i.properties.alt)||(null===(s=this.extendedThumbnail)||void 0===s?void 0:s.properties.caption)||"",this.title=this.alt,this.ariaLabel=null!==(I=this.label)&&void 0!==I?I:this.alt,this.focalPoint=null===(v=this.extendedThumbnail)||void 0===v?void 0:v.properties.focuspoint}initAndLoad(){this.initProperties(),this.load()}load(){this.loaded||(this.loaded=!0,this.src&&this.update(),this.changeDetectorRef.detectChanges())}ngOnChanges(i){i.src&&this.loaded&&this.update()}update(){this.updateImageRatio(),this.updateResizeSrc()}onLoad(i){i.nativeElement.classList.add("loaded"),this.elementRef.nativeElement.classList.add("loaded"),this.changeDetectorRef.detectChanges(),i.nativeElement.addEventListener("load",()=>{this.updateImageRatio(!0,i),this.changeDetectorRef.markForCheck()}),i.nativeElement.addEventListener("error",function(){i.nativeElement.style.display="none",i.nativeElement.nextElementSibling&&(i.nativeElement.nextElementSibling.style.display="inline")}),this.purpleService.addImageSrc(this.resizeSrc)}onError(){if(!this.safeResizeSrc)return;const i=this.purpleService.getAlternativeSrc(this.src);var s;i&&i!==this.resizeSrc?(this.setResizeSrc(i),this.changeDetectorRef.detectChanges()):(null===(s=this.image)||void 0===s||s.nativeElement.classList.add("error"),this.elementRef.nativeElement.classList.add("error"),this.error.emit(this))}updateImageRatio(i=!1,s=this.image){this.imageRatio=this.height===U.AUTO?(0,P.z)(!i,null==s?void 0:s.nativeElement,this.src)+"%":void 0}updateResizeSrc(){this.setResizeSrc((0,P.G)(this.elementRef.nativeElement,this.src,this.imageResolutionStrategy,this.focalPoint)),this.changeDetectorRef.detectChanges()}setResizeSrc(i){const s=this.contextService.toResourceUrl(i);this.resizeSrc=s,this.safeResizeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(s)}}return(u=A).\u0275fac=function(i){return new(i||u)(n.rXU(R.up),n.rXU(n.gRc),n.rXU(n.aKT),n.rXU(T.v),n.rXU(n.Agw),n.rXU(_.i),n.rXU(O.V),n.rXU(a.Wj))},u.\u0275cmp=n.VBU({type:u,selectors:[["storefront-image"]],viewQuery:function(i,s){if(1&i&&n.GBs(B,5),2&i){let I;n.mGM(I=n.lsd())&&(s.image=I.first)}},hostAttrs:["ngSkipHydration","true"],hostVars:12,hostBindings:function(i,s){2&i&&(n.BMQ("src",s.src)("label",s.label)("resolution-strategy",s.imageResolutionStrategy)("alt",s.alt)("title",s.title)("aria-label",s.ariaLabel)("focal-point",s.focalPoint)("height-strategy",s.height),n.xc7("padding-top",s.imageRatio),n.AVh("empty",s.empty))},inputs:{src:"src",label:"label",extendedThumbnail:"extendedThumbnail",imageResolutionStrategy:"imageResolutionStrategy",height:"height"},outputs:{error:"error"},features:[n.Jv_([T.v]),n.OA$],decls:1,vars:1,consts:[["image",""],[3,"src","alt","title","error",4,"ngIf"],[3,"error","src","alt","title"]],template:function(i,s){1&i&&n.DNE(0,y,2,4,"img",1),2&i&&n.Y8G("ngIf",s.loaded&&s.src)},dependencies:[d.bT],styles:["storefront-image{display:flex;justify-content:center;align-items:center;position:relative;background-color:var(--imageLoadingColor);transition:.2s background-color ease-in}storefront-image[height-strategy=FIXED]>img,storefront-image[height-strategy=AUTO]>img{position:absolute;width:auto;max-width:100%;top:0;object-fit:contain;height:100%;left:50%;transform:translate(-50%)}storefront-image.img-with-hidden-alt{content:attr(data-alt);display:none}storefront-image>img{display:block;transition:opacity .2s ease-in,background-color .2s ease-in;background-color:#fff0;max-width:100%;max-height:100%;opacity:0}storefront-image>img.loaded{opacity:1;background-color:var(--imageBackgroundColor)}storefront-image.loaded{background:#fff0}\n"],encapsulation:2,changeDetection:0}),A})();var U=function(u){return u.AUTO="AUTO",u.FIXED="FIXED",u.DEFAULT="DEFAULT",u}(U||{})},4403:(D,C,o)=>{o.d(C,{U:()=>T});var d=o(177),n=o(3953);let T=(()=>{var m;class P{}return(m=P).\u0275fac=function(_){return new(_||m)},m.\u0275mod=n.$C({type:m}),m.\u0275inj=n.G2t({imports:[d.MD]}),P})()},4365:(D,C,o)=>{o.d(C,{AN:()=>R,FZ:()=>_,Mw:()=>O,Rp:()=>P,W9:()=>m});var d=o(4404),m=function(a){return a.COVER="cover",a.CARD="card",a.HIGHLIGHT="highlight",a.DETAILS="details",a.GROUP="group",a}(m||{});const P={showErrorDialog:!0};var R=function(a){return a.SINGLE="SINGLE",a.MULTI="MULTI",a}(R||{}),_=function(a){return a.SILENT="SILENT",a}(_||{});const O={template:m.CARD,openContent:{mode:d.DisplayMode.MODAL,titleBar:!0},downloadOptions:null,customButtons:[],customMessages:[],titleMessage:"ISSUE_TITLE",descriptionMessage:"ISSUE_DESCRIPTION",publicationTitleMessage:"ISSUE_PUBLICATION_TITLE"}},9287:(D,C,o)=>{o.r(C),o.d(C,{PublicationCompletionModule:()=>rt,component:()=>at});var d=o(177),n=o(6600),T=o(6483),m=o(9805),P=o(6895),R=o(4403),_=o(6215),O=o(467),a=o(4404),B=o(4572),y=o(8251),F=o(4004),U=o(4622),u=o(3178),A=o(8091),f=o(7879),i=o(1210),s=o(4365);const I={publicationId:null,fallback:null,titleMessage:"PUBLICATION_COMPLETION_TITLE",promotionTextMessage:"PUBLICATION_COMPLETION_PROMOTION_TEXT",purchaseButtonMessage:"PUBLICATION_COMPLETION_ACTION_PURCHASE",maxDisplayIssues:5,maxUnlockableIssues:1e3};var v=o(8179),G=o(5964),S=o(1739),X=o(950),t=o(3953),$=o(9516),j=o(20),W=o(8004),K=o(7010),Y=o(8471),z=o(1652),V=o(8909),H=o(2932),Q=o(7240),Z=o(3648);const k=r=>[r];function J(r,g){1&r&&t.nrm(0,"storefront-image",10),2&r&&t.Y8G("src",g.$implicit.thumbnails.default)}function w(r,g){if(1&r&&(t.j41(0,"div",8),t.DNE(1,J,1,1,"storefront-image",9),t.k0s()),2&r){const l=t.XpG(3);t.R7$(),t.Y8G("ngForOf",l.displayedIssues)}}function q(r,g){1&r&&t.nrm(0,"storefront-spinner",11)}function tt(r,g){if(1&r){const l=t.RV6();t.qex(0),t.DNE(1,w,2,1,"div",2),t.nrm(2,"h3",3)(3,"p",4),t.j41(4,"button",5),t.bIt("click",function(c){t.eBV(l);const p=t.XpG(2);return t.Njj(p.onClickPurchase(c))}),t.nrm(5,"span",6),t.DNE(6,q,1,0,"storefront-spinner",7),t.k0s(),t.bVm()}if(2&r){const l=t.XpG(2);t.R7$(),t.Y8G("ngIf",l.displayedIssues),t.R7$(),t.Y8G("storefrontTranslate",l.config.titleMessage),t.R7$(),t.Y8G("storefrontTranslate",l.config.promotionTextMessage)("storefrontTranslateArgs",l.publicationCompletionArgs),t.R7$(),t.Y8G("disabled",l.purchaseLoading),t.R7$(),t.Y8G("storefrontTranslate",l.config.purchaseButtonMessage)("storefrontTranslateArgs",t.eq3(8,k,l.productPriceInfo.formattedPrice)),t.R7$(),t.Y8G("ngIf",l.purchaseLoading)}}function et(r,g){if(1&r&&(t.qex(0),t.nrm(1,"storefront-element",12),t.bVm()),2&r){const l=t.XpG(2);t.R7$(),t.Y8G("baseContext",l.baseContext)("baseConfig",l.fallback)}}function ot(r,g){if(1&r&&(t.qex(0),t.nrm(1,"p",13),t.bVm()),2&r){const l=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslateArgs",t.eq3(1,k,l.error.code))}}function nt(r,g){if(1&r&&(t.qex(0),t.DNE(1,tt,7,10,"ng-container",0)(2,et,2,2,"ng-container",0)(3,ot,2,3,"ng-container",0),t.bVm()),2&r){const l=t.XpG();t.R7$(),t.Y8G("ngIf",!l.fallback&&!l.publicationCompletionLoading&&!l.error),t.R7$(),t.Y8G("ngIf",l.fallback),t.R7$(),t.Y8G("ngIf",l.error)}}function it(r,g){1&r&&t.nrm(0,"storefront-spinner",14)}let st=(()=>{var r;class g extends i.${constructor(e,c,p,x,E,h,M,b,L,lt,N){super(p,e,c,L,N),this.elementRef=e,this.contextService=c,this.injector=p,this.store=x,this.changeDetectorRef=E,this.dialog=h,this.eventActionService=M,this.rxStore=b,this.document=L,this.purpleService=lt,this.globalService=N,this.defaultConfig={...I},this.error=null,this.unlockableIssues=[],this.displayedIssues=[],this.unlockableIssuesPriceInfos=[],this.publicationCompletionArgs=[],this.publicationCompletionLoading=!0,this.purchaseLoading=!1,this.purchaseConfig={...s.Rp}}onConfigChanges(){this.purchaseConfig={...s.Rp,...this.config.purchase},this.config.titleMessage=(0,v.v3)(this.config.titleMessage),this.config.promotionTextMessage=(0,v.v3)(this.config.promotionTextMessage),this.config.purchaseButtonMessage=(0,v.v3)(this.config.purchaseButtonMessage),this.initPublicationCompletion()}initPublicationCompletion(){var e=this;return(0,O.A)(function*(){var c;const p={publicationProductFilter:{AND:[{purchased:{value:!1}},{hidden:{value:!1}}]}};(0,f.E7)(window.purple.catalog,{major:1,minor:4},a.IntOperation.GREATER_THAN)&&p.publicationProductFilter.AND.push({type:{value:a.PublicationProductType.BACK_ISSUE_COMPLETION}}),p.maxUnlockableContents=null!==(c=e.config.maxUnlockableContents)&&void 0!==c?c:e.config.maxUnlockableIssues,e.config.productFilter&&(p.publicationProductFilter={AND:[p.publicationProductFilter,e.config.productFilter]}),e.config.unlockableIssuesFilter&&(p.unlockableIssuesFilter=(0,v.n)(e.config.unlockableIssuesFilter),console.error("using deprecated unlockableIssuesFilter on publication-completion component, use unlockableContentsFilter instead")),e.config.unlockableContentsFilter&&(p.unlockableContentsFilter=(0,v.Ph)(e.config.unlockableContentsFilter));try{var x;const E=yield e.purpleService.getPublicationProducts(p);if(E){let h=[];e.config.publicationId?e.product=E.find(M=>!!M.publications[e.config.publicationId]):e.config.publicationFilter?(h=(yield e.purpleService.getPublications({publicationFilter:(0,v.y3)(e.config.publicationFilter)})).nodes.map(b=>b.id),e.product=E.find(b=>!!h.find(L=>b.publications[L]))):e.product=E[0],e.product&&(h=Object.keys(e.product.publications),e.unlockableIssues=h.reduce((M,b)=>[...M,...e.product.publications[b].unlockableIssues],[]))}if(e.product&&(null===(x=e.unlockableIssues)||void 0===x?void 0:x.length)>0){e.unlockableIssues=(0,X.dV)(e.unlockableIssues),e.displayedIssues=e.unlockableIssues.slice(0,e.config.maxDisplayIssues);try{e.store.subscribe(e.calculatePrices(),([h,M])=>{h?(0,S.b)(h)?e.showError(h):(e.productPriceInfo=h,e.unlockableIssuesPriceInfos=M.filter(b=>!!b&&!(0,S.b)(b)),e.unlockableIssuesPrice=e.unlockableIssuesPriceInfos.reduce((b,L)=>L?b+L.price:b,0),e.productPriceInfo.price<e.unlockableIssuesPrice?(e.fallback=null,e.error=null,e.saving=Math.floor((e.unlockableIssuesPrice-e.productPriceInfo.price)/e.unlockableIssuesPrice*100),e.publicationCompletionArgs=e.getPublicationCompletionArgs(),e.publicationCompletionLoading=!1):e.showFallback()):e.showFallback()})}catch(h){console.warn("Could not calculate all publication completion prices: ",h),e.showError(h)}}else e.showFallback()}catch(E){console.warn("Could not load publication completion products: ",E),e.showError(E)}})()}calculatePrices(){const e=this.unlockableIssues.map(p=>p.productId),c=(0,B.z)((0,U.Zt)(this.product.productId)(this.rxStore),(0,U.TX)(e)(this.rxStore)).pipe((0,G.p)(([p,x])=>!x.includes(void 0)));return this.store.dispatch((0,F.$W)({productIds:[...e,this.product.productId]})),c}showFallback(){this.publicationCompletionLoading=!1,this.fallback=this.config.fallback}showError(e){this.publicationCompletionLoading=!1,this.error=e}onClickPurchase(e){var c=this;return(0,O.A)(function*(){e.stopPropagation(),c.purchaseLoading=!0,c.changeDetectorRef.detectChanges(),yield c.eventActionService.processPurchaseAction({...c.purchaseConfig,productId:c.product.productId,price:c.productPriceInfo.price,currency:c.productPriceInfo.currency},c),c.purchaseLoading=!1})()}getPublicationCompletionArgs(){if(this.unlockableIssues.length>0&&this.saving&&this.unlockableIssuesPrice&&this.productPriceInfo){const e=new Intl.NumberFormat((0,u.JK)(),{style:"currency",currency:this.unlockableIssuesPriceInfos[0].currency});return['<span class="issue-count">'.concat(this.unlockableIssues.length,"</span>"),'<span class="saving">'.concat(this.saving,"%</span>"),'<span class="former-price">'.concat(e.format(this.unlockableIssuesPrice),"</span>"),'<span class="current-price">'.concat(this.productPriceInfo.formattedPrice,"</span>")]}return[]}getTrackingParams(){return(0,f.TH)(this.product,this.productPriceInfo)}getErrorDialogArgs(e){return(0,A.F0)((0,A.E2)(e,this.contextService),this.product)}}return(r=g).type="publication-completion",r.\u0275fac=function(e){return new(e||r)(t.rXU(t.aKT),t.rXU($.V),t.rXU(t.zZn),t.rXU(y.B),t.rXU(t.gRc),t.rXU(j.o),t.rXU(W.G),t.rXU(K.il),t.rXU(d.qQ),t.rXU(Y.Wj),t.rXU(z.d))},r.\u0275cmp=t.VBU({type:r,selectors:[["storefront-publication-completion"]],features:[t.Jv_([y.B]),t.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],["class","publication-completion-loading",4,"ngIf"],["class","publication-completion-issues stacked top-even-centered",4,"ngIf"],[1,"title",3,"storefrontTranslate"],[1,"promotion-text",3,"storefrontTranslate","storefrontTranslateArgs"],["mat-ripple","",1,"button-purchase","action-button",3,"click","disabled"],[3,"storefrontTranslate","storefrontTranslateArgs"],["class","button-spinner",4,"ngIf"],[1,"publication-completion-issues","stacked","top-even-centered"],["height","DEFAULT",3,"src",4,"ngFor","ngForOf"],["height","DEFAULT",3,"src"],[1,"button-spinner"],[1,"publication-completion-fallback",3,"baseContext","baseConfig"],["storefrontTranslate","ERROR_PUBLICATION_COMPLETION",1,"publication-completion-error",3,"storefrontTranslateArgs"],[1,"publication-completion-loading"]],template:function(e,c){1&e&&t.DNE(0,nt,4,3,"ng-container",0)(1,it,1,0,"storefront-spinner",1),2&e&&(t.Y8G("ngIf",c.config),t.R7$(),t.Y8G("ngIf",!c.config||c.publicationCompletionLoading))},dependencies:[d.Sq,d.bT,V.M,H.h,Q.t,n.r6,Z._],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-publication-completion{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}storefront-publication-completion h3{margin:var(--gutter);text-align:center}storefront-publication-completion .publication-completion-issues{display:flex;width:100%;justify-content:center}storefront-publication-completion .promotion-text{text-align:center;margin:var(--gutter)}storefront-publication-completion .promotion-text span{font-weight:700}storefront-publication-completion .promotion-text span.saving,storefront-publication-completion .promotion-text span.former-price,storefront-publication-completion .promotion-text span.current-price{color:var(--primaryColor)}storefront-publication-completion button{color:#fff;background-color:var(--primaryColor)}storefront-publication-completion button[disabled]{opacity:.5}@media (max-width: 533px) and (orientation: portrait),(max-height: 533px) and (orientation: landscape){storefront-publication-completion button{width:100%}}storefront-publication-completion storefront-spinner.publication-completion-loading{height:100px;width:100px;--spinnerColor: var(--secondaryColor)}\n'],encapsulation:2}),g})(),rt=(()=>{var r;class g{}return(r=g).\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[d.MD,T.h,R.U,_.O,m.ButtonModule,n.pZ,P.r]}),g})();const at=st},1739:(D,C,o)=>{function d(n){return n&&!!n.code}o.d(C,{b:()=>d})}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_publication-completion_publication-completion_module_ts"],{2932:(O,C,o)=>{o.d(C,{h:()=>F,q:()=>U});var u=o(177),n=o(3953),T=o(8251),f=o(8890),P=o(9876),R=o(345),_=o(4748),A=o(9516),a=o(5102);const B=["image"];function y(p,D){if(1&p){const d=n.RV6();n.j41(0,"img",2,0),n.bIt("error",function(){n.eBV(d);const r=n.XpG();return n.Njj(r.onError())}),n.k0s()}if(2&p){const d=n.XpG();n.Y8G("priority",d.lcpPrioritized())("ngSrc",d.safeResizeSrc)("alt",d.alt)("title",d.title),n.BMQ("aria-label",d.ariaLabel)}}let F=(()=>{var p;class D{set image(i){i&&this.onLoad(i),this._image=i}get image(){return this._image}constructor(i,r,I,v,G,S,k,t){this.sanitizer=i,this.changeDetectorRef=r,this.elementRef=I,this.subscriptions=v,this.platformId=G,this.ssrService=S,this.contextService=k,this.purpleService=t,this.lcpPrioritized=(0,n.hFB)(!1),this.error=new n.bkB,this.height=U.AUTO}get empty(){return!this.src}ngOnInit(){this.initProperties(),(0,u.UE)(this.platformId)&&this.subscriptions.subscribe((0,f.eh)(this,this.elementRef,{skipWait:!1}),i=>this.load())}initProperties(){var i,r,I,v;this.alt=(null===(i=this.extendedThumbnail)||void 0===i?void 0:i.properties.alt)||(null===(r=this.extendedThumbnail)||void 0===r?void 0:r.properties.caption)||"",this.title=this.alt,this.ariaLabel=null!==(I=this.label)&&void 0!==I?I:this.alt,this.focalPoint=null===(v=this.extendedThumbnail)||void 0===v?void 0:v.properties.focuspoint}initAndLoad(){this.initProperties(),this.load()}load(){this.loaded||(this.loaded=!0,this.src&&this.update(),this.changeDetectorRef.detectChanges())}ngOnChanges(i){i.src&&this.loaded&&this.update()}update(){this.updateImageRatio(),this.updateResizeSrc()}onLoad(i){i.nativeElement.classList.add("loaded"),this.elementRef.nativeElement.classList.add("loaded"),this.changeDetectorRef.detectChanges(),i.nativeElement.addEventListener("load",()=>{this.updateImageRatio(!0,i),this.changeDetectorRef.markForCheck()}),i.nativeElement.addEventListener("error",function(){i.nativeElement.style.display="none",i.nativeElement.nextElementSibling&&(i.nativeElement.nextElementSibling.style.display="inline")}),this.purpleService.addImageSrc(this.resizeSrc)}onError(){if(!this.safeResizeSrc)return;const i=this.purpleService.getAlternativeSrc(this.src);var r;i&&i!==this.resizeSrc?(this.setResizeSrc(i),this.changeDetectorRef.detectChanges()):(null===(r=this.image)||void 0===r||r.nativeElement.classList.add("error"),this.elementRef.nativeElement.classList.add("error"),this.error.emit(this))}updateImageRatio(i=!1,r=this.image){this.imageRatio=this.height===U.AUTO?(0,P.z)(!i,null==r?void 0:r.nativeElement,this.src)+"%":void 0}updateResizeSrc(){this.setResizeSrc((0,P.G)(this.elementRef.nativeElement,this.src,this.imageResolutionStrategy,this.focalPoint)),this.changeDetectorRef.detectChanges()}setResizeSrc(i){const r=this.contextService.toResourceUrl(i);this.resizeSrc=r,this.safeResizeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(r)}}return(p=D).\u0275fac=function(i){return new(i||p)(n.rXU(R.up),n.rXU(n.gRc),n.rXU(n.aKT),n.rXU(T.v),n.rXU(n.Agw),n.rXU(_.i),n.rXU(A.V),n.rXU(a.Wj))},p.\u0275cmp=n.VBU({type:p,selectors:[["storefront-image"]],viewQuery:function(i,r){if(1&i&&n.GBs(B,5),2&i){let I;n.mGM(I=n.lsd())&&(r.image=I.first)}},hostAttrs:["ngSkipHydration","true"],hostVars:12,hostBindings:function(i,r){2&i&&(n.BMQ("src",r.src)("label",r.label)("resolution-strategy",r.imageResolutionStrategy)("alt",r.alt)("title",r.title)("aria-label",r.ariaLabel)("focal-point",r.focalPoint)("height-strategy",r.height),n.xc7("padding-top",r.imageRatio),n.AVh("empty",r.empty))},inputs:{src:"src",label:"label",extendedThumbnail:"extendedThumbnail",imageResolutionStrategy:"imageResolutionStrategy",lcpPrioritized:[1,"lcpPrioritized"],height:"height"},outputs:{error:"error"},features:[n.Jv_([T.v]),n.OA$],decls:1,vars:1,consts:[["image",""],["fill","true",3,"priority","ngSrc","alt","title","error",4,"ngIf"],["fill","true",3,"error","priority","ngSrc","alt","title"]],template:function(i,r){1&i&&n.DNE(0,y,2,5,"img",1),2&i&&n.Y8G("ngIf",r.loaded&&r.src)},dependencies:[u.bT,u.kt],styles:["storefront-image{display:flex;justify-content:center;align-items:center;position:relative;background-color:var(--imageLoadingColor);transition:.2s background-color ease-in}storefront-image[height-strategy=FIXED]>img,storefront-image[height-strategy=AUTO]>img{position:absolute;width:auto;max-width:100%;top:0;object-fit:contain}storefront-image[height-strategy=DEFAULT]>img{position:static!important}storefront-image.img-with-hidden-alt{content:attr(data-alt);display:none}storefront-image>img{display:block;transition:opacity .2s ease-in,background-color .2s ease-in;background-color:#fff0;max-width:100%;max-height:100%;opacity:0}storefront-image>img.loaded{opacity:1;background-color:var(--imageBackgroundColor)}storefront-image.loaded{background:#fff0}\n"],encapsulation:2,changeDetection:0}),D})();var U=function(p){return p.AUTO="AUTO",p.FIXED="FIXED",p.DEFAULT="DEFAULT",p}(U||{})},4403:(O,C,o)=>{o.d(C,{U:()=>T});var u=o(177),n=o(3953);let T=(()=>{var f;class P{}return(f=P).\u0275fac=function(_){return new(_||f)},f.\u0275mod=n.$C({type:f}),f.\u0275inj=n.G2t({imports:[u.MD]}),P})()},4365:(O,C,o)=>{o.d(C,{AN:()=>R,FZ:()=>_,Mw:()=>A,Rp:()=>P,W9:()=>f});var u=o(4404),f=function(a){return a.COVER="cover",a.CARD="card",a.HIGHLIGHT="highlight",a.DETAILS="details",a.GROUP="group",a}(f||{});const P={showErrorDialog:!0};var R=function(a){return a.SINGLE="SINGLE",a.MULTI="MULTI",a}(R||{}),_=function(a){return a.SILENT="SILENT",a}(_||{});const A={template:f.CARD,openContent:{mode:u.DisplayMode.MODAL,titleBar:!0},downloadOptions:null,customButtons:[],customMessages:[],titleMessage:"ISSUE_TITLE",descriptionMessage:"ISSUE_DESCRIPTION",publicationTitleMessage:"ISSUE_PUBLICATION_TITLE"}},9287:(O,C,o)=>{o.r(C),o.d(C,{PublicationCompletionModule:()=>st,component:()=>at});var u=o(177),n=o(6600),T=o(6483),f=o(9805),P=o(6895),R=o(4403),_=o(6215),A=o(467),a=o(4404),B=o(4572),y=o(8251),F=o(4004),U=o(4622),p=o(3178),D=o(8091),d=o(7879),i=o(1210),r=o(4365);const I={publicationId:null,fallback:null,titleMessage:"PUBLICATION_COMPLETION_TITLE",promotionTextMessage:"PUBLICATION_COMPLETION_PROMOTION_TEXT",purchaseButtonMessage:"PUBLICATION_COMPLETION_ACTION_PURCHASE",maxDisplayIssues:5,maxUnlockableIssues:1e3};var v=o(8179),G=o(5964),S=o(1739),k=o(950),t=o(3953),$=o(9516),z=o(20),j=o(8004),W=o(7010),K=o(5102),Y=o(1652),V=o(8909),H=o(2932),Q=o(7240),Z=o(3648);const X=s=>[s];function J(s,g){1&s&&t.nrm(0,"storefront-image",10),2&s&&t.Y8G("src",g.$implicit.thumbnails.default)}function w(s,g){if(1&s&&(t.j41(0,"div",8),t.DNE(1,J,1,1,"storefront-image",9),t.k0s()),2&s){const l=t.XpG(3);t.R7$(),t.Y8G("ngForOf",l.displayedIssues)}}function q(s,g){1&s&&t.nrm(0,"storefront-spinner",11)}function tt(s,g){if(1&s){const l=t.RV6();t.qex(0),t.DNE(1,w,2,1,"div",2),t.nrm(2,"h3",3)(3,"p",4),t.j41(4,"button",5),t.bIt("click",function(c){t.eBV(l);const m=t.XpG(2);return t.Njj(m.onClickPurchase(c))}),t.nrm(5,"span",6),t.DNE(6,q,1,0,"storefront-spinner",7),t.k0s(),t.bVm()}if(2&s){const l=t.XpG(2);t.R7$(),t.Y8G("ngIf",l.displayedIssues),t.R7$(),t.Y8G("storefrontTranslate",l.config.titleMessage),t.R7$(),t.Y8G("storefrontTranslate",l.config.promotionTextMessage)("storefrontTranslateArgs",l.publicationCompletionArgs),t.R7$(),t.Y8G("disabled",l.purchaseLoading),t.R7$(),t.Y8G("storefrontTranslate",l.config.purchaseButtonMessage)("storefrontTranslateArgs",t.eq3(8,X,l.productPriceInfo.formattedPrice)),t.R7$(),t.Y8G("ngIf",l.purchaseLoading)}}function et(s,g){if(1&s&&(t.qex(0),t.nrm(1,"storefront-element",12),t.bVm()),2&s){const l=t.XpG(2);t.R7$(),t.Y8G("baseContext",l.baseContext)("baseConfig",l.fallback)}}function ot(s,g){if(1&s&&(t.qex(0),t.nrm(1,"p",13),t.bVm()),2&s){const l=t.XpG(2);t.R7$(),t.Y8G("storefrontTranslateArgs",t.eq3(1,X,l.error.code))}}function nt(s,g){if(1&s&&(t.qex(0),t.DNE(1,tt,7,10,"ng-container",0)(2,et,2,2,"ng-container",0)(3,ot,2,3,"ng-container",0),t.bVm()),2&s){const l=t.XpG();t.R7$(),t.Y8G("ngIf",!l.fallback&&!l.publicationCompletionLoading&&!l.error),t.R7$(),t.Y8G("ngIf",l.fallback),t.R7$(),t.Y8G("ngIf",l.error)}}function it(s,g){1&s&&t.nrm(0,"storefront-spinner",14)}let rt=(()=>{var s;class g extends i.${constructor(e,c,m,x,E,h,M,b,L,lt,N){super(m,e,c,L,N),this.elementRef=e,this.contextService=c,this.injector=m,this.store=x,this.changeDetectorRef=E,this.dialog=h,this.eventActionService=M,this.rxStore=b,this.document=L,this.purpleService=lt,this.globalService=N,this.defaultConfig={...I},this.error=null,this.unlockableIssues=[],this.displayedIssues=[],this.unlockableIssuesPriceInfos=[],this.publicationCompletionArgs=[],this.publicationCompletionLoading=!0,this.purchaseLoading=!1,this.purchaseConfig={...r.Rp}}onConfigChanges(){this.purchaseConfig={...r.Rp,...this.config.purchase},this.config.titleMessage=(0,v.v3)(this.config.titleMessage),this.config.promotionTextMessage=(0,v.v3)(this.config.promotionTextMessage),this.config.purchaseButtonMessage=(0,v.v3)(this.config.purchaseButtonMessage),this.initPublicationCompletion()}initPublicationCompletion(){var e=this;return(0,A.A)(function*(){var c;const m={publicationProductFilter:{AND:[{purchased:{value:!1}},{hidden:{value:!1}}]}};(0,d.E7)(window.purple.catalog,{major:1,minor:4},a.IntOperation.GREATER_THAN)&&m.publicationProductFilter.AND.push({type:{value:a.PublicationProductType.BACK_ISSUE_COMPLETION}}),m.maxUnlockableContents=null!==(c=e.config.maxUnlockableContents)&&void 0!==c?c:e.config.maxUnlockableIssues,e.config.productFilter&&(m.publicationProductFilter={AND:[m.publicationProductFilter,e.config.productFilter]}),e.config.unlockableIssuesFilter&&(m.unlockableIssuesFilter=(0,v.n)(e.config.unlockableIssuesFilter),console.error("using deprecated unlockableIssuesFilter on publication-completion component, use unlockableContentsFilter instead")),e.config.unlockableContentsFilter&&(m.unlockableContentsFilter=(0,v.Ph)(e.config.unlockableContentsFilter));try{var x;const E=yield e.purpleService.getPublicationProducts(m);if(E){let h=[];e.config.publicationId?e.product=E.find(M=>!!M.publications[e.config.publicationId]):e.config.publicationFilter?(h=(yield e.purpleService.getPublications({publicationFilter:(0,v.y3)(e.config.publicationFilter)})).nodes.map(b=>b.id),e.product=E.find(b=>!!h.find(L=>b.publications[L]))):e.product=E[0],e.product&&(h=Object.keys(e.product.publications),e.unlockableIssues=h.reduce((M,b)=>[...M,...e.product.publications[b].unlockableIssues],[]))}if(e.product&&(null===(x=e.unlockableIssues)||void 0===x?void 0:x.length)>0){e.unlockableIssues=(0,k.dV)(e.unlockableIssues),e.displayedIssues=e.unlockableIssues.slice(0,e.config.maxDisplayIssues);try{e.store.subscribe(e.calculatePrices(),([h,M])=>{h?(0,S.b)(h)?e.showError(h):(e.productPriceInfo=h,e.unlockableIssuesPriceInfos=M.filter(b=>!!b&&!(0,S.b)(b)),e.unlockableIssuesPrice=e.unlockableIssuesPriceInfos.reduce((b,L)=>L?b+L.price:b,0),e.productPriceInfo.price<e.unlockableIssuesPrice?(e.fallback=null,e.error=null,e.saving=Math.floor((e.unlockableIssuesPrice-e.productPriceInfo.price)/e.unlockableIssuesPrice*100),e.publicationCompletionArgs=e.getPublicationCompletionArgs(),e.publicationCompletionLoading=!1):e.showFallback()):e.showFallback()})}catch(h){console.warn("Could not calculate all publication completion prices: ",h),e.showError(h)}}else e.showFallback()}catch(E){console.warn("Could not load publication completion products: ",E),e.showError(E)}})()}calculatePrices(){const e=this.unlockableIssues.map(m=>m.productId),c=(0,B.z)((0,U.Zt)(this.product.productId)(this.rxStore),(0,U.TX)(e)(this.rxStore)).pipe((0,G.p)(([m,x])=>!x.includes(void 0)));return this.store.dispatch((0,F.$W)({productIds:[...e,this.product.productId]})),c}showFallback(){this.publicationCompletionLoading=!1,this.fallback=this.config.fallback}showError(e){this.publicationCompletionLoading=!1,this.error=e}onClickPurchase(e){var c=this;return(0,A.A)(function*(){e.stopPropagation(),c.purchaseLoading=!0,c.changeDetectorRef.detectChanges(),yield c.eventActionService.processPurchaseAction({...c.purchaseConfig,productId:c.product.productId,price:c.productPriceInfo.price,currency:c.productPriceInfo.currency},c),c.purchaseLoading=!1})()}getPublicationCompletionArgs(){if(this.unlockableIssues.length>0&&this.saving&&this.unlockableIssuesPrice&&this.productPriceInfo){const e=new Intl.NumberFormat((0,p.JK)(),{style:"currency",currency:this.unlockableIssuesPriceInfos[0].currency});return['<span class="issue-count">'.concat(this.unlockableIssues.length,"</span>"),'<span class="saving">'.concat(this.saving,"%</span>"),'<span class="former-price">'.concat(e.format(this.unlockableIssuesPrice),"</span>"),'<span class="current-price">'.concat(this.productPriceInfo.formattedPrice,"</span>")]}return[]}getTrackingParams(){return(0,d.TH)(this.product,this.productPriceInfo)}getErrorDialogArgs(e){return(0,D.F0)((0,D.E2)(e,this.contextService),this.product)}}return(s=g).type="publication-completion",s.\u0275fac=function(e){return new(e||s)(t.rXU(t.aKT),t.rXU($.V),t.rXU(t.zZn),t.rXU(y.B),t.rXU(t.gRc),t.rXU(z.o),t.rXU(j.G),t.rXU(W.il),t.rXU(u.qQ),t.rXU(K.Wj),t.rXU(Y.d))},s.\u0275cmp=t.VBU({type:s,selectors:[["storefront-publication-completion"]],features:[t.Jv_([y.B]),t.Vt3],decls:2,vars:2,consts:[[4,"ngIf"],["class","publication-completion-loading",4,"ngIf"],["class","publication-completion-issues stacked top-even-centered",4,"ngIf"],[1,"title",3,"storefrontTranslate"],[1,"promotion-text",3,"storefrontTranslate","storefrontTranslateArgs"],["mat-ripple","",1,"button-purchase","action-button",3,"click","disabled"],[3,"storefrontTranslate","storefrontTranslateArgs"],["class","button-spinner",4,"ngIf"],[1,"publication-completion-issues","stacked","top-even-centered"],["height","DEFAULT",3,"src",4,"ngFor","ngForOf"],["height","DEFAULT",3,"src"],[1,"button-spinner"],[1,"publication-completion-fallback",3,"baseContext","baseConfig"],["storefrontTranslate","ERROR_PUBLICATION_COMPLETION",1,"publication-completion-error",3,"storefrontTranslateArgs"],[1,"publication-completion-loading"]],template:function(e,c){1&e&&t.DNE(0,nt,4,3,"ng-container",0)(1,it,1,0,"storefront-spinner",1),2&e&&(t.Y8G("ngIf",c.config),t.R7$(),t.Y8G("ngIf",!c.config||c.publicationCompletionLoading))},dependencies:[u.Sq,u.bT,V.M,H.h,Q.t,n.r6,Z._],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-publication-completion{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center}storefront-publication-completion h3{margin:var(--gutter);text-align:center}storefront-publication-completion .publication-completion-issues{display:flex;width:100%;justify-content:center}storefront-publication-completion .promotion-text{text-align:center;margin:var(--gutter)}storefront-publication-completion .promotion-text span{font-weight:700}storefront-publication-completion .promotion-text span.saving,storefront-publication-completion .promotion-text span.former-price,storefront-publication-completion .promotion-text span.current-price{color:var(--primaryColor)}storefront-publication-completion button{color:#fff;background-color:var(--primaryColor)}storefront-publication-completion button[disabled]{opacity:.5}@media (max-width: 533px) and (orientation: portrait),(max-height: 533px) and (orientation: landscape){storefront-publication-completion button{width:100%}}storefront-publication-completion storefront-spinner.publication-completion-loading{height:100px;width:100px;--spinnerColor: var(--secondaryColor)}\n'],encapsulation:2}),g})(),st=(()=>{var s;class g{}return(s=g).\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.$C({type:s}),s.\u0275inj=t.G2t({imports:[u.MD,T.h,R.U,_.O,f.ButtonModule,n.pZ,P.r]}),g})();const at=rt},1739:(O,C,o)=>{function u(n){return n&&!!n.code}o.d(C,{b:()=>u})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_publication_publication_module_ts"],{266:(rt,b,i)=>{i.r(b),i.d(b,{PublicationModule:()=>it,component:()=>st});var p=i(177),T=i(467),t=i(3953),y=i(4404),d=i(8251),G=i(4365),I=i(2085),h=function(e){return e.LATEST="latest",e.COVER="cover",e.META="meta",e}(h||{});const P={template:h.COVER,currentIssue:{template:G.W9.COVER},currentContent:{template:I.qc.COVER},titleMessage:"PUBLICATION_TITLE",descriptionMessage:"PUBLICATION_DESCRIPTION",issuesPerYearMessage:"PUBLICATION_ISSUES_PER_YEAR",contentsPerYearMessage:"PUBLICATION_CONTENTS_PER_YEAR"};var R=i(1210),Y=i(610),v=i(2932),C=i(3178),S=i(4452),E=i(7374),A=i(362),x=i(7879),X=i(8004),M=i(9516),D=i(8471),O=i(1652),N=i(7808),U=i(4744),B=i(8909);const V=["listContent"],u=e=>[e];function j(e,s){if(1&e){const n=t.RV6();t.j41(0,"storefront-content",10,0),t.bIt("click",function(){t.eBV(n);const a=t.sdS(1),r=t.XpG().$implicit,c=t.XpG(3);return t.Njj(c.onClickContent(r,a))}),t.k0s()}if(2&e){const n=t.XpG().$implicit,o=t.XpG(3);t.Y8G("baseContext",n&&o.contentContexts[n.id])("baseConfig",o.config.currentContent)}}function $(e,s){if(1&e){const n=t.RV6();t.j41(0,"storefront-issue",10,1),t.bIt("click",function(){t.eBV(n);const a=t.sdS(1),r=t.XpG().$implicit,c=t.XpG(3);return t.Njj(c.onClickContent(r,a))}),t.k0s()}if(2&e){const n=t.XpG().$implicit,o=t.XpG(3);t.Y8G("baseContext",n&&o.contentContexts[n.id])("baseConfig",o.config.currentIssue)}}function F(e,s){if(1&e&&(t.qex(0),t.DNE(1,j,2,2,"storefront-content",9),t.qex(2),t.DNE(3,$,2,2,"storefront-issue",9),t.bVm()()),2&e){const n=s.$implicit,o=t.XpG(3);t.R7$(),t.Y8G("ngIf",!o.isIssue(n)),t.R7$(2),t.Y8G("ngIf",o.isIssue(n))}}function k(e,s){if(1&e&&(t.qex(0),t.DNE(1,F,4,2,"ng-container",8),t.bVm()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",n.contents)}}function L(e,s){if(1&e&&(t.qex(0),t.nrm(1,"h3",5),t.j41(2,"div",6),t.DNE(3,k,2,1,"ng-container",7),t.k0s(),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(3,u,n.publication&&n.publication.name)),t.R7$(2),t.Y8G("ngIf",n.config)}}function H(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=s.$implicit;t.ZvI("publication-property ",n.key,""),t.R7$(),t.SpI(" ",n.value," ")}}function Q(e,s){if(1&e&&(t.j41(0,"div",14),t.DNE(1,H,2,4,"div",15),t.nI1(2,"keyvalue"),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",t.bMT(2,1,n.publication.properties))}}function K(e,s){if(1&e&&t.nrm(0,"div",16),2&e){const n=t.XpG(2);t.Y8G("storefrontTranslate",n.config&&(n.config.issuesPerYearMessage||n.config.contentsPerYearMessage))("storefrontTranslateArgs",t.eq3(2,u,n.contentsPerYear))}}function Z(e,s){if(1&e&&(t.qex(0),t.nrm(1,"h3",5)(2,"div",11),t.DNE(3,Q,3,3,"div",12)(4,K,1,4,"div",13),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(6,u,n.publication&&n.publication.name)),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.descriptionMessage)("storefrontTranslateArgs",t.eq3(8,u,n.publication&&n.publication.description)),t.R7$(),t.Y8G("ngIf",n.publication),t.R7$(),t.Y8G("ngIf",void 0!==n.contentsPerYear)}}function z(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=s.$implicit;t.ZvI("publication-property ",n.key,""),t.R7$(),t.SpI(" ",n.value," ")}}function J(e,s){if(1&e&&(t.j41(0,"div",14),t.DNE(1,z,2,4,"div",15),t.nI1(2,"keyvalue"),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",t.bMT(2,1,n.publication.properties))}}function W(e,s){if(1&e&&t.nrm(0,"div",16),2&e){const n=t.XpG(2);t.Y8G("storefrontTranslate",n.config&&n.config.contentsPerYearMessage)("storefrontTranslateArgs",t.eq3(2,u,n.contentsPerYear))}}function w(e,s){if(1&e&&(t.qex(0),t.nrm(1,"storefront-image",17)(2,"h3",5)(3,"div",11),t.DNE(4,J,3,3,"div",12)(5,W,1,4,"div",13),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("src",n.publication&&n.publication.thumbnails.default)("height",n.getImageHeight())("imageResolutionStrategy",null==n.config?null:n.config.imageResolutionStrategy),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(9,u,n.publication&&n.publication.name)),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.descriptionMessage)("storefrontTranslateArgs",t.eq3(11,u,n.publication&&n.publication.description)),t.R7$(),t.Y8G("ngIf",n.publication),t.R7$(),t.Y8G("ngIf",void 0!==n.contentsPerYear)}}let q=(()=>{var e;class s extends R.${constructor(o,a,r,c,g,f,l,m,_,at){super(a,o,g,f,_),this.elementRef=o,this.injector=a,this.store=r,this.eventActionService=c,this.contextService=g,this.document=f,this.transferState=l,this.purpleService=m,this.globalService=_,this.purpleEnv=at,this.defaultConfig={...P},this.contentContexts={}}ngOnInit(){super.ngOnInit(),this.setContents()}ngOnDestroy(){super.ngOnDestroy(),this.dataSource&&this.contextService.unregisterDataSource(this.dataSource)}onConfigChanges(){var o=this;return(0,T.A)(function*(){o.config.dataSource?(o.dataSource=(0,S.O8)(o.injector,o.config.dataSource,o.elementRef.nativeElement,o.document),o.store.subscribe(o.dataSource.data$,a=>{o.publication=a[0],o.context.publication=o.publication,o.setContents()},C.lQ,C.lQ,"data"),yield o.dataSource.loadData()):(o.publication=o.context.publication,o.setContents())})()}getTrackingParams(){return(0,x.GA)(this.publication)}getId(){return this.publication?this.publication.id:this.baseContext&&this.baseContext.publication&&this.baseContext.publication.id}setContents(){if(this.contentContexts={},this.publication&&(this.publication.issues||this.publication.contents)){var o,a,r;this.contents=null!==(o=null===(a=this.publication.contents)||void 0===a?void 0:a.nodes)&&void 0!==o?o:null===(r=this.publication.issues)||void 0===r?void 0:r.nodes,this.contentContexts=this.contents.reduce((l,m)=>(l[m.id]=this.getContentBaseContext(m),l),{});const f=E(new Date).subtract(1,"year").toDate();this.contentsPerYear=this.contents.filter(l=>l.publicationDate>f.getTime()).length}else{var c,g;const f=this.config||this.baseConfig,l=(null===(c=f.dataSource)||void 0===c?void 0:c.includeContents)||(null===(g=f.dataSource)||void 0===g?void 0:g.includeIssues);this.contents=Array(l&&("number"==typeof l?l:l.first)||3).fill({})}}getContentBaseContext(o){return{...this.baseContext,content:o}}onClickContent(o,a){const r=this.config.tapContent||this.config.tapIssue;r&&(a.getDownloadHandler().then(c=>{this.store.dispatch((0,Y.k4)({url:this.document.location.href,key:"".concat(this.getTrackingBaseKey(),"_").concat(a.getTrackingBaseKey(c),"_CLICKED"),params:a.getTrackingParams(c)}))}),this.eventActionService.processEventAction(r,a))}getImageHeight(){return this.config&&this.config.coverHeight||this.getDefaultImageHeight()}getDefaultImageHeight(){return v.q.DEFAULT}isGhost(){return!this.publication}hasContextChanged(o){return!this.config.dataSource&&!A(o.publication,this.publication)||super.hasContextChanged(o)}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"currentIssue"]}isIssue(o){return o&&o.contentType===y.CatalogContentType.ISSUE}}return(e=s).type="publication",e.\u0275fac=function(o){return new(o||e)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(d.B),t.rXU(X.G),t.rXU(M.V),t.rXU(p.qQ),t.rXU(t.pJN),t.rXU(D.Wj),t.rXU(O.d),t.rXU(x.r6))},e.\u0275cmp=t.VBU({type:e,selectors:[["storefront-publication"]],viewQuery:function(o,a){if(1&o&&t.GBs(V,7,t.c1b),2&o){let r;t.mGM(r=t.lsd())&&(a.listContent=r.first)}},features:[t.Jv_([d.B]),t.Vt3],decls:4,vars:3,consts:[["contentComponent",""],["issueComponent",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"publication-title",3,"storefrontTranslate","storefrontTranslateArgs"],[1,"publication-issues"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"baseContext","baseConfig","click",4,"ngIf"],[3,"click","baseContext","baseConfig"],[1,"publication-description",3,"storefrontTranslate","storefrontTranslateArgs"],["class","publication-properties",4,"ngIf"],["class","publication-issues-per-year",3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[1,"publication-properties"],[3,"class",4,"ngFor","ngForOf"],[1,"publication-issues-per-year",3,"storefrontTranslate","storefrontTranslateArgs"],[3,"src","height","imageResolutionStrategy"]],template:function(o,a){1&o&&(t.qex(0,2),t.DNE(1,L,4,5,"ng-container",3)(2,Z,5,10,"ng-container",3)(3,w,6,13,"ng-container",4),t.bVm()),2&o&&(t.Y8G("ngSwitch",a.template),t.R7$(),t.Y8G("ngSwitchCase","latest"),t.R7$(),t.Y8G("ngSwitchCase","meta"))},dependencies:[p.Sq,p.bT,p.ux,p.e1,p.fG,N.B,U.z,v.h,B.M,p.lG],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-publication{display:flex;flex-direction:column}storefront-publication .publication-description{width:100%;white-space:pre-wrap}storefront-publication[template=cover]{border-radius:100%;overflow:hidden;transform:translateZ(1px)}storefront-publication[template=cover] .publication-title,storefront-publication[template=cover] .publication-description,storefront-publication[template=cover] .publication-properties,storefront-publication[template=cover] .publication-issues-per-year{display:none}storefront-publication[template=latest] .publication-title{display:block;text-align:center;order:2;opacity:0;transition:opacity .2s ease}storefront-publication[template=latest] .publication-description,storefront-publication[template=latest] .publication-properties{display:none}storefront-publication[template=latest] .publication-issues{display:flex;width:100%}storefront-publication[template=latest] .publication-issues storefront-content .content-image storefront-image{width:100%;max-width:100%;height:auto}storefront-publication[template=latest] .publication-issues storefront-content .content-description,storefront-publication[template=latest] .publication-issues storefront-content .content-pub-date,storefront-publication[template=latest] .publication-issues storefront-content .content-categories,storefront-publication[template=latest] .publication-issues storefront-content .content-properties{display:none}storefront-publication[template=latest] .publication-issues storefront-issue .issue-image storefront-image{width:100%;max-width:100%;height:auto}storefront-publication[template=latest] .publication-issues storefront-issue .issue-description,storefront-publication[template=latest] .publication-issues storefront-issue .issue-pub-date,storefront-publication[template=latest] .publication-issues storefront-issue .issue-categories,storefront-publication[template=latest] .publication-issues storefront-issue .issue-properties{display:none}storefront-publication[template=meta] .publication-title,storefront-publication[template=meta] .publication-description,storefront-publication[template=meta] .publication-properties,storefront-publication[template=meta] .publication-issues-per-year{display:none}storefront-publication.ghost .publication-title{background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear;background-color:var(--ghostColor);color:transparent!important;border-radius:4px;width:40%}storefront-publication.ghost .publication-title:before{content:" ";display:inline}storefront-publication.ghost storefront-image{background-color:var(--ghostColor);animation:ghost-opacity 2s infinite linear}\n'],encapsulation:2}),s})();var tt=i(4403),nt=i(6483),et=i(8399),ot=i(1367);let it=(()=>{var e;class s{}return(e=s).\u0275fac=function(o){return new(o||e)},e.\u0275mod=t.$C({type:e}),e.\u0275inj=t.G2t({imports:[p.MD,et.ContentModule,ot.IssueModule,tt.U,nt.h]}),s})();const st=q}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_publication_publication_module_ts"],{266:(ct,b,i)=>{i.r(b),i.d(b,{PublicationModule:()=>it,component:()=>st});var p=i(177),T=i(467),t=i(3953),y=i(4404),d=i(8251),G=i(4365),I=i(2085),h=function(e){return e.LATEST="latest",e.COVER="cover",e.META="meta",e}(h||{});const P={template:h.COVER,currentIssue:{template:G.W9.COVER},currentContent:{template:I.qc.COVER},titleMessage:"PUBLICATION_TITLE",descriptionMessage:"PUBLICATION_DESCRIPTION",issuesPerYearMessage:"PUBLICATION_ISSUES_PER_YEAR",contentsPerYearMessage:"PUBLICATION_CONTENTS_PER_YEAR"};var R=i(1210),Y=i(610),v=i(2932),C=i(3178),S=i(4452),E=i(7374),A=i(362),x=i(7879),X=i(8004),D=i(9516),M=i(5102),O=i(1652),U=i(7808),N=i(4744),B=i(8909);const V=["listContent"],u=e=>[e];function j(e,s){if(1&e){const n=t.RV6();t.j41(0,"storefront-content",10,0),t.bIt("click",function(){t.eBV(n);const a=t.sdS(1),r=t.XpG().$implicit,c=t.XpG(3);return t.Njj(c.onClickContent(r,a))}),t.k0s()}if(2&e){const n=t.XpG().$implicit,o=t.XpG(3);t.Y8G("baseContext",n&&o.contentContexts[n.id])("baseConfig",o.config.currentContent)}}function F(e,s){if(1&e){const n=t.RV6();t.j41(0,"storefront-issue",10,1),t.bIt("click",function(){t.eBV(n);const a=t.sdS(1),r=t.XpG().$implicit,c=t.XpG(3);return t.Njj(c.onClickContent(r,a))}),t.k0s()}if(2&e){const n=t.XpG().$implicit,o=t.XpG(3);t.Y8G("baseContext",n&&o.contentContexts[n.id])("baseConfig",o.config.currentIssue)}}function $(e,s){if(1&e&&(t.qex(0),t.DNE(1,j,2,2,"storefront-content",9),t.qex(2),t.DNE(3,F,2,2,"storefront-issue",9),t.bVm()()),2&e){const n=s.$implicit,o=t.XpG(3);t.R7$(),t.Y8G("ngIf",!o.isIssue(n)),t.R7$(2),t.Y8G("ngIf",o.isIssue(n))}}function k(e,s){if(1&e&&(t.qex(0),t.DNE(1,$,4,2,"ng-container",8),t.bVm()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",n.contents)}}function L(e,s){if(1&e&&(t.qex(0),t.nrm(1,"h3",5),t.j41(2,"div",6),t.DNE(3,k,2,1,"ng-container",7),t.k0s(),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(3,u,n.publication&&n.publication.name)),t.R7$(2),t.Y8G("ngIf",n.config)}}function H(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=s.$implicit;t.ZvI("publication-property ",n.key,""),t.R7$(),t.SpI(" ",n.value," ")}}function Q(e,s){if(1&e&&(t.j41(0,"div",14),t.DNE(1,H,2,4,"div",15),t.nI1(2,"keyvalue"),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",t.bMT(2,1,n.publication.properties))}}function K(e,s){if(1&e&&t.nrm(0,"div",16),2&e){const n=t.XpG(2);t.Y8G("storefrontTranslate",n.config&&(n.config.issuesPerYearMessage||n.config.contentsPerYearMessage))("storefrontTranslateArgs",t.eq3(2,u,n.contentsPerYear))}}function Z(e,s){if(1&e&&(t.qex(0),t.nrm(1,"h3",5)(2,"div",11),t.DNE(3,Q,3,3,"div",12)(4,K,1,4,"div",13),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(6,u,n.publication&&n.publication.name)),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.descriptionMessage)("storefrontTranslateArgs",t.eq3(8,u,n.publication&&n.publication.description)),t.R7$(),t.Y8G("ngIf",n.publication),t.R7$(),t.Y8G("ngIf",void 0!==n.contentsPerYear)}}function z(e,s){if(1&e&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&e){const n=s.$implicit;t.ZvI("publication-property ",n.key,""),t.R7$(),t.SpI(" ",n.value," ")}}function J(e,s){if(1&e&&(t.j41(0,"div",14),t.DNE(1,z,2,4,"div",15),t.nI1(2,"keyvalue"),t.k0s()),2&e){const n=t.XpG(2);t.R7$(),t.Y8G("ngForOf",t.bMT(2,1,n.publication.properties))}}function W(e,s){if(1&e&&t.nrm(0,"div",16),2&e){const n=t.XpG(2);t.Y8G("storefrontTranslate",n.config&&n.config.contentsPerYearMessage)("storefrontTranslateArgs",t.eq3(2,u,n.contentsPerYear))}}function w(e,s){if(1&e&&(t.qex(0),t.nrm(1,"storefront-image",17)(2,"h3",5)(3,"div",11),t.DNE(4,J,3,3,"div",12)(5,W,1,4,"div",13),t.bVm()),2&e){const n=t.XpG();t.R7$(),t.Y8G("src",n.publication&&n.publication.thumbnails.default)("height",n.getImageHeight())("imageResolutionStrategy",null==n.config?null:n.config.imageResolutionStrategy),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.titleMessage)("storefrontTranslateArgs",t.eq3(9,u,n.publication&&n.publication.name)),t.R7$(),t.Y8G("storefrontTranslate",n.config&&n.config.descriptionMessage)("storefrontTranslateArgs",t.eq3(11,u,n.publication&&n.publication.description)),t.R7$(),t.Y8G("ngIf",n.publication),t.R7$(),t.Y8G("ngIf",void 0!==n.contentsPerYear)}}let q=(()=>{var e;class s extends R.${constructor(o,a,r,c,g,f,l,m,_,at,rt){super(a,o,g,f,_),this.elementRef=o,this.injector=a,this.store=r,this.eventActionService=c,this.contextService=g,this.document=f,this.transferState=l,this.purpleService=m,this.globalService=_,this.purpleEnv=at,this.changeDetectorRef=rt,this.defaultConfig={...P},this.contentContexts={}}ngOnInit(){super.ngOnInit(),this.setContents()}ngOnDestroy(){super.ngOnDestroy(),this.dataSource&&this.contextService.unregisterDataSource(this.dataSource)}onConfigChanges(){var o=this;return(0,T.A)(function*(){o.config.dataSource?(o.dataSource=(0,S.O8)(o.injector,o.config.dataSource,o.elementRef.nativeElement,o.document),o.store.subscribe(o.dataSource.data$,a=>{o.publication=a[0],o.context.publication=o.publication,o.setContents()},C.lQ,C.lQ,"data"),yield o.dataSource.loadData()):(o.publication=o.context.publication,o.setContents()),o.changeDetectorRef.markForCheck()})()}getTrackingParams(){return(0,x.GA)(this.publication)}getId(){return this.publication?this.publication.id:this.baseContext&&this.baseContext.publication&&this.baseContext.publication.id}setContents(){if(this.contentContexts={},this.publication&&(this.publication.issues||this.publication.contents)){var o,a,r;this.contents=null!==(o=null===(a=this.publication.contents)||void 0===a?void 0:a.nodes)&&void 0!==o?o:null===(r=this.publication.issues)||void 0===r?void 0:r.nodes,this.contentContexts=this.contents.reduce((l,m)=>(l[m.id]=this.getContentBaseContext(m),l),{});const f=E(new Date).subtract(1,"year").toDate();this.contentsPerYear=this.contents.filter(l=>l.publicationDate>f.getTime()).length}else{var c,g;const f=this.config||this.baseConfig,l=(null===(c=f.dataSource)||void 0===c?void 0:c.includeContents)||(null===(g=f.dataSource)||void 0===g?void 0:g.includeIssues);this.contents=Array(l&&("number"==typeof l?l:l.first)||3).fill({})}}getContentBaseContext(o){return{...this.baseContext,content:o}}onClickContent(o,a){const r=this.config.tapContent||this.config.tapIssue;r&&(a.getDownloadHandler().then(c=>{this.store.dispatch((0,Y.k4)({url:this.document.location.href,key:"".concat(this.getTrackingBaseKey(),"_").concat(a.getTrackingBaseKey(c),"_CLICKED"),params:a.getTrackingParams(c)}))}),this.eventActionService.processEventAction(r,a))}getImageHeight(){return this.config&&this.config.coverHeight||this.getDefaultImageHeight()}getDefaultImageHeight(){return v.q.DEFAULT}isGhost(){return!this.publication}hasContextChanged(o){return!this.config.dataSource&&!A(o.publication,this.publication)||super.hasContextChanged(o)}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"currentIssue"]}isIssue(o){return o&&o.contentType===y.CatalogContentType.ISSUE}}return(e=s).type="publication",e.\u0275fac=function(o){return new(o||e)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(d.B),t.rXU(X.G),t.rXU(D.V),t.rXU(p.qQ),t.rXU(t.pJN),t.rXU(M.Wj),t.rXU(O.d),t.rXU(x.r6),t.rXU(t.gRc))},e.\u0275cmp=t.VBU({type:e,selectors:[["storefront-publication"]],viewQuery:function(o,a){if(1&o&&t.GBs(V,7,t.c1b),2&o){let r;t.mGM(r=t.lsd())&&(a.listContent=r.first)}},features:[t.Jv_([d.B]),t.Vt3],decls:4,vars:3,consts:[["contentComponent",""],["issueComponent",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"publication-title",3,"storefrontTranslate","storefrontTranslateArgs"],[1,"publication-issues"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"baseContext","baseConfig","click",4,"ngIf"],[3,"click","baseContext","baseConfig"],[1,"publication-description",3,"storefrontTranslate","storefrontTranslateArgs"],["class","publication-properties",4,"ngIf"],["class","publication-issues-per-year",3,"storefrontTranslate","storefrontTranslateArgs",4,"ngIf"],[1,"publication-properties"],[3,"class",4,"ngFor","ngForOf"],[1,"publication-issues-per-year",3,"storefrontTranslate","storefrontTranslateArgs"],[3,"src","height","imageResolutionStrategy"]],template:function(o,a){1&o&&(t.qex(0,2),t.DNE(1,L,4,5,"ng-container",3)(2,Z,5,10,"ng-container",3)(3,w,6,13,"ng-container",4),t.bVm()),2&o&&(t.Y8G("ngSwitch",a.template),t.R7$(),t.Y8G("ngSwitchCase","latest"),t.R7$(),t.Y8G("ngSwitchCase","meta"))},dependencies:[p.Sq,p.bT,p.ux,p.e1,p.fG,U.B,N.z,v.h,B.M,p.lG],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-publication{display:flex;flex-direction:column}storefront-publication .publication-description{width:100%;white-space:pre-wrap}storefront-publication[template=cover]{border-radius:100%;overflow:hidden;transform:translateZ(1px)}storefront-publication[template=cover] .publication-title,storefront-publication[template=cover] .publication-description,storefront-publication[template=cover] .publication-properties,storefront-publication[template=cover] .publication-issues-per-year{display:none}storefront-publication[template=latest] .publication-title{display:block;text-align:center;order:2;opacity:0;transition:opacity .2s ease}storefront-publication[template=latest] .publication-description,storefront-publication[template=latest] .publication-properties{display:none}storefront-publication[template=latest] .publication-issues{display:flex;width:100%}storefront-publication[template=latest] .publication-issues storefront-content .content-image storefront-image{width:100%;max-width:100%;height:auto}storefront-publication[template=latest] .publication-issues storefront-content .content-description,storefront-publication[template=latest] .publication-issues storefront-content .content-pub-date,storefront-publication[template=latest] .publication-issues storefront-content .content-categories,storefront-publication[template=latest] .publication-issues storefront-content .content-properties{display:none}storefront-publication[template=latest] .publication-issues storefront-issue .issue-image storefront-image{width:100%;max-width:100%;height:auto}storefront-publication[template=latest] .publication-issues storefront-issue .issue-description,storefront-publication[template=latest] .publication-issues storefront-issue .issue-pub-date,storefront-publication[template=latest] .publication-issues storefront-issue .issue-categories,storefront-publication[template=latest] .publication-issues storefront-issue .issue-properties{display:none}storefront-publication[template=meta] .publication-title,storefront-publication[template=meta] .publication-description,storefront-publication[template=meta] .publication-properties,storefront-publication[template=meta] .publication-issues-per-year{display:none}storefront-publication.ghost .publication-title{background-image:linear-gradient(90deg,var(--ghostColor) 0px,rgb(236,236,236) 40px,var(--ghostColor) 80px);background-size:80vw;animation:ghost-lines 2s infinite linear;background-color:var(--ghostColor);color:transparent!important;border-radius:4px;width:40%}storefront-publication.ghost .publication-title:before{content:" ";display:inline}storefront-publication.ghost storefront-image{background-color:var(--ghostColor);animation:ghost-opacity 2s infinite linear}\n'],encapsulation:2}),s})();var tt=i(4403),nt=i(6483),et=i(8399),ot=i(1367);let it=(()=>{var e;class s{}return(e=s).\u0275fac=function(o){return new(o||e)},e.\u0275mod=t.$C({type:e}),e.\u0275inj=t.G2t({imports:[p.MD,et.ContentModule,ot.IssueModule,tt.U,nt.h]}),s})();const st=q}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_recommendations_recommendations_module_ts"],{7033:(P,h,o)=>{o.r(h),o.d(h,{RecommendationsModule:()=>$,component:()=>I});var p=o(177),v=o(467),t=o(3953),C=o(1210);const A={limit:5,weights:{source_target:50,recency:10,topicHierarchy:2,retentionTime:5},origin:"https://acm-dev.cloud.sprylabprojects.com/core",resourceBaseUrl:"https://acm-stage.sprylab.com/static/"};var g=o(4404),y=o(8179),T=o(7879),U=o(9516),R=o(8471),S=o(4748),M=o(8004),X=o(1652);let x=(()=>{var r;class m extends C.${constructor(e,n,s,d,c,l,i,a,u,E){super(n,e,s,d,E),this.elementRef=e,this.injector=n,this.contextService=s,this.document=d,this.purpleService=c,this.platformId=l,this.purpleEnv=i,this.ssrService=a,this.eventActionService=u,this.globalService=E,this.defaultConfig={...A}}loadResources(){var e=this;return(0,v.A)(function*(){const n="".concat(e.config.resourceBaseUrl,"/acm.js"),s="".concat(e.config.resourceBaseUrl,"/setup/config.js"),d="".concat(e.config.resourceBaseUrl,"/acm.css");let c=document.querySelector('link[href="'.concat(d,'"]'));c||(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("href",d),document.head.appendChild(c));const l=[];let i=document.querySelector('script[src="'.concat(n,'"]'));i||(i=document.createElement("script"),i.setAttribute("src",n),document.head.appendChild(i),l.push(new Promise(u=>i.addEventListener("load",u))));let a=document.querySelector('script[src="'.concat(s,'"]'));return a||(a=document.createElement("script"),a.setAttribute("src",s),document.head.appendChild(a),l.push(new Promise(u=>a.addEventListener("load",u)))),Promise.all(l)})()}onConfigChanges(){var e=this;return(0,v.A)(function*(){if((0,p.Vy)(e.platformId))return;yield e.loadResources();const n=e.contextService.getMetadata(),s=n[g.METADATA_KEY.ENTITLEMENT_LOGIN]||n[g.METADATA_KEY.DEVICE_ID];(0,p.UE)(e.platformId)&&e.purpleEnv.isUniversal&&(yield e.ssrService.prebootCompletedPromise),window.acm.recommend({acmConfig:{apiToken:e.config.apiToken}},{reader_id:s,item_id:e.config.item_id,limit:e.config.limit,weights:e.config.weights})})()}getEntryContext(e){return{...this.context,acm_article:e}}onArticleClick(e){var n=this;return(0,v.A)(function*(){if(n.config.tapEntry){const s=(0,y.uQ)(n.config.tapEntry,n.getEntryContext(e),n.contextService.$functions,n.globalService.getGlobalData());yield n.eventActionService.processEventAction((0,y.v3)(s),n)}})()}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"tapEntry"]}}return(r=m).type="recommendations",r.\u0275fac=function(e){return new(e||r)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(U.V),t.rXU(p.qQ),t.rXU(R.Wj),t.rXU(t.Agw),t.rXU(T.r6),t.rXU(S.i),t.rXU(M.G),t.rXU(X.d))},r.\u0275cmp=t.VBU({type:r,selectors:[["storefront-recommendations"]],features:[t.Vt3],decls:1,vars:0,consts:[["id","acm-content-recommendations"]],template:function(e,n){1&e&&t.nrm(0,"div",0)},encapsulation:2}),m})(),$=(()=>{var r;class m{}return(r=m).\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[p.MD]}),m})();const I=x}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_recommendations_recommendations_module_ts"],{7033:(P,h,o)=>{o.r(h),o.d(h,{RecommendationsModule:()=>$,component:()=>I});var p=o(177),v=o(467),t=o(3953),C=o(1210);const A={limit:5,weights:{source_target:50,recency:10,topicHierarchy:2,retentionTime:5},origin:"https://acm-dev.cloud.sprylabprojects.com/core",resourceBaseUrl:"https://acm-stage.sprylab.com/static/"};var g=o(4404),y=o(8179),T=o(7879),U=o(9516),R=o(5102),S=o(4748),M=o(8004),X=o(1652);let x=(()=>{var r;class m extends C.${constructor(e,n,s,d,c,l,i,a,u,E){super(n,e,s,d,E),this.elementRef=e,this.injector=n,this.contextService=s,this.document=d,this.purpleService=c,this.platformId=l,this.purpleEnv=i,this.ssrService=a,this.eventActionService=u,this.globalService=E,this.defaultConfig={...A}}loadResources(){var e=this;return(0,v.A)(function*(){const n="".concat(e.config.resourceBaseUrl,"/acm.js"),s="".concat(e.config.resourceBaseUrl,"/setup/config.js"),d="".concat(e.config.resourceBaseUrl,"/acm.css");let c=document.querySelector('link[href="'.concat(d,'"]'));c||(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("href",d),document.head.appendChild(c));const l=[];let i=document.querySelector('script[src="'.concat(n,'"]'));i||(i=document.createElement("script"),i.setAttribute("src",n),document.head.appendChild(i),l.push(new Promise(u=>i.addEventListener("load",u))));let a=document.querySelector('script[src="'.concat(s,'"]'));return a||(a=document.createElement("script"),a.setAttribute("src",s),document.head.appendChild(a),l.push(new Promise(u=>a.addEventListener("load",u)))),Promise.all(l)})()}onConfigChanges(){var e=this;return(0,v.A)(function*(){if((0,p.Vy)(e.platformId))return;yield e.loadResources();const n=e.contextService.getMetadata(),s=n[g.METADATA_KEY.ENTITLEMENT_LOGIN]||n[g.METADATA_KEY.DEVICE_ID];(0,p.UE)(e.platformId)&&e.purpleEnv.isUniversal&&(yield e.ssrService.prebootCompletedPromise),window.acm.recommend({acmConfig:{apiToken:e.config.apiToken}},{reader_id:s,item_id:e.config.item_id,limit:e.config.limit,weights:e.config.weights})})()}getEntryContext(e){return{...this.context,acm_article:e}}onArticleClick(e){var n=this;return(0,v.A)(function*(){if(n.config.tapEntry){const s=(0,y.uQ)(n.config.tapEntry,n.getEntryContext(e),n.contextService.$functions,n.globalService.getGlobalData());yield n.eventActionService.processEventAction((0,y.v3)(s),n)}})()}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"tapEntry"]}}return(r=m).type="recommendations",r.\u0275fac=function(e){return new(e||r)(t.rXU(t.aKT),t.rXU(t.zZn),t.rXU(U.V),t.rXU(p.qQ),t.rXU(R.Wj),t.rXU(t.Agw),t.rXU(T.r6),t.rXU(S.i),t.rXU(M.G),t.rXU(X.d))},r.\u0275cmp=t.VBU({type:r,selectors:[["storefront-recommendations"]],features:[t.Vt3],decls:1,vars:0,consts:[["id","acm-content-recommendations"]],template:function(e,n){1&e&&t.nrm(0,"div",0)},encapsulation:2}),m})(),$=(()=>{var r;class m{}return(r=m).\u0275fac=function(e){return new(e||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[p.MD]}),m})();const I=x}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_search-field_search-field_module_ts"],{2561:(M,u,r)=>{r.r(u),r.d(u,{SearchFieldModule:()=>X,component:()=>U});var h=r(177),S=r(467),f=r(8251),C=r(610),b=r(3178),F=r(1210);const y={param:"phrase"};var d=r(8075),E=r(9745),e=r(3953),p=r(4559),_=r(9516),j=r(8004),T=r(1652),R=r(6067);const B=["input"];function V(i,l){if(1&i){const a=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const n=e.eBV(a).$implicit,s=e.XpG(2);return e.Njj(s.onClickSuggestion(n))})("mousedown",function(n){e.eBV(a);const s=e.XpG(2);return e.Njj(s.onSuggestionMousedown(n))}),e.EFF(1),e.k0s()}if(2&i){const a=l.$implicit;e.R7$(),e.JRh(a)}}function k(i,l){if(1&i&&(e.j41(0,"div",7),e.DNE(1,V,2,1,"div",8),e.k0s()),2&i){const a=e.XpG();e.R7$(),e.Y8G("ngForOf",a.getSuggestions())}}let I=(()=>{var i;class l extends F.${constructor(t,n,s,c,o,D,g,G,m,v){super(n,s,g,m,v),this.router=t,this.injector=n,this.elementRef=s,this.route=c,this.changeDetectorRef=o,this.store=D,this.contextService=g,this.eventActionService=G,this.document=m,this.globalService=v,this.defaultConfig={...y},this.searched=!1,this.phrase="",this.suggestions=null}ngOnInit(){super.ngOnInit(),this.store.subscribe(this.route.queryParams,t=>{t&&this.config&&this.config.param&&t[this.config.param]&&(this.phrase=t[this.config.param],this.input.nativeElement.value=this.phrase,this.searched=this.input.nativeElement.value.trim().length>0)})}onConfigChanges(){var t=this;return(0,S.A)(function*(){if(t.config.param&&t.context[t.config.param]&&(t.phrase=t.context[t.config.param],t.input.nativeElement.value=t.phrase,t.searched=t.input.nativeElement.value.trim().length>0),t.config.suggestions)try{t.suggestions=yield(0,b.hI)(t.config.suggestions.url)}catch{console.warn("Error fetching search suggestions")}})()}onClickReset(t){this.phrase="",this.input.nativeElement.value=this.phrase,this.input.nativeElement.blur(),this.searched=!1,this.config.param&&(0,d.CV)(this.router,{[this.config.param]:null})}onSearch(){if(this.config.param&&this.input.nativeElement.value.trim().length>0){this.phrase=this.input.nativeElement.value,this.searched=!0;const t={...this.config.params,[this.config.param]:this.phrase};this.config.publicationType&&(t.publicationType=this.config.publicationType),this.store.dispatch((0,C.k4)({url:window.location.href,key:"SEARCH_PERFORMED",params:{phrase:this.phrase}})),this.config.path?this.eventActionService.processNavigateAction({type:E.H.NAVIGATE,path:this.config.path,params:t},this):(0,d.CV)(this.router,t)}}focus(t){return t&&t.preventDefault(),this.searched=this.input.nativeElement.value.trim().length>0,this.input.nativeElement.focus(),this.elementRef.nativeElement.classList.add("focus"),!1}focusOrSearch(t){t&&t.preventDefault();const n=this.input.nativeElement.value.trim();n.length>0&&n!==this.phrase?this.onSearch():this.focus()}onInput(t){this.searched=this.input.nativeElement.value.length>0}onBlur(t){setTimeout(()=>{this.input.nativeElement.value=this.phrase,this.searched=this.phrase.length>0;try{this.changeDetectorRef.detectChanges()}catch(n){console.warn("Error in change detection of Blur event",n)}},100),this.elementRef.nativeElement.classList.remove("focus"),this.searched=!1}onFocus(t){this.elementRef.nativeElement.classList.add("focus")}onKeyUp(t){13===(t.keyCode||t.which)?(this.input.nativeElement.blur(),this.onSearch()):8===(t.keyCode||t.which)&&(this.searched=this.input.nativeElement.value.length>0)}getSuggestions(){const t=this.input.nativeElement.value;return this.suggestions&&this.suggestions.filter(n=>0===n.toLowerCase().indexOf(t.toLowerCase()))}onClickSuggestion(t){this.input.nativeElement.value=t,this.phrase=t,this.onInput(),this.focus()}onSuggestionMousedown(t){return t.preventDefault(),!1}getId(){return null}}return(i=l).type="search-field",i.\u0275fac=function(t){return new(t||i)(e.rXU(p.Ix),e.rXU(e.zZn),e.rXU(e.aKT),e.rXU(p.nX),e.rXU(e.gRc),e.rXU(f.B),e.rXU(_.V),e.rXU(j.G),e.rXU(h.qQ),e.rXU(T.d))},i.\u0275cmp=e.VBU({type:i,selectors:[["storefront-search-field"]],viewQuery:function(t,n){if(1&t&&e.GBs(B,7),2&t){let s;e.mGM(s=e.lsd())&&(n.input=s.first)}},hostVars:2,hostBindings:function(t,n){2&t&&e.AVh("searched",n.searched)},features:[e.Jv_([f.B]),e.Vt3],decls:9,vars:6,consts:[["input",""],[1,"search-field-container"],["type","search",3,"click","input","focus","blur","keyup","placeholder"],["class","search-field-suggestions",4,"ngIf"],[1,"search-field-buttons"],[1,"icon","icon-search","search-btn",3,"mousedown","touchstart"],[1,"icon","icon-delete","reset-btn",3,"mousedown","touchstart"],[1,"search-field-suggestions"],["class","search-field-suggestion",3,"click","mousedown",4,"ngFor","ngForOf"],[1,"search-field-suggestion",3,"click","mousedown"]],template:function(t,n){if(1&t){const s=e.RV6();e.j41(0,"div",1)(1,"input",2,0),e.nI1(3,"storefrontTranslate"),e.nI1(4,"async"),e.bIt("click",function(o){return e.eBV(s),e.Njj(n.focus(o))})("input",function(o){return e.eBV(s),e.Njj(n.onInput(o))})("focus",function(o){return e.eBV(s),e.Njj(n.onFocus(o))})("blur",function(o){return e.eBV(s),e.Njj(n.onBlur(o))})("keyup",function(o){return e.eBV(s),e.Njj(n.onKeyUp(o))}),e.k0s(),e.DNE(5,k,2,1,"div",3),e.j41(6,"div",4)(7,"button",5),e.bIt("mousedown",function(o){return e.eBV(s),e.Njj(n.focusOrSearch(o))})("touchstart",function(o){return e.eBV(s),e.Njj(n.focusOrSearch(o))}),e.k0s(),e.j41(8,"button",6),e.bIt("mousedown",function(o){return e.eBV(s),e.Njj(n.onClickReset(o))})("touchstart",function(o){return e.eBV(s),e.Njj(n.onClickReset(o))}),e.k0s()()()}2&t&&(e.R7$(),e.Y8G("placeholder",e.bMT(4,4,e.bMT(3,2,"SEARCH_FIELD_PLACEHOLDER"))),e.R7$(4),e.Y8G("ngIf",n.getSuggestions()))},dependencies:[h.Sq,h.bT,h.Jj,R.D],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-search-field{display:block;position:relative;box-sizing:border-box;font-size:var(--searchFieldFontSize)}storefront-search-field *{font-size:inherit}storefront-search-field .search-field-container{position:relative}storefront-search-field .search-field-container input{width:100%;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons{position:absolute;top:0;right:0;display:flex;align-items:center;height:100%;z-index:1}storefront-search-field .search-field-container .search-field-buttons button{cursor:pointer;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons button.search-btn{display:block}storefront-search-field .search-field-container .search-field-buttons button.reset-btn{display:none;font-size:10px}storefront-search-field .search-field-container .search-field-suggestions{display:none;position:absolute;width:100%}storefront-search-field .search-field-container .search-field-suggestions .search-field-suggestion{padding:var(--gutter)}storefront-search-field.searched .search-field-buttons button.search-btn{display:none}storefront-search-field.searched .search-field-buttons button.reset-btn{display:block}storefront-search-field.focus .search-field-suggestions{display:block}\n'],encapsulation:2}),l})();var N=r(6483);let X=(()=>{var i;class l{}return(i=l).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[h.MD,N.h]}),l})();const U=I}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_search-field_search-field_module_ts"],{2561:(w,u,r)=>{r.r(u),r.d(u,{SearchFieldModule:()=>G,component:()=>U});var h=r(177),C=r(467),e=r(3953),f=r(8251),S=r(610),b=r(3178),F=r(1210);const y={param:"phrase"};var d=r(8075),E=r(9745),p=r(4559),j=r(9516),T=r(8004),_=r(1652),R=r(345),B=r(8448);const V=["input"];function k(s,l){if(1&s){const c=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const n=e.eBV(c).$implicit,i=e.XpG(2);return e.Njj(i.onClickSuggestion(n))})("mousedown",function(n){e.eBV(c);const i=e.XpG(2);return e.Njj(i.onSuggestionMousedown(n))}),e.EFF(1),e.k0s()}if(2&s){const c=l.$implicit;e.R7$(),e.JRh(c)}}function I(s,l){if(1&s&&(e.j41(0,"div",7),e.DNE(1,k,2,1,"div",8),e.k0s()),2&s){const c=e.XpG();e.R7$(),e.Y8G("ngForOf",c.getSuggestions())}}let N=(()=>{var s;class l extends F.${constructor(t,n,i,a,o,D,g,M,m,v,z){super(n,i,g,m,v),this.router=t,this.injector=n,this.elementRef=i,this.route=a,this.changeDetectorRef=o,this.store=D,this.contextService=g,this.eventActionService=M,this.document=m,this.globalService=v,this.sanitizer=z,this.defaultConfig={...y},this.searched=!1,this.phrase="",this.suggestions=null}ngOnInit(){super.ngOnInit();let t=!1;this.store.subscribe(this.route.queryParams,n=>{if(!t&&n&&this.config&&this.config.param&&n[this.config.param]){const i=n[this.config.param];let a=this.sanitizer.sanitize(e.WPN.HTML,i)||"";a=this.decodeGermanChars(a),a!==i&&(t=!0,this.router.navigate([],{relativeTo:this.route,queryParams:{...n,[this.config.param]:a},queryParamsHandling:"merge"}).then(()=>{t=!1})),this.input.nativeElement.value=this.phrase=a,this.searched=this.input.nativeElement.value.trim().length>0}})}decodeGermanChars(t){return t.replace(/&#228;/g,"\xe4").replace(/&#246;/g,"\xf6").replace(/&#252;/g,"\xfc").replace(/&#223;/g,"\xdf").replace(/&#196;/g,"\xc4").replace(/&#214;/g,"\xd6").replace(/&#220;/g,"\xdc")}onConfigChanges(){var t=this;return(0,C.A)(function*(){if(t.config.param&&t.context[t.config.param]&&(t.phrase=t.context[t.config.param],t.input.nativeElement.value=t.phrase,t.searched=t.input.nativeElement.value.trim().length>0),t.config.suggestions)try{t.suggestions=yield(0,b.hI)(t.config.suggestions.url)}catch{console.warn("Error fetching search suggestions")}t.changeDetectorRef.markForCheck()})()}onClickReset(t){this.phrase="",this.input.nativeElement.value=this.phrase,this.input.nativeElement.blur(),this.searched=!1,this.config.param&&(0,d.CV)(this.router,{[this.config.param]:null})}onSearch(){if(this.config.param&&this.input.nativeElement.value.trim().length>0){this.phrase=this.input.nativeElement.value,this.searched=!0;const t={...this.config.params,[this.config.param]:this.phrase};this.config.publicationType&&(t.publicationType=this.config.publicationType),this.store.dispatch((0,S.k4)({url:window.location.href,key:"SEARCH_PERFORMED",params:{phrase:this.phrase}})),this.config.path?this.eventActionService.processNavigateAction({type:E.H.NAVIGATE,path:this.config.path,params:t},this):(0,d.CV)(this.router,t)}}focus(t){return t&&t.preventDefault(),this.searched=this.input.nativeElement.value.trim().length>0,this.input.nativeElement.focus(),this.elementRef.nativeElement.classList.add("focus"),!1}focusOrSearch(t){t&&t.preventDefault();const n=this.input.nativeElement.value.trim();n.length>0&&n!==this.phrase?this.onSearch():this.focus()}onInput(t){this.searched=this.input.nativeElement.value.length>0}onBlur(t){setTimeout(()=>{this.input.nativeElement.value=this.phrase,this.searched=this.phrase.length>0;try{this.changeDetectorRef.detectChanges()}catch(n){console.warn("Error in change detection of Blur event",n)}},100),this.elementRef.nativeElement.classList.remove("focus"),this.searched=!1}onFocus(t){this.elementRef.nativeElement.classList.add("focus")}onKeyUp(t){13===(t.keyCode||t.which)?(this.input.nativeElement.blur(),this.onSearch()):8===(t.keyCode||t.which)&&(this.searched=this.input.nativeElement.value.length>0)}getSuggestions(){const t=this.input.nativeElement.value;return this.suggestions&&this.suggestions.filter(n=>0===n.toLowerCase().indexOf(t.toLowerCase()))}onClickSuggestion(t){this.input.nativeElement.value=t,this.phrase=t,this.onInput(),this.focus()}onSuggestionMousedown(t){return t.preventDefault(),!1}getId(){return null}}return(s=l).type="search-field",s.\u0275fac=function(t){return new(t||s)(e.rXU(p.Ix),e.rXU(e.zZn),e.rXU(e.aKT),e.rXU(p.nX),e.rXU(e.gRc),e.rXU(f.B),e.rXU(j.V),e.rXU(T.G),e.rXU(h.qQ),e.rXU(_.d),e.rXU(R.up))},s.\u0275cmp=e.VBU({type:s,selectors:[["storefront-search-field"]],viewQuery:function(t,n){if(1&t&&e.GBs(V,7),2&t){let i;e.mGM(i=e.lsd())&&(n.input=i.first)}},hostVars:2,hostBindings:function(t,n){2&t&&e.AVh("searched",n.searched)},features:[e.Jv_([f.B]),e.Vt3],decls:9,vars:6,consts:[["input",""],[1,"search-field-container"],["type","search",3,"click","input","focus","blur","keyup","placeholder"],["class","search-field-suggestions",4,"ngIf"],[1,"search-field-buttons"],[1,"icon","icon-search","search-btn",3,"mousedown","touchstart"],[1,"icon","icon-delete","reset-btn",3,"mousedown","touchstart"],[1,"search-field-suggestions"],["class","search-field-suggestion",3,"click","mousedown",4,"ngFor","ngForOf"],[1,"search-field-suggestion",3,"click","mousedown"]],template:function(t,n){if(1&t){const i=e.RV6();e.j41(0,"div",1)(1,"input",2,0),e.nI1(3,"storefrontTranslate"),e.nI1(4,"async"),e.bIt("click",function(o){return e.eBV(i),e.Njj(n.focus(o))})("input",function(o){return e.eBV(i),e.Njj(n.onInput(o))})("focus",function(o){return e.eBV(i),e.Njj(n.onFocus(o))})("blur",function(o){return e.eBV(i),e.Njj(n.onBlur(o))})("keyup",function(o){return e.eBV(i),e.Njj(n.onKeyUp(o))}),e.k0s(),e.DNE(5,I,2,1,"div",3),e.j41(6,"div",4)(7,"button",5),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))}),e.k0s(),e.j41(8,"button",6),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))}),e.k0s()()()}2&t&&(e.R7$(),e.Y8G("placeholder",e.bMT(4,4,e.bMT(3,2,"SEARCH_FIELD_PLACEHOLDER"))),e.R7$(4),e.Y8G("ngIf",n.getSuggestions()))},dependencies:[h.Sq,h.bT,h.Jj,B.D],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-search-field{display:block;position:relative;box-sizing:border-box;font-size:var(--searchFieldFontSize)}storefront-search-field *{font-size:inherit}storefront-search-field .search-field-container{position:relative}storefront-search-field .search-field-container input{width:100%;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons{position:absolute;top:0;right:0;display:flex;align-items:center;height:100%;z-index:1}storefront-search-field .search-field-container .search-field-buttons button{cursor:pointer;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons button.search-btn{display:block}storefront-search-field .search-field-container .search-field-buttons button.reset-btn{display:none;font-size:10px}storefront-search-field .search-field-container .search-field-suggestions{display:none;position:absolute;width:100%}storefront-search-field .search-field-container .search-field-suggestions .search-field-suggestion{padding:var(--gutter)}storefront-search-field.searched .search-field-buttons button.search-btn{display:none}storefront-search-field.searched .search-field-buttons button.reset-btn{display:block}storefront-search-field.focus .search-field-suggestions{display:block}\n'],encapsulation:2}),l})();var X=r(6483);let G=(()=>{var s;class l{}return(s=l).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[h.MD,X.h]}),l})();const U=N}}]);