PageSourceSearch

https://us.spradling.group/_next/static/chunks/app/%5Blocale%5D/products/page-585bcb676c286d78.js

js spradling.group collected 2026-10-08 03:06:49 UTC 96,412 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4358],{7680:(e,t,l)=>{"use strict";l.d(t,{A:()=>n});var r=l(95155),i=l(52596),a=l(12115);let n=a.memo(e=>{let{onSearch:t,onClear:l,placeholder:n="Search products",className:s,value:o,debounceMs:u=0,onDebouncingChange:c}=e,[d,m]=(0,a.useState)(""),b=(0,a.useRef)(null),p=(0,a.useRef)(t),y=(0,a.useRef)(l),h=(0,a.useRef)(c);(0,a.useEffect)(()=>{p.current=t},[t]),(0,a.useEffect)(()=>{y.current=l},[l]),(0,a.useEffect)(()=>{h.current=c},[c]);let f=(0,a.useCallback)(e=>{var t;null==(t=h.current)||t.call(h,e)},[]),g=(0,a.useCallback)(e=>{var t;p.current(e),""===(null!=e?e:"").trim()&&(null==(t=y.current)||t.call(y))},[]),v=(0,a.useCallback)(()=>{b.current&&(window.clearTimeout(b.current),b.current=null,f(!1)),g(d)},[d,f,g]),x=(0,a.useCallback)(e=>{let t=e.target.value;if(m(t),""===t){var l;null==(l=y.current)||l.call(y),u>0&&(b.current&&window.clearTimeout(b.current),b.current=null,f(!1),p.current(""));return}u&&!(u<=0)&&(b.current&&window.clearTimeout(b.current),f(!0),b.current=window.setTimeout(()=>{g(t),f(!1),b.current=null},u))},[u,f,g]),S=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),v())},[v]),A=(0,a.useCallback)(()=>{var e;m(""),null==(e=y.current)||e.call(y)},[]);return(0,a.useEffect)(()=>{"string"==typeof o&&m(o)},[o]),(0,a.useEffect)(()=>()=>{var e;b.current&&window.clearTimeout(b.current),null==(e=h.current)||e.call(h,!1)},[]),(0,r.jsxs)("div",{className:(0,i.A)("flex items-center border-b border-(--gray-60) px-2 w-full overflow-hidden whitespace-nowrap text-ellipsis",s),children:[(0,r.jsx)("div",{className:"mr-2 text-gray-500",children:(0,r.jsx)("i",{className:"icon-search cursor-pointer",onClick:v})}),(0,r.jsx)("input",{type:"text",className:"flex-grow border-none py-1 text-base text-(--gray-70) font-light focus:outline-none w-6/12",placeholder:n,value:d,onChange:x,onKeyDown:S}),d&&(0,r.jsx)("div",{className:"ml-3 text-gray-500",children:(0,r.jsx)("i",{className:"icon-close cursor-pointer",onClick:A})})]})})},10102:(e,t,l)=>{"use strict";function r(e){if("undefined"==typeof document)return null;let t="; ".concat(document.cookie).split("; ".concat(e,"="));return 2===t.length?decodeURIComponent(t.pop().split(";").shift()||""):null}l.d(t,{R:()=>r})},23551:(e,t,l)=>{"use strict";l.d(t,{A:()=>u});var r=l(95155),i=l(52596),a=l(12115);let n=e=>String(null!=e?e:"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^a-z0-9-_]/g,""),s=()=>{},o=e=>{e.stopPropagation()},u=a.memo(e=>{let{name:t,checked:l,quantity:u,type:c="",item:d,className:m="",labelClassName:b="truncate",onClick:p=s}=e,y=(0,a.useMemo)(()=>{var e,l;let r=null!=(l=null!=(e=null==d?void 0:d.value)?e:null==d?void 0:d.id)?l:t;return"check-".concat(n(r),"-").concat(n(t))},[null==d?void 0:d.value,null==d?void 0:d.id,t]),h=(0,a.useCallback)(e=>{e.stopPropagation(),p(e)},[p]),f=(0,a.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),p(e)},[p]);return(0,r.jsx)("div",{className:(0,i.A)("flex justify-between items-center gap-1",m.length>0&&m),children:(0,r.jsxs)("label",{className:"cursor-pointer text-sm justify-between items-center flex w-full",htmlFor:y,onClick:f,children:[(0,r.jsxs)("span",{className:"flex-1 flex items-center min-w-0",children:["colors"===c&&(0,r.jsx)("div",{className:(0,i.A)("w-[20px] h-[20px] rounded-[30px] flex items-center justify-center mr-2 ",{"border border-(--gray-40)":(null==d?void 0:d.value)==="WHITE"}),style:{background:(null==d?void 0:d.value)==="BURGUNDY"?"#800020":(e=>{var t;return e.startsWith("#")||e.startsWith("rgb")?e:null!=(t=({BURGUNDY:"#800020",RED_BURGUNDY:"#800020",WHITE:"#ffffff",BEIGE:"#c0ae92",NEUTRAL_BEIGE:"#c0ae92",TEAL:"#008080",ULTRA_VIOLET:"#48305d"})[e])?t:e.toLowerCase()})(null==d?void 0:d.value)}}),(0,r.jsx)("p",{className:(0,i.A)("mb-0 text-(--spg-primary) text-sm",b),children:t})]}),(0===u||!!u)&&(0,r.jsxs)("span",{className:"overflow-hidden text-nowrap mr-2 text-(--gray-40) font-extralight",children:["(",u,")"]}),(0,r.jsx)("input",{className:"border-2 border-black accent-(--input-checked-bg)",type:"checkbox",checked:l,id:y,onChange:h,onClick:o})]})})})},24552:(e,t,l)=>{Promise.resolve().then(l.bind(l,94257))},30408:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});let r=(0,l(12115).createContext)(void 0)},32348:(e,t,l)=>{"use strict";l.d(t,{d:()=>i});var r=l(12115);function i(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],[i,a]=(0,r.useState)(e),n=(0,r.useRef)(!1);return(0,r.useEffect)(()=>
1{if(l&&!n.current){n.current=!0,a(e);return}let r=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(r)}},[e,t,l]),i}},37207:(e,t,l)=>{"use strict";l.d(t,{A:()=>m});var r=l(95155),i=l(52596),a=l(12115),n=l(81167),s=l(62304),o=l(79960),u=l(47650);let c=e=>{let{children:t,containerId:l}=e,[r,i]=(0,a.useState)(!1);(0,a.useEffect)(()=>(i(!0),()=>i(!1)),[]);let n=document.getElementById(l);return r&&n?(0,u.createPortal)(t,n):null};var d=l(57718);let m=e=>{let{isOpen:t,isRounded:l,roundedClassName:u,onClose:m,children:b,header:p,footer:y,showHeaderOn:h="both",showFooterOn:f="both",desktopPosition:g="center",mobilePosition:v=g,isFullWidth:x=!1,shouldCoverHeader:S=!0,hideOnCloseIcon:A=!1,disableBackdropClose:w=!1,className:I,maxWidthClassName:j,maxHeightClassName:N,isScrollableY:k}=e,[C,E]=(0,a.useState)(null),T=(0,n.A)("(max-width: 1023px)");if(!t)return null;let _="never"!==h&&"both"===h||"mobile"===h&&T||"desktop"===h&&!T,R="both"===f||"mobile"===f&&T||"desktop"===f&&!T,F=T?(0,i.A)("w-full",null!=N?N:"max-h-[90vh]"):(0,i.A)("w-full",null!=j?j:x?"max-w-[1200px]":"max-w-[950px]",null!=N?N:"max-h-[90vh]"),P=S?"mt-0":T?"mt-[180px]":"mt-[0px]";return(0,r.jsx)(c,{containerId:"portal-root",children:(0,r.jsx)("dialog",{role:"dialog","aria-modal":"true",className:(0,i.A)("fixed top-0 left-0 w-full h-full bg-black/50 z-[2147483647] flex transition-opacity",T?(()=>{switch(v){case"center":default:return"items-center justify-center";case"bottom":return"items-end justify-center";case"right":return"items-center justify-end"}})():(()=>{switch(g){case"center":default:return"justify-center items-center";case"right":return"justify-end items-center";case"bottom":return"justify-center items-end"}})(),I),onClick:w?void 0:m,children:(0,r.jsxs)("div",{className:(0,i.A)("bg-white shadow-lg relative flex flex-col max-w-[95%] overflow-hidden",u||(l?"rounded-".concat(l):void 0),F,P,{"rounded-b-[0px]":"bottom"===g||"bottom"===v}),onClick:e=>e.stopPropagation(),children:[!A&&(0,r.jsx)(o.$n,{onClick:m,design:s.A.LINK_GREEN_BIG,className:"absolute top-4 right-4 lg:top-6 lg:right-6 z-10",children:(0,r.jsx)(o.a2,{className:"icon-close"})}),_&&p&&(0,r.jsx)("div",{className:"flex items-center justify-end border-b border-(--gray-20) px-5 py-4",children:(0,r.jsx)("p",{})}),(0,r.jsx)(d.Z,{hasFooter:R,onSetFooterContent:E,children:(0,r.jsx)("div",{id:"modal-content",className:(0,i.A)("custom-global-modal flex-1 min-h-0 w-full md:my-4 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-thumb]:rounded-full",k?"overflow-y-auto overscroll-contain [-webkit-overflow-scrolling:touch]":"overflow-visible"),children:b})}),R&&(0,r.jsx)("div",{id:"modal-footer",className:"border-t border-(--gray-20) px-4 py-2 md:py-4 bg-white shrink-0 sticky bottom-0",children:y||C})]})})})}},37662:(e,t,l)=>{"use strict";l.d(t,{N:()=>o});var r=l(12115),i=l(95176);function a(e){return e?e.split(",")[0].trim().split(":")[0].replace(/^www\./i,""):""}function n(e){return!!e&&/\.eu$/i.test(a(e))}let s=["dev","qa","staging","test","local"];function o(e){let t=(0,r.useMemo)(()=>{if(e)return e;let t=function(e){if(!e)return"us";if(n(e))return"eu";let t=a(e).split(".")[0].toLowerCase();return["lat","mx","us","eu"].includes(t)?t:"us"}(function(e){if(n(e))return"eu";let t=a(e).split(".");if(t.length<2)return"";let l=t[0].toLowerCase();if(s.includes(l)){var r;return(null==(r=t[1])?void 0:r.toLowerCase())||""}return l}(window.location.hostname));return t in i.Qx?t:"us"},[e]),l=(0,r.useMemo)(()=>i.Qx[t],[t]);return{instance:t,config:l}}},37681:(e,t,l)=>{"use strict";l.d(t,{Ay:()=>u});var r=l(95155),i=l(52596),a=l(12115),n=l(35695),s=l(30408);function o(e){let{children:t,className:l="",hoverEnabled:o=!1,showAsAPopup:u=!1,customContext:c=!1,align:d}=e,[m,b]=(0,a.useState)(!1),p=(0,a.useRef)(null),y=(0,a.useRef)(null),h=(0,n.usePathname)(),f=(0,n.useSearchParams)(),g=null==f?void 0:f.toString(),v=(0,a.useCallback)(()=>b(e=>!e),[]),x=(0,a.useCallback)(()=>b(!0),[]),S=(0,a.useCallback)(()=>b(!1),[]),A=(0,a.useCallback)(()=>{o&&x()},[o,x]),w=(0,a.useCallback)(()=>{o&&S()},[o,S]);(0,a.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&S()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[S]),(0,a.useEffect)(()=>{b(!1)},[h,g]);let I=(0,a.useMemo)(()=>({visible:m,toggle:v,open:x,close:S,isPopup:u,toggleRef:y}),[m,v,x,S,u]);return c?(0,r.jsx)("div",{role:"select",className:(0,i.A)({[l]:l.length>0}),onMouseEnter:A,onMouseLeave:w,children:t}):(0,r.jsx)(s.A.Provider,{value:I,children:(0,r.jsx)("div",{ref:p,role:"select",className:(0,i.A)({relative:u,[l]:l.length>0}),onMouseEnter:A,onMouseLeave:w,children:t})})}o.Toggle=function(e){let{children:t,className:l="",hoverEnabled:n=!1,onClick:o}=e,u=(0,a.useContext)(s.A);return(0,r.jsx)("div",{ref:null==u?void 0:u.toggleRef,className:(0,i.A)({"group w-full text-left relative":!0,[l]:l.length>0,"is-opened":null==u?void 0:u.visible}),onClick:e=>{n||(o?o(e):(e.stopPropagation(),e.preventDefault()),null==u||u.toggle(
1))},"data-dropdown-btn":!0,children:t})},o.Menu=function(e){let{children:t,className:l="",align:n="left"}=e,o=(0,a.useContext)(s.A),[u,c]=(0,a.useState)({});return(0,a.useLayoutEffect)(()=>{if(!(null==o?void 0:o.isPopup)||!(null==o?void 0:o.visible)||"auto"!==n)return void c({});let e=requestAnimationFrame(()=>{var e,t;let l=null==(t=o.toggleRef)||null==(e=t.current)?void 0:e.getBoundingClientRect();l&&c({position:"fixed",top:l.bottom+20,right:30})});return()=>cancelAnimationFrame(e)},[null==o?void 0:o.visible,n,null==o?void 0:o.isPopup,null==o?void 0:o.toggleRef]),(0,r.jsx)("div",{role:"listbox",className:(0,i.A)("\n        min-w-[160px]\n        bg-white\n        py-2\n        border border-(--gray-10)\n        z-[9999]\n        ",{hidden:!(null==o?void 0:o.visible),"absolute top-full mt-2 left-0":(null==o?void 0:o.isPopup)&&"left"===n,"relative w-full mt-0":!(null==o?void 0:o.isPopup),[l]:l.length>0}),style:u,children:t})},o.Item=function(e){let{children:t,className:l="",onClick:a=()=>{},wrapTextDesktop:n=!1,lang:s}=e;return(0,r.jsx)("div",{"data-dropdown-item":!0,lang:n?s:void 0,onClick:e=>{a(e)},className:(0,i.A)("bg-white hover:bg-(--aqua-00) text-(--black) px-[24px] text-base/5 py-[6px] whitespace-nowrap",{"md:whitespace-normal md:break-words md:hyphens-auto md:line-clamp-2":n,[l]:l.length>0}),children:t})};let u=o},50558:(e,t,l)=>{"use strict";l.d(t,{default:()=>u});var r=l(95155),i=l(12115),a=l(35695),n=l(17652),s=l(46453),o=l(96384);let u=i.memo(e=>{let{pathLabelMap:t={},excludePatterns:l=[],segmentToLabel:u}=e,c=(0,n.c3)("Breadcrumbs"),d=(0,a.usePathname)(),[m,b]=(0,i.useState)([]),p=(0,s.Ym)(),y=e=>l.some(t=>t===e),h=e=>""!==e&&e!==p&&!y(e);return(0,i.useEffect)(()=>{if(d){let e=d.split("/").filter(h),l=[{label:c("home"),href:"/"}],r="/";if(e.forEach(e=>{let i,a=(r+="".concat(e,"/")).slice(0,-1),n=t[a];i=n||c(e.charAt(0).toUpperCase()+e.slice(1)),l.push({label:i,href:a})}),u&&e.length>0){let t=u(e[e.length-1]);t&&l.push({label:t,href:d})}b(l.filter(e=>e.href!=="/".concat(p)))}else b([{label:c("home"),href:"/"}])},[d,u]),(0,r.jsx)("nav",{"aria-label":"breadcrumb",children:(0,r.jsx)("ol",{className:"flex gap-1 flex-wrap",children:m.map((e,t)=>(0,r.jsx)("li",{className:"",children:t<m.length-1?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{path:e.href,className:"text-(--gray-70) text-sm truncate",children:e.label}),(0,r.jsx)("i",{className:"icon-chevron-right text-(--gray-50) ml-1 text-base top-0.5 relative"})]}):(0,r.jsx)("span",{className:"text-sm text-(--aqua-medium) font-medium underline underline-offset-2 truncate text-wrap",children:e.label})},t))})})})},57718:(e,t,l)=>{"use strict";l.d(t,{Z:()=>n,k:()=>s});var r=l(95155),i=l(12115);let a=(0,i.createContext)(void 0),n=e=>{let{hasFooter:t,children:l,onSetFooterContent:i}=e;return(0,r.jsx)(a.Provider,{value:{hasFooter:t,setFooterContent:i},children:l})},s=()=>{let e=(0,i.useContext)(a);if(!e)throw Error("useModalContext debe usarse dentro de un ModalProvider");return e}},81167:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var r=l(12115);let i=e=>{let[t,l]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=window.matchMedia(e),r=()=>l(t.matches);return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}},82207:(e,t,l)=>{"use strict";l.d(t,{o:()=>a});var r=l(46453);let i=e=>e.split("-")[0].toLowerCase(),a=()=>i((0,r.Ym)())},86545:(e,t,l)=>{"use strict";l.d(t,{e:()=>f,j:()=>h});var r=l(12115),i=l(35695),a=l(86552),n=l(37662);let s={search:"q",color:"color",design:"design",composition:"comp",sustainability:"sustain",flammability:"flame",topcoat:"topcoat",warranty:"warrantyId",otherAttr:"attr",sectorId:"sectorId",market:"market",isNew:"isNew",orderBy:"orderBy"},o=new Set(Object.values(s)),u="spradling:product-filters",c=e=>null==e?[]:Array.isArray(e)?e.filter(e=>"string"==typeof e&&e.length>0):"string"==typeof e&&e.length>0?[e]:[],d=(e,t,l)=>l.forEach(l=>e.append(t,l)),m=(e,t,l,r)=>{var i;let a=new URLSearchParams;for(let[e,t]of l.entries())o.has(e)||a.append(e,t);return(null==(i=e.search)?void 0:i.trim())&&a.set(s.search,e.search.trim()),(Array.isArray(e.predominantColor)?e.predominantColor:e.predominantColor?[e.predominantColor]:[]).forEac
1h(e=>(null==e?void 0:e.value)&&a.append(s.color,e.value)),d(a,s.design,c(e.design)),d(a,s.composition,c(e.composition)),d(a,s.sustainability,c(e.sustainability)),d(a,s.flammability,c(e.flammability)),d(a,s.topcoat,c(e.topcoat)),d(a,s.warranty,c(e.warranty)),d(a,s.otherAttr,c(e.otherAttributes)),d(a,s.market,c(e.marketSlugs)),(Array.isArray(e.sectorIds)?e.sectorIds:[]).forEach(e=>(null==e?void 0:e.sectorId)&&a.append(s.sectorId,e.sectorId)),!0===e.isNew&&a.set(s.isNew,"1"),t&&t!==r&&a.set(s.orderBy,t),a},b=(e,t)=>{let l=e.getAll(t);if(l.length)return 1===l.length?l[0]:l},p=e=>{var t;let l={},r=null==(t=e.get(s.search))?void 0:t.trim();r&&(l.search=r);let i=e.getAll(s.color);i.length&&(l.predominantColor=i.map(e=>({value:e,title:e})));let a=b(e,s.design),n=b(e,s.composition),o=b(e,s.sustainability),u=b(e,s.flammability),c=b(e,s.topcoat),d=b(e,s.warranty);a&&(l.design=a),n&&(l.composition=n),o&&(l.sustainability=o),u&&(l.flammability=u),c&&(l.topcoat=c),d&&(l.warranty=d);let m=e.getAll(s.otherAttr),p=e.getAll(s.market);m.length&&(l.otherAttributes=m),p.length&&(l.marketSlugs=p);let y=e.getAll(s.sectorId);return y.length&&(l.sectorIds=y.map(e=>({sectorId:e}))),"1"===e.get(s.isNew)&&(l.isNew=!0),{selectedFilters:l,orderBy:e.get(s.orderBy)}},y=e=>Object.values(e).some(e=>null!=e&&(Array.isArray(e)?e.length>0:"string"!=typeof e||e.trim().length>0));function h(){try{sessionStorage.removeItem(u)}catch(e){}}function f(){let e=(0,i.usePathname)(),t=(0,i.useSearchParams)(),{instance:l}=(0,n.N)(),s="eu"===l?"name":"new_first",o=(0,r.useRef)(!0),c=(0,r.useRef)(e),d=(0,r.useRef)(t),b=(0,r.useRef)(s);(0,r.useEffect)(()=>{c.current=e},[e]),(0,r.useEffect)(()=>{d.current=t},[t]),(0,r.useEffect)(()=>{b.current=s},[s]);let h=(0,r.useCallback)((e,t)=>{var l;let r=m(e,t,d.current,b.current).toString(),i=null!=(l=c.current)?l:"",a=r?"".concat(i,"?").concat(r):i;window.history.replaceState(null,"",a);try{r?sessionStorage.setItem(u,r):sessionStorage.removeItem(u)}catch(e){}},[]);(0,r.useEffect)(()=>{var l;let{selectedFilters:r,orderBy:i}=p(t);if(y(r))a.i.dispatch({type:"SET_SELECTED_FILTERS",payload:r}),i&&a.i.dispatch({type:"SET_ORDER_BY",payload:i});else if(y(null!=(l=a.i.getState().selectedFilters)?l:{})){let e=a.i.getState();h(e.selectedFilters,e.orderBy),e.keepFilters&&a.i.dispatch({type:"SET_KEEP_FILTERS",payload:!1})}else try{let t=sessionStorage.getItem(u);if(t){let l=new URLSearchParams(t),{selectedFilters:r,orderBy:i}=p(l);if(y(r)){a.i.dispatch({type:"SET_SELECTED_FILTERS",payload:r}),i&&a.i.dispatch({type:"SET_ORDER_BY",payload:i});let l=null!=e?e:"";window.history.replaceState(null,"","".concat(l,"?").concat(t))}}}catch(e){}let n=setTimeout(()=>{o.current=!1},0);return()=>clearTimeout(n)},[h]),(0,r.useEffect)(()=>a.i.subscribe((e,t)=>{if(o.current)return;let l=e.selectedFilters!==t.selectedFilters,r=e.orderBy!==t.orderBy;(l||r)&&h(e.selectedFilters,e.orderBy)}),[h])}},94257:(e,t,l)=>{"use strict";l.d(t,{default:()=>tB});var r=l(95155),i=l(86552),a=l(86545),n=l(12115),s=l(50558),o=l(7680);let u={toggleColor:e=>{i.i.dispatch({type:"TOGGLE_COLOR",payload:e})},toggleDesign:e=>{i.i.dispatch({type:"TOGGLE_DESIGN",payload:e})},toggleComposition:e=>{i.i.dispatch({type:"TOGGLE_COMPOSITION",payload:e})},toggleMarketSlugs:e=>{let t=null;null===e?t=null:Array.isArray(e)?0===(t=e.filter(e=>e&&"string"==typeof e).map(e=>e.trim()).filter(e=>e.length>0)).length&&(t=null):"string"==typeof e&&(t=e.trim()?[e.trim()]:null),i.i.dispatch({type:"TOGGLE_MARKET_SLUGS",payload:{marketSlugs:t}})},toggleSustainability:e=>{i.i.dispatch({type:"TOGGLE_SUSTAINABILITY",payload:e})},toggleTopcoat:e=>{i.i.dispatch({type:"TOGGLE_TOPCOAT",payload:e})},toggleWarranty:e=>{i.i.dispatch({type:"TOGGLE_WARRANTY",payload:e})},toggleFlammability:e=>{i.i.dispatch({type:"TOGGLE_FLAMMABILITY",payload:e})},toggleIsNew:e=>{i.i.dispatch({type:"TOGGLE_IS_NEW",payload:e})},toggleSectors:e=>{i.i.dispatch({type:"TOGGLE_SECTORS",payload:{sectorIds:e}})},toggleOtherAttribute:e=>{i.i.dispatch({type:"TOGGLE_OTHER_ATTRIBUTE",payload:e})},setIsNew:e=>{i.i.dispatch({type:"SET_IS_NEW",payload:e})},setSelectedFilters:e=>{i.i.dispatch({type:"SET_SELECTED_FILTERS",payload:e})},resetFilters:()=>{i.i.dispatch({type:"RESET_FILTERS"})},searchProducts:e=>{i.i.dispatch({type:"SET_SEARCH",payload:e})},changePageProducts:e=>{e&&i.i.dispatch({type:"SET_PAGE",payload:e})},setPageSize:e=>{i.i.dispatch({type:"SET_PAGE_SIZE",payload:e})},setOrderBy:e=>{i.i.dispatch({type:"SET_ORDER_BY",payload:e})}},c=()=>u;var d=l(52596),m=l(17652),b=l(79960),p=l(37207);let y={ATTRIBUTES:"attributes",BACKING_PROFILE:"backingProfile",COMPLIANCES:"compliances",CERTIFICATIONS:"certifications",SEALS:"sealsWeContributeTo"},h={sustainabilityBiobasedPvcBioAttributed:{id:"sustainabilityBiobasedPvcBioAttributed",group:y.ATTRIBUTES,filterVar:"sustainabilityBiobasedPvcBioAttributed",facetKey:"sustainability_BiobasedPvcBioAttributed",i18nKey:"biobasedPvcBioAttributed"},cleanFormulations:{id:"cleanFormulations",group:y.ATTRIBUTES,filterVar:"cleanFormulations",facetKey:"cleanFormulations",i18nKey:"cleanFormulations"},lowEmissions:{id:"lowEmissions",group:y.ATTRIBUTES,filterVar:"lowEmissions",facetKey:"lowEmissions",i18nKey:"lowEmissions"},sustainabilityPhthalateFreeProduct:{id:"sustainabilityPhthalateFreeProduct",group:y.ATTRIBUTES,filterVar:"sustainabilityPhthalateFreeProductIn",facetKey:"sustainability_PhthalateFreeProduct_In",i18nKey:"phthalateFreeProduct",value:"16 CFR PART 1307,DIRECTIVA 2005/84/CE"},sustainabilityFrFree:{id:"sustainabilityFrFree",group:y.ATTRIBUTES,filterVar:"sustainabilityFrFreeIn",facetKey:"sustainability_FrFree_In",i18nKey:"frFree",value:"AB-2998"},sustainabilityCytotoxicity:{id:"sustainabilityCytotoxicity",group:y.ATTRIBUTES,filterVar:"sustainabilityCytotoxicityIn",facetKey:"sustainability_Cytotoxicity_In",i18nKey:"cytotoxicity",value:"ISO 10993-5"},sustainabilitySkinSafeSensitization:{id:"sustainabilitySkinSafeSensitization",group:y.ATTRIBUTES,filterVar:"sustainabilitySkinSafeSensitizationIn",facetKey:"sustainability_SkinSafeSensitization_In",i18nKey:"skinSafeSensitization",value:"ISO 10993-10"},sustainabilitySkinSafeIrritation:{id:"sustainabilitySkinSafeIrritation",group:y.ATTRIBUTES,filterVar:"sustainabilitySkinSafeIrritationIn",facetKey:"sustainability_SkinSafeIrritation_In",i18nKey:"skinSafeIrritation",value:"ISO 10993-23"},sustainabilityAntimicrobial:{id:"sustainabilityAntimicrobial",group:y.ATTRIBUTES,filterVar:"sustainabilityAntimicrobialIn",facetKey:"sustainability_Antimicrobial_In",i18nKey:"antimicrobial",value:"ASTM E2149"},sustainabilityBackingProfile:{id:"sustainabilityBackingProfile",group:y.BACKING_PROFILE,filterVar:"sustainabilityBackingProfile",facetKey:"sustainability_BackingProfile",i18nKey:"backingProfile"},sustainabilityProp65:{id:"sustainabilityProp65",group:y.COMPLIANCES,filterVar:"sustainabilityProp65",facetKey:"sustainability_Prop65",i18nKey:"prop65"},sustainabilityReach:{id:"sustainabilityReach",group:y.COMPLIANCES,filterVar:"sustainabilityReach",facetKey:"sustainability_Reach",i18nKey:"reach"},sustainabilityRohs:{id:"sustainabilityRohs",group:y.COMPLIANCES,filterVar:"sustainabilityRohs",facetKey:"sustainability_Rohs",i18nKey:"rohs"},sustainabilityGreenguard:{id:"sustainabilityGreenguard",group:y.CERTIFICATIONS,filterVar:"sustainabilityGreenguard",facetKey:"sustainability_Greenguard",i18nKey:"greenguard"},sustainabilityIndoorAirQuality:{id:"sustainabilityIndoorAirQuality",group:y.CERTIFICATIONS,filterVar:"sustainabilityIndoorAirQuality",facetKey:"sustainability_IndoorAirQuality",i18nKey:"indoorAirQuality"},sustainabilityGlobalRecycledStandard:{id:"sustainabilityGlobalRecycledStandard",group:y.CERTIFICATIONS,filterVar:"sustainabilityGlobalRecycledStandard",facetKey:"sustainability_GlobalRecycledStandard",i18nKey:"globalRecycledStandard"},sustainabilityAPlusEmissions:{id:"sustainabilityAPlusEmissions",group:y.CERTIFICATIONS,filterVar:"sustainabilityAPlusEmissions",facetKey:"sustainability_APlusEmissions",i18nKey:"aPlusEmissions"},sustainabilityEpd:{id:"sustainabilityEpd",group:y.CERTIFICATIONS,filterVar:"sustainabilityEpd",facetKey:"sustainability_Epd",i18nKey:"epd"},sustainabilityLeed:{id:"sustainabilityLeed",group:y.SEALS,filterVar:"sustainabilityLeed",facetKey:"sustainability_Leed",i18nKey:"leed"},sustainabilityWell:{id:"sustainabilityWell",group:y.SEALS,filterVar:"sustainabilityWell",facetKey:"sustainability_Well",i18nKey:"well"}},f={otherattributesRuleMed:{id:"otherattributesRuleMed",filterVar:"otherattributes_RuleMed",i18nKey:"ruleMed"},otherattributesRuleUkca:{id:"otherattributesRuleUkca",filterVar:"otherattributes_RuleUkca",i18nKey:"ruleUKCA"},otherattributesSulfideStaining:{id:"otherattributesSulfideStaining",filterVar:"otherattributes_sulfide_staining",i18nKey:"sulfideStaining"},otherattributesAntiStatic:{id:"otherattributesAntiStatic",filterVar:"otherattributes_IsAntistatic",i18nKey:"antiStatic"}
1,generalReversible:{id:"generalReversible",filterVar:"general_Reversible",i18nKey:"reversible"},otherattributesEcosense:{id:"otherattributesEcosense",filterVar:"otherattributes_Ecosense",i18nKey:"ecosense"},otherattributesPetFriendly:{id:"otherattributesPetFriendly",filterVar:"otherattributes_PetFriendly",i18nKey:"petFriendly"},otherattributesAntifungal:{id:"otherattributesAntifungal",filterVar:"otherattributes_Antifungal",i18nKey:"antifungal"},otherattributesNoBiocides:{id:"otherattributesNoBiocides",filterVar:"otherattributes_NoBiocides",i18nKey:"noBiocides"},otherattributesFormaldehydeFree:{id:"otherattributesFormaldehydeFree",filterVar:"otherattributes_FormaldehydeFree",i18nKey:"formaldehydeFree"},otherattributesNoFlameRetardants:{id:"otherattributesNoFlameRetardants",filterVar:"otherattributes_NoFlameRetardants",i18nKey:"noFlameRetardants"},otherattributesPolycarbonateResinSystem:{id:"otherattributesPolycarbonateResinSystem",filterVar:"otherattributes_PolycarbonateResinSystem",i18nKey:"polycarbonate"},otherattributesSoftside:{id:"otherattributesSoftside",filterVar:"otherattributes_Softside",i18nKey:"softside"},otherattributesProstock:{id:"otherattributesProstock",filterVar:"otherattributes_Prostock",i18nKey:"prostock"},otherattributesCompassHb:{id:"otherattributesCompassHb",filterVar:"otherattributes_CompassHb",i18nKey:"compassHb"},otherattributesIpaCleanable:{id:"otherattributesIpaCleanable",filterVar:"otherattributes_IpaCleanable",i18nKey:"ipaCleanable"},otherattributesBleachCleanable:{id:"otherattributesBleachCleanable",filterVar:"otherattributes_BleachCleanable",i18nKey:"bleachCleanable"},otherattributesDenimDyeResistant:{id:"otherattributesDenimDyeResistant",filterVar:"otherattributes_DenimDyeResistant",i18nKey:"denimDyeResistant"},otherattributesHeatSealable:{id:"otherattributesHeatSealable",filterVar:"otherattributes_HeatSealable",i18nKey:"sealable"},otherattributesHydrolysis:{id:"otherattributesHydrolysis",filterVar:"otherattributes_Hydrolysis",i18nKey:"hydrolysis"},otherattributesMildewResistant:{id:"otherattributesMildewResistant",filterVar:"otherattributes_MildewResistant",i18nKey:"mildewResistant"},otherattributesIsAntibacterial:{id:"otherattributesIsAntibacterial",filterVar:"otherattributes_IsAntibacterial",i18nKey:"antiBacterial"},otherattributesHasNotHeavyMetals:{id:"otherattributesHasNotHeavyMetals",filterVar:"otherattributes_HasNotHeavyMetals",i18nKey:"notHeavyMetals"},otherattributesIntagliodesigns:{id:"otherattributesIntagliodesigns",filterVar:"otherattributes_Intagliodesigns",i18nKey:"intaglioDesigns"},otherattributesTemperatureReductionTreatment:{id:"otherattributesTemperatureReductionTreatment",filterVar:"otherattributes_TemperatureReductionTreatment",i18nKey:"permacool"}},g=()=>Object.values(h),v=()=>Object.values(f),x=e=>g().filter(t=>t.group===e),S=()=>Object.values(y).map(e=>({label:e,keys:x(e).map(e=>e.id)})),A=Object.fromEntries([...g().map(e=>[e.id,e.facetKey]),...v().map(e=>[e.id,e.filterVar])]),w=e=>{var t,l,r;if(null==e)return null;if(Array.isArray(e)){let t=e.map(e=>{var t,l;return"string"==typeof e?e:null!=(l=null!=(t=null==e?void 0:e.value)?t:null==e?void 0:e.id)?l:e}).filter(Boolean);return 0===t.length?null:1===t.length?t[0]:t}return"string"==typeof e?e:null!=(r=null!=(l=null!=(t=null==e?void 0:e.value)?t:null==e?void 0:e.id)?l:e)?r:null},I=(e,t)=>{if(!Array.isArray(e)||0===e.length)return null;let l=e.map(e=>null==e?void 0:e[t]).filter(Boolean);return 0===l.length?null:1===l.length?l[0]:l},j=e=>null==e?[]:Array.isArray(e)?e:[e],N=e=>null==e?[]:Array.isArray(e)?e.map(String):[String(e)],k=e=>N(e).map(e=>e.trim()).filter(Boolean),C=(e,t)=>{let l=k(e),r={};for(let e of t)r[e.filterVar]=null;for(let e of l){var i;let l=t.find(t=>t.id===e);l&&(r[l.filterVar]=null==(i=l.value)||i)}return r},E=e=>C(e,g()),T=e=>C(e,v()),_=e=>{if(null==e)return null;let t=(Array.isArray(e)?e:[e]).map(e=>{if("string"==typeof e)return e;if("object"==typeof e&&null!==e){if("sectorId"in e&&"string"==typeof e.sectorId)return e.sectorId;if("id"in e&&"string"==typeof e.id)return e.id}return null}).filter(e=>"string"==typeof e&&e.length>0);return t.length>0?t:null},R=e=>{if(null==e)return null;let t=e=>{if("string"==typeof e)return e.trim()||null;if("object"==typeof e&&null!==e){if("slug"in e&&"string"==typeof e.slug)return e.slug.trim();if("value"in e&&"string"==typeof e.value)return e.value.trim()}return null};if(Array.isArray(e)){let l=[];for(let r of e){let e=t(r);e&&l.push(e)}return l.length>0?l:null}let l=t(e);return l?[l]:null};var F=l(60245),P=l.n(F);let B=e=>{let t=(0,n.useRef)(e);return P()(t.current,e)||(t.current=e),t.current};var $=l(37662);let M=()=>{let{instance:e}
1=(0,$.N)(),[t,l]=(0,n.useState)(i.i.getState()),[r,a]=(0,n.useState)(i.i.getState().selectedFilters),s=(0,n.useRef)(!1);(0,n.useEffect)(()=>{e&&(s.current||(s.current=!0,i.i.dispatch({type:"SET_ORDER_BY",payload:"eu"===e?"name":"new_first"})))},[e]);let o=e=>{var t,l;let r=E(e.sustainability),i=T(e.otherAttributes),a=null!=(t=R(e.marketSlugs))?t:null,n=I(Array.isArray(e.brands)?e.brands:[],"id"),s=I(Array.isArray(e.patterns)?e.patterns:[],"code"),o=j(e.predominantColor);return{marketSlugs:a,isNew:null!=(l=e.isNew)?l:null,predominantColor:o.map(e=>"string"==typeof e?e:null==e?void 0:e.value).filter(Boolean).join(",")||null,flameRetardancyTests:(()=>{let t=N(e.flammability).filter(Boolean);return t.length?t:null})(),sectorIds:_(e.sectorIds),composition:w(e.composition),brands:n,patterns:s,design:e.design,topcoatIds:(()=>{let t=N(e.topcoat).filter(Boolean);return t.length?t:null})(),warranty:e.warranty,search:e.search,after:e.after,...r,...i}},u=B(r),c=(0,n.useMemo)(()=>o(u),[u]),d="string"==typeof c.predominantColor&&c.predominantColor.length>0,m=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{if(m.current){m.current=!1;return}i.i.dispatch({type:"SET_PAGE",payload:""})},[d]),(0,n.useEffect)(()=>i.i.subscribe((e,t)=>{l(e),e.selectedFilters!==t.selectedFilters&&a(e.selectedFilters)}),[]),{state:t,adaptedFilters:c}};var L=l(62304),O=l(60157),K=l(37681),D=l(23551);let G=(e,t,l)=>{var r,i,a;return{marketId:e,marketName:t,sectorId:String(null!=(r=null==l?void 0:l.id)?r:""),sectorName:String(null!=(i=null==l?void 0:l.name)?i:""),title:"".concat(t,"/").concat(String(null!=(a=null==l?void 0:l.name)?a:""))}},V=e=>{if("string"==typeof e)return e;if(null==e)return"";if("number"==typeof e||"boolean"==typeof e)return String(e);if("object"==typeof e){var t,l,r,i,a;return(null!=(a=null!=(i=null!=(r=null!=(l=null!=(t=null==e?void 0:e.es)?t:null==e?void 0:e.en)?l:null==e?void 0:e.label)?r:null==e?void 0:e.name)?i:null==e?void 0:e.title)?a:"").toString()}return String(e)},U=e=>null==e?[]:Array.isArray(e)?e:[e],H=e=>e.length?e:null,q=e=>{var t,l,r;let{item:i,isDraft:a,sectors:n,disabled:s,setDraftSelected:o,onMarketToggle:u}=e,d=String(null!=(l=null!=(t=null==i?void 0:i.id)?t:null==i?void 0:i.name)?l:"unknown"),m=String(null!=(r=null==i?void 0:i.name)?r:"Market"),{toggleSectors:b}=c(),p=()=>n.filter(Boolean).map(e=>G(d,m,e)).filter(e=>e.sectorId);return{handleToggleAll:()=>{if(s)return;if(u)return void u();let e=p();if(0!==e.length){if(a&&o)return void o(t=>{var l;let r=U(null!=(l=null==t?void 0:t.sectorIds)?l:[]),i=e.every(e=>r.some(t=>String(null==t?void 0:t.sectorId)===String(e.sectorId)))?r.filter(t=>!e.some(e=>String(e.sectorId)===String(null==t?void 0:t.sectorId))):Array.from(new Map([...r,...e].map(e=>[String(e.sectorId),e])).values());return{...t,sectorIds:H(i)}});b(e)}},handleToggleSector:e=>{if(s)return;let t=G(d,m,e);if(t.sectorId){if(a&&o)return void o(e=>{var l;let r=U(null!=(l=null==e?void 0:e.sectorIds)?l:[]),i=r.some(e=>String(null==e?void 0:e.sectorId)===String(t.sectorId))?r.filter(e=>String(null==e?void 0:e.sectorId)!==String(t.sectorId)):[...r,t];return{...e,sectorIds:H(i)}});b([t])}}}},z=e=>{var t;let{mode:l="live",name:i,item:a,marketSectors:n,draftSelected:s,disabled:o=!1,isMarketSelected:u=!1,setDraftSelected:c,onMarketToggle:d}=e,m="draft"===l,{state:b}=M(),p=!!o,y=Array.isArray(n)?n:[],{handleToggleAll:h,handleToggleSector:f}=q({item:a,isDraft:m,sectors:y,disabled:p,setDraftSelected:c,onMarketToggle:d}),g=V(i)||"—",v=U(m?null==s?void 0:s.sectorIds:null==b||null==(t=b.selectedFilters)?void 0:t.sectorIds),x=e=>v.some(t=>{var l;return String("string"==typeof t?t:null!=(l=null==t?void 0:t.sectorId)?l:null==t?void 0:t.id)===String(e)}),S=y.length>0&&y.every(e=>null!=e&&!!e.id&&x(e.id)),A=a.count;return(0,r.jsx)("div",{className:p?"opacity-60 pointer-events-none":"",children:(0,r.jsxs)(K.Ay,{children:[(0,r.jsx)(K.Ay.Toggle,{className:"py-3 hover:bg-(--aqua-00) px-3",children:(0,r.jsxs)("div",{className:"flex items-center space-x-2 pr-4",children:[(0,r.jsx)("i",{className:O.rY}),(0,r.jsx)(D.A,{className:"font-semibold text-(--select-item-default-text) w-full cursor-pointer",labelClassName:"text-[16px] text-black font-medium break-words! whitespace-normal!",name:g,checked:d?u:S,quantity:A,onClick:h})]})}),(0,r.jsx)(K.Ay.Menu,{className:"rounded-none border-0",children:y.map((e,t)=>{var l;let i=String(null!=(l=null==e?void 0:e.id)?l:"sector-".concat(t)),a=V(null==e?void 0:e.name)||"—",n=null!=e&&!!e.id&&x(e.id),s=null==e?void 0:e.count;return(0,r.jsx)(K.Ay.Item,{className:"py-2 pr-7 pl-[25px] min-h-[36px]",onClick:()=>e&&f(e),children:(0,r.jsx)(D.A,{name:a,checked:n,quantity:s,onClick:()=>e&&f(e),className:"pl-[10px] cursor-pointer min-h-[36px] py-2",labelClassName:"break-words! whitespace-normal! text-[16px] text-black font-normal"})},i)})})]})})},Y=e=>null==e?[]:Array.isArray(e)?e:[e],W=e=>{var t,l,r,i;let a=String(null!=(l=null!=(t=null==e?void 0:e.id)?t:null==e?void 0:e.name)?l:"unknown"),n=String(null!=(r=null==e?void 0:e.name)?r:"Market");return(null!=(i=null==e?void 0:e.sectors)?i:[]).map(e=>{var t,l,r,i;return{marketId:a,marketName:n,sectorId:String(null!=(t=null==e?void 0:e.id)?t:""),sectorName:String(null!=(l=null==e?void 0:e.name)?l:""),title:"".concat(n,"/").concat(String(null!=(r=null==e?void 0:e.name)?r:"")),qty:null!=(i=null==e?void 0:e.count)?i:0}}).filter(e=>e.sectorId)},Q=e=>{let{mode:t,state:l,disabled:r,selectedSectorIdsArray:i,draftSelected:a,setDraftSelected:s,toggleSectors:o}=e,u=e=>{var t;return"string"==typeof e?e:null!=(t=null==e?void 0:e.sectorId)?t:""},c=e=>e.every(e=>i.some(t=>String(u(t))===String(e.sectorId)));return{handleMarketToggle:(0,n.useCallback)(e=>{if(r)return;let i=W(e);if(0===i.length)return;let n=c(i);if("draft"===t&&s){let e,t=Y(null==a?void 0:a.sectorIds);if(n)e=t.filter(e=>{let t=u(e);return!i.some(e=>String(e.sectorId)===String(t))});else{let l=i.filter(e=>!t.some(t=>String(u(t))===String(e.sectorId)));e=[...t,...l]}s(t=>({...t,sectorIds:e.length>0?e:null}));return}if(n)o(i);else{var d;let e=Y(null==l||null==(d=l.selectedFilters)?void 0:d.sectorIds),t=i.filter(t=>!e.some(e=>String(u(e))===String(t.sectorId)));t.length>0&&o(t)}},[r,t,i,a,s,l,o,W]),isMarketSelected:(0,n.useCallback)(e=>c(W(e)),[i,W])}}
1,Z=e=>{var t;let{mode:l="live",filterItems:i,draftSelected:a,disabled:n,setDraftSelected:s}=e,o=(0,m.c3)("Products.Filters"),{state:u}=M(),{toggleSectors:d}=c(),b=!!n,p=Array.isArray(i)?i:[],y=Y("live"===l?(null==(t=u.selectedFilters)?void 0:t.sectorIds)||[]:(null==a?void 0:a.sectorIds)||[]),{handleMarketToggle:h,isMarketSelected:f}=Q({mode:l,state:u,disabled:b,selectedSectorIdsArray:y,draftSelected:a,setDraftSelected:s,toggleSectors:d});return 0===p.length?(0,r.jsx)("div",{className:"px-3 py-3 text-sm text-(--gray-60)",children:o("noOptions")}):(0,r.jsx)("div",{className:b?"opacity-60 pointer-events-none":"",children:p.map((e,t)=>{var i,n,o,u,c;let d=String(null!=(o=null!=(n=null!=(i=null==e?void 0:e.id)?i:null==e?void 0:e.slug)?n:null==e?void 0:e.name)?o:"market-".concat(t));return(0,r.jsx)(K.Ay.Item,{className:"px-0! py-0!",children:(0,r.jsx)(z,{name:String(null!=(u=null==e?void 0:e.name)?u:"—"),mode:l,item:e,disabled:b,draftSelected:a,marketSectors:null!=(c=null==e?void 0:e.sectors)?c:[],isMarketSelected:f(e),setDraftSelected:s,onMarketToggle:()=>h(e)})},d)})})},J=e=>{var t,l;let{marketTypes:i,title:a}=e,n=(0,m.c3)(),s=(0,m.c3)("Products.Filters"),{state:o}=M(),u=Array.isArray(null==(t=o.selectedFilters)?void 0:t.sectorIds)?o.selectedFilters.sectorIds.length:+(null!=(l=o.selectedFilters)&&!!l.sectorIds);return(0,r.jsx)("div",{className:"hidden md:flex",children:(0,r.jsxs)(K.Ay,{showAsAPopup:!0,children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)(b.$n,{design:L.A.OUTLINED_SMALL,disabled:!1,type:"button",children:[(0,r.jsx)(b.C3,{text:n(a),className:"font-medium"}),u>0&&(0,r.jsx)(b.C3,{text:"(".concat(u,")")}),(0,r.jsx)(b.a2,{className:O.rY})]})}),(0,r.jsx)(K.Ay.Menu,{className:"top-11! rounded-2xl border border-black lg:w-74 overflow-hidden",children:Array.isArray(i)&&i.length>0?(0,r.jsx)(Z,{filterItems:i}):(0,r.jsx)(K.Ay.Item,{children:(0,r.jsx)("span",{className:"text-sm text-(--gray-60) px-2 py-2",children:s("noOptions")})})})]})})},X=e=>{var t,l,r,i,a;let n=null!=(a=null!=(i=null!=(r=null!=(l=null!=(t=null==e?void 0:e.title)?t:null==e?void 0:e.label)?l:null==e?void 0:e.name)?r:null==e?void 0:e.value)?i:null==e?void 0:e.id)?a:"";return n&&"object"==typeof n?"":String(n)},ee=e=>{var t,l,r,i;let a=null!=(i=null!=(r=null!=(l=null!=(t=null==e?void 0:e.value)?t:null==e?void 0:e.id)?l:null==e?void 0:e.title)?r:null==e?void 0:e.label)?i:"";return a&&"object"==typeof a?"":String(a).trim()},et=e=>null==e?[]:Array.isArray(e)?e:[e],el=e=>0===e.length?null:1===e.length?e[0]:e,er=n.memo(function(e){let{item:t,label:l,filterKey:i,checked:a,quantity:s,className:o,disabled:u,onToggle:c}=e,m=(0,n.useCallback)(()=>c(t),[t,c]),b=(0,d.A)("text-[16px] font-normal text-black break-words! whitespace-normal!","flammability"===i?"w-fit":"w-9/12");return(0,r.jsx)(K.Ay.Item,{className:o,children:(0,r.jsx)("div",{className:u?"opacity-60 pointer-events-none":"",children:(0,r.jsx)(D.A,{type:"colors"===i?"colors":" ",item:t,className:"text-(--spg-primary) cursor-pointer min-h-[36px] py-2",name:l,checked:a,quantity:s,onClick:m,labelClassName:b})})})}),ei=n.memo(e=>{let{filterItems:t,filterKey:l,index:i,mode:a="live",draftSelected:s,setDraftSelected:o,disabled:u=!1}=e,b=(0,m.c3)("Products.Filters.otherAttributesOptions"),{state:p}=M(),{toggleComposition:y,toggleDesign:h,toggleColor:f,toggleSustainability:g,toggleTopcoat:v,toggleWarranty:x,toggleFlammability:S}=c(),A="draft"===a,w=!!u,I=(0,n.useMemo)(()=>{var e,t;return A?"colors"===l?null==s?void 0:s.predominantColor:null==s?void 0:s[l]:"colors"===l?null==p||null==(e=p.selectedFilters)?void 0:e.predominantColor:null==p||null==(t=p.selectedFilters)?void 0:t[l]},[A,s,null==p?void 0:p.selectedFilters,l]),j=(0,n.useMemo)(()=>et(I),[I]),N=(0,n.useCallback)(e=>{let t=ee(e);return!!t&&("colors"===l?j.some(e=>{var l;return String(null!=(l=null==e?void 0:e.value)?l:e)===t}):j.map(String).includes(t))},[l,j]),k=(0,n.useCallback)(e=>{var t,r,i,a,n,s,u,c,d;if(A){if(!o)return;let t=ee(e);if(!t)return;o(r=>{let i={...null!=r?r:{}};if("colors"===l){var a,n;let l=et(i.predominantColor),r=l.some(e=>String(null==e?void 0:e.value)===t)?l.filter(e=>String(null==e?void 0:e.value)!==t):[...l,{title:null!=(n=null!=(a=null==e?void 0:e.title)?a:null==e?void 0:e.label)?n:t,value:t}];return i.predominantColor=r.length?r:null,i}let s=et(i[l]).map(String),o=s.includes(t)?s.filter(e=>e!==t):[...s,t];return i[l]=el(o),i});return}switch(l){case"composition":return y(null!=(t=null==e?void 0:e.value)?t:e);
1case"design":return h(null!=(r=null==e?void 0:e.value)?r:e);case"colors":return f({title:null!=(a=null!=(i=null==e?void 0:e.title)?i:null==e?void 0:e.label)?a:null==e?void 0:e.value,value:null==e?void 0:e.value});case"topcoat":return v(null!=(n=null==e?void 0:e.value)?n:e);case"warranty":return x(null!=(s=null==e?void 0:e.value)?s:e);case"flammability":return S(null!=(c=null!=(u=null==e?void 0:e.value)?u:null==e?void 0:e.id)?c:e);case"sustainability":return g(null!=(d=null==e?void 0:e.value)?d:e)}},[A,o,l,y,h,f,v,x,S,g]),C=(0,n.useMemo)(()=>(0,d.A)("colors"===l?"pl-1":"pl-2","min-h-[36px]"),[l]);return(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>{var a;let n=ee(e);if(!n)return null;let s=X(e),o="otherAttributes"===l?s?b(s):"—":s||"—";return(0,r.jsx)(er,{item:e,label:o,filterKey:l,checked:N(e),quantity:null!=(a=null==e?void 0:e.count)?a:1,className:C,disabled:w,onToggle:k},"".concat(i,"-").concat(l,"-").concat(n,"-").concat(t))})})}),ea=e=>null==e?[]:Array.isArray(e)?e:[e],en=e=>e.length?e:null,es=e=>{var t;let{groups:l,mode:i="draft",draftSelected:a,setDraftSelected:n,disabled:s=!1}=e,{state:o}=M(),{toggleSustainability:u}=c(),d=(0,m.c3)("Products.Filters"),b=(0,m.c3)("ProductDetail.SustainableProfile"),p=(0,m.c3)("Products.Filters.sustainabilityOptions"),y=!!s,h="draft"===i,f=ea(h?null==a?void 0:a.sustainability:null==o||null==(t=o.selectedFilters)?void 0:t.sustainability).map(String),g=e=>f.includes(String(e)),v=e=>{n&&n(t=>e(null!=t?t:{}))},x=e=>{if(!y){if(h)return void v(t=>{let l=ea(t.sustainability).map(String),r=l.includes(e)?l.filter(t=>t!==e):[...l,e];return{...t,sustainability:en(r)}});null==u||u(e)}},S=e=>{if(y)return;let t=e.length>0&&e.every(e=>f.includes(e));if(h)return void v(l=>{let r=ea(l.sustainability).map(String),i=t?r.filter(t=>!e.includes(t)):Array.from(new Set([...r,...e]));return{...l,sustainability:en(i)}});e.forEach(e=>{(t?f.includes(e):!f.includes(e))&&(null==u||u(e))})};return Array.isArray(l)&&0!==l.length?(0,r.jsx)("div",{className:y?"opacity-60 pointer-events-none":"",children:l.map((e,t)=>{let l=Array.isArray(e.children)?e.children:[];if(0===l.length)return null;let i=l.map(e=>String(e.value)),a=i.length>0&&i.every(e=>g(e)),n=l.reduce((e,t)=>{var l;return e+(null!=(l=t.count)?l:0)},0);return(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("div",{role:"button",tabIndex:0,className:"px-3 min-h-12 font-semibold text-(--spg-text-dark) cursor-pointer select-none",onClick:()=>S(i),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&S(i)},title:a?"Quitar selecci\xf3n del grupo":"Seleccionar todo el grupo",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:b(e.label)}),(0,r.jsxs)("span",{className:"text-xs text-(--gray-60)",children:[n>0?n:"",n>0?" • ":"",a?"All":""]})]})}),(0,r.jsx)("div",{className:"pl-3 pr-3",children:l.map((t,l)=>{var i,a;let n=String(t.value),s=g(n),o=p(null!=(i=t.i18nKey)?i:t.label);return(0,r.jsx)("div",{children:(0,r.jsx)(D.A,{name:o,checked:s,className:"cursor-pointer min-h-[36px] py-2",quantity:null!=(a=t.count)?a:0,onClick:()=>x(n),labelClassName:"break-words! whitespace-normal! text-[16px] text-black w-9/12"})},"".concat(e.value,"-").concat(n,"-").concat(l))})})]},"".concat(e.value,"-").concat(t))})}):(0,r.jsx)("div",{className:"px-3 py-3 text-sm text-(--gray-60)",children:d("noOptions")})},eo=e=>Array.isArray(e)?e:[],eu=["composition","colors","design","sustainability","topcoat","warranty","flammability","otherAttributes"],ec=e=>eu.includes(e),ed=e=>{let{text:t}=e;return(0,r.jsx)("div",{className:"px-3 py-3 text-sm text-(--gray-60)",children:t})},em=e=>{let{filters:t,mode:l="draft",disabled:i=!1,draftSelected:a,setDraftSelected:n}=e,s=(0,m.c3)("Products.Filters");return(0,r.jsx)("div",{className:"flex-1 mt-4",children:t.map((e,t)=>{let o=Object.keys(e)[0],u=e[o],c=eo(u),d=s(o)||String(o),m=s("noOptions"),b="marketTypes"===o,p=!b&&ec(o),y="sustainability"===o;return(0,r.jsxs)(K.Ay,{children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)("div",{className:"w-full flex space-x-2 justify-between lg:justify-start items-center py-3 border-b border-b-(--gray-10) h-18 lg:h-12",children:[(0,r.jsx)("i",{className:"".concat(O.rY," order-2 lg:order-0")}),(0,r.jsx)("span",{className:"text-(--spg-text-dark) font-semibold lg:font-medium text-base",children:d})]})}),(0,r.jsx)(K.Ay.Menu,{className:"overflow-hidden pb-2 max-h-[250px] overflow-y-auto border-0 z-0!",children:b?c.length>0?(0,r.jsx)(Z,{mode:l,disabled:i,filterItems:c,draftSelected:a,setDraftSelected:n}):(0,r.jsx)(ed,{text:m}):y?c.length>0?(0,r.jsx)(es,{groups:u,mode:l,draftSelected:a,setDraftSelected:n,disabled:i}):(0,r.jsx)(ed,{text:m}):p&&c.length>0?(0,r.jsx)(ei,{filterItems:c,filterKey:o,index:t,mode:l,draftSelected:a,setDraftSelected:n,disabled:i}):(0,r.jsx)(ed,{text:m})})]},"".concat(o,"-").concat(t))})})},eb=(e,t)=>e&&"object"==typeof e?e[t]:void 0,ep=(e,t)=>{for(let l of t){let t=eb(e,l);if(null!=t){if("object"==typeof t)return"";return String(t)}}return""},ey=e=>ep(e,["title","label","name","value","id"]),eh=e=>ep(e,["value","id","title","label"]).trim(),ef=e=>String(null!=e?e:"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),eg=(e,t)=>ef(e).includes(ef(t)),ev=e=>{let t=eb(e,"sectors");return Array.isArray(t)?t:[]},ex=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ey;return t?e.reduce((e,r)=>{let i=eg(l(r),t)||eg(eh(r),t),a=ev(r);if(0===a.length)return i&&e.push(r),e;let n=i?a:a.filter(e=>eg(ey(e),t)||eg(eh(e),t));return(i||n.length>0)&&e.push({...r,sectors:n}),e},[]):e},eS=e=>{var t;return String(null!=(t=null==e?void 0:e.label)?t:"")},eA=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eS,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:eS;return Array.isArray(e)?t?e.map(e=>{let i=eg(l(e),t),a=Array.isArray(null==e?void 0:e.children)?e.children:[],n=i?a:a.filter(e=>eg(r(e),t)||eg(null==e?void 0:e.value,t));return{...e,children:n}}).filter(e=>{var t,l;return(null!=(l=null==e||null==(t=e.children)?void 0:t.length)?l:0)>0}):e:[]};var ew=l(96281),eI=l(95176);let ej=["colors","design","marketTypes","composition","sustainability","flammability","topcoat","warranty","otherAttributes"],eN=Object.values(eI.Qx).reduce((e,t)=>
1(t.instanceId&&(e[t.instanceId]=t.filtersOrder),e),{}),ek=e=>{var t;let{onClose:l,draftSelected:i,setDraftSelected:a,disabled:s,filters:u}=e,c=(0,m.c3)("Products.Filters"),d=(0,m.c3)("Products.Filters.otherAttributesOptions"),p=(0,m.c3)("ProductDetail.SustainableProfile"),y=(0,m.c3)("Products.Filters.sustainabilityOptions"),[h,f]=(0,n.useState)(""),[g,v]=(0,n.useState)(!1),x=null!=(t=eN[(0,ew.A)()])?t:ej,S=function(e,t){let l=[];for(let i of t){var r;l.push({[i]:null!=(r=e[i])?r:[]})}return l}(function(e){var t,l,r,i,a,n,s,o,u;return{colors:[...null!=(t=null==e?void 0:e.colors)?t:[]],design:[...null!=(l=null==e?void 0:e.designTexture)?l:[]],marketTypes:[...null!=(r=null==e?void 0:e.marketTypes)?r:[]],composition:[...null!=(i=null==e?void 0:e.compositions)?i:[]],sustainability:[...null!=(a=null==e?void 0:e.sustainability)?a:[]],flammability:[...null!=(n=null==e?void 0:e.flammability)?n:[]],topcoat:[...null!=(s=null==e?void 0:e.topcoat)?s:[]],warranty:[...null!=(o=null==e?void 0:e.warranty)?o:[]],otherAttributes:[...null!=(u=null==e?void 0:e.otherAttributes)?u:[]]}}({colors:null==u?void 0:u.colors,designTexture:null==u?void 0:u.designTexture,marketTypes:null==u?void 0:u.marketTypes,compositions:null==u?void 0:u.compositions,sustainability:null==u?void 0:u.sustainability,flammability:null==u?void 0:u.flammability,topcoat:null==u?void 0:u.topcoat,warranty:null==u?void 0:u.warranty,otherAttributes:null==u?void 0:u.otherAttributes}),x),A=(e,t)=>t&&e.has(t)?e(t):t,w=e=>t=>{let l=ey(t);return"otherAttributes"===e?A(d,l):l},I=ef(h),j=I?S.map(e=>{let t=Object.keys(e)[0],l=e[t],r=eg(t,I)||eg(c(t),I);if("sustainability"===t)return{[t]:r?l:eA(l,I,e=>{var t;return A(p,String(null!=(t=null==e?void 0:e.label)?t:""))},e=>{var t,l;return A(y,String(null!=(l=null!=(t=null==e?void 0:e.i18nKey)?t:null==e?void 0:e.label)?l:""))})};let i=Array.isArray(l)?l:[],a=r?i:ex(i,I,w(t));return{[t]:a}}).filter(e=>{let t=Object.keys(e)[0],l=e[t];return Array.isArray(l)&&l.length>0}):S;return(0,n.useEffect)(()=>f(""),[]),(0,r.jsxs)("section",{className:"h-full w-full flex flex-col lg:px-10",children:[(0,r.jsxs)("div",{className:"relative shrink-0 px-5 pt-15 flex flex-col items-start gap-5",children:[(0,r.jsx)(b.$n,{onClick:l,design:L.A.LINK_GREEN_BIG,className:"absolute top-3 right-0 lg:left-1 lg:right-auto z-1",children:(0,r.jsx)(b.a2,{className:"icon-close text-[24px] text-black"})}),(0,r.jsxs)("div",{className:"w-full grid grid-cols-[1 rem_1fr_auto] items-center",children:[(0,r.jsx)("span",{}),(0,r.jsx)("h4",{className:"text-(--aqua-130) lg:text-(--spg-text-dark) mb-0 justify-self-start",children:c("filter")}),(0,r.jsx)("i",{className:"icon-tune rotate-90 text-(--gray-40) justify-self-end"})]}),(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)(o.A,{debounceMs:150,onSearch:e=>f(e),onClear:()=>f(""),onDebouncingChange:v,placeholder:c("searchFilters")})})]}),(0,r.jsxs)("div",{className:"flex-1 min-h-0 overflow-y-auto px-4 pb-6 relative",children:[g&&(0,r.jsx)("div",{className:"absolute inset-0 z-10 flex items-start justify-center pt-6",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-xl bg-white/80 backdrop-blur px-3 py-2 shadow-sm border border-(--gray-20)",children:[(0,r.jsx)("span",{className:"inline-block h-4 w-4 animate-spin rounded-full border-2 border-(--gray-40) border-t-transparent"}),(0,r.jsx)("span",{className:"text-sm text-(--gray-70) font-light",children:"Searching…"})]})}),(0,r.jsx)("div",{className:g?"opacity-60 pointer-events-none":"",children:(0,r.jsx)(em,{filters:j,mode:"draft",draftSelected:i,setDraftSelected:a,disabled:s})})]})]})};var eC=l(21268);let eE=e=>{let t=(null!=e?e:"").toString().trim();if(!t)return"—";try{return(0,eC.A)(t)}catch(e){return t}},eT=n.memo(function(e){let{value:t,label:l,count:i,checked:a,onToggle:s}=e,o=(0,n.useCallback)(()=>s(t),[s,t]);return(0,r.jsx)(K.Ay.Item,{className:"px-5!",onClick:o,children:(0,r.jsx)(D.A,{name:l,quantity:i,checked:a,labelClassName:"text-[16px] text-black break-words! whitespace-normal!",className:"font-normal text-(--select-item-default-text) w-full py-2 min-h-[36px]",onClick:o})})}),e_=n.memo(()=>{var e,t,l;let i=(0,m.c3)("Products"),{state:a}=M(),{toggleDesign:s}=c(),o=null!=(l=null==(e=a.filters)?void 0:e.designTexture)?l:[],u=o.length>0,d=null==(t=a.selectedFilters)?void 0:t.design,p=Array.isArray(d)?d:d?[d]:[],y=(0,n.useCallback)(e=>{s(e)},[!1,s]);return(0,r.jsx)("div",{className:"hidden md:flex",children:(0,r.jsxs)(K.Ay,{showAsAPopup:!0,children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)(b.$n,{design:L.A.OUTLINED_SMALL,className:"whitespace-nowrap",disabled:!1,children:[(0,r.jsx)(b.C3,{text:i("designFilter"),className:"font-medium"}),p.length>0&&(0,r.jsx)(b.C3,{text:"(".concat(p.length,")")}),(0,r.jsx)(b.a2,{className:O.rY})]})}),(0,r.jsx)(K.Ay.Menu,{className:"top-12! min-w-[260px] max-w-[calc(100vw-32px)] rounded-2xl border-black overflow-hidden",children:(0,r.jsx)("div",{className:"",children:u?o.map(e=>{var t,l,i,a;let n=(null!=(t=e.value)?t:"").toString().trim();if(!n)return null;let s=eE(null!=(i=null!=(l=e.label)?l:e.value)?i:""),o=p.includes(n),u=null!=(a=e.count)?a:0;return(0,r.jsx)(eT,{value:n,label:s,count:u,checked:o,onToggle:y},n)}):(0,r.jsx)(K.Ay.Item,{children:(0,r.jsx)("span",{className:"text-sm text-(--gray-60) px-2 py-2",children:"No options"})})})})]})})});var eR=l(30408);function eF(e){return new Set((Array.isArray(null==e?void 0:e.sustainability)?e.sustainability:[]).map(e=>String(e)))}let eP=n.memo(function(e){let{childId:t,label:l,quantity:i,checked:a,onToggle:s}=e,o=(0,n.useCallback)(()=>s(t),[t,s]);return(0,r.jsx)(K.Ay.Item,{className:"py-2 pr-7 pl-[25px] min-h-[36px]",onClick:o,children:(0,r.jsx)(D.A,{name:l,checked:a,quantity:i,onClick:o,className:"cursor-pointer min-h-[36px] py-2",labelClassName:"break-words! whitespace-normal! text-[16px] text-black w-37.5"})})}),eB=n.memo(function(e){let{group:t,getItemChecked:l,onToggle:i}=e;return(0,r.jsx)(r.Fragment,{children:t.children.map(e=>(0,r.jsx)(eP,{childId:e.childId,label:e.label,quantity:e.quantity,checked:l(e.childId
1),onToggle:i},"".concat(t.groupId,"-").concat(e.childId)))})});function e$(e){var t;let{group:l,getItemChecked:i,onToggle:a}=e,s=(0,n.useContext)(eR.A),o=null!=(t=null==s?void 0:s.visible)&&t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.Ay.Toggle,{className:"py-3 hover:bg-(--aqua-00) px-3",children:(0,r.jsxs)("div",{className:"flex items-center space-x-2 pr-4",children:[(0,r.jsx)("i",{className:O.rY}),(0,r.jsx)("span",{className:"text-[16px] text-black font-medium break-words! whitespace-normal!",children:l.groupName})]})}),(0,r.jsx)(K.Ay.Menu,{className:"rounded-none border-0",children:o?(0,r.jsx)(eB,{group:l,getItemChecked:i,onToggle:a}):null})]})}let eM=n.memo(e=>{let{groups:t,mode:l="live",draftSelected:i,setDraftSelected:a}=e,s=(0,m.c3)("ProductDetail.SustainableProfile"),o=(0,m.c3)("Products.Filters.sustainabilityOptions"),{toggleItem:u,getItemChecked:d}=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"live",{setSelectedFilters:r}=c(),{state:i}=M(),a="draft"===l?e:i.selectedFilters,s=(0,n.useMemo)(()=>eF(a),[a]),o=(0,n.useRef)({mode:l,draftSelectedFilters:e,liveSelectedFilters:i.selectedFilters});(0,n.useEffect)(()=>{o.current={mode:l,draftSelectedFilters:e,liveSelectedFilters:i.selectedFilters}},[l,e,i.selectedFilters]);let u=(0,n.useCallback)(e=>{let l=String(e),{mode:i,draftSelectedFilters:a,liveSelectedFilters:n}=o.current,s="draft"===i?a:n,u=function(e,t){let l=new Set((null!=e?e:[]).map(e=>String(e)));return l.has(t)?l.delete(t):l.add(t),Array.from(l)}(Array.from(eF(s)),l),c={...s,sustainability:u.length?u:null};t(c),r(c)},[t,r]),d=(0,n.useCallback)(e=>s.has(String(e)),[s]);return{selectedCount:s.size,toggleItem:u,getItemChecked:d}}(i,a,l),b=(0,n.useMemo)(()=>Array.isArray(t)?t.map((e,t)=>{var l,r;let i=String(null!=(l=e.value)?l:"group-".concat(t)),a=String(null!=(r=e.label)?r:"—"),n=Array.isArray(e.children)?e.children:[];return{groupId:i,groupName:s(a),children:n.map((e,l)=>{var r,i;return{childId:String(null!=(r=null==e?void 0:e.value)?r:"item-".concat(t,"-").concat(l)),label:o(null!=(i=null==e?void 0:e.label)?i:"—"),quantity:"number"==typeof(null==e?void 0:e.count)?e.count:void 0}})}}):[],[t,s,o]);return 0===b.length?null:(0,r.jsx)("div",{children:b.map(e=>(0,r.jsx)(K.Ay,{children:(0,r.jsx)(e$,{group:e,getItemChecked:d,onToggle:u})},e.groupId))})}),eL=n.memo(e=>{var t,l;let{disabled:i,draftSelected:a,setDraftSelected:s}=e,o=(0,m.c3)("Products.Filters"),{state:u}=M(),{setSelectedFilters:d}=c(),p=(0,ew.A)()===eI.Qx.eu.instanceId,y=(0,n.useMemo)(()=>{var e,t;return eo(null!=(t=null==(e=u.filters)?void 0:e.flammability)?t:[])},[null==(t=u.filters)?void 0:t.flammability]),h=(0,n.useMemo)(()=>{var e,t;return null!=(t=null==(e=u.filters)?void 0:e.sustainability)?t:[]},[null==(l=u.filters)?void 0:l.sustainability]),f=j(u.selectedFilters.flammability).length,g=j(u.selectedFilters.sustainability).length,v=(0,n.useCallback)(e=>{s(t=>{let l="function"==typeof e?e(t):e;return d(l),l})},[s,d]);return(0,r.jsxs)(r.Fragment,{children:[!p&&(0,r.jsx)(e_,{}),p&&(0,r.jsxs)(K.Ay,{showAsAPopup:!0,className:"hidden md:inline-flex",children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)(b.$n,{design:L.A.OUTLINED_SMALL,className:"whitespace-nowrap",disabled:i,children:[(0,r.jsx)(b.C3,{text:o("flammability"),className:"font-medium"}),f>0&&(0,r.jsx)("span",{className:"inline-flex min-w-5 h-5 px-1 items-center justify-center rounded-md text-xs bg-(--gray-10)",children:f}),(0,r.jsx)(b.a2,{className:O.rY})]})}),(0,r.jsx)(K.Ay.Menu,{className:"top-12! rounded-2xl border-black overflow-hidden w-[300px]! h-[300px]!",children:(0,r.jsx)("div",{className:" overflow-y-auto h-full w-full [&::-webkit-scrollbar]:w-1  [&::-webkit-scrollbar-track]:bg-gray-100  [&::-webkit-scrollbar-thumb]:bg-gray-300  [&::-webkit-scrollbar-thumb]:rounded-full ",children:(0,r.jsx)(ei,{filterItems:y,filterKey:"flammability",index:0,mode:"draft",draftSelected:a,setDraftSelected:v,disabled:i})})})]}),(0,r.jsxs)(K.Ay,{showAsAPopup:!0,className:"hidden md:inline-flex",children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)(b.$n,{design:L.A.OUTLINED_SMALL,className:"whitespace-nowrap",disabled:i,children:[(0,r.jsx)(b.C3,{text:o("sustainability"),className:"font-medium"}),g>0&&(0,r.jsx)("span",{className:"inline-flex min-w-5 h-5 px-1 items-center justify-center rounded-md text-xs bg-(--gray-10)",children:g}),(0,r.jsx)(b.a2,{className:O.rY})]})}),(0,r.jsx)(K.Ay.Menu,{className:"top-12! min-w-[260px] max-w-[calc(100vw-32px)] rounded-2xl border-black overflow-hidden",children:(0,r.jsx)(eM,{mode:"live",groups:h,draftSelected:a,setDraftSelected:s})})]})]})}),eO=e=>{var t;let{showOptionsColors:l,setShowOptionsColors:i}
1=e,a=(0,m.c3)("Products"),[s,o]=(0,n.useState)(!1),[u,y]=(0,n.useState)({}),{state:h}=M(),{setSelectedFilters:f,resetFilters:g}=c(),v=h.selectedFilters.predominantColor,x=(null==v?void 0:v.length)>0,S=v&&h.selectedFilters.predominantColor.length.toString(),A=(0,n.useCallback)(()=>{f(u),o(!1),i(!1)},[u,f,i]),w=(0,n.useCallback)(()=>{g(),y({})},[g]),I=(0,n.useCallback)(()=>o(!1),[]),j=(0,n.useCallback)(()=>o(e=>!e),[]),N=(0,n.useCallback)(()=>i(e=>!e),[i]);return(0,n.useEffect)(()=>{s||y(h.selectedFilters)},[s,h.selectedFilters]),(0,r.jsxs)("div",{className:"flex items-center gap-1 lg:gap-4",children:[(0,r.jsxs)(b.$n,{design:L.A.OUTLINED_SMALL,disabled:!1,className:"hidden md:flex items-center font-medium whitespace-nowrap",onClick:N,children:[(0,r.jsx)(b.C3,{text:a("color")}),x&&(0,r.jsx)(b.C3,{text:S}),(0,r.jsx)(b.a2,{className:(0,d.A)(O.rY,"text-(--black)!",{"rotate-180":l})})]}),(0,r.jsx)(eL,{disabled:!1,draftSelected:u,setDraftSelected:y}),(0,r.jsx)(J,{title:"Products.markets",marketTypes:null==(t=h.filters)?void 0:t.marketTypes}),(0,r.jsxs)(b.$n,{customColors:!0,className:"font-medium whitespace-nowrap",design:L.A.OUTLINED_SMALL,onClick:j,children:[(0,r.jsx)(b.a2,{className:"icon-filter text-xl text-(--black)"}),(0,r.jsx)(b.C3,{text:a("filter")})]}),(0,r.jsx)(p.A,{showFooterOn:"both",desktopPosition:"right",mobilePosition:"bottom",hideOnCloseIcon:!0,isOpen:s,onClose:I,className:" [&>div]:rounded-3xl  [&>div]:lg:rounded-none  [&>div]:overflow-y-auto ",maxWidthClassName:"max-w-106.5!",maxHeightClassName:"h-[calc(100vh-124px)] lg:h-screen",footer:(0,r.jsxs)("section",{className:"w-full flex flex-col gap-3 lg:flex-row justify-end",children:[(0,r.jsx)(b.$n,{customColors:!0,className:"w-full whitespace-nowrap",design:L.A.FILLED_MEDIUM,onClick:A,children:(0,r.jsx)(b.C3,{text:a("Filters.showResults"),className:"text-[18px] lg:text-[14px]"})}),(0,r.jsxs)(b.$n,{customColors:!0,className:"w-full whitespace-nowrap justify-center",design:L.A.LINK_GREEN_BIG,onClick:w,children:[(0,r.jsx)(b.a2,{className:"icon-delete"}),(0,r.jsx)(b.C3,{text:a("Filters.clearFilters"),className:"text-[18px] lg:text-[14px]"})]})]}),children:(0,r.jsx)(ek,{draftSelected:u,filters:h.filters,setDraftSelected:y,onClose:I})})]})},eK=e=>{var t;return e.startsWith("#")||e.startsWith("rgb")?e:null!=(t=({BURGUNDY:"#800020",RED_BURGUNDY:"#800020",WHITE:"#ffffff",BEIGE:"#c0ae92",NEUTRAL_BEIGE:"#c0ae92",TEAL:"#008080",ULTRA_VIOLET:"#48305d"})[e])?t:e.toLowerCase()},eD=()=>{var e,t,l;let{state:i}=M(),{toggleColor:a}=c(),n=null!=(l=null==(e=i.filters)?void 0:e.colors)?l:[],s=null==(t=i.selectedFilters)?void 0:t.predominantColor,o=Array.isArray(s)?s:s?[s]:[];return(0,r.jsx)("div",{className:(0,d.A)("items-center justify-between w-full gap-1 mt-4 hidden md:flex",!1),children:n.map((e,t)=>{var l;let i=o.some(t=>(null==t?void 0:t.value)===e.value);return(0,r.jsxs)("button",{type:"button",className:"flex flex-col items-center cursor-pointer select-none",onClick:()=>a({title:e.label,value:e.value}),children:[(0,r.jsx)("div",{className:(0,d.A)("w-[40px] h-[40px] rounded-full mb-2 border-2",{"border-(--gray-40)":"WHITE"===e.value&&!i,"ring-2 ring-(--aqua-light) ring-offset-2":i}),style:{background:eK(e.value)}}),(0,r.jsx)("p",{className:"text-(--black-100) text-xs mb-1",children:e.label}),(0,r.jsxs)("p",{className:"text-(--gray-60) text-xs",children:["(",null!=(l=e.count)?l:0,")"]})]},"".concat(e.value,"-").concat(t))})})};function eG(e){let{className:t}=e,l=(0,m.c3)("Products"),{setOrderBy:i}=c(),a=e=>{switch(e){case"name":i("name");break;case"-name":i("-name");break;case"newest":i("newest");break;case"oldest":i("oldest");break;default:i(e)}};return(0,r.jsxs)(K.Ay,{showAsAPopup:!0,className:t,children:[(0,r.jsx)(K.Ay.Toggle,{children:(0,r.jsxs)(b.$n,{className:"font-medium whitespace-nowrap",design:L.A.OUTLINED_SMALL,children:[(0,r.jsx)(b.C3,{text:l("sortBy")}),(0,r.jsx)(b.a2,{className:"icon-chevron-down text-xl text-(--black)!"})]})}),(0,r.jsxs)(K.Ay.Menu,{className:" top-11 right-0 left-auto h-48 w-63 py-0! border border-black rounded-2xl overflow-hidden font-medium  [&>div]:flex [&>div]:items-center [&>div]:h-12 ",children:[(0,r.jsx)(K.Ay.Item,{onClick:()=>a("name"),children:l("Filters.ascending")}),(0,r.jsx)(K.Ay.Item,{onClick:()=>a("-name"),children:l("Filters.descending")}),(0,r.jsx)(K.Ay.Item,{onClick:()=>a("newest"),children:l("Filters.newest")}
1),(0,r.jsx)(K.Ay.Item,{onClick:()=>a("oldest"),children:l("Filters.oldest")})]})]})}var eV=l(15933),eU=l(36112),eH=l(21929);function eq(){let e=(0,eV._)(["\n    query filters($lang: String!, $facetFilters: GenericScalar) {\n  patternFacetCounts(lang: $lang, filters: $facetFilters) {\n    marketSegments {\n      id\n      name\n      count\n      sectors {\n        id\n        name\n        count\n      }\n    }\n    warranty {\n      value\n      label\n      count\n    }\n    topcoat {\n      id\n      name\n      count\n    }\n    total\n    predominantColors {\n      value\n      label\n      count\n    }\n    compositions {\n      label\n      value\n      count\n    }\n    textures {\n      label\n      value\n      count\n    }\n    flameRetardancyTests {\n      id\n      name\n      count\n    }\n    sustainabilityBiobasedPvcBioAttributed\n    sustainabilityPhthalateFreeProduct\n    sustainabilityFrFree\n    sustainabilityMpFree\n    sustainabilityCytotoxicity\n    sustainabilitySkinSafeSensitization\n    sustainabilitySkinSafeIrritation\n    sustainabilityAntimicrobial\n    sustainabilityBackingProfile\n    sustainabilityProp65\n    sustainabilityReach\n    sustainabilityRohs\n    sustainabilityGreenguard\n    sustainabilityIndoorAirQuality\n    sustainabilityGlobalRecycledStandard\n    sustainabilityAPlusEmissions\n    sustainabilityEpd\n    sustainabilityLeed\n    sustainabilityWell\n    generalReversible\n    otherattributesRuleMed\n    otherattributesRuleUkca\n    otherattributesSulfideStaining\n    otherattributesAntiStatic\n    otherattributesTemperatureReductionTreatment\n    otherattributesEcosense\n    otherattributesPetFriendly\n    otherattributesAntifungal\n    otherattributesNoBiocides\n    otherattributesFormaldehydeFree\n    otherattributesNoFlameRetardants\n    otherattributesPolycarbonateResinSystem\n    otherattributesSoftside\n    otherattributesCompassHb\n    otherattributesIntagliodesigns\n    otherattributesIpaCleanable\n    otherattributesBleachCleanable\n    otherattributesDenimDyeResistant\n    otherattributesHeatSealable\n    otherattributesHydrolysis\n    otherattributesMildewResistant\n    otherattributesIsAntibacterial\n    otherattributesHasNotHeavyMetals\n    otherattributesHealthcare\n    otherattributesPetFriendly\n    otherattributesProp65Compliant\n    otherattributesIntagliodesigns\n  }\n}\n    "]);return eq=function(){return e},e}let ez={},eY=(0,eU.J1)(eq()),eW=new Set(["search","after"]),eQ=e=>null!=e&&("boolean"==typeof e?e:"string"==typeof e?e.trim().length>0:!Array.isArray(e)||e.length>0),eZ=e=>Object.entries(e).some(e=>{let[t,l]=e;return!eW.has(t)&&eQ(l)}),eJ=e=>{var t;return(null!=(t=null==e?void 0:e.count)?t:0)>0},eX=["colors","designTexture","compositions","flammability","topcoat","warranty","otherAttributes"],e0=(e,t)=>"".concat(e,"::").concat(String(null!=t?t:"")),e1=e=>{let t=new Set;return eX.forEach(l=>{let r=e[l];Array.isArray(r)&&r.forEach(e=>{eJ(e)||t.add(e0(l,null==e?void 0:e.value))})}),Array.isArray(e.marketTypes)&&e.marketTypes.forEach(e=>{eJ(e)||t.add(e0("marketTypes",null==e?void 0:e.id)),Array.isArray(null==e?void 0:e.sectors)&&e.sectors.forEach(e=>{eJ(e)||t.add(e0("sectors",null==e?void 0:e.id))})}),Array.isArray(e.sustainability)&&e.sustainability.forEach(e=>{Array.isArray(null==e?void 0:e.children)&&e.children.forEach(e=>{eJ(e)||t.add(e0("sustainability",null==e?void 0:e.value))})}),t},e2=(e,t)=>{let l=e=>l=>!t.has(e0(e,null==l?void 0:l.value)),r=(e,t)=>Array.isArray(t)?t.filter(l(e)):t,i={...e};return eX.forEach(t=>{i[t]=r(t,e[t])}),i.marketTypes=Array.isArray(e.marketTypes)?e.marketTypes.map(e=>({...e,sectors:Array.isArray(null==e?void 0:e.sectors)?e.sectors.filter(e=>!t.has(e0("sectors",null==e?void 0:e.id))):null==e?void 0:e.sectors})).filter(e=>!t.has(e0("marketTypes",null==e?void 0:e.id))):e.marketTypes,i.sustainability=Array.isArray(e.sustainability)?e.sustainability.map(e=>({...e,children:Array.isArray(null==e?void 0:e.children)?e.children.filter(e=>!t.has(e0("sustainability",null==e?void 0:e.value))):null==e?void 0:e.children})).filter(e=>{var t,l;return(null!=(l=null==e||null==(t=e.children)?void 0:t.length)?l:0)>0}):e.sustainability,i},e5=Object.fromEntries(g().map(e=>[e.id,e.i18nKey])),e3=(e,t)=>
1e.map(e=>{let l=e5[e];return{label:null!=l?l:e,value:e,count:"number"==typeof t[e]?t[e]:0,i18nKey:l}}),e6=e=>S().map(t=>{let l=e3(t.keys,e);return{label:t.label,value:"".concat("group:").concat(t.label),children:l}}),e8=e=>v().map(t=>({label:t.i18nKey,value:t.id,count:"number"==typeof(null==e?void 0:e[t.id])?e[t.id]:0}));var e4=l(46453),e9=l(82207);let e7={flameRetardancyTests:"successFlameRetardancyTests",predominantColor:"products_PredominantColors",design:"productcategorization_Appearance_Contains",composition:"general_Composition_In",sectorIds:"sectors__In",slugs:"slug_In",search:"name_Icontains",topcoatIds:"general_Topcoat_Id_In",warranty:"productcategorization_Warranty"},te=e=>{let t={isNew:e.isNew,after:e.after,marketsSlugs:e.marketSlugs,saleable:!0},l=Object.entries(e).reduce((e,t)=>{let[l,r]=t;if(void 0===r)return e;let i=e7[l];if(i)return e[i]=r,e;let a=A[l];return a?e[a]=r:e[l]=r,e},{});return{...t,...l}},tt={[eI.Qx.lat.instanceId]:e=>e.replace("419","la"),[eI.Qx.eu.instanceId]:e=>e.includes("uk")?e.split("-")[1]:e.includes("eu")?e.split("-")[0]:e.includes("ca")?"es-es":e,[eI.Qx.mx.instanceId]:e=>e};var tl=l(38396);let tr=e=>{let t=(0,e9.o)(),l=(0,e4.Ym)(),{instance:r,config:a}=(0,$.N)(),s=(0,ew.A)(),o=(0,n.useRef)(null),u="us"===r,c="eu"===r,d=(0,n.useMemo)(()=>{if(u)return[s,...a.additionalInstances];if(c){var e;let t=null!=(e=l.split("-")[1])?e:l;return a.instancesByLanguage?[a.instancesByLanguage[t]]:[s]}return[s]},[s,l,u,c,a.additionalInstances,a.instancesByLanguage]),m=tt[a.instanceId]?tt[a.instanceId](l):t,b=B((0,n.useMemo)(()=>te(e),[e])),p=(0,n.useMemo)(()=>eZ(e),[e]),y=(0,n.useRef)(p);y.current=p;let h=(0,n.useRef)(null),{data:f,loading:g,error:v}=function(e){let t={...ez,...e};return eH.IT(eY,t)}({variables:{lang:m,facetFilters:{...b,products_Instances:d}},fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first"});return(0,n.useEffect)(()=>{var e,t,l,r,a,n,s,u,c,d,m,b;if(!f||o.current===f)return;o.current=f;let p=null==f?void 0:f.patternFacetCounts,g=null!=(r=null==p?void 0:p.total)?r:0,v=null!=(a=null==p?void 0:p.predominantColors)?a:[],x=null!=(n=null==p?void 0:p.textures)?n:[],S=null!=(s=null==p?void 0:p.compositions)?s:[],A=null!=(u=null==p?void 0:p.flameRetardancyTests)?u:[],w=null!=(c=null==p?void 0:p.topcoat)?c:[],I=null!=(d=null==p?void 0:p.warranty)?d:[],j={marketTypes:null!=(m=null==p||null==(e=p.marketSegments)?void 0:e.map(e=>({...e,isSelected:!1})))?m:[],total:g,colors:v.map(e=>{var t;return{label:null==e?void 0:e.label,value:null==e?void 0:e.value,count:null!=(t=null==e?void 0:e.count)?t:0}}),designTexture:x.map(e=>{var t,l;return{label:(0,eC.A)(null!=(t=null==e?void 0:e.label)?t:""),value:null==e?void 0:e.value,count:null!=(l=null==e?void 0:e.count)?l:0}}),compositions:S.map(e=>{var t;return{label:null==e?void 0:e.label,value:null==e?void 0:e.value,count:null!=(t=null==e?void 0:e.count)?t:0}}),flammability:A.map(e=>{var t;return{label:null==e?void 0:e.name,value:null==e?void 0:e.id,count:null!=(t=null==e?void 0:e.count)?t:0}}),topcoat:w.map(e=>{var t;return{label:null==e?void 0:e.name,value:null==e?void 0:e.id,count:null!=(t=null==e?void 0:e.count)?t:0}}),warranty:I.map(e=>{var t;return{label:null==e?void 0:e.label,value:null==e?void 0:e.value,count:null!=(t=null==e?void 0:e.count)?t:0}}),sustainability:e6(p),otherAttributes:e8(p)},N=j;if(y.current)h.current&&(N=e2(j,h.current));else{let e=e1(j);h.current=e,N=e2(j,e)}i.i.dispatch({type:"SET_INITIAL_DATA",payload:{filters:{...N}}});let k=i.i.getState(),C=null==(t=k.selectedFilters)?void 0:t.marketSlugs,E=null==(l=k.selectedFilters)?void 0:l.sectorIds;if(Array.isArray(C)&&C.length>0&&!(Array.isArray(E)&&E.length>0)){let e=null!=(b=null==p?void 0:p.marketSegments)?b:[],t=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]/g,""),l=Object.entries(tl.OZ).reduce((e,l)=>{let[r,i]=l;return e[t(r)]=i,e},{}),r=e.filter(e=>{var r;let i=l[t(String(null!=(r=null==e?void 0:e.name)?r:""))];return C.some(e=>e.toLowerCase()===i)}).flatMap(e=>{var t,l,r;if(!e)return[];let i=String(null!=(t=e.id)?t:""),a=String(null!=(l=e.name)?l:"");
1return(null!=(r=e.sectors)?r:[]).filter(Boolean).map(e=>{var t,l,r;return{marketId:i,marketName:a,sectorId:String(null!=(t=e.id)?t:""),sectorName:String(null!=(l=e.name)?l:""),title:"".concat(a,"/").concat(String(null!=(r=e.name)?r:""))}}).filter(e=>e.sectorId)});r.length>0&&i.i.dispatch({type:"SET_SELECTED_FILTERS",payload:{sectorIds:r,marketSlugs:null}})}},[f]),{facetFiltersInput:b,filtersLoading:g,filtersError:v}},ti=()=>{var e;let t=(0,m.c3)("Products"),{searchProducts:l}=c(),{adaptedFilters:i,state:a}=M(),u="string"==typeof(null==(e=a.selectedFilters)?void 0:e.search)?a.selectedFilters.search:"";tr((0,n.useMemo)(()=>{let{search:e,after:t,...l}=i;return l},[i]));let[b,p]=(0,n.useState)(!1),[y,h]=(0,n.useState)(!1),f=y&&!b,g=(0,n.useCallback)(()=>{l("")},[l]),v=(0,n.useCallback)(e=>{l(e.trim()),p(!1)},[l]);return(0,n.useEffect)(()=>{let e=window.scrollY,t=()=>{let t=window.scrollY,l=t>e;e=t,h(t>120&&l)};return window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[]),(0,r.jsx)("div",{className:"w-full mx-auto",children:(0,r.jsxs)("div",{className:(0,d.A)("w-full bg-(--background) mt-6 py-4 flex gap-4 flex-col relative z-10 md:pt-15 top-0","transition-all duration-200",f?"opacity-0 -translate-y-4 pointer-events-none":"opacity-100 translate-y-0"),children:[(0,r.jsx)(s.default,{}),(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-col md:flex-row",children:[(0,r.jsx)(o.A,{onClear:g,onSearch:v,placeholder:t("searchProducts"),className:"md:max-w-[150px] lg:max-w-[248px]",value:u,debounceMs:300}),(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsx)(eO,{showOptionsColors:b,setShowOptionsColors:p}),(0,r.jsx)(eG,{className:"inline-flex md:hidden 2xl:inline-flex"})]})]}),b&&(0,r.jsx)(eD,{})]})})},ta=e=>{var t,l,i,a,n;let{totalItems:s,itemsPerPage:o,currentItemsCount:u,onPageChange:c,paginationData:d,totalPages:b}=e,p=(0,m.c3)("Pagination"),y=null==d?void 0:d.first,h=null==d?void 0:d.last,f=null==d?void 0:d.next,g=null==d?void 0:d.previous,v=null==d||null==(t=d.around)?void 0:t.find(e=>null==e?void 0:e.isCurrent),x=null!=(a=null==v?void 0:v.page)?a:1,S=s>0&&u>0,A=S?o*(x-1)+1:0,w=S?Math.min(A+u-1,s):0;return(0,r.jsxs)("div",{className:"mt-6 mb-2 flex flex-col md:flex-row md:items-center md:w-full md:justify-between md:flex-wrap lg:flex-nowrap pb-10",children:[(0,r.jsxs)("div",{className:"text-xs uppercase font-medium text-(--aqua-dark) whitespace-nowrap",children:[A,"–",w," ",p("of")," ",s]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center space-x-1 text-(--spg-primary)",children:[(0,r.jsxs)("button",{className:"px-2 py-1 hover:bg-gray-100 disabled:opacity-50 flex items-center cursor-pointer disabled:cursor-not-allowed disabled:hidden",onClick:()=>c(null==y?void 0:y.cursor),disabled:!(null==y?void 0:y.cursor),children:[(0,r.jsx)("i",{className:"icon-firstpage text-xl"}),(0,r.jsx)("span",{className:"ml-1 text-(--aqua-dark) text-base",children:p("first")})]}),(0,r.jsxs)("button",{className:"px-2 py-1 text-base hover:bg-gray-100 disabled:opacity-50 flex items-center cursor-pointer disabled:cursor-not-allowed disabled:hidden",onClick:()=>c(null==g?void 0:g.cursor),disabled:!(null==g?void 0:g.cursor),children:[(0,r.jsx)("i",{className:"icon-chevron-left mr-1 text-(--aqua-dark) text-xl"}),p("previous")]}),null==d||null==(l=d.around)?void 0:l.map((e,t)=>(0,r.jsx)("button",{className:"w-8 h-8 flex items-center justify-center border rounded-full text-base transition ".concat((null==e?void 0:e.isCurrent)?"bg-(--aqua-10) text-(--aqua-dark) md:pointer-events-none":"hover:bg-gray-100 cursor-pointer"),onClick:()=>c(null==e?void 0:e.cursor),disabled:!(null==e?void 0:e.cursor),children:null==e?void 0:e.page},"btn-".concat(t))),(0,r.jsxs)("button",{className:"px-2 py-1 text-base hover:bg-gray-100 disabled:opacity-50 flex items-center cursor-pointer disabled:cursor-not-allowed disabled:hidden",onClick:()=>c(null==f?void 0:f.cursor),disabled:!(null==f?void 0:f.cursor),children:[p("next")," ",(0,r.jsx)("i",{className:"icon-chevron-right ml-1 text-(--aqua-dark) text-xl"})]}),(0,r.jsxs)("button",{className:"px-2 py-1 hover:bg-gray-100 disabled:opacity-50 flex items-center cursor-pointer disabled:cursor-not-allowed disabled:hidden",onClick:()=>
1c(null==h?void 0:h.cursor),disabled:!(null==h?void 0:h.cursor),children:[(0,r.jsx)("span",{className:"text-(--aqua-dark) text-base hidden md:block mr-1",children:p("last")}),(0,r.jsx)("i",{className:"icon-lastpage text-xl"})]})]}),(0,r.jsxs)("div",{className:"CUSTOM-CLASS-MOBILE-PAGINATION-PLP flex md:hidden items-center justify-between space-x-2 text-(--spg-primary) mt-1",children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-(--aqua-dark)",children:[p("page")," ",(0,r.jsxs)("div",{className:"SELECT-PAGINATION-MOBILE relative inline-block",children:[(0,r.jsx)("select",{value:null!=(n=null==v?void 0:v.cursor)?n:"",disabled:b<=1,onChange:e=>c(e.target.value),className:"appearance-none bg-(--aqua-10) border border-(--black-100) rounded-full px-2 py-2 pr-8 text-center focus:outline-none mx-2 cursor-pointer disabled:cursor-not-allowed",children:null==d||null==(i=d.around)?void 0:i.map((e,t)=>{var l;return(0,r.jsx)("option",{value:null!=(l=null==e?void 0:e.cursor)?l:"",children:null==e?void 0:e.page},t)})}),(0,r.jsx)("i",{className:"icon-chevron-down text-base text-(--aqua-dark) absolute top-[10px] right-[18px] pointer-events-none"})]})," ",p("of")," ",b]}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("button",{className:"px-2 py-1 hover:bg-gray-100 disabled:opacity-50 disabled:hidden flex items-center",onClick:()=>c(null==y?void 0:y.cursor),disabled:!(null==y?void 0:y.cursor),children:(0,r.jsx)("i",{className:"icon-firstpage text-xl"})}),(0,r.jsx)("button",{className:"px-2 py-1 text-base hover:bg-gray-100 disabled:opacity-50 disabled:hidden flex items-center cursor-pointer disabled:cursor-not-allowed",onClick:()=>c(null==g?void 0:g.cursor),disabled:!(null==g?void 0:g.cursor),children:(0,r.jsx)("i",{className:"icon-chevron-left mr-1 text-(--aqua-dark) text-xl"})}),(0,r.jsx)("button",{className:"px-2 py-1 text-base hover:bg-gray-100 disabled:opacity-50 disabled:hidden flex items-center cursor-pointer disabled:cursor-not-allowed",onClick:()=>c(null==f?void 0:f.cursor),disabled:!(null==f?void 0:f.cursor),children:(0,r.jsx)("i",{className:"icon-chevron-right ml-1 text-(--aqua-dark) text-xl"})}),(0,r.jsx)("button",{className:"px-2 py-1 hover:bg-gray-100 disabled:opacity-50 disabled:hidden flex items-center cursor-pointer disabled:cursor-not-allowed",onClick:()=>c(null==h?void 0:h.cursor),disabled:!(null==h?void 0:h.cursor),children:(0,r.jsx)("i",{className:"icon-lastpage text-xl"})})]})]})]})},tn=()=>window.matchMedia("(min-width: 1920px)").matches?15:window.matchMedia("(min-width: 1440px)").matches?16:window.matchMedia("(min-width: 1024px)").matches?12:8,ts=e=>(window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)),to=()=>12,tu=()=>{let{setPageSize:e}=c(),t=(0,n.useSyncExternalStore)(ts,tn,to);return(0,n.useEffect)(()=>{e(t)},[t,e]),{itemsPerPage:t}},tc=()=>{let{state:e}=M(),{changePageProducts:t}=c(),{itemsPerPage:l}=tu(),i=e.totalProducts>0?Math.ceil(e.totalProducts/l):1;return(0,r.jsx)("section",{className:"flex justify-between items-end mb-4",children:(0,r.jsx)(ta,{paginationData:e.pagination,totalPages:i,onPageChange:e=>{t(null!=e?e:"")},itemsPerPage:l,totalItems:e.totalProducts,currentItemsCount:e.products.length})})};var td=l(30383);let tm=()=>(0,r.jsxs)("div",{className:"flex flex-col rounded-lg p-[5px] bg-white",children:[(0,r.jsx)(td.A,{height:160,borderRadius:8,className:"mb-2"}),(0,r.jsx)(td.A,{height:16,width:"75%",className:"mb-1"}),(0,r.jsx)(td.A,{height:16,width:"50%",className:"mb-1"}),(0,r.jsx)(td.A,{height:32,borderRadius:6,className:"mt-2"})]});var tb=l(62938),tp=l(32348),ty=l(27542);function th(){let e=(0,eV._)(["\n    query catalog($lang: String, $after: String, $first: Int, $orderBy: String, $instanceIds: [ID], $predominantColor: String, $sectorIds: [ID], $design: [String], $composition: String, $search: String, $brandsIds: [ID], $saleable: Boolean, $isNew: Boolean, $topcoatIds: [ID], $warranty: ID, $flameRetardancyTests: [ID], $sustainabilityBiobasedPvcBioAttributed: Boolean, $sustainabilityBackingProfile: Boolean, $sustainabilityProp65: Boolean, $sustainabilityReach: Boolean, $sustainabilityRohs: Boolean, $sustainabilityGreenguard: Boolean, $sustainabilityIndoorAirQuality: Boolean, $sustainabilityGlobalRecycledStandard: Boolean, $sustainabilityAPlusEmissions: Boolean, $sustainabilityEpd: Boolean, $sustainabilityLeed: Boolean, $sustainabilityWell: Boolean, $sustainabilityPhthalateFreeProductIn: String, $sustainabilityFrFreeIn: String, $sustainabilityMpFreeIn: String, $sustainabilityCytotoxicityIn: String, $sustainabilitySkinSafeSensitizationIn: String, $sustainabilitySkinSafeIrritationIn: String, $sustainabilityAntimicrobialIn: String, $marketSlugs: [String], $lowEmissions: Boolean, $cleanFormulations: Boolean, $general_Reversible: Boolean, $otherattributes_RuleMed: Boolean, $otherattributes_RuleUkca: Boolean, $otherattributes_IsAntistatic: Boolean, $otherattributes_Ecosense: Boolean, $otherattributes_PetFriendly: Boolean, $otherattributes_Antifungal: Boolean, $otherattributes_NoBiocides: Boolean, $otherattributes_FormaldehydeFree: Boolean, $otherattributes_NoFlameRetardants: Boolean, $otherattributes_PolycarbonateResinSystem: Boolean, $otherattributes_Softside: Boolean, $otherattributes_Prostock: Boolean, $otherattributes_CompassHb: Boolean, $otherattributes_IpaCleanable: Boolean, $otherattributes_BleachCleanable: Boolean, $otherattributes_DenimDyeResistant: Boolean, $otherattributes_HeatSealable: Boolean, $otherattributes_Hydrolysis: Boolean, $otherattributes_MildewResistant: Boolean, $otherattributes_IsAntibacterial: Boolean, $otherattributes_HasNotHeavyMetals: Boolean, $otherattributes_Intagliodesigns: Boolean, $otherattributes_sulfide_staining: Boolean, $otherattributes_TemperatureReductionTreatment: Boolean) {\n  catalogSearch(\n    first: $first\n    after: $after\n    orderBy: $orderBy\n    instanceIds: $instanceIds\n    search: $search\n    predominantColor: $predominantColor\n    sectorIds: $sectorIds\n    design: $design\n    composition: $composition\n    brandsIds: $brandsIds\n    saleable: $saleable\n    topcoatIds: $topcoatIds\n    warranty: $warranty\n    flameRetardancyTests: $flameRetardancyTests\n    isNew: $isNew\n    sustainabilityBiobasedPvcBioAttributed: $sustainabilityBiobasedPvcBioAttributed\n    sustainabilityBackingProfile: $sustainabilityBackingProfile\n    sustainabilityProp65: $sustainabilityProp65\n    sustainabilityReach: $sustainabilityReach\n    sustainabilityRohs: $sustainabilityRohs\n    sustainabilityGreenguard: $sustainabilityGreenguard\n    sustainabilityIndoorAirQuality: $sustainabilityIndoorAirQuality\n    sustainabilityGlobalRecycledStandard: $sustainabilityGlobalRecycledStandard\n    sustainabilityAPlusEmissions: $sustainabilityAPlusEmissions\n    sustainabilityEpd: $sustainabilityEpd\n    sustainabilityLeed: $sustainabilityLeed\n    sustainabilityWell: $sustainabilityWell\n    sustainabilityPhthalateFreeProductIn: $sustainabilityPhthalateFreeProductIn\n    sustainabilityFrFreeIn: $sustainabilityFrFreeIn\n    sustainabilityMpFreeIn: $sustainabilityMpFreeIn\n    sustainabilityCytotoxicityIn: $sustainabilityCytotoxicityIn\n    sustainabilitySkinSafeSensitizationIn: $sustainabilitySkinSafeSensitizationIn\n    sustainabilitySkinSafeIrritationIn: $sustainabilitySkinSafeIrritationIn\n    sustainabilityAntimicrobialIn: $sustainabilityAntimicrobialIn\n    marketSlugs: $marketSlugs\n    lowEmissions: $lowEmissions\n    cleanFormulations: $cleanFormulations\n    generalReversible: $general_Reversible\n    otherattributesRuleMed: $otherattributes_RuleMed\n    otherattributesRuleUkca: $otherattributes_RuleUkca\n    otherattributesIsAntistatic: $otherattributes_IsAntistatic\n    otherattributesEcosense: $otherattributes_Ecosense\n    otherattributesPetFriendly: $otherattributes_PetFriendly\n    otherattributesAntifungal: $otherattributes_Antifungal\n    otherattributesNoBiocides: $otherattributes_NoBiocides\n    otherattributesFormaldehydeFree: $otherattributes_FormaldehydeFree\n    otherattributesNoFlameRetardants: $otherattributes_NoFlameRetardants\n    otherattributesPolycarbonateResinSystem: $otherattributes_PolycarbonateResinSystem\n    otherattributesSoftside: $otherattributes_Softside\n    otherattributesProstock: $otherattributes_Prostock\n    otherattributesCompassHb: $otherattributes_CompassHb\n    otherattributesIpaCleanable: $otherattributes_IpaCleanable\n    otherattributesBleachCleanable: $otherattributes_BleachCleanable\n    otherattributesDenimDyeResistant: $otherattributes_DenimDyeResistant\n    otherattributesHeatSealable: $otherattributes_HeatSealable\n    otherattributesHydrolysis: $otherattributes_Hydrolysis\n    otherattributesMildewResistant: $otherattributes_MildewResistant\n    otherattributesIsAntibacterial: $otherattributes_IsAntibacterial\n    otherattributesHasNotHeavyMetals: $otherattributes_HasNotHeavyMetals\n    otherattributesIntagliodesigns: $otherattributes_Intagliodesigns\n    otherattributesSulfideStaining: $otherattributes_sulfide_staining\n    otherattributesTemperatureReductionTreatment: $otherattributes_TemperatureReductionTreatment\n  ) {\n    totalCount\n    pageCursors {\n      around {\n        cursor\n        isCurrent\n        page\n      }\n      first {\n        cursor\n        isCurrent\n        page\n      }\n      last {\n        cursor\n        isCurrent\n        page\n      }\n      next {\n        cursor\n        isCurrent\n        page\n      }\n      previous {\n        cursor\n        isCurrent\n        page\n      }\n    }\n    edges {\n      node {\n        __typename\n        ... on PatternNode {\n          id\n          name\n          altName\n          slug\n          isNew\n          imageThumbSmall\n          stores {\n            totalCount\n          }\n          marketName(lang: $lang)\n          sectors(dedup: true) {\n            edges {\n              node {\n                market {\n                  name\n                  icon\n                }\n              }\n            }\n          }\n          products(first: $first, instances: $instanceIds) {\n            totalCount\n            edges {\n              node {\n                id\n                code\n                stock\n                color\n                imageThumbSmall\n                isNew\n              }\n            }\n          }\n        }\n        ... on ProductNode {\n          id\n          code\n          stock\n          color\n          imageThumbSmall\n          isNew\n          pattern {\n            ...SinglePatternFragment\n          }\n        }\n      }\n    }\n  }\n}\n    ",""]);return th=function(){return e},e}let tf={},tg=(0,eU.J1)(th(),ty.HT),tv=e=>{let{hasPredominantColors:t,instanceId:l,pageSize:r,orderBy:i,after:a,patternsVariables:s}=e,o=(0,e9.o)(),u=(0,e4.Ym)(),{instance:c,config:d}=(0,$.N)(),m="us"===c,b="eu"===c,p=(0,n.useMemo)(()=>
1{if(m)return[l,...d.additionalInstances];if(b){var e;let t=null!=(e=u.split("-")[1])?e:u;return d.instancesByLanguage?[d.instancesByLanguage[t]]:[l]}return[l]},[l,u,m,b,d.additionalInstances,d.instancesByLanguage]),y=tt[d.instanceId]?tt[d.instanceId](u):o,[h,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{f(!0)},[]);let g=!h||!s||0===Object.keys(s).length,v=function(e){let t={...tf,...e};return eH.IT(tg,t)}({variables:B((0,n.useMemo)(()=>({...s,lang:y,first:r,orderBy:i,instanceIds:p,saleable:!0,after:null!=a?a:void 0}),[s,y,r,i,p,a])),fetchPolicy:"cache-first",skip:g});return(0,n.useMemo)(()=>{var e,l,r,i,a;let n=null==(e=v.data)?void 0:e.catalogSearch,o=null!=(l=null==n?void 0:n.edges)?l:[],u=s.search,c=!!(u&&u.trim().length>0),d=!1,m=!1,b=[],p=[];for(let e of o){let t=null==e||null==(r=e.node)?void 0:r.__typename;"PatternNode"===t&&(d=!0,b.push(e)),"ProductNode"===t&&(m=!0,p.push(e))}let y=(e=>e.hasSearch&&e.hasPatterns&&e.hasProducts?"mixed":e.hasPredominantColors?"products":"patterns")({hasSearch:c,hasPatterns:d,hasProducts:m,hasPredominantColors:t}),h="mixed"===y?[...b,...p]:o;return{mode:y,loading:v.loading,error:v.error,resolved:!v.loading&&!!n,products:h,total:null!=(i=null==n?void 0:n.totalCount)?i:null,pagination:null!=(a=null==n?void 0:n.pageCursors)?a:null}},[t,v.loading,v.error,v.data,r,i,a,l,s])},tx=e=>(null==e?void 0:e.__typename)==="ProductNode",tS=e=>(null==e?void 0:e.__typename)==="PatternNode";var tA=l(66766);let tw=()=>{let e=(0,m.c3)("Products"),t=e.rich("NotFoundDescription",{br:()=>(0,r.jsx)("br",{})});return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 mt-16",children:[(0,r.jsx)("h2",{className:"text-center",children:e("NotFoundTitle")}),(0,r.jsx)("p",{className:"text-center text-(--gray-60)",children:t}),(0,r.jsx)(tA.default,{src:"/404.svg",alt:"404",width:694,height:320,className:"w-[360px] h-[166px] top-[-20px] md:w-[694px] md:h-[320px] md:top-[-145px] md:left-[-60px] mb-24"})]})},tI=(0,n.memo)(function(e){var t,l,i,a,n;let{node:s,isSelectable:o}=e;if(tS(s)){let e=(null!=(l=null==(t=s.stores)?void 0:t.totalCount)?l:0)>0;return(0,r.jsx)("div",{className:"aspect-w-1 aspect-h-1",children:(0,r.jsx)(tb.Z,{pattern:s,isSelectable:o,isReference:!0,hasDistributor:e})})}if(tx(s)){let e=(null!=(n=null==(a=s.pattern)||null==(i=a.stores)?void 0:i.totalCount)?n:0)>0;return(0,r.jsx)("div",{className:"aspect-w-1 aspect-h-1",children:(0,r.jsx)(tb.Z,{color:s,pattern:s.pattern,isSelectable:o,isReference:!1,hasDistributor:e})})}return null}),tj=e=>{var t;let{isSelectable:l}=e,a=(0,m.c3)("Products"),s=(0,$.N)();null==s||s.instance;let{state:o,adaptedFilters:u}=M(),{pageSize:c,orderBy:d}=o,{itemsPerPage:b}=tu(),p="grid-cols-2 min-[1024px]:grid-cols-3 min-[1440px]:grid-cols-4 min-[1920px]:grid-cols-5",y=(0,ew.A)(),h=(0,tp.d)(u,300,!0),f="string"==typeof h.predominantColor&&h.predominantColor.length>0,g=(0,n.useMemo)(()=>{let{after:e,...t}=h;return t},[h]),v=B((0,n.useMemo)(()=>{let{brands:e,...t}=g;return{...t,brandsIds:e}},[g])),x=null!=(t=h.after)?t:null,{mode:S,loading:A,error:w,products:I,total:j,pagination:N,resolved:k}=tv({hasPredominantColors:f,instanceId:y,pageSize:c,orderBy:d,after:x,patternsVariables:v}),C=(0,n.useRef)(null);(0,n.useEffect)(()=>{k&&i.i.dispatch({type:"SET_RESULTS",payload:{mode:S,products:I,total:null!=j?j:0,currentItemsCount:I.length,pagination:N}})},[k,S,I,j,N]),(0,n.useEffect)(()=>{null!==C.current&&C.current!==x&&window.scrollTo({top:0,behavior:"smooth"}),C.current=x},[x]);let E=(0,n.useMemo)(()=>Array.from({length:b},(e,t)=>t),[b]);return w?(0,r.jsx)("p",{children:a("ErrorToLoadProducts")}):A||!k?(0,r.jsx)("div",{className:"w-full grid ".concat(p," gap-5 pb-8 mx-auto"),children:E.map(e=>(0,r.jsx)("div",{className:"aspect-square w-full",children:(0,r.jsx)(tm,{})},e))}):I&&0!==I.length?(0,r.jsx)("div",{className:"w-full grid ".concat(p," gap-3 md:gap-4 pb-8 holaaa"),children:null==I?void 0:I.map(e=>{let t=null==e?void 0:e.node;return t?(0,r.jsx)(tI,{node:t,isSelectable:l},t.id):null})}):(0,r.jsx)(tw,{})};var tN=l(59487);let tk=e=>null==e?[]:Array.isArray(e)?e:[e],tC=e=>null==e?"":"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):"",tE=e=>{let t=(null!=e?e:"").toString().trim();if(!t)return"—";try{return(0,eC.A)(t)}catch(e){return t}},tT=e=>{if(null==e)return"";if("string"==typeof e||"number"==typeof e)return String(e);if("object"==typeof e){var t,l,r;return tC(null!=(r=null!=(l=null!=(t=e.value)?t:e.id)?l:e.sectorId)?r:e.code)||""}return""},t_=e=>{var t,l,r,i,a;return null==e||"object"!=typeof e?"":tC(null!=(a=null!=(i=null!=(r=null!=(l=null!=(t=e.title)?t:e.label)?l:e.name)?r:e.marketName&&e.sectorName?"".concat(e.marketName,"/").concat(e.sectorName):null)?i:e.sectorName)?a:e.marketName)||""},tR=e=>{var t,l;let r=null==e?void 0:e.sectors;return Array.isArray(r)?r.filter(Boolean):(null!=(l=null==e||null==(t=e.sectors)?void 0:t.edges)?l:[]).map(e=>
1null==e?void 0:e.node).filter(Boolean)},tF=e=>{var t,l,r,i,a;let n=String(null!=(r=null!=(l=null!=(t=null==e?void 0:e.id)?t:null==e?void 0:e.slug)?l:null==e?void 0:e.name)?r:"unknown"),s=String(null!=(a=null!=(i=null==e?void 0:e.name)?i:null==e?void 0:e.title)?a:"Market");return tR(e).map(e=>{var t,l,r;return{marketId:n,marketName:s,sectorId:String(null!=(t=null==e?void 0:e.id)?t:""),sectorName:String(null!=(l=null==e?void 0:e.name)?l:""),title:"".concat(s,"/").concat(String(null!=(r=null==e?void 0:e.name)?r:""))}}).filter(e=>e.sectorId)},tP=()=>{var e;let t=(0,m.c3)("Products"),l=(0,m.c3)("Products.Filters.otherAttributesOptions"),i=(0,m.c3)("Products.Filters.sustainabilityOptions"),{state:a}=M(),{resetFilters:s,toggleColor:o,toggleDesign:u,toggleComposition:d,toggleSectors:p,toggleSustainability:y,toggleTopcoat:h,toggleWarranty:f,toggleFlammability:g,toggleOtherAttribute:v,toggleMarketSlugs:x,searchProducts:S}=c(),A=(0,n.useMemo)(()=>{var e;let{after:t,...l}=null!=(e=a.selectedFilters)?e:{};return l},[a.selectedFilters]),w=(0,n.useMemo)(()=>new Set(["after","beforeCursor","first","last","orderBy","instanceIds","saleable"]),[]),I=(0,n.useMemo)(()=>new Set(["search"]),[]),j=(0,n.useMemo)(()=>{var e,t,r,n,s,o,u,c,d,m,b,p,y,h,f,g,v,x;let S=null!=(m=null==(e=a.filters)?void 0:e.colors)?m:[],A=null!=(b=null==(t=a.filters)?void 0:t.designTexture)?b:[],w=null!=(p=null==(r=a.filters)?void 0:r.compositions)?p:[],I=null!=(y=null==(n=a.filters)?void 0:n.topcoat)?y:[],j=null!=(h=null==(s=a.filters)?void 0:s.warranty)?h:[],N=null!=(f=null==(o=a.filters)?void 0:o.flammability)?f:[],k=null!=(g=null==(u=a.filters)?void 0:u.otherAttributes)?g:[],C=new Map(S.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),E=new Map(A.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),T=new Map(w.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),_=new Map(I.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),R=new Map(j.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),F=new Map(N.map(e=>{var t;return[String(e.value),String(null!=(t=e.label)?t:e.value)]})),P=new Map(k.map(e=>[String(e.value),l(e.label)])),B=new Map;(null!=(v=null==(c=a.filters)?void 0:c.sustainability)?v:[]).forEac
1h(e=>{var t;(null!=(t=null==e?void 0:e.children)?t:[]).forEach(e=>{(null==e?void 0:e.value)&&B.set(String(e.value),i(e.label))})});let $=new Map;return(null!=(x=null==(d=a.filters)?void 0:d.marketTypes)?x:[]).forEach(e=>{var t;let l=String(null!=(t=null==e?void 0:e.name)?t:"");tR(e).forEach(e=>{var t;if(!(null==e?void 0:e.id))return;let r=String(null!=(t=null==e?void 0:e.name)?t:""),i=l&&r?"".concat(l,"/").concat(r):r||l;$.set(String(e.id),i)})}),{colorMap:C,designMap:E,compMap:T,sectorMap:$,sustainabilityMap:B,topcoatMap:_,warrantyMap:R,flammabilityMap:F,otherAttributesMap:P}},[a.filters]),N=(0,n.useMemo)(()=>{var e,t;let l=Object.entries(A).filter(e=>{let[t]=e;return!w.has(t)&&"sectorIds"!==t}).flatMap(e=>{let[t,l]=e;return I.has(t)?[]:tk(l).filter(e=>null!=e&&""!==e).map(e=>({key:t,value:e}))}).filter(e=>{let{value:t}=e;return null!=t&&""!==t}),r=tk(A.sectorIds).filter(e=>null!=e&&""!==e);if(0===r.length)return l;let i=null!=(t=null==(e=a.filters)?void 0:e.marketTypes)?t:[],n=new Map;r.forEach(e=>{let t=e.marketId;if(!t){var l,r,a;let n=String(null!=(r=null!=(l=e.sectorId)?l:e.id)?r:""),s=i.find(e=>tR(e).some(e=>{var t;return String(null!=(t=null==e?void 0:e.id)?t:"")===n}));s&&(t=String(null!=(a=s.id)?a:""))}t&&(n.has(t)||n.set(t,[]),n.get(t).push(e))});let s=[],o=[];return n.forEach((e,t)=>{let l=i.find(e=>String(e.id)===String(t));if(!l)return void o.push(...e.map(e=>({key:"sectorIds",value:e})));let r=tR(l).map(e=>{var t;return String(null!=(t=null==e?void 0:e.id)?t:"")}).filter(Boolean),a=e.map(e=>String(e.sectorId));if(r.length>0&&r.every(e=>a.includes(e)))return void s.push({key:"market",value:{marketId:t,marketName:l.name,type:"market"}});e.forEach(e=>{o.push({key:"sectorIds",value:e})})}),[...l,...s,...o]},[A,w,I,null==(e=a.filters)?void 0:e.marketTypes]),k=N.length>0,C=(e,t)=>{var l,r,i;let n=tT(t),s=t_(t);switch(e){case"predominantColor":return(n?j.colorMap.get(n):void 0)||s||n||"";case"design":return(n?j.designMap.get(n):void 0)||s||n||"";case"composition":return(n?j.compMap.get(n):void 0)||s||n||"";case"topcoat":return(n?j.topcoatMap.get(n):void 0)||s||n||"";case"warranty":return(n?j.warrantyMap.get(n):void 0)||s||n||"";case"flammability":return(n?j.flammabilityMap.get(n):void 0)||s||n||"";case"sustainability":return(n?j.sustainabilityMap.get(n):void 0)||s||n||"";case"otherAttributes":return(n?j.otherAttributesMap.get(n):void 0)||s||n||"";case"sectorIds":{let e=null!=(l=null==t?void 0:t.sectorId)?l:n,r=e?j.sectorMap.get(String(e)):void 0;return s||r||tC(e)||""}case"market":return t.marketName||"";case"marketSlugs":{let e=tC(t).toLowerCase(),l=(null!=(i=null==(r=a.filters)?void 0:r.marketTypes)?i:[]).find(t=>tC(null==t?void 0:t.slug).toLowerCase()===e);return(null==l?void 0:l.name)?tE(String(l.name)):tE(e)}case"search":return n||s||"";default:return s||n||""}},E=(e,t)=>"market"===e?"market:".concat(t.marketId):"".concat(e,":").concat(tT(t)||t_(t)),T=(e,t)=>{let l=tT(t);switch(e){case"predominantColor":{let e=C("predominantColor",t);null==o||o({title:e,value:String(l)});break}case"design":null==u||u(String(l));break;case"composition":null==d||d(String(l));break;case"sectorIds":p([t]);break;case"market":{var r,i;let e=t.marketId,l=(null!=(i=null==(r=a.filters)?void 0:r.marketTypes)?i:[]).find(t=>String(t.id)===String(e));if(!l)return;p(tF(l));break}case"topcoat":null==h||h(String(l));break;case"warranty":null==f||f(String(l));break;case"flammability":null==g||g(String(l));break;case"sustainability":null==y||y(String(l));break;case"otherAttributes":null==v||v(String(l));break;case"marketSlugs":x([String(l)]);break;case"search":null==S||S("")}};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[k&&(0,r.jsx)("section",{className:"flex flex-wrap gap-2 items-center",children:N.map(e=>{let{key:t,value:l}=e,i=C(t,l);return i?(0,r.jsxs)(tN.YD,{size:"md",rounded:"full",variant:"filled",color:"var(--gray-20)",textColor:"var(--gray-70)",children:[(0,r.jsx)(tN.d1,{label:i}),(0,r.jsx)("div",{className:"",children:(0,r.jsx)(tN.jw,{onRemove:()=>T(t,l),iconClassName:"icon-close"})})]},E(t,l)):null})}),(0,r.jsxs)("div",{className:"flex justify-between items-center pb-4",children:[(0,r.jsxs)("section",{className:"flex items-center",children:[(0,r.jsxs)("p",{className:"mb-0 text-(--aqua-100) text-sm",children:[a.totalProducts||"00000"," ",t("results")]}),k&&(0,r.jsxs)(b.$n,{disabled:!1,onClick:s,design:L.A.LINK_GREEN_SMALL,children:[(0,r.jsx)(b.a2,{className:"icon-delete"}),(0,r.jsx)(b.C3,{text:t("Filters.clearFilters")})]})]}),(0,r.jsx)(eG,{className:"hidden md:inline-flex 2xl:hidden"})]})]})},tB=()=>((0,a.e)(),(0,n.useEffect)(()=>()=>{let{keepFilters:e}=i.i.getState();e?i.i.dispatch({type:"SET_KEEP_FILTERS",payload:!1}):i.i.dispatch({type:"RESET_FILTERS"})},[]),(0,r.jsxs)("div",{className:"container 2xl:max-w-[1540px]! mx-auto flex flex-col m-4 md:px-4",children:[(0,r.jsx)(ti,{}),(0,r.jsx)(tP,{}),(0,r.jsx)(tj,{isSelectable:!1}),(0,r.jsx)(tc,{})]}))},95176:(e,t,l)=>{"use strict";l.d(t,{Qx:()=>s});var r=l(96355),i=l(46956),a=l(61642),n=l(67369);let s={lat:i.K,mx:a.S,eu:r.F,us:n.$}},96281:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var r=l(37662);let i=()=>{let{config:e}=(0,r.N)();return e.instanceId}},97389:(e,t,l)=>{"use strict";l.d(t,{y:()=>s});var r=l(95155),i=l(56671);let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"text-white";return(0,r.jsx)("button",{onClick:()=>i.o.dismiss(),style:{position:"absolute",right:15,top:17,marginLeft:"12px",background:"transparent",border:"none",cursor:"pointer"},children:(0,r.jsx)("i",{className:"icon-close text-lg ".concat(e)})})},n=a(),s={success:(e,t,l)=>{let r=(null==l?void 0:l.color)?a(l.color):n;return i.o.success(e,{id:t||void 0,cancel:r,style:l?{backgroundColor:l.backgroundColor,borderColor:l.borderColor||l.backgroundColor,color:l.color}:void 0})},error:e=>i.o.error(e,{cancel:n}),warning:e=>i.o.warning(e,{cancel:n}),info:e=>i.o.info(e,{cancel:n})}}},e=>{var t=t=>e(e.s=t);e.O(0,[7652,6766,6729,7975,1929,6671,2540,3442,8027,6573,6354,4829,2938,6552,8441,1684,7358],()=>t(24552)),_N_E=e.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.