"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3772],{13772:function(e,t,i){i.d(t,{Z:function(){return ev}});var n=i(57437),o=i(2265),r=i(88862),a=i(99376),l=i(43618),s=i(37302),d=i(26163),c=i(25190),p=i(29918);let u=e=>{var t,i,n,o,r,a,l,s,d,c,p,u,h;let{filter:f,searchKeyword:g}=e,x=null!==(t=null==f?void 0:f.activeId)&&void 0!==t?t:{};return{categories:null!==(i=x.categories)&&void 0!==i?i:[],brand:null!==(n=x.brand)&&void 0!==n?n:"",maxPrice:null!==(o=x.maxPrice)&&void 0!==o?o:"",minPrice:null!==(r=x.minPrice)&&void 0!==r?r:"",size:null!==(a=x.size)&&void 0!==a?a:"",glossiness:null!==(l=x.glossiness)&&void 0!==l?l:"",country:null!==(s=x.country)&&void 0!==s?s:"",subCategory:null!==(d=x.subCategory)&&void 0!==d?d:"",series:null!==(c=x.series)&&void 0!==c?c:"",store:null!==(p=x.store)&&void 0!==p?p:"",location:null!==(u=x.location)&&void 0!==u?u:"",purpose:null!==(h=x.purpose)&&void 0!==h?h:"",isSeamless:!!x.isSeamless,txtSearch:null!=g?g:"",includeWholesale:!!x.includeWholesale}};var h=()=>({fetchSubCategories:(0,o.useCallback)(async e=>{let{filters:t,searchKeyword:i="",onSuccess:n,onError:o}=e,r=u({filter:t,searchKeyword:i});try{let e=await p.Wg.post("filters/sub-category",r),t=JSON.parse(JSON.stringify(e.data));t=t.sort((e,t)=>e.localeCompare(t,"ko-KR")),n(t)}catch(e){var a,l,s,d,c,h;o([(null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.statusCode)||"Unknown Status Code",(null===(d=e.response)||void 0===d?void 0:null===(s=d.data)||void 0===s?void 0:s.message)||"Unknown Error Message",(null===(h=e.response)||void 0===h?void 0:null===(c=h.data)||void 0===c?void 0:c.error)||"Unknown Error"])}},[])}),f=()=>({fetchSubCategoryTree:(0,o.useCallback)(async e=>{let t={categories:[e.categoryId],brand:"",maxPrice:"3000000",minPrice:"0",size:"",glossiness:"",country:"",isSeamless:!!e.isSeamless,txtSearch:e.txtSearch||""},i=await p.Wg.post("filters/sub-category-tree",t);return(Array.isArray(i.data)?i.data:[]).map(e=>{var t,i;return{name:String(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""),count:Number(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0),isNew:!!(null==e?void 0:e.isNew)}}).filter(e=>e.name)},[])}),g=i(27171),x=i(84260),m=i(54887),v=i(29515),b=i(55161),w=i(58300);let y=e=>"설계단가"===e?"단가(m\xb2)":e,k={브랜드:"brand",광택:"glossiness",용도:"purpose",원산지:"country"},C=function(e){var t,i,n,o,r,a,l,s,d;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,p=e.activeId,u=!((null!==(a=null===(t=p.price)||void 0===t?void 0:t[0])&&void 0!==a?a:0)===0&&(null!==(l=null===(i=p.price)||void 0===i?void 0:i[1])&&void 0!==l?l:3e6)===3e6),h=!1!==p.includeWholesale,f={page:c,categories:(null===(n=p.categories)||void 0===n?void 0:n.length)?p.categories:void 0,brand:p.brand||void 0,size:p.size||void 0,glossiness:p.glossiness||void 0,country:p.country||void 0,subCategory:p.subCategory||void 0,location:p.location||void 0,purpose:p.purpose||void 0,store:p.store||void 0,txtSearch:p.txtSearch||void 0,isSeamless:!!p.isSeamless||void 0,minPrice:u?String(null!==(s=null===(o=p.price)||void 0===o?void 0:o[0])&&void 0!==s?s:""):void 0,maxPrice:u?String(null!==(d=null===(r=p.price)||void 0===r?void 0:r[1])&&void 0!==d?d:""):void 0,isSeparateInquiry:h?u?1:void 0:0,includeWholesale:h||void 0,sort:p.sort||void 0};return Object.keys(f).forEach(e=>void 0===f[e]&&delete f[e]),f},S=e=>"sub-category"===e?"filters/sub-category":"filters/".concat(e),j=e=>{let t=e=>/^[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(e.trim());return[...e.filter(t).sort((e,t)=>e.localeCompare(t,"ko-KR")),...e.filter(e=>!t(e)).sort((e,t)=>e.localeCompare(t,"en",{sensitivity:"base"}))]},I=async(e,t,i)=>{try{let n=C(t),o=await p.Wg.post(S(e),n),r=Array.isArray(o.data)?o.data:[];if("ko"===i)return j(r);if("numeric"===i)return[...r].sort((e,t)=>e.localeCompare(t,void 0,{numeric:!0}));return r}catch(e){return[]}},Z=async e=>{try{var t;let i=C(e),n=localStorage.getItem("TOKEN"),o=await p.Wg.post("product",i,{headers:{...n?{Authorization:"Bearer ".concat(n)}:{}}});return Array.isArray(null===(t=o.data)||void 0===t?void 0:t.products)?o.data.products:Array.isArray(o.data)?o.data:[]}catch(e){return[]}},P={가로:0,세로:1,두께:2},z=(e,t)=>{let i=new Map;return e.forEach(e=>{var n,o;let r=(null!==(n=e.match(/\d+/g))&&void 0!==n?n:[]).map(Number)[t];if(void 0===r||r<=0)return;let a=2===t?r:(0,b.CC)(r);a<=0||i.set(a,(null!==(o=i.get(a))&&void 0!==o?o:0)+1)}),Array.from(i.entries()).sort((e,t)=>{let[,i]=e,[,n]=t;return n-i}).slice(0,25).map(e=>{let[t]=e;return t}).sort((e,t)=>e-t).map(String)};var E=e=>{let{filterKey:t,rawSizes:i,onClose:r}=e,[a,s]=(0,l.FV)(d.ot),[p,u]=(0,l.FV)(d.Tq),[,h]=(0,l.FV)(v.Z),[f,g]=(0,o.useState)([]),[x,C]=(0,o.useState)([]),[S,E]=(0,o.useState)([]),[L,M]=(0,o.useState)([]),[er,ea]=(0,o.useState)(void 0),[el,es]=(0,o.useState)([0,3e6]),[ed,ec]=(0,o.useState)(!0),[ep,eu]=(0,o.useState)(!1),{fetchCategories:eh}=(0,c.Z)(),[ef,eg]=(0,o.useState)({min:"최저",max:"최고"});(0,o.useEffect)(()=>{var e;let i=p.activeId;E([...i.categories||[]]),ea(i.sort),es(null!==(e=i.price)&&void 0!==e?e:[0,3e6]);let n=i.includeWholesale;if(ec(void 0===n||!!n),eu(!1),"가로"===t){M((i.widthDims||[]).map(String));return}if("세로"===t){M((i.heightDims||[]).map(String));return}if("두께"===t){M((i.depthDims||[]).map(String));return}"브랜드"===t&&i.brand?M(i.brand.split(",").filter(Boolean)):"광택"===t&&i.glossiness?M(i.glossiness.split(",").filter(Boolean)):"용도"===t&&i.purpose?M(i.purpose.split(",").filter(Boolean)):"원산지"===t&&i.country?M(i.country.split(",").filter(Boolean)):M([])},[t]),(0,o.useEffect)(()=>{var e,i,n,o;let r=e=>{let t={...p.activeId,[e]:d.RA[e]};return"categories"===e&&(t.subCategory=""),{activeId:t}};if("설계단가"===t){(async()=>{let e=r("price"),t=await Z(e),i=[];if(t.forEach(e=>{(Array.isArray(null==e?void 0:e.options)?e.options:[]).forEach(e=>{let t=Number(null==e?void 0:e.price);Number.isFinite(t)&&t>0&&i.push(t)});let t=Number(null==e?void 0:e.price);Number.isFinite(t)&&t>0&&i.push(t)}),i.length>0){var n;let e=Math.min(...i),t=Math.max(...i);eg({min:e.toLocaleString(),max:t.toLocaleString()});let o=null!==(n=p.activeId.price)&&void 0!==n?n:[0,3e6];0===o[0]&&3e6===o[1]&&es([e,t])}})();return}if("카테고리"===t){let e=p.activeId;eh({filters:{categories:[],brand:"",maxPrice:"3000000",minPrice:"0",size:"",glossiness:"",country:"",isSeamless:"false"},onSuccess:async t=>{var i,n,o,a;let l=(null!==(o=null===(i=e.price)||void 0===i?void 0:i[0])&&void 0!==o?o:0)!==0||(null!==(a=null===(n=e.price)||void 0===n?void 0:n[1])&&void 0!==a?a:3e6)!==3e6,s=!1===e.includeWholesale;if(!(e.brand||e.glossiness||e.country||e.purpose||e.size||l||s)){g([...t].sort((e,t)=>e.name.localeCompare(t.name,"ko")));return}let d=r("categories"),c=await Z(d);if(0===c.length){g([]);return}let p=new Set,u=new Set;c.forEach(e=>{(null==e?void 0:e.categoryId)!=null&&p.add(Number(e.categoryId)),(null==e?void 0:e.category)&&u.add(String(e.category))}),g([...t.filter(e=>p.has(e.id)||u.has(e.name))].sort((e,t)=>e.name.localeCompare(t.name,"ko")))},onError:()=>{}});return}if("가로"===t||"세로"===t||"두께"===t)return;let a=k[t];if(!a)return;let l="brand"===a?"ko":"none",s="브랜드"===t?"brand":"광택"===t?"glossiness":"원산지"===t?"country":"purpose",c="brand"===s?"companyName":s,u=p.activeId,h=(null!==(n=null===(e=u.price)||void 0===e?void 0:e[0])&&void 0!==n?n:0)!==0||(null!==(o=null===(i=u.price)||void 0===i?void 0:i[1])&&void 0!==o?o:3e6)!==3e6,f=!1===u.includeWholesale,x=!!("brand"!==s&&u.brand||"glossiness"!==s&&u.glossiness||"purpose"!==s&&u.purpose||"country"!==s&&u.country||(u.categories||[]).length>0||u.size||h||f);(async()=>{if(!x){C(await I(a,{activeId:{...d.RA}},l));return}let e=r(s),[t,i]=await Promise.all([I(a,e,l),Z(e)]);if(0===i.length){C(t);return}let n=new Set;if(i.forEach(e=>{let t=null==e?void 0:e[c];"string"==typeof t&&t.trim()&&n.add(t.trim())}),n.size>0){if(t.length>0)C(t.filter(e=>n.has(e)));else{let e=Array.from(n);C("ko"===l?j(e):e.sort())}return}C(t)})()},[t]),(0,o.useEffect)(()=>{let e=document.body.style.overflow;document.body.style.overflow="hidden";let t=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",t),()=>{document.body.style.overflow=e,document.removeEventListener("keydown",t)}},[r]);let ex=e=>{if("용도"===t){M(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]);return}M(t=>t.includes(e)?[]:[e])},em=e=>{E(t=>t.includes(e)?[]:[e])},ev=document.body;return(0,m.createPortal)((0,n.jsx)(W,{onClick:r,children:(0,n.jsxs)(A,{onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(N,{}),(0,n.jsxs)(B,{children:[(0,n.jsx)(F,{children:y(t)}),(0,n.jsx)(R,{onClick:r,"aria-label":"닫기",children:(0,n.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M18 6L6 18"}),(0,n.jsx)("path",{d:"M6 6l12 12"})]})})]}),(0,n.jsx)(q,{children:(()=>{if("정렬"===t)return(0,n.jsx)(O,{children:w.ax.map(e=>{let t=w.Yk[e],i=er===t;return(0,n.jsxs)($,{onClick:()=>ea(e=>e===t?void 0:t),children:[(0,n.jsx)(K,{$active:i}),(0,n.jsx)(Y,{children:e})]},e)})});if("카테고리"===t)return(0,n.jsx)(V,{children:0===f.length?(0,n.jsx)(H,{children:"옵션 없음"}):f.filter(e=>{var t;return(null!==(t=e.productCount)&&void 0!==t?t:1)>0}).map(e=>{let t=S.includes(e.id);return(0,n.jsxs)(J,{onClick:()=>em(e.id),children:[(0,n.jsx)(_,{$active:t,children:t&&(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,n.jsx)(X,{children:e.name})]},e.id)})});if("설계단가"===t)return(0,n.jsxs)(G,{children:[(0,n.jsxs)(Q,{children:[(0,n.jsx)(et,{type:"text",inputMode:"numeric",value:el[0].toLocaleString(),onChange:e=>{es([Number(e.target.value.replace(/[^\d]/g,""))||0,el[1]]),eu(!0)},placeholder:ef.min}),(0,n.jsx)(ee,{children:"~"}),(0,n.jsx)(et,{type:"text",inputMode:"numeric",value:el[1].toLocaleString(),onChange:e=>{let t=e.target.value.replace(/[^\d]/g,"");es([el[0],Number(t)||3e6]),eu(!0)},placeholder:ef.max})]}),(0,n.jsx)(ei,{children:"원"}),(0,n.jsxs)(en,{type:"button",onClick:()=>{ec(e=>!e),eu(!0)},children:[(0,n.jsx)(_,{$active:ed,children:ed&&(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,n.jsx)(eo,{children:"미 표기 제품 포함(별도문의)"})]})]});let e=[];"브랜드"===t||"광택"===t||"용도"===t||"원산지"===t?e=x:"가로"===t?e=z(i,P["가로"]):"세로"===t?e=z(i,P["세로"]):"두께"===t&&(e=z(i,P["두께"]));let o="가로"===t||"세로"===t||"두께"===t;return(0,n.jsx)(V,{children:0===e.length?(0,n.jsx)(H,{children:"옵션 없음"}):e.map(e=>{let t=L.includes(e);return(0,n.jsxs)(J,{onClick:()=>ex(e),children:[(0,n.jsx)(_,{$active:t,children:t&&(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,n.jsx)(X,{children:o?"".concat(e,"mm"):e})]},e)})})})()}),(0,n.jsxs)(T,{children:[(0,n.jsxs)(D,{type:"button",onClick:()=>{"카테고리"===t?E([]):"정렬"===t?ea(void 0):"설계단가"===t?(es([0,3e6]),ec(!0),eu(!1)):M([])},children:[(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),(0,n.jsx)("path",{d:"M3 4v5h5"})]}),"초기화"]}),(0,n.jsx)(U,{type:"button",onClick:()=>{var e,n,o;u(e=>{let n={...e.activeId};if("정렬"===t)n.sort=er;else if("카테고리"===t)n.categories=S,n.subCategory="";else if("설계단가"===t)ep&&(n.price=el,n.includeWholesale=ed);else if("가로"===t||"세로"===t||"두께"===t){let e=L.map(Number).filter(e=>e>0);"가로"===t?n.widthDims=e:"세로"===t?n.heightDims=e:n.depthDims=e;let o=n.widthDims||[],r=n.heightDims||[],a=n.depthDims||[];if(0===o.length&&0===r.length&&0===a.length)n.size="";else{let e=i.filter(e=>{var t,i,n,l;let s=(null!==(t=e.match(/\d+/g))&&void 0!==t?t:[]).map(Number).map((e,t)=>2===t?e:(0,b.CC)(e));return(!(o.length>0)||!!o.includes(null!==(i=s[0])&&void 0!==i?i:-1))&&(!(r.length>0)||!!r.includes(null!==(n=s[1])&&void 0!==n?n:-1))&&(!(a.length>0)||!!a.includes(null!==(l=s[2])&&void 0!==l?l:-1))});n.size=e.join(",")}}else{let e=L.join(",");"브랜드"===t?n.brand=e:"광택"===t?n.glossiness=e:"용도"===t?n.purpose=e:"원산지"===t&&(n.country=e)}return{...e,activeId:n}});let l=(e,t,i)=>{s(n=>({...n,[e]:{...n[e],isSelected:t>0,content:t>0?i:e,activeId:[]}}))};if("카테고리"===t){let e=f.filter(e=>S.includes(e.id)).map(e=>e.name);l("구분",S.length,e.join(", ")||"구분"),l("종류",0,"종류")}else if("정렬"===t){let t=er&&null!==(n=null===(e=Object.entries(w.Yk).find(e=>{let[,t]=e;return t===er}))||void 0===e?void 0:e[0])&&void 0!==n?n:"";l("정렬",er?1:0,t||"정렬")}else if("설계단가"===t){let e=p.activeId,t=e.includeWholesale,i=ep?el:null!==(o=e.price)&&void 0!==o?o:[0,3e6],n=ep?ed:void 0===t||!!t,r=0===i[0]&&3e6===i[1],a=!1===n,s=[r?"":"".concat(i[0].toLocaleString()," ~ ").concat(i[1].toLocaleString(),"원"),a?"별도문의 제외":""].filter(Boolean);l("설계단가",!r||a?1:0,s.length?s.join(" \xb7 "):"설계단가")}else l(t,L.length,L.join(", ")||t);h([]);try{window.history.pushState({macodiFilter:{filter:p,filters:a}},"")}catch(e){}r()},children:"결과 보기"})]})]})}),ev)};let L=(0,r.F4)(["from{opacity:0;}to{opacity:1;}"]),M=(0,r.F4)(["from{transform:translateY(100%);}to{transform:translateY(0);}"]),W=r.ZP.div.withConfig({componentId:"sc-5918b07a-0"})(["position:fixed;inset:0;z-index:14000;background:rgba(0,0,0,0.45);display:flex;align-items:flex-end;justify-content:center;animation:"," 0.2s ease-out;"],L),A=r.ZP.div.withConfig({componentId:"sc-5918b07a-1"})(["width:100%;max-width:720px;background:#fff;border-top-left-radius:16px;border-top-right-radius:16px;display:flex;flex-direction:column;max-height:85vh;animation:"," 0.28s cubic-bezier(0.2,0.8,0.2,1);padding-bottom:env(safe-area-inset-bottom);"],M),N=r.ZP.div.withConfig({componentId:"sc-5918b07a-2"})(["align-self:center;width:36px;height:4px;border-radius:2px;background:#d9d6d0;margin:8px 0 4px;"]),B=r.ZP.div.withConfig({componentId:"sc-5918b07a-3"})(["display:flex;align-items:center;justify-content:space-between;padding:8px 16px 12px;border-bottom:1px solid #efece6;"]),F=r.ZP.h3.withConfig({componentId:"sc-5918b07a-4"})(["margin:0;font-size:16px;font-weight:700;color:#111;"]),R=r.ZP.button.withConfig({componentId:"sc-5918b07a-5"})(["border:0;background:transparent;padding:4px;display:grid;place-items:center;cursor:pointer;color:#111;"]),q=r.ZP.div.withConfig({componentId:"sc-5918b07a-6"})(["flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:4px 0;"]),T=r.ZP.div.withConfig({componentId:"sc-5918b07a-7"})(["flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:12px 16px;border-top:1px solid #efece6;background:#fff;"]),D=r.ZP.button.withConfig({componentId:"sc-5918b07a-8"})(["flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;font-size:14px;font-weight:600;color:#5f5c57;padding:10px 8px;cursor:pointer;"]),U=r.ZP.button.withConfig({componentId:"sc-5918b07a-9"})(["flex:1 1 auto;border:0;border-radius:12px;background:#111;color:#fff;font-size:15px;font-weight:700;padding:14px 16px;cursor:pointer;&:active{background:#2b2b2b;}"]),O=r.ZP.div.withConfig({componentId:"sc-5918b07a-10"})(["display:flex;flex-direction:column;"]),$=r.ZP.button.withConfig({componentId:"sc-5918b07a-11"})(["display:flex;align-items:center;gap:12px;border:0;background:transparent;text-align:left;padding:7px 20px;cursor:pointer;&:active{background:#f7f6f2;}"]),K=r.ZP.span.withConfig({componentId:"sc-5918b07a-12"})(["width:20px;height:20px;border-radius:50%;border:2px solid ",";position:relative;flex:0 0 auto;&::after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%;background:",";}"],e=>{let{$active:t}=e;return t?"#111":"#cbc8c2"},e=>{let{$active:t}=e;return t?"#111":"transparent"}),Y=r.ZP.span.withConfig({componentId:"sc-5918b07a-13"})(["font-size:15px;color:#111;"]),V=r.ZP.div.withConfig({componentId:"sc-5918b07a-14"})(["display:flex;flex-direction:column;"]),J=r.ZP.button.withConfig({componentId:"sc-5918b07a-15"})(["display:flex;align-items:center;gap:12px;border:0;background:transparent;text-align:left;padding:7px 20px;cursor:pointer;&:active{background:#f7f6f2;}"]),_=r.ZP.span.withConfig({componentId:"sc-5918b07a-16"})(["width:22px;height:22px;border-radius:6px;border:1.5px solid ",";background:",";display:grid;place-items:center;flex:0 0 auto;"],e=>{let{$active:t}=e;return t?"#111":"#cbc8c2"},e=>{let{$active:t}=e;return t?"#111":"#fff"}),X=r.ZP.span.withConfig({componentId:"sc-5918b07a-17"})(["font-size:15px;color:#111;"]),H=r.ZP.div.withConfig({componentId:"sc-5918b07a-18"})(["font-size:13px;color:#888381;padding:20px;text-align:center;"]),G=r.ZP.div.withConfig({componentId:"sc-5918b07a-19"})(["padding:16px;display:flex;flex-direction:column;gap:8px;min-width:0;"]),Q=r.ZP.div.withConfig({componentId:"sc-5918b07a-20"})(["display:flex;align-items:center;gap:8px;min-width:0;"]),ee=r.ZP.span.withConfig({componentId:"sc-5918b07a-21"})(["flex:0 0 auto;color:#888381;font-weight:500;"]),et=r.ZP.input.withConfig({componentId:"sc-5918b07a-22"})(["flex:1 1 0;min-width:0;width:100%;border:1px solid #e5e2dc;border-radius:10px;padding:10px 12px;font-size:14px;background:#fff;color:#111;appearance:none;-webkit-appearance:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&:focus{outline:2px solid #111;outline-offset:-1px;border-color:transparent;}"]),ei=r.ZP.div.withConfig({componentId:"sc-5918b07a-23"})(["font-size:12px;color:#888381;text-align:right;"]),en=r.ZP.button.withConfig({componentId:"sc-5918b07a-24"})(["margin-top:16px;display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:6px 0;cursor:pointer;text-align:left;"]),eo=r.ZP.span.withConfig({componentId:"sc-5918b07a-25"})(["font-size:14px;color:#111;"]),er=["정렬","카테고리","브랜드","설계단가","광택","용도","원산지"];var ea=()=>{let[e,t]=(0,o.useState)(null),[i,r]=(0,o.useState)([]),s=(0,l.sJ)(d.Tq),c=(0,l.sJ)(d.ot),p=(0,l.Zl)(d.Tq),u=(0,l.Zl)(d.ot),h=(0,l.Zl)(g.Z);(0,o.useEffect)(()=>{let e=e=>{var t;let i=null===(t=e.state)||void 0===t?void 0:t.macodiFilter;i&&(i.filter&&p(i.filter),i.filters&&u(i.filters))};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let f=(0,a.useRouter)(),{fetchFacet:m}=(0,x.Z)(),v=e=>{h(null);{let e=new URL(window.location.href);e.searchParams.has("pid")&&(e.searchParams.delete("pid"),f.replace(e.pathname+e.search,{scroll:!1}))}t(e)},b=(0,o.useRef)(null),[w,k]=(0,o.useState)(0);(0,o.useEffect)(()=>{let e=()=>{let e=document.querySelector("[data-fixed-top-area]");if(e){let t=Math.round(e.getBoundingClientRect().bottom);k(t>0?t:0);return}b.current&&k(Math.max(0,Math.round(b.current.getBoundingClientRect().top)))},t=requestAnimationFrame(e),i=[120,350,700,1200].map(t=>window.setTimeout(e,t));window.addEventListener("resize",e);let n=null,o=document.querySelector("[data-fixed-top-area]");return o&&"ResizeObserver"in window&&(n=new ResizeObserver(e)).observe(o),()=>{cancelAnimationFrame(t),i.forEach(clearTimeout),window.removeEventListener("resize",e),null==n||n.disconnect()}},[]),(0,o.useEffect)(()=>{m({facet:"size",filters:{activeId:{...d.RA}},searchKeyword:"",sort:"none"}).then(r).catch(()=>{})},[m]);let C=e=>{let t=c["카테고리"===e?"구분":e];return t&&t.isSelected&&t.content?t.content:y(e)},S=e=>{let t=s.activeId;switch(e){case"정렬":return t.sort?1:0;case"카테고리":return(t.categories||[]).length;case"브랜드":return t.brand?t.brand.split(",").filter(Boolean).length:0;case"광택":return t.glossiness?t.glossiness.split(",").filter(Boolean).length:0;case"용도":return t.purpose?t.purpose.split(",").filter(Boolean).length:0;case"가로":return(t.widthDims||[]).length;case"세로":return(t.heightDims||[]).length;case"두께":return(t.depthDims||[]).length;case"원산지":return t.country?t.country.split(",").filter(Boolean).length:0;case"설계단가":{var i;let[e,n]=null!==(i=t.price)&&void 0!==i?i:[0,3e6],o=!1===t.includeWholesale;return 0!==e||3e6!==n||o?1:0}}},j=(0,o.useRef)(null),[I,Z]=(0,o.useState)(!1),[P,z]=(0,o.useState)(!1),L=()=>{let e=j.current;e&&(Z(e.scrollLeft>4),z(e.scrollLeft+e.clientWidth{let e=requestAnimationFrame(L);return window.addEventListener("resize",L),()=>{cancelAnimationFrame(e),window.removeEventListener("resize",L)}},[]);let M=e=>{var t;null===(t=j.current)||void 0===t||t.scrollBy({left:160*e,behavior:"smooth"})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(el,{ref:b,"aria-hidden":!0}),(0,n.jsxs)(es,{"data-mobile-filter-bar":!0,style:{top:"".concat(w,"px")},children:[(0,n.jsx)(ed,{ref:j,onScroll:L,children:er.map(e=>{let t=S(e),i=C(e);return(0,n.jsxs)(eh,{type:"button",$active:t>0,onClick:()=>v(e),title:i,children:[(0,n.jsx)(eg,{children:i}),(0,n.jsx)(ef,{"aria-hidden":!0,children:(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M6 9l6 6 6-6"})})})]},e)})}),I&&(0,n.jsx)(ec,{$side:"left",onClick:()=>M(-1),"aria-label":"이전 필터",children:(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#111",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})})}),P&&(0,n.jsx)(ec,{$side:"right",onClick:()=>M(1),"aria-label":"다음 필터",children:(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#111",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6"})})}),(0,n.jsx)(ep,{"aria-hidden":!0}),(0,n.jsx)(eu,{type:"button",onClick:()=>{try{window.history.pushState({macodiFilter:{filter:s,filters:void 0}},"")}catch(e){}p({activeId:{...d.RA}}),u({...d.MZ})},"aria-label":"필터 초기화",children:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#111",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 12a9 9 0 1 0 3-6.7"}),(0,n.jsx)("path",{d:"M3 4v5h5"})]})})]}),e&&(0,n.jsx)(E,{filterKey:e,rawSizes:i,onClose:()=>t(null)},e)]})};let el=r.ZP.div.withConfig({componentId:"sc-4d2956cd-0"})(["height:","px;flex:0 0 auto;"],32),es=r.ZP.div.withConfig({componentId:"sc-4d2956cd-1"})(["position:fixed;left:0;right:0;z-index:40;height:","px;background:#fff;&::before{content:'';position:absolute;left:0;right:0;bottom:100%;height:24px;background:#fff;}"],32),ed=r.ZP.div.withConfig({componentId:"sc-4d2956cd-2"})(["width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;gap:8px;overflow-x:auto;padding:2px 64px 2px 12px;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),ec=r.ZP.button.withConfig({componentId:"sc-4d2956cd-3"})(["position:absolute;top:0;"," height:100%;width:",";border:0;display:flex;align-items:center;justify-content:",";padding:",";cursor:pointer;background:",";"],e=>{let{$side:t}=e;return"left"===t?"left: 0;":"right: 0;"},e=>{let{$side:t}=e;return"left"===t?"40px":"76px"},e=>{let{$side:t}=e;return"left"===t?"flex-start":"flex-end"},e=>{let{$side:t}=e;return"left"===t?"0 0 0 6px":"0 42px 0 0"},e=>{let{$side:t}=e;return"left"===t?"linear-gradient(to right, #ffffff 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%)":"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 30%, #ffffff 60%, #ffffff 100%)"}),ep=r.ZP.div.withConfig({componentId:"sc-4d2956cd-4"})(["position:absolute;top:0;right:0;height:100%;width:56px;pointer-events:none;z-index:1;background:linear-gradient( to right,rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,#ffffff 60%,#ffffff 100% );"]),eu=r.ZP.button.withConfig({componentId:"sc-4d2956cd-5"})(["position:absolute;top:50%;right:10px;transform:translateY(-50%);border:0;background:transparent;padding:4px;display:grid;place-items:center;cursor:pointer;z-index:2;&:active{opacity:0.7;}"]),eh=r.ZP.button.withConfig({componentId:"sc-4d2956cd-6"})(["flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;padding:0 4px;border:0;background:transparent;color:#111;font-size:13px;font-weight:",";text-decoration:",";text-underline-offset:3px;text-decoration-thickness:1.5px;white-space:nowrap;cursor:pointer;letter-spacing:-0.01em;&:active{opacity:0.6;}"],e=>{let{$active:t}=e;return t?700:500},e=>{let{$active:t}=e;return t?"underline":"none"}),ef=r.ZP.span.withConfig({componentId:"sc-4d2956cd-7"})(["display:inline-flex;align-items:center;"]),eg=r.ZP.span.withConfig({componentId:"sc-4d2956cd-8"})(["max-width:14ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);var ex=i(64779);let em=e=>{let{text:t}=e,i=(0,o.useRef)(null),r=(0,o.useRef)(null),[a,l]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let e=()=>{let e=i.current,t=r.current;if(!e||!t)return;let n=t.scrollWidth-e.clientWidth;l(n>2?n:0)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t]),(0,n.jsx)(eR,{ref:i,title:t,$hasOverflow:a>0,children:(0,n.jsx)(eT,{ref:r,"data-marquee-inner":a>0?"":void 0,style:{"--marquee-d":"-".concat(a,"px")},children:t})})};var ev=e=>{let{setSearchKeyword:t,setProductPage:i,storeQuery:r}=e,p=(0,a.useRouter)(),u=(0,a.usePathname)(),g=(0,a.useSearchParams)(),[x,m]=(0,o.useState)([]),v=(0,l.Zl)(s.Z),[b,w]=(0,o.useState)([]),[y,k]=(0,l.FV)(d.ot),[C,S]=(0,l.FV)(d.Tq),{fetchCategories:j}=(0,c.Z)(),{fetchSubCategories:I}=h(),Z=!!C.activeId.isSeamless,[P,z]=(0,o.useState)(new Set),[E,L]=(0,o.useState)({}),[M,W]=(0,o.useState)(new Set),{fetchSubCategoryTree:A}=f();(0,o.useEffect)(()=>{z(new Set),L({})},[C.activeId.txtSearch,Z]);let N=(0,o.useCallback)(e=>{L(t=>(void 0!==t[e]||(W(t=>new Set(t).add(e)),A({categoryId:e,txtSearch:C.activeId.txtSearch||"",isSeamless:!!C.activeId.isSeamless}).then(t=>L(i=>({...i,[e]:t}))).catch(()=>L(t=>({...t,[e]:[]}))).finally(()=>W(t=>{let i=new Set(t);return i.delete(e),i}))),t))},[A,C.activeId.txtSearch,C.activeId.isSeamless]),B=(0,o.useCallback)(e=>{z(t=>t.has(e)?new Set:(N(e),new Set([e])))},[N]);(0,o.useEffect)(()=>{let e={categories:[],brand:"",maxPrice:"3000000",minPrice:"0",size:"",glossiness:"",country:"",isSeamless:Z?"true":"false",txtSearch:C.activeId.txtSearch||""};r?I({filters:{...e,store:r},onSuccess:e=>{w([...e].sort((e,t)=>e.localeCompare(t,"ko")))},onError:()=>{}}):j({filters:e,onSuccess:e=>{m(e),v(Object.fromEntries(e.map(e=>[e.id,!!e.hasMytexture])))},onError:()=>{}})},[r,j,I,Z,C.activeId.txtSearch,v]);let F={구분:{key:"categories",defaultContent:"구분"},종류:{key:"subCategory",defaultContent:"종류"}},R=()=>{let e=document.querySelector("[data-scroll-grid]");if(e&&"function"==typeof e.scrollTo){e.scrollTo(0,0);return}let t=document.getElementById("main-scrollable");if(t&&"function"==typeof t.scrollTo){t.scrollTo(0,0);return}window.scrollTo(0,0)},q=(e,n)=>{var o,r;R();let a=C.activeId.txtSearch||"";t(a);let l=new URLSearchParams(null==g?void 0:g.toString());a?l.set("q",a):l.delete("q"),l.set("page","1"),"/home"===u||"/home/"===u?p.replace("/home/?".concat(l.toString()),{scroll:!1}):p.push("/home/?".concat(l.toString()),{scroll:!1});let s=!!C.activeId.isSeamless,c=C.activeId.color||"";if("구분"===e){let e=n.ids.length>0;k({...d.MZ,구분:{...d.MZ["구분"],isSelected:e,content:e&&null!==(o=n.name)&&void 0!==o?o:F["구분"].defaultContent,activeId:e?n.ids.map(e=>Number(e)):[]},심리스:s?{isSelected:!0,content:"심리스",activeId:[1]}:d.MZ["심리스"],색상:c?{isSelected:!0,content:"색상",activeId:[]}:d.MZ["색상"]})}else{let e=n.ids.length>0||!!n.name;k({...d.MZ,종류:{...d.MZ["종류"],isSelected:e,content:e&&null!==(r=n.name)&&void 0!==r?r:F["종류"].defaultContent,activeId:[]},심리스:s?{isSelected:!0,content:"심리스",activeId:[1]}:d.MZ["심리스"],색상:c?{isSelected:!0,content:"색상",activeId:[]}:d.MZ["색상"]})}S({...C,activeId:{...d.RA,isSeamless:s,color:c,txtSearch:a,..."구분"===e?{categories:n.ids.map(e=>Number(e)),subCategory:""}:{categories:[],subCategory:n.name||""}}}),i(1)},T=(e,t,i)=>{y[e].content!==i&&q(e,{ids:[t],name:i})},D=e=>{(y["구분"].content!==e.name||y["종류"].isSelected)&&q("구분",{ids:[e.id],name:e.name}),B(e.id)},U=(e,n,o)=>{R();let r=C.activeId.txtSearch||"";t(r);let a=new URLSearchParams(null==g?void 0:g.toString());r?a.set("q",r):a.delete("q"),a.set("page","1"),"/home"===u||"/home/"===u?p.replace("/home/?".concat(a.toString()),{scroll:!1}):p.push("/home/?".concat(a.toString()),{scroll:!1});let l=!!C.activeId.isSeamless,s=C.activeId.color||"";k({...d.MZ,구분:{...d.MZ["구분"],isSelected:!0,content:n,activeId:[e]},종류:{...d.MZ["종류"],isSelected:!0,content:o,activeId:[]},심리스:l?{isSelected:!0,content:"심리스",activeId:[1]}:d.MZ["심리스"],색상:s?{isSelected:!0,content:"색상",activeId:[]}:d.MZ["색상"]}),S({...C,activeId:{...d.RA,isSeamless:l,color:s,txtSearch:r,categories:[e],subCategory:o}}),i(1)};return(0,n.jsxs)(eb,{children:[(0,n.jsx)(eC,{children:(0,n.jsx)(ea,{})}),(0,n.jsxs)(ek,{"data-category-list":!0,children:[(0,n.jsx)(eS,{children:(0,n.jsxs)(ej,{role:"button",tabIndex:0,"aria-label":"SketchUp 플러그인 페이지로 이동",onClick:()=>p.push("/home/sketchup"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&p.push("/home/sketchup")},children:[(0,n.jsx)(eI,{children:"업데이트"}),(0,n.jsx)(eZ,{src:"/images/sketchup/plugin-logo.png",alt:"SketchUp 플러그인 로고",onError:e=>{e.currentTarget.style.display="none"}}),(0,n.jsxs)(eP,{children:[(0,n.jsx)(ez,{children:"SketchUp 루비"}),(0,n.jsx)(eE,{children:"플러그인 원클릭 다운로드 →"})]})]})}),(0,n.jsx)(eM,{onClick:()=>q(r?"종류":"구분",{ids:[],name:r?"종류":"구분"}),isActive:r?"종류"===y["종류"].content:"구분"===y["구분"].content,children:(()=>{if(r||!x.length)return"전체보기";let e=x.reduce((e,t)=>{var i,n;return e+(Z?null!==(i=t.seamlessProductCount)&&void 0!==i?i:0:null!==(n=t.productCount)&&void 0!==n?n:0)},0);return e>0?"전체보기 (".concat(e,")"):"전체보기"})()}),!r&&0===x.length&&Array.from({length:12}).map((e,t)=>(0,n.jsx)(ey,{$w:"".concat(68-t%5*8,"%"),style:{animationDelay:"".concat(t%6*.07,"s")}},"cat-skel-".concat(t))),r?b.map((e,t)=>(0,n.jsx)(eM,{onClick:()=>T("종류",e,e),isActive:y["종류"].content===e,children:e},t)):x.filter(e=>{var t;return(null!==(t=e.productCount)&&void 0!==t?t:0)>0}).map(e=>{var t,i;let r=Z?null!==(t=e.seamlessProductCount)&&void 0!==t?t:0:null!==(i=e.productCount)&&void 0!==i?i:0,a=P.has(e.id),l=y["구분"].content===e.name,s=E[e.id],d=M.has(e.id);return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)(eM,{onClick:()=>D(e),isActive:l&&!y["종류"].isSelected,title:"".concat(e.name," (").concat(r,")"),children:[e.isNew&&(0,n.jsx)(eq,{"aria-label":"신규 등록",children:"NEW"}),(0,n.jsx)(eW,{$open:a,onClick:t=>{t.stopPropagation(),B(e.id)},"aria-label":a?"종류 접기":"종류 펼치기",children:(0,n.jsx)(eA,{})}),(0,n.jsx)(em,{text:"".concat(e.name," (").concat(r,")")}),e.hasMytexture&&(0,n.jsx)(ex.Ey,{})]}),a&&(0,n.jsx)(eN,{children:d?(0,n.jsx)(eF,{children:"불러오는 중…"}):s&&s.length?s.map(t=>(0,n.jsxs)(eB,{onClick:()=>U(e.id,e.name,t.name),isActive:l&&y["종류"].content===t.name,title:"".concat(t.name," (").concat(t.count,")"),children:[t.isNew&&(0,n.jsx)(eq,{"aria-label":"신규 등록",children:"NEW"}),(0,n.jsx)(em,{text:"".concat(t.name," (").concat(t.count,")")})]},"".concat(e.id,"|").concat(t.name))):(0,n.jsx)(eF,{children:"종류 없음"})})]},e.id)})]})]})};let eb=r.ZP.div.withConfig({componentId:"sc-d71cea95-0"})(["display:flex;flex-direction:column;width:100%;height:90%;"]),ew=(0,r.F4)(["0%{background-position:-200px 0;}100%{background-position:calc(200px + 100%) 0;}"]),ey=r.ZP.div.withConfig({componentId:"sc-d71cea95-1"})(["height:14px;width:",";margin:14px 16px;border-radius:6px;background:#eef0f3;background-image:linear-gradient( 90deg,#eef0f3 0px,#f7f8fa 60px,#eef0f3 120px );background-size:200px 100%;background-repeat:no-repeat;animation:"," 1.4s ease-in-out infinite;@media (max-width:768px){display:none;}"],e=>{let{$w:t}=e;return null!=t?t:"60%"},ew),ek=r.ZP.div.withConfig({componentId:"sc-d71cea95-2"})(["flex:1 1 auto;overflow-y:auto;padding:0 0 8px;@media (max-width:768px){display:none;}html.su-plugin &{display:block !important;}"]),eC=r.ZP.div.withConfig({componentId:"sc-d71cea95-3"})(["display:none;@media (max-width:500px){display:block;}"]),eS=r.ZP.div.withConfig({componentId:"sc-d71cea95-4"})(["position:sticky;top:0;z-index:100;background:#fff;padding:14px 12px 8px;border-bottom:1px solid #ececec;@media (max-width:768px){display:none;}"]),ej=r.ZP.div.withConfig({componentId:"sc-d71cea95-5"})(["position:relative;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#eef4f2;border:1px solid #cfe0da;border-radius:12px;text-decoration:none;cursor:pointer;transition:transform 0.18s ease,box-shadow 0.18s ease,border-color 0.18s ease;&:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(31,122,99,0.16);border-color:#a9c9be;}"]),eI=r.ZP.span.withConfig({componentId:"sc-d71cea95-6"})(["position:absolute;top:-8px;right:-6px;z-index:1;display:inline-flex;align-items:center;height:18px;padding:0 8px;background:#413d7d;color:#fff;font-size:10.5px;font-weight:800;letter-spacing:0.02em;line-height:1;border-radius:999px;white-space:nowrap;box-shadow:0 2px 6px rgba(65,61,125,0.4);"]),eZ=r.ZP.img.withConfig({componentId:"sc-d71cea95-7"})(["width:32px;height:32px;flex-shrink:0;object-fit:contain;border-radius:6px;html.su-plugin &{width:26px;height:26px;}"]),eP=r.ZP.div.withConfig({componentId:"sc-d71cea95-8"})(["display:flex;flex-direction:column;min-width:0;"]),ez=r.ZP.span.withConfig({componentId:"sc-d71cea95-9"})(["color:#413d7d;font-size:13.5px;font-weight:700;letter-spacing:-0.01em;line-height:1.2;@media (min-width:769px) and (max-width:1440px){font-size:10.8px;}html.su-plugin &{font-size:10.8px;}"]),eE=r.ZP.span.withConfig({componentId:"sc-d71cea95-10"})(["color:#888;font-size:11px;font-weight:500;margin-top:1px;@media (min-width:769px) and (max-width:1440px){font-size:8.8px;}html.su-plugin &{font-size:8.8px;}"]),eL=(0,r.F4)(["0%,12%{transform:translateX(0);}88%,100%{transform:translateX(var(--marquee-d,0px));}"]),eM=r.ZP.div.withConfig({componentId:"sc-d71cea95-11"})(["padding:4px 16px;position:relative;cursor:pointer;background:",";font-weight:",";white-space:nowrap;display:flex;align-items:center;justify-content:space-between;gap:8px;&:hover{background:#f5f5f5;}&:hover [data-marquee-inner]{will-change:transform;animation:"," 1.25s ease-in-out infinite;}@media (max-width:768px){flex:0 0 auto;margin-right:0;border-radius:999px;border:1px solid ",";background:",";color:",";font-size:13px;padding:6px 12px;}html.su-plugin &{flex:initial !important;margin-right:0 !important;border-radius:0 !important;border:none !important;font-size:13px !important;padding:4px 16px !important;justify-content:flex-start !important;gap:6px !important;color:inherit !important;background:"," !important;}"],e=>{let{isActive:t}=e;return t?"#e3f2fd":"transparent"},e=>{let{isActive:t}=e;return t?"bold":"normal"},eL,e=>{let{isActive:t}=e;return t?"#413d7d":"#e5e2dc"},e=>{let{isActive:t}=e;return t?"#eef0fa":"#fff"},e=>{let{isActive:t}=e;return t?"#413d7d":"#111111"},e=>{let{isActive:t}=e;return t?"#e3f2fd":"transparent"}),eW=r.ZP.span.withConfig({componentId:"sc-d71cea95-12"})(["width:12px;height:22px;display:inline-flex;align-items:center;justify-content:center;color:#8a8b94;flex:0 0 auto;cursor:pointer;svg{flex-shrink:0;transition:transform 0.15s;transform:rotate(","deg);}"],e=>{let{$open:t}=e;return t?90:0}),eA=()=>(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:(0,n.jsx)("polyline",{points:"9 5 16 12 9 19"})}),eN=r.ZP.div.withConfig({componentId:"sc-d71cea95-13"})(["position:relative;padding-left:22px;&::before{content:'';position:absolute;left:22px;top:0;bottom:0;width:1px;background:#e5e5e5;pointer-events:none;}"]),eB=r.ZP.div.withConfig({componentId:"sc-d71cea95-14"})(["display:flex;align-items:center;gap:6px;padding:4px 16px;position:relative;cursor:pointer;font-size:13px;color:",";background:",";font-weight:",";white-space:nowrap;&:hover{background:",";}&:hover [data-marquee-inner]{will-change:transform;animation:"," 1.25s ease-in-out infinite;}html.su-plugin &,html.su-plugin & *{font-size:13px;}"],e=>{let{isActive:t}=e;return t?"#111":"#4a4d55"},e=>{let{isActive:t}=e;return t?"#e3f2fd":"transparent"},e=>{let{isActive:t}=e;return t?"bold":"normal"},e=>{let{isActive:t}=e;return t?"#e3f2fd":"#ebedf1"},eL),eF=r.ZP.div.withConfig({componentId:"sc-d71cea95-15"})(["padding:4px 16px;font-size:12px;color:#a0a1aa;html.su-plugin &{font-size:11px;}"]),eR=r.ZP.span.withConfig({componentId:"sc-d71cea95-16"})(["display:block;flex:1 1 0;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;"," html.su-plugin &{font-size:13px;}"],e=>{let{$hasOverflow:t}=e;return t?(0,r.iv)(["mask-image:linear-gradient( to right,#000 calc(100% - 12px),transparent 100% );-webkit-mask-image:linear-gradient( to right,#000 calc(100% - 12px),transparent 100% );"]):(0,r.iv)(["text-overflow:ellipsis;"])}),eq=r.ZP.span.withConfig({componentId:"sc-d71cea95-17"})(["position:absolute;top:0;left:13px;z-index:1;pointer-events:none;color:#e8362f;font-size:8px !important;line-height:1 !important;font-weight:800;letter-spacing:0.02em;white-space:nowrap;html.su-plugin &{font-size:8px !important;}"]),eT=r.ZP.span.withConfig({componentId:"sc-d71cea95-18"})(["display:inline-block;white-space:nowrap;"])},25190:function(e,t,i){var n=i(2265),o=i(29918);t.Z=()=>({fetchCategories:(0,n.useCallback)(e=>{let{filters:t,onSuccess:i,onError:n}=e,r=localStorage.getItem("TOKEN");o.Wg.post("category/filter",t,{headers:r?{Authorization:"Bearer ".concat(r)}:{}}).then(e=>{i(e.data)}).catch(e=>{console.error("Error fetching categories:",e);let t=[];if(e.response&&e.response.data){let{statusCode:i,message:n,error:o}=e.response.data;t.push(i||"Unknown Status Code"),t.push(n||"Unknown Error Message"),t.push(o||"Unknown Error")}else t.push("Network Error");n(t)})},[])})},84260:function(e,t,i){i.d(t,{Z:function(){return s}});var n=i(2265),o=i(29918);let r=function(e){var t,i,n,o,r,a,l,s,d;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,p=e.activeId,u=!((null!==(a=null===(t=p.price)||void 0===t?void 0:t[0])&&void 0!==a?a:0)===0&&(null!==(l=null===(i=p.price)||void 0===i?void 0:i[1])&&void 0!==l?l:3e6)===3e6),h=!1!==p.includeWholesale,f={page:c,categories:(null===(n=p.categories)||void 0===n?void 0:n.length)?p.categories:void 0,brand:p.brand||void 0,size:p.size||void 0,glossiness:p.glossiness||void 0,country:p.country||void 0,subCategory:p.subCategory||void 0,series:p.series||void 0,location:p.location||void 0,purpose:p.purpose||void 0,store:p.store||void 0,txtSearch:p.txtSearch||void 0,isSeamless:!!p.isSeamless||void 0,minPrice:u?String(null!==(s=null===(o=p.price)||void 0===o?void 0:o[0])&&void 0!==s?s:""):void 0,maxPrice:u?String(null!==(d=null===(r=p.price)||void 0===r?void 0:r[1])&&void 0!==d?d:""):void 0,isSeparateInquiry:h?u?1:void 0:0,includeWholesale:h||void 0,sort:p.sort||void 0};return Object.keys(f).forEach(e=>void 0===f[e]&&delete f[e]),f},a=e=>{let t=e=>/^[가-힣ㄱ-ㅎㅏ-ㅣ]/.test(e.trim());return[...e.filter(t).sort((e,t)=>e.localeCompare(t,"ko-KR")),...e.filter(e=>!t(e)).sort((e,t)=>e.localeCompare(t,"en",{sensitivity:"base"}))]},l=(e,t)=>"ko"===t?a(e):"numeric"===t?[...e].sort((e,t)=>e.localeCompare(t,void 0,{numeric:!0})):e;var s=()=>({fetchFacet:(0,n.useCallback)(async e=>{var t;let{facet:i,filters:n,searchKeyword:a,sort:s="none"}=e,d=r({activeId:{...(null==n?void 0:n.activeId)||{},txtSearch:a||(null==n?void 0:null===(t=n.activeId)||void 0===t?void 0:t.txtSearch)||""}}),c=await o.Wg.post("sub-category"===i?"filters/sub-category":"filters/".concat(i),d);return l(Array.isArray(c.data)?c.data:[],s)},[]),fetchPriceMax:(0,n.useCallback)(async e=>{var t,i;let{filters:n,searchKeyword:a}=e,l=r({activeId:{...(null==n?void 0:n.activeId)||{},txtSearch:a||(null==n?void 0:null===(t=n.activeId)||void 0===t?void 0:t.txtSearch)||""}});try{let e=await o.Wg.post("filters/price-max",l),t=Number(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.max);return Number.isFinite(t)&&t>0?t:3e6}catch(e){return 3e6}},[]),fetchFacetCounts:(0,n.useCallback)(async e=>{var t;let{facet:i,filters:n,searchKeyword:a}=e,l={...r({activeId:{...(null==n?void 0:n.activeId)||{},txtSearch:a||(null==n?void 0:null===(t=n.activeId)||void 0===t?void 0:t.txtSearch)||""}}),facet:i};try{let e=await o.Wg.post("filters/facet-counts",l);return(Array.isArray(e.data)?e.data:[]).map(e=>{var t,i;return{name:String(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""),count:Number(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)}}).filter(e=>e.name)}catch(e){return[]}},[])})},37302:function(e,t,i){let n=(0,i(43618).cn)({key:"categoryHasSeamlessAtom",default:{}});t.Z=n},29515:function(e,t,i){let n=(0,i(43618).cn)({key:"productsState",default:[]});t.Z=n}}]);