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A0C,iBAAiB,4XAA4X,2BAA2B,qLAAqL,YAAY,QAAQ,yBAAyB,0MAA0M,iCAAiC,gGAAgG,WAAW,MAAM,iHAAiH,MAAM,OAAO,iCAAiC,IAAI,wBAAwB,iCAAiC,yCAAyC,cAAc,0CAA0C,6BAA6B,2CAA2C,8BAA8B,0EAA0E,iBAAiB,iKAAiK,8FAA8F,WAAW,8BAA8B,qBAAqB,mOAAmO,kKAAkK,MAAM,kBAAkB,GAAG,gBAAgB,mBAAmB,0BAA0B,2KAA2K,oGAAoG,MAAM,kBAAkB,EAAE,qBAAqB,qDAAqD,sGAAsG,iCAAiC,gBAAgB,KAAK,gBAAgB,GAAG,EAAE,GAAG,EAAE,cAAc,qHAAqH,OAAO,2BAA2B,8FAA8F,OAAO,sBAAsB,wdAAwd,yEAAyE,6FAA6F,gBAAgB,6CAA6C,gBAAgB,0BAA0B,iDAAiD,kBAAkB,GAAG,GAAG,SAAS,IAAI,wCAAwC,aAAa,QAAQ,iBAAiB,wCAAwC,WAAW,kBAAkB,0IAA0I,OAAO,2BAA2B,4CAA4C,OAAO,uBAAuB,4BAA4B,GAAG,SAAS,IAAI,WAAW,wDAAwD,EAAE,sDAAsD,EAAE,kDAAkD,EAAE,kDAAkD,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,uCAAuC,EAAE,aAAa,QAAQ,OAAO,2BAA2B,kBAAkB,OAAO,qBAAqB,OAAO,EAAE,OAAO,sBAAsB,oEAAoE,GAAG,SAAS,KAAK","sources":["webpack://roksh-desktop/4726.c4613b46e85c831d.js"],"sourcesContent":["\"use strict\";(self.webpackChunkroksh_desktop=self.webpackChunkroksh_desktop||[]).push([[4726],{54726:($t,y,a)=>{a.r(y),a.d(y,{ProductListModule:()=>St});var d=a(60177),T=a(20782),p=a(91583),O=a(89417),R=a(9183),c=a(76375),t=a(54438);let M=(()=>{class i{constructor(e){this.searchService=e}resolve(e){const{searchText:r,health:o,minPrice:s,maxPrice:l,sort:g,page:h}=e.params;return this.searchService.getSearchResults(r,{page:h,minPrice:s,maxPrice:l,health:o,sort:g})}static{this.\\u0275fac=function(r){return new(r||i)(t.KVO(c.ScJ))}}static{this.\\u0275prov=t.jDH({token:i,factory:i.\\u0275fac})}}return i})();var x=a(27468),P=a(25558),F=a(91785),b=a(345),u=a(73955),E=a(91624),L=a(73897),G=a(46078),U=a(81085),v=a(35095),k=a(45383),$=a(59822);const B=[\"leafContainer\"],I=i=>[i],N=i=>({\"container-margin\":i}),D=(i,n)=>({\"container-margin\":i,\"ms-2\":n}),A=i=>[\"/\",i];function Y(i,n){if(1&i&&(t.j41(0,\"a\",6),t.EFF(1),t.nI1(2,\"translate\"),t.k0s()),2&i){const e=t.XpG();t.Y8G(\"routerLink\",t.eq3(4,I,e.ownCategBackUrl)),t.R7$(),t.SpI(\" \",t.bMT(2,2,\"common.back\"),\"\\n\")}}function X(i,n){if(1&i&&t.nrm(0,\"img\",7),2&i){const e=t.XpG();t.Mz_(\"src\",\"\",e.weshopSiteImageUrl,\"images/marketing-banner-mobile.png\",t.B4B)}}function j(i,n){if(1&i&&t.nrm(0,\"img\",8),2&i){const e=t.XpG();t.Mz_(\"src\",\"\",e.weshopSiteImageUrl,\"images/marketing-banner-desktop.png\",t.B4B)}}function H(i,n){if(1&i&&(t.qex(0),t.j41(1,\"a\",13),t.EFF(2),t.nI1(3,\"translate\"),t.k0s(),t.nrm(4,\"br\"),t.bVm()),2&i){const e=t.XpG(2);t.R7$(),t.Y8G(\"routerLink\",t.eq3(4,I,e.ownCategBackUrl)),t.R7$(),t.SpI(\" \",t.bMT(3,2,\"common.back\"),\" \")}}function V(i,n){if(1&i&&(t.qex(0),t.j41(1,\"span\",17),t.EFF(2,\"/\"),t.k0s(),t.j41(3,\"a\",18),t.EFF(4),t.k0s(),t.bVm()),2&i){const e=n.$implicit,r=n.index,o=t.XpG(3);t.R7$(3),t.Y8G(\"ngClass\",o.breadCrumbArr.length-1===r?\"font-weight-bold text-dark\":\"text-dark-50\")(\"routerLink\",e.url),t.R7$(),t.SpI(\" \",e.name,\" \")}}function z(i,n){if(1&i&&(t.j41(0,\"div\",14)(1,\"a\",15),t.nI1(2,\"translate\"),t.EFF(3),t.nI1(4,\"translate\"),t.k0s(),t.DNE(5,V,5,3,\"ng-container\",16),t.k0s()),2&i){const e=t.XpG(2);t.Y8G(\"ngClass\",t.l_i(8,D,!e.isLowestCategory,e.isLowestCategory)),t.R7$(),t.Y8G(\"routerLink\",t.eq3(11,A,t.bMT(2,4,\"router.dashboard\"))),t.R7$(2),t.JRh(t.bMT(4,6,\"router.start-page\")),t.R7$(2),t.Y8G(\"ngForOf\",e.breadCrumbArr)}}function Q(i,n){1&i&&t.nrm(0,\"app-category-card\",23),2&i&&t.Y8G(\"category\",n.$implicit)(\"smallCard\",!0)}function W(i,n){if(1&i){const e=t.RV6();t.j41(0,\"a\",24),t.bIt(\"click\",function(){t.eBV(e);const o=t.XpG(3);return t.Njj(o.expandSubcategories())}),t.nrm(1,\"fa-icon\",25),t.k0s()}if(2&i){const e=t.XpG(3);t.R7$(),t.Y8G(\"icon\",e.faChevronDown)}}function q(i,n){if(1&i){const e=t.RV6();t.j41(0,\"a\",24),t.bIt(\"click\",function(){t.eBV(e);const o=t.XpG(3);return t.Njj(o.collapseSubcategories())}),t.nrm(1,\"fa-icon\",25),t.k0s()}if(2&i){const e=t.XpG(3);t.R7$(),t.Y8G(\"icon\",e.faChevronUp)}}function K(i,n){if(1&i&&(t.qex(0),t.j41(1,\"div\",19)(2,\"div\",null,0),t.DNE(4,Q,1,2,\"app-category-card\",20),t.k0s(),t.j41(5,\"div\",21),t.DNE(6,W,2,1,\"a\",22)(7,q,2,1,\"a\",22),t.k0s()(),t.bVm()),2&i){const e=t.XpG(2);t.R7$(4),t.Y8G(\"ngForOf\",e.subCategoryList),t.R7$(2),t.Y8G(\"ngIf\",e.isExpandable&&!e.isExpanded),t.R7$(),t.Y8G(\"ngIf\",e.isExpandable&&e.isExpanded)}}function J(i,n){if(1&i&&(t.j41(0,\"div\",9),t.DNE(1,H,5,6,\"ng-container\",10)(2,z,6,13,\"div\",11),t.j41(3,\"h1\",12),t.EFF(4),t.k0s(),t.DNE(5,K,8,3,\"ng-container\",10),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.Y8G(\"ngIf\",e.blockOwnCategory),t.R7$(),t.Y8G(\"ngIf\",e.breadCrumbArr&&!e.blockOwnCategory),t.R7$(),t.Y8G(\"ngClass\",t.eq3(5,N,!e.isLowestCategory)),t.R7$(),t.SpI(\" \",e.parentCategoryName,\" \"),t.R7$(),t.Y8G(\"ngIf\",e.subCategoryList)}}let Z=(()=>{class i{constructor(e,r,o){this.baseService=e,this.router=r,this.cdr=o,this.hasOwnCategories=!1,this.isExpandable=!1,this.isExpanded=!1,this.siteImageUrl=\"\",this.weshopSiteImageUrl=\"\",this.faChevronDown=k.Jt$,this.faChevronUp=k.w2A}ngAfterViewInit(){this.calculateIfExpandable()}calculateIfExpandable(){this.leafContainer&&(this.leafContainer.nativeElement.style.height=\"100%\"),this.leafContainer?.nativeElement.offsetHeight>135?(this.isExpandable=!0,this.cdr.detectChanges(),this.collapseSubcategories()):this.isExpandable=!1}expandSubcategories(){this.isExpanded=!0,this.leafContainer.nativeElement.style.height=\"100%\",this.leafContainer.nativeElement.style.overflowY=\"visible\"}collapseSubcategories(){this.isExpanded=!1,this.leafContainer.nativeElement.style.height=\"135px\",this.leafContainer.nativeElement.style.overflowY=\"hidden\"}ngOnInit(){this.siteImageUrl=this.baseService.getSiteImageUrl(),this.weshopSiteImageUrl=this.baseService.getSiteImageUrl(),this.blockOwnCategory&&(this.siteImageUrl=this.baseService.getMediaServiceUrl()),this.calculateValues()}ngOnChanges(){this.calculateValues(),this.leafContainer&&setTimeout(()=>this.calculateIfExpandable(),1e3)}calculateValues(){this.isLowestCategory=!this.subCategoryList||null===this.subCategoryList,this.parentCategoryName=this.actualCategory.CategoryName,this.parentCategoryProgId=this.actualCategory.ProgID,this.setTitleImgSrc(this.actualCategory),this.breadCrumbArr=this.calculateBreadCrumbs(this.actualCategory),this.isExpanded=!1}setTitleImgSrc(e){const{ProgID:r,IsRoot:o}=e;if(this.blockOwnCategory)return this.baseImgUrl=this.siteImageUrl+\"interface/medium/\",void(this.categoryImgSrc=this.actualCategory.CategoryImageFileName);if(this.actualCategory&&this.actualCategory.CategoryProviderImage&&this.actualCategory.CategoryProviderImage.CategoryImageFileName)this.baseImgUrl=this.siteImageUrl+\"category-images/category-provider-images/\",this.categoryImgSrc=this.actualCategory.CategoryProviderImage.CategoryImageFileName;else if(this.actualCategory&&this.actualCategory.CategoryImageFileName&&this.actualCategory.CategoryImageFileName.indexOf(\"own-categories\")>-1)this.hasOwnCategories=!0,this.pCode=window.location.pathname.split(\"/\")[1],this.baseImgUrl=this.siteImageUrl+\"category-images/\",this.categoryImgSrc=this.actualCategory.CategoryImageFileName;else{if(this.actualCategory.CategoryImageFileName&&this.actualCategory.CategoryImageFileName.indexOf(\"http\")>-1)return this.baseImgUrl=\"\",void(this.categoryImgSrc=this.actualCategory.CategoryImageFileName);o?(this.baseImgUrl=this.siteImageUrl+\"category-images/main-categories/\",this.categoryImgSrc=r+\"-f.png\"):(this.baseImgUrl=this.siteImageUrl+\"category-images/categories/\",this.categoryImgSrc=r+\".png\")}}calculateBreadCrumbs(e){const r=[];let o=e;for(;o.ParentCategory;)r.unshift({name:o.ParentCategory.CategoryName,progId:o.ParentCategory.ProgID,url:o.ParentCategory.Url}),o=o.ParentCategory;return r}static{this.\\u0275fac=function(r){return new(r||i)(t.rXU(c.qqv),t.rXU(p.Ix),t.rXU(t.gRc))}}static{this.\\u0275cmp=t.VBU({type:i,selectors:[[\"app-product-list-header\"]],viewQuery:function(r,o){if(1&r&&t.GBs(B,5),2&r){let s;t.mGM(s=t.lsd())&&(o.leafContainer=s.first)}},inputs:{subCategoryList:\"subCategoryList\",actualCategory:\"actualCategory\",categoryBlockTypeID:\"categoryBlockTypeID\",blockOwnCategory:\"blockOwnCategory\",ownCategBackUrl:\"ownCategBackUrl\"},features:[t.OA$],decls:5,vars:4,consts:[[\"leafContainer\",\"\"],[\"class\",\"text-dark text-size-small-13 no-hover ms-1 own-categ-back-url\",3,\"routerLink\",4,\"ngIf\"],[\"class\",\"marketing-banner d-block d-lg-none\",3,\"src\",4,\"ngIf\"],[\"class\",\"marketing-banner d-none d-lg-block\",3,\"src\",4,\"ngIf\"],[\"class\",\"header-text-container position-relative pt-4 pt-md-5 mb-lg-5 mb-2\",\"style\",\"z-index: 2\",4,\"ngIf\"],[1,\"clearfix\"],[1,\"text-dark\",\"text-size-small-13\",\"no-hover\",\"ms-1\",\"own-categ-back-url\",3,\"routerLink\"],[1,\"marketing-banner\",\"d-block\",\"d-lg-none\",3,\"src\"],[1,\"marketing-banner\",\"d-none\",\"d-lg-block\",3,\"src\"],[1,\"header-text-container\",\"position-relative\",\"pt-4\",\"pt-md-5\",\"mb-lg-5\",\"mb-2\",2,\"z-index\",\"2\"],[4,\"ngIf\"],[\"class\",\"pt-3 breadcrumb text-size-small-13 d-flex align-items-center\",3,\"ngClass\",4,\"ngIf\"],[1,\"font-weight-500\",\"category-title\",3,\"ngClass\"],[1,\"text-dark\",\"text-size-small-13\",\"no-hover\",\"ms-1\",3,\"routerLink\"],[1,\"pt-3\",\"breadcrumb\",\"text-size-small-13\",\"d-flex\",\"align-items-center\",3,\"ngClass\"],[1,\"p-0\",\"m-0\",3,\"routerLink\"],[4,\"ngFor\",\"ngForOf\"],[1,\"px-2\"],[1,\"p-0\",\"m-0\",3,\"ngClass\",\"routerLink\"],[1,\"container-magrgin\",\"w-100\",\"pb-2\"],[3,\"category\",\"smallCard\",4,\"ngFor\",\"ngForOf\"],[1,\"d-flex\",\"justify-content-end\",\"me-3\",\"d-md-none\"],[\"class\",\"arrows\",3,\"click\",4,\"ngIf\"],[3,\"category\",\"smallCard\"],[1,\"arrows\",3,\"click\"],[3,\"icon\"]],template:function(r,o){1&r&&(t.DNE(0,Y,3,6,\"a\",1)(1,X,1,2,\"img\",2)(2,j,1,2,\"img\",3)(3,J,6,7,\"div\",4),t.nrm(4,\"div\",5)),2&r&&(t.Y8G(\"ngIf\",o.blockOwnCategory&&5===o.categoryBlockTypeID),t.R7$(),t.Y8G(\"ngIf\",o.blockOwnCategory&&5===o.categoryBlockTypeID),t.R7$(),t.Y8G(\"ngIf\",o.blockOwnCategory&&5===o.categoryBlockTypeID),t.R7$(),t.Y8G(\"ngIf\",5!==o.categoryBlockTypeID))},dependencies:[d.YU,d.Sq,d.bT,p.Wk,$.aY,L.I,u.D9],styles:[\".smaller.basket-background[_ngcontent-%COMP%]{height:172px}.own-categ-back-url[_ngcontent-%COMP%]{position:absolute;top:10px}.marketing-banner[_ngcontent-%COMP%]{width:auto;margin-top:69px;max-height:400px}.breadcrumb[_ngcontent-%COMP%], .breadcrumb[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none!important;color:#727272!important}.breadcrumb[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#000!important}.category-card[_ngcontent-%COMP%]{height:160px;width:160px;background-color:#00b9ce;margin:10px;text-align:center;bottom:0;position:relative;border-radius:5%}.category-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:92px;width:92px}.smallCard.category-card[_ngcontent-%COMP%]{height:126px;width:126px}.category-card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#fdfefa;position:absolute;bottom:37px;width:100%;font-weight:500;font-size:17px}.smallCard.category-card[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:14px}.subCategory.category-card[_ngcontent-%COMP%]{background-color:#008091}.container-margin[_ngcontent-%COMP%]{margin-left:0;margin-right:30px}.category-big-img-container[_ngcontent-%COMP%]{z-index:1;height:243px;width:400px;left:-30px}.category-big-img[_ngcontent-%COMP%]{height:314px;top:3rem}.category-title[_ngcontent-%COMP%]{font-size:56px}.header-text-container[_ngcontent-%COMP%]{margin-top:50px}@media only screen and (min-width: 768px){.categories-sticked[_ngcontent-%COMP%]{position:fixed;top:70px;background-color:#ffffffe6;left:250px;max-width:calc(100vw - 250px);padding:5px}}@media (max-width: 480px){.arrows[_ngcontent-%COMP%]{background-color:#e7e7e7;border-radius:50px;width:30px;height:30px;padding-inline:8px;padding-top:4px}}@media only screen and (max-width: 768px){.header-text-container[_ngcontent-%COMP%]{margin-top:185px!important}.marketing-banner[_ngcontent-%COMP%]{margin-top:185px}.own-categ-back-url[_ngcontent-%COMP%]{top:10px}.category-title[_ngcontent-%COMP%]{font-size:28px}}@media only screen and (max-width: 992px){.category-big-img-container[_ngcontent-%COMP%]{overflow:hidden;left:-50px;width:210px;height:146px;z-index:3}.category-big-img[_ngcontent-%COMP%]{height:auto;max-width:180px;top:-1rem}.basket-background[_ngcontent-%COMP%]{height:146px}.text-size-small-13[_ngcontent-%COMP%]{font-size:13px!important}.mobile-category-row[_ngcontent-%COMP%]{flex-wrap:nowrap;overflow-x:auto}.header-text-container[_ngcontent-%COMP%]{margin-top:100px}}\"]})}}return i})();function tt(i,n){if(1&i&&t.nrm(0,\"app-product-list-header\",3),2&i){const e=t.XpG();t.Y8G(\"subCategoryList\",e.dashboard.SubCategories)(\"actualCategory\",e.actualCategory)(\"blockOwnCategory\",e.blockOwnCateg)(\"ownCategBackUrl\",e.ownCategBackUrl)(\"categoryBlockTypeID\",e.categoryBlockTypeID)}}function et(i,n){if(1&i&&t.nrm(0,\"div\",8),2&i){const e=t.XpG(2);t.Aen(null==e.htmlMarketingElementDto?null:e.htmlMarketingElementDto.cssFormats),t.Y8G(\"innerHTML\",null==e.htmlMarketingElementDto?null:e.htmlMarketingElementDto.safeHtml,t.npT)}}function it(i,n){if(1&i&&(t.qex(0),t.nrm(1,\"app-popular-products-new\",12),t.bVm()),2&i){const e=t.XpG().$implicit;t.R7$(),t.Y8G(\"customBlock\",e)}}function rt(i,n){if(1&i&&(t.qex(0),t.nrm(1,\"app-product-group\",13),t.bVm()),2&i){const e=t.XpG().$implicit;t.R7$(),t.Y8G(\"customBlock\",e)(\"isMainCategory\",!0)}}function ot(i,n){if(1&i&&(t.qex(0),t.nrm(1,\"app-custom-category-block\",12),t.bVm()),2&i){const e=t.XpG().$implicit;t.R7$(),t.Y8G(\"customBlock\",e)}}function nt(i,n){if(1&i&&(t.qex(0),t.nrm(1,\"app-product-group\",13),t.bVm()),2&i){const e=t.XpG().$implicit;t.R7$(),t.Y8G(\"customBlock\",e)(\"isMainCategory\",!0)}}function st(i,n){if(1&i&&(t.qex(0,10),t.DNE(1,it,2,1,\"ng-container\",11)(2,rt,2,2,\"ng-container\",11)(3,ot,2,1,\"ng-container\",11)(4,nt,2,2,\"ng-container\",11),t.bVm()),2&i){const e=n.$implicit,r=t.XpG(3);t.Y8G(\"ngSwitch\",e.CategoryBlockTypeID),t.R7$(),t.Y8G(\"ngSwitchCase\",r.categoryBlockTypes.popular),t.R7$(),t.Y8G(\"ngSwitchCase\",r.categoryBlockTypes.prior),t.R7$(),t.Y8G(\"ngSwitchCase\",r.categoryBlockTypes.category),t.R7$(),t.Y8G(\"ngSwitchCase\",r.categoryBlockTypes.marketing)}}function at(i,n){if(1&i&&(t.qex(0),t.DNE(1,st,5,5,\"ng-container\",9),t.bVm()),2&i){const e=t.XpG(2);t.R7$(),t.Y8G(\"ngForOf\",e.allCustomBlocks)}}function ct(i,n){1&i&&t.nrm(0,\"app-product-group\",16),2&i&&t.Y8G(\"productListResult\",n.$implicit)}function lt(i,n){if(1&i){const e=t.RV6();t.j41(0,\"div\",17),t.bIt(\"click\",function(){t.eBV(e);const o=t.XpG(3);return t.Njj(o.onAddMore())}),t.EFF(1),t.nI1(2,\"translate\"),t.k0s()}2&i&&(t.R7$(),t.SpI(\" \",t.bMT(2,1,\"common.more-products\"),\" \"))}function gt(i,n){if(1&i&&(t.qex(0),t.DNE(1,ct,1,1,\"app-product-group\",14)(2,lt,3,3,\"div\",15),t.bVm()),2&i){const e=t.XpG(2);t.R7$(),t.Y8G(\"ngForOf\",e.dashboard.ProductListResults),t.R7$(),t.Y8G(\"ngIf\",e.progIdArr.length>0)}}function dt(i,n){if(1&i&&(t.j41(0,\"div\"),t.nrm(1,\"app-product-card-wrapper\",23),t.k0s()),2&i){const e=n.$implicit;t.R7$(),t.Y8G(\"product\",e)(\"isShoppingList\",!1)}}function ht(i,n){1&i&&t.nrm(0,\"app-category-card\",32),2&i&&t.Y8G(\"category\",n.$implicit)}function pt(i,n){if(1&i&&(t.j41(0,\"div\",24)(1,\"h2\",25),t.EFF(2),t.nI1(3,\"translate\"),t.k0s(),t.j41(4,\"p\",26),t.EFF(5),t.nI1(6,\"translate\"),t.k0s(),t.nrm(7,\"br\"),t.j41(8,\"div\",27)(9,\"div\",28),t.nrm(10,\"div\",29),t.DNE(11,ht,1,1,\"app-category-card\",30),t.nrm(12,\"div\",31)(13,\"div\",31)(14,\"div\",31)(15,\"div\",31)(16,\"div\",31),t.k0s()()()),2&i){const e=t.XpG(3);t.R7$(2),t.SpI(\" \",t.bMT(3,3,\"messages.no-product-in-category\"),\" \"),t.R7$(3),t.SpI(\" \",t.bMT(6,5,\"messages.explore-or-change\"),\" \"),t.R7$(6),t.Y8G(\"ngForOf\",e.allCategories)}}function ut(i,n){if(1&i){const e=t.RV6();t.j41(0,\"a\",33),t.bIt(\"click\",function(o){t.eBV(e);const s=t.XpG(3);return t.Njj(s.onAddMore(o))}),t.EFF(1),t.nI1(2,\"translate\"),t.k0s()}if(2&i){const e=t.XpG(3);t.Y8G(\"href\",e.actualCategory.Url+\"?page=\"+(+e.filter.Page+1),t.B4B),t.R7$(),t.JRh(t.bMT(2,2,\"common.more-product\"))}}function mt(i,n){if(1&i&&(t.qex(0),t.j41(1,\"div\",18),t.DNE(2,dt,2,2,\"div\",19),t.nrm(3,\"div\",20)(4,\"div\",20)(5,\"div\",20)(6,\"div\",20)(7,\"div\",20),t.DNE(8,pt,17,7,\"div\",21),t.k0s(),t.DNE(9,ut,3,4,\"a\",22),t.bVm()),2&i){const e=t.XpG(2);t.R7$(2),t.Y8G(\"ngForOf\",e.productList)(\"ngForTrackBy\",e.trackProduct),t.R7$(6),t.Y8G(\"ngIf\",e.productList&&0===e.productList.length),t.R7$(),t.Y8G(\"ngIf\",e.isMorePage&&!e.isLoading)}}function ft(i,n){if(1&i&&(t.j41(0,\"div\",4)(1,\"div\",5),t.DNE(2,et,1,3,\"div\",6)(3,at,2,1,\"ng-container\",7)(4,gt,3,2,\"ng-container\",7)(5,mt,10,4,\"ng-container\",7),t.k0s()()),2&i){const e=t.XpG();t.R7$(2),t.Y8G(\"ngIf\",e.htmlMarketingElementDto),t.R7$(),t.Y8G(\"ngIf\",e.hasProduct),t.R7$(),t.Y8G(\"ngIf\",e.dashboard&&e.actualScreen===e.screenEnum.MAIN_CATEGORY),t.R7$(),t.Y8G(\"ngIf\",e.dashboard&&e.productList&&e.actualScreen===e.screenEnum.LEAF_CATEGORY)}}var m=function(i){return i[i.LEAF_CATEGORY=0]=\"LEAF_CATEGORY\",i[i.MAIN_CATEGORY=1]=\"MAIN_CATEGORY\",i}(m||{});let f=(()=>{class i{constructor(e,r,o,s,l,g,h,_,C,Tt,Ot,Rt,Mt,Ft,Et){this.router=e,this.route=r,this.productListService=o,this.homeService=s,this.title=l,this.meta=g,this.location=h,this.categoryService=_,this.sessionService=C,this.dashboardService=Tt,this.baseService=Ot,this.translate=Rt,this.providerSettingsService=Mt,this._seoService=Ft,this.marketingService=Et,this.screenEnum=m,this.isLoading=!1,this.isFirstLoading=!0,this.LOAD_NEXT_CATEGORIES=3,this.actualPageNum=1,this.isMorePage=!0,this.firtLoad=!0,this.allCategories=[],this.filter=new c.UMs,this.hasProduct=!0,this.siteImageUrl=\"\",this.shop=\"\",this.seoTitle=\"\",this.seoMetaDescription=\"\",this.seoMetaKeywords=\"\",this.categoryBlockTypes=c.qZf,this.OFFSET_LOAD_MORE=800,this.onWindowScroll=()=>{const S=document.documentElement;S.scrollTop+window.innerHeight+this.OFFSET_LOAD_MORE>=S.offsetHeight&&this.onAddMore()},this.ContainerIds=c.Io3}ngOnInit(){this.siteImageUrl=this.baseService.getSiteImageUrl(),this.sessionService.isProviderSelectedForShopping.next(!0),this.homeService.isSessionSet.subscribe(e=>{if(e){window.addEventListener(\"scroll\",this.onWindowScroll,!0);const{Page:r,Sort:o,Brand:s,Health:l}=this.route.snapshot.queryParams;this.filter={...this.filter,Page:r,Sort:o,Brand:s,Health:l},this.routerChangeSub=this.loadProductOnPageChange(),this.sessionService.sessionSubject.subscribe(g=>{this.shop=g.selectedShops[0].toLocaleLowerCase(),this.firtLoad?this.firtLoad=!1:this.loadProductOnPageChange()})}})}loadProductOnPageChange(){return this.route.params.pipe((0,P.n)(e=>(this.isLoading=!0,this.actualProgId=e.progId,this.blockOwnCateg=e.blockOwnCateg,this.resetFilter(),this.blockOwnCateg?this.dashboardService.getProductBlockList(this.blockOwnCateg,this.filter.Page):this.productListService.getCategoryProductFirstTime(this.actualProgId)))).subscribe(e=>{e[0]&&(this.htmlMarketingElementDto=this.marketingService.filteredHtmlMarketingElements(e[0].HtmlMarketingElementDto)),this.blockOwnCateg&&(this.categoryBlockTypeID=e[0].CategoryBlockTypeID,e=this.mapCategoryBlockDashboard(e)),this.isFirstLoading=!1,this.resetValues(),e.SubCategories&&typeof this.route.snapshot.params.cat1>\"u\"&&!this.blockOwnCateg?(this.actualScreen=m.MAIN_CATEGORY,e.ProductListResults[0]&&(this.actualCategory=e.ProductListResults[0].CategoryHeader.ParentCategory)):(this.actualScreen=m.LEAF_CATEGORY,this.actualCategory=e.ProductListResults[0].CategoryHeader,this.isMorePage=e.ProductListResults[0].ListContext.TotalPages-e.ProductListResults[0].ListContext.Page>0),this.isLoading=!1,this.actualScreen===m.LEAF_CATEGORY?(this.productList=this.blockOwnCateg?e.ProductListResults[0].ProductList:e.ProductListResults[0].ProductQueryResultDto.ProductList,this.productList&&0===this.productList.length&&this.categoryService.categories.subscribe(o=>{this.allCategories=o})):(this.progIdArr=e.SubCategories.map(o=>o.ProgID),this.loadedProdIds=e.ProductListResults.map(o=>o.CategoryHeader.ProgID),this.progIdArr=this.removeLoadedProgIds(this.loadedProdIds)),this.dashboard=e,this.dashboard.ProductListResults[0]&&this.updateMetaTagsAndTitle(this.dashboard.ProductListResults[0].CategoryHeader.ParentCategory?this.dashboard.ProductListResults[0].CategoryHeader.ParentCategory.CategoryName:this.dashboard.ProductListResults[0].CategoryHeader.CategoryName),this.dashboardService.getProductBlockList(this.actualProgId,this.filter.Page).subscribe(o=>{this.allCustomBlocks=o,this.allCustomBlocks=this.allCustomBlocks.filter(s=>s.ProductList.length>0)})},()=>this.isLoading=!1)}mapCategoryBlockDashboard(e){this.ownCategBackUrl=e[0].BackUrl.includes(e[0].ProviderCodeToSelect)?\"/\"+e[0].BackUrl:\"/\"+e[0].ProviderCodeToSelect+\"/\"+e[0].BackUrl;const r=new c.dPS;return r.ProductListResults=e[0].ProductList,r.ProductListResults[0].ProductList=e[0].ProductList,r.ProductListResults[0].CategoryHeader=new c.mEx,r.ProductListResults[0].CategoryHeader.CategoryName=e[0].Title,r.ProductListResults[0].CategoryHeader.CategoryImageFileName=e[0].MediaGUID,r.ProductListResults[0].ListContext=new c.F8E,r.ProductListResults[0].ListContext.TotalPages=e[0].TotalPages,r.ProductListResults[0].ListContext.Page=e[0].Page,r.ProductListResults[0].CategoryHeader.Url=e[0].OwnCategoryUrl,r}resetValues(){this.progIdArr=[],this.loadedProdIds=[],this.actualPageNum=1}onAddMore(e){if(e&&e.preventDefault(),!this.isLoading&&this.isMorePage)if(this.actualScreen===m.MAIN_CATEGORY){if(this.progIdArr.length>0){this.isLoading=!0;const o=this.progIdArr.splice(0,this.LOAD_NEXT_CATEGORIES<=this.progIdArr.length?this.LOAD_NEXT_CATEGORIES:this.progIdArr.length);this.productListService.getAdditionalCategoryProductList(o).subscribe(s=>{this.isLoading=!1,this.dashboard.ProductListResults=[...this.dashboard.ProductListResults,...s.ProductListResults]})}}else this.isLoading=!0,this.filter.Page++,this.createFilterQuery(this.filter),this.blockOwnCateg?this.dashboardService.getProductBlockList(this.blockOwnCateg,this.filter.Page).subscribe(r=>{this.isMorePage=r[0].TotalPages-r[0].Page>0,this.productList=[...this.productList,...r[0].ProductList],this.isLoading=!1},()=>{this.isLoading=!1}):this.productListService.getNewProductList(this.filter).subscribe(r=>{this.isMorePage=r.TotalPages-r.Page>0,this.productList=[...this.productList,...r.ProductList],this.isLoading=!1},()=>{this.isLoading=!1})}createFilterQuery(e){const r={...e,CategoryProgId:void 0},o=this.productListService.createFilterQuery(r);this.location.go(`${this.actualCategory.Url}?${o}`)}removeLoadedProgIds(e){return this.progIdArr.filter(r=>!e.includes(r))}onFilterLoad(e){this.filter={...this.filter,...e},this.isLoading=!0,this.filter.Page=1,this.createFilterQuery(this.filter),this.productListService.getNewProductList(this.filter).subscribe(r=>{this.isMorePage=r.ListContext.TotalPages-r.ListContext.Page>0,this.productList=r.ProductList,this.isLoading=!1},()=>{this.isLoading=!1})}resetFilter(){this.filter.CategoryProgId=this.actualProgId,this.filter.Page=1}trackProduct(e,r){return r?r.productID:void 0}ngOnDestroy(){this.routerChangeSub&&this.routerChangeSub.unsubscribe(),window.removeEventListener(\"scroll\",this.onWindowScroll,!0)}updateMetaTagsAndTitle(e){let r;r=this.actualCategory.AlternativeCategoryProviderID?this.actualCategory.AlternativeCategoryProviderID:this.actualCategory.CategoryID,this.providerSettingsService.getSEODetails(r).subscribe(o=>{this.seoTitle=o.find(s=>0===s.SEOSettingType)?.Description??\"\",this.seoMetaDescription=o.find(s=>1===s.SEOSettingType)?.Description??\"\",this.seoMetaKeywords=o.find(s=>2===s.SEOSettingType)?.Description??\"\",(0,x.p)([this.translate.get(\"info.category-title\"),this.translate.get(\"meta.category-keywords\"),this.translate.get(\"meta.category-description-first\")]).subscribe(([s,l,g])=>{this.shop||(this.shop=\"\");const h=this._seoService.titleWrap([\"ROKSH \",e,this.shop.toUpperCase(),s,this.seoTitle].filter(Boolean).join(\" \"));this.title.setTitle(h),this.meta.updateTag({name:\"keywords\",content:[e,this.shop.toUpperCase(),l,this.seoMetaKeywords].filter(Boolean).join(\" \")}),this.meta.updateTag({name:\"description\",content:[e,this.shop.toUpperCase(),g,this.seoMetaDescription].filter(Boolean).join(\" \")})})})}static{this.\\u0275fac=function(r){return new(r||i)(t.rXU(p.Ix),t.rXU(p.nX),t.rXU(c.nSL),t.rXU(F.X),t.rXU(b.hE),t.rXU(b.W8),t.rXU(d.aZ),t.rXU(c.M$2),t.rXU(c.Qow),t.rXU(c.I8G),t.rXU(c.qqv),t.rXU(u.c$),t.rXU(c.sf),t.rXU(c.LtY),t.rXU(c.a57))}}static{this.\\u0275cmp=t.VBU({type:i,selectors:[[\"app-product-list-new\"]],decls:3,vars:2,consts:[[1,\"header\",\"w-100\",\"px-3\",\"px-md-5\",\"pb-3\"],[3,\"subCategoryList\",\"actualCategory\",\"blockOwnCategory\",\"ownCategBackUrl\",\"categoryBlockTypeID\",4,\"ngIf\"],[\"class\",\"position-relative w-100 d-flex justify-content-center\",4,\"ngIf\"],[3,\"subCategoryList\",\"actualCategory\",\"blockOwnCategory\",\"ownCategBackUrl\",\"categoryBlockTypeID\"],[1,\"position-relative\",\"w-100\",\"d-flex\",\"justify-content-center\"],[1,\"products-list-container\"],[3,\"style\",\"innerHTML\",4,\"ngIf\"],[4,\"ngIf\"],[3,\"innerHTML\"],[3,\"ngSwitch\",4,\"ngFor\",\"ngForOf\"],[3,\"ngSwitch\"],[4,\"ngSwitchCase\"],[3,\"customBlock\"],[3,\"customBlock\",\"isMainCategory\"],[3,\"productListResult\",4,\"ngFor\",\"ngForOf\"],[\"class\",\"btn btn-secondary mx-auto mb-2 d-block\",\"style\",\"width: 200px\",3,\"click\",4,\"ngIf\"],[3,\"productListResult\"],[1,\"btn\",\"btn-secondary\",\"mx-auto\",\"mb-2\",\"d-block\",2,\"width\",\"200px\",3,\"click\"],[1,\"w-100\",\"mb-5\",\"product-list\",\"justify-content-between\"],[4,\"ngFor\",\"ngForOf\",\"ngForTrackBy\"],[1,\"fake-product\"],[\"class\",\"mt-5 w-100 text-center\",4,\"ngIf\"],[\"class\",\"btn btn-secondary mx-auto mb-2 d-block\",\"style\",\"width: 200px\",3,\"href\",\"click\",4,\"ngIf\"],[3,\"product\",\"isShoppingList\"],[1,\"mt-5\",\"w-100\",\"text-center\"],[1,\"text-warning\"],[1,\"text-info\"],[1,\"main-categories\",\"pt-3\"],[1,\"container\",\"mt-0\"],[1,\"clearfix\"],[3,\"category\",4,\"ngFor\",\"ngForOf\"],[1,\"fake-cat\"],[3,\"category\"],[1,\"btn\",\"btn-secondary\",\"mx-auto\",\"mb-2\",\"d-block\",2,\"width\",\"200px\",3,\"click\",\"href\"]],template:function(r,o){1&r&&(t.j41(0,\"div\",0),t.DNE(1,tt,1,5,\"app-product-list-header\",1),t.k0s(),t.DNE(2,ft,6,4,\"div\",2)),2&r&&(t.R7$(),t.Y8G(\"ngIf\",o.dashboard),t.R7$(),t.Y8G(\"ngIf\",!o.isFirstLoading))},dependencies:[d.Sq,d.bT,d.ux,d.e1,E.I,L.I,G.l,U.q,v.W,Z,u.D9],styles:[\".products-list-container[_ngcontent-%COMP%]{min-width:90%;max-width:95%}.header[_ngcontent-%COMP%]{z-index:5;background-color:#fff;box-shadow:0 3px 3px 3px #fff}.container[_ngcontent-%COMP%]{margin-top:74px}.product-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:5px}.fake-product[_ngcontent-%COMP%]{min-width:165px;max-width:185px}@media (max-width: 767px){.container[_ngcontent-%COMP%]{margin-top:165px!important}.products-list-container[_ngcontent-%COMP%]{width:95%}}.main-categories[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;flex-flow:row wrap;z-index:1}\"]})}}return i})();const _t=i=>({searchTerm:i});function Ct(i,n){if(1&i&&(t.j41(0,\"h1\",8),t.EFF(1),t.nI1(2,\"translate\"),t.k0s()),2&i){const e=t.XpG(2);t.R7$(),t.Lme(\" \",t.bMT(2,2,\"common.searched-text\"),\": \",e.searchText,\" \")}}function yt(i,n){if(1&i&&(t.j41(0,\"h1\"),t.EFF(1),t.nI1(2,\"translate\"),t.k0s()),2&i){const e=t.XpG(2);t.R7$(),t.SpI(\" \",t.i5U(2,1,\"common.no-result-searched-text\",t.eq3(4,_t,e.searchText)),\" \")}}function xt(i,n){if(1&i&&(t.j41(0,\"div\",6),t.nrm(1,\"app-product-card-wrapper\",10),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(),t.Y8G(\"product\",e)(\"isShoppingList\",!1)}}function Pt(i,n){if(1&i&&(t.qex(0),t.DNE(1,xt,2,2,\"div\",9),t.bVm()),2&i){const e=n.$implicit;t.R7$(),t.Y8G(\"ngIf\",e.price&&e.price>0)}}function bt(i,n){if(1&i&&(t.qex(0),t.j41(1,\"div\",2),t.DNE(2,Ct,3,4,\"h1\",3)(3,yt,3,6,\"ng-template\",null,0,t.C5r),t.j41(5,\"div\",4),t.DNE(6,Pt,2,1,\"ng-container\",5),t.j41(7,\"div\",6),t.nrm(8,\"div\",7),t.k0s(),t.j41(9,\"div\",6),t.nrm(10,\"div\",7),t.k0s(),t.j41(11,\"div\",6),t.nrm(12,\"div\",7),t.k0s(),t.j41(13,\"div\",6),t.nrm(14,\"div\",7),t.k0s(),t.j41(15,\"div\",6),t.nrm(16,\"div\",7),t.k0s()()(),t.bVm()),2&i){const e=t.sdS(4),r=t.XpG();t.R7$(),t.AVh(\"discount-margin\",r.isDiscountAvailable),t.R7$(),t.Y8G(\"ngIf\",r.searchResult.ProductList.length>0)(\"ngIfElse\",e),t.R7$(4),t.Y8G(\"ngForOf\",r.searchResult.ProductList)}}let w=(()=>{class i{constructor(e,r,o,s,l,g){this.route=e,this.searchService=r,this.productListService=o,this.location=s,this.translate=l,this.basketService=g,this.isMorePage=!1,this.isLoading=!1,this.OFFSET_LOAD_MORE=800,this.onWindowScroll=()=>{const h=document.documentElement;h.scrollTop+window.innerHeight+this.OFFSET_LOAD_MORE>=h.offsetHeight&&this.onLoadMoreProduct()}}ngOnInit(){let e;window.addEventListener(\"scroll\",this.onWindowScroll,!0),this.routerChangeSub=this.route.params.pipe((0,P.n)(r=>{const{Sort:o}=this.route.snapshot.queryParams;let{Health:s,Brand:l,Page:g}=this.route.snapshot.queryParams;return g=isNaN(g)?1:g,this.actualFilter={Page:g,Sort:o},l&&(l=this.isArray(l),this.actualFilter={...this.actualFilter,Brand:l}),s&&(s=this.isArray(s),this.actualFilter={...this.actualFilter,Health:s}),e=r.searchText,this.searchService.getSearchResults(e,this.actualFilter)})).subscribe(r=>{this.originalBrands=r.Brand,this.originalHealth=r.BioFilters,this.searchText=e,this.searchResult=r,this.isMorePage=r.ListContext.TotalPages-r.ListContext.Page>0}),this.basketService.isRokshDiscountAvailableSubject.subscribe(r=>this.isDiscountAvailable=r)}isArray(e){return Array.isArray(e)?e:[e]}onLoadMoreProduct(e){e&&e.preventDefault(),this.isMorePage&&!this.isLoading&&(this.isLoading=!0,this.actualFilter.Page++,this.createFilterQuery(this.actualFilter),this.searchService.getSearchResults(this.searchText,this.actualFilter).subscribe(r=>{this.isMorePage=r.ListContext.TotalPages-r.ListContext.Page>0,this.searchResult.ProductList=[...this.searchResult.ProductList,...r.ProductList],this.isLoading=!1},()=>{this.isLoading=!1}))}onFilterLoad(e){this.actualFilter={...this.actualFilter,...e},this.isLoading=!0,this.actualFilter.Page=1,this.createFilterQuery(this.actualFilter),this.searchService.getSearchResults(this.searchText,this.actualFilter).subscribe(r=>{this.isMorePage=r.ListContext.TotalPages-r.ListContext.Page>0,this.searchResult=r,this.isLoading=!1},()=>{this.isLoading=!1})}createFilterQuery(e){const r=this.productListService.createFilterQuery(e);(0,x.p)([this.translate.get(\"router.offer\"),this.translate.get(\"router.search\")]).subscribe(([o,s])=>{this.location.go(\"/\"+o+\"/\"+s+`/${this.searchText}?s=${this.searchText}&${r}`)})}ngOnDestroy(){this.routerChangeSub&&this.routerChangeSub.unsubscribe(),window.removeEventListener(\"scroll\",this.onWindowScroll,!0)}static{this.\\u0275fac=function(r){return new(r||i)(t.rXU(p.nX),t.rXU(c.ScJ),t.rXU(c.nSL),t.rXU(d.aZ),t.rXU(u.c$),t.rXU(c.SPR))}}static{this.\\u0275cmp=t.VBU({type:i,selectors:[[\"app-search-page\"]],decls:1,vars:1,consts:[[\"emptyResult\",\"\"],[4,\"ngIf\"],[1,\"pt-4\",\"ps-2\",\"ps-md-5\",\"position-relative\",\"router-container\",\"w-100\",\"leaf-products-list-container\"],[\"class\",\"py-3\",4,\"ngIf\",\"ngIfElse\"],[1,\"row\",\"mb-5\"],[4,\"ngFor\",\"ngForOf\"],[1,\"col\",\"product-card-container-w\"],[2,\"width\",\"163px\"],[1,\"py-3\"],[\"class\",\"col product-card-container-w\",4,\"ngIf\"],[\"preferredWidth\",\"185px\",3,\"product\",\"isShoppingList\"]],template:function(r,o){1&r&&t.DNE(0,bt,17,5,\"ng-container\",1),2&r&&t.Y8G(\"ngIf\",o.searchResult)},dependencies:[d.Sq,d.bT,v.W,u.D9],styles:[\".leaf-products-list-container[_ngcontent-%COMP%]{margin-top:74px}.product-card-container-w[_ngcontent-%COMP%]{max-width:200px}@media (max-width: 769px){.leaf-products-list-container[_ngcontent-%COMP%]{margin-top:165px}}\"]})}}return i})();var Lt=a(96354),vt=a(99437),kt=a(18810);let It=(()=>{class i{constructor(e,r){this.router=e,this.productListService=r}resolve(e){const r=new c.UMs;return this.productListService.getProductList(r).pipe((0,Lt.T)(o=>o.TagObject),(0,vt.W)(o=>(this.router.navigate([\"/404\"]),(0,kt.$)(o))))}static{this.\\u0275fac=function(r){return new(r||i)(t.KVO(p.Ix),t.KVO(c.nSL))}}static{this.\\u0275prov=t.jDH({token:i,factory:i.\\u0275fac})}}return i})();const wt=[{path:\"kereses/:searchText\",component:w,pathMatch:\"full\"},{path:\"suche/:searchText\",component:w,pathMatch:\"full\"},{path:\"kategoria-blokk/:blockOwnCateg\",component:f},{path:\"kategorie-block/:blockOwnCateg\",component:f},{path:\":progId\",component:f},{path:\":cat1/:progId\",component:f},{path:\":cat1/:cat2/:progId\",component:f}];let St=(()=>{class i{static{this.\\u0275fac=function(r){return new(r||i)}}static{this.\\u0275mod=t.$C({type:i})}static{this.\\u0275inj=t.G2t({providers:[It,M],imports:[u.h,d.MD,p.iI.forChild(wt),O.YN,R.D6,T.G]})}}return i})()}}]);"],"names":[],"sourceRoot":""}