1"use strict";(self.webpackChunk_lux2_ssr_catalogue_sfcc=self.webpackChunk_lux2_ssr_catalogue_sfcc||[]).push([["4748"],{25943:function(e,t,a){a.r(t);var r=a(41594),l=a.n(r),i=a(46975),n=a(97990),c=a(7887),s=a(29948),o=a(31297),u=a(310),d=a(54386),m=a(69904),f=a(10361),p=a(30871);t.default=({deviceListingId:e,id:t,heading:a,options:w,swatchStyle:b,presetIdMap:h,filters:E,onChange:k})=>{let[g,C]=(0,r.useState)(""),v=Object.fromEntries(new URLSearchParams(window.location.search).entries());delete v[f.xC];let S=(0,o.j)(),_=(0,o.G)((0,u.pP)(e));(0,r.useEffect)(()=>{0===_&&""!==g&&C("")},[_,g]);let j=(0,r.useMemo)(()=>Object.fromEntries(Object.entries(h).map(([e,t])=>[t,e])),[h]),y=(0,r.useCallback)(()=>E.reduce((e,{id:t,multiSelect:a})=>({...e,[t]:a?[]:""}),{}),[E]),O=(0,r.useCallback)(e=>{let t=Object.fromEntries(new URL(e,window.location.origin).searchParams.entries()),a=e=>JSON.stringify(e,Object.keys(e).sort((e,t)=>e.localeCompare(t))).toLowerCase();return a(t)===a(v)},[v]),L=(0,r.useCallback)((a,r)=>{let l=new URL(window.location.href).pathname,i=new URL(a,window.location.origin);if(l!==i.pathname)return void window.location.assign(a);let{filterSelections:n,filterValues:c}=Array.from(i.searchParams).reduce((e,[t,a])=>{let r=j[t];if(r){e.filterSelections[r]={};let t=a.split(",");e.filterValues[r]=t,t.forEach(t=>{e.filterSelections[r][t]={id:r,value:t,label:t}})}return e},{filterSelections:{},filterValues:y()});S((0,m.oX)({id:e,filterSelections:n})),k({id:t,label:r,className:s.sL,targetUrl:i.href,values:[],valuesObject:c,type:p.x.ApplyMultiple})},[t,y,e,S,k,j]);return l().createElement(d.zW,{role:"radiogroup","data-testid":"device-filter-collections",style:{"--radio-group-border-radius":`var(--bm-${c[b]})`}},a&&l().createElement(d.DZ,null,a),l().createElement("div",{className:"swiper-radio-wrapper"},l().createElement(n.Swiper,{...f.bG,injectStyles:[d.en]},w.map(({label:e,value:r,image:c},s)=>{let o=g===r||O(r);return l().createElement(n.SwiperSlide,{"data-testid":"radio-button-container",key:`device-collection-option-${t}-${s}-${o}`,className:"ProductRadioButton__RadioBtn"},l().createElement(i.A,{radioBtnClassName:`radio-button${o?" checked":""}`,name:t,value:r,disabled:!1,checked:o,onChange:t=>{C(t),L(t,e)},ariaLabel:`${a} ${e}`,focusOnChecked:!0},c&&l().createElement("img",{src:c,alt:e}),l().createElement("span",{"aria-hidden":"true"},e)))}))))}}}]);
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.