(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3823],{70276:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(57437);function o(e){let{size:t=28,color:n="#413d7d"}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 28 28",fill:"none","aria-hidden":!0,focusable:"false",children:[(0,r.jsx)("path",{d:"M5 21.4 L5 7.6 L14 15.6 L23 7.6 L23 21.4",stroke:n,strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsxs)("g",{fill:"#ffffff",children:[(0,r.jsx)("rect",{x:"20.2",y:"15.1",width:"5.6",height:"1.5",rx:"0.75"}),(0,r.jsx)("rect",{x:"20.2",y:"17.6",width:"5.6",height:"1.5",rx:"0.75"}),(0,r.jsx)("rect",{x:"20.2",y:"20.1",width:"5.6",height:"1.5",rx:"0.75"})]})]})}},3823:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(57437),o=n(2265),i=n(54887),a=n(99376),l=n(88862),s=n(11240),c=n(35775),u=n(58889),d=n(68699),h=n.n(d),f=n(37270),p=n(75470),m=n(56621),b=n(70276);let x=e=>{let{up:t}=e;return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,style:{transform:t?"rotate(180deg)":void 0},children:(0,r.jsx)("path",{d:"M6 9l6 6 6-6"})})};function g(e){let{open:t,onClose:n,name:a,loggedIn:l,onLogout:s}=e,{count:c}=(0,m.h)(),[d,g]=(0,o.useState)("shop"),[v,y]=(0,o.useState)(!1),[w,j]=(0,o.useState)([]);if((0,o.useEffect)(()=>{if(!v)return;let e=!0;return(0,p.a4)().then(t=>e&&j((0,f.JD)(t))).catch(()=>{}),()=>{e=!1}},[v]),(0,o.useEffect)(()=>{if(!t)return;let e=document.body.style.overflow;document.body.style.overflow="hidden";let r=e=>"Escape"===e.key&&n();return document.addEventListener("keydown",r),()=>{document.body.style.overflow=e,document.removeEventListener("keydown",r)}},[t,n]),!t||"undefined"==typeof document)return null;let k=e=>g(t=>t===e?"":e),_=window.location.pathname,N=e=>_===e?h().here:void 0,C=/^\/(login|signup|reset)/.test(_)?"":_+window.location.search,S=C&&"/"!==C?"/login/?returnTo=".concat(encodeURIComponent(C)):"/login/";return(0,i.createPortal)((0,r.jsx)("div",{className:h().dim,onClick:n,children:(0,r.jsxs)("aside",{className:h().drawer,role:"dialog","aria-modal":"true","aria-label":"메뉴",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:h().head,children:[(0,r.jsxs)("a",{className:h().logo,href:"/","aria-label":"마코디 홈",children:[(0,r.jsx)(b.Z,{size:24}),(0,r.jsx)("b",{children:"마코디"})]}),(0,r.jsx)("button",{type:"button",className:h().close,onClick:n,"aria-label":"메뉴 닫기",children:"✕"})]}),l?(0,r.jsxs)("div",{className:h().me,children:[(0,r.jsx)("b",{children:a?"".concat(a,"님"):"회원님"}),(0,r.jsx)("a",{href:"/edit/",children:"프로필 수정"})]}):(0,r.jsxs)("div",{className:h().auth,children:[(0,r.jsx)("a",{className:h().login,href:S,children:"로그인"}),(0,r.jsx)("a",{className:h().join,href:S,children:"회원가입"})]}),(0,r.jsxs)("nav",{className:h().secs,"aria-label":"전체 메뉴",children:[(0,r.jsxs)("button",{type:"button",className:"".concat(h().sec," ").concat("shop"===d?h().secOn:""),onClick:()=>k("shop"),"aria-expanded":"shop"===d,children:[(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,r.jsx)("path",{d:"M4 9h16l-1 11H5L4 9z"}),(0,r.jsx)("path",{d:"M8 9V7a4 4 0 0 1 8 0v2"})]}),"쇼핑",(0,r.jsx)(x,{up:"shop"===d})]}),"shop"===d?(0,r.jsxs)("div",{className:h().sub,children:[(0,r.jsxs)("button",{type:"button",className:h().subBtn,onClick:()=>y(e=>!e),"aria-expanded":v,children:["자재별",(0,r.jsx)(x,{up:v})]}),v?(0,r.jsxs)("div",{className:h().sub2,children:[(0,r.jsx)("a",{href:"/shop/",className:N("/shop/"),children:"전체 보기"}),[...f.nf,...w].map(e=>(0,r.jsx)("a",{href:"/shop/".concat(e.slug,"/"),className:N("/shop/".concat(e.slug,"/")),children:e.label},e.slug))]}):null,(0,r.jsx)("a",{href:"/shop/brand/",className:N("/shop/brand/"),children:"브랜드별"}),(0,r.jsx)("a",{href:"/shop/best/",className:N("/shop/best/"),children:"베스트"}),(0,r.jsx)("a",{href:"/shop/search/",className:N("/shop/search/"),children:"자재 검색"})]}):null,(0,r.jsxs)("button",{type:"button",className:"".concat(h().sec," ").concat("build"===d?h().secOn:""),onClick:()=>k("build"),"aria-expanded":"build"===d,children:[(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:(0,r.jsx)("path",{d:"M3 21h18M5 21V8l7-5 7 5v13M10 21v-6h4v6"})}),"시공",(0,r.jsx)(x,{up:"build"===d})]}),"build"===d?(0,r.jsx)("div",{className:h().sub,children:(0,r.jsx)("a",{href:"/#cta",onClick:e=>{"/"===window.location.pathname&&(e.preventDefault(),n(),window.dispatchEvent(new Event("mcd:goto-cta")))},children:"시공 견적 문의"})}):null,(0,r.jsxs)("button",{type:"button",className:"".concat(h().sec," ").concat("b2b"===d?h().secOn:""),onClick:()=>k("b2b"),"aria-expanded":"b2b"===d,children:[(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,r.jsx)("rect",{x:"3",y:"7",width:"18",height:"13",rx:"2"}),(0,r.jsx)("path",{d:"M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M3 13h18"})]}),"B2B지원",(0,r.jsx)(x,{up:"b2b"===d})]}),"b2b"===d?(0,r.jsxs)("div",{className:h().sub,children:[(0,r.jsx)("a",{href:"/home/sketchup/",className:N("/home/sketchup/"),children:"스케치업 플러그인"}),(0,r.jsx)("a",{href:"/premium/#enterprise-top",children:"B2B 제휴"}),(0,r.jsx)("a",{href:"/proposal/",children:"협업 신청"}),(0,r.jsx)("a",{href:"/associate/",children:"입점 신청"}),(0,r.jsx)("p",{className:h().note,children:"이미지\xb7스펙북 다운로드, My 아카이브, 샘플 신청은 PC 에서 전문가 회원으로 이용할 수 있어요."})]}):null]}),(0,r.jsxs)("div",{className:h().links,children:[(0,r.jsx)("a",{href:l?"/point/":"/order-lookup/",children:l?"주문\xb7문의 내역":"비회원 주문 조회"}),(0,r.jsxs)("a",{href:"/shop/cart/",children:["장바구니",c?(0,r.jsx)("i",{children:c>99?"99+":c}):null]}),(0,r.jsx)("a",{href:"https://pf.kakao.com/_xapljG",target:"_blank",rel:"noopener noreferrer",onClick:()=>(0,u.p8)("KAKAO","mobile_profile_cs"),children:"고객센터"})]}),(0,r.jsxs)("div",{className:h().foot,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("a",{href:"/signup/",children:"전문가 회원 신청"}),(0,r.jsx)("a",{href:"/associate/",children:"입점 신청"})]}),(0,r.jsxs)("div",{className:h().small,children:[(0,r.jsx)("a",{href:"/terms/",target:"_blank",rel:"noopener",children:"이용약관"}),(0,r.jsx)("a",{href:"/privacypolicy/",target:"_blank",rel:"noopener",children:"개인정보처리방침"}),l?(0,r.jsx)("button",{type:"button",onClick:()=>{n(),s()},children:"로그아웃"}):null]})]})]})}),document.getElementById("modal-root")||document.body)}var v=n(87739),y=e=>{let{open:t,onClose:n,name:o}=e,l=(0,a.useRouter)(),d=(0,s.Z)(),h=!!(0,c.Z)();if((0,v.rr)())return(0,r.jsx)(g,{open:t,onClose:n,name:o,loggedIn:h,onLogout:d});if(!t||"undefined"==typeof document)return null;let f=e=>{n(),l.push(e)},p=e=>{n(),window.open(e,"_blank","noopener")};return(0,i.createPortal)((0,r.jsx)(j,{onClick:n,children:(0,r.jsxs)(k,{role:"dialog","aria-modal":"true","aria-label":"계정 메뉴",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(_,{}),h&&o&&(0,r.jsxs)(N,{children:[o,"님"]}),(0,r.jsx)(C,{children:"이미지 및 스펙북 다운로드, My 아카이브는 PC에서 이용할 수 있어요"}),h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{type:"button",onClick:()=>f("/edit"),children:"프로필 수정"}),(0,r.jsx)(S,{type:"button",onClick:()=>f("/point"),children:"주문\xb7문의 내역"})]}):(0,r.jsx)(S,{type:"button",onClick:()=>f("/login"),children:"로그인"}),(0,r.jsx)(S,{type:"button",onClick:()=>{(0,u.p8)("KAKAO","mobile_profile_cs"),p("https://pf.kakao.com/_xapljG")},children:"고객센터"}),(0,r.jsxs)(A,{children:[(0,r.jsx)(M,{type:"button",onClick:()=>p("/terms"),children:"이용약관"}),(0,r.jsx)("span",{"aria-hidden":!0,children:"\xb7"}),(0,r.jsx)(M,{type:"button",onClick:()=>p("/privacypolicy"),children:"개인정보처리방침"})]}),h&&(0,r.jsx)(S,{type:"button",$danger:!0,onClick:()=>{n(),d()},children:"로그아웃"})]})}),document.getElementById("modal-root")||document.body)};let w=(0,l.F4)(["from{transform:translateY(100%);}to{transform:translateY(0);}"]),j=l.ZP.div.withConfig({componentId:"sc-5c4787f2-0"})(["position:fixed;inset:0;z-index:13900;background:rgba(0,0,0,0.4);display:flex;align-items:flex-end;"]),k=l.ZP.div.withConfig({componentId:"sc-5c4787f2-1"})(["width:100%;background:#fff;border-radius:16px 16px 0 0;padding:8px 16px calc(12px + env(safe-area-inset-bottom,0px));animation:"," 0.22s ease-out;"],w),_=l.ZP.div.withConfig({componentId:"sc-5c4787f2-2"})(["width:36px;height:4px;border-radius:2px;background:#d8d5cf;margin:0 auto 12px;"]),N=l.ZP.div.withConfig({componentId:"sc-5c4787f2-3"})(["font-size:15px;font-weight:700;color:#111;padding:0 4px;"]),C=l.ZP.div.withConfig({componentId:"sc-5c4787f2-4"})(["font-size:12px;color:#888381;padding:4px 4px 10px;border-bottom:1px solid #eeebe6;margin-bottom:4px;"]),S=l.ZP.button.withConfig({componentId:"sc-5c4787f2-5"})(["display:block;width:100%;min-height:34px;padding:0 4px;border:0;background:transparent;text-align:left;font-family:inherit;font-size:15px;font-weight:600;color:",";cursor:pointer;&:active{background:#f4f2ee;}"],e=>{let{$danger:t}=e;return t?"#dc3545":"#2e2c28"}),A=l.ZP.div.withConfig({componentId:"sc-5c4787f2-6"})(["display:flex;align-items:center;gap:6px;padding:3px 4px 5px;border-bottom:1px solid #eeebe6;margin-bottom:2px;color:#b9b5ae;font-size:12px;"]),M=l.ZP.button.withConfig({componentId:"sc-5c4787f2-7"})(["border:0;background:transparent;padding:6px 0;font-family:inherit;font-size:12px;color:#888381;cursor:pointer;"])},75470:function(e,t,n){"use strict";n.d(t,{DN:function(){return N},F3:function(){return g},Mh:function(){return k},NV:function(){return m},Nh:function(){return S},Tb:function(){return l},Vh:function(){return r},a4:function(){return A},f0:function(){return C},fw:function(){return y},j1:function(){return o},kY:function(){return w},l4:function(){return v},nr:function(){return b},om:function(){return f},qB:function(){return _}}),n(37270);let r=(e,t,n)=>{var r;let o=Number(null==e?void 0:e.m2),i=n&&n>0&&o>0?Math.round((1-n/o)*100):Math.round(Number(null==e?void 0:e.pct));if(!(i>=5&&i<=70)||!(o>0)||!(t>0))return null;let a=10*Math.round(t/(1-i/100)/10);return a>t?{pct:i,unitVat:a,m2:Math.round(o),basis:(null==e?void 0:e.basis)==="MSRP"?"MSRP":"CHANNEL",source:String(null!==(r=null==e?void 0:e.source)&&void 0!==r?r:""),checkedAt:(null==e?void 0:e.checkedAt)?String(e.checkedAt):null}:null},o=e=>"MSRP"===e.basis?"제조사 권장소비자가":"다른 판매처 일반 판매가",i=e=>{var t,n;let r=String(null!==(t=null==e?void 0:e.feature)&&void 0!==t?t:"").replace(/\s+/g," ").trim();if(r.length>=4)return r.slice(0,90);let o=String(null!==(n=null==e?void 0:e.size)&&void 0!==n?n:"").replace(/\*/g,"\xd7");return[null==e?void 0:e.subCategory,o,(null==e?void 0:e.glossiness)==="해당없음"?"":null==e?void 0:e.glossiness].map(e=>String(null!=e?e:"").trim()).filter(Boolean).join(" \xb7 ")},a=e=>e&&"object"==typeof e?{status:"available"===e.status||"order"===e.status||"discontinued"===e.status?e.status:null,qty:null!=e.qty&&Number(e.qty)>0?Number(e.qty):null,unit:e.unit?String(e.unit):null,rolls:null!=e.rolls?Number(e.rolls):null,boxes:null!=e.boxes?Number(e.boxes):null,syncedAt:e.syncedAt?String(e.syncedAt):null}:null,l=e=>{var t;return(null==e?void 0:e.status)==="available"&&e.qty?"".concat(Math.floor(e.qty).toLocaleString("ko-KR")).concat(null!==(t=e.unit)&&void 0!==t?t:""):""},s=()=>"https://api2.macodi.co.kr".replace(/\/+$/,"");async function c(e,t){let n=await fetch("".concat(s()).concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error("".concat(e," ").concat(n.status));return await n.json()}async function u(e,t,n){return c(e,t)}let d=e=>{let t=String(null!=e?e:"").trim();return t?/^\d/.test(t)?t:"1".concat(t):""},h=e=>{var t,n,o,l,s;let c=Number(null==e?void 0:e.id);if(!(c>0))return null;let u=Number(null==e?void 0:null===(t=e.purchase)||void 0===t?void 0:t.unitPrice)||0,h=Number(null==e?void 0:e.price)||0,f=null!==(l=null==e?void 0:null===(n=e.purchase)||void 0===n?void 0:n.priceUnitLabel)&&void 0!==l?l:null==e?void 0:null===(o=e.purchase)||void 0===o?void 0:o.unitLabel,p=String((null==e?void 0:e.brand)||(null==e?void 0:e.manufacturer)||"").trim(),m=String((null==e?void 0:e.series)||"").trim(),b=Math.round(1.1*(u||h));return{id:c,name:String(null!==(s=null==e?void 0:e.name)&&void 0!==s?s:""),brand:m&&!p.includes(m)?"".concat(p," / ").concat(m):p,img:String((null==e?void 0:e.img)||(null==e?void 0:e.flatImg)||""),unitVat:b,unitText:u?d(f):h?"1㎡":"",m2Vat:u&&"1㎡"!==d(f)?Math.round(1.1*h):0,isNew:1===Number(null==e?void 0:e.isNew),premium:(null==e?void 0:e.hasSeamless)&&(null==e?void 0:e.hasPBR)?"both":(null==e?void 0:e.hasSeamless)?"seamless":"",desc:i(e),stock:a(null==e?void 0:e.stock),ref:r(null==e?void 0:e.ref,b)}},f=[{name:"화이트",hex:"#ffffff"},{name:"아이보리",hex:"#f1e6cf"},{name:"베이지",hex:"#d2b48c"},{name:"브라운",hex:"#7a4a2b"},{name:"그레이",hex:"#9b9b9b"},{name:"차콜",hex:"#3d3d40"},{name:"블랙",hex:"#111111"},{name:"그린",hex:"#3f8f5a"},{name:"블루",hex:"#2f6fb5"},{name:"네이비",hex:"#1f2d5a"},{name:"레드",hex:"#c0392b"},{name:"옐로",hex:"#e6b422"},{name:"핑크",hex:"#e8a0b4"}],p=e=>/^#[0-9a-fA-F]{6}$/.test(String(null!=e?e:"")),m={brand:"",glossiness:"",purpose:"",fire:"",pmin:null,pmax:null,stock:!1,color:"",sub:"",q:""},b=e=>[e.brand,e.glossiness,e.purpose,e.fire,e.sub].reduce((e,t)=>e+(t?t.split(",").filter(Boolean).length:0),0)+(null!=e.pmin||null!=e.pmax?1:0)+(e.stock?1:0)+(e.color?1:0),x=(e,t)=>{var n,r,o,i;let a={...m,...null!==(n=e.filters)&&void 0!==n?n:{}},l=null!=a.pmin||null!=a.pmax,s={page:null!==(r=e.page)&&void 0!==r?r:1,categories:e.categories,includeWholesale:!0};return a.brand&&"brand"!==t&&(s.brand=a.brand),a.glossiness&&"glossiness"!==t&&(s.glossiness=a.glossiness),a.purpose&&"purpose"!==t&&(s.purpose=a.purpose),a.fire&&"fire"!==t&&(s.fire=a.fire),a.stock&&(s.stock=1),a.sub&&"sub"!==t&&(s.subCategory=a.sub),a.q&&(s.txtSearch=a.q),l&&"pmin"!==t&&(s.minPrice=String(null!==(o=a.pmin)&&void 0!==o?o:0),s.maxPrice=String(null!==(i=a.pmax)&&void 0!==i?i:3e6),s.isSeparateInquiry=1),s};async function g(e){var t,n,r,o,i,a;let l=null!==(r=e.page)&&void 0!==r?r:1;if(p(null===(t=e.filters)||void 0===t?void 0:t.color)){let t=await u("/filters/color-search",{...x(e),color:e.filters.color},1===l?120:void 0),n=Array.isArray(null==t?void 0:t.data)?t.data:[],r=Number(null==t?void 0:t.total)||0;return{items:n.map(h).filter(Boolean),total:r,hasMore:n.length>0&&36*l0}}async function v(e){var t,n;if(p(null===(t=e.filters)||void 0===t?void 0:t.color)){let t=await u("/filters/color-search",{...x({...e,page:1}),color:e.filters.color});return Number(null==t?void 0:t.total)||0}let r=await u("/product",{...x({...e,page:1}),...(null===(n=e.filters)||void 0===n?void 0:n.q)?{}:{sort:"recommended"},logSearch:!1});return Number(null==r?void 0:r.total)||0}async function y(e,t){try{let n=await u("/filters/".concat(e),x({...t,page:1},e),600);return Array.isArray(n)?n.filter(e=>"string"==typeof e&&e.trim()):[]}catch(e){return[]}}async function w(e,t){if(!e.length)return[];try{let n=await u("/filters/sub-category",{page:1,categories:e,includeWholesale:!0,...t?{brand:t}:{}},600);return Array.isArray(n)?n.filter(e=>"string"==typeof e&&e.trim()):[]}catch(e){return[]}}let j=async(e,t)=>{let n=await fetch("".concat(s()).concat(e),{});if(!n.ok)throw Error("".concat(e," ").concat(n.status));return n.json()};async function k(e){try{let t=await j("/product/suggest?q=".concat(encodeURIComponent(e),"&limit=10"));return(Array.isArray(t)?t:[]).filter(e=>null==e?void 0:e.text).map(e=>{var t;return{text:String(e.text),type:String(null!==(t=e.type)&&void 0!==t?t:""),count:Number(e.count)||0}})}catch(e){return[]}}async function _(){try{let e=await j("/product/popular-searches",600);return(Array.isArray(e)?e:[]).map(e=>String(e)).filter(Boolean)}catch(e){return[]}}async function N(e){if(!e.length)return[];try{var t;let n=await fetch("".concat(s(),"/product/cards?ids=").concat(e.join(",")),{cache:"no-store"});if(!n.ok)return[];let r=await n.json();return(null!==(t=null==r?void 0:r.products)&&void 0!==t?t:[]).map(h).filter(Boolean)}catch(e){return[]}}async function C(e){if(!e.length)return{};try{var t;let n=await fetch("".concat(s(),"/refprice?ids=").concat(e.join(",")),{cache:"no-store"});if(!n.ok)return{};return null!==(t=await n.json())&&void 0!==t?t:{}}catch(e){return{}}}async function S(e){if(!e.length)return{};try{let t=await fetch("".concat(s(),"/stock?ids=").concat(e.join(",")),{cache:"no-store"});if(!t.ok)return{};let n=await t.json(),r={};for(let e of Object.keys(null!=n?n:{})){let t=a(n[e]);t&&(r[Number(e)]=t)}return r}catch(e){return{}}}async function A(){let e=await u("/category/filter",{categories:[],brand:"",maxPrice:"3000000",minPrice:"0",size:"",glossiness:"",isSeamless:"false"},600);return(Array.isArray(e)?e:[]).map(e=>({id:Number(e.id),name:String(e.name),productCount:Number(e.productCount)||0})).filter(e=>e.id>0&&e.productCount>0)}},56621:function(e,t,n){"use strict";n.d(t,{Q:function(){return a},h:function(){return c}});var r=n(2265);let o="mcd_shop_cart",i="mcd-shop-cart",a=(e,t,n)=>"".concat(e,":").concat(t,":").concat(null!=n?n:"");function l(){try{let e=JSON.parse(localStorage.getItem(o)||"[]");return Array.isArray(e)?e.filter(e=>e&&"string"==typeof e.key&&e.productId>0):[]}catch(e){return[]}}function s(e){try{localStorage.setItem(o,JSON.stringify(e.slice(0,100)))}catch(e){}window.dispatchEvent(new Event(i))}function c(){let[e,t]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=()=>t(l());return e(),window.addEventListener(i,e),window.addEventListener("storage",e),()=>{window.removeEventListener(i,e),window.removeEventListener("storage",e)}},[]);let n=(0,r.useCallback)(e=>{let t=a(e.kind,e.productId,e.size),n=l(),r=n.find(e=>e.key===t);s([r?{...r,...e,key:t,qty:"buy"===e.kind?r.qty+e.qty:0,areaM2:"buy"===e.kind?r.areaM2>0&&e.areaM2>0?Math.round((r.areaM2+e.areaM2)*100)/100:0:e.areaM2,addedAt:Date.now()}:{...e,key:t,addedAt:Date.now()},...n.filter(e=>e.key!==t)])},[]),o=(0,r.useCallback)((e,t)=>{s(l().map(n=>n.key===e?{...n,...t}:n))},[]),c=(0,r.useCallback)(e=>s(l().filter(t=>t.key!==e)),[]);return{items:e,count:e.length,add:n,update:o,remove:c}}},87739:function(e,t,n){"use strict";n.d(t,{IB:function(){return a},kx:function(){return i},rr:function(){return l}});var r=n(2265),o=n(64911);let i=[{label:"마코디홈",href:"/",match:e=>"/"===e},{label:"자재별",href:"/shop/",match:e=>/^\/shop(\/(?!best|brand)|$)/.test(e)},{label:"브랜드별",href:"/shop/brand/",match:e=>e.startsWith("/shop/brand")},{label:"베스트",href:"/shop/best/",match:e=>e.startsWith("/shop/best")},{label:"B2B지원",href:"/home/sketchup/",match:e=>e.startsWith("/home/sketchup")}],a=()=>!(0,o.v)();function l(){let[e,t]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(0,o.v)()&&t(!1)},[]),e}},11240:function(e,t,n){"use strict";var r=n(2265),o=n(43618),i=n(89723),a=n(29918);t.Z=()=>{let e=(0,o.Zl)(i.Z);return(0,r.useCallback)(async()=>{try{await a.et.post("/company/logout")}catch(e){}localStorage.removeItem("TOKEN"),e({isLogin:!1,isPhoneAuth:!1}),window.location.href="/home"},[e])}},64911:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=n(40257);function o(){if("ja"===r.env.NEXT_PUBLIC_LOCALE)return!0;let e=window.location.hostname;if("macodi.net"===e||"www.macodi.net"===e)return!0;try{let e=new URLSearchParams(window.location.search).get("lang");if("ja"===e)return localStorage.setItem("force_ja","1"),!0;if("ko"===e)return localStorage.removeItem("force_ja"),!1;if("1"===localStorage.getItem("force_ja"))return!0}catch(e){}return!1}},68699:function(e){e.exports={dim:"mobileDrawer_dim__uOIio",drawer:"mobileDrawer_drawer__83FN2",drawerIn:"mobileDrawer_drawerIn__DNs_1",head:"mobileDrawer_head__KVtqJ",logo:"mobileDrawer_logo__HiF3W",close:"mobileDrawer_close__QkZzz",auth:"mobileDrawer_auth__Ho0e_",login:"mobileDrawer_login__7xZxB",join:"mobileDrawer_join__uTdIL",me:"mobileDrawer_me__HCEHK",secs:"mobileDrawer_secs__CtNhu",sec:"mobileDrawer_sec__SRw_n",subBtn:"mobileDrawer_subBtn__uKSgC",secOn:"mobileDrawer_secOn__6cvzd",sub:"mobileDrawer_sub__pZU32",sub2:"mobileDrawer_sub2__T0A1p",here:"mobileDrawer_here__wP2MO",note:"mobileDrawer_note__mDs8P",links:"mobileDrawer_links__r599J",foot:"mobileDrawer_foot__Y8AM_",small:"mobileDrawer_small__8Y2EZ"}}}]);