PageSourceSearch

https://www.signify.com.cn/etc.clientlibs/signify-brand-signify-mu…-category.f53dbfd0dfee2cdf186a.chunk.min.js

js signify.com.cn collected 2026-10-07 00:07:22 UTC 8,695 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_signify_signify_multibrand=self.webpackChunk_signify_signify_multibrand||[]).push([[9977],{41523:function(t,e,i){i.r(e),i.d(e,{default:function(){return w}});var s,a,r,l=i(42548),o=i(25136),n=i(5467),c=i(69010),d=i(57379),g=i(93938),h=i(33401),_=i(3040),C=i(73807),y=i(88743);!function(t){t.NAME_SPACE="ssrMainCategory"}(s||(s={})),function(t){t.SET_MAIN_CATEGORY="setMainCategory",t.SET_ROOT_CATEGORY_CODES="setRootCategoryCodes",t.SET_AVAILABLE_FILTERS_LIST="setAvailableFiltersList",t.SET_ALL_FILTERS="setAllFilters"}(a||(a={})),function(t){t.SSR_STORE_INIT="ssrStoreInit",t.SET_MAIN_CATEGORY="setMainCategory",t.SET_ROOT_CATEGORY_CODES="setRootCategoryCodes",t.SET_AVAILABLE_FILTERS_LIST="setAvailableFiltersList",t.SET_ALL_FILTERS="setAllFilters"}(r||(r={}));var f=i(5364),F=i(11555),u=i(87769),m=i(85623),S=function(t,e,i,s){var a,r=arguments.length,l=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(l=(r<3?a(l):r>3?a(e,i,l):a(e,i))||l);return r>3&&l&&Object.defineProperty(e,i,l),l};const A=(0,y.MF)(s.NAME_SPACE),p=A.State,T=A.Action,E="filter";let L=class extends((0,o.mixins)(n.A,d.A,c.A)){constructor(){super(...arguments),this.globalIconPath=this.config.global?.paths.icons,this.iconName=_.$M,this.iconSize=_.lK,this.translation=this.config.translations??{clearAll:"Reset filters"},this.isLoading=!1,this.selectedFilters={},this.filterParams="",this.currentSearch="",this.hydrated=!1}get title(){return this.mainCategory?.name??""}get description(){return this.mainCategory?.description??""}get hasFilters(){return this.allFilters.length>0}get hasSelectedFilters(){return Object.keys(this.selectedFilters).length>0}async serverPrefetch(){this.setSelectedFilters(),await this.loadMainCategory()}async mounted(){(new URLSearchParams(window.location.search).has("filter")||0===Object.keys(this.mainCategory).length)&&(this.isLoading=!0,this.setSelectedFilters(),await this.loadMainCategory(),this.isLoading=!1),this.hydrated=!0}get filteredChildCategories(){if(!this.mainCategory?.childCategories||Array.isArray(this.rootCategoryCodes)&&0===this.rootCategoryCodes?.length)return[];const t=new Set(this.rootCategoryCodes);return this.mainCategory.childCategories.filter(e=>t.has(e.code)).sort((t,e)=>Number.parseInt(t.rank)-Number.parseInt(e.rank))}getUrl(t,e){const i=`${this.config.baseUrl}${this.config.productCatalogContextPath}${t.seoURL}/${t.code}/category`;return h.G.getUrlWithCurrentParams(i,e)}getImageUrl(t){return`${t.imageURL}?hei=180&qlt=82`}async clearAllFilters(){this.selectedFilters={},this.filterParams="",this.buildFilterUrlParams(),await this.loadMainCategory()}async toggleFilter({filterId:t,filterKey:e,checked:i}){await this.handleToggleCheckboxFilter(t,e,i)}async handleToggleCheckboxFilter(t,e,i){if(this.selectedFilters[t]||l.lD.set(this.selectedFilters,t,[]),i)this.selectedFilters[t].push(e.id);else{const i=this.selectedFilters[t].indexOf(e.id);this.selectedFilters[t].splice(i,1)}0===this.selectedFilters[t].length&&l.lD.delete(this.selectedFilters,t),this.filterParams=this.getFilterParams(),this.buildFilterUrlParams(),await this.loadMainCategory()}getFilterParams(){const t=Object.values(this.selectedFilters),e=t.map(t=>`filter_keys:${t.join(";")}:ALL`);return t.length>0?e.join(","):""}async loadMainCategory(){try{const t=await g.J.fetchProductsSSR(this.config.productFacetUrl,g.J.getParameters(this.getFilters(this.config.mainCategoryCode),h.G.prepareRequest(),this.categoryFacet)),e=this.config.filterKeys??[];if(e?.length>0&&0===this.allFilters.length){const i=t.dataEnrichment?.filtersData?.filter(t=>e.includes(t.id))??[];await this.setAllFilters({allFilters:i});const s=t.facets.filter_keys?.[0]?.data??[];await this.setAvailableFiltersList({availableFiltersList:s})}const i=[...g.J.getRootCategoryCodes(t)],s=t.dataEnrichment.categorizationData.find(t=>t.code===this.config.mainCategoryCode)??null;await this.setRootCategoryCodes({rootCategoryCodes:i}),await this.setMainCategory({mainCategory:s})}catch(t){m.A.warn("Error fetching Category:",t)}}setSelectedFilters(){let t=null;if(this.isBrowser){const e=new URLSearchParams(window.location.search);this.currentSearch=window.location.search,t=e.get(E)}if(t){const e={};for(const i of t.split(";")){const[t,s]=i.split(":");e[t]=s.split(",")}this.selectedFilters=e,this.filterParams=this.getFilterParams()}}
1buildFilterUrlParams(){if(this.isBrowser){const t=window.location.href,e=new URL(t);if(Object.keys(this.selectedFilters).length>0){const t=[];for(const e of Object.keys(this.selectedFilters))t.push(`${e}:${this.selectedFilters[e].join(",")}`);e.searchParams.set(E,t.join(";"))}else e.searchParams.delete(E);window.history.replaceState(null,"",e)}}};S([(0,l.kv)({required:!0})],L.prototype,"config",void 0),S([(0,l.ku)()],L.prototype,"globalIconPath",void 0),S([p],L.prototype,"mainCategory",void 0),S([p],L.prototype,"rootCategoryCodes",void 0),S([p],L.prototype,"allFilters",void 0),S([p],L.prototype,"availableFiltersList",void 0),S([T(a.SET_MAIN_CATEGORY)],L.prototype,"setMainCategory",void 0),S([T(a.SET_ROOT_CATEGORY_CODES)],L.prototype,"setRootCategoryCodes",void 0),S([T(a.SET_ALL_FILTERS)],L.prototype,"setAllFilters",void 0),S([T(a.SET_AVAILABLE_FILTERS_LIST)],L.prototype,"setAvailableFiltersList",void 0),S([(0,l.ku)()],L.prototype,"translation",void 0),L=S([(0,l.uA)({name:"main-category",components:{ProductFilterTags:u.A,FilterGroup:F.A,FilterDropdown:f.A,Icon:C.A}})],L);var b=L,R=(0,i(22881).A)(b,function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",t._b({staticClass:"main-category",attrs:{"data-cmp-name":"main-category"}},"div",[t.ssrAttributes,t.analyticsAttributes],!1),[t.isLoading?e("div",{staticClass:"product-catalog-container__loader"},[e("Icon",{attrs:{"icon-name":t.iconName.loader,"icon-size":t.iconSize.none}})],1):t._e(),t._v(" "),e("section",{staticClass:"main-category-container"},[e("div",{staticClass:"main-category-container__main"},[e("div",{staticClass:"main-category-container__header"},[e("h1",{staticClass:"category-title heading-1"},[t._v(t._s(t.title))]),t._v(" "),e("p",{staticClass:"seo-text body-copy-1"},[t._v(t._s(t.description))])]),t._v(" "),t.hasFilters?[e("div",{staticClass:"product-filter__container product-catalog-container__filter"},[t._l(t.allFilters,function(i){return[e("FilterDropdown",{key:i.id,attrs:{label:i.displayName}},[e("FilterGroup",t._g({attrs:{filters:i.filterKeys,"available-filters":t.availableFilters,"filter-type":i.displayType,"selected-filters":t.selectedFilters},on:{checkboxFilterChanged:(e,s)=>t.handleToggleCheckboxFilter(i.id,e,s),checkboxFilterRemoved:e=>t.handleToggleCheckboxFilter(i.id,e,!1)}},t.$listeners))],1)]})],2),t._v(" "),t.hasSelectedFilters?e("ProductFilterTags",{attrs:{filters:t.allFilters,"selected-filters":t.selectedFilters,"with-icon":!0},on:{onToggleCheckboxFilter:t.toggleFilter,"clear-all":t.clearAllFilters}}):t._e()]:t._e(),t._v(" "),t.hydrated&&t.filteredChildCategories.length>0?e("div",{staticClass:"sub-category-card"},t._l(t.filteredChildCategories,function(i){return e("a",{key:i.code,staticClass:"sub-category-item sub-category-item__link",attrs:{href:t.getUrl(i,t.currentSearch)}},[e("span",{staticClass:"sub-category-item__image-container"},[e("img",{staticClass:"sub-category-item__image",attrs:{src:t.getImageUrl(i),alt:i.name,loading:"lazy"}})]),t._v(" "),e("span",{staticClass:"sub-category-item__product"},[e("h2",{staticClass:"sub-category-item__product-name heading-5"},[t._v("\n                            "+t._s(i.name)+"\n                        ")])])])}),0):0===t.filteredChildCategories.length?e("p",{staticClass:"body-copy-1"},[t._v(t._s(t.config.noResultsTranslation??"No subcategories available."))]):t._e()],2)])])},[],!1,null,null,null).exports;const v={[a.SET_MAIN_CATEGORY]({commit:t},e){t(r.SET_MAIN_CATEGORY,e.mainCategory)},[a.SET_ALL_FILTERS]({commit:t},e){t(r.SET_ALL_FILTERS,e.allFilters)},[a.SET_AVAILABLE_FILTERS_LIST]({commit:t},e){t(r.SET_AVAILABLE_FILTERS_LIST,e.availableFiltersList)},[a.SET_ROOT_CATEGORY_CODES]({commit:t},e){t(r.SET_ROOT_CATEGORY_CODES,e.rootCategoryCodes)}},I={[r.SSR_STORE_INIT](t,e){Object.assign(t,e)},[r.SET_MAIN_CATEGORY](t,e){t.mainCategory=e},[r.SET_ALL_FILTERS](t,e){t.allFilters=e},[r.SET_AVAILABLE_FILTERS_LIST](t,e){t.availableFiltersList=e},[r.SET_ROOT_CATEGORY_CODES](t,e){t.rootCategoryCodes=e}},O={name:s.NAME_SPACE,module:{state:()=>({mainCategory:{},rootCategoryCodes:[],allFilters:[],availableFiltersList:[]}),actions:v,mutations:I}};var w={getComponentDefinition:()=>R,getStoreDefinitions:()=>[O]}}}]);

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.