1import{a as Le,b as Ee}from"./chunk-CAQC7JX5.js";import{c as ve}from"./chunk-QGBSX6B5.js";import"./chunk-XXVB45L4.js";import{a as he}from"./chunk-J5NWFZXF.js";import"./chunk-NEQO7ITA.js";import{d as Ce}from"./chunk-ILIGNJRC.js";import{a as me}from"./chunk-XJNXF36J.js";import"./chunk-OQWTUUQ3.js";import"./chunk-BYUXZABT.js";import{Fb as Se,Pa as ue,db as fe,r as ce,s as pe,va as ge,z as de}from"./chunk-CSKO464Y.js";import{A as O,b as $,m as w,z as _e}from"./chunk-RFZ65DFT.js";import"./chunk-ZAELU3GP.js";import{i as V}from"./chunk-KCBWTIVH.js";import"./chunk-Q7LOV5U2.js";import"./chunk-ZS7OWNSY.js";import"./chunk-DIZWDXBB.js";import{Q as ne,R as ae}from"./chunk-Q4MTVQC2.js";import{a as le,b as R}from"./chunk-RRAYDVNW.js";import{Ea as M,Na as r,a as ee,c as te,hd as oe,nd as re,sb as B,zd as se}from"./chunk-WGWIBZ2L.js";import{$b as y,$c as c,D as H,Fa as g,Ga as u,Ha as q,Ia as z,Ib as S,La as j,Ob as T,Pd as Z,Qa as x,Ta as F,Tb as n,Tc as Q,Ub as a,Vb as _,Zb as P,ac as f,ad as J,hb as s,pc as C,qc as I,rc as A,sc as b,tb as L,ua as U,wc as W,xc as Y,ya as p,yc as X,ye as ie,zb as E}from"./chunk-6LP6WHZQ.js";import{a as N,b as K}from"./chunk-5KTCK5IS.js";var v="IsBestSeller";var k=(function(t){return t.ColorFamilies="COLOR_FAMILIES",t.ColorCollections="COLOR_COLLECTIONS",t.IndoorOutdoorUse="COLOR_LIST_FAMILY_ROOTS_GROUPING_FILTER_NAME",t})(k||{});var Fe="click",Pe="Color Details Page opened",ye=(()=>{class t extends ve{constructor(){super(),this.IS_BEST_SELLER_FILTER="true",this.activatedRoute=p(ie),this.destroyRef=p(j),this.resourceService=p(R),this.siteSettingsService=p(w),this.sessionConfigService=p(me),this.filtersPerGroupLimit=c(()=>this.siteSettingsService.getNumericSiteSettingValueByKey(M.ColorJourneyColorListFilterItemsPerGroupLimit)??20),this.indexTemplate=c(()=>this.sessionConfigService.currentConfiguration().algolia?.colorIndex??""),this.useDynamicWidgets=F(!0),this.additionalRefinementAttributes=F([v]),this.shouldSyncPaginationState=F(!0),this.colorHits=c(()=>this.hits().map(e=>K(N({},e),{sendInsights:()=>this.sendEventFunction?.(Fe,e,Pe)}))),this.#e(),this.#t()}getFiltersPerFacetLimit(){return this.filtersPerGroupLimit()}onAdditionalRefinement(e,o){e===v&&(this.refineIsBestSellerFilter=o)}refineFilters(e,o){this.filterMap()[e].refine(o)}clearIsBestSellerFilter(e){this.refineIsBestSellerFilter(e)}clearFilters(){this.clearRefinements()}#e(){this.initializeSearchInstance(),this.widgets=this.createBaseWidgets();let e=this.activatedRoute.snapshot.queryParams.q||"";this.query.set(e),this.startSearch()}#t(){this.activatedRoute.queryParams.pipe(ee(this.destroyRef)).subscribe(e=>{let o=e.q||"";o!==this.query()&&(this.query.set(o),this.search(o))})}getLocalizedFilterLabel(e){let o=k[e];return o&&this.resourceService.getResourceByKey(r[o])||e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Re=(()=>{class t{constructor(){this.resourceService=p(R),this.message=c(()=>this.resourceService.getResourceByKey(r.COLOR_LIST_PAGE_NO_COLORS))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=L({type:t,selectors:[["ppg-color-list-empty"]],decls:2,vars:1,consts:[["data-test-id","colorListEmpty.message",1,"color-list-empty-message"]],template:function(o,i){o&1&&(n(0,"p",0),C(1),a()),o&2&&(s(),I(i.message()))},encapsulation:2})}}return t})();var Te=(()=>{class t{constructor(){this.message=x.required()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=L({type:t,selectors:[["ppg-post-results-card"]],inputs:{message:[1,"message"]},decls:2,vars:1,consts:[["styleClass","mt-5 noBorder"],["data-test-id","contactCard.message",3,"content"]],template:function(o,i){o&1&&(n(0,"p-card",0),_(1,"ppg-rich-text",1),a()),o&2&&(s(),S("content",i.message()))},dependencies:[O,_e,le],styles:["[_nghost-%COMP%] p-card .p-card{background-color:var(--p-pds-surface-neutral-extreme-soft, #eaeff5)}[_nghost-%COMP%] p-card .p-card p{color:var(--p-pds-on-surface-neutral-extreme-strong, #31261d)}[_nghost-%COMP%] p-card .p-card a{color:var(--link-fg-neutral-default, #101d28)}"],changeDetection:0})}}return t})();var G=class{static toColorInfoValid(m){let e=[{name:m.ColorFamilies?.at(0)??"",typeLabel:m.IndoorOutdoorUse?.at(0)??""}];return new de(m.ProductNumber,!1,void 0,m.ColorCode,m.ColorName,m.RGB,m.ColorImage,m.IsBestSeller,e)}};function Be(t,m){if(t&1&&C(0),t&2){let e=f();b(" ",e.resources().searchResultsFor,' "',e.query(),'" ')}}function we(t,m){if(t&1&&C(0),t&2){let e=f();A(" ",e.resources().allColors," ")}}function Oe(t,m){if(t&1&&(n(0,"div",8),_(1,"i",19),n(2,"div",20),C(3),a()()),t&2){let e=f();s(3),A(" ",e.resources().noFiltersSelected," ")}}function Ge(t,m){if(t&1){let e=P();n(0,"div",9)(1,"p-button",21),y("onClick",function(){g(e);let i=f();return u(i.clearFilters())}),q(),n(2,"svg",22),_(3,"use",23),a(),z(),n(4,"div",24),C(5),a()()()}if(t&2){let e=f();s(),S("text",!0)("styleClass","px-0 py-0"),s(4),b(" ",e.resources().clearAllFilters," ",e.resources().filtersCount," ")}}function be(t,m){if(t&1){let e=P();n(0,"div",10)(1,"p",25),C(2),a(),n(3,"div",26)(4,"p-toggleswitch",27),X("ngModelChange",function(i){g(e);let l=f();return Y(l.isBestSeller,i)||(l.isBestSeller=i),u(i)}),y("onChange",function(i){g(e);let l=f();return u(l.onToggleSwitch(i.checked))}),a()()()}if(t&2){let e=f();s(2),I(e.resources().bestSeller),s(2),W("ngModel",e.isBestSeller)}}function Ve(t,m){if(t&1&&_(0,"ppg-post-results-card",14),t&2){let e=f();S("message",e.resources().tooManyResults)}}function ke(t,m){t&1&&_(0,"ppg-color-list-empty")}var qt=(()=>{class t{constructor(){this.minColorFiltersCount=0,this.maxNumberOfHitsToDisplay=1e3,this.colorGtmService=p(ge),this.resourceService=p(R),this.algoliaService=p(ye),this.metaService=p(Z),this.pageLevelMetaService=p(Se),this.breakpointObserver=p($),this.siteSettingsService=p(w),this.content=x.required(),this.pageContent=c(()=>this.content().page.content),this.hits=this.algoliaService.hits,this.validColors=c(()=>this.hits().map(G.toColorInfoValid)),this.hitsPerPage=this.algoliaService.hitsPerPage,this.currentAlgoliaPage=this.algoliaService.page,this.totalNumberHits=this.algoliaService.totalNumberHits,this.filterGroups=c(()=>this.algoliaService.filterGroups().filter(e=>e.label!==v)),this.filterItemsPerGroup=c(()=>this.siteSettingsService.getNumericSiteSettingValueByKey(M.ColorJourneyColorListFilterItemsPerGroup)??4),this.requestFinished=this.algoliaService.requestFinished,this.selectedFilters=this.algoliaService.selectedFilters,this.query=this.algoliaService.query,this.selectedFiltersNumber=c(()=>this.selectedFilters().length),this.paginatorFirst=c(()=>this.currentAlgoliaPage()*this.hitsPerPage()),this.paginatorRows=c(()=>this.hitsPerPage()),this.pageLinkSizeMatches=te(this.breakpointObserver.observe("(min-width: 768px)").pipe(H(({matches:e})=>e?B.DEFAULT:B.MOBILE))),this.pageLinkSize=c(()=>this.pageLinkSizeMatches()??B.DEFAULT),this.resources=c(()=>({allColors:this.resourceService.getResourceByKey(r.COLOR_LIST_PAGE_ALL_COLORS),results:this.resourceService.getResourceByKey(r.SEARCH_PAGE_RESULTS)+` (${this.totalNumberHits()})`,filters:this.resourceService.getResourceByKey(r.SEARCH_PAGE_FILTERS),searchResultsFor:this.resourceService.getResourceByKey(r.SEARCH_PAGE_RESULTS_FOR),noFiltersSelected:this.resourceService.getResourceByKey(r.SEARCH_PAGE_
1NO_FILTERS_SELECTED),clearAllFilters:this.resourceService.getResourceByKey(r.SEARCH_PAGE_CLEAR_ALL_FILTERS),filtersCount:this.resourceService.getResourceByKey(r.SEARCH_PAGE_CLEAR_TOTAL_COUNT_SELECTED_FILTERS),bestSeller:this.resourceService.getResourceByKey(r.COLOR_DETAILS_BEST_SELLER_TAG),tooManyResults:this.resourceService.getResourceByKey(r.COLOR_LIST_PAGE_TOO_MANY_RESULTS),filterAccordionResources:{seeMore:this.resourceService.getResourceByKey(r.GLOBAL_SEE_MORE),seeLess:this.resourceService.getResourceByKey(r.GLOBAL_SEE_LESS)},filterPopoverResources:{open:this.resourceService.getResourceByKey(r.SEARCH_PAGE_FILTERS),title:this.resourceService.getResourceByKey(r.SEARCH_PAGE_FILTERS),clear:this.resourceService.getResourceByKey(r.SEARCH_PAGE_CLEAR_ALL_FILTERS),seeMore:this.resourceService.getResourceByKey(r.GLOBAL_SEE_MORE),seeLess:this.resourceService.getResourceByKey(r.GLOBAL_SEE_LESS),activeFilters:this.resourceService.getResourceByKey(r.SEARCH_PAGE_ACTIVE_FILTER_S)}})),this.isBestSeller=this.selectedFilters().filter(e=>e.value===this.algoliaService.IS_BEST_SELLER_FILTER).length>0,this.isBestSellerVisible=c(()=>this.algoliaService.filterGroups().filter(e=>e.label===v).length>0),this.selectedFiltersValues=c(()=>this.selectedFilters().filter(({checked:e})=>e).map(({value:e})=>e)),J(()=>{this.colorGtmService.pushColorListGTMTag("view_color_list")})}ngOnInit(){let e=this.pageLevelMetaService.getMetaTags(this.content().page.meta,this.content().page.type);this.metaService.addTags(e)}paginate(e){this.algoliaService.paginate(e)}updateFilters({group:e,filter:o}){this.colorGtmService.pushSelectFilterGTMTag("clp_filter_click",o),this.algoliaService.refineFilters(e,o)}clearFilters(){this.isBestSeller===!0&&(this.isBestSeller=!1),this.algoliaService.clearFilters()}toggleFilterExpansion({group:e,expanded:o}){o&&this.colorGtmService.pushSeeAllGTMTag("color_filter_expand_click",e),this.algoliaService.toggleFilterExpansion(e,o)}onToggleSwitch(e){this.isBestSeller=e,this.isBestSeller?this.algoliaService.refineFilters(v,this.algoliaService.IS_BEST_SELLER_FILTER):this.algoliaService.clearIsBestSellerFilter(this.algoliaService.IS_BEST_SELLER_FILTER)}onColorDetailsLinkClicked(e){this.colorGtmService.pushColorDetailsGTMTag("select_color",e)}onFavoriteColorAdded(e){this.colorGtmService.addColorToFavoritesGTMtag(e,V.ColorListPage)}onFavoriteColorRemoved(e){this.colorGtmService.removeColorFromFavoritesGTMtag(e,V.ColorListPage)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=L({type:t,selectors:[["ppg-color-list-page"]],inputs:{content:[1,"content"]},decls:23,vars:22,consts:[["emptyMessageTemplate",""],[1,"section-container"],["data-test-id","colorListPage.mainHeader",1,"mt-0"],["styleClass","hidden xl:block"],[1,"grid"],[1,"flex","flex-column","xl:flex-column","xl:align-items-start","xl:justify-content-start","col-12","xl:col-3","gap-3","xl:gap-1"],["data-test-id","colorListPage.filtersHeader",1,"mb-4","hidden","xl:block"],[1,"clear-filters-button","hidden","xl:block"],[1,"flex","align-items-center","no-filters"],[1,"flex","align-items-center"],[1,"is-best-seller-container"],["data-test-id","colorListPage.filters",1,"w-full"],["data-test-id","colorListPage.filterAccordion",1,"hidden","xl:block",3,"toggleExpansion","selectionChanged","resources","minFiltersCount","filterGroups","seeMoreCap"],["data-test-id","colorListPage.filterPopover",1,"block","xl:hidden",3,"clearSelection","toggleExpansion","selectionChanged","resources","filterGroups","seeMoreCap","selectedFilters"],["data-test-id","colorListPage.tooManyResultsMessage",3,"message"],[1,"col-12","py-0","block","xl:hidden"],[1,"col-12","xl:col-9"],[1,"w-full",3,"pageChange","colorDetailsLinkClicked","favoriteColorAdded","favoriteColorRemoved","colors","title","gridItemStyleClass","first","rows","total","automaticPagination","pageLinkSize"],[3,"message"],[1,"pi","pi-exclamation-circle"],["data-test-id","colorListPage.noFiltersText",1,"filters-title-container"],["name","clearFilters","data-test-id","colorListPage.clearAllFiltersButton",1,"flex","align-items-center","clear-filters-button",3,"onClick","text","styleClass"],[1,"pds-icon"],["href","assets/pds-icons.svg#cancel-circle-outline"],["data-test-id","colorListPage.clearAllFiltersText",1,"filters-title-container"],[1,"align-items-center"],[1,"flex","justify-content-center","align-items-center"],["styleClass","flex",3,"ngModelChange","onChange","ngModel"]],template:function(o,i){if(o&1){let l=P();n(0,"section",1)(1,"h1",2),E(2,Be,1,2)(3,we,1,1),a(),_(4,"p-divider",3),n(5,"div",4)(6,"div",5)(7,"h2",6),C(8),a(),n(9,"div",7),E(10,Oe,4,1,"div",8)(11,Ge,6,4,"div",9),a(),E(12,be,5,2,"div",10),n(13,"div",11)(14,"ppg-filter-accordion",12),y("toggleExpansion",function(d){return g(l),u(i.toggleFilterExpansion(d))})("selectionChanged",function(d){return g(l),u(i.updateFilters(d))}),a(),n(15,"ppg-filter-popover",13),y("clearSelection",function(){return g(l),u(i.clearFilters())})("toggleExpansion",function(d){return g(l),u(i.toggleFilterExpansion(d))})("selectionChanged",function(d){return g(l),u(i.updateFilters(d))}
1),a()(),E(16,Ve,1,1,"ppg-post-results-card",14),a(),_(17,"p-divider",15),n(18,"div",16)(19,"ppg-colors-grid",17),y("pageChange",function(d){return g(l),u(i.paginate(d))})("colorDetailsLinkClicked",function(d){return g(l),u(i.onColorDetailsLinkClicked(d))})("favoriteColorAdded",function(d){return g(l),u(i.onFavoriteColorAdded(d))})("favoriteColorRemoved",function(d){return g(l),u(i.onFavoriteColorRemoved(d))}),E(20,ke,1,0,"ng-template",null,0,Q),a(),_(22,"ppg-post-results-card",18),a()()()}if(o&2){let l;s(2),T(i.query()?2:3),s(6),A(" ",i.resources().filters," "),s(2),T(i.selectedFiltersNumber()?11:10),s(2),T(i.isBestSellerVisible()?12:-1),s(2),S("resources",i.resources().filterAccordionResources)("minFiltersCount",i.minColorFiltersCount)("filterGroups",i.filterGroups())("seeMoreCap",i.filterItemsPerGroup()),s(),S("resources",i.resources().filterPopoverResources)("filterGroups",i.filterGroups())("seeMoreCap",i.filterItemsPerGroup())("selectedFilters",i.selectedFiltersValues()),s(),T(i.totalNumberHits()>i.maxNumberOfHitsToDisplay?16:-1),s(3),S("colors",i.validColors())("title",i.resources().results)("gridItemStyleClass","flex md:block p-2 w-full md:w-6 xl:w-4 xl:w-4 md:col-6 xl:col-4 xl:col-4")("first",i.paginatorFirst())("rows",i.paginatorRows())("total",i.totalNumberHits())("automaticPagination",!1)("pageLinkSize",i.pageLinkSize()),s(3),S("message",(l=i.pageContent().additionalInformation)!==null&&l!==void 0?l:"")}},dependencies:[O,pe,ce,ae,ne,Re,Te,ue,he,Ce,fe,Ee,Le,se,oe,re],styles:[`.grid>[class*=col-]{padding:.75rem}.no-filters{gap:var(--p-pds-unit-100)}.no-filters i,.no-filters .filters-title-container{color:var(--p-pds-on-surface-neutral-medium, #6b7886)}.no-filters .pi{font-size:18px}.filters-title-container{font-family:var(--p-pds-typography-body-body-family);font-size:var(--p-pds-typography-body-medium-size);line-height:var(--p-pds-typography-body-medium-line-height);text-align:left;text-underline-position:from-font;text-decoration-skip-ink:none}.clear-filters-button .p-button-text{gap:var(--p-pds-unit-100)}.clear-filters-button .p-button-text .filters-title-container{color:var(--p-pds-on-surface-primary-medium, #f16c00)}.clear-filters-button .p-button-text svg{fill:var(--p-pds-surface-primary-medium, #f16c00);width:20px;height:20px}.is-best-seller-container{justify-content:flex-start;display:inline-flex;gap:var(--p-pds-unit-200)}:host ::ng-deep ppg-color-list-empty .color-list-empty-message{margin-top:var(--p-pds-unit-800, 32px)} 2`],encapsulation:2,changeDetection:0})}}return t})();export{ye as AlgoliaColorDataService,qt as ColorListPageComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.