"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9655],{88750:function(e,t,n){var i=n(57437);n(2265);var o=n(88862),r=n(22681),d=n(39026);let s=o.ZP.div.withConfig({componentId:"sc-c75a1f82-0"})(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:1000;"]),a=o.ZP.div.withConfig({componentId:"sc-c75a1f82-1"})(["background-color:white;padding:20px;border-radius:10px;width:550px;height:550px;position:relative;@media (max-width:768px){width:90%;height:400px;}@media (max-width:480px){width:95%;height:350px;}"]);o.ZP.button.withConfig({componentId:"sc-c75a1f82-2"})(["position:absolute;top:10px;right:10px;background:none;border:none;font-size:18px;cursor:pointer;@media (max-width:768px){font-size:16px;}@media (max-width:480px){font-size:14px;}"]),t.Z=e=>{let{onClose:t,onComplete:n}=e,o=(0,d.eA)(t);return(0,i.jsx)(s,{onMouseDown:o.onMouseDown,onClick:o.onClick,children:(0,i.jsx)(a,{...o.contentProps,children:(0,i.jsx)(r.ZP,{onComplete:e=>{n(e),t()},style:{width:"100%",height:"100%"}})})})}},59711:function(e,t,n){n.d(t,{BQ:function(){return r},Me:function(){return d},YW:function(){return i},dO:function(){return s},gW:function(){return o}});let i="--mcd-sidetab-top",o="#413d7d",r="#b9bac2",d=136,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return"below"===e?"calc(var(".concat(i,", ").concat(t,"px) + ").concat(154,"px)"):"var(".concat(i,", ").concat(t,"px)")}},99655:function(e,t,n){n.d(t,{Z:function(){return tT}});var i,o=n(57437),r=n(2265),d=n(88862),s=n(43618),a=n(50194),l=n(87530),p=n(86379),c=n(76904),h=n(52482),x=n(27171),u=n(15949),m=n(62758),g=n(59711),f=n(54887),b=n(7261),w=n(83375),v=n(88750),j=n(78155),y=n(42742),C=n(33145);let P=d.ZP.div.withConfig({componentId:"sc-ee1731d6-0"})(["position:relative;background:#fff;padding:16px 12px 12px 12px;width:100%;height:100%;display:flex;flex-direction:column;@media (max-height:720px){padding:12px 10px 10px 10px;}html.su-plugin &{padding:10px 8px 8px 8px;}html.su-plugin & button,html.su-plugin & button *,html.su-plugin & input{font-size:12px;}@media (min-width:769px) and (max-width:1440px){padding:10px 8px 8px 8px;& button,& button *,& input{font-size:12px;}}"]),I=d.ZP.button.withConfig({componentId:"sc-ee1731d6-1"})(["position:absolute;top:16px;left:16px;background:none;border:none;font-size:16px;cursor:pointer;z-index:3;"]),Z=d.ZP.button.attrs({type:"button"}).withConfig({componentId:"sc-ee1731d6-2"})(["position:absolute;top:16px;left:50%;transform:translateX(-50%);background:none;border:none;padding:0;font-size:16px;font-weight:400;color:#0d0d0d;white-space:nowrap;cursor:default;pointer-events:none;z-index:3;"]);d.ZP.div.withConfig({componentId:"sc-ee1731d6-3"})(["position:absolute;top:5px;right:15px;font-size:16px;cursor:pointer;margin-bottom:10px;&:hover{font-weight:bold;border-bottom:1px solid #333333;}"]),d.ZP.div.withConfig({componentId:"sc-ee1731d6-4"})(["display:flex;justify-content:space-between;gap:4px;margin-bottom:8px;"]),d.ZP.div.withConfig({componentId:"sc-ee1731d6-5"})(["font-size:12px;border-bottom:1px solid #333333;cursor:pointer;&:hover{font-weight:bold;}"]),d.ZP.div.withConfig({componentId:"sc-ee1731d6-6"})(["font-size:12px;border-bottom:1px solid #000;cursor:pointer;color:",";&:hover{font-weight:bold;}"],e=>(e.disabled,"#333333"));let z=d.ZP.div.withConfig({componentId:"sc-ee1731d6-7"})(["flex:0 0 auto;display:flex;flex-direction:column;justify-content:center;gap:6px;@media (max-height:720px){gap:5px;}"]),k=d.ZP.div.withConfig({componentId:"sc-ee1731d6-8"})(["display:flex;align-items:center;gap:4px;"]),S=d.ZP.div.withConfig({componentId:"sc-ee1731d6-9"})(["font-size:20px;font-weight:500;@media (max-height:720px){font-size:18px;}html.su-plugin &{font-size:13px;}@media (min-width:769px) and (max-width:1440px){font-size:13px;}"]),E=d.ZP.div.withConfig({componentId:"sc-ee1731d6-10"})(["font-size:10px;color:#999;"]),A=d.ZP.div.withConfig({componentId:"sc-ee1731d6-11"})(["color:red;font-size:11px;"]),N=d.ZP.div.withConfig({componentId:"sc-ee1731d6-12"})(["height:1px;background:#000;margin:6px 0;@media (max-height:720px){margin:5px 0;}"]),F=d.ZP.div.withConfig({componentId:"sc-ee1731d6-13"})([""]),L=d.ZP.div.withConfig({componentId:"sc-ee1731d6-14"})(["display:flex;gap:4px;"]),B=d.ZP.div.withConfig({componentId:"sc-ee1731d6-15"})(["display:flex;align-items:center;margin:8px 0;cursor:pointer;html.su-plugin &{margin:2px 0;}"]),M=(0,d.ZP)(C.default).withConfig({componentId:"sc-ee1731d6-16"})(["margin-right:6px;html.su-plugin &{width:16px !important;height:16px !important;margin-right:4px;}"]),T=d.ZP.div.withConfig({componentId:"sc-ee1731d6-17"})(["font-size:13px;color:#555;line-height:1.3;html.su-plugin &{font-size:11px;line-height:1.15;}@media (min-width:769px) and (max-width:1440px){font-size:12px;}"]),D=d.ZP.div.withConfig({componentId:"sc-ee1731d6-18"})(["display:flex;justify-content:space-between;align-items:center;flex-direction:column;gap:4px;padding:6px 0 18px;html.su-plugin &{padding:4px 0 14px;}html.su-plugin & *{font-size:12px;}html.su-plugin & > div{height:28px !important;min-height:28px !important;padding:4px 8px !important;}@media (min-width:769px) and (max-width:1440px){& *{font-size:12px;}}"]);d.ZP.div.withConfig({componentId:"sc-ee1731d6-19"})(["font-size:11px;color:#555;"]);let W=d.ZP.div.withConfig({componentId:"sc-ee1731d6-20"})(["flex:1 1 0;min-height:0;margin-top:30px;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:3px;@media (max-height:720px){margin-top:8px;}html.su-plugin &{margin-top:48px;}"]);d.ZP.div.withConfig({componentId:"sc-ee1731d6-21"})(["display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:flex-start;height:100%;width:100%;padding:8px;font-size:18px;overflow-y:auto;@media (max-height:720px){font-size:17px;padding:6px;}"]);var O=n(68117),R=n(89723),_=n(33745),q=n(62691),V=n(99376),K=n(51532),$=n(86484),Q=n(29918),U=()=>{let e=(0,s.Zl)(c.Z),{mutate:t,isLoading:n}=(0,$.useMutation)(async e=>{let{productId:t,areaM2:n}=e,i=localStorage.getItem("TOKEN");if(!i)throw Error("로그인이 필요합니다.");return(await Q.et.patch("/cart/".concat(t,"/area"),{areaM2:n},{headers:{Authorization:"Bearer ".concat(i)}})).data},{onError:e=>{}});return{updateArea:(n,i)=>{e(e=>e.map(e=>e.productId===n?{...e,areaM2:i}:e)),t({productId:n,areaM2:i})},saving:n}},X=n(61545);let H=e=>{let{text:t}=e,n=(0,r.useRef)(null),i=(0,r.useRef)(null),[d,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e;let t=n.current,o=i.current;if(!t||!o)return;let r=()=>{let e=o.scrollWidth-t.clientWidth,n=e>2?e:0;s(e=>e===n?e:n)};return r(),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(r)).observe(t),()=>null==e?void 0:e.disconnect()},[t]),(0,o.jsx)(ea,{ref:n,title:t,$hasOverflow:d>0,children:(0,o.jsx)(el,{ref:i,style:{"--marquee-d":"-".concat(d,"px")},children:t})})};var J=e=>{var t;let{cartData:n,checked:i,onToggle:d,onDelete:a}=e,[l,p]=(0,r.useState)(!1),[c,h]=(0,s.FV)(O.Z),{updateArea:x}=U(),u=(0,V.useRouter)(),m=(0,V.usePathname)(),g=(0,V.useSearchParams)(),f=()=>{let e=new URLSearchParams((null==g?void 0:g.toString())||"");e.set("pid",String(n.productId)),u.push("".concat(m||"/home","?").concat(e.toString()),{scroll:!1})},b=null!==(t=n.areaM2)&&void 0!==t?t:c[n.productId],[w,v]=(0,r.useState)(null),P=null!=w?w:"number"==typeof b&&b>0?String(b):"";return(0,r.useEffect)(()=>{if(!l)return;let e=e=>{"Enter"===e.key?(a(),p(!1)):"Escape"===e.key&&p(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[l,a]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Y,{onClick:d,children:[(0,o.jsx)(G,{onClick:e=>{e.stopPropagation(),p(!0)},children:(0,o.jsx)(C.default,{src:K.Z,alt:"삭제 아이콘",width:10,height:10})}),(0,o.jsx)(et,{role:"button",title:"상세 보기",onClick:e=>{e.stopPropagation(),f()},children:(0,o.jsx)(ee,{style:{backgroundImage:n.img?'url("'.concat(n.img,'")'):void 0},role:"img","aria-label":n.name})}),(0,o.jsxs)(en,{children:[(0,o.jsxs)(ei,{children:[(0,o.jsx)(H,{text:n.name}),(0,o.jsxs)(eo,{onClick:e=>e.stopPropagation(),children:[(0,o.jsx)(er,{type:"text",inputMode:"decimal",placeholder:"물량",value:P,onChange:e=>v(e.target.value.replace(/[^\d.]/g,"")),onBlur:()=>{if(null===w)return;let e=Number(w),t=""===w.trim()||!Number.isFinite(e)||e<=0?null:Math.round(100*e)/100;v(null),t!==(null!=b?b:null)&&(h(e=>({...e,[n.productId]:t})),x(n.productId,t))},onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},title:"적용 면적(m\xb2)"}),(0,o.jsx)(ed,{children:"m\xb2"})]})]}),(0,o.jsx)(ep,{children:(0,o.jsx)(ec,{children:(0,o.jsxs)("div",{children:[n.category," / ",n.subCategory]})})}),n.completed&&(0,o.jsx)(eh,{$kind:n.completed,children:"spec"===n.completed?"스펙북 다운로드 완료":"샘플 신청 완료"})]})]}),l&&(0,o.jsxs)(j.Z,{onClose:()=>p(!1),children:[(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:18},children:"정말로 삭제하시겠습니까?"}),(0,o.jsxs)(y.nK,{children:[(0,o.jsx)(y.zx,{onClick:()=>{a(),p(!1)},children:"삭제"}),(0,o.jsx)(y.zx,{onClick:()=>p(!1),children:"취소"})]})]})]})};let Y=d.ZP.div.withConfig({componentId:"sc-5c8242a8-0"})(["position:relative;display:flex;align-items:center;width:calc(100% - 14px);margin-left:7px;margin-right:7px;max-width:441px;height:96px;background-color:white;border:1px solid #e5e5e5;border-radius:10px;box-shadow:0 0 0 1px rgba(0,0,0,0.02),0 10px 15px -10px rgba(0,0,0,0.05);margin-bottom:10px;@media (max-width:768px){max-width:calc(100% - 14px);}html.su-plugin &{height:80px;margin-bottom:8px;}"]);d.ZP.div.withConfig({componentId:"sc-5c8242a8-1"})(["position:absolute;top:8px;left:8px;z-index:1;"]);let G=d.ZP.div.withConfig({componentId:"sc-5c8242a8-2"})(["position:absolute;top:6px;right:6px;cursor:pointer;opacity:0.4;transition:opacity 0.15s ease;line-height:0;&:hover{opacity:0.9;}"]),ee=d.ZP.div.withConfig({componentId:"sc-5c8242a8-3"})(["width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat;"]),et=d.ZP.div.withConfig({componentId:"sc-5c8242a8-4"})([""," width:60px;height:60px;margin-left:14px;border-radius:6px;flex-shrink:0;cursor:pointer;html.su-plugin &{width:80px;height:80px;margin-left:0;border-radius:4px 0 0 4px;}"],X.F);(0,d.ZP)(C.default).withConfig({componentId:"sc-5c8242a8-5"})(["object-fit:cover !important;width:60px !important;height:60px !important;html.su-plugin &{width:80px !important;height:80px !important;}"]);let en=d.ZP.div.withConfig({componentId:"sc-5c8242a8-6"})(["flex:1;min-width:0;padding:10px 14px 10px 10px;display:flex;flex-direction:column;justify-content:center;gap:7px;html.su-plugin &{padding:6px 18px 6px 8px;gap:4px;}"]),ei=d.ZP.div.withConfig({componentId:"sc-5c8242a8-7"})(["display:flex;align-items:flex-end;justify-content:space-between;gap:8px;border-bottom:1px solid #a0a0a0;"]),eo=d.ZP.div.withConfig({componentId:"sc-5c8242a8-8"})(["flex:0 0 auto;display:flex;align-items:center;gap:3px;padding-bottom:3px;"]),er=d.ZP.input.withConfig({componentId:"sc-5c8242a8-9"})(["width:58px;height:26px;padding:0 6px;border:1px solid #d1d5db;border-radius:6px;background:#fff;font-size:13px;color:#222;text-align:right;outline:none;&:focus{border-color:#6864d0;}html.su-plugin &{width:46px;height:22px;font-size:11px;}"]),ed=d.ZP.span.withConfig({componentId:"sc-5c8242a8-10"})(["font-size:13px;color:#222222;white-space:nowrap;html.su-plugin &{font-size:11px;}"]),es=(0,d.F4)(["0%,12%{transform:translateX(0);}88%,100%{transform:translateX(var(--marquee-d,0px));}"]),ea=d.ZP.div.withConfig({componentId:"sc-5c8242a8-11"})(["flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;font-size:13px;font-weight:700;line-height:18px;"," html.su-plugin &{font-size:13px;line-height:17px;}"],e=>{let{$hasOverflow:t}=e;return t&&(0,d.iv)(["mask-image:linear-gradient( to right,#000 calc(100% - 16px),transparent 100% );-webkit-mask-image:linear-gradient( to right,#000 calc(100% - 16px),transparent 100% );&:hover span{will-change:transform;animation:"," 2.5s ease-in-out infinite;}"],es)}),el=d.ZP.span.withConfig({componentId:"sc-5c8242a8-12"})(["display:inline-block;white-space:nowrap;"]),ep=d.ZP.div.withConfig({componentId:"sc-5c8242a8-13"})(["display:flex;flex-direction:column;gap:3px;"]),ec=d.ZP.div.withConfig({componentId:"sc-5c8242a8-14"})(["display:flex;justify-content:space-between;div{font-size:13px;font-weight:300;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}html.su-plugin & div{font-size:11px;}"]),eh=d.ZP.div.withConfig({componentId:"sc-5c8242a8-15"})(["display:inline-block;margin-top:2px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;width:fit-content;background:",";color:",";html.su-plugin &{font-size:10px;padding:1px 6px;}"],e=>{let{$kind:t}=e;return"spec"===t?"#EDE9FE":"#DCFCE7"},e=>{let{$kind:t}=e;return"spec"===t?"#5B21B6":"#166534"});var ex=e=>{let{selectedProducts:t,selectedIds:n,onToggle:i,onDelete:r}=e;return(0,o.jsx)(eu,{children:0===t.length?(0,o.jsx)(em,{children:(0,o.jsxs)(eg,{children:["샘플 \xb7 스펙북을 한번에 담고 ",(0,o.jsxs)(ef,{children:["원클릭으로"," ","스펙북을 다운로드하고 "]}),"샘플을 신청해보세요."]})}):t.slice().reverse().map(e=>(0,o.jsx)(J,{cartData:e,checked:n.includes(e.id),onToggle:()=>i(e.id),onDelete:()=>r(e.id)},e.id))})};let eu=d.ZP.div.withConfig({componentId:"sc-48a7369-0"})(["display:flex;flex-direction:column;overflow-y:auto;height:100%;width:100%;"]),em=d.ZP.div.withConfig({componentId:"sc-48a7369-1"})(["flex:1;display:flex;justify-content:center;align-items:center;text-align:center;font-size:11px;line-height:1.5;padding:0 16px;color:#666565;@media (min-width:1025px){font-size:16px;}html.su-plugin &{font-size:12px;}"]),eg=d.ZP.div.withConfig({componentId:"sc-48a7369-2"})(["text-align:center;line-height:1.5;font-size:11px;color:inherit;@media (min-width:1025px){font-size:16px;}html.su-plugin &{font-size:12px;}"]),ef=d.ZP.span.withConfig({componentId:"sc-48a7369-3"})(["display:inline;font-size:inherit;font-weight:inherit;line-height:inherit;@media (min-width:1025px){display:block;}"]),eb=d.ZP.div.withConfig({componentId:"sc-da556b19-0"})(["position:fixed;top:0;left:0;width:100%;height:100%;z-index:100000;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;"]),ew=d.ZP.div.withConfig({componentId:"sc-da556b19-1"})(["background-color:white;padding:20px;border-radius:8px;position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:6px;"]),ev=d.ZP.div.withConfig({componentId:"sc-da556b19-2"})(["font-size:16px;font-weight:400;line-height:26.25px;text-align:center;"]),ej=d.ZP.div.withConfig({componentId:"sc-da556b19-3"})(["font-size:16px;font-weight:500;line-height:25px;text-align:center;color:rgba(149,149,149,1);margin-bottom:5px;"]),ey=d.ZP.div.withConfig({componentId:"sc-da556b19-4"})(["width:100%;height:1px;background-color:#8f8f8f;"]);var eC=e=>{let{onClose:t}=e;return(0,o.jsx)(eb,{children:(0,o.jsxs)(ew,{children:[(0,o.jsx)(ev,{children:"샘플 신청이 완료되었습니다."}),(0,o.jsx)(ey,{}),(0,o.jsxs)(ej,{children:["판매사 별 상담 후 샘플 배송 완료까지",(0,o.jsx)("br",{})," 영업일 기준 2~3일 이내에 처리될 예정입니다."]}),(0,o.jsx)(w.Z,{content:"확인",width:85,height:33,mWidth:85,onClick:t,mContentVisible:"flex"})]})})},eP=(e,t,n,i)=>{let[o,d]=(0,r.useState)({project:"",companyName:"",recipient:"",phone:"",address:"",detailAddress:"",checkBox:"",cart:""}),s=e=>/^[\s\S]{2,}$/.test(e),a=e=>/^[\s\S]{2,}$/.test(e),l=e=>{let t=/^01[0|1|6-9][0-9]{3,4}[0-9]{4}$/.test(e.replace(/[-\s]/g,""));return t||i(e=>({...e,phone:""})),t},p=e=>/^[가-힣a-zA-Z\s]{2,}$/.test(e);return{formErrors:o,validateForm:()=>{let o={project:"",companyName:"",recipient:"",phone:"",address:"",detailAddress:"",checkBox:"",cart:""};return 0===e.length&&(o.cart="샘플\xb7스펙북이 비어있습니다. 샘플을 추가해주세요."),n.project?a(n.project)||(o.project="유효한 현장명(프로젝트)을 입력해주세요. (최소 2자)",i(e=>({...e,project:""}))):o.project="현장명(프로젝트)을 입력해주세요.",n.companyName?s(n.companyName)||(o.companyName="유효한 회사명/학교명을 입력해주세요. (최소 2자)",i(e=>({...e,companyName:""}))):o.companyName="회사명/학교명을 입력해주세요.",n.recipient?p(n.recipient)||(o.recipient="유효한 이름을 입력해주세요. (한글, 영어, 최소 2자)",i(e=>({...e,recipient:""}))):o.recipient="받으시는 분을 입력해주세요.",n.phone?l(n.phone)||(o.phone="유효한 연락처를 입력해주세요.",i(e=>({...e,phone:""}))):o.phone="연락처를 입력해주세요.",n.address||(o.address="주소를 입력해주세요.",i(e=>({...e,address:""}))),n.detailAddress||(o.detailAddress="상세주소를 입력해주세요.",i(e=>({...e,detailAddress:""}))),t||(o.checkBox="정보 공유에 동의해주세요."),d(o),!Object.values(o).some(e=>""!==e)},setFormErrors:d}},eI=n(35775),eZ=n(72044),ez=e=>{let{onError:t,onSuccess:n}=e,i=(0,$.useQueryClient)(),o=(0,eZ.Z)(),r=async e=>{let t=localStorage.getItem("TOKEN");if(!t)throw Error("로그인이 필요합니다.");return(await Q.et.post("/sample",e,{headers:{Authorization:"Bearer ".concat(t)}})).data},{mutate:d,isLoading:s,error:a}=(0,$.useMutation)(e=>r(e),{onError:e=>{var n;t(null===(n=e.response)||void 0===n?void 0:n.data.message)},onSuccess:e=>{let t=(null==e?void 0:e.id)||0;i.invalidateQueries("sampleHistory"),n(t)}});return{submitInquiry:e=>{o||d(e)},loading:s,error:a}},ek=e=>{let{onError:t,onSuccess:n}=e;return(0,$.useMutation)(e=>Q.Cq.post("/product/excel/downloads",e,{headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(localStorage.getItem("TOKEN"))}}),{onSuccess:e=>{if(201===e.status){var t,i;n();let o=window;if(o&&(o.sketchup||/SketchUp/i.test((null===(t=o.navigator)||void 0===t?void 0:t.userAgent)||"")||"undefined"!=typeof document&&document.documentElement.classList.contains("su-plugin"))&&(null==o?void 0:null===(i=o.sketchup)||void 0===i?void 0:i.openExternal)){o.sketchup.openExternal(e.data);return}let r=e.data.split("/"),d=r[r.length-1],s=document.createElement("a");s.href=e.data,s.download=d,document.body.appendChild(s),s.click(),document.body.removeChild(s)}},onError:e=>{var n,i;t((null===(i=e.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.message)||"An error occurred")}})};let eS=d.ZP.input.withConfig({componentId:"sc-c54dae21-0"})(["width:100%;margin:2px 0;background-color:transparent;border-bottom:2px solid rgba(149,149,149,1);padding:7px;box-sizing:border-box;font-size:",";font-family:'Pretendard',sans-serif;font-weight:400;line-height:23.87px;text-align:left;color:black;&::placeholder{color:",";}&:focus{border-bottom-color:",";}"],e=>e.fontSize,e=>e.hasError?"red":"rgba(149, 149, 149, 1)",e=>e.hasError?"red":"black");var eE=e=>{let{placeholder:t,name:n,value:i,onChange:r,hasError:d,readOnly:s,fontSize:a="15px"}=e;return(0,o.jsx)(eS,{placeholder:t,name:n,value:i,onChange:r,hasError:d,readOnly:s,fontSize:a})},eA=n(10020),eN={src:"/_next/static/media/checkbox.f9e0682b.svg",height:24,width:24,blurWidth:0,blurHeight:0},eF=n(92004),eL=n(68361);function eB(e){let t=async()=>{let{data:e}=await Q.et.get("/toss/orders/quote",{params:{type:"SAMPLE"}});return e};return(0,$.useQuery)(["sample-quote"],t,{enabled:e,staleTime:0,cacheTime:0})}function eM(e){let{defaultOpen:t=!1,className:n,id:i="order-policies"}=e,[d,s]=(0,r.useState)(t);return(0,o.jsxs)(eT,{className:n,children:[(0,o.jsxs)(eD,{type:"button","aria-expanded":d,"aria-controls":i,onClick:()=>s(e=>!e),children:[(0,o.jsx)("span",{children:"샘플 환불\xb7재발송 정책"}),(0,o.jsx)("span",{className:"chev",children:d?"▲":"▼"})]}),d&&(0,o.jsxs)(eW,{id:i,"aria-label":"샘플 환불\xb7재발송 정책",children:[(0,o.jsxs)(eO,{children:[(0,o.jsx)(eR,{children:"1) 기본 원칙"}),(0,o.jsxs)(e_,{children:[(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"샘플은 유료"}),"이며, 가격은"," ",(0,o.jsx)("b",{children:"회원 100원 / 비회원 1,000원"}),"입니다. ",(0,o.jsx)("b",{children:"배송비 6,500원"}),"이 부과됩니다(판매사별 부과 가능)."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"단순 변심\xb7색상/질감 불만족"}),"은 환불 대상이 아닙니다."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"마코디/판매사 과실"}),"이 명확한 경우에만 샘플 가격과 배송비 ",(0,o.jsx)("b",{children:"전액 환불"})," 또는 ",(0,o.jsx)("b",{children:"무료 재발송"}),"이 가능합니다."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"추가 샘플비"}),"가 발생할 수 있으며,"," ",(0,o.jsx)("b",{children:"결제 전에 고지"}),"하고 ",(0,o.jsx)("b",{children:"동의 후 청구"}),"됩니다. (샘플 종류\xb7규격\xb7브랜드 정책에 따라 상이)"]})]})]}),(0,o.jsxs)(eO,{children:[(0,o.jsx)(eR,{children:"2) 환불\xb7재발송 가능 (수령일 기준 7일 이내 접수)"}),(0,o.jsxs)(e_,{children:[(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"파손\xb7오염"}),": 배송 중 파손/오염/훼손으로 사용 불가한 경우, ",(0,o.jsx)("b",{children:"사진 증빙 제출"})," 시 샘플 및 배송비 전액 환불 또는 무료 재발송."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"오배송"}),": 주문과 다른 샘플이 도착한 경우, 확인 후"," ",(0,o.jsx)("b",{children:"올바른 샘플 무료 재발송"})," 또는 ",(0,o.jsx)("b",{children:"결제금액 전액 환불"}),"."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"공급 불가"}),": 단종\xb7재고 소진 등 판매사 사유로 발송 불가 시, ",(0,o.jsx)("b",{children:"샘플 가격 + 배송비 전액 환불"}),"."]})]})]}),(0,o.jsxs)(eO,{children:[(0,o.jsx)(eR,{children:"3) 환불 불가"}),(0,o.jsxs)(e_,{children:[(0,o.jsx)("li",{children:"고객의 단순 변심 또는 색상/질감 불만족."}),(0,o.jsx)("li",{children:"이미 사용되었거나 훼손된 샘플."}),(0,o.jsxs)("li",{children:["수령 후 ",(0,o.jsx)("b",{children:"7일 경과"}),"한 경우."]}),(0,o.jsx)("li",{children:"배송 완료 후 임의 반품/반송."}),(0,o.jsxs)("li",{children:["동일 사용자의 ",(0,o.jsx)("strong",{children:"반복적 무상\xb7저가 샘플 악용"})," 사례."]})]})]}),(0,o.jsxs)(eO,{children:[(0,o.jsx)(eR,{children:"4) 환불 절차"}),(0,o.jsxs)(e_,{children:[(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"접수"}),": 고객센터 또는 1:1 문의로 접수."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"제출"}),": 주문번호 및 ",(0,o.jsx)("b",{children:"증빙 자료(사진 등)"})," ","제출."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"검수/승인"}),": 승인 시 ",(0,o.jsx)("b",{children:"영업일 3~5일 내"})," 환불 또는 재발송 처리."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"결제수단별 처리"}),":",(0,o.jsx)("br",{}),"- 카드\xb7간편결제: 카드사 ",(0,o.jsx)("b",{children:"승인 취소"}),(0,o.jsx)("br",{}),"- 계좌이체(가상계좌 포함): 등록 계좌로 ",(0,o.jsx)("b",{children:"입금"})]})]})]}),(0,o.jsxs)(eO,{children:[(0,o.jsx)(eR,{children:"5) 유의사항"}),(0,o.jsxs)(e_,{children:[(0,o.jsxs)("li",{children:["샘플은 ",(0,o.jsx)("strong",{children:"자재 확인용"}),"으로 제공되며, 실제 시공 제품과 ",(0,o.jsx)("b",{children:"미세한 색상\xb7패턴 차이"}),"가 있을 수 있습니다. 이는 환불 사유에 해당하지 않습니다."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"회원 등급"}),"은 ",(0,o.jsx)("b",{children:"주문 시점"})," 기준으로 적용됩니다."]}),(0,o.jsxs)("li",{children:["반복적 환불 요청 또는 ",(0,o.jsx)("strong",{children:"부정 이용"})," 시 향후 서비스 이용이 제한될 수 있습니다."]})]}),(0,o.jsx)(eq,{children:"전자상거래법 제17조 및 시행령 제21조 준수"})]})]})]})}let eT=d.ZP.div.withConfig({componentId:"sc-d162fb5b-0"})(["margin-top:12px;html.su-plugin &{font-size:12px;margin-top:4px;}html.su-plugin & *{font-size:12px;line-height:1.45;}"]),eD=d.ZP.button.withConfig({componentId:"sc-d162fb5b-1"})(["width:100%;display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border:1px solid #e5e7eb;border-radius:10px;background:#ffffff;font-weight:700;font-size:14px;cursor:pointer;.chev{font-size:12px;color:#6b7280;}html.su-plugin &{padding:6px 10px;}"]),eW=d.ZP.section.withConfig({componentId:"sc-d162fb5b-2"})(["margin-top:10px;display:grid;gap:10px;"]),eO=d.ZP.article.withConfig({componentId:"sc-d162fb5b-3"})(["border:1px solid #e9ecef;border-radius:10px;padding:14px;background:#fafafb;"]),eR=d.ZP.h3.withConfig({componentId:"sc-d162fb5b-4"})(["font-size:16px;font-weight:700;margin:0 0 10px 0;"]),e_=d.ZP.ul.withConfig({componentId:"sc-d162fb5b-5"})(["margin:0;padding-left:18px;display:grid;gap:6px;li{line-height:1.45;word-break:keep-all;}strong{font-weight:700;}em{font-style:normal;text-decoration:underline;}b{font-weight:700;}"]),eq=d.ZP.p.withConfig({componentId:"sc-d162fb5b-6"})(["margin:10px 0 0 0;font-size:12px;color:#6b7280;"]);var eV=n(13786);let eK=Number(n(40257).env.NEXT_PUBLIC_SAMPLE_SHIPPING_FEE)||6500,e$=()=>/Android|iPhone|iPad|iPod/i.test(navigator.userAgent);var eQ=e=>{var t,n;let{formValues:i,formErrors:d,handleInputChange:l,onBack:p,isChecked:h,onToggleChecked:x,onSubmit:u,loading:m,onComplete:g}=e,[b,j]=(0,s.FV)(c.Z),y=(0,s.Zl)(a.Z),C=(0,$.useQueryClient)(),[P,I]=(0,r.useState)(!1);(0,r.useEffect)(()=>{I(!!window.sketchup||document.documentElement.classList.contains("su-plugin"))},[]);let{data:Z}=eB(!0),[z,W]=(0,r.useState)(!1),{mutate:O}=(0,q.Z)({onSuccess:()=>j([]),onError:()=>j([])}),R=(e,t)=>{window.dispatchEvent(new CustomEvent("toast",{detail:{type:e,msg:t}}))},_=()=>{j(e=>e.map(e=>({...e,completed:"sample"})))},V=()=>{C.removeQueries({queryKey:["sample-quote"],exact:!1})},K=e=>{var t,n,i,o,r;return null!==(r=null!==(o=null!==(i=null==e?void 0:e.storeId)&&void 0!==i?i:null==e?void 0:null===(t=e.product)||void 0===t?void 0:t.storeId)&&void 0!==o?o:null==e?void 0:null===(n=e.Product)||void 0===n?void 0:n.storeId)&&void 0!==r?r:null},U=e=>{var t,n,i,o,r;return null!==(r=null!==(o=null!==(i=null==e?void 0:e.name)&&void 0!==i?i:null==e?void 0:null===(t=e.product)||void 0===t?void 0:t.name)&&void 0!==o?o:null==e?void 0:null===(n=e.Product)||void 0===n?void 0:n.name)&&void 0!==r?r:"이름 없음"},X=e=>{var t,n,i,o,r,d,s,a;return null!==(a=null!==(s=null!==(d=null!==(r=null==e?void 0:e.category)&&void 0!==r?r:null==e?void 0:null===(t=e.product)||void 0===t?void 0:t.category)&&void 0!==d?d:null==e?void 0:null===(n=e.Product)||void 0===n?void 0:n.subCategory)&&void 0!==s?s:null==e?void 0:null===(o=e.Product)||void 0===o?void 0:null===(i=o.Category)||void 0===i?void 0:i.name)&&void 0!==a?a:"카테고리 없음"},H=e=>{var t,n,i,o,r,d;return null!==(d=null!==(r=null!==(o=null!==(i=null==e?void 0:e.img)&&void 0!==i?i:null==e?void 0:e.image)&&void 0!==o?o:null==e?void 0:null===(t=e.product)||void 0===t?void 0:t.image)&&void 0!==r?r:null==e?void 0:null===(n=e.Product)||void 0===n?void 0:n.image)&&void 0!==d?d:""},J=b.length>0&&!!Z&&"number"==typeof(null===(t=Z.summary)||void 0===t?void 0:t.total),Y=Number(null!==(n=null==Z?void 0:Z.unitPrice)&&void 0!==n?n:100),G="number"==typeof(null==Z?void 0:Z.perStoreShippingFee)?Number(Z.perStoreShippingFee):eK,ee=J&&Z?Z.productsByStore&&Z.productsByStore.length>0?Z.productsByStore.map(e=>({storeId:e.storeId,storeName:e.storeName||"판매사 #".concat(e.storeId),total:e.total,products:e.products.map(e=>({id:e.productId,name:e.name,category:[e.category,e.subCategory].filter(Boolean).join(" / "),image:e.image||""}))})):[{storeId:-1,storeName:"샘플\xb7스펙북",total:Z.summary.total,products:b.map(e=>{var t;return{id:null!==(t=e.id)&&void 0!==t?t:e.productId,name:U(e),category:[X(e)].filter(Boolean).join(""),image:H(e)}})}]:[],et=b.length;ee.length||Array.from(new Set(b.map(e=>K(e)).filter(e=>"number"==typeof e))).length;let en=e=>!e||0===e.trim().length,ei=(i.phone||"").replace(/\D/g,""),eo=/^(01[016789]\d{7,8}|0\d{8,9}|\d{10,11})$/.test(ei),er=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(et<1)return e&&alert("샘플\xb7스펙북에 샘플이 없습니다."),!1;let t=[];return(en(i.project)&&t.push("현장명(프로젝트)"),en(i.companyName)&&t.push("회사명/학교명"),en(i.recipient)&&t.push("받으시는 분"),en(i.phone)&&t.push("연락처(휴대폰)"),en(i.address)&&t.push("배송지 주소"),t.length>0)?(e&&R("error","필수 항목 미입력: ".concat(t.join(", "))),!1):eo?!!h||(e&&alert("제품별 파트너사 정보 제공 동의가 필요합니다."),!1):(e&&R("error","연락처 형식을 확인해 주세요."),!1)},ed=!m&&h&&b.length>0&&!en(i.project)&&!en(i.companyName)&&!en(i.recipient)&&!en(i.phone)&&!en(i.address)&&eo,es=()=>{try{(0,eV.sendGTMEvent)({id:"sample-end",event:"sample-end",value:"sample-end",gtm:{elementId:"sample-end"}})}catch(e){}};(0,r.useEffect)(()=>{let e=new URL(window.location.href);"sample-end"===e.searchParams.get("gtmEvent")&&(es(),e.searchParams.delete("gtmEvent"),window.history.replaceState(null,"","".concat(e.pathname).concat(e.search).concat(e.hash)))},[]);let ea=async()=>{try{if(!er(!0))return;let e=await Promise.resolve(u());if(!1===e)return;let{data:t}=await Q.et.post("/toss/orders/prepare",{type:"SAMPLE",itemCount:b.length,project:i.project,companyName:i.companyName,recipient:i.recipient,phone:i.phone,address:i.address,detailAddress:i.detailAddress}),n=null==t?void 0:t.orderId,o=Number(null==t?void 0:t.amount),r=!!(null==t?void 0:t.freeSample);if(!n||!Number.isFinite(o)){console.error("prepare failed",t),alert((null==t?void 0:t.message)||"주문 생성 실패");return}if(r){es(),_(),V(),null==g||g();return}let d=await (0,eL.nx)((0,eL.Mr)()),s={method:"CARD",amount:{value:Math.trunc(o),currency:"KRW"},orderId:n,orderName:"샘플 ".concat(b.length,"개 (").concat(Y.toLocaleString(),"원/개 + 택배비 ").concat(eK.toLocaleString(),"원/판매사)"),card:{flowMode:"DEFAULT"}};if(y(!1),e$()){let e=new URL("https://macodi.co.kr/checkout/success"),t=new URL(window.location.href);t.searchParams.set("paid","1"),e.searchParams.set("redirect","".concat(t.pathname).concat(t.search).concat(t.hash)),e.searchParams.set("gtmEvent","sample-end"),d.requestPayment({...s,successUrl:e.toString(),failUrl:"https://macodi.co.kr/checkout/fail"});return}let a=await d.requestPayment(s),l=await Q.et.post("/toss/payments/confirm",{paymentKey:a.paymentKey,orderId:a.orderId,amount:Math.trunc(o)});l.status>=200&&l.status<300?(es(),_(),V(),null==g||g()):R("error","결제 승인 실패")}catch(t){var e;console.error(t),R("error",null!==(e=null==t?void 0:t.message)&&void 0!==e?e:"결제 처리 중 문제가 발생했습니다.")}};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eU,{}),(0,o.jsxs)(eX,{children:[(0,o.jsx)(eH,{onClick:()=>{V(),p()},children:"← 이전 화면"}),(0,o.jsxs)(eJ,{children:[J&&(0,o.jsxs)(eY,{children:[(0,o.jsx)(eG,{role:"list","aria-label":"판매사별 샘플 목록",children:ee.map(e=>{let t=e.products.length;return(0,o.jsxs)(e0,{role:"listitem",children:[(0,o.jsxs)(e1,{children:[(0,o.jsx)(e2,{children:e.storeName}),(0,o.jsx)(e6,{children:(0,o.jsxs)(e4,{children:[e.total.toLocaleString(),"원"]})})]}),(0,o.jsxs)(e8,{"aria-label":"가격 구성",children:["샘플 ",t,"개 \xd7 ",Y.toLocaleString(),"원 + 택배비 ",G.toLocaleString(),"원"]}),(0,o.jsxs)(e5,{children:[0===e.products.length&&(0,o.jsx)(tn,{children:"이 판매사에 담긴 상품이 없습니다."}),e.products.map(t=>(0,o.jsxs)(e3,{children:[(0,o.jsx)(e7,{src:t.image||"/images/placeholder.png",alt:t.name,loading:"lazy"}),(0,o.jsxs)(e9,{children:[(0,o.jsx)(te,{title:t.name,children:t.name}),(0,o.jsx)(tt,{children:t.category})]})]},"".concat(e.storeId,"-").concat(t.id)))]}),(0,o.jsx)(ti,{})]},e.storeId)})}),(0,o.jsxs)(to,{children:[(0,o.jsxs)("span",{children:["총 결제 예정 ",(0,o.jsx)("strong",{children:"(택배비 포함)"})]}),(0,o.jsxs)("b",{children:[Z.summary.total.toLocaleString(),"원"]})]})]}),(0,o.jsxs)(ts,{"aria-label":"배송지 입력",children:[(0,o.jsxs)(k,{style:{marginTop:J?12:0},children:[(0,o.jsx)(S,{children:"배송지 입력"}),(0,o.jsx)(E,{children:"* 필수 입력"})]}),(0,o.jsx)(N,{}),(0,o.jsxs)(tr,{children:[(0,o.jsxs)(F,{children:[(0,o.jsx)(eE,{placeholder:"현장명(프로젝트)*",name:"project",value:i.project,onChange:l,hasError:!!d.project}),d.project&&(0,o.jsx)(A,{children:d.project})]}),(0,o.jsxs)(F,{children:[(0,o.jsx)(eE,{placeholder:"받으시는 분*",name:"recipient",value:i.recipient,onChange:l,hasError:!!d.recipient}),d.recipient&&(0,o.jsx)(A,{children:d.recipient})]})]}),(0,o.jsxs)(tr,{children:[(0,o.jsxs)(F,{children:[(0,o.jsx)(eE,{placeholder:"회사명/학교명*",name:"companyName",value:i.companyName,onChange:l,hasError:!!d.companyName}),d.companyName&&(0,o.jsx)(A,{children:d.companyName})]}),(0,o.jsxs)(F,{children:[(0,o.jsx)(eE,{placeholder:"연락처(휴대폰)*",name:"phone",value:i.phone,onChange:l,hasError:!!d.phone}),d.phone&&(0,o.jsx)(A,{children:d.phone})]})]}),(0,o.jsxs)(F,{children:[(0,o.jsxs)(L,{children:[(0,o.jsx)(eE,{placeholder:"배송지 주소*",name:"address",value:i.address,readOnly:!0,hasError:!!d.address}),(0,o.jsx)(w.Z,{content:"주소찾기",width:P?70:140,mWidth:100,height:P?24:32,onClick:()=>W(!0),mContentVisible:"flex"})]}),d.address&&(0,o.jsx)(A,{children:d.address})]}),(0,o.jsxs)(F,{children:[(0,o.jsx)(eE,{placeholder:"상세주소",name:"detailAddress",value:i.detailAddress,onChange:l,hasError:!!d.detailAddress}),d.detailAddress&&(0,o.jsx)(A,{children:d.detailAddress})]})]})]}),(0,o.jsxs)(td,{children:[(0,o.jsxs)(B,{onClick:x,children:[(0,o.jsx)(M,{src:h?eF.Z:eN,alt:"동의 체크",width:24,height:24}),(0,o.jsx)(T,{children:"제품별 파트너사에게 사용자의 정보를 공유하는 것에 동의합니다."})]}),d.consent&&(0,o.jsx)(A,{children:d.consent}),(0,o.jsx)(D,{children:(0,o.jsx)(w.Z,{content:"샘플신청",width:180,onClick:ea,disabled:!ed,mContentVisible:"flex",mWidth:150})})]}),(0,o.jsx)(eM,{})]}),z&&"undefined"!=typeof document&&(0,f.createPortal)((0,o.jsx)(ta,{children:(0,o.jsx)(v.Z,{onClose:()=>W(!1),onComplete:e=>{l({target:{name:"address",value:e.address}}),W(!1)}})}),document.getElementById("modal-root")||document.body)]})};let eU=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-0"})(["position:fixed;inset:0;background:rgba(0,0,0,0.3);z-index:1000;"]),eX=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-1"})(["position:fixed;top:0;left:0;width:100%;height:100%;background:#fff;z-index:1001;overflow-y:auto;padding:24px;html.su-plugin &{padding:12px;overflow:hidden;display:flex;flex-direction:column;}"]),eH=d.ZP.button.withConfig({componentId:"sc-64d1d8b6-2"})(["position:absolute;top:16px;left:16px;background:none;border:none;font-size:16px;cursor:pointer;html.su-plugin &{font-size:14px !important;top:12px;left:12px;}"]),eJ=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-3"})(["padding-top:20px;display:grid;gap:12px;html.su-plugin &{padding-top:18px;gap:3px;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}"]),eY=d.ZP.section.withConfig({componentId:"sc-64d1d8b6-4"})(["border:1px solid #e5e5e5;border-radius:10px;margin-top:8px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,0.02),0 10px 15px -10px rgba(0,0,0,0.05);html.su-plugin &{flex:1 1 0;min-height:0;margin-top:4px;display:flex;flex-direction:column;}"]),eG=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-5"})(["max-height:clamp(240px,48vh,560px);overflow-y:auto;padding:8px 12px 0 12px;html.su-plugin &{max-height:none;flex:1 1 auto;min-height:0;padding:4px 8px 0 8px;}scrollbar-width:thin;&::-webkit-scrollbar{width:8px;}&::-webkit-scrollbar-thumb{border-radius:4px;background:#d1d5db;}"]),e0=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-6"})(["padding:8px 0 12px 0;"]),e1=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-7"})(["display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:6px;"]),e2=d.ZP.h3.withConfig({componentId:"sc-64d1d8b6-8"})(["margin:0;font-size:15px;font-weight:700;color:#111827;"]),e6=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-9"})(["display:flex;align-items:center;gap:8px;"]),e4=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-10"})(["font-size:14px;font-weight:700;color:#fb5937;"]),e8=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-11"})(["font-size:12px;color:#6b7280;margin:2px 0 8px 0;"]),e5=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-12"})(["display:grid;gap:8px;"]),e3=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-13"})(["display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:center;"]),e7=d.ZP.img.withConfig({componentId:"sc-64d1d8b6-14"})(["width:44px;height:44px;object-fit:cover;border-radius:8px;background:#f3f4f6;border:1px solid #e5e7eb;"]),e9=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-15"})(["display:grid;gap:2px;min-width:0;"]),te=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-16"})(["font-size:14px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]),tt=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-17"})(["font-size:12px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]),tn=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-18"})(["font-size:12px;color:#6b7280;padding:6px 0 2px 0;"]),ti=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-19"})(["height:1px;background:#f1f5f9;margin-top:10px;"]),to=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-20"})(["border-top:1px solid #f1f5f9;padding:10px 12px;display:flex;justify-content:space-between;font-size:14px;b{font-weight:800;}position:sticky;bottom:0;background:#fff;html.su-plugin &{font-size:12px;white-space:nowrap;padding:8px 10px;}html.su-plugin & *{font-size:12px;white-space:nowrap;}"]),tr=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-21"})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;@media (max-width:768px){grid-template-columns:1fr;gap:0;}html.su-plugin &{grid-template-columns:1fr 1fr;gap:4px;}"]),td=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-22"})(["display:contents;html.su-plugin &{display:flex;align-items:center;gap:6px;margin-top:4px;}html.su-plugin & > ","{flex:1 1 auto;min-width:0;margin:0;}html.su-plugin & > ","{flex:0 0 auto;}html.su-plugin & > "," > div{width:70px !important;min-width:70px !important;}"],B,D,D),ts=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-23"})(["max-height:none;overflow:visible;padding-right:0;html.su-plugin &{flex:0 0 auto;}","{margin-bottom:6px;}"," ","{font-size:16px;line-height:1.25;}"," ","{font-size:11px;line-height:1.2;}","{margin-bottom:8px;}input{height:30px;font-size:14px;line-height:1.3;padding:6px 4px;box-sizing:border-box;}input::placeholder{font-size:12px;}","{font-size:11px;margin-top:4px;}"," button{height:34px;min-height:34px;font-size:13px;padding:0 10px;}html.su-plugin & ","{margin-bottom:2px;}html.su-plugin & ","{margin-bottom:2px;}html.su-plugin & input{height:22px;padding:2px 4px;line-height:1.1;}html.su-plugin & "," > div{height:22px;min-height:22px;font-size:10px;padding:0 4px;}html.su-plugin & "," > div *{font-size:10px;white-space:nowrap;}"],k,k,S,k,E,F,A,L,F,k,L,L);d.ZP.div.withConfig({componentId:"sc-64d1d8b6-24"})(["margin:8px 12px 12px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa;padding:10px;display:grid;gap:6px;"]),d.ZP.div.withConfig({componentId:"sc-64d1d8b6-25"})(["display:flex;align-items:center;justify-content:space-between;font-size:13px;&.total{font-weight:800;font-size:14px;}"]),d.ZP.div.withConfig({componentId:"sc-64d1d8b6-26"})(["height:1px;background:#eef2f7;margin:2px 0;"]),d.ZP.p.withConfig({componentId:"sc-64d1d8b6-27"})(["margin:2px 0 0 0;font-size:11px;color:#6b7280;"]);let ta=d.ZP.div.withConfig({componentId:"sc-64d1d8b6-28"})(["position:fixed;inset:0;z-index:2147483647;"]);function tl(e){var t;let{open:n,onClose:i,onFreeAffiliate:d,onBuySample:s}=e,[a,l]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{l(!0)},[]),!n||!a||"undefined"==typeof document)return null;let p=null!==(t=document.getElementById("modal-root"))&&void 0!==t?t:document.body;return(0,f.createPortal)((0,o.jsx)(tp,{onClick:i,children:(0,o.jsxs)(tc,{onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)(th,{children:[(0,o.jsx)("span",{"aria-hidden":!0,children:"\uD83C\uDF81"})," 샘플, 무료 제휴로 받아보세요"]}),(0,o.jsxs)(tx,{children:["실물 샘플은 별도 구매를 통해 받아 보실 수 있으며",(0,o.jsx)("br",{}),(0,o.jsx)(tu,{children:"무료 제휴 파트너사"}),"에게는 모든 샘플이 무료로 제공됩니다."]}),(0,o.jsxs)(tm,{children:[(0,o.jsx)(tf,{type:"button",onClick:d,children:"무료 제휴 신청"}),(0,o.jsx)(tg,{type:"button",onClick:s,children:"샘플 구매하기"})]})]})}),p)}let tp=d.ZP.div.withConfig({componentId:"sc-d6d9ce06-0"})(["position:fixed;inset:0;z-index:2147483647;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center;padding:16px;"]),tc=d.ZP.div.withConfig({componentId:"sc-d6d9ce06-1"})(["width:100%;max-width:440px;background:#fff;border-radius:16px;padding:26px 22px 24px;box-shadow:0 10px 32px rgba(0,0,0,0.2);text-align:center;"]),th=d.ZP.div.withConfig({componentId:"sc-d6d9ce06-2"})(["font-size:18px;font-weight:700;color:#1a1a1a;margin-bottom:8px;"]),tx=d.ZP.p.withConfig({componentId:"sc-d6d9ce06-3"})(["font-size:14px;line-height:1.55;color:#555;margin:0 0 18px;"]),tu=d.ZP.b.withConfig({componentId:"sc-d6d9ce06-4"})(["font-weight:700;color:#1a1a1a;"]),tm=d.ZP.div.withConfig({componentId:"sc-d6d9ce06-5"})(["display:flex;gap:10px;"]),tg=d.ZP.button.withConfig({componentId:"sc-d6d9ce06-6"})(["flex:1;height:48px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;color:#666;font-size:15px;cursor:pointer;"]),tf=d.ZP.button.withConfig({componentId:"sc-d6d9ce06-7"})(["flex:1;height:48px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:15px;font-weight:700;cursor:pointer;"]);var tb=e=>{let{onClose:t}=e,[n,i]=(0,s.FV)(c.Z),d=(0,s.sJ)(O.Z),l=(0,s.sJ)(R.Z),p=(0,eI.Z)(),h=(0,V.useRouter)(),x=(0,$.useQueryClient)(),u=(0,V.useSearchParams)(),[m,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if((null==u?void 0:u.get("openCart"))==="1"){g(!0);let e=setTimeout(()=>g(!1),6e3);return()=>clearTimeout(e)}},[u]);let[C,k]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=()=>{let e=!!window.sketchup||document.documentElement.classList.contains("su-plugin"),t=window.innerWidth;k(e||t>=769&&t<=1440)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let{data:S,refetch:E}=eB(!!p&&n.length>0);(0,r.useEffect)(()=>{p&&n.length>0&&E()},[null==p?void 0:p.id,n.length]),(0,r.useEffect)(()=>{0===n.length&&(x.removeQueries(["sample/quote"],{exact:!1}),x.setQueryData(["sample/quote"],void 0))},[n.length,x]);let{mutate:A}=(0,q.Z)({onSuccess:e=>{i(e.map(e=>({...e,isNew:!1}))),Q([]),E()},onError:()=>b.Am.error("삭제에 실패했습니다",{position:"bottom-center",autoClose:2e3})}),[N,L]=(0,r.useState)(!1),{mutate:B,isLoading:M}=ek({onSuccess:()=>{L(!0),setTimeout(()=>L(!1),2500),b.Am.success((0,o.jsxs)("div",{style:{lineHeight:1.45,whiteSpace:"nowrap"},children:[(0,o.jsx)("div",{style:{fontWeight:700,marginBottom:2},children:"프로젝트 스펙인이 적용 완료"}),(0,o.jsxs)("div",{style:{fontSize:13,color:"#444"},children:["발주 확정 시 자재금액의"," ",(0,o.jsx)("b",{style:{color:"#413d7d"},children:"3~6% 설계 지원금"})," 정산"]})]}),{position:"bottom-center",autoClose:3500,icon:()=>(0,o.jsx)("span",{style:{fontSize:20},children:"✅"}),style:{width:"auto",minWidth:460,maxWidth:"none"}}),i(e=>e.map(e=>({...e,completed:"spec"})))},onError:()=>{b.Am.error("다운로드 오류",{position:"bottom-center",autoClose:2e3})}}),T=async()=>{B(n.map(e=>{var t,n;return{id:e.productId,projectName:U.project,areaM2:null!==(n=null!==(t=e.areaM2)&&void 0!==t?t:d[e.productId])&&void 0!==n?n:null}}))},[K,Q]=(0,r.useState)([]),[U,X]=(0,r.useState)({project:"",companyName:"",recipient:"",phone:"",address:"",detailAddress:""}),[H,J]=(0,r.useState)(""),[Y,G]=(0,r.useState)(!1),{formErrors:ee,validateForm:et}=eP(n,Y,U,X),[en,ei]=(0,s.FV)(_.Z);(0,r.useEffect)(()=>{let e=(en||"").trim();X(t=>t.project===e?t:{...t,project:e})},[en]),(0,r.useEffect)(()=>{p&&X(e=>({...e,companyName:p.companyName||"",recipient:p.name||"",phone:p.phoneNumber||"",address:p.baseAddress||"",detailAddress:p.detailAddress||""}))},[p]);let{submitInquiry:eo,loading:er}=ez({onSuccess:()=>{b.Am.success("샘플 신청이 완료되었습니다.",{position:"bottom-center",autoClose:2e3}),i(e=>e.map(e=>({...e,completed:"sample"}))),t()},onError:()=>{b.Am.error("샘플 신청 중 오류가 발생했습니다.",{position:"bottom-center",autoClose:2e3})}}),[ed,es]=(0,r.useState)(!1),[ea,el]=(0,r.useState)(!1),[ep,ec]=(0,r.useState)(!1),[eh,eu]=(0,r.useState)(!1),[em,eg]=(0,r.useState)(!1),ef=(0,s.sJ)(a.Z);(0,r.useEffect)(()=>{ef||(el(!1),es(!1),eg(!1))},[ef]);let eb=e=>{let{name:t,value:n}=e.target;"project"===t&&J(""),X(e=>({...e,[t]:n}))},ew=()=>{if(0===n.length){b.Am.error("선택된 마감재가 없습니다.",{position:"bottom-center",autoClose:2e3});return}if(!U.project.trim()){J(ee.project||"현장명(프로젝트)을 입력해주세요"),b.Am.error("현장명(프로젝트)을 입력해주세요",{position:"bottom-center",autoClose:2e3});return}p?l.isPhoneAuth||b.Am.info("프로필 정보 입력 후 결제가 가능합니다.",{position:"bottom-center",autoClose:2e3}):b.Am.info("로그인이 필요합니다. 결제 전 단계에서 확인됩니다.",{position:"bottom-center",autoClose:2e3}),el(!0)};return(0,o.jsxs)(P,{children:[(0,o.jsx)(I,{onClick:t,children:"→"}),(0,o.jsx)(Z,{children:"샘플\xb7스펙북 담기"}),n.length>0&&(0,o.jsx)(tw,{type:"button",onClick:()=>ec(!0),children:"전체삭제"}),(0,o.jsx)(W,{children:(0,o.jsx)(ex,{selectedProducts:n,selectedIds:K,onToggle:e=>Q(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),onDelete:e=>{A([e]),Q(t=>t.filter(t=>t!==e))}})}),(0,o.jsxs)(z,{children:[(0,o.jsxs)(F,{style:{border:"1px solid #d4d4d4",borderRadius:"8px",padding:"10px",margin:"10px"},children:[(0,o.jsxs)(eA.Z,{style:{fontSize:C?13:18,fontWeight:600,color:"black",fontFamily:"'Pretendard', sans-serif",display:"flex",flexDirection:C?"column":"row",alignItems:C?"flex-start":"center",gap:C?6:8,flexWrap:"wrap",width:"100%",minWidth:0},children:[(0,o.jsx)("span",{children:"현장명 (프로젝트) *"}),(0,o.jsx)("span",{style:{display:"inline-block",padding:"3px 8px",fontSize:C?11:13,fontWeight:700,color:"#fff",background:"#413d7d",borderRadius:6,letterSpacing:"-0.01em",whiteSpace:"nowrap",maxWidth:"100%",boxShadow:"0 1px 3px rgba(65, 61, 125, 0.3)",lineHeight:1.3},children:"\uD83D\uDCA1 정확히 입력해야 지원금 매칭 가능"})]}),(0,o.jsx)(eE,{placeholder:H||ee.project||"예) 강남구 OO빌라 인테리어",name:"project",value:U.project,onChange:eb,hasError:!!(H||ee.project),fontSize:C?"12px":"14px"})]}),(0,o.jsx)(D,{children:(0,o.jsxs)("div",{style:{display:"flex",gap:10,width:"100%",padding:"0 10px"},children:[(0,o.jsx)(tP,{$pulse:m,children:(0,o.jsx)(w.Z,{content:M?(0,o.jsxs)(tv,{children:[(0,o.jsx)(ty,{}),"다운로드 중…"]}):N?(0,o.jsx)(tv,{children:"✓ 다운로드 완료"}):"스펙북 다운로드",width:"100%",height:C?32:40,backgroundColor:"#413d7d",onClick:()=>{if(!M){if(g(!1),!p){b.Am.error("로그인이 필요합니다.",{position:"bottom-center",autoClose:2e3});return}if(l.isPhoneAuth||b.Am.info("프로필 정보 입력 후 다운로드 가능합니다.",{position:"bottom-center",autoClose:2e3}),0===n.length){b.Am.error("선택된 마감재가 없습니다.",{position:"bottom-center",autoClose:2e3});return}if(!U.project.trim()){J(ee.project||"현장명(프로젝트)을 입력해주세요");return}T()}},mContentVisible:"flex",mWidth:150,contentColor:"#fff",borderColor:"#413d7d",hoverColor:"#332f63",hoverTextColor:"#fff"})}),(0,o.jsx)("div",{style:{flex:1,minWidth:0,display:"flex"},children:(0,o.jsx)(w.Z,{content:"샘플 신청",width:"100%",height:C?32:40,backgroundColor:"#4c6ef5",onClick:()=>{if(0===n.length){b.Am.error("선택된 마감재가 없습니다.",{position:"bottom-center",autoClose:2e3});return}if(!U.project.trim()){J(ee.project||"현장명(프로젝트)을 입력해주세요"),b.Am.error("현장명(프로젝트)을 입력해주세요",{position:"bottom-center",autoClose:2e3});return}if((null==p?void 0:p.premiumUnlimited)&&(null==p?void 0:p.freeSampleAllowed)){ew();return}eg(!0)},mContentVisible:"flex",mWidth:150,contentColor:"#fff",borderColor:"#4c6ef5",hoverColor:"#3b5bdb",hoverTextColor:"#fff"})})]})})]}),(0,o.jsx)(tl,{open:em,onClose:()=>eg(!1),onFreeAffiliate:()=>{eg(!1),h.push("/premium?src=sample")},onBuySample:()=>{eg(!1),ew()}}),ea&&(0,o.jsx)(eQ,{formValues:U,formErrors:ee,handleInputChange:eb,onBack:()=>{el(!1),0===n.length&&(x.removeQueries(["sample/quote"],{exact:!1}),x.setQueryData(["sample/quote"],void 0))},isChecked:Y,onToggleChecked:()=>G(e=>!e),onSubmit:()=>{let e=et();return e||b.Am.error("필수 정보를 확인해주세요.",{position:"bottom-center",autoClose:2e3}),e},loading:er,onComplete:()=>{el(!1),eu(!0)}}),eh&&"undefined"!=typeof document&&(0,f.createPortal)((0,o.jsx)(eC,{onClose:()=>{eu(!1),t()}}),document.getElementById("modal-root")||document.body),ed&&(0,o.jsx)(v.Z,{onClose:()=>es(!1),onComplete:e=>X(t=>({...t,address:e.address}))}),ep&&(0,o.jsxs)(j.Z,{onClose:()=>ec(!1),children:[(0,o.jsx)("div",{style:{display:"flex",justifyContent:"center",fontSize:18},children:"샘플\xb7스펙북을 모두 비우시겠습니까?"}),(0,o.jsxs)(y.nK,{children:[(0,o.jsx)(y.zx,{onClick:()=>{A(n.map(e=>e.id)),Q([]),ei(""),ec(!1)},children:"삭제"}),(0,o.jsx)(y.zx,{onClick:()=>ec(!1),children:"취소"})]})]})]})};let tw=d.ZP.button.withConfig({componentId:"sc-91cd1077-0"})(["position:absolute;top:14px;right:16px;background:transparent;border:1px solid #d4d4d4;border-radius:6px;padding:4px 10px;font-size:12px;color:#666;cursor:pointer;white-space:nowrap;z-index:2;&:hover{background:#f5f5f5;color:#333;}html.su-plugin &{font-size:10px;padding:3px 7px;}"]),tv=d.ZP.span.withConfig({componentId:"sc-91cd1077-1"})(["display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;color:#fff !important;& *{color:#fff !important;}"]),tj=(0,d.F4)(["to{transform:rotate(360deg);}"]),ty=d.ZP.span.withConfig({componentId:"sc-91cd1077-2"})(["width:14px;height:14px;border:2px solid rgba(255,255,255,0.35);border-top-color:#fff;border-radius:50%;display:inline-block;animation:"," 0.7s linear infinite;"],tj),tC=(0,d.F4)(["0%,100%{box-shadow:0 0 0 0 rgba(65,61,125,0.55);}50%{box-shadow:0 0 0 7px rgba(65,61,125,0);}"]),tP=d.ZP.div.withConfig({componentId:"sc-91cd1077-3"})(["flex:1;min-width:0;display:flex;border-radius:8px;transition:transform 0.15s ease;",""],e=>{let{$pulse:t}=e;return t&&(0,d.iv)(["animation:"," 1.2s ease-in-out infinite;transform:scale(1.04);"],tC)});var tI=e=>{let{onClose:t}=e;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(tb,{onClose:t})})};let tZ=async()=>{let e=localStorage.getItem("TOKEN");if(!e)throw Error("로그인이 필요합니다.");return(await Q.et.get("/cart",{headers:{Authorization:"Bearer ".concat(e)}})).data.map(e=>({id:e.id,productId:e.productId,categoryId:e.categoryId,category:e.category,subCategory:e.subCategory,img:e.img,name:e.name,state:e.state}))};var tz=e=>{let{onSuccess:t,onError:n}=e,i=(0,eZ.Z)();return{...(0,$.useMutation)(()=>tZ(),{onSuccess:t,onError:e=>{var t;n((null===(t=e.response)||void 0===t?void 0:t.data.message)||"알 수 없는 오류가 발생했습니다.")}}),isLoadingToken:i}},tk={src:"/_next/static/media/bag.e8f31db2.svg"};let tS=null!==(i=null==tk?void 0:tk.src)&&void 0!==i?i:"/images/main/button/bag.svg",tE=(0,d.ZP)(m.N).withConfig({componentId:"sc-d9494eea-0"})(["z-index:"," !important;",""],2147483644,e=>{let{$noAnim:t}=e;return t?(0,d.iv)(["&,html.su-plugin &{transition:none !important;}"]):""}),tA=d.ZP.div.withConfig({componentId:"sc-d9494eea-1"})(["position:fixed;z-index:",";pointer-events:auto;right:",";width:35px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:bold;border-top-left-radius:8px;border-bottom-left-radius:8px;transition:right 0.3s ease-in-out,background 0.15s ease;span{color:#fff;font-size:14px;white-space:nowrap;}background:",";"," @media (max-width:768px){width:28px;right:0;font-size:16px;span{font-size:12px;}","}@media (min-width:769px) and (max-width:1440px){width:28px;right:",";font-size:13px;span{font-size:11px;}","}html.su-plugin &{width:28px;right:280px;font-size:13px;will-change:transform;transition:transform 0.3s ease-in-out;span{font-size:11px;}","}"],2147483645,e=>{let{isOpen:t}=e;return t?"".concat(m.a,"px"):"0"},e=>{let{$dim:t,$paired:n,$aligned:i}=e;return t?g.BQ:n||i?g.gW:"#1b2c33"},e=>{let{$paired:t,$aligned:n}=e;return t||n?(0,d.iv)(["top:",";height:","px;transform:none;"],t?(0,g.dO)("below"):(0,g.dO)("top"),g.Me):(0,d.iv)(["top:50%;height:270px;transform:translateY(-50%);"])},e=>{let{$paired:t,$aligned:n}=e;return t||n?"":"height: 200px;"},e=>{let{isOpen:t}=e;return t?"280px":"0"},e=>{let{$paired:t,$aligned:n}=e;return t||n?"":"height: 200px;"},e=>{let{$paired:t,$aligned:n,isOpen:i}=e;return t||n?"transform: translateX(".concat(i?"0":"280px",");"):"height: 200px; transform: translateY(-50%) translateX(".concat(i?"0":"280px",");")}),tN=d.ZP.div.withConfig({componentId:"sc-d9494eea-2"})(["display:inline-flex;align-items:center;justify-content:center;writing-mode:horizontal-tb !important;text-orientation:mixed !important;transform:rotate(-90deg);transform-origin:center;"]),tF=d.ZP.div.withConfig({componentId:"sc-d9494eea-3"})(["display:flex;flex-direction:row-reverse;align-items:center;justify-content:center;gap:6px;writing-mode:horizontal-tb !important;text-orientation:mixed !important;&,& *{transform:none !important;writing-mode:horizontal-tb !important;text-orientation:mixed !important;}@media (max-width:768px){gap:4px;}"]),tL=d.ZP.span.withConfig({componentId:"sc-d9494eea-4"})(["display:inline-block;width:18px;height:18px;background:url('","') no-repeat center / contain;flex:0 0 auto;@media (max-width:768px){width:16px;height:16px;}"],tS),tB=d.ZP.div.withConfig({componentId:"sc-d9494eea-5"})(["position:fixed;right:0;bottom:30vh;height:100vh;display:flex;align-items:center;z-index:",";pointer-events:none;@media (max-width:500px){display:none;}html.su-plugin &{display:flex !important;}"],2147483645),tM=d.ZP.div.withConfig({componentId:"sc-d9494eea-6"})(["position:fixed;inset:0;z-index:",";background:transparent;cursor:default;"],2147483642);var tT=e=>{let{isPoint:t=!1,alignTop:n=!1,paired:i}=e,[d,m]=(0,s.FV)(a.Z),g=(0,s.sJ)(l.Sh),f=(0,s.sJ)(l.DX),b=null!=i?i:f,[w,v]=(0,s.FV)(l.sd),[j,y]=(0,s.FV)(c.Z),C=(0,s.Zl)(h.Z),P=(0,s.Zl)(x.Z),I=(0,s.Zl)(u.Z),Z=(0,r.useRef)(null),z=(0,r.useRef)(null),{mutate:k,isLoadingToken:S}=tz({onSuccess:e=>y(e.map(e=>({...e,isNew:!1}))),onError:()=>{}});(0,r.useEffect)(()=>{S||k()},[S,k]),(0,r.useEffect)(()=>{function e(e){var t,n;let i=e.target,o=document.getElementById("modal-root"),r=null===(t=Z.current)||void 0===t?void 0:t.contains(i),s=null===(n=z.current)||void 0===n?void 0:n.contains(i),a=o&&o.contains(i),l=i instanceof HTMLElement&&!!i.closest(".ignore-sample-close");!d||r||s||a||l||m(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[d,m]);let E=(0,r.useCallback)(()=>{d&&f||(!d&&g&&v(!0),B(!1),C("none"),P(null),I(null),m(e=>!e))},[d,g,f,v,m,C,P,I]),A=(0,r.useCallback)(()=>{m(!1)},[m]),N=j.length>99?"99+":j.length,F=(0,s.sJ)(p.Z),[L,B]=(0,r.useState)(!1);(0,r.useEffect)(()=>{F&&B(!0)},[F]);let M=(0,r.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),m(!1)},[m]);return(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsx)(tM,{onMouseDown:M,onClick:M,onTouchStart:e=>{e.stopPropagation(),m(!1)}}),(0,o.jsx)(tB,{isPoint:t,ref:Z,children:(0,o.jsxs)(tA,{className:"ignore-sample-close",isOpen:d||g,$dim:g&&!d,$paired:b,$aligned:n,onClick:E,children:[(0,o.jsx)(tN,{children:(0,o.jsxs)(tF,{children:[(0,o.jsx)("span",{children:"샘플\xb7스펙북"}),(0,o.jsx)(tL,{"aria-hidden":!0})]})}),j.length>0&&(0,o.jsx)(tW,{$pulsing:L,children:N})]})}),(0,o.jsx)(tE,{ref:z,isOpen:d,$noAnim:w||g&&!d,children:(0,o.jsx)(tI,{onClose:A})})]})};let tD=(0,d.F4)(["0%{transform:scale(1);box-shadow:0 0 0 0 rgba(251,89,55,0.5);}70%{transform:scale(1.15);box-shadow:0 0 0 6px rgba(251,89,55,0);}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(251,89,55,0);}"]),tW=d.ZP.div.withConfig({componentId:"sc-d9494eea-7"})(["position:absolute;display:flex;align-items:center;justify-content:center;background-color:#fb5937;color:#fff;font-size:15px;font-weight:bold;width:27px;height:27px;border-radius:50%;top:-10px;left:-8px;@media (max-width:768px){width:25px;height:25px;font-size:14px;top:-11px;left:-8px;}html.su-plugin &{width:24px;height:24px;font-size:13px;top:-10px;left:-6px;}@media (min-width:769px) and (max-width:1440px){width:24px;height:24px;font-size:13px;top:-9px;left:-6px;}",""],e=>{let{$pulsing:t}=e;return t&&(0,d.iv)(["animation:"," 1.6s ease-in-out infinite;"],tD)})},62758:function(e,t,n){n.d(t,{N:function(){return r},a:function(){return o}});var i=n(88862);let o=333,r=i.ZP.div.withConfig({componentId:"sc-905de93c-0"})(["position:fixed;top:0;right:0;width:","px;height:100vh;background:#fff;box-shadow:-2px 0 8px rgba(0,0,0,0.1);transform:translateX(",");transition:transform 0.3s ease-in-out;z-index:2147483646;overflow:auto;@media (max-width:500px){top:0;right:0;left:0;bottom:42px;width:100vw;height:auto;box-shadow:0 -4px 16px rgba(0,0,0,0.12);transform:translateY(",");transition:transform 0.3s cubic-bezier(0.2,0.8,0.2,1);background:#fff;pointer-events:",";visibility:",";}@media (min-width:769px) and (max-width:1440px){width:280px;}html.su-plugin &{top:0 !important;right:0 !important;left:auto !important;bottom:auto !important;width:280px !important;height:100vh !important;box-shadow:-2px 0 8px rgba(0,0,0,0.1) !important;transform:translateX(",") !important;transition:transform 0.3s ease-in-out !important;pointer-events:auto !important;visibility:visible !important;}"],o,e=>e.isOpen?"0":"100%",e=>e.isOpen?"0":"100%",e=>e.isOpen?"auto":"none",e=>e.isOpen?"visible":"hidden",e=>e.isOpen?"0":"100%")},68361:function(e,t,n){n.d(t,{Mr:function(){return r},nx:function(){return s}});let i="macodi_customer_key",o=null;function r(e){if(e)return"user_".concat(e);try{let e=localStorage.getItem(i);if(e)return e}catch(e){}let t="anon_".concat(function(){let e=globalThis,t=(null==e?void 0:e.crypto)&&"function"==typeof e.crypto.getRandomValues,n=new Uint8Array(16);if(t)e.crypto.getRandomValues(n);else for(let e=0;e<16;e++)n[e]=256*Math.random()|0;n[6]=15&n[6]|64,n[8]=63&n[8]|128;let i=Array.from(n,e=>e.toString(16).padStart(2,"0"));return i.slice(0,4).join("")+"-"+i.slice(4,6).join("")+"-"+i.slice(6,8).join("")+"-"+i.slice(8,10).join("")+"-"+i.slice(10,16).join("")}());try{localStorage.setItem(i,t)}catch(e){}return t}async function d(){return await (window.TossPayments?Promise.resolve():o||(o=new Promise((e,t)=>{let n="tosspayments-sdk-v2";if(document.getElementById(n)){e();return}let i=document.createElement("script");i.id=n,i.src="https://js.tosspayments.com/v2/standard",i.async=!0,i.onload=()=>e(),i.onerror=()=>t(Error("Failed to load TossPayments SDK")),document.head.appendChild(i)}))),window.TossPayments("live_ck_Gv6LjeKD8aa7Jje1q1EY8wYxAdXy")}async function s(e){return(await d()).payment({customerKey:null!=e?e:r()})}},68117:function(e,t,n){let i=(0,n(43618).cn)({key:"cartAreaAtom",default:{}});t.Z=i},33745:function(e,t,n){let i=(0,n(43618).cn)({key:"cartProjectNameAtom",default:""});t.Z=i},86379:function(e,t,n){let i=(0,n(43618).cn)({key:"cartPulseAtom",default:0});t.Z=i},92004:function(e,t){t.Z={src:"/_next/static/media/checkbox-green.d27f0a32.svg",height:20,width:20,blurWidth:0,blurHeight:0}}}]);