const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CeqtG6b7.js","assets/react-WWJ_A68P.js","assets/call-bind-oCmkau44.js","assets/get-intrinsic-BKEvijrG.js","assets/es-errors-DzOT6E3C.js","assets/has-symbols-eVqrYdw7.js","assets/has-proto-JnoBQRdH.js","assets/function-bind-BbkWVFrm.js","assets/hasown-DYqjtFKE.js","assets/set-function-length-B5OANX0j.js","assets/define-data-property-DO9o5wXF.js","assets/es-define-property-tzmkNPou.js","assets/gopd-CEkvUycD.js","assets/has-property-descriptors-DphFXkuo.js","assets/react-device-detect-BAEcyX2V.js","assets/ua-parser-js-BBZA8f28.js","assets/react-router-dom-B4YB8MrN.js","assets/react-dom-CvjNlBjt.js","assets/scheduler-CzFDRTuY.js","assets/react-router-BOGNRwMt.js","assets/@remix-run-DhIrJP8L.js","assets/styled-components-BHeWolSk.js","assets/@emotion-DwO3GsBP.js","assets/hoist-non-react-statics-Buxaj0Kl.js","assets/react-is-8JwjhRSi.js","assets/stylis-YPZU7XtI.js","assets/framer-motion-DbOul5S8.js","assets/@tanstack-BR86rpua.js","assets/dayjs-CZ9ViMNG.js","assets/usehooks-ts-CCkIaz9n.js","assets/lodash.debounce-CDHjgjOA.js","assets/react-helmet-async-jeYtsOp6.js","assets/react-fast-compare-Dxyd5FYM.js","assets/invariant-Bm-uj-iG.js","assets/shallowequal-F1vAqOm6.js","assets/react-redux-DlpFpBQ0.js","assets/use-sync-external-store-KK8Bpy9o.js","assets/redux-persist-Cbb21slr.js","assets/redux-DITMfSWq.js","assets/@fxts-cXD7MMns.js","assets/axios-Da_2YOEl.js","assets/crypto-js-C0tVhymU.js","assets/universal-cookie-Cmu-M0pA.js","assets/react-error-boundary-DEyRbsfJ.js","assets/dompurify-CqxHTgmJ.js","assets/qs-LNWgR29u.js","assets/side-channel-CpYS7sho.js","assets/object-inspect-CL2AiSqO.js","assets/@reduxjs-DYPsSoVN.js","assets/immer-DqxjFn0G.js","assets/redux-thunk-ClJT1hhx.js","assets/redux-logger-B8JP_rc7.js","assets/qrcode.react-CJWQPexu.js","assets/swiper-DLv7ejQn.js","assets/swiper-Be9b3THL.css","assets/@hookform-Dc6jS12O.js","assets/react-hook-form-BJXGuiwr.js","assets/@marsidev-F19kFZ1X.js","assets/currency.js-9OAR_aOO.js","assets/react-select-CI241hL_.js","assets/@babel-CabbEptY.js","assets/@floating-ui-NvD4EidW.js","assets/use-isomorphic-layout-effect-MPmsYcaj.js","assets/memoize-one-BdPwpGay.js","assets/styled-reset-B7ZXsPC1.js","assets/pretendard-D6ja04b6.css","assets/index-Cw9g8NQu.js","assets/plus-black-DWz4trt7.js","assets/index-BImpVMX0.js","assets/useCouponMutation-D3YiMlPc.js","assets/download-completed-uzvw385i.js","assets/index-ChELz-bD.js","assets/WithAuth-Iv1zVUxp.js","assets/useMyOrderList-DORfUeFl.js","assets/ordersKeys-CP-2BXmv.js","assets/index-3Mp7MxV1.js","assets/react-hot-toast-SJywmiH6.js","assets/goober-vt3s6TGe.js","assets/index-C35ei4hp.js","assets/useInput-DBpVLyZx.js","assets/index-sy0ovtUk.js","assets/index-3cBPcmMA.js","assets/index-dD61-Ci-.js","assets/useProductListByProductNos-DPsS3tCs.js","assets/line-style-dot-gray-BRuOHXOD.js","assets/warning-round-small-gray-DostLkGx.js","assets/useDeactivateCheck-DSrGULYL.js","assets/index-zthRzg20.js","assets/index-D_PcjoYQ.js","assets/index-B3zLnaNv.js","assets/index-Xowq80Hz.js","assets/index.styled-IsXYVBNB.js","assets/guest-CUGXtIGC.js","assets/member-jerE5a6L.js","assets/claimsKeys-DH8ECKCQ.js","assets/index-CAqiKbio.js","assets/index-ynF7fgil.js","assets/useOrderDetail-MYWWbpM7.js","assets/index.styled-BbS5v2yn.js","assets/index-DJSPnbGe.js","assets/regex-DiqzAF1R.js","assets/index-B4yHXWWI.js","assets/index-CS0fGNGK.js","assets/useBannerList-gm8b1ww8.js","assets/useShippingAddressList-D_zQVSbV.js","assets/shippingAddress-CZOFiPhX.js","assets/addressKeys-HcUS3wht.js","assets/index-Ci3f8NGl.js","assets/index-CNIyHpvy.js","assets/upload-image-CTRPBrLM.js","assets/index-C-PBqvh1.js","assets/index-Ceem7Kx7.js","assets/useClaimDetail-CVSWf9zX.js","assets/index-DzjXPzri.js","assets/index-CMnNQOwR.js","assets/claim-Bm7PHfCw.js","assets/index-BBda-CXF.js","assets/index-CMK4F61w.js","assets/index-B_yvm1rI.js","assets/index-DwqpbtHC.js","assets/index-B8vupPVN.js","assets/index-Dg4w46_I.js","assets/index-DXyIS5YC.js","assets/useShippingAddressMutation-BuaBPtCQ.js","assets/index-BYSs-brk.js","assets/index-C0uyq3AU.js","assets/index-Db2udMaS.js","assets/index-CNhqpshN.js","assets/index-CbjDq0if.js","assets/index-BZzfdXfb.js","assets/index-Ccw_8hTk.js","assets/index-CkK47dnX.js","assets/index-Cf3UiNBX.js","assets/index-B9Xd7xqa.js","assets/index-cic-jDFA.js","assets/useInfiniteBoardArticleList-CMBoDNKs.js","assets/index-EJTNafFs.js","assets/index-BRGw4mpU.js","assets/index-CEDmpLP5.js","assets/index-i9raWCVA.js","assets/index-B6-Eamlh.js"])))=>i.map(i=>d[i]); var os=Object.defineProperty;var rs=(e,n,o)=>n in e?os(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Fn=(e,n,o)=>rs(e,typeof n!="symbol"?n+"":n,o);import{j as t,r as s,a as is}from"./react-WWJ_A68P.js";import{a as wr,c as ss}from"./react-dom-CvjNlBjt.js";import{u as ie,a as Ht,b as fo,k as Oe,c as Ut,_ as D,d as Ae,e as as,Q as cs,f as ls,g as ds}from"./@tanstack-BR86rpua.js";import{H as us,a as ps}from"./react-helmet-async-jeYtsOp6.js";import{u as ms,a as hs,s as xs,P as gs}from"./react-redux-DlpFpBQ0.js";import{L as W,u as vt,S as fs,c as ys,R as Cs}from"./react-router-dom-B4YB8MrN.js";import{p as ws,d as Es,a as bs,P as Ss}from"./redux-persist-Cbb21slr.js";import{l as re,d as r,m as Tt,f as vs,o as Ts}from"./styled-components-BHeWolSk.js";import{u as yo,a as Er,b as As,c as Ps,d as js,e as Is,f as Qo,g as Ls,h as Ns}from"./usehooks-ts-CCkIaz9n.js";import{i as X,p as U,t as ae,a as cn,b as Ke,c as ln,f as so,k as ks,d as Rs,e as Qe,m as Xe,s as Pn,g as rt,h as $s,j as un,l as Os,n as br,o as ao,q as Zo,r as _s,u as zn,v as Ms,w as Bs,x as Ds,y as Hs,z as xn,A as Us,B as Gs,C as Fs,D as zs}from"./@fxts-cXD7MMns.js";import{m as Je,A as Co}from"./framer-motion-DbOul5S8.js";import{a as st,i as Ue,A as Gt}from"./axios-Da_2YOEl.js";import{d as Y}from"./dayjs-CZ9ViMNG.js";import{c as Ie}from"./crypto-js-C0tVhymU.js";import{C as et}from"./universal-cookie-Cmu-M0pA.js";import{a as we,u as Fe,h as Vs,i as Ft,j as Ys}from"./react-router-BOGNRwMt.js";import{E as Sr}from"./react-error-boundary-DEyRbsfJ.js";import{p as qs}from"./dompurify-CqxHTgmJ.js";import{d as Ws,i as vr,a as Ks}from"./react-device-detect-BAEcyX2V.js";import{f as se}from"./@remix-run-DhIrJP8L.js";import{q as Ge}from"./qs-LNWgR29u.js";import{c as Tr,a as Qs}from"./@reduxjs-DYPsSoVN.js";import"./redux-logger-B8JP_rc7.js";import{c as Zs}from"./redux-DITMfSWq.js";import{Q as Xs}from"./qrcode.react-CJWQPexu.js";import{S as _e,A as Js,P as kn,a as Le,b as ea,T as Xo}from"./swiper-DLv7ejQn.js";import{s as rn}from"./@hookform-Dc6jS12O.js";import{a as Ar,b as Vn,C as ta}from"./react-hook-form-BJXGuiwr.js";import{E as na}from"./@marsidev-F19kFZ1X.js";import{c as Bt}from"./currency.js-9OAR_aOO.js";import{S as oa}from"./react-select-CI241hL_.js";import{r as ra}from"./styled-reset-B7ZXsPC1.js";/* empty css */import"./call-bind-oCmkau44.js";import"./get-intrinsic-BKEvijrG.js";import"./es-errors-DzOT6E3C.js";import"./has-symbols-eVqrYdw7.js";import"./has-proto-JnoBQRdH.js";import"./function-bind-BbkWVFrm.js";import"./hasown-DYqjtFKE.js";import"./set-function-length-B5OANX0j.js";import"./define-data-property-DO9o5wXF.js";import"./es-define-property-tzmkNPou.js";import"./gopd-CEkvUycD.js";import"./has-property-descriptors-DphFXkuo.js";import"./scheduler-CzFDRTuY.js";import"./react-fast-compare-Dxyd5FYM.js";import"./invariant-Bm-uj-iG.js";import"./shallowequal-F1vAqOm6.js";import"./use-sync-external-store-KK8Bpy9o.js";import"./@emotion-DwO3GsBP.js";import"./hoist-non-react-statics-Buxaj0Kl.js";import"./react-is-8JwjhRSi.js";import"./stylis-YPZU7XtI.js";import"./lodash.debounce-CDHjgjOA.js";import"./ua-parser-js-BBZA8f28.js";import"./side-channel-CpYS7sho.js";import"./object-inspect-CL2AiSqO.js";import"./immer-DqxjFn0G.js";import"./redux-thunk-ClJT1hhx.js";import"./@babel-CabbEptY.js";import"./@floating-ui-NvD4EidW.js";import"./use-isomorphic-layout-effect-MPmsYcaj.js";import"./memoize-one-BdPwpGay.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=o(a);fetch(a.href,l)}})();const Pr=({title:e="해피마켓",description:n,meta:o,og:i,twitter:a,itemprop:l,canonical:d})=>t.jsxs(us,{children:[t.jsx("title",{children:e}),d&&t.jsx("link",{rel:"canonical",href:d}),(o==null?void 0:o.title)&&t.jsx("meta",{name:"title",content:o.title||e}),(o==null?void 0:o.description)&&t.jsx("meta",{name:"description",content:o.description||n}),(o==null?void 0:o.image)&&t.jsx("meta",{name:"image",content:o.image}),t.jsx("meta",{property:"og:type",content:"website"}),(i==null?void 0:i.title)&&t.jsx("meta",{property:"og:title",content:i.title}),(i==null?void 0:i.description)&&t.jsx("meta",{property:"og:description",content:i.description}),(i==null?void 0:i.image)&&t.jsx("meta",{property:"og:image",content:i.image}),(a==null?void 0:a.card)&&t.jsx("meta",{property:"twitter:card",content:a.card}),(a==null?void 0:a.title)&&t.jsx("meta",{property:"twitter:title",content:a.title}),(a==null?void 0:a.description)&&t.jsx("meta",{property:"twitter:description",content:a.description}),(a==null?void 0:a.image)&&t.jsx("meta",{property:"twitter:image",content:a.image}),(l==null?void 0:l.name)&&t.jsx("meta",{itemProp:"name",content:l.name||""}),(l==null?void 0:l.description)&&t.jsx("meta",{itemProp:"description",content:l.description||""}),(l==null?void 0:l.image)&&t.jsx("meta",{itemProp:"image",content:l.image||""})]}),z=()=>re` display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: nowrap; `,wo=e=>re` width: 100%; overflow: hidden; position: relative; display: -webkit-box; -webkit-line-clamp: ${e}; -webkit-box-orient: vertical; word-wrap: break-word; word-break: break-all; `,v={regular:()=>re` font-weight: 400; `,medium:()=>re` font-weight: 500; `,semiBold:()=>re` font-weight: 600; `,bold:()=>re` font-weight: 700; `,extraBold:()=>re` font-weight: 800; `,heavy:()=>re` font-weight: 900; `},ia=re` position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: polygon(0 0, 0 0, 0 0); `,Eo=()=>re` -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ &::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera*/ } `,bo=re` img, video, iframe { max-width: 100% !important; } `,sa=e=>re` background-image: url('${e}'); background-size: cover; `;re` position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); `;const aa=r.div` display: flex; flex-direction: column; `,ca=r.div` ${z}; min-height: 100px; flex: 1; padding: 20px; flex-direction: column; > p { text-align: center; font-size: 1.6rem; line-height: 20.8px; color: var(--color-textSecondary); } `,la=r.div` display: flex; align-items: center; justify-content: center; height: 52px; width: 100%; border-top: 1px solid #f2f3f5; `,jr=r.button` flex: 1; height: 100%; > span { ${v.medium}; font-size: 1.6rem; color: ${({$isConfirm:e})=>e?"var(--color-sub)":"var(--color-textGray)"}; } `,da=r(jr)` border-left: 1px solid #f2f3f5; `,gn={Container:aa,MessageContainer:ca,ButtonContainer:la,Button:jr,CancelButton:da},ua=({message:e,onClickOk:n,onClickCancel:o,buttonList:i})=>t.jsxs(gn.Container,{children:[t.jsx(gn.MessageContainer,{children:typeof e=="string"?t.jsx("p",{dangerouslySetInnerHTML:{__html:e}}):e}),t.jsx(gn.ButtonContainer,{children:i==null?void 0:i.map(({type:a,label:l,style:d})=>{const u=a==="ok";return t.jsx(gn.Button,{onClick:u?n:o,autoFocus:u,$isConfirm:u,children:t.jsx("span",{style:d,children:l})},a)})})]}),pa=r(Je.div)` position: fixed; left: 0; top: 0; background: rgba(0, 0, 0, 0.3); width: 100vw; height: 100vh; z-index: 1009; opacity: 0.7; `,ma=r(Je.div)` position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; width: 278px; z-index: 1010; border-radius: 16px; `,Jo={Dimmed:pa,MotionContainer:ma},Ir=s.createContext({dialog:()=>new Promise((e,n)=>n())}),So=({isLock:e})=>{s.useEffect(()=>{if(!e)return;const n=i=>{i.target.closest("#root")&&i.preventDefault()},o=i=>{i.target.closest("#root")&&i.preventDefault()};return document.body.style.overflow="hidden",document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("wheel",o,{passive:!1}),()=>{document.body.style.overflow="",document.removeEventListener("touchmove",n),document.removeEventListener("wheel",o)}},[e])},ha=({children:e})=>{const[n,o]=s.useState();So({isLock:!!n}),s.useEffect(()=>{const a=d=>{d.key==="Escape"&&n&&o(void 0)},l=()=>{n&&o(void 0)};return window.addEventListener("keydown",a),window.addEventListener("popstate",l),()=>{window.removeEventListener("keydown",a),window.removeEventListener("popstate",l)}},[n]);const i=(a,l)=>new Promise(d=>{o({message:a??"",onClickOk:()=>{o(void 0),d(!0)},onClickCancel:()=>{o(void 0),d(!1)},buttonList:X(l)?[{type:"ok",label:"확인"}]:U(l,cn(2),ae)})});return t.jsxs(Ir.Provider,{value:{dialog:i},children:[e,n&&t.jsxs(t.Fragment,{children:[t.jsx(Jo.Dimmed,{initial:{opacity:0},animate:{opacity:[0,1]},transition:{type:"keyframes",ease:"easeInOut",duration:.3}},"dialogDimmed"),t.jsx(Jo.MotionContainer,{initial:{opacity:0,top:"51%"},animate:{opacity:[0,1],top:"50%"},transition:{type:"keyframes",ease:"easeInOut",duration:.3},children:t.jsx(ua,{message:n.message,onClickOk:n.onClickOk,onClickCancel:n.onClickCancel,buttonList:n.buttonList})},"dialogContianer")]})]})},xa=r.div` ${z}; flex-direction: column; `,ga=r.div` ${z}; flex-direction: column; padding: 14px 20px 36px 20px; gap: 24px; h4 { font-size: 1.8rem; ${v.bold}; color: #1e1e22; } `,fa=r.div` display: flex; flex-direction: column; gap: 24px; font-size: 1.6rem; ${v.regular}; color: #59595f; b { color: #ff2626; } `,ya=r.div` width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; button { border-radius: 8px; padding: 15.5px 0; border: 1px solid #0d0f71; } button:first-child { background-color: #fff; span { font-size: 1.6rem; ${v.medium}; color: #0d0f71; } } button:last-child { background-color: #0d0f71; span { font-size: 1.6rem; ${v.medium}; color: #fff; } } `,fn={Container:xa,ContentsContainer:ga,Contents:fa,ButtonContainer:ya},gt={XXS:375,XS:430,SM:768,MD:1024},Ca=r(Je.div)` position: fixed; z-index: 1004; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.3); `,wa=r(Je.section)` position: fixed; left: 50%; bottom: 0; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; z-index: 1005; background-color: white; border-top-right-radius: 16px; border-top-left-radius: 16px; ${Eo}; `,Ea=r.div` color: #1e1e22; padding: 13px 0; position: relative; ${z}; h4 { font-size: 1.8rem; ${v.medium}; } button { position: absolute; top: 17px; right: 21px; } `,Yn={Dimmed:Ca,Container:wa,Header:Ea},ba=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L15 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15 1L1 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Lr=({id:e,isVisible:n,setIsVisible:o,title:i,children:a,headerCloseIcon:l=t.jsx(ba,{}),headerStyle:d,...u})=>{const c=()=>{o(!1)};return So({isLock:n}),wr.createPortal(t.jsx(Co,{children:n&&t.jsxs(t.Fragment,{children:[t.jsx(Yn.Dimmed,{initial:{opacity:0},animate:{opacity:[0,1]},exit:{opacity:[1,0]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},onClick:p=>{p.stopPropagation(),o(!1)}}),t.jsxs(Yn.Container,{initial:{y:"100%",x:"-50%"},animate:{y:0,x:"-50%"},exit:{y:"100%",x:"-50%"},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},...u,children:[t.jsxs(Yn.Header,{style:d,children:[i&&t.jsx("h4",{children:i}),t.jsx("button",{onClick:c,children:l})]}),a]},e)]})}),document.querySelector("#bottomSheet"))},m={MAIN:"/",AUTH:{LOGIN:"/login",TERMS:"/terms",TERM_DETAIL:"/terms/:termsTypes"},PRODUCT:{LIST:"/products",DETAIL:"/products/:productNo",BRAND:{MAIN:"/products/brand",LIST:"/products/brand/:brandNo"},PARTNER:{MAIN:"/products/partners",LIST:"/products/partners/:partnerNo"},REVIEW:"/products/:productNo/:reviewNo"},CART:"/cart",ORDER:{MAIN:"/order",ORDER_SHEET:"/order/:orderSheetNo",ORDER_COMPLETE:"/order/complete",GIFT:{MAIN:"/order/gift",DETAIL:"/order/gift/:orderSheetNo",ADDRESS:"/order/gift/shipping-info/:encryptedShippingNo"}},GUEST:{MAIN:"/guest",LOGIN:"/guest/login",ORDER:"/guest/order",ORDER_DETAIL:"/guest/order/:orderNo",CLAIMS:{LIST:"/guest/claim",REQUESTS:{REQUEST:"/guest/claim/request",CHANGE_ADDRESS:"/guest/claim/request/change-address/:orderNo"},INFO:"/guest/claim/info/:claimNo"}},MY_PAGE:{MAIN:"/mypage",ORDERS:{LIST:"/mypage/orders",ORDER_DETAIL:"/mypage/orders/:orderNo"},CLAIMS:{LIST:"/mypage/claims",DETAIL:"/mypage/claims/:claimNo",REQUESTS:{REQUEST:"/mypage/claims/request",CHANGE_ADDRESS:"/mypage/claims/request/change-address/:orderNo"},INFO:"/mypage/claims/info/:claimNo"},COUPONS:"/mypage/coupons",ACCUMULATION:"/mypage/accumulation",REVIEWS:{LIST:"/mypage/reviews",REVIEWS_WRITE:"/mypage/reviews/write/:productNo",REVIEWS_MODIFY:"/mypage/reviews/modify/:reviewNo"},WISH:"/mypage/wish",EDIT:"/mypage/edit",ADDRESSES:{LIST:"/mypage/addresses",REGISTER:"/mypage/addresses/register",MODIFY:"/mypage/addresses/:addressNo"},PRODUCT_INQUIRIES:"/mypage/product-inquiries",INQUIRIES:{LIST:"/mypage/inquiries",WRITE:"/mypage/inquiries/write",EDIT:{LIST:"/mypage/inquiries/edit",DETAIL:"/mypage/inquiries/edit/:inquiryNo"}},CHECK_ACCOUNT:"/mypage/check-account",WITHDRAWAL:"/mypage/withdrawal"},CALLBACK:{AUTH:"/callback/auth-callback",KCP_AUTH:"/callback/kcp-auth-callback",NICE_AUTH_SUCCESS:"/callback/nice-auth-callback/success",NICE_AUTH_ERROR:"/callback/nice-auth-callback/error"},SEARCH:"/search",HAPPY_DEAL:"/happy-deal",SPECIAL_DEAL:"/special-deal",BEST:"/best",CATEGORIES:{LIST:"/categories",DETAIL:"/categories/:categoryNo"},BOARDS:{NOTICE:{LIST:"/boards/notice",DETAIL:"/boards/notice/:articleNo"},FAQ:"/boards/faq"},EXHIBITIONS:{LIST:"/exhibitions",DETAIL:"/exhibitions/:eventNo"},EVENT:{LIST:"/events",DETAIL:"/events/:eventNo"}},Nr={general:"89815",employee:"89816"},kr="A811BD270E28D3EDADF4220B29B0447E",Rr="8363D06723398C9A",Sa=e=>Ie.AES.encrypt(e,Ie.enc.Utf8.parse(kr),{iv:Ie.enc.Utf8.parse(Rr),padding:Ie.pad.Pkcs7,mode:Ie.mode.CBC,format:Ie.format.Hex}).toString(),vo=e=>Ie.AES.decrypt(e,Ie.enc.Utf8.parse(kr),{iv:Ie.enc.Utf8.parse(Rr),padding:Ie.pad.Pkcs7,mode:Ie.mode.CBC,format:Ie.format.Hex}).toString(Ie.enc.Utf8);class va{constructor(n){Fn(this,"storage");Fn(this,"prefix");this.prefix=n,this.storage=typeof window<"u"?window.localStorage:null}getOriginKey(n){return`${this.prefix}_${n}`}get(n){var o;return typeof window<"u"&&((o=this.storage)==null?void 0:o.getItem(this.getOriginKey(n)))||""}set(n,o){var i;typeof window<"u"&&((i=this.storage)==null||i.setItem(this.getOriginKey(n),o))}clearItem(n){var o;typeof window<"u"&&((o=this.storage)==null||o.removeItem(n))}clearItems(n){n.forEach(o=>this.clearItem(this.getOriginKey(o)))}}class Ta extends va{getAccessToken(){const n=this.get("ACCESS_TOKEN");return n?JSON.parse(n):null}setAccessToken(n){this.set("ACCESS_TOKEN",JSON.stringify(n))}getGuestToken(){const n=this.get("GUEST_TOKEN");return n?JSON.parse(n):""}setGuestToken(n){this.set("GUEST_TOKEN",n)}getRefreshToken(){const n=this.get("REFRESH_TOKEN");return n?JSON.parse(n):""}setRereshToken(n){this.set("REFRESH_TOKEN",n)}getHmUuid(){this.get("HM_UUID")}setHmUuid(n){this.set("HM_UUID",n)}clearHmUuid(){this.clearItems(["HM_UUID"])}clear(){this.clearItems(["ACCESS_TOKEN"])}clearAccessToken(){this.clearItems(["ACCESS_TOKEN"])}}const ee=new Ta("SHOPBY"),$r=()=>{const e=ee.getAccessToken();return!!(e!=null&&e.accessToken)&&(e==null?void 0:e.expiry)-new Date().getTime()>0},Aa=new et,er=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase(),Pa=er.includes("happypointcardapp")||er.includes("happypointcardapiversion"),ja=!!Aa.get("hm_aut"),K=Pa||ja,qn="happyMarket_jwt",Wn="happyMarket_jwt_exp",Ia=30*60*1e3,Or={save(e){localStorage.setItem(qn,e),localStorage.setItem(Wn,String(Date.now()+Ia))},load(){const e=localStorage.getItem(qn),n=Number(localStorage.getItem(Wn));return!e||!n||Date.now()>n?(this.clear(),null):e},clear(){localStorage.removeItem(qn),localStorage.removeItem(Wn)}},La=5,$e=st.create({baseURL:"https://market-api.happypointcard.com/market/api/v1",withCredentials:!0,timeout:1e4}),_r=new et,ft=(()=>{let e=null;const n=async()=>{const o=await st.get("https://market-api.happypointcard.com/market/api/v1/common/token",{withCredentials:!0}),i=o.data.data.jwt,a=o.data.data.extraData,l=vo(a);return Or.save(i),_r.set("hm_uuid",l,{domain:".happypointcard.com",maxAge:60*30,path:"/",secure:!0,sameSite:"none"}),ee.setHmUuid(l),o};return async function(){if(e)return await e;e=n();try{return await e}finally{e=null}}})(),Na=e=>{if(!e)return"";const n=decodeURIComponent(e),o=n.toLowerCase();return o==="undefined"||o==="null"?"":n},ka=async e=>{var d;const n=_r.get("hm_aut"),o=Na(n),i=e.jwt,a={userAgent:window.navigator.userAgent,isAgree:!0,hmAut:o||"undefined"},l=await st.post("https://market-api.happypointcard.com/market/api/v1/member/app/login",a,{headers:{Authorization:i},withCredentials:!0});return ee.setAccessToken({accessToken:vo(l.data.data.accessToken),expiry:new Date().getTime()+l.data.data.expireIn*1e3,hmAut:o||((d=ee.getAccessToken())==null?void 0:d.hmAut),memberGrade:l.data.data.memberGrade||"",isEmployee:l.data.data.memberGrade===Nr.employee}),l};let Jt=null;const Ra=2e3;let yn=0;const tr=[2e3,4e3,8e3],nr=e=>new Promise(n=>setTimeout(n,e)),co=async e=>Jt||(Jt=(async()=>{try{if(yn>=3){const o=Math.min(yn-3,tr.length-1),i=tr[o];await nr(i)}const n=await ka(e);return yn=0,await nr(Ra),n}catch(n){throw yn+=1,n}finally{Jt=null}})(),Jt),J={lock:"hm:appLogin:lock",lastSuccessAt:"hm:appLogin:lastSuccessAt",failCount:"hm:appLogin:failCount",breakerUntil:"hm:appLogin:breakerUntil",bucket:"hm:appLogin:bucket",tabId:"hm:appLogin:tabId"},oe={get(e){try{return localStorage.getItem(e)}catch{return null}},set(e,n){try{localStorage.setItem(e,n)}catch{}},remove(e){try{localStorage.removeItem(e)}catch{}}},Ze=()=>Date.now(),In=e=>new Promise(n=>setTimeout(n,e)),lo=(e,n=200)=>{const o=Math.floor(Math.random()*n)-Math.floor(n/2);return Math.max(0,e+o)};function Mr(){var n;let e=null;try{e=sessionStorage.getItem(J.tabId),e||(e=((n=crypto==null?void 0:crypto.randomUUID)==null?void 0:n.call(crypto))||String(Math.random()),sessionStorage.setItem(J.tabId,e))}catch{e=String(Math.random())}return e}function uo(){const e=oe.get(J.lock);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function $a(e){oe.set(J.lock,JSON.stringify(e))}function Oa(){oe.remove(J.lock)}async function Br(e,n=50,o=5e3){const i=Mr(),a=Ze()+o;for(;Ze()=n&&(o.tokens=e,o.refilledAt=i,Hr(o))}function Ma(e,n){_a(e,n);const o=Dr();return o.tokens<=0?!1:(o.tokens-=1,Hr(o),!0)}function Ur(e){const n=Number(oe.get(J.lastSuccessAt)||"0");return Ze()-n{if(K){await Ba();return}await Da()},Ba=async()=>{if(Ur(Be.minIntervalMs))return;const e=Number(oe.get(J.lastSuccessAt)||"0");if(!await Br(Be.lockTtlMs)){if(await In(lo(Be.minIntervalMs)),Number(oe.get(J.lastSuccessAt)||"0")>e)return;const i=await ft();await co(i.data.data),oe.set(J.lastSuccessAt,String(Ze()));return}try{const o=await ft();await co(o.data.data),oe.set(J.lastSuccessAt,String(Ze()))}finally{po()}},Da=async()=>{const e=Number(oe.get(J.breakerUntil)||"0");if(Ze()0&&(oe.remove(J.breakerUntil),oe.set(J.failCount,"0")),Ur(Be.minIntervalMs))return;const n=Number(oe.get(J.lastSuccessAt)||"0");if(!await Br(Be.lockTtlMs)){if(await In(lo(Be.minIntervalMs)),Number(oe.get(J.lastSuccessAt)||"0")<=n)throw new Error("appLogin failed in concurrent tab");return}if(!Ma(Be.bucketMax,Be.bucketRefillMs))throw po(),new Error("Rate limit exceeded: please retry later");try{const i=Number(oe.get(J.failCount)||"0");i>0&&await In(lo(Be.baseBackoffMs*Math.min(3,i)));const a=await ft();await co(a.data.data),oe.set(J.failCount,"0"),oe.set(J.lastSuccessAt,String(Ze()))}catch(i){const a=1+Number(oe.get(J.failCount)||"0");throw oe.set(J.failCount,String(a)),a>=Be.circuitFailThreshold&&oe.set(J.breakerUntil,String(Ze()+Be.circuitSleepMs)),i}finally{po()}};$e.interceptors.request.use(async e=>{try{let n=Or.load();return n||(n=(await ft()).data.data.jwt),e.headers.Authorization=n,e}catch(n){throw console.error("🔑 인터셉터 토큰 가져오기 실패:",{url:e.url,error:n}),n}});$e.interceptors.response.use(void 0,async e=>{var n;if(Ue(e)){if(((n=e.response)==null?void 0:n.status)===401&&e.response.data.errorCode==="8202"){const o=e.config,i=((o==null?void 0:o.url)||"").toLowerCase(),a=i.includes("/member/app/login"),l=i.includes("/member/common/deactivate");if(a||l)return Promise.reject(e);const u=(await ft()).data.data.jwt;if(K){try{await Rn()}catch(y){console.error("인터셉터에서 앱 로그인 실패:",y)}const p=e.config,x=1;if(p.retryCount=p.retryCount??0,p.retryCount{try{const o=(await ft()).data.data.jwt;return e.headers.Authorization=o,e}catch(n){throw console.error("🔑 V2 인터셉터 토큰 가져오기 실패:",{url:e.url,error:n}),n}});Dt.interceptors.response.use(void 0,async e=>{var n;if(!Ue(e))return Promise.reject(e);if(((n=e.response)==null?void 0:n.status)===401&&e.response.data.errorCode==="8202")try{if(K){await Rn();const d=(await ft()).data.data.jwt,u=e.config,c=1;return u.retryCount=u.retryCount??0,u.retryCountDt({method:"POST",url:"/member/common/uas/ready",data:{...e,userAgent:e.userAgent||""},headers:{Authorization:n}}),sendNiceSuccess:(e,n)=>Dt({method:"POST",url:"/member/common/uas/confirm",data:{...e,userAgent:e.userAgent||"",isCheckAdult:e.isCheckAdult??!0},headers:{Authorization:n}}),sendNiceFail:(e,n)=>Dt({method:"POST",url:"/member/common/uas/fail",data:{...e,userAgent:e.userAgent||""},headers:{Authorization:n}})},jn={all:["banners"],lists:()=>[...jn.all,"list"],list:(e,n)=>[...jn.lists(),e,n],extraInfos:e=>[...jn.all,"extraInfos",e]},Me={all:["boards"],config:()=>[...Me.all,"config"],categories:()=>[...Me.all,"category"],category:e=>[...Me.categories(),e],lists:()=>[...Me.all,"list"],list:(e,n,o)=>[...Me.lists(),e,n,o],infiniteList:(e,n,o)=>[...Me.lists(),e,n,o,"infinite"],details:()=>[...Me.all,"detail"],detail:(e,n,o,i)=>[...Me.details(),e,n,o,i],replies:()=>[...Me.all,"replies"],reply:(e,n,o)=>[...Me.replies(),e,n,o]},St={all:["cart"],lists:()=>[...St.all,"list"],list:(e,n)=>[...St.lists(),e,n],count:e=>[...St.all,"count",e],price:(e,n)=>[...St.all,"price",e,n]},qe={all:["coupons"],lists:()=>[...qe.all,"list"],list:(e,n)=>[...qe.lists(),n,e],infiniteList:(e,n)=>[...qe.lists(),n,e,"infinite"],issuableList:e=>[...qe.lists(),"issuable",e],listByProductNo:(e,n,o)=>[...qe.lists(),e,n,o],summary:(e,n)=>[...qe.all,"summary",e,n],happyCouponList:()=>[...qe.all,"happyCouponList"],happyCouponInfiniteList:e=>[...qe.happyCouponList(),e,"infinite"]},De={all:["events"],lists:()=>[...De.all,"list"],list:e=>[...De.lists(),e],infiniteList:e=>[...De.lists(),e,"infinite"],details:()=>[...De.all,"detail"],detail:(e,n)=>[...De.details(),e,n],detailById:(e,n)=>[...De.details(),e,n],detailByProduct:e=>[...De.details(),e]},mo={all:["popups"],lists:()=>[...mo.all,"list"],list:(e,n)=>[...mo.lists(),e,n]},he={all:["inquiries"],config:()=>[...he.all,"config"],lists:()=>[...he.all,"list"],list:(e,n)=>[...he.lists(),e,n],infiniteList:(e,n)=>[...he.lists(),e,n,"infinite"],myLists:()=>[...he.all,"myList"],myList:(e,n)=>[...he.myLists(),e,n],myInfiniteList:(e,n)=>[...he.myLists(),e,n,"infinite"],details:()=>[...he.all,"detail"],detail:(e,n)=>[...he.details(),e,n]},fe={all:["products"],lists:()=>[...fe.all,"list"],list:(e,n)=>[...fe.lists(),e,n],infiniteList:(e,n)=>[...fe.lists(),"infinite",e,n],likes:()=>[...fe.all,"likes"],like:(e,n)=>[...fe.likes(),e,n],infiniteLikedList:(e,n)=>[...fe.likes(),"infinite",e,n],likeCount:e=>[...fe.likes(),"count",e],details:()=>[...fe.all,"detail"],detail:(e,n,o)=>[...fe.details(),e,n,o],options:()=>[...fe.all,"option"],option:(e,n,o)=>[...fe.options(),e,n,o],groupManagementCode:e=>[...fe.all,"groupManagementCode",e]},He={all:["profile"],getProfile:e=>[...He.all,{headers:e}],getEmployee:e=>[...He.all,"happyMarket","employee",e],getHappyPoint:(e,n)=>[...He.all,"point",e,n],getEmployeeDiscount:e=>[...He.all,"happyMarket","employee","available",e],getNice:e=>[...He.all,"happyMarket","nice",e],getNiceSuccess:e=>["nice-success",e]},ge={all:["reviews"],configs:()=>[...ge.all,"config"],lists:()=>[...ge.all,"list"],list:(e,n)=>[...ge.lists(),e,n],infiniteList:(e,n)=>[...ge.lists(),"infinite",e,n],photoList:e=>[...ge.lists(),"photo",e],details:()=>[...ge.all,"detail"],detail:(e,n)=>[...ge.details(),e,n],comments:()=>[...ge.all,"comments"],comment:e=>[...ge.comments(),e],myReviewedLists:()=>[...ge.all,"myReviewedList"],myReviewedList:(e,n)=>[...ge.lists(),e,n],myReviewedInfiniteList:(e,n)=>[...ge.lists(),"infinite",e,n],myReviewableLists:()=>[...ge.all,"myReviewableList"],myReviewableList:(e,n)=>[...ge.lists(),e,n],myReviewableInfiniteList:(e,n)=>[...ge.lists(),"infinite",e,n]},Ga=({data:e,options:n})=>{const o=ee.getAccessToken(),i=new et,a=i.get("hm_aut"),l=i.get("wHmAut"),d=K?decodeURIComponent(a)||"undefined":l||"",u=K?window.navigator.userAgent:"";return ie({queryKey:He.getNice(e),queryFn:async()=>{const c={hmAut:d,userAgent:u,returnUrl:e.returnUrl||"",errorUrl:e.errorUrl||"",customParam:e.customParam||{}},{data:p}=await Ua.callNicePayment({...c,returnUrl:e.returnUrl||"",errorUrl:e.errorUrl||"",customParam:e.customParam||{}},o==null?void 0:o.accessToken);return p},...n})},Ct=()=>{const{dialog:e}=s.useContext(Ir);return{openDialog:(o,i)=>e(o,i)}},Gr={signIn:e=>$e({method:"POST",url:"/member/web/login",data:e}),signInWithCloudFlare:e=>Dt({method:"POST",url:"/member/web/login",data:e}),checkCloudFlare:e=>$e({method:"POST",url:"/member/web/check/token",data:e}),signOut:e=>$e({method:"POST",url:"/member/web/logout",data:e}),deleteMember:e=>$e({method:"POST",url:"/member/web/withdrawal",data:e}),updateMember:e=>$e({method:"POST",url:"/member/web/modify",data:e}),deactivateMember:e=>$e({method:"POST",url:"/member/common/deactivate",data:e}),getMemberPageUrls:()=>$e({method:"GET",url:"/member/web/getUrls"}),checkLogin:e=>$e({method:"POST",url:"/member/web/check/login",data:e})},sn={FIND_ID:"https://www.happypointcard.com/page/member-info/find-id-pw-form.spc?findType=id",FIND_PASSWORD:"https://www.happypointcard.com/page/member-info/find-id-pw-form.spc?findType=pw",JOIN:"https://www.happypointcard.com/page/join/index.spc",CHANGE_PASSWORD:"https://www.happypointcard.com/page/member-info/index.spc",CHANGE_MEMBER_INFO:"https://www.happypointcard.com/page/member-info/index.spc",PREVIOUS_PURCHASE_HISTORY:"https://happymarket.happypointcard.com/hm_front/mypage/order/list?shopYn=Y",MEMBER_DELETE:"https://www.happypointcard.com/page/member-info/index.spc",LOGOUT:"https://www.happypointcard.com/page/main.spc/page/main.spc"},Fr=(e,n,o)=>{const a=new Date(o*1e3).toUTCString();document.cookie=`${e}=${n}; expires=${a}; path=/`},Pe=()=>{const{openDialog:e}=Ct(),n=ee.getAccessToken(),o=Ht(),i=s.useMemo(()=>!!n&&!!n.accessToken&&n.expiry-new Date().getTime()>0,[n]);return{accessTokenInfo:n,isLogin:i,login:async d=>{var u,c;try{const p=await Gr.signInWithCloudFlare({...d,pwd:Sa(d.pwd),isAgree:!0,turnstileToken:d.turnstileToken});if(((u=p.data.data)==null?void 0:u.errorCode)==="2728"||((c=p.data.data)==null?void 0:c.errorCode)==="8008")throw new Gt(p.data.data.errorMessage,p.data.data.errorCode);const x=d.id;return ee.setAccessToken({accessToken:vo(p.data.data.accessToken),expiry:new Date().getTime()+p.data.data.expireIn*1e3,memberGrade:p.data.data.memberGrade||"",isEmployee:p.data.data.memberGrade===Nr.employee,memberId:x}),Fr("wHmAut",p.data.data.wHmAut,p.data.data.expireIn),o.invalidateQueries(),p}catch(p){throw Ue(p)?p.code==="2728"?(await e(`${p.message}`,[{type:"cancel",label:"비밀번호 변경"},{type:"ok",label:"아이디 찾기"}])?window.open(sn.FIND_ID):window.open(sn.CHANGE_PASSWORD),p):p.code==="8008"?(await e((p==null?void 0:p.message)||"로그인에 실패했습니다."),p.code):(await e((p==null?void 0:p.message)||"로그인에 실패했습니다."),p):(await e("로그인에 실패했습니다."),p)}},appLogin:async()=>{try{await Rn(),o.invalidateQueries(),o.invalidateQueries({queryKey:He.getProfile(),type:"active"});return}catch(d){throw console.error(d),d}}}},$n=e=>s.createElement("svg",{width:65,height:64,viewBox:"0 0 65 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:32.5,cy:32,r:30,stroke:"#E9EAEF",strokeWidth:4}),s.createElement("path",{d:"M29.5003 42.9937C29.4751 41.3446 30.8518 40 32.5065 40C34.098 40 35.4874 41.3446 35.5 42.9937C35.4874 44.6554 34.098 46 32.5065 46C30.8518 46 29.4751 44.6554 29.5003 42.9937Z",fill:"#E9EAEF"}),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5016 18C33.827 18 34.9016 19.0332 34.9016 20.3077V35.6923C34.9016 36.9668 33.827 38 32.5016 38C31.1761 38 30.1016 36.9668 30.1016 35.6923V20.3077C30.1016 19.0332 31.1761 18 32.5016 18Z",fill:"#E9EAEF"})),zt=({isVisible:e,setIsVisible:n,productNo:o,redirectUrl:i})=>{const a=we(),{openDialog:l}=Ct(),{isLogin:d}=Pe(),u=()=>{n==null||n(!1)},c=`${window.location.origin}${m.CALLBACK.NICE_AUTH_SUCCESS}`,p=`${window.location.origin}${m.CALLBACK.NICE_AUTH_ERROR}`,x=new et,y=x.get("hm_aut"),S=x.get("wHmAut"),f=K?decodeURIComponent(y)||"undefined":S||"",C=K?window.navigator.userAgent:"",w=window.location.pathname+window.location.search,b=i!==void 0&&i!=="",A=b?`${window.location.origin}${i}`:w,{refetch:g,isFetching:E}=Ga({data:{hmAut:f,userAgent:C,returnUrl:c,errorUrl:p,customParam:{returnPath:A}},options:{enabled:d&&e,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}),I=async()=>{var j,M,$;if(!d){await l("로그인 후 성인인증을 진행해주세요.");const F=b?i:`${m.PRODUCT.LIST}/${o}`;a({pathname:m.AUTH.LOGIN,search:`?returnUrl=${encodeURIComponent(F)}`},{replace:!0});return}const k=window.screen.width/2-500/2,T=`width=500, height=550, top=${window.screen.height/2-800/2}, left=${k}, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no`,P=window.open("","popupChk",T);if(!P){l("팝업이 차단되었습니다. 팝업 차단을 해제해주세요.");return}try{const{data:F}=await g(),pe=(j=F==null?void 0:F.data)==null?void 0:j.errorCode,me=(M=F==null?void 0:F.data)==null?void 0:M.pgUrl;if(pe!=="0000"||!me){P.close(),l((($=F==null?void 0:F.data)==null?void 0:$.errorMessage)||"본인인증 호출에 실패했습니다.");return}const Ne=document.forms.namedItem("form_chk");Ne?(Ne.action=me,Ne.target="popupChk",Ne.submit()):P.location.href=me}catch(F){P.close(),console.error("UAS call error: ",F),l("본인인증 호출 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.")}};return t.jsxs(t.Fragment,{children:[t.jsx("form",{name:"form_chk",method:"POST",style:{display:"none"}}),t.jsx(Lr,{id:"adultBottomSheet",title:"",isVisible:!!e,setIsVisible:k=>n==null?void 0:n(k),style:{zIndex:1005},children:t.jsxs(fn.Container,{children:[t.jsxs(fn.ContentsContainer,{children:[t.jsx($n,{}),t.jsx("h4",{children:"성인인증이 필요한 서비스입니다."}),t.jsxs(fn.Contents,{children:[t.jsx("p",{dangerouslySetInnerHTML:{__html:"본 상품 및 내용은 청소년에게 유해한 정보를 포함하고 있어 성인인증 절차를 거쳐야 합니다."}}),t.jsx("p",{children:"본 상품 및 내용은 청소년유해매체물로서 정보통신망 이용촉진 및 종보보호 등에 관한 법률 및 청소년 보허법의 규정에 의하여 19세 미만의 청소년이 이용, 구매할 수 없습니다."})]})]}),t.jsxs(fn.ButtonContainer,{children:[t.jsx("button",{type:"button",onClick:u,children:t.jsx("span",{children:"19세 미만 나가기"})}),t.jsx("button",{type:"button",onClick:I,disabled:E,children:t.jsx("span",{children:"회원 성인인증"})})]})]})})]})},zr=Tt` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,At=Tt` 0% { opacity: 0.5; } 100% { opacity: 1; } `,pn=Tt` 0% { opacity: 0; } 100% { opacity: 1; } `;Tt` 0% { opacity: 0; transform: translateY(100%); } 100% { opacity: 1; transform: translateY(0%); } `;const Fa=Tt` 0% { opacity: 0; left: 11%; } 100% { opacity: 1; left: 5.5%; } `,za=Tt` 0% { opacity: 0; left: 11%; } 100% { opacity: 0.7; left: 5.5%; } `,Va=r.div` display: flex; background: #fff; width: 100%; height: 300px; justify-content: center; align-items: center; animation: ${At} 0.3s ease-in-out; `,Ya=r.div` box-sizing: border-box; width: 40px; height: 40px; border: 4px solid var(--color-textLightGray); border-top-color: #0d0f71; border-radius: 50%; animation: ${zr} 1s linear infinite; `,or={Container:Va,Spinner:Ya},We=({...e})=>t.jsx(or.Container,{...e,children:t.jsx(or.Spinner,{})}),Cn=({children:e})=>{const[n,o]=s.useState(!1);return s.useEffect(()=>{const i=setTimeout(()=>{o(!0)},200);return()=>clearTimeout(i)},[]),n?t.jsx(t.Fragment,{children:e}):null},Vr=({errorMessage:e,returnUrl:n=m.MAIN})=>{const o=we(),{openDialog:i}=Ct();return s.useEffect(()=>{(async()=>(await i(e),o(n)))()},[e,n]),t.jsx(t.Fragment,{})},qa=r.div` width: 100%; height: 100vh; ${z}; `,Wa=r.div` ${z}; flex-direction: column; padding: 14px 20px 36px 20px; gap: 24px; max-width: 400px; text-align: center; h4 { font-size: 1.8rem; ${v.bold}; color: #1e1e22; margin: 0; } `,Ka=r($n)` width: 64px; height: 64px; `,Qa=r.h4` font-size: 1.8rem; ${v.bold}; color: #1e1e22; `,Za=r.p` font-size: 1.6rem; ${v.regular}; color: #59595f; margin: 0; `,Xa=r.div` width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; button { border-radius: 8px; padding: 15.5px 0; border: 1px solid #0d0f71; cursor: pointer; background-color: #0d0f71; span { font-size: 1.6rem; ${v.medium}; color: #fff; } &:hover { opacity: 0.9; } &:active { opacity: 0.8; } } `,Nt={Container:qa,ContentsContainer:Wa,Icon:Ka,ErrorText:Qa,ErrorSubText:Za,ButtonContainer:Xa},Ja=()=>{const e=we(),n=()=>{e(m.MAIN)};return t.jsx(Nt.Container,{children:t.jsxs(Nt.ContentsContainer,{children:[t.jsx(Nt.Icon,{}),t.jsx(Nt.ErrorText,{children:"페이지를 찾을 수 없습니다."}),t.jsx(Nt.ErrorSubText,{children:"요청하신 페이지가 존재하지 않습니다."}),t.jsx(Nt.ButtonContainer,{children:t.jsx("button",{type:"button",onClick:n,children:t.jsx("span",{children:"메인으로 이동하기"})})})]})})},ec=r.section` font-size: 1.6rem; ${z}; flex-direction: column; gap: 40px; padding: 40px; height: 100vh; text-align: center; line-height: 1.6; `,tc=r.div` ${z}; flex-direction: column; `,rr={Container:ec,ButtonContaier:tc},nc=({error:e,resetErrorBoundary:n})=>{const[o,i]=s.useState("이용에 불편을 드려 죄송합니다.
동일한 현상이 계속될 경우 문의 주시기 바랍니다.");s.useEffect(()=>{var l,d;if(Ue(e)){const u=((d=(l=e.response)==null?void 0:l.data)==null?void 0:d.message)??"";i(qs.sanitize(u,{ALLOWED_TAGS:["br"],ALLOWED_ATTR:[]}))}},[e]);const a=we();return K?t.jsx(t.Fragment,{}):t.jsxs(rr.Container,{children:[t.jsx("p",{dangerouslySetInnerHTML:{__html:o}}),t.jsxs(rr.ButtonContaier,{children:[t.jsx("button",{onClick:n,children:t.jsx("span",{children:"다시 시도하기"})}),t.jsx("button",{onClick:()=>{n(),a(m.MAIN)},children:t.jsx("span",{children:"메인으로 이동하기"})})]})]})},dn={HTTP_CONTINUE:100,HTTP_SWITCHING_PROTOCOLS:101,HTTP_PROCESSING:102,HTTP_OK:200,HTTP_CREATED:201,HTTP_ACCEPTED:202,HTTP_NON_AUTHORITATIVE_INFORMATION:203,HTTP_NO_CONTENT:204,HTTP_RESET_CONTENT:205,HTTP_PARTIAL_CONTENT:206,HTTP_MULTI_STATUS:207,HTTP_ALREADY_REPORTED:208,HTTP_IM_USED:226,HTTP_MULTIPLE_CHOICES:300,HTTP_MOVED_PERMANENTLY:301,HTTP_FOUND:302,HTTP_SEE_OTHER:303,HTTP_NOT_MODIFIED:304,HTTP_USE_PROXY:305,HTTP_RESERVED:306,HTTP_TEMPORARY_REDIRECT:307,HTTP_PERMANENTLY_REDIRECT:308,HTTP_BAD_REQUEST:400,HTTP_UNAUTHORIZED:401,HTTP_PAYMENT_REQUIRED:402,HTTP_FORBIDDEN:403,HTTP_NOT_FOUND:404,HTTP_METHOD_NOT_ALLOWED:405,HTTP_NOT_ACCEPTABLE:406,HTTP_PROXY_AUTHENTICATION_REQUIRED:407,HTTP_REQUEST_TIMEOUT:408,HTTP_CONFLICT:409,HTTP_GONE:410,HTTP_LENGTH_REQUIRED:411,HTTP_PRECONDITION_FAILED:412,HTTP_REQUEST_ENTITY_TOO_LARGE:413,HTTP_REQUEST_URI_TOO_LONG:414,HTTP_UNSUPPORTED_MEDIA_TYPE:415,HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:416,HTTP_EXPECTATION_FAILED:417,HTTP_I_AM_A_TEAPOT:418,HTTP_UNPROCESSABLE_ENTITY:422,HTTP_LOCKED:423,HTTP_FAILED_DEPENDENCY:424,HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL:425,HTTP_UPGRADE_REQUIRED:426,HTTP_PRECONDITION_REQUIRED:428,HTTP_TOO_MANY_REQUESTS:429,HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE:431,HTTP_INTERNAL_SERVER_ERROR:500,HTTP_NOT_IMPLEMENTED:501,HTTP_BAD_GATEWAY:502,HTTP_SERVICE_UNAVAILABLE:503,HTTP_GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL:506,HTTP_INSUFFICIENT_STORAGE:507,HTTP_LOOP_DETECTED:508,HTTP_NOT_EXTENDED:510,HTTP_NETWORK_AUTHENTICATION_REQUIRED:511},Yr=({children:e,fallback:n=nc})=>{const o=(i,a)=>{var u;console.error(a);const{HTTP_UNAUTHORIZED:l,HTTP_SERVICE_UNAVAILABLE:d}=dn;if(i instanceof Gt){if(K)return;if(Ke((u=i.response)==null?void 0:u.status,[l,d]))throw i}};return t.jsx(Sr,{onError:o,fallbackRender:i=>t.jsx(n,{...i}),children:e})},de=({children:e,suspenseFallback:n,errorFallback:o})=>t.jsx(Yr,{fallback:o,children:t.jsx(s.Suspense,{fallback:n,children:e})}),oc=r.footer` display: flex; flex-direction: column; padding: 32px 36px 62px 20px; background: #f6f6fa; gap: 24px; `,rc=r.div` display: flex; flex-direction: column; gap: 12px; `,qr=r.ul` display: flex; gap: 16px; flex-wrap: wrap; font-size: 1.3rem; color: var(--color-textGray); `,ic=r.div` font-size: 1.3rem; color: var(--color-textGray); display: flex; flex-direction: column; gap: 16px; p { color: #b3b4b9; } `,sc=r.div` display: flex; flex-direction: column; gap: 2px; `,ac=r.p` font-size: 1rem; ${v.regular}; color: #b3b4b9; `,cc=r(qr)` display: flex; gap: 16px; > li { > a { line-height: 0; } } `,dt={Container:oc,LinkList:qr,ContentsContainer:ic,InfoContainer:sc,WaringText:ac,IconLinkList:cc,LinkContainer:rc},Kn={TERMS:"https://napi.happypointcard.com/page/term-view.spc?pre=11",PRIVACY_POLICY:"https://www.happypointcard.com/page/customer/term.spc?no=2",BUSINESS_INFO:"http://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",CUSTOMER_SERVICE:"https://pf.kakao.com/_bGpixb"},lc={TERMS:"https://napi.happypointcard.com/page/term-view.spc?pre=11",PRIVACY_POLICY:"https://napi.happypointcard.com/page/term-view.spc?pre=3 ",BUSINESS_INFO:"http://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",CUSTOMER_SERVICE:"https://pf.kakao.com/_bGpixb"},at=()=>Ws(navigator.userAgent).isMobile?vr?"IOS":Ks?"AOS":"MOBILE_WEB":"PC",Oy=(e,n)=>e/n*100,ir=e=>`${typeof window<"u"?window.location.protocol:"http:"}${e}`,Qn={"/":"MAIN","/products/:productNo":"PRODUCT","/cart":"CART","/mypage":"MY_PAGE","/categories/:categoryNo":"PRODUCT_LIST","/search":"PRODUCT_SEARCH","/order/complete":"ORDER_COMPLETE","/order/:orderSheetNo":"ORDER","/mypage/orders/:orderNo":"ORDER_DETAIL","/mypage/product-inquiries":"MY_PAGE"},dc=e=>U(Qn,ks,so(n=>se(n,e.pathname)?Qn[n]:null),n=>n?ln(n,Qn):null),ho=e=>{},uc=()=>({version:"1.0",clientId:"X+Ai2NGAWJyC/wapyz1xag==",platform:at(),language:"ko"}),xo=new AbortController,h=st.create({baseURL:"https://shop-api.e-ncp.com",headers:uc(),signal:xo.signal,validateStatus:e=>K&&e===dn.HTTP_UNAUTHORIZED?!0:e>=200&&e<400});h.defaults.timeout=1e4;h.interceptors.request.use(e=>{var o;ho(`[API] ${(o=e.method)==null?void 0:o.toUpperCase()} ${e.url} | Request`),e.headers=e.headers??{};const n=ee.getAccessToken();return n?e.headers.accessToken=(n==null?void 0:n.accessToken)||"":ee.clear(),e});h.interceptors.response.use(async e=>{var n,o,i;if(ho(`[API] ${(o=(n=e==null?void 0:e.config)==null?void 0:n.method)==null?void 0:o.toUpperCase()} ${(i=e==null?void 0:e.config)==null?void 0:i.url} | Request ${e.status}`),e.status===dn.HTTP_UNAUTHORIZED&&K)try{ee.clear(),xo.abort("Request was canceled");const a=`${window.location.pathname}${window.location.search}`;window.location.replace(a)}catch(a){console.error(a)}return e},async e=>{var n,o,i,a,l,d,u,c;if(!(e instanceof Gt))return Promise.reject(e);switch(ho(`[API] ${(o=(n=e==null?void 0:e.config)==null?void 0:n.method)==null?void 0:o.toUpperCase()} ${(i=e==null?void 0:e.config)==null?void 0:i.url} | Error ${(a=e.response)==null?void 0:a.status} ${(l=e==null?void 0:e.response)==null?void 0:l.statusText} | ${e==null?void 0:e.message}`),(d=e.response)==null?void 0:d.status){case dn.HTTP_UNAUTHORIZED:if(((u=e.config)==null?void 0:u.baseURL)==="https://shop-api.e-ncp.com"){if(Ke((c=e.config)==null?void 0:c.url,["/authentications","/oauth/token"]))return Promise.reject(e);if(ee.clear(),xo.abort("Request was canceled"),!K){alert("로그인 상태가 만료되었습니다. 다시 로그인해주세요.");const p=`${m.AUTH.LOGIN}?returnUrl=${encodeURIComponent(`${window.location.pathname}${window.location.search}`)}`;window.location.replace(p)}}return Promise.reject(e);default:return Promise.reject(e)}});const pc={getMall:()=>h({method:"GET",url:"/malls"}),getMallInternationalizationSettings:()=>h({method:"GET",url:"/malls/internationalization"}),getMallPartners:()=>h({method:"GET",url:"/malls/partners"}),getSslInfo:()=>h({method:"GET",url:"/malls/ssl"})},Wr=({options:e}={})=>ie({queryKey:["mallInfo"],queryFn:async()=>{const{data:n}=await pc.getMall();return n},staleTime:1e3*60*10,gcTime:1e3*60*10,...e}),Kr=()=>{const e=at(),n=s.useMemo(()=>Ke(e,["AOS","IOS"])&&navigator.userAgent.includes("happypointcardapp")||navigator.userAgent.includes("happypointcardapiversion"),[e]),o=s.useMemo(()=>{if(n)return vr?{appUrl:"happypointcard://"}:{appUrl:"happypointcard://deeplink"}},[n]);return{platform:e,isApp:n,extraData:o}},mc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAeASURBVHgBlVZtbBxXFT3vzZuP/bC9ju0ocQPdpoK2FKmOIC6NCnEqIUUKEY4KfxpB7D9Ai4BKAVShishICAkJKRSohKhUF/60f4iDKoEUkbpSXdKYErcVom6hWYyBpI7j9Xq9692ZeZfzZuuQtmrSrn39djxv7rn33HPvG4X38Xmwvzmirfq8nyYjkU3K+TQu5dMWirZd7Upac0XVngtt++Q+7J6+ni91rZsPDCRjxqbHfCtl36YIrAUBkbdtFNKYqwONEUmMEAkCSMXoZGI4HZ78QIAPbpOyiJwwVoYMQYI0QUiAkKD5JEFB2sgRNC8MgBbAIpQUBpuWVAoS77sJd1WuC3h0mxzRSo4bUaVAJAPJJW0U4xbXFjNLUKTziP8Pud+ZB4FPYI+mCa5Vm2u7amRjfBCfmXpPwIcHk1Gx+kSgFHJ0kiNgPo7RFTdpBE02CMgAHIV07vNpj6aVpqMUivvdCsT83oZIk9eNsX587ol3Af4oo9Ge85QqRQTLC9DTtYHbjigM3A0UBg2UplMGo3kPzpTNntVtwC4lSH63Cm+qClloQOwGrDSQSr0K1Hf1YrzyNsBHtyXnFVTZp8OI14PDLex+zCAoKUhNYBfbUGsEZA0zsOyPzn4lzyDK5KREcpc2gC/Nw0xfIrlNxOka9zXmivjqriuAJ25ojqWiH9d82hCwezDF0EnWp6Ww/LUl+H9aQyFpUDgtmJTpyFtgGW5ntY7MPZTPE7cC3Qb+7X+EulRDyzpABoHWeA7fncx2b6X0t7Mu2ynt7eT/xv1U4VaN5fsvIJhdRVHXEak6PK7iNVi4JkN11mKeXAcF8W93Qu/Kwxufgyr5SL+ynZ7XKagNhtZ06zGHZV7fsTQC2yyrLGb+tYL+/XlglZJ/sYqcV6cSm9AEEhYr3bMF6sAOpwvguRV4T19EvDOAPjAA6aLDR19Bq0rB3LMN+OE6PdZpbSekcoyHRkyPLI16WS0IJh6jTmD6ikj/2UTBXITPKLVmVh9maz/2acgQATdL/03G9/Jl+F84C3vgGaiXLmVZyeIazA05+iKdmVJjMuHUK6MmwuIdyoExaSdv10cqGIRaacA3C1Ql+ZcNxJP3Abf3wzv+AvCbeeggR5Ay7Pc+gfipYfh7TgBsGUELeo1UdxknFoK1uCZcXZXtXhOa14c64erODzNM1K6s0DqqMMoYyb7bCDYAHD8F88gLkNQnEaTxkf8ijgRy9JOIR3oRnHbKJ1jqlGw79c3odCJLCYmy1tFCSYcVeOE/4EWvQeXm2W/cpLk5/y8gdwHyqX42MqU/PcvrNahoHYjqNNL91GwWrnfwQ3ymnlGqOYk6St7IsusU3PWsLhmEF7jBRcMbrrENwVTa6ebCm1nnqKgNm02UZQZB8cQBt3CoJaStt9BpC91iwKxfy00YOldu6iRZZo49YcnAqat1sFJFtASVf5MNfJEOuZJWMSx04TJBV2FffC6jxd57F2tTg6JJfpV7a7AHb87uqT//tZN1rgHrpZ0xJplQ3F1axBy7qgaFixUWZMjVSnGjGJcpI3SDsoeAKoB//jTiyquQw6PUxQbUzF+AWgK7/7PAl/cD8wvQM2fg5qHyaGZzftlMjDxLaI6JrjmDfPVZgg1Bk2cXWZB0ZFxkL3ZT1iqEG3b+r44ieeAnsEcOA0fu+/8k/vsbMA//GKrA7ByQR53nfZiEPgJ+b/kEy5PYLm7PvWRsuD6lvea34JFGn1kS0Fb/DbXjY0CpxmwDOuYcta/B/PSLsLfeA9k5TLo4xs6egTf7CvXFGnWzlxukzg9gbmTTzy+y9swwNbCJm845AgZTxp9anE4P5yvwk7IKmWFOoBdOQT56N+zHh+BdmM3EBCHVlLv3nz8A509R/QEnHIMpESzwSCPT0x6Smz9CcJ43p886DAqL7wESulaq5HD/dDZLJYwneLqSYvLfzYRe/SVZXkE6+mukt9wJW6L6SqtQW1YhfRRLPzPvI91buPZyfPVwEnWvw+6+BfYHD0Eu1xBMPw+JyHlIdRrS6qmJtx1P9jv6HN8dhlSBtLB8trwX6d4n+UAfs1nhkXae0TapYNVJmH2pEnfWM0O/hwIbYA9zbbBPvz8Bf+YNtmQfktWtiNe3VvK1b9+UDe9NQFWwh6Sgz0kRJUVA3aCWZu5EsuNeYOAg6eGk0b3ZgHcyd6e7uOYUpzXLA5hD4+XnoZ8+SdrJVlRigBxnEaq5ZrzvCg6u+sgvvDEpyuMOUHIseKiykJTu7HRZ8QjP5gJ4VqJJ8HXWcZVDYCXi/GWt+F1Vi8Aaman3I631HTJ/+/mV9xp9NaD6ejpJZR0SRsUDkB0h2VuSOJG5t6WO2LJrobhQYFB5DucCrdhkO3CUhWyHkIoPN3i21cevBntXhlcy/T3KLPgzMHzP8RmTkc2DndnxkUQ6M5k4ap1Z1nnzsk9jVMuU/0pxTqV9h9STZyrv9H3NF+FkBmPK6GMZ8Fu0quRqQNLboGjcW8SK50Arcik3YX62PPlePq8JuPmJZzHCqTvqabmD7ThEsFJ2ALRQVQ1UpKaetTU95X8jmb6er/8BowZmbMbHGbgAAAAASUVORK5CYII=",hc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAROSURBVHgBvVZtaFtVGH7OuUmTtEmM+7SdxkxHHYp0Q6XGz/aPQ1DWwmDTTtuBPwQFnT8cOGGU6R9F/yhDBsMNnY4NXP0AHVW6MmlsEdNO/DHsZsY6t9lhrvQjbZJ7ju85zcfNTZp0c/hcLvdw3nPf7/c9L8MSEIptbxNMbqZlmxQsAiZDmiCZSetRxjDKJfvSjH56shYvVo0YiD3bw8D2SCCCpSFBWvRORT87iGsRGIr1RATLHJcSG3B9SBhwt5vRgwkngTs3AsNd3ZbMxv+DMIWIxTLxwPD2DieBlQp7pgOCH8eNBEfPVOvhQ2UClRuVZYWEuFFgMA3p3ph3ryu/L5AZIGKoeI4hKwW9adTIrRykPufjHuIl7dshlQ+02og8J5WNtPw4f8bFDPwz9xfWNdyOx0ItSEurpjiVDIIUPHqlH9yoh8HdToV2qOzVAoOxrj/sqT+bTmJ35Hn0hrfiehAe7kFSZrSXbEhMRQ+vZaqoLcgBO8Uj5jH50DFY5ByjPJGrQtCTmLuKO4e2IlC/poQmwdq5kChL3UZfk/7mhamY5ONSEp8K4PQsczVQhMrjzqXooI6EFifBEkJ/zewsvkuOEQum9dt3uV+vVayKFkmHFTnlWKVEY49zSLlogY/P/YkXzryDdye+omPAgQtH8OHlE8SL4+VzB3CeXKcU+Gn6d7x38Rv0m78641aqDEeE20uhqMjCp97wYpKYNnpCWHnqaXxw1+tIZedxz3A31pPbI0NbcG7uCjb98gru8K3GEyPdqAoqEb4IQSNNmRaub0LXykeRtGZxKWPCIFedTV3ES41PkpAmjEyPI+y7FVF/M7hnFWrBRczNMitzFt5s+BEhZqEfOzF43z6kSIEGw4fTD34C/8lN2L3uRWxb8TDGU5fw1sSxXKyrgLqOi3yeoEBvKN1fMDzsWYH+e/cWjNbsbloo8Jm2E3o/I7J487YteOq3t7Fr7XNFfWVFz42q1jZIb4nAGXJfuXJFcFaMhJu7dAv8+u43KJkY0sJCll5U6E5MyjEuGPqchATFZWz2fMWMq1SHLlJACVOUOm7g1cQheDzLy/9lvK9ia3NTL/07NYH3m1/DI8H1yOS0VYejgWbdTVQlqph9b56Gn+Kaj9/eC0fx7dVTCNatyp0q2qFam74tKIa99uatBIS8a7Dr7H5krBkUHDo/iS8e2I/Ny+6nbONoje/ESPJnkuzN/Snhq1teSZii9QK20ASHuuLUdare8tryqTNItv2gG8Ce8Y/g967W3aUGtHVqUbgPObM6LWnEKzYCu+Xk0kYqcJUcQe8tusFXBU12Bsu2F+TkF2b0SILSaOfC5uI3hEUZ6SIXNlCDriZMeUPDsHZo3k6BCnq8k6yT6sxEFSzl/s8IxYMu3dbP+2r+G4pti9BNOHAN82ipQnowtjrtllUVmMf/Ngg74aepgDPRISVvgZpXbaM+U0K4GBSS900vYdT/F+6WvWmM+YsFAAAAAElFTkSuQmCC",xc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKQSURBVHgBvZbNThNRFMd/MwgWCqJRQFhAWPAARnZE40YSH8BXMGHhioULU+Up3BJD9AFcmLBS485EF7JRBBKI1KYubKQlqfPlOb0z2FtLZ2wr/+T2YyZzfvee+Z9zL6TLWYML2/DwCD75cCTDC8yo/YCPcr1wDwbpUe4hXAuhGkEoI+o0AvMdvoGbdCHXg0MJEKSB2oD1mZJmJgvIeQqXgy5AbcD+E7jUkbYOFyWFfq+wZGis53DFWlHzb5nVLxfO0UcJNBwwhgr1v5vckBkV+w2LAa64+isxqwF4DTcEOHGyXCf+NTsLCwswPw+Tk5DPmzEYV4An1jo+lkKRwiiX4eAA9vZgZ8fE0MQa0tS+OH4O3iers22/vBz1pCAwMWwT1RrsuzAUtL7wfigMW00UrkkDUWwh+h9AVUtc6VYFKtKarBvDw52DrKxEke9HmZTPW0B505/R3FrAiYkoddauG0UbG+lAjdUUW9xaVaBnAefm0oEJVL93d41J2klj2cbxXHrR2BiMjv4poxQJ1HHlo25d1bpKkyvz3NyESsXU52nAWs1+TFm6x1kpHRnpnNLVVWP5LMrlrJT+hC22z7AsZHGPuS/FaHUax8m+gn8AanO5A+cbqf2rNJaWTndeFumENUbLChXWeNtFuH4V3jnJ7pGYYHraNO6ZGWm/UzA+Drmcad4awpfKqteNeZLmvS9tulSKbRkl7gw+wO1FeHViIHm0mLah9jC+J6BmPyvUG2jaI/sh3fUl5hBxSpuDhy8lcbp8+iSNtS4xiWHt5DyTg4/Xn0NU8MKcZ7Kd3uShctDdMTGUCX+jm1fzFm7FQbICa+L4RXr1gRasdgkx/1ZoataPi6Kqe9wXePRAiiYL6DdZRfCL59NuugAAAABJRU5ErkJggg==",gc=[{url:`${m.AUTH.TERMS}/USE`,appUrl:`${m.AUTH.TERMS}/USE`,label:"이용약관",fontWeight:400},{url:Kn.PRIVACY_POLICY,appUrl:lc.PRIVACY_POLICY,label:"개인정보처리방침",fontWeight:700},{url:Kn.CUSTOMER_SERVICE,appUrl:Kn.CUSTOMER_SERVICE,label:"고객센터",fontWeight:400}],fc=[{url:m.BOARDS.NOTICE.LIST,label:"공지사항",fontWeight:400},{url:m.BOARDS.FAQ,label:"FAQ",fontWeight:400},{url:"https://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",label:"사업자정보확인",fontWeight:400,target:"_blank"}],yc=()=>{const{data:e}=Wr(),{isApp:n}=Kr();return t.jsxs(dt.Container,{id:"footer",children:[t.jsxs(dt.LinkContainer,{children:[t.jsx(dt.LinkList,{children:gc.map(({url:o,appUrl:i,label:a,fontWeight:l})=>t.jsx("li",{children:t.jsx(W,{to:n?i:o,style:{fontWeight:l},children:a})},a))}),t.jsx(dt.LinkList,{children:fc.map(({url:o,label:i,fontWeight:a,target:l})=>t.jsx("li",{children:t.jsx(W,{to:o,style:{fontWeight:a},target:l,children:i})},i))})]}),t.jsxs(dt.ContentsContainer,{children:[t.jsxs(dt.InfoContainer,{children:[t.jsx("p",{children:`${e==null?void 0:e.serviceBasicInfo.companyName} | ${`대표자명 : ${(e==null?void 0:e.serviceBasicInfo.representativeName)||""}`}`}),t.jsx("p",{children:`사업자 등록번호: ${(e==null?void 0:e.serviceBasicInfo.businessRegistrationNo)||""}`}),t.jsx("p",{children:`소재지: ${(e==null?void 0:e.serviceBasicInfo.address)||""}`}),t.jsx("p",{children:`통신판매번호: ${(e==null?void 0:e.serviceBasicInfo.onlineMarketingBusinessDeclarationNo)||""}`}),t.jsxs("p",{children:[`고객센터 : ${e==null?void 0:e.serviceBasicInfo.representPhoneNo}`," ","|"," ",`이메일 : ${e==null?void 0:e.serviceBasicInfo.representEmail}`]}),t.jsx("p",{children:"호스트제공 : 엔에이치엔커머스(주)"})]}),t.jsx("div",{children:t.jsx(dt.WaringText,{children:"개별 판매자가 등록한 오픈마켓 상품에 대한 광고, 상품의 주문·배송·환불 등 거래와 관련한 의무와 책임은 각 판매자가 부담하며, (주)섹타나인은 통신판매중개자로서 해당 거래의 당사자가 아닙니다. 다만, 회사의 고의 또는 과실이 있는 경우에는 관계 법령에 따른 책임을 부담할 수 있습니다."})})]}),t.jsxs(dt.IconLinkList,{children:[t.jsx("li",{children:t.jsx(W,{to:"https://m.blog.naver.com/happypoints",children:t.jsx("img",{src:hc,alt:"naver-blog"})})}),t.jsx("li",{children:t.jsx(W,{to:"https://www.instagram.com/happypoint_official?igsh=MTQxcXV6c2c5em9zcA==",children:t.jsx("img",{src:mc,alt:"instagram"})})}),t.jsx("li",{children:t.jsx(W,{to:"https://youtube.com/@happypoint_official?feature=shared",children:t.jsx("img",{src:xc,alt:"youtube"})})})]})]})},Cc=r.nav` height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; background: var(--color-white); border-bottom: 1px solid #f2f3f5; background: #fff; `,wc=r.ul` width: 100%; height: 100%; display: flex; justify-content: space-between; `,Ec=r.li` position: relative; display: flex; align-items: center; height: 100%; padding: 0 4px; > a { font-size: 1.6rem; line-height: 20.8px; color: ${({$active:e})=>e?" var(--color-textSecondary)":" var(--color-textPrimary)"}; font-weight: ${({$active:e})=>e?" 700":" 400"}; } &::after { content: ''; position: absolute; left: 0; bottom: 0; opacity: ${({$active:e})=>e?"1":"0"}; transform: ${({$active:e})=>e?"scaleX(1)":"scaleX(0.5)"}; transition: ${({$active:e})=>e?"all 0.3s ease-in-out":"none"}; width: 100%; height: 3px; border-radius: 3px; background: #161a2a; } `,Zn={Container:Cc,MenuList:wc,MenuItem:Ec},bc={DESSERT:"745921",HEALTH_FOOD:"633963",DRINK:"633965",PROCESSED_FOOD:"633967",FRESH_FOOD:"633969",LIFE_STYLE:"633971",HOME_BAKING:"818770",DIGITAL:"818771"},To=[{name:"마켓홈",url:"/"},{name:"해피딜",url:`${m.HAPPY_DEAL}`},{name:"베스트",url:`${m.BEST}`},{name:"카테고리",url:`${m.CATEGORIES.LIST}/${bc.DESSERT}`},{name:"My",url:`${m.MY_PAGE.MAIN}`}],Sc=()=>{const{pathname:e}=Fe();return t.jsx(Zn.Container,{id:"gnb",children:t.jsx(Zn.MenuList,{children:To.map(({name:n,url:o})=>{const i=(a,l)=>a==="카테고리"?m.CATEGORIES.DETAIL:l;return t.jsx(Zn.MenuItem,{$active:!!se(i(n,o),e),children:t.jsx(W,{to:o,children:n})},n)})})})},vc=r.header` position: sticky; top: 0; /* left: 50%; transform: translateX(-50%); */ z-index: 11; width: 100%; /* max-width: calc(${gt.SM}px + 1px); */ max-width: 601px; height: fit-content; display: flex; flex-direction: column; background: #fff; `,Tc=r.div` display: flex; width: 100%; justify-content: space-between; height: 56px; padding: 0 20px; `,Ac=r.div` display: flex; align-items: center; justify-content: space-between; gap: 16px; h1 { font-family: Pretendard; font-size: 1.8rem; ${v.medium} line-height: 23.4px; text-align: left; color: var(--color-textSecondary); } > a { line-height: 0; } `,Pc=r.div` display: flex; justify-content: space-around; align-items: center; gap: 16px; > a { position: relative; line-height: 0; span { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; background: var(--color-highlight); border-radius: 50%; font-size: 1.1rem; ${v.medium} text-indent: 1px; text-align: center; line-height: 19px; color: var(--color-white); } } > button { line-height: 0; } `,wn={Container:vc,InnerContainer:Tc,LogoContainer:Ac,IconContainer:Pc},jc={getProfile:({headers:e}={})=>h({method:"GET",url:"/profile",headers:e}),updateProfile:e=>h({method:"PUT",url:"/profile",data:e,headers:{version:1.1}}),createProfile:e=>h({method:"POST",url:"/profile",data:e}),deleteProfile:e=>h({method:"DELETE",url:"/profile",params:e}),updateProfileAddress:e=>h({method:"PUT",url:"/profile/address",data:e}),getBlockedMembers:e=>h({method:"GET",url:"/profile/blocked-members",params:e}),blockMember:e=>h({method:"POST",url:"/profile/blocked-members",data:e}),createBrandMemberProfile:e=>h({method:"POST",url:"/profile/brand-oauth",data:e}),updatePasswordByCertificationNo:e=>h({method:"POST",url:"/profile/change-password-after-cert",data:e}),checkPassword:e=>h({method:"POST",url:"/profile/check-password",data:e}),getDormantAccount:()=>h({method:"GET",url:"/profile/dormancy"}),releaseDormancyAccount:e=>h({method:"PUT",url:"/profile/dormancy",data:e}),withDrawByPassword:e=>h({method:"PUT",url:"/profile/expel",data:e}),findId:e=>h({method:"POST",url:"/profile/find-id",data:e}),findPassword:e=>h({method:"POST",url:"/profile/find-password",data:e}),getGrade:()=>h({method:"GET",url:"/profile/grade"}),findIdByCertification:e=>h({method:"GET",url:"/profile/id",params:e}),updateId:e=>h({method:"PUT",url:"/profile/id",data:e}),getNonMaskingMember:e=>h({method:"POST",url:"/profile/non-masking",data:e}),signUpByOpenId:(e,n)=>h({method:"POST",url:"/profile/openid",data:e,headers:{accessToken:n}}),updatePassword:e=>h({method:"PUT",url:"/profile/password",data:e,headers:{version:1.1}}),updateProfileByCertification:e=>h({method:"POST",url:"/profile/rename",data:e}),reportMember:e=>h({method:"POST",url:"/profile/report",data:e}),synchronizeProfile:e=>h({method:"POST",url:"/profile/synchronize",data:e}),checkDuplicateCI:e=>h({method:"GET",url:"/profile/ci/exists",params:e}),checkDuplicateEmail:e=>h({method:"GET",url:"/profile/email/exist",params:e}),sendUpdateIdEmail:e=>h({method:"POST",url:"/profile/id/email",data:e}),checkDuplicateId:e=>h({method:"GET",url:"/profile/id/exist",params:e}),checkDuplicateMobileNo:e=>h({method:"GET",url:"/profile/mobile/exist",params:e}),checkDuplicateNickname:e=>h({method:"GET",url:"/profile/nickname/exist",params:e}),getMaskingAccountInfo:e=>h({method:"GET",url:"/profile/password/search-account",params:e}),sendUpdatePasswordEmail:e=>h({method:"PUT",url:"/profile/password/sending-email-with-url",data:e}),checkDuplicateMemberByEmail:e=>h({method:"GET",url:"/profile/member/equals/with-email",params:e}),checkDuplicateMemberByMobile:e=>h({method:"GET",url:"/profile/member/equals/with-mobile",params:e}),updatePasswordByCertificationKey:e=>h({method:"PUT",url:"/profile/password/no-authentication/after-certification",data:e}),updatePasswordByEmailCertification:e=>h({method:"PUT",url:"/profile/password/no-authentication/certificated-by-email",data:e}),updatePasswordBySMSCertification:e=>h({method:"PUT",url:"/profile/password/no-authentication/certificated-by-sms",data:e})},Ee=({headers:e,options:n}={})=>{const o=ee.getAccessToken();return ie({queryKey:He.getProfile(e),queryFn:async()=>{const{data:i}=await jc.getProfile({headers:e});return i},enabled:!!(o!=null&&o.accessToken),staleTime:1e3*60*60,gcTime:1e3*60*60,...n})},Ao={getCartList:(e={})=>h({method:"GET",url:"/cart",params:e}),updateCart:e=>h({method:"PUT",url:"/cart",data:e}),registerCart:e=>h({method:"POST",url:"/cart",data:e}),deleteCart:e=>h({method:"DELETE",url:"/cart",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getSelectedCartPrice:e=>h({method:"GET",url:"/cart/calculate",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getCartCount:()=>h({method:"GET",url:"/cart/count"}),getSelectedCartGroupPrice:e=>h({method:"GET",url:"/cart/subset",params:e}),checkCartValidation:()=>h({method:"GET",url:"/cart/validate"}),getMaximumCouponCartPrice:e=>h({method:"GET",url:"/cart/coupons/maximum",params:e==null?void 0:e.cartNo})},Ic={getCart:(e,n)=>h({method:"POST",url:"/guest/cart",params:n,data:e}),getOrderDetail:(e,n,o)=>h({method:"GET",url:`/guest/orders/${n}`,params:o,headers:{guestToken:e}}),issueOrderToken:(e,n)=>h({method:"POST",url:`/guest/orders/${e}`,data:n}),confirmOrder:e=>{const n=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/order-options/${e}/confirm`,headers:{guestToken:n||""}})},confirmDeliveryCompletion:e=>{const n=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/order-options/${e}/delivery-done`,data:{orderOptionNo:e},headers:{guestToken:n||""}})},requestReceipt:(e,n)=>{const o=ee.getGuestToken().accessToken;return h({method:"POST",url:`/guest/orders/${e}/cashReceipt`,data:n,headers:{guestToken:o||""}})},getGuestOrderDetail:(e,n,o)=>h({method:"GET",url:`/guest/orders/${n}/claim`,params:{orderRequestType:o==null?void 0:o.orderRequestType,claimType:o==null?void 0:o.claimType},headers:{guestToken:e}}),updateDeliveryInfo:(e,{receiverZipCd:n,receiverAddress:o,receiverJibunAddress:i,receiverDetailAddress:a,receiverName:l,receiverContact1:d,receiverContact2:u,customsIdNumber:c,countryCd:p,deliveryMemo:x,add:y})=>{const S=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/orders/${e}/deliveries`,params:{add:y},data:{receiverZipCd:n,receiverAddress:o,receiverJibunAddress:i,receiverDetailAddress:a,receiverName:l,receiverContact1:d,receiverContact2:u,customsIdNumber:c,countryCd:p,deliveryMemo:x},headers:{guestToken:S||""}})},sendPasswordByEmail:(e,n)=>h({method:"GET",url:`guest/orders/${e}/forgot-password`,params:n})},en={writeOrderSheet:e=>h({method:"POST",url:"/order-sheets",data:e}),getOrderSheet:(e,n)=>h({method:"GET",url:`/order-sheets/${e}`,params:n}),getCalculatedOrderSheet:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/calculate`,data:n}),getAvailableCoupons:(e,n)=>h({method:"GET",url:`/order-sheets/${e}/coupons`,params:n}),applyCoupon:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/apply`,data:n}),getAppliedCouponPrice:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/calculate`,data:n}),getMaximumAppliedCouponPrice:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/maximum`,data:n})},Lc=({memberNo:e,params:n,options:o})=>{const{isLogin:i}=Pe();return ie({queryKey:St.list(e,n),queryFn:async()=>{const{data:a}=await Ao.getCartList(n);return a},enabled:!X(e)&&i,...o})},Po=({memberId:e,options:n})=>{const{isLogin:o}=Pe();return ie({queryKey:["cartCount",{memberId:e}],queryFn:async()=>{const{data:i}=await Ao.getCartCount();return i},...n,enabled:!X(e)&&o})},Nc=({data:e,params:n,options:o})=>ie({queryKey:["guestCartList",{data:e,params:n}],queryFn:async()=>(await Ic.getCart(e,n)).data,...o}),kc={isInitialized:!1},Qr=Tr({name:"app",initialState:kc,reducers:{setInitialized(e,n){e.isInitialized=n.payload}}}),{setInitialized:Xn}=Qr.actions,Rc=Qr.reducer,$c={loading:!1,data:[],error:{}},Zr=Tr({name:"cart",initialState:$c,reducers:{setCart:(e,n)=>{if(e.data.length>0){const i=[...n.payload,...e.data].reduce((a,l)=>{const d=Rs(u=>u.optionNo===l.optionNo,a);return d===-1?a.push(l):a[d].orderCnt+=l.orderCnt,a},[]);return{...e,data:i}}return{...e,data:[...n.payload,...e.data]}},updateCart:(e,n)=>({...e,data:U(e.data,Xe(o=>o.optionNo===n.payload.optionNo?{...o,orderCnt:n.payload.orderCnt}:o),ae)}),checkCart:(e,n)=>({...e,data:U(e.data,Xe(o=>o.optionNo===n.payload.optionNo?{...o,isChecked:!o.isChecked}:o),ae)}),deleteCart:(e,n)=>({...e,data:ae(Qe(o=>!Ke(o.optionNo,n.payload.deleteList),e.data))})}}),{setCart:Oc,updateCart:_y,checkCart:My,deleteCart:By}=Zr.actions,_c=Zs({cart:Zr.reducer,app:Rc}),Mc=!0,Bc={key:"root",storage:Es,timeout:1e3},Dc=ws(Bc,_c),Xr=Qs({reducer:Dc,middleware:e=>e({serializableCheck:!1}),devTools:!Mc}),Jr=()=>ms(),Hc=hs,Uc=()=>{const[e,n]=s.useState(),[o,i]=s.useState(0),[a,l]=s.useState(0),{isLogin:d}=Pe(),{data:u}=Ee(),{cart:c}=Hc(({cart:E})=>({cart:E.data}),xs),p=Ht(),{data:x}=Nc({data:c,options:{enabled:!d}}),y=s.useMemo(()=>x!=null&&x.deliveryGroups?U(x.deliveryGroups,Xe(E=>E.orderProducts.length),Pn):0,[x==null?void 0:x.deliveryGroups]),S=s.useMemo(()=>x!=null&&x.deliveryGroups?U(x.deliveryGroups,rt(E=>E.orderProducts),rt(E=>E.orderProductOptions),rt(E=>E.orderCnt),Pn):0,[x==null?void 0:x.deliveryGroups]),f=()=>{p.invalidateQueries({predicate:E=>["guestCartList","cartPrice"].includes(E.queryKey[0])})},{data:C}=Lc({memberNo:(u==null?void 0:u.memberNo)||0,params:{divideInvalidProducts:!1},options:{enabled:d&&!!(u!=null&&u.memberNo)}}),w=()=>{p.invalidateQueries({predicate:E=>Ke(E.queryKey[0],[...St.all])})};s.useEffect(()=>{if(d){n(C);return}n(x)},[d,C,x]);const{data:b,refetch:A}=Po({memberId:(u==null?void 0:u.memberId)||"",options:{enabled:d}});s.useEffect(()=>{i(d?(b==null?void 0:b.count)||0:y)},[d,b,y]);const g=s.useMemo(()=>C!=null&&C.deliveryGroups?U(C.deliveryGroups,rt(E=>E.orderProducts),rt(E=>E.orderProductOptions),rt(E=>E.orderCnt),Pn):0,[C]);return s.useEffect(()=>{l(d?g||0:S)},[d,g,S]),{cartInfo:e,totalCount:o,totalCountByOption:a,refetch:d?w:f,cartCountRefetch:A}},Gc=[{url:m.MAIN,title:"마켓"},{url:m.BEST,title:"베스트"},{url:m.CATEGORIES.DETAIL,title:"카테고리"},{url:m.HAPPY_DEAL,title:"해피딜"},{url:m.SPECIAL_DEAL,title:"특가"},{url:m.PRODUCT.DETAIL,title:"상품상세"},{url:m.PRODUCT.REVIEW,title:"사진후기"},{url:m.AUTH.LOGIN,title:"로그인"},{url:m.SEARCH,title:"상품검색"},{url:m.CART,title:"장바구니"},{url:m.PRODUCT.PARTNER.LIST,title:"판매자 상품"},{url:m.PRODUCT.BRAND.LIST,title:"브랜드 상품"},{url:m.MY_PAGE.ORDERS.LIST,title:"주문/배송 내역"},{url:m.MY_PAGE.ORDERS.ORDER_DETAIL,title:"구매내역 상세"},{url:m.MY_PAGE.CLAIMS.LIST,title:"취소/반품/교환 내역"},{url:m.MY_PAGE.CLAIMS.REQUESTS.REQUEST,title:""},{url:m.MY_PAGE.CLAIMS.DETAIL,title:"취소/반품/교환 상세"},{url:m.MY_PAGE.PRODUCT_INQUIRIES,title:"상품문의 내역"},{url:m.BOARDS.NOTICE.LIST,title:"공지사항"},{url:m.BOARDS.NOTICE.DETAIL,title:"공지사항"},{url:m.BOARDS.FAQ,title:"FAQ"},{url:m.MY_PAGE.COUPONS,title:"쿠폰"},{url:m.EXHIBITIONS.LIST,title:"기획전 전체보기"},{url:m.EXHIBITIONS.DETAIL,title:"기획전"},{url:m.MY_PAGE.REVIEWS.LIST,title:"리뷰"},{url:m.MY_PAGE.REVIEWS.REVIEWS_WRITE,title:"리뷰 작성"},{url:m.MY_PAGE.REVIEWS.REVIEWS_MODIFY,title:"리뷰 수정"},{url:m.MY_PAGE.CHECK_ACCOUNT,title:"회원탈퇴"},{url:m.MY_PAGE.WITHDRAWAL,title:"회원탈퇴"},{url:m.MY_PAGE.CLAIMS.INFO,title:"정보"},{url:m.GUEST.ORDER_DETAIL,title:"구매내역 상세"},{url:m.GUEST.CLAIMS.INFO,title:"정보"},{url:m.MY_PAGE.ADDRESSES.LIST,title:"배송지 관리"},{url:m.MY_PAGE.ADDRESSES.REGISTER,title:"배송지 등록"},{url:m.MY_PAGE.ADDRESSES.MODIFY,title:"배송지 수정"},{url:m.MY_PAGE.CLAIMS.REQUESTS.CHANGE_ADDRESS,title:"배송지 변경"},{url:m.AUTH.TERM_DETAIL,title:"약관"},{url:m.ORDER.ORDER_SHEET,title:"결제하기"},{url:m.EVENT.LIST,title:"이벤트 전체보기"},{url:m.EVENT.DETAIL,title:"이벤트"}],Fc=e=>[m.MAIN,m.BEST,m.HAPPY_DEAL,m.SPECIAL_DEAL,m.CATEGORIES.DETAIL].some(i=>se(i,e)!==null),zc=e=>{var o;return((o=Gc.find(i=>se(i.url,e)!==null))==null?void 0:o.title)||""},Vc=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M8.86914 22C9.97371 22 10.8691 21.1046 10.8691 20C10.8691 18.8954 9.97371 18 8.86914 18C7.76457 18 6.86914 18.8954 6.86914 20C6.86914 21.1046 7.76457 22 8.86914 22Z",fill:"#232634"}),s.createElement("path",{d:"M15.7598 22C16.8643 22 17.7598 21.1046 17.7598 20C17.7598 18.8954 16.8643 18 15.7598 18C14.6552 18 13.7598 18.8954 13.7598 20C13.7598 21.1046 14.6552 22 15.7598 22Z",fill:"#232634"}),s.createElement("path",{d:"M0.3 2C0.134315 2 0 2.13431 0 2.3V4.7C0 4.86569 0.134315 5 0.3 5H2.6L4.95177 16.7588C4.97981 16.8991 5.10294 17 5.24594 17H19.7541C19.8971 17 20.0202 16.8991 20.0482 16.7588L21.9282 7.35883C21.9654 7.1732 21.8234 7 21.6341 7H6L5.04823 2.24117C5.02019 2.10094 4.89706 2 4.75406 2H0.3Z",fill:"#232634"})),Yc=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9092 4.78787C16.0263 4.90502 16.0263 5.09497 15.9092 5.21213L9.1213 12L15.9092 18.7879C16.0263 18.905 16.0263 19.095 15.9092 19.2121L14.2121 20.9092C14.095 21.0263 13.905 21.0263 13.7879 20.9092L5.09079 12.2121C4.97364 12.095 4.97364 11.905 5.09079 11.7879L13.7879 3.09081C13.905 2.97365 14.095 2.97365 14.2121 3.09081L15.9092 4.78787Z",fill:"#232634"})),qc=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22 8L12.172 1.12043C12.0687 1.04812 11.9313 1.04812 11.828 1.12043L2 8V20.7C2 20.8657 2.13431 21 2.3 21H9V13H15V21H21.7C21.8657 21 22 20.8657 22 20.7V8Z",fill:"#232634"})),Wc=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("g",{clipPath:"url(#clip0_6018_4149)"},s.createElement("path",{d:"M14.6094 17.75L15.0694 18.21L14.6094 17.75Z",fill:"#272727"}),s.createElement("path",{d:"M18.8803 22.02L15.0703 18.21L18.8803 22.02Z",fill:"#272727"}),s.createElement("path",{d:"M17.47 15.35C18.43 13.97 19 12.3 19 10.5C19 5.81 15.19 2 10.5 2C5.81 2 2 5.81 2 10.5C2 15.19 5.81 19 10.5 19V16C7.47 16 5 13.53 5 10.5C5 7.47 7.47 5 10.5 5C13.53 5 16 7.47 16 10.5C16 12.56 14.86 14.36 13.18 15.3L13.42 15.54L19.88 22L22 19.88L17.47 15.35Z",fill:"#232634"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_6018_4149"},s.createElement("rect",{width:24,height:24,fill:"white"})))),Kc=e=>s.createElement("svg",{width:61,height:30,viewBox:"0 0 61 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("g",{clipPath:"url(#clip0_7075_37787)"},s.createElement("path",{d:"M7.52052 11.7401H11.1147V0H7.52052V4.40512H3.59196V0H0V11.7401H3.59196V7.33501H7.52052V11.7401Z",fill:"#040674"}),s.createElement("path",{d:"M18.831 2.25849V2.93216C18.6999 2.72206 17.7466 1.9776 16.3912 1.9776C13.94 1.9776 12.0898 4.34344 12.0898 6.99244C12.0898 9.85154 13.7683 12.0073 16.2985 12.0073C17.9093 12.0073 18.6028 11.2742 18.831 11.0527V11.7355H22.1292V2.26077H18.831V2.25849ZM18.7722 6.99244C18.7722 8.10457 18.0267 9.02944 17.0824 9.02944C16.1381 9.02944 15.3859 8.15024 15.3859 6.99244C15.3859 5.91914 16.0546 4.95545 17.0598 4.95545C17.9974 4.95545 18.7722 5.83008 18.7722 6.99244Z",fill:"#040674"}),s.createElement("path",{d:"M23.4961 2.25854V14.2453H26.9141V11.0482C27.1445 11.272 27.8765 12.0028 29.4872 12.0028C31.6989 12.0028 33.6575 9.84703 33.6575 6.98793C33.6575 4.3412 31.848 1.97308 29.3946 1.97308C28.0369 1.97308 27.0451 2.71755 26.9141 2.92764V2.25397H23.4961V2.25854ZM28.6852 4.9555C29.6928 4.9555 30.3592 5.91919 30.3592 6.99249C30.3592 8.15029 29.6318 9.02949 28.6626 9.02949C27.6935 9.02949 26.9728 8.10462 26.9728 6.99249C26.9728 5.88037 27.7477 4.9555 28.6852 4.9555Z",fill:"#040674"}),s.createElement("path",{d:"M34.4883 2.25854V14.2453H37.9063V11.0482C38.1367 11.272 38.8687 12.0028 40.4794 12.0028C42.691 12.0028 44.6497 9.84703 44.6497 6.98793C44.6497 4.3412 42.8379 1.97308 40.3868 1.97308C39.0291 1.97308 38.0373 2.71755 37.9063 2.92764V2.25397H34.4883V2.25854ZM39.6774 4.9555C40.685 4.9555 41.3514 5.91919 41.3514 6.99249C41.3514 8.15029 40.624 9.02949 39.6548 9.02949C38.6857 9.02949 37.965 8.10462 37.965 6.99249C37.965 5.88037 38.7399 4.9555 39.6774 4.9555Z",fill:"#040674"}),s.createElement("path",{d:"M51.2808 2.26538L49.5029 6.69105L47.7273 2.26538H44.1602L47.7837 11.0847L46.286 14.7363H49.7988L54.8411 2.26538H51.2786H51.2808Z",fill:"#040674"}),s.createElement("path",{d:"M21.3389 20.2512V20.9249C21.2079 20.7148 20.2455 19.9703 18.8765 19.9703C16.4051 19.9703 14.5391 22.3362 14.5391 24.9852C14.5391 27.8443 16.2311 30 18.7839 30C20.4082 30 21.1062 29.267 21.3389 29.0455V29.7283H24.6169V20.2535H21.3389V20.2512ZM21.2779 24.9829C21.2779 26.095 20.5257 27.0199 19.5746 27.0199C18.6235 27.0199 17.8622 26.1407 17.8622 24.9829C17.8622 23.9096 18.5354 22.9459 19.5497 22.9459C20.4963 22.9459 21.2757 23.8205 21.2757 24.9829H21.2779Z",fill:"#040674"}),s.createElement("path",{d:"M10.5341 29.7259V24.1676L8.02655 29.7259H5.59125L3.06785 24.1333L3.23502 29.7259H0V17.9881H3.47674L6.84957 24.7271L10.2224 17.9881H13.5997V29.7259H10.5319H10.5341Z",fill:"#040674"}),s.createElement("path",{d:"M33.0659 20.2763C30.8407 19.6072 29.7405 20.8381 29.3429 22.0119V20.2489H25.9023V29.7259H29.3429C29.3429 29.7259 29.3429 26.8417 29.3429 25.9054C29.3407 24.2589 30.8136 23.0989 33.0659 23.8753C33.0659 23.4597 33.0727 20.5001 33.0659 20.2763Z",fill:"#040674"}),s.createElement("path",{d:"M40.0648 24.8025L44.1447 20.2398H40.0716L37.4104 23.3021V17.9813H33.9766V29.7237H37.4104V26.5152H37.4962L40.2704 29.7237H44.5649L40.0648 24.8025Z",fill:"#040674"}),s.createElement("path",{d:"M59.0477 18.0064H55.7178V20.2603H54.2539V23.0418H55.7178V26.1521C55.7178 28.5248 57.1297 29.9977 59.4001 29.9977C59.9807 29.9977 60.2495 29.9589 60.8053 29.8676L60.8866 29.8539V26.8692L60.7759 26.8851C60.6629 26.9011 60.4641 26.9194 60.1682 26.9194C59.5424 26.9194 59.0477 26.5357 59.0477 25.8895V23.0372H60.9973V20.2558H59.0477V18.0018V18.0064Z",fill:"#040674"}),s.createElement("path",{d:"M54.0065 24.9851C54.0065 22.19 51.7971 19.9703 48.718 19.9703C45.6388 19.9703 43.4023 22.3315 43.4023 24.9851C43.4023 27.6387 45.4672 29.9954 48.7157 29.9954C51.2595 29.9954 53.069 28.6458 53.7693 26.5517H50.5863C50.3649 26.9194 49.6962 27.351 48.8377 27.351C47.6381 27.351 46.8362 26.643 46.7187 25.8803H53.9139C53.9681 25.6337 54.0065 25.3231 54.0065 24.9828V24.9851ZM48.7812 22.5942C49.9266 22.5942 50.6608 23.2998 50.8506 23.8981H46.7187C46.861 23.2587 47.6043 22.5942 48.7812 22.5942Z",fill:"#040674"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_7075_37787"},s.createElement("rect",{width:61,height:30,fill:"white"})))),Qc=()=>{const e=we(),{pathname:n,state:o}=Fe(),[i]=vt(),{totalCountByOption:a}=Uc(),l=i.get("claimType"),d=i.get("orderNo"),u=s.useMemo(()=>{if(se(m.MY_PAGE.CLAIMS.REQUESTS.REQUEST,n)||se(m.GUEST.CLAIMS.REQUESTS.REQUEST,n))switch(l){case"CANCEL":return d?"전체 취소 신청":"취소 신청";case"EXCHANGE":return"교환 신청";case"RETURN":return"반품 신청";default:return"취소/반품/교환 상세"}if(se(m.MY_PAGE.CLAIMS.INFO,n)||se(m.GUEST.CLAIMS.INFO,n))switch(l){case"CANCEL":return"취소";case"EXCHANGE":return"교환";case"RETURN":return"반품";default:return null}return null},[l,n,d]),c=Fc(n),p=zc(n),x=E=>t.jsx("button",{onClick:E,children:t.jsx(Yc,{})}),y=E=>t.jsxs("h1",{children:[u&&u,E]}),{isLogin:S}=Pe(),{data:f}=Ee(),{data:C}=Po({memberId:(f==null?void 0:f.memberId)||(f==null?void 0:f.memberNo.toString())||"",options:{enabled:S}}),w=at(),b=n===m.ORDER.ORDER_COMPLETE||n===m.MY_PAGE.ORDERS.LIST&&(o==null?void 0:o.from)===m.ORDER.ORDER_COMPLETE,A=()=>{if(n===m.ORDER.ORDER_COMPLETE){e(m.MY_PAGE.ORDERS.LIST,{replace:!0,state:{from:n}});return}if(n===m.MY_PAGE.ORDERS.LIST&&(o==null?void 0:o.from)===m.ORDER.ORDER_COMPLETE){e(m.MAIN,{replace:!0});return}e(-1)},g=s.useCallback(()=>{if(K){if(b){const _={visibility:!1},T={visibility:!1};w==="AOS"?(window.android.setHeaderProperty(JSON.stringify(_)),window.android.setNaviProperty(JSON.stringify(T))):(window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(_)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(T)));return}const E=To.find(({name:_,url:T})=>se(((j,M)=>j==="카테고리"?m.CATEGORIES.DETAIL:M)(_,T),n)),I={visibility:!0,title:(E==null?void 0:E.name)||"",items:[{type:"search",url:"https://happymarket.happypointcard.com/hm_front/product/search/list"},{type:"basket",url:"https://happymarket.happypointcard.com/hm_front/cart/list",notice:C?C.count.toString():"0"}]},k={visibility:!1};if(w==="AOS"){window.android.setHeaderProperty(JSON.stringify(I)),window.android.setNaviProperty(JSON.stringify(k));return}else{window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(I)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(k));return}}},[C,n,w,b]);return s.useEffect(()=>{g()},[g]),s.useEffect(()=>{const E=()=>{g()};return window.addEventListener("pageshow",E),()=>{window.removeEventListener("pageshow",E)}},[g]),t.jsxs(wn.Container,{id:"header",children:[K&&!b?null:t.jsxs(wn.InnerContainer,{children:[t.jsx(wn.LogoContainer,{children:!K||b?n===m.MAIN&&!b?t.jsx(W,{to:m.MAIN,children:t.jsx(Kc,{})}):t.jsxs(t.Fragment,{children:[x(A),y(p)]}):null}),t.jsxs(wn.IconContainer,{children:[t.jsx(W,{to:m.SEARCH,onClick:E=>{if(window.scrollY>1){E.preventDefault();try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}const I=()=>{window.scrollY<=1?e(m.SEARCH):requestAnimationFrame(I)};requestAnimationFrame(I)}},"aria-label":"검색",children:t.jsx(Wc,{})}),t.jsxs(W,{to:m.CART,children:[t.jsx(Vc,{}),t.jsx("span",{children:a})]}),t.jsx(W,{to:m.MAIN,children:t.jsx(qc,{})})]})]}),c&&t.jsx(Sc,{})]})},Zc=()=>{const e=Vs(),[n]=s.useState(e);return s.useEffect(()=>{const o=document.querySelector("#header"),i=document.querySelector("#footer"),a=document.querySelector("#floatingButton"),l=o?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const p of c)document.documentElement.style.setProperty("--header-top",`${p.contentRect.height}px`)})}):null,d=i?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const p of c)document.documentElement.style.setProperty("--footer-bottom",`${p.contentRect.height+94}px`)})}):null,u=a?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const p of c)document.documentElement.style.setProperty("--floating-button",`${p.contentRect.height}px`)})}):null;return l&&l.observe(o),d&&d.observe(i),u&&u.observe(a),()=>{l&&l.disconnect(),d&&d.disconnect(),u&&u.disconnect()}},[]),n},ei={XS:`@media (max-width: ${gt.XS}px)`,SM:`@media (max-width: ${gt.SM}px)`,MD:`@media (max-width: ${gt.MD}px)`},Xc=r(W)` width: 100%; height: 100%; border-radius: 12px; overflow: hidden; position: relative; `,Jc=r.p` position: absolute; top: 49%; left: 5.5%; font-size: clamp(0.1rem, 4.38vw, 2.34rem); line-height: 135%; letter-spacing: 0.03vw; transform: translateY(-50%); z-index: 10; ${v.bold}; display: ${({$isAnimation:e})=>e==="none"||e?"block":"none"}; animation: ${({$isAnimation:e})=>e==="none"?"none":e?Fa:"none"} 0.6s ease-in-out; ${ei.XS} { font-size: clamp(0.1rem, 4.38vw, 1.63rem); } `,el=r.p` position: absolute; bottom: 7.5%; left: 5.5%; font-size: clamp(0.5rem, 3.6vw, 1.6rem); transform: translateY(-50%); z-index: 10; letter-spacing: 0.03vw; ${v.regular}; opacity: 0.7; color: #fff; display: ${({$isAnimation:e})=>e==="none"||e?"block":"none"}; animation: ${({$isAnimation:e})=>e==="none"?"none":e?za:"none"} 0.8s ease-in-out; `,tl=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); /* backdrop-filter: blur(5px); color: var(--color-white); */ svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${({$isBig:e})=>e?"initial":"48px"}; height: ${({$isBig:e})=>e?"initial":"48px"}; } `,En={DescriptionText:Jc,DateText:el,StyledLink:Xc,AdultDimmed:tl},ti=r.div` width: 100%; height: 100%; background: #f2f3f5; `,nl=r(ti)` display: flex; align-items: center; justify-content: center; > p { font-size: 1rem; color: #84858a; text-align: center; } `,ol=r.img` width: 100%; height: 100%; animation: ${At} 0.3s ease-in-out; `,Jn={EmptyContainer:ti,ErrorContainer:nl,Image:ol},yt=({isPlaceHolder:e,...n})=>{const[o,i]=s.useState("loading");return s.useEffect(()=>{if(!n.src){i("error");return}const a=new Image,l=setTimeout(()=>{i("error")},3e4),d=()=>{clearTimeout(l),i("loaded")},u=()=>{clearTimeout(l),i("error")};return a.addEventListener("load",d),a.addEventListener("error",u),a.src=n.src,()=>{clearTimeout(l),a.removeEventListener("load",d),a.removeEventListener("error",u)}},[n.src]),o==="loading"&&e?t.jsx(Jn.EmptyContainer,{}):o==="error"?t.jsx(Jn.ErrorContainer,{children:t.jsx("p",{children:"이미지를 불러올 수 없습니다."})}):t.jsx(Jn.Image,{loading:K?"eager":n.loading,...n})},jo=e=>e==="CURRENT"?"_self":"_blank",ni=e=>s.createElement("svg",{width:80,height:80,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:40,cy:40,r:38,fill:"white",stroke:"#F40000",strokeWidth:4}),s.createElement("path",{d:"M32.7667 27.5223V52.5714H27.5424V32.4699H27.404L21.6607 36.0681V31.4665L27.8538 27.5223H32.7667ZM47.7132 27.1764C52.9029 27.211 57.8158 30.2902 57.8158 39.3895C57.8504 47.9007 53.8025 52.9174 47.5056 52.9174C42.4542 52.9174 39.029 49.769 38.51 45.5134H43.6306C44.0458 47.3471 45.4989 48.4543 47.5056 48.4543C50.9308 48.4543 52.7299 45.4096 52.7299 40.3929H52.5223C51.346 42.6072 48.8895 43.9219 46.0871 43.9219C41.5893 43.9219 38.2679 40.5313 38.2333 35.8605C38.2333 30.8092 42.0391 27.1418 47.7132 27.1764ZM47.7478 31.2589C45.1875 31.2589 43.2846 33.231 43.3192 35.7221C43.3192 38.1786 45.1529 40.1161 47.7132 40.1161C50.2388 40.1161 52.2109 38.1094 52.2109 35.6875C52.1763 33.3002 50.308 31.2589 47.7478 31.2589Z",fill:"black"})),oi=({accountNo:e,banner:n,isTextAnimation:o="none",bannerStyle:i,descriptionStyle:a,dateStyle:l,isAdultBanner:d,onAdultClick:u})=>{var w;const c=(w=n.description)==null?void 0:w.replace(/\n/g,"
"),p=(b,A)=>{d&&(b.preventDefault(),u==null||u(A))},{data:x}=Ee(),y=(x==null?void 0:x.adultCertificated)||!1,S=x!=null&&x.adultCertificatedYmdt?Y(x.adultCertificatedYmdt):null,f=Y().subtract(3,"month"),C=d&&(y===!1||!S||S.isBefore(f));return t.jsxs(En.StyledLink,{to:n.landingUrl,target:jo(n.browerTargetType),onClick:b=>p(b,n),style:i,children:[t.jsx(yt,{src:n.imageUrl,alt:n.name,isPlaceHolder:!0,style:{objectFit:"cover"}}),n.description&&t.jsx(En.DescriptionText,{$isAnimation:o,style:{...a,color:n.descriptionColor},dangerouslySetInnerHTML:{__html:c}}),n.displayPeriodType==="PERIOD"&&t.jsxs(En.DateText,{$isAnimation:o,style:l,children:[Y(n.displayStartYmdt).format("MM.DD")," -"," ",Y(n.displayEndYmdt).format("MM.DD")]}),d&&C&&t.jsx(En.AdultDimmed,{$isBig:e===0,children:t.jsx(ni,{})})]})},rl=r.section` width: 100%; height: 100%; `,ri=r(_e)` width: 100%; height: 100%; border-radius: 12px; `,il=r.div` position: absolute; right: 16px; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 5px; padding: 5px 10px 4px; background: rgba(255, 255, 255, 0.15); border-radius: 100px; font-size: 1.2rem; color: var(--color-white); .main-swiper-pagination { line-height: 1.5; } `,sl=r(W)` display: flex; align-items: center; `;ri.displayName="SwiperWrapper";const eo={Container:rl,CustomBannerSwiper:ri,CustomPagination:il,PlusIcon:sl},al=e=>s.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.88867 1V8.77778",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.77778 4.88892H1",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})),Io=({bannerList:e,accountNo:n,isTextAnimation:o,bannerSwiperStyle:i,bannerStyle:a,descriptionStyle:l,dateStyle:d})=>{const u=we(),c=s.useRef(null),[p,x]=s.useState(0),y=s.useMemo(()=>({modules:[Js,kn],slidesPerView:1,spaceBetween:20,autoplay:{delay:3e3,disableOnInteraction:!1},pagination:{type:"fraction",el:".main-swiper-pagination",enabled:n===0},passiveListeners:!0,onSlideChange(T){x(T.activeIndex)}}),[n]),S=s.useMemo(()=>e.filter(T=>T.name.includes("adult")),[e]),[f,C]=s.useState(null),w=T=>{var P;C(T),(P=c.current)==null||P.autoplay.stop()},b=()=>{var T;C(null),(T=c.current)==null||T.autoplay.start()},{data:A}=Ee(),g=(A==null?void 0:A.adultCertificated)||!1,E=A!=null&&A.adultCertificatedYmdt?Y(A.adultCertificatedYmdt):null,I=Y().subtract(3,"month"),k=!g||!E||E.isBefore(I),_=T=>{k?w(T):u(T.landingUrl)};return t.jsxs(t.Fragment,{children:[t.jsxs(eo.CustomBannerSwiper,{...y,onSwiper:T=>c.current=T,style:i,children:[e.map((T,P)=>{const j=S.some(M=>M.bannerNo===T.bannerNo);return t.jsx(Le,{children:t.jsx(oi,{accountNo:n,banner:T,isTextAnimation:o?P===p:"none",bannerStyle:a,descriptionStyle:l,dateStyle:d,isAdultBanner:j,onAdultClick:()=>_(T)})},T.bannerNo)}),n===0&&t.jsxs(eo.CustomPagination,{children:[t.jsx("div",{className:"main-swiper-pagination"}),t.jsx(eo.PlusIcon,{to:m.EXHIBITIONS.LIST,children:t.jsx(al,{})})]})]}),t.jsx(zt,{isVisible:!!f,setIsVisible:b,redirectUrl:f==null?void 0:f.landingUrl})]})},cl=r.div` position: fixed; top: 50%; left: calc(50% + 300px + 60px); transform: translateY(-50%); display: flex; flex-direction: column; justify-content: flex-end; gap: 32px; padding: 16px; width: 260px; height: auto; min-height: 104px; max-height: ${({$isEmptyBannerList:e})=>e?"104px":"365px"}; background-color: var(--color-white); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); `,ll=r.section` flex: 1; aspect-ratio: 1/1; overflow: hidden; `,dl=r.section` display: flex; justify-content: space-between; align-items: center; gap: 8px; `,ul=r.div` max-width: 72px; svg { display: block; } `,pl=r.div` display: flex; flex-direction: column; gap: 6px; `,ml=r.strong` font-size: 1.6rem; ${v.bold} word-break: keep-all; line-height: 1.4; `,hl=r.p` font-size: 1.2rem; line-height: 1.25; `,Et={Container:cl,Banner:ll,QRCode:dl,Code:ul,Description:pl,MainText:ml,SubText:hl},Pt={WEB_SITE_BANNER:"013",MAIN_PAGE_BANNER:"003",MAIN_PAGE_ICON_BANNER:"004",PRODUCT_DETAIL_BANNER:"005",SEARCH_PAGE_BANNER:"006",BEST_PAGE_BANNER:"007",PRODCUT_DETAIL_COUPON_BANNER:"008",EXHIBITION_LIST_BANNER:"009",EMPLOYEE_EXHIBITION_LIST_BANNER:"010",ORDER_BANNER:"011",ORDER_COMPLETE_BANNER:"012"},xl={getBannerExtraInfos:e=>h({method:"GET",url:"/display/banners/extraInfos",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getBanners:e=>h({method:"GET",url:`/display/banners/${e}`}),getBannersByIds:e=>h({method:"GET",url:`/display/banners/id/${e}`})},ii={getCategories:e=>h({method:"GET",url:"/categories",params:{keyword:e==null?void 0:e.keyword}}),getNewProductCategories:()=>h({method:"GET",url:"/categories/new-product-categories"}),get1depthCategory:()=>h({method:"GET",url:"/categories/simple-1depth"}),getCategory:e=>h({method:"GET",url:`/categories/${e}`})};var si=(e=>(e.DESC_DELIVERY_FEIGN_CLIENT="DESCDeliveryFeignClient",e.DESC="DESC",e.ASC="ASC",e))(si||{}),ai=(e=>(e[e.Y=0]="Y",e[e.N=1]="N",e))(ai||{}),gl=(e=>(e.DEPOSIT_WAIT="DEPOSIT_WAIT",e.PAY_DONE="PAY_DONE",e.PRODUCT_PREPARE="PRODUCT_PREPARE",e.DELIVERY_PREPARE="DELIVERY_PREPARE",e.DELIVERY_ING="DELIVERY_ING",e.DELIVERY_DONE="DELIVERY_DONE",e.BUY_CONFIRM="BUY_CONFIRM",e.CANCEL_DONE="CANCEL_DONE",e.RETURN_DONE="RETURN_DONE",e.EXCHANGE_DONE="EXCHANGE_DONE",e.PAY_WAIT="PAY_WAIT",e.PAY_CANCEL="PAY_CANCEL",e.PAY_FAIL="PAY_FAIL",e.DELETE="DELETE",e.EXCHANGE_WAIT="EXCHANGE_WAIT",e.REFUND_DONE="REFUND_DONE",e))(gl||{}),fl=(e=>(e.CANCEL="CANCEL",e.RETURN="RETURN",e.EXCHANGE="EXCHANGE",e))(fl||{}),ci=(e=>(e.PRODUCT_COUNT="PRODUCT_COUNT",e.RECENT_PRODUCT="RECENT_PRODUCT",e))(ci||{}),yl=(e=>(e.SELLER_COLLECT="SELLER_COLLECT",e.BUYER_DIRECT_RETURN="BUYER_DIRECT_RETURN",e))(yl||{}),Cl=(e=>(e.BOOK="BOOK",e.RECENT="RECENT",e.RECURRING_PAYMENT="RECURRING_PAYMENT",e))(Cl||{});const li={getCategoryProductReviews:({hasAttachmentFile:e,categoryDepth:n,categoryNo:o,productName:i,orderBy:a,orderDirection:l,brandName:d,bestReviewYn:u,myReviewYn:c=ai.N,pageNumber:p=1,pageSize:x=20,hasTotalCount:y=!1})=>h({method:"GET",url:"/category/product-reviews",params:{hasAttachmentFile:e,categoryDepth:n,categoryNo:o,productName:i,order:{by:a,direction:l},brandName:d,bestReviewYn:u,myReviewYn:c,pageNumber:p,pageSize:x,hasTotalCount:y}}),getReviewBoardConfig:()=>h({method:"GET",url:"/product-reviews/configurations"}),getPhotoReviewList:(e,n)=>h({method:"GET",url:`/products/${e}/photo-reviews`,params:n}),getProductReviewList:(e,n)=>h({method:"GET",url:`/products/${e}/product-reviews`,params:n,paramsSerializer:{serialize:o=>Ge.stringify(o,{arrayFormat:"repeat",allowDots:!0})}}),registerProductReview:(e,n)=>h({method:"POST",url:`/products/${e}/product-reviews`,data:n}),getReviewableOptions:(e,n)=>h({method:"GET",url:`/products/${e}/reviewable-options`,params:n}),getProductReview:(e,n)=>h({method:"GET",url:`/products/${e}/product-reviews/${n}`}),updateProductReview:(e,n,o)=>h({method:"PUT",url:`/products/${e}/product-reviews/${n}`,data:o}),deleteProductReview:(e,n)=>h({method:"DELETE",url:`/products/${e}/product-reviews/${n}`}),getProductReviewComments:(e,n,o)=>h({method:"GET",url:`/products/${e}/product-reviews/${n}/comments`,params:o}),recommendProductReview:(e,n)=>h({method:"POST",url:`/products/${e}/product-reviews/${n}/recommend`}),cancelProductReviewRecommend:(e,n)=>h({method:"DELETE",url:`/products/${e}/product-reviews/${n}/recommend`}),reportProductReview:(e,n,{reportReasonCd:o,content:i})=>h({method:"POST",url:`/products/${e}/product-reviews/${n}/report`,data:{reviewNo:n,reportReasonCd:o,content:i}}),getMyProductReviews:e=>h({method:"GET",url:"/profile/product-reviews",params:e}),getReviewableProducts:e=>h({method:"GET",url:"/profile/order-options/product-reviewable",params:e}),getReviewBoardList:e=>h({method:"GET",url:"/reviews/boards",params:e}),getReviewedProducts:e=>h({method:"GET",url:"/reviews/boards/reviewed-products",params:e})},mn={getEvents:e=>h({method:"GET",url:"/display/events",params:e}),getEventsV2:e=>h({method:"GET",url:"/display/events/",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"repeat",allowDots:!0})},headers:{version:"2.0"}}),getClosedEvents:e=>h({method:"GET",url:"/display/events/close",params:e}),getEventsByProducts:e=>h({method:"GET",url:"/display/events/products",params:e}),searchEventsByName:e=>h({method:"GET",url:"/display/events/search-by-name",params:e}),searchEventsByNos:e=>h({method:"GET",url:"/display/events/search-by-nos",params:e}),searchEventsByProgress:e=>h({method:"GET",url:"/display/events/search-by-name",params:e}),getEvent:(e,n)=>{const o=new Date().getTime();return h({method:"GET",url:`/display/events/${e}`,params:{...n,timestamp:o}})},getEventById:(e,n)=>h({method:"GET",url:`/display/events/ids/${e}`,params:n}),getEventsByProduct:e=>h({method:"GET",url:`/display/events/products/${e}`})},wl={getDesignPopups:({displayUrl:e,parameter:n,popupId:o})=>h({method:"POST",url:"/design-popups",data:{displayUrl:e,parameter:n,popupId:o}}),getAllPopups:(e,n)=>h({method:"GET",url:"/display/popups",params:e,headers:{platform:n}}),getPopups:(e,n)=>h({method:"GET",url:`/display/popups/${e}`,params:n})},_t={getAllProductInquiries:e=>h({method:"GET",url:"/products/inquiries",params:e}),getProductInquiriesConfig:()=>h({method:"GET",url:"/products/inquiries/configurations"}),updateProductInquiry:(e,n)=>h({method:"PUT",url:`/products/inquiries/${e}`,data:n}),deleteProductInquiry:e=>h({method:"DELETE",url:`/products/inquiries/${e}`}),getProductInquiries:(e,n)=>h({method:"GET",url:`/products/${e}/inquiries`,params:n}),writeProductInquiry:(e,n)=>h({method:"POST",url:`/products/${e}/inquiries`,data:n}),reportProductInquiry:(e,n)=>h({method:"POST",url:`/products/${e}/inquiries/report`,data:n}),getProductInquiry:(e,n)=>h({method:"GET",url:`/products/${e}/inquiries/${n}`}),getMyProductInquiries:e=>h({method:"GET",url:"/profile/product-inquiries",params:e}),getMyProductInquiriesCount:e=>h({method:"GET",url:"/profile/product-inquiries/count",params:e})},El={getProductSections:()=>h({method:"GET",url:"/display/sections"}),getProductSection:(e,n)=>h({method:"GET",url:`display/sections/${e}`,params:n,headers:{version:"1.1"}}),getDisplaySection:(e,n)=>h({method:"GET",url:`/display/sections/ids/${e}`,params:n})},jt=({banners:e,memberNo:n=0,options:o})=>fo({queryKey:jn.list(e,n),queryFn:async()=>{const{data:i}=await xl.getBanners(e);return i},staleTime:1e3*60*60,gcTime:1e3*60*60,...o}),bl=()=>{const{data:e}=jt({banners:[Pt.WEB_SITE_BANNER]}),n=s.useMemo(()=>{if(!e||!e[0])return[];try{return e[0].accounts[0].banners}catch{return[]}},[e]),o=X(n);return!o&&t.jsxs(Et.Container,{$isEmptyBannerList:o,children:[t.jsx(Et.Banner,{children:t.jsx(Io,{bannerList:n,isTextAnimation:!0,bannerSwiperStyle:{borderRadius:"6px"},bannerStyle:{borderRadius:"6px"},descriptionStyle:{top:"20px",transform:"translateX(-5.5%)",width:"100%",fontSize:"1.8rem",lineHeight:"140%",letterSpacing:"0px",textAlign:"center"},dateStyle:{top:"72px",bottom:"auto",transform:"translateX(-5.5%)",width:"100%",fontSize:"1.2rem",letterSpacing:"0px",textAlign:"center",color:"#000"}})}),t.jsxs(Et.QRCode,{children:[t.jsx(Et.Code,{children:t.jsx(Xs,{value:"https://napi.happypointcard.com/page/main/index.spc",size:72,level:"L",minVersion:1})}),t.jsxs(Et.Description,{children:[t.jsx(Et.MainText,{children:"해피포인트 앱 설치하고 할인소식 받아보세요!"}),t.jsx(Et.SubText,{children:"QR스캔하고 앱 연결하기"})]})]})]})},Sl=r.div` position: sticky; bottom: 78px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; z-index: 10; transition: 0.3s; opacity: ${({$isScroll:e})=>e?0:1}; visibility: ${({$isScroll:e})=>e?"hidden":"visible"}; `,vl=r.button` position: absolute; right: 20px; border-radius: 50px; height: 44px; box-shadow: 0px 2px 4px 0px #0000001a; `,sr={FloatingBarContainer:Sl,FloatingBarButton:vl},Tl=e=>{const[n,o]=s.useState(!0);return s.useEffect(()=>{const i=()=>{o(window.scrollY<=e)};return window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[e]),{isScrollTop:n}},Al=e=>s.createElement("svg",{width:44,height:44,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:22,cy:22,r:21.5,fill:"white",stroke:"#C2C3C8"}),s.createElement("g",{clipPath:"url(#clip0_8807_39304)"},s.createElement("path",{d:"M22 29L22 15",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16 21L22 15L28 21",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_8807_39304"},s.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(10 34) rotate(-90)"})))),Pl=()=>{const{isScrollTop:e}=Tl(200),n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return t.jsx(sr.FloatingBarContainer,{$isScroll:e,children:t.jsx(sr.FloatingBarButton,{onClick:n,children:t.jsx(Al,{})})})},jl=r.div` display: flex; justify-content: center; background-color: #f9f9f9; `,Il=r.div` width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; /* margin-left: auto; margin-right: auto; */ min-height: calc(var(--vh, 1vh) * 100); ${Eo()}; background-color: #fff; position: relative; `,Ll=r(Je.main)` display: flex; flex-direction: column; background-color: #f2f3f5; overflow-x: hidden; min-height: calc( calc(var(--vh, 1vh) * 100) - calc(var(--footer-bottom) + var(--floating-button)) ); margin-bottom: 48px; `,Nl=r.div` height: var(--header-top); background: #fff; `,kl=r.div` flex: 1; background: #fff; `,Rl=r.div` position: sticky; bottom: 0; left: 0; width: 100%; z-index: 11; `,tn={ContainerWrapper:jl,Container:Il,StyledMotionContainer:Ll,HeaderEmptyContainer:Nl,EmptyContainer:kl,FloatingContainer:Rl},$l=r.div` width: 100vw; `,Ol=r.div` position: fixed; top: 0; left: 0; background-color: #000000; opacity: 0.6; width: 100vw; height: 100vh; z-index: 1001; animation: fadeIn 0.3s ease-in-out; @keyframes fadeIn { from { opacity: 0; } to { opacity: 0.6; } } `,_l=r.div` position: fixed; top: 0; left: 0; z-index: 1002; width: 100vw; height: 100vh; animation: up 0.3s ease-in-out; @keyframes up { from { transform: translateY(100%); } to { transform: translateY(0%); } } `,Ml=r.div` position: fixed; z-index: 1003; width: ${e=>`${e.$screenWidth}${e.$screenWidthUnit}`}; top: ${e=>`${e.$screenTopPosition}${e.$screenTopUnit}`}; left: ${e=>`${e.$screenLeftPosition}${e.$screenLeftUnit}`}; height: ${e=>e.$screenHeightUnit==="px"?`${(e.$screenHeight??0)+72}px`:`calc(${e.$screenHeight??0}${e.$screenHeightUnit} + 72px)`}; transform: ${e=>{const{$screenTopUnit:n,$screenLeftUnit:o,$screenTopPosition:i,$screenLeftPosition:a}=e;if(i&&a&&i>=50&&a>=50)return n==="%"&&o==="%"?"translate(-50%, -50%)":n==="%"?"translate(0, -50%)":o==="%"?"translate(-50%, 0%)":""}}; display: flex; flex-direction: column; `,Bl=r(_e)` width: 100%; height: 100%; overflow-x: hidden; border-radius: 12px 12px 0 0; .swiper-pagination { position: initial; display: flex; justify-content: center; gap: 8px; z-index: 3000; width: 100%; margin-top: 16px; } .swiper-pagination-bullet { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); } .swiper-pagination-bullet-active { width: 16px; border-radius: 100px; background: #ffffff; } `,Dl=r.div` position: absolute; bottom: 0; left: 0; right: 0; z-index: 100; `,Hl=r.div` display: flex; justify-content: space-between; align-items: center; width: 100%; height: 56px; padding: 0 20px; border-radius: 0 0 12px 12px; background-color: #fff; button { display: flex; align-items: flex-start; gap: 4px; font-size: 15px; } `,bt={Container:$l,Dimmed:Ol,PopupListContainer:_l,SwiperContainer:Ml,CustomSwiper:Bl,FooterContainer:Dl,Footer:Hl},Ul=r.div``,Gl=r.div` display: flex; flex-direction: column; overflow: auto; position: relative; background-color: ${e=>e.$bgColor}; `,Fl=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); cursor: pointer; /* backdrop-filter: blur(5px); color: var(--color-white); */ svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${({$isBig:e})=>e?"initial":"48px"}; height: ${({$isBig:e})=>e?"initial":"48px"}; } `,zl=r.div` width: 100%; height: 100%; ${e=>e.$maxHeightAvailable&&re` max-height: ${e.$screenHeightUnit==="px"?`${e.$screenHeight}${e.$screenHeightUnit}`:`${e.$screenHeight}vh`}; `} overflow-y: auto; ${e=>e.$isResizable&&{...bo}} a, p { font-size: 0; height: fit-content; line-height: ${e=>e.$isResizable?"0.9":"normal"}; } img { display: block; width: 100% !important; object-fit: cover; } `,bn={Container:Ul,Body:Gl,AdultDimmed:Fl,ContentsContainer:zl},Vl=({popupData:e})=>{const n=e.detailInfo,o=n.screenHeightUnit==="PIXEL"?"px":"%",[i,a]=s.useState(null),l=s.useRef(null);s.useEffect(()=>{if(!l.current)return;const b=l.current.querySelector("p"),A=l.current.querySelector("img");A&&(A.complete?a((b==null?void 0:b.clientHeight)??0):A.onload=()=>{a((b==null?void 0:b.clientHeight)??0)})},[e.content]);const d=({screenHeight:b,screenHeightUnit:A})=>A==="%"?window.innerHeight*b/100:b,u=e.title.includes("adult"),[c,p]=s.useState(""),{data:x}=Ee(),y=(x==null?void 0:x.adultCertificated)||!1,S=x!=null&&x.adultCertificatedYmdt?Y(x.adultCertificatedYmdt):null,f=Y().subtract(3,"month"),C=u&&(y===!1||!S||S.isBefore(f)),w=()=>{p("")};return t.jsxs(bn.Container,{children:[t.jsxs(bn.Body,{$bgColor:n.bgColor,children:[t.jsx(bn.ContentsContainer,{ref:l,$maxHeightAvailable:(i??0)>d({screenHeight:n.screenHeight,screenHeightUnit:o}),$isResizable:n.resizable,$screenHeight:n.screenHeight,$screenHeightUnit:o,dangerouslySetInnerHTML:{__html:e.content}}),u&&C&&t.jsx(bn.AdultDimmed,{onClick:()=>{if(!l.current)return;const b=l.current.querySelector("a");if(b){const A=b.getAttribute("href");A&&p(A)}},children:t.jsx(ni,{})})]}),t.jsx(zt,{isVisible:!!c,setIsVisible:w,redirectUrl:c})]})},Yl=s.memo(Vl),ql=({params:e,platform:n,options:o})=>ie({queryKey:mo.list(n,e),queryFn:async()=>{const{data:i}=await wl.getAllPopups(e,n);return i},...o}),Wl=e=>s.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M3 9.50009L6.71231 13.2124L14.6673 5.25745",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Kl=e=>s.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.5 5L13.5 14M4.5 14L13.5 5",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Ql=()=>{const e=yo("(max-width: 600px)"),{pathname:n}=Fe(),{productNo:o,categoryNo:i,eventNo:a}=Ft(),l=s.useMemo(()=>e?at()==="PC"?"MOBILE_WEB":at():"PC",[e]),d=s.useMemo(()=>{if(se(m.MAIN,n))return"MAIN";if(se(m.PRODUCT.DETAIL,n))return"PRODUCT";if(se(m.PRODUCT.LIST,n))return"CATEGORY";if(se(m.EXHIBITIONS.DETAIL,n))return"EVENT"},[n]),u=s.useMemo(()=>{if(d==="PRODUCT")return Number(o);if(d==="CATEGORY")return Number(i);if(d==="EVENT")return Number(a)},[d,i,o,a]),[c,p]=Er("POPUP_EXPIRE_DATE",[]);s.useEffect(()=>{p(g=>X(g)?[]:U(g,Qe(E=>E.type!=="CLOSE"),ae))},[]);const x=s.useCallback(g=>{var k,_;const E=(k=so(T=>T.popupNo===g,c))==null?void 0:k.time,I=(_=so(T=>T.popupNo===g,c))==null?void 0:_.type;return I==="CLOSE"?!1:I==="DAY"?Y(E).add(1,"day").set("hour",0).set("minute",0).set("second",0)U(g||[],Qe(E=>x(E.popupNo)),$s(E=>E.detailInfo.screenType==="WINDOW"?"WINDOW":"NOT_WINDOW")),enabled:!!d}}),S=s.useMemo(()=>(y==null?void 0:y.NOT_WINDOW)??[],[y==null?void 0:y.NOT_WINDOW]),f=s.useMemo(()=>{const g=new Map;return S.forEach(E=>{var k;const I=E.popupId.split("-")[0];I&&(g.has(I)||g.set(I,[]),(k=g.get(I))==null||k.push(E))}),Array.from(g.entries()).map(([E,I])=>({prefix:E,items:I}))},[S]),C=(g,E,I)=>{const k=Y().format("YYYY-MM-DDTHH:mm:ss");if(!g)return[{popupNo:E,type:I,time:k}];const _=g.findIndex(T=>T.popupNo===E);return _>=0?g.map((T,P)=>P===_?{...T,type:I,time:k}:T):[...g,{popupNo:E,type:I,time:k}]},w=s.useCallback((g,E)=>{p(I=>C(I,g,E))},[]),b=s.useCallback((g,E)=>{g.forEach(I=>{w(I.popupNo,E)})},[w]),A=s.useCallback(g=>({modules:[kn],slidesPerView:1,slidesPerGroup:1,loop:!0,pagination:{el:".swiper-pagination",clickable:!0,enabled:g>1}}),[]);return As({autoLock:!X(S)}),!X(S)&&t.jsxs(bt.Container,{children:[t.jsx(bt.Dimmed,{}),t.jsx(bt.PopupListContainer,{onClick:()=>b(S,"CLOSE"),children:f.map(({prefix:g,items:E})=>{const I=E[0];return t.jsx(bt.SwiperContainer,{onClick:k=>k.stopPropagation(),$screenType:I.detailInfo.screenType,$screenTopPosition:I.detailInfo.screenTopPosition,$screenLeftPosition:I.detailInfo.screenLeftPosition,$screenTopUnit:I.detailInfo.screenTopUnit==="PIXEL"?"px":"%",$screenLeftUnit:I.detailInfo.screenLeftUnit==="PIXEL"?"px":"%",$screenWidth:I.detailInfo.screenWidth,$screenHeight:I.detailInfo.screenHeight,$screenWidthUnit:I.detailInfo.screenWidthUnit==="PIXEL"?"px":"%",$screenHeightUnit:I.detailInfo.screenHeightUnit==="PIXEL"?"px":"%",children:t.jsxs(bt.CustomSwiper,{...A(E.length),children:[E.map(k=>t.jsx(Le,{children:t.jsx(Yl,{popupData:k})},k.popupNo)),t.jsxs(bt.FooterContainer,{children:[t.jsxs(bt.Footer,{children:[E.some(k=>k.visibleToday)&&t.jsxs("button",{onClick:()=>b(E,"DAY"),children:[t.jsx(Wl,{}),"오늘 하루 보지 않기"]}),t.jsxs("button",{onClick:()=>b(E,"CLOSE"),children:[t.jsx(Kl,{}),"닫기"]})]}),t.jsx("div",{className:"swiper-pagination"})]})]})},g)})})]})},Zl=s.memo(Ql),Xl=()=>{const{isLogin:e}=Pe(),{data:n}=Ee(),o=!0,i=Ps("https://rl3flznkr.toastcdn.net/shopby-statistics-recorder.js",{shouldPreventLoad:!o});s.useEffect(()=>{i==="ready"&&typeof window.shopbyStatistics=="function"&&window.shopbyStatistics({clientId:"X+Ai2NGAWJyC/wapyz1xag==",memberNo:e?n==null?void 0:n.memberNo:""})},[o,e,n==null?void 0:n.memberNo,i])},Jl=()=>{const e=Fe();s.useLayoutEffect(()=>{document.documentElement.scrollTo(0,0)},[e.pathname])},ed=()=>{const e=yo("(min-width: 1024px)"),{pathname:n}=Fe(),{height:o}=js();Xl(),Jl(),s.useEffect(()=>{const w=o*.01;return document.documentElement.style.setProperty("--vh",`${w}px`),()=>{document.documentElement.style.removeProperty("--vh")}},[o]);const i=Fe(),{appLogin:a}=Pe(),l=Jr(),d=Ht(),u=we(),{state:c}=Fe();s.useEffect(()=>{const w=()=>{n===m.ORDER.ORDER_COMPLETE?u(m.MY_PAGE.ORDERS.LIST,{replace:!0,state:{from:n}}):n===m.MY_PAGE.ORDERS.LIST&&(c==null?void 0:c.from)===m.ORDER.ORDER_COMPLETE?u(m.MAIN,{replace:!0}):u(-1)};window.pageback=w},[n,c,u]),s.useEffect(()=>{if(!K){l(Xn(!0));return}(async()=>{try{await a(),l(Xn(!0)),d.invalidateQueries({queryKey:He.getProfile()})}catch(b){console.error("앱 초기화 실패",b),l(Xn(!0))}})()},[]);const x=new et().get("wHmAut"),y=ee.getAccessToken();s.useEffect(()=>{var w;x||y!=null&&y.wHmAut&&Fr("wHmAut",y.wHmAut,((w=ee.getAccessToken())==null?void 0:w.expiry)||0)},[x,y]),s.useEffect(()=>{var w;(w=window.ShopbyExternalScript)==null||w.initialize({apiOption:{clientId:"X+Ai2NGAWJyC/wapyz1xag==",profile:"real",platform:at()}})},[]),s.useEffect(()=>{var b;const w=dc(i);return(b=window.ShopbyExternalScript)==null||b.setPageScriptType(w),()=>{var A;(A=window.ShopbyExternalScript)==null||A.clearGlobalObjectSb()}},[i]);const S=$r(),{data:f}=Ee();s.useEffect(()=>{var w;S&&!f||(w=window.ShopbyExternalScript)==null||w.setGlobalObjectSb({profile:f||null,getPlatform:at})},[f,i,S]),s.useEffect(()=>{function w(b){var A;((A=b.data)==null?void 0:A.type)==="NICE_AUTH_FAIL"&&(alert(b.data.message),window.location.href="/")}return window.addEventListener("message",w),()=>{window.removeEventListener("message",w)}},[]);const C=i.pathname===m.MAIN;return t.jsxs(tn.ContainerWrapper,{children:[t.jsxs(tn.Container,{children:[t.jsx(de,{errorFallback:()=>t.jsx(t.Fragment,{}),children:t.jsx(Zl,{})}),t.jsx(Qc,{}),t.jsxs(tn.StyledMotionContainer,{className:"main-layout",animate:{opacity:[0,1]},transition:{type:"tween"},exit:{opacity:[1,0]},children:[t.jsx(Co,{mode:"wait"}),t.jsx(Zc,{},i.pathname),t.jsx(tn.EmptyContainer,{})]},n),t.jsx(tn.FloatingContainer,{id:"floatingButton"}),t.jsx(yc,{}),t.jsx(Pl,{})]}),e&&C&&t.jsx(de,{errorFallback:()=>t.jsx(t.Fragment,{}),children:t.jsx(bl,{})})]})},di={color:{main:"#FF5F00",sub:"#0D0F71",black:"#000",white:"#FFFFFF",textPrimary:"#3A3A3F",textSecondary:"#1E1E22",textDarkGray:"#59595F",textGray:"#84858A",textLightGray:"#C2C3C8",highLight:"#FF5F00"}},td={color:{main:"#FF5F00",sub:"#0D0F71",black:"#000",white:"#FFFFFF",textPrimary:"#3A3A3F",textSecondary:"#1E1E22",textDarkGray:"#59595F",textGray:"#84858A",textLightGray:"#C2C3C8",highLight:"#FF5F00"}},it={color:di.color},nd=r.div` width: 100%; height: 48px; position: relative; > button { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); animation: ${pn} 0.2s ease-in-out; line-height: 0; } `,od=r.input` width: 100%; height: 100%; border-radius: 8px; border: 1px solid #e9eaef; transition: border 0.2s ease-in-out; padding: 0 46px 0 16px; &:focus { border: 1px solid #000; } &::placeholder { color: #b3b4b9; font-size: 1.5rem; } `,rd=r.div` display: flex; flex-direction: column; gap: 8px; `,id=r.div` display: ${({$gridRatio:e})=>X(e)?"flex":"grid"}; flex-direction: ${({$isFlex:e})=>e?"row":"column"}; gap: 8px; width: 100%; grid-template-columns: ${({$gridRatio:e})=>X(e)?"none":`${e==null?void 0:e.join("fr ")}fr`}; `,sd=r.input` width: 100%; height: 42px; padding: 10px 16px; border-radius: 6px; background: ${it.white}; border: 1px solid ${it.textLightGray}; font-size: 1.4rem; &::placeholder { color: ${it.darkGray}; } &:read-only { background-color: ${it.lightGray}; pointer-events: none; } &:disabled { background-color: ${it.lightGray}; pointer-events: none; cursor: not-allowed; } `,ad=r.textarea` width: 100%; padding: 12px 16px; border-radius: 6px; background: ${it.white}; border: 1px solid ${it.textLightGray}; resize: none; font-size: 1.4rem; &::placeholder { color: ${it.textDarkGray}; } &:read-only { background-color: ${it.textLightGray}; pointer-events: none; } &:focus { outline: none; } `,ar={InputWrapper:nd,Input:od,Container:rd,FieldContainer:id,Field:sd,TextArea:ad},cd=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:9,cy:9,r:9,fill:"#D9D9D9"}),s.createElement("path",{d:"M12 6L6 12M12 12L6 6.00001",stroke:"white",strokeWidth:1.5,strokeLinecap:"round"})),cr=({register:e,setValue:n,onReset:o,wrapperStyle:i,...a})=>{const[l,d]=s.useState(!1),[u,c]=s.useState(!1),p=()=>{if(n&&(e!=null&&e.name)){n(e.name,""),c(!1);return}if(o){o(),c(!1);return}};return t.jsxs(ar.InputWrapper,{style:i,children:[t.jsx(ar.Input,{...e,...a,onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:x=>{const{onChange:y}=a,S=e==null?void 0:e.onChange;if(S){S(x),c(x.target.value.length>0);return}if(y){y(x),c(x.target.value.length>0);return}}}),(n||o)&&l&&u&&t.jsx("button",{type:"button",tabIndex:-1,onMouseDown:x=>x.preventDefault(),onClick:p,children:t.jsx(cd,{})})]})},ui=r.button` width: 100%; height: 52px; background: #0d0f71; color: var(--color-white); border: 0; border-radius: 8px; font-size: 1.6rem; ${v.medium} transition: all 0.2s ease-in-out; &:disabled { background: ${({$isLoading:e})=>e?"#0d0f71":"#e9eaef"}; color: ${({$isLoading:e})=>e?"var(--color-white)":"#b3b4b9"}; opacity: ${({$isLoading:e})=>e?"0.8":"1"}; cursor: not-allowed; } `,ld=r(ui)` background: var(--color-white); color: #0d0f71; border: 1px solid #0d0f71; &:disabled { background: var(--color-white); color: ${({$isLoading:e})=>e?"#0d0f71":"#b3b4b9"}; opacity: ${({$isLoading:e})=>e?"0.5":"1"}; border: ${({$isLoading:e})=>e?"1px solid #0d0f71":"1px solid #e9eaef"}; } `,lr={Button:ui,OutLineButton:ld},pi=({isOutLine:e,isLoadingDisabled:n,children:o,...i})=>e?t.jsx(lr.OutLineButton,{...i,disabled:i.disabled||!!n,$isLoading:!!n,children:o}):t.jsx(lr.Button,{...i,disabled:i.disabled||!!n,$isLoading:!!n,children:o}),dd=e=>n=>{const o=$r(),{state:i}=Fe(),a=we();return s.useEffect(()=>{if(o){a(m.MAIN);return}},[o,a]),!o||i!=null&&i.isRegisterCompleted?t.jsx(e,{...n}):t.jsx(Ys,{to:{pathname:m.MAIN}})},ud=s.forwardRef((e,n)=>{const o=s.useRef(null),i=l=>{e.state.token!=""&&e.state.token!=null||e.dispatch({...e.state,token:l,isLoading:!1})};s.useImperativeHandle(n,()=>({handleReset:a}));const a=()=>{var l;(l=o.current)==null||l.reset()};return t.jsx("div",{children:t.jsx(na,{style:{textAlign:"center"},ref:o,siteKey:"0x4AAAAAAAzuykZtN5K12w6l",onSuccess:i,onExpire:a})})}),mi=s.memo(ud,(e,n)=>e.state.token===n.state.token&&e.state.isLoading===n.state.isLoading);mi.displayName="MemoizedTurnstileComponent";const pd=r.section` padding: 24px 20px 165px; display: flex; flex-direction: column; gap: 60px; background: #fff; `,md=r.div` display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; `,hd=r.div` display: flex; justify-content: center; gap: 17px; > a { font-size: 1.4rem; color: var(--color-textPrimary); ${v.medium}; position: relative; &:not(&:last-child) { &:after { content: ''; display: block; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 1px; height: 65%; background: #e9eaef; } } } `,xd=r.p` color: #ff5f00; font-size: 1.2rem; margin-left: 5px; `,gd=r.p` font-size: 1.4rem; color: var(--color-textPrimary); `,fd=r(W)` ${z}; width: 100%; border: 1px solid #0d0f71; border-radius: 8px; padding: 15.5px 0; font-size: 1.6rem; ${v.medium}; color: #0d0f71; `,yd=r.form` display: flex; flex-direction: column; gap: 20px; h3 { text-align: center; font-size: 1.6rem; ${v.bold}; color: var(--color-textPrimary); } `,Cd=r(pi)` border: 1px solid #0d0f71; border-end-end-radius: 8px; `,nn={Container:pd,InputContainer:md,LinkContainer:hd,ErrorText:xd,LabelText:gd,GuestOrderLink:fd,GuestLoginForm:yd,GuestLoginButton:Cd},wd=[{title:"아이디 찾기",url:sn.FIND_ID},{title:"비밀번호 찾기",url:sn.CHANGE_PASSWORD},{title:"회원가입",url:sn.JOIN}],Ed=dd(()=>{const{register:e,handleSubmit:n,setValue:o,watch:i,formState:{errors:a}}=Ar(),l=i("memberId")&&i("password"),{login:d}=Pe(),[u]=vt(),c=decodeURIComponent(u.get("returnUrl")||""),p=we(),[x,y]=s.useState(!1),[S,f]=s.useState({isLoading:!0,token:""}),C=s.useCallback(A=>{f(A)},[]),w=s.useRef(null),b=n(async({memberId:A,password:g})=>{try{y(!0);const{data:E}=await d({id:A,pwd:g,turnstileToken:S.token});E.success&&(y(!1),p(c||m.MAIN))}catch(E){E==="8008"&&w.current&&w.current.handleReset(),y(!1),console.error(E)}});return t.jsxs(nn.Container,{children:[t.jsxs("div",{children:[t.jsxs("form",{onSubmit:b,children:[t.jsxs(nn.InputContainer,{children:[t.jsx(cr,{placeholder:"아이디",register:e("memberId",{required:"아이디를 입력해주세요."}),setValue:o}),t.jsx(rn,{errors:a,name:"memberId",render:({message:A})=>t.jsx(nn.ErrorText,{children:A})}),t.jsx(cr,{placeholder:"비밀번호를 입력해주세요.",type:"password",register:e("password",{required:"비밀번호를 입력해주세요."}),setValue:o}),t.jsx(rn,{errors:a,name:"password",render:({message:A})=>t.jsx(nn.ErrorText,{children:A})})]}),t.jsx(pi,{type:"submit",style:{marginTop:"22px",marginBottom:"16px"},isLoadingDisabled:x&&!S.isLoading,disabled:!l,children:"로그인"})]}),t.jsx(nn.LinkContainer,{children:wd.map(A=>t.jsx(W,{to:A.url,target:"_blank",children:A.title},A.title))})]}),t.jsx(mi,{state:S,dispatch:C,ref:w})]})}),bd=r.div` box-sizing: border-box; width: 40px; height: 40px; border: 4px solid var(--color-textLightGray); border-top-color: #0d0f71; border-radius: 50%; animation: ${zr} 1s linear infinite; `,Sd={Spinner:bd},Lo=()=>t.jsx(Sd.Spinner,{}),vd=r.div` margin-top: ${e=>e.$isList?"0":"2px"}; > p { display: ${e=>e.$isList?"inline-block":"block"}; margin-right: ${e=>e.$isList?"5px":"0"}; line-height: 1.3; } `,Td=r.div` display: flex; align-items: center; gap: 2px; flex-wrap: wrap; p, span { line-height: 1.2; } > div { flex: 1; display: flex; align-items: center; gap: 2px; } `,Ad=r.p` font-size: 1.2rem; ${v.medium} color: var(--color-highlight); `,Pd=r.p` font-size: 1.2rem; ${v.medium} color: var(--color-highlight); `,jd=r.p` font-size: 1.2rem; text-decoration: line-through; ${({$isWish:e})=>e&&re` ${v.medium} `} color: var(--color-textLightGray); `,Id=r.div` /* display: flex; align-items: center; gap: ${({$isOverMillion:e,$isWish:n})=>e?"3px":n?"4px":"5px"}; */ font-size: ${({$isOverMillion:e,$isSmallCard:n})=>e?"1.3rem":n?"1.4rem":"1.5rem"}; ${v.bold} line-height: ${({$isSmallCard:e})=>e?"1.2":"1.3"}; ${({$isWish:e})=>e&&re` display: flex; align-items: center; gap: 4px; & > span:first-child { ${v.medium}; color: var(--color-highlight); } `} `,Ld=r.span` font-size: 1.2rem; ${v.medium}/* color: var(--color-highlight); */ `,Nd=r.span` vertical-align: middle; ${({$isExecutive:e})=>e&&re` text-decoration: line-through; `} `,V={PriceBox:vd,PriceText:Td,CouponText:Ad,ExecutivesText:Pd,OriginPrice:jd,Price:Id,DiscountRate:Ld,ProductPrice:Nd},kd=new Set([128823260]),Rd=new Set([]),hi=e=>kd.has(e),xi=e=>Rd.has(e),gi=30,fi={getUserCoupons:e=>h({method:"GET",url:"/coupons",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getIssuableCoupons:()=>h({method:"GET",url:"/coupons/issuable"}),getCouponSummary:e=>h({method:"GET",url:"/coupons/summary",params:e}),issueCouponByPromotionCode:e=>h({method:"POST",url:`coupons/register-code/${e}`}),issueCoupon:(e,n)=>h({method:"POST",url:`/coupons/${e}/download`,data:n}),getExcludeTargetsByCouponNumber:(e,n)=>h({method:"GET",url:`/coupons/${e}/exclude-targets`,params:n}),getCouponTargets:(e,n)=>h({method:"GET",url:`/coupons/${e}/targets`,params:n}),issueEventCoupons:e=>h({method:"POST",url:`/coupons/events/${e}/download`}),issueProductCoupons:(e,n)=>h({method:"POST",url:`/coupons/products/${e}/download`,data:n}),getIssuableCouponsByProductNo:(e,n)=>h({method:"GET",url:`/coupons/products/${e}/issuable/coupons`,params:n})},No=({searchParams:e,memberNo:n=0,options:o})=>ie({queryKey:qe.list(e,n),queryFn:async()=>{const{data:i}=await fi.getUserCoupons(e);return i},enabled:n!==0,...o}),ko=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>ie({queryKey:qe.listByProductNo(e,n,o),queryFn:async()=>{const{data:a}=await fi.getIssuableCouponsByProductNo(e,o);return a},...i}),yi={isEmployee:e=>$e({method:"POST",url:"/member/common/employee",data:e}),isEmployeeDiscount:(e,n)=>$e({method:"POST",url:"/order/common/emp/use-available",data:{...e,hmAut:e.hmAut,userAgent:e.userAgent||""},headers:{Authorization:n}})},Ro=({data:e,options:n}={})=>{const{isLogin:o}=Pe(),i=ee.getAccessToken();return ie({queryKey:He.getEmployee(e),queryFn:async()=>{const{data:a}=await yi.isEmployee(e);return a},...n,enabled:o&&(i==null?void 0:i.isEmployee)})},Ci=({data:e,options:n}={})=>{const{isLogin:o}=Pe(),i=ee.getAccessToken(),a=new et,l=a.get("hm_aut"),d=a.get("wHmAut"),u=K?decodeURIComponent(l)||"undefined":d||"",c=K?window.navigator.userAgent:"";return ie({queryKey:He.getEmployeeDiscount(e),queryFn:async()=>{const p={hmAut:u,userAgent:c},{data:x}=await yi.isEmployeeDiscount(p,i==null?void 0:i.accessToken);return x},...n,enabled:o&&(i==null?void 0:i.isEmployee)})},Vt={getBundleProducts:({deliveryTemplateNo:e,hasOptionValues:n=!1,pageSize:o=30,pageNumber:i=1,productSort:a={criterion:ci.RECENT_PRODUCT,direction:si.DESC_DELIVERY_FEIGN_CLIENT}})=>h({method:"GET",url:"/products/bundle-shipping",params:{deliveryTemplateNo:e,hasOptionValues:n,pageSize:o,pageNumber:i,"productSort.criterion":a==null?void 0:a.criterion,"productSort.direction":a==null?void 0:a.direction}}),getProductExtraInfo:e=>h({method:"GET",url:"/products/extraInfo",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getFavoriteKeywords:e=>h({method:"GET",url:"/products/favoriteKeywords",params:e}),getGroupManagementCodes:e=>h({method:"POST",url:"/products/group-management-code",data:e}),getProductOptions:e=>h({method:"GET",url:"/products/options",params:{productNos:e},paramsSerializer:n=>Ge.stringify(n,{arrayFormat:"comma"})}),getRegularDeliveryProducts:e=>h({method:"GET",url:"/products/regular-delivery",params:e}),requestRestockNotification:({optionNos:e,privacyInfoAgreement:n=!1,name:o,phone:i})=>h({method:"POST",url:"/products/restock",data:{optionNos:e,privacyInfoAgreement:n,name:o,phone:i}}),searchProducts:e=>{var n,o,i,a,l,d,u,c,p,x,y,S,f,C,w,b,A,g,E;return h({method:"GET",url:"/products/search",params:{"filter.discountedPrices":(n=e.filter)==null?void 0:n.discountedPrices,"filter.keywords":(o=e.filter)==null?void 0:o.keywords,"filter.keywordInResult":(i=e.filter)==null?void 0:i.keywordInResult,"filter.discountedComparison":(a=e.filter)==null?void 0:a.discountedComparison,"filter.deliveryConditionType":(l=e.filter)==null?void 0:l.deliveryConditionType,"filter.saleStatus":(d=e.filter)==null?void 0:d.saleStatus,"filter.soldout":(u=e.filter)==null?void 0:u.soldout,"filter.totalReviewCount":(c=e.filter)==null?void 0:c.totalReviewCount,"filter.familyMalls":(p=e.filter)==null?void 0:p.familyMalls,"filter.productManagementCd":(x=e.filter)==null?void 0:x.productManagementCd,"filter.excludeMallProductNo":(y=e.filter)==null?void 0:y.excludeMallProductNo,"filter.includeMallProductNo":(S=e.filter)==null?void 0:S.includeMallProductNo,"filter.customProperties.propValueNos":(C=(f=e.filter)==null?void 0:f.customProperties)==null?void 0:C.propValueNos,"filter.customProperties.propNos":(b=(w=e.filter)==null?void 0:w.customProperties)==null?void 0:b.propNos,"order.by":(A=e.order)==null?void 0:A.by,"order.direction":(g=e.order)==null?void 0:g.direction,"order.soldoutPlaceEnd":(E=e.order)==null?void 0:E.soldoutPlaceEnd,categoryNos:e.categoryNos,brandNos:e.brandNos,partnerNo:e.partnerNo,clientKey:e.clientKey,pageNumber:e.pageNumber,pageSize:e.pageSize,onlySaleProduct:e.onlySaleProduct,hasMaxCouponAmt:e.hasMaxCouponAmt,hasTotalCount:e.hasTotalCount,hasOptionValues:e.hasOptionValues,includeSummaryInfo:e.includeSummaryInfo,shippingAreaType:e.shippingAreaType}})},getProductsInfoByProductNos:e=>h({method:"POST",url:"/products/search-by-nos",data:e}),getProductDetail:(e,n)=>h({method:"GET",url:`/products/${e}`,params:n}),getBestReviewProducts:e=>h({method:"GET",url:"/products/best-review/search",params:e,paramsSerializer:n=>Ge.stringify(n,{arrayFormat:"comma"})}),getBestSellerProducts:({filter:e={familyMalls:!1},categoryNos:n,clientKey:o,pageNumber:i,pageSize:a,hasTotalCount:l=!1,hasOptionValues:d=!1})=>h({method:"GET",url:"/products/best-seller/search",params:{"filter.familyMalls":e.familyMalls,categoryNos:n,clientKey:o,pageNumber:i,pageSize:a,hasTotalCount:l,hasOptionValues:d}}),getKeywordsByProductNo:e=>h({method:"GET",url:"/products/search/keywords",params:e,paramsSerializer:n=>Ge.stringify(n,{arrayFormat:"comma"})}),getProductSearchSummary:e=>h({method:"GET",url:"/products/search/summary",params:e}),getProductDisplayCategories:e=>h({method:"GET",url:`/products/${e}/display-categories`}),getProductOption:(e,n)=>h({method:"GET",url:`/products/${e}/options`,params:n}),getPriorityPurchasableRight:e=>h({method:"GET",url:`/products/${e}/purchasable`}),getRelatedProducts:e=>h({method:"GET",url:`/products/${e}/related-products`}),getShortUrl:e=>h({method:"GET",url:`/products/${e}/url-shortening`}),getProductOptionImages:e=>h({method:"GET",url:`/products/${e}/options/images`}),getOptionImages:(e,n)=>h({method:"GET",url:`/products/${e}/options/${n}/images`})},$d={getGuestRecentViewProducts:e=>h({method:"GET",url:"/guest/recent-products",params:e,paramsSerializer:{serialize:n=>Ge.stringify(n,{arrayFormat:"comma"})}}),getLikeProducts:e=>h({method:"GET",url:"/profile/like-products",params:e}),updateProductsLikeOld:e=>h({method:"POST",url:"/profile/like-products",data:e}),updateProductsLike:e=>h({method:"POST",url:"/profile/like-products",data:e,headers:{version:"1.1"}}),getRecentViewProducts:e=>h({method:"GET",url:"/profile/recent-products",params:e}),registerRecentViewProduct:e=>h({method:"POST",url:"/profile/recent-products",data:e}),deleteRecentViewProducts:e=>h({method:"DELETE",url:"/profile/recent-products",params:e}),getLikeProductsCount:()=>h({method:"GET",url:"/profile/like-products/count"})},$o=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>ie({queryKey:fe.detail(e,n,o),queryFn:async()=>{const{data:a}=await Vt.getProductDetail(e,o);return a},enabled:!!e,...i}),Od=({searchParams:e,memberNo:n=0,options:o})=>fo({queryKey:fe.list(n,e),queryFn:async()=>{const{data:i}=await Vt.searchProducts(e);return i},placeholderData:Oe,...o}),_d=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>ie({queryKey:fe.option(e,n,o),queryFn:async()=>{const{data:a}=await Vt.getProductOption(e,o);return a},enabled:e!==0,...i}),ue=(e,n={symbol:"원",precision:0,pattern:"#!",negativePattern:"- #!"})=>Bt(e,{...n}),Dy=e=>Bt(e,{symbol:"P",precision:0,pattern:"# !"}),Hy=e=>Bt(e,{symbol:"%",precision:0,pattern:"#!"}),Uy=e=>ue(e).multiply(-1).format({pattern:"",negativePattern:"(+#!)"}),Md=gi/100,Oo=({productNo:e=0,...n}={})=>{const{data:o}=$o({productNo:e,options:{enabled:e!==0}}),i=ue((o==null?void 0:o.price.salePrice)??n.salePrice??0),a=ue((o==null?void 0:o.price.immediateDiscountAmt)??n.immediateDiscountAmt??0),l=ue((o==null?void 0:o.price.additionDiscountAmt)??n.additionDiscountAmt??0),d=ue((o==null?void 0:o.price.couponDiscountAmt)??n.couponDiscountAmt??0),u=ue(i).subtract(a).subtract(l).subtract(d).multiply(Md),c=u.subtract(u.value%10),p=i.subtract(a),x=p.subtract(l).subtract(d),y=x.subtract(c),S=s.useMemo(()=>{const w=Bt(p,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(x).multiply(100).divide(p);return w.intValue===0||isNaN(w.intValue)||!isFinite(w.intValue)?"":w.format()},[x,p]),f=s.useMemo(()=>{const w=Bt(i,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(p).multiply(100).divide(i);return w.intValue===0||isNaN(w.intValue)||!isFinite(w.intValue)?"":w.format()},[p,i]),C=s.useMemo(()=>{const w=Bt(i,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(y).multiply(100).divide(i);return w.intValue===0||isNaN(w.intValue)||!isFinite(w.intValue)?"":w.format()},[i,y]);return{productSalePrice:i,immediateDiscountAmt:a,additionalDiscountAmt:l,couponDiscountAmt:d,employeeDiscountAmt:c,salePrice:p,benefitPrice:x,employeeBenefitPrice:y,discountRate:S,saleDiscountRate:f,employeeDiscountRate:C}},wi=({isEmployee:e,errorCode:n,pointUsageAllowedStatus:o,partnerNo:i,partnerNoSet:a})=>!e||n!=="0000"||o==="0"?!1:o==="1"?!0:o==="2"&&i&&a?(Array.isArray(i)?i:[i]).every(d=>a.includes(d)):!1,Bd=({products:e})=>{var Ve,tt,wt;const n=ee.getAccessToken(),o=!!(n!=null&&n.isEmployee),i=new et,a=i.get("hm_aut"),l=i.get("wHmAut"),d=K?decodeURIComponent(a)||"undefined":l||"",{data:u,isLoading:c}=Ro({data:{hmAut:d,userAgent:navigator.userAgent}}),{data:p}=Ee(),{data:x}=ko({productNo:e.productNo}),y=U(x,Q=>Q==null?void 0:Q.some(ye=>ye.downloadable),Q=>Q||!1),{data:S}=No({memberNo:(p==null?void 0:p.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(p!=null&&p.memberNo)}}),f=U((S==null?void 0:S.items)||[],Q=>Q.some(ye=>x&&x.length>0&&x.some(ce=>ce.couponNo===ye.couponNo))),C=x&&x.length>0,w=y||C&&f,b=s.useMemo(()=>{if(!x||x.length===0)return e.couponDiscountAmt;const Q=x.find(be=>{var xe;return(xe=S==null?void 0:S.items)==null?void 0:xe.some(R=>R.couponNo===be.couponNo)});if(!Q)return e.couponDiscountAmt;const{discountInfo:ye}=Q,{discountRate:ce,discountAmt:Wt,maxDiscountAmt:It,fixedAmt:Kt}=ye;if(Kt)return Wt||0;{const xe=(e.salePrice-(e.immediateDiscountAmt||0))*(ce||0)/100;return Math.min(xe,It)}},[x,S,e.salePrice,e.immediateDiscountAmt,e.couponDiscountAmt]),A=Oo({salePrice:e.salePrice,immediateDiscountAmt:e.immediateDiscountAmt,additionDiscountAmt:e.additionDiscountAmt,couponDiscountAmt:e.couponDiscountAmt}),g=xi(e.productNo),E=g?A.productSalePrice:A.salePrice,I=s.useMemo(()=>e.salePrice-(e.immediateDiscountAmt||0)-(e.additionDiscountAmt||0)-b,[e.salePrice,e.immediateDiscountAmt,e.additionDiscountAmt,b]),k=b>0,{data:_,isLoading:T}=Ci({data:{hmAut:(n==null?void 0:n.hmAut)||"",userAgent:navigator.userAgent}}),P=wi({isEmployee:o,errorCode:((Ve=_==null?void 0:_.data)==null?void 0:Ve.errorCode)||"",pointUsageAllowedStatus:((tt=_==null?void 0:_.data)==null?void 0:tt.pointUsageAllowedStatus)||"0",partnerNo:e.partnerNo?String(e.partnerNo):void 0,partnerNoSet:Array.from(((wt=_==null?void 0:_.data)==null?void 0:wt.partnerNoSet)||[])}),j=(u==null?void 0:u.data.remainEmployeePoint)||0,M=s.useMemo(()=>{const Q=I,ye=Q*.3,ce=j>=ye?Q*.7:Q-j;return Math.round(ce/10)*10},[j,I]),$=ue(M),F=s.useMemo(()=>{if(!o)return null;const Q=A.salePrice.value,ce=Math.round((Q-M)/Q*100);return ue(ce)},[M,o,A.salePrice.value]),pe=s.useMemo(()=>{if(!w||b<=0)return null;const Q=e.salePrice-(e.immediateDiscountAmt||0),ye=b/Q*100;return Math.round(ye)},[w,b,e.salePrice,e.immediateDiscountAmt]),me=w?pe?`${pe}%`:A.discountRate:A.saleDiscountRate,ct=w?ue(I):A.salePrice;return{price:A,isCouponExist:k,isCouponPriceVisible:w,productPrice:ct,productDiscountRate:me,displayBasePrice:E,shouldDisplayOriginalPrice:g,isEmployeeDataLoading:c||T,isEmployeeDiscount:P,finalPrice:$,employeeDiscountRate:F}},Ei=({products:e,isWish:n})=>{const{isCouponExist:o,isCouponPriceVisible:i,productPrice:a,productDiscountRate:l,displayBasePrice:d,shouldDisplayOriginalPrice:u,isEmployeeDataLoading:c,isEmployeeDiscount:p,finalPrice:x,employeeDiscountRate:y}=Bd({products:e,isWish:n});return t.jsx(V.PriceBox,{$isList:e.isListCard,children:!c&&p&&!hi(e.productNo)?n?t.jsxs(V.Price,{$isWish:n,children:[t.jsx(V.DiscountRate,{children:y==null?void 0:y.format({pattern:"#%"})}),t.jsx(V.ProductPrice,{children:x.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsxs(V.PriceText,{children:[t.jsx(V.ExecutivesText,{children:"임직원 할인가"}),t.jsxs("div",{children:[t.jsx(V.DiscountRate,{children:y==null?void 0:y.format({pattern:"#%"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]})]}),t.jsx(V.Price,{$isWish:n,children:t.jsx(V.ProductPrice,{children:x.format({negativePattern:"0!"})})})]}):o&&i?n?t.jsxs(V.Price,{$isWish:n,children:[l&&t.jsx(V.DiscountRate,{children:l}),t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsxs(V.PriceText,{children:[t.jsx(V.CouponText,{children:"쿠폰할인가"}),t.jsxs("div",{children:[l&&t.jsx(V.DiscountRate,{children:l}),t.jsx(V.OriginPrice,{children:d.format()})]})]}),t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})]}):u&&d.value!==a.value?n?t.jsxs(V.Price,{$isWish:n,children:[t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsx(V.PriceText,{children:t.jsx(V.OriginPrice,{children:d.format()})}),t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})]}):t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})})},Dd=r.div` > a { display: flex; flex-direction: ${e=>e.$isList?"row":"column"}; gap: 8px; } `,Hd=r.div` flex-shrink: 0; position: relative; width: ${e=>e.$isList?"144px":"100%"}; max-width: ${e=>e.$isList?"144px":"100%"}; border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; img { width: 100%; object-fit: cover; } `,Ud=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.16); backdrop-filter: blur(5px); color: var(--color-white); svg { position: absolute; top: 8px; right: 8px; } `,Gd=r.p` font-size: 1.6rem; ${v.bold} word-break: keep-all; `,Fd=r.div` position: absolute; top: 6px; left: 6px; display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; background: ${e=>e.$isHighlight?"var(--color-highlight)":"var(--color-textPrimary)"}; border-radius: 4px; font-size: 1.4rem; color: var(--color-white); opacity: 0.9; `,zd=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); `,Vd=r.p` font-size: 2.2rem; ${v.medium} text-align: center; word-break: keep-all; line-height: 1; color: var(--color-white); `,Yd=r.div` display: flex; flex-direction: column; gap: 6px; flex: ${e=>e.$isList?"1":"initial"}; padding: ${e=>e.$isList?"4px 0":"0"}; `,qd=r.div``,Wd=r.p``,Kd=r.p` font-size: 1.5rem; line-height: 1.3; ${wo(2)} color: var(--color-textPrimary); `,Qd=r.div` display: flex; align-items: center; gap: 4px; line-height: 1.4; color: var(--color-textDarkGray); font-size: 0.9rem; @media (min-width: 316px) and (max-width: 340px) { & { font-size: 1rem; } } @media (min-width: 341px) and (max-width: 365px) { & { font-size: 1.1rem; } } @media (min-width: 366px) { & { font-size: 1.2rem; } } `,Zd=r.div` > span { line-height: 1.1; } ${z}; gap: 2px; `,Xd=r.span` display: inline-block; width: 2px; height: 2px; background: var(--color-textDarkGray); border-radius: 50%; `,Jd=r.span``,eu=r.div` display: flex; align-items: center; gap: 4px; `,tu=r.span` > span { color: #007afb; } `,Ce={Container:Dd,Thumbnail:Hd,AdultDimmed:Ud,AdultText:Gd,Rank:Fd,SoldOutDimmed:zd,SoldOutText:Vd,Info:Yd,NameBox:qd,BrandName:Wd,ProductName:Kd,AddInfoBox:Qd,ReviewCountContainer:Zd,DeliveryType:Jd,BorderBox:Xd,AccumulationContainer:eu,MaxAccumulationText:tu},bi=e=>s.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:11,cy:11,r:10.3,stroke:"white",strokeWidth:1.4}),s.createElement("path",{d:"M14.1743 5.5C14.8688 5.5 15.5086 5.65699 16.0938 5.97096C16.6837 6.28018 17.1642 6.80347 17.5352 7.54084C17.911 8.27344 18.0989 9.23915 18.0989 10.438C18.0989 11.632 17.9348 12.6548 17.6066 13.5064C17.2783 14.3579 16.8097 15.0073 16.2008 15.4544C15.5967 15.8968 14.8831 16.1181 14.0601 16.1181C13.4369 16.1181 12.8755 15.9991 12.376 15.7613C11.8813 15.5186 11.4769 15.1809 11.163 14.748C10.8537 14.3151 10.6587 13.8203 10.5778 13.2637H12.1334C12.2428 13.7109 12.464 14.0701 12.797 14.3412C13.1301 14.6076 13.5511 14.7432 14.0601 14.748C14.5881 14.748 15.0401 14.6005 15.4159 14.3056C15.7965 14.0059 16.0866 13.5753 16.2864 13.014C16.491 12.4526 16.5957 11.7795 16.6004 10.9946H16.472C16.1913 11.4322 15.8179 11.7747 15.3517 12.0221C14.8902 12.2695 14.3836 12.3932 13.8317 12.3932C13.2181 12.3932 12.6567 12.2481 12.1477 11.9579C11.6387 11.6629 11.2343 11.2586 10.9346 10.7448C10.6397 10.2263 10.4922 9.64352 10.4922 8.99654C10.4922 8.3448 10.6444 7.75253 10.9489 7.21973C11.2533 6.68692 11.6839 6.26829 12.2405 5.96383C12.8018 5.65461 13.4464 5.5 14.1743 5.5ZM12.0192 8.95372C12.0192 9.34857 12.112 9.71249 12.2975 10.0455C12.4831 10.3737 12.7376 10.633 13.0611 10.8233C13.3893 11.0136 13.7604 11.1087 14.1743 11.1087C14.5786 11.1087 14.9497 11.0112 15.2874 10.8162C15.63 10.6164 15.8987 10.35 16.0938 10.017C16.2888 9.68395 16.3863 9.32954 16.3863 8.95372C16.3863 8.58266 16.2912 8.23301 16.1009 7.90476C15.9106 7.57176 15.649 7.30773 15.316 7.11269C14.983 6.91289 14.6119 6.81299 14.2028 6.81299C13.7984 6.81299 13.4298 6.91051 13.0968 7.10555C12.7637 7.29584 12.4997 7.55511 12.3047 7.88335C12.1144 8.20684 12.0192 8.56363 12.0192 8.95372Z",fill:"white"}),s.createElement("path",{d:"M8.02232 15.9752H6.43818V7.21245H6.38109L3.91211 8.82514V7.32662L6.48099 5.64258H8.02232V15.9752Z",fill:"white"})),Si=e=>s.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7.875 6.70825C7.875 7.1915 7.48325 7.58325 7 7.58325C6.51675 7.58325 6.125 7.1915 6.125 6.70825C6.125 6.225 6.51675 5.83325 7 5.83325C7.48325 5.83325 7.875 6.225 7.875 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M10.5 6.70825C10.5 7.1915 10.1082 7.58325 9.625 7.58325C9.14175 7.58325 8.75 7.1915 8.75 6.70825C8.75 6.225 9.14175 5.83325 9.625 5.83325C10.1082 5.83325 10.5 6.225 10.5 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M5.25 6.70825C5.25 7.1915 4.85825 7.58325 4.375 7.58325C3.89175 7.58325 3.5 7.1915 3.5 6.70825C3.5 6.225 3.89175 5.83325 4.375 5.83325C4.85825 5.83325 5.25 6.225 5.25 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M12.25 9.33341C12.25 9.64283 12.1271 9.93958 11.9083 10.1584C11.6895 10.3772 11.3928 10.5001 11.0833 10.5001H4.08333L1.75 12.2501V4.08341C1.75 3.774 1.87292 3.47725 2.09171 3.25846C2.3105 3.03966 2.60725 2.91675 2.91667 2.91675H11.0833C11.3928 2.91675 11.6895 3.03966 11.9083 3.25846C12.1271 3.47725 12.25 3.774 12.25 4.08341V9.33341Z",stroke:"#84858A",strokeLinecap:"round",strokeLinejoin:"round"})),Yt=({products:e,index:n})=>{const{data:o}=Ee(),i=s.useMemo(()=>e.accumulationInfo.amount>0,[e.accumulationInfo.amount]),[a,l]=s.useState(!1),d=s.useMemo(()=>{if(!e.adult)return!1;if(!o||!o.adultCertificated)return!0;const p=o.adultCertificatedYmdt?Y(o.adultCertificatedYmdt):null;if(!p)return!0;const x=Y().subtract(3,"month");return p.isBefore(x)},[e.adult,o]),u=p=>{d&&(p.preventDefault(),l(!0))},c=e.imageUrls[0].includes("cdn-nhncommerce.com")||e.imageUrls[0].includes("nhncommerce.com");return t.jsxs(t.Fragment,{children:[t.jsx(Ce.Container,{$isList:e.isListCard,children:t.jsxs(W,{to:`${m.PRODUCT.LIST}/${e.productNo}`,onClick:u,children:[t.jsxs(Ce.Thumbnail,{$isList:e.isListCard,children:[t.jsx(yt,{src:c?`${e.imageUrls[0]}?300x300`:e.imageUrls[0],srcSet:[c?`${e.imageUrls[0]}?300x300 300w`:e.imageUrls[0],c?`${e.imageUrls[0]}?450x450 450w`:e.imageUrls[0],c?`${e.imageUrls[0]}?600x600 600w`:e.imageUrls[0],c?`${e.imageUrls[0]}?900x900 900w`:e.imageUrls[0]].join(", "),sizes:"(max-width: 768px) 45vw, 300px",loading:n&&n<10?"eager":"lazy",decoding:"async",alt:e.productName,isPlaceHolder:!0,style:{objectFit:"cover"}}),e.adult&&d&&t.jsxs(Ce.AdultDimmed,{children:[t.jsx(bi,{}),t.jsx(Ce.AdultText,{children:"성인인증 필요"})]}),e.rankIndex&&t.jsx(Ce.Rank,{$isHighlight:!!(e.rankIndex&&e.rankIndex<4),children:t.jsx("span",{children:e.rankIndex})}),e.isSoldOut&&t.jsx(Ce.SoldOutDimmed,{children:t.jsx(Ce.SoldOutText,{children:"SOLD OUT"})})]}),t.jsxs(Ce.Info,{$isList:e.isListCard,children:[t.jsx(Ce.NameBox,{children:t.jsx(Ce.ProductName,{dangerouslySetInnerHTML:{__html:e.productName}})}),t.jsx(de,{suspenseFallback:t.jsx(t.Fragment,{}),children:t.jsx(Ei,{products:e})}),t.jsxs(Ce.AddInfoBox,{children:[Ke(e.deliveryConditionType,["FREE","무료배송"])&&t.jsxs(t.Fragment,{children:[t.jsx(Ce.DeliveryType,{children:"무료배송"}),i&&t.jsx(Ce.BorderBox,{})]}),i&&t.jsx(Ce.AccumulationContainer,{children:t.jsxs(Ce.MaxAccumulationText,{children:["최대"," ",t.jsx("span",{children:ue(e.accumulationInfo.amount).format({symbol:"P"})})," ","적립"]})}),!i&&e.totalReviewCount>0&&t.jsxs(Ce.ReviewCountContainer,{children:[t.jsx(Si,{}),t.jsx("span",{children:e.totalReviewCount>1e3?"999+":e.totalReviewCount})]})]})]})]})}),t.jsx(zt,{isVisible:a,setIsVisible:l,productNo:e.productNo})]})},nu=({searchParams:e})=>Ut({queryKey:["infiniteProductList",{searchParams:e}],queryFn:async({pageParam:n})=>{const{data:o}=await Vt.getBestSellerProducts({...e,pageNumber:n});return{data:o,pageNumber:n}},getNextPageParam:(n,o)=>{if(e.pageSize)return e.pageSize*o.length{const[n,o]=s.useState(!1);return s.useEffect(()=>{const i=()=>{const{scrollTop:a,scrollHeight:l,clientHeight:d}=document.documentElement;l-a<=d+e?o(!0):o(!1)};return window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[e]),n},ou=r.div` padding: 20px 20px 0 20px; background: var(--color-white); `,ru=r.section` margin-bottom: 28px; aspect-ratio: 67 / 24; img { width: 100%; } `,iu=r.section` animation: ${pn} 0.3s ease-in-out; `,su=r.ul` display: flex; flex-direction: column; gap: 16px; `,au=r.li``,cu=r.div` display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; min-height: 50vh; `,lu=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,du=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,uu=r.div` > * { margin: 10px auto; } `,ut={Container:ou,BannerSection:ru,ProductSection:iu,ProductList:su,ProductListItem:au,Nodata:cu,NodataText:lu,MoreButton:du,SpinnerContainer:uu},pu=30,mu=()=>{const{data:e}=jt({banners:[Pt.BEST_PAGE_BANNER]}),n=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(x=>x.bannerNo),ae),[e]),{data:o,fetchNextPage:i,hasNextPage:a,isFetched:l,isFetching:d}=nu({searchParams:{pageNumber:1,pageSize:pu}}),u=On({threshold:400});s.useEffect(()=>{!a||!u||i()},[a,u]);const c=!o||(o==null?void 0:o.pages[0].data.items.length)<=0,p=x=>U((o==null?void 0:o.pages)||[],cn(x),ao("data"),ao("items"),br,Os);return t.jsxs(ut.Container,{children:[!X(n)&&t.jsx(ut.BannerSection,{children:t.jsx("img",{src:n[0].imageUrl,alt:"베스트 배너 이미지"})}),l?t.jsx(ut.ProductSection,{children:c?t.jsxs(ut.Nodata,{children:[t.jsx($n,{}),t.jsx(ut.NodataText,{children:"상품이 존재하지 않습니다."})]}):t.jsxs(t.Fragment,{children:[t.jsx(ut.ProductList,{children:o==null?void 0:o.pages.map((x,y)=>x.data.items.map((S,f)=>{const C=p(y)+(f+1);return t.jsx(ut.ProductListItem,{children:t.jsx(Yt,{products:{...S,rankIndex:C,isListCard:!0},index:f})},S.productNo)}))}),d&&t.jsx(ut.SpinnerContainer,{children:t.jsx(Lo,{})})]})}):t.jsx(We,{style:{height:"50vh"}})]})},Gy={FAQ:"260523",NOTICE:"260521"},vi={EVENT:"event",COMMENT:"comment"},dr={EVENT:{DEFAULT_PAGE_NUMBER:1,DEFAULT_PAGE_SIZE:10}},Ti={getConfig:()=>h({method:"GET",url:"/boards/configurations"}),getArticleList:(e,n)=>h({method:"GET",url:`/boards/${e}/articles`,params:n}),writeArticle:(e,n)=>h({method:"POST",url:`/boards/${e}/articles`,data:{images:n.images,password:n.password,articleTitle:n.articleTitle,thumbnailUrl:n.thumbnailUrl,parentBoardArticleNo:n.parentBoardArticleNo,articleContent:n.articleContent,boardCategoryNo:n.boardCategoryNo,secreted:n.secreted,tags:n==null?void 0:n.tags,guestName:n.guestName}}),getCategories:e=>h({method:"GET",url:`/boards/${e}/categories`}),getArticle:(e,n,o)=>h({method:"GET",url:`boards/${e}/articles/${n}`,params:o}),updateArticle:(e,n,o)=>h({method:"PUT",url:`boards/${e}/articles/${n}`,data:{images:o.images,password:o.password,articleTitle:o.articleTitle,thumbnailUrl:o.thumbnailUrl,articleContent:o.articleContent,boardCategoryNo:o.boardCategoryNo,secreted:o.secreted,tags:o==null?void 0:o.tags,guestName:o.guestName}}),deleteArticle:(e,n,o)=>h({method:"DELETE",url:`boards/${e}/articles/${n}`,data:o}),checkEditableArticle:(e,n,o)=>h({method:"PUT",url:`boards/${e}/articles/${n}/editable`,data:o}),recommendArticle:(e,n)=>h({method:"POST",url:`boards/${e}/articles/${n}/recommend`}),cancelArticleRecommend:(e,n)=>h({method:"DELETE",url:`boards/${e}/articles/${n}/recommend`}),getRepliesByBoardNo:(e,n,o)=>h({method:"GET",url:`/boards/${e}/articles/${n}/replies`,params:o}),reportArticle:(e,n,o)=>h({method:"POST",url:`/boards/${e}/articles/${n}/report`,data:o}),cancelReportArticle:(e,n)=>h({method:"DELETE",url:`/boards/${e}/articles/${n}/report`})},hu=({boardNo:e,articleNo:n,memberNo:o,searchParams:i,options:a})=>ie({queryKey:Me.detail(e,n,o,i),queryFn:async()=>{const{data:l}=await Ti.getArticle(e,n,i);return l},enabled:!Zo(e)&&!Zo(n),...a}),xu=r.div` display: flex; flex-direction: column; background: var(--color-white); `,gu=r.div` width: 100%; height: 8px; background: #f2f3f5; `,fu=r.div` position: relative; padding: 12px 20px; color: var(--color-textPrimary); `,yu=r.div` display: flex; flex-direction: column; gap: 4px; max-width: 302px; > h3 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; font-size: 1.4rem; font-weight: bold; line-height: 130%; } > div { display: flex; align-items: center; gap: 4px; font-size: 1.2rem; line-height: 120%; > b { font-weight: bold; } } `,Cu=r.button` position: absolute; top: 50%; right: 16px; transform: translateY(-50%); `,wu=r.div` ${bo}; img { width: 100%; vertical-align: middle; } `,kt={Container:xu,Divider:gu,HeadContainer:fu,TitleContainer:yu,ShareButton:Cu,ContentContainer:wu},Ai=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20 14V17.9962C20 18.5253 19.81 19.0319 19.48 19.4146C19.15 19.7861 18.69 20 18.22 20H5.78C5.31 20 4.86 19.7861 4.52 19.4146C4.19 19.0431 4 18.5253 4 17.9962V14",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"}),s.createElement("path",{d:"M16 8L11.9955 4L8 8",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"}),s.createElement("path",{d:"M12 5.78027V14.7803",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"})),Eu=s.lazy(()=>D(()=>import("./index-CeqtG6b7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),bu=()=>{const{eventNo:e}=Ft(),{data:n}=hu({boardNo:vi.EVENT,articleNo:Number(e)}),o=(n==null?void 0:n.tags[0])??"",[i,a]=String(o).split("/"),l=i?Y(new Date(2e3+Number(i.slice(0,2)),Number(i.slice(2,4))-1,Number(i.slice(4,6)))):null,d=a?Y(new Date(2e3+Number(a.slice(0,2)),Number(a.slice(2,4))-1,Number(a.slice(4,6)))):null,u=Y(d).diff(Y().startOf("day"),"day"),[c,p]=s.useState(!1),x=()=>{p(y=>!y)};return t.jsxs(kt.Container,{children:[t.jsx(Eu,{isVisible:c,setIsVisible:p,isEventBoard:!0}),t.jsx(kt.Divider,{}),t.jsxs(kt.HeadContainer,{children:[t.jsxs(kt.TitleContainer,{children:[t.jsx("h3",{children:n==null?void 0:n.title.replace(//gi," ")}),t.jsxs("div",{children:[t.jsx("span",{children:l&&d?`${l.format("YYYY.MM.DD")} - ${l.year()===d.year()?d.format("MM.DD"):d.format("YYYY.MM.DD")}`:""}),u!==null&&u>=0&&t.jsx("b",{children:u===0?"D-DAY":`D-${u}`})]})]}),t.jsx(kt.ShareButton,{onClick:x,children:t.jsx(Ai,{})})]}),t.jsx(kt.ContentContainer,{dangerouslySetInnerHTML:{__html:(n==null?void 0:n.content)??""}})]})},Su=({boardNo:e,searchParams:n})=>Ut({queryKey:["boardArticleList",{boardNo:e,searchParams:n}],queryFn:async({pageParam:o})=>{const{data:i}=await Ti.getArticleList(e,{...n,pageNumber:o});return{data:i,pageNumber:o}},getNextPageParam:(o,i)=>{if(n.pageSize)return n.pageSize*i.length a { display: flex; justify-content: space-between; gap: 10px; width: 100%; max-height: 200px; padding: 20px; border-radius: 16px; background: #e9eaef; } `,Pu=r.div` width: 60%; min-width: 143px; min-height: 134px; display: flex; flex-direction: column; justify-content: space-between; margin-top: 26px; color: var(--color-textPrimary); `,ju=r.h1` font-size: clamp(1.2rem, 6.5vw, 2rem); font-weight: bold; line-height: 130%; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; `,Iu=r.p` font-size: 1.2rem; line-height: 120%; `,Lu=r.div` width: 120px; max-width: 40%; border-radius: 50%; aspect-ratio: 1/1; align-self: center; > img { width: 100%; height: 100%; } `,Nu=r.div` ${z}; min-height: 200px; `,ku=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Ru=r.button` display: flex; justify-content: center; align-items: center; gap: 4px; width: 100%; height: 44px; margin: 16px 0; border: 1px solid #d4d5da; border-radius: 8px; font-size: 1.5rem; background: #fff; > svg { transform: translateY(-2px); } `,je={Container:vu,EventList:Tu,EventListItem:Au,TitleContainer:Pu,Title:ju,Date:Iu,ImageContainer:Lu,Nodata:Nu,NodataText:ku,MoreButton:Ru},$u=e=>s.createElement("svg",{width:14,height:9,viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M13 1.66699L7 7.66699L1 1.66699",stroke:"#3A3A3F",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Ou=()=>{const{data:e,fetchNextPage:n,hasNextPage:o,isFetched:i}=Su({boardNo:vi.EVENT,searchParams:{pageNumber:dr.EVENT.DEFAULT_PAGE_NUMBER,pageSize:dr.EVENT.DEFAULT_PAGE_SIZE,hasTotalCount:!0}}),a=s.useMemo(()=>e?U(e.pages,d=>d.flatMap(u=>u.data.items),ae):[],[e]),l=d=>{const u=String(d),[c,p]=u.split("/");if(!c||!p)return"";const x=c.slice(2),y=p.slice(2),S=x.slice(0,2)+"."+x.slice(2,4),f=y.slice(0,2)+"."+y.slice(2,4);return`${S} - ${f}`};return t.jsx(je.Container,{children:i?X(a)?t.jsx(je.Nodata,{children:t.jsx(je.NodataText,{children:"등록된 이벤트가 없습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(je.EventList,{children:a.map(d=>{const u=l(d.tags[0]);return d.displayStatusType==="DISPLAY"?t.jsx(je.EventListItem,{children:t.jsxs(W,{to:`/events/${d.articleNo}`,children:[t.jsxs(je.TitleContainer,{children:[t.jsx(je.Title,{dangerouslySetInnerHTML:{__html:d.title}}),u&&t.jsx(je.Date,{children:u})]}),t.jsx(je.ImageContainer,{children:t.jsx("img",{src:d.imageUrl,alt:d.title})})]})},d.articleNo):t.jsx(je.EventListItem,{onClick:()=>{alert("블라인드된 글입니다.")},children:t.jsx(je.TitleContainer,{children:t.jsx(je.Title,{children:"블라인드된 글입니다."})})},d.articleNo)})}),o&&t.jsxs(je.MoreButton,{onClick:()=>n(),children:[t.jsx("span",{children:"더보기"}),t.jsx($u,{})]})]}):t.jsx(We,{})})},_u=Tt` 0% { background-color: #f0f0f0; } 50% { background-color: #e0e0e0; } 100% { background-color: #f0f0f0; } `,ze=r.div` animation: ${_u} 1.5s ease-in-out infinite; background-color: #f2f3f5; border-radius: 4px; `,Mu=r.div` background: #f6f6fa; `,Bu=r.section` width: 100%; `,Du=r(ze)` width: 60%; height: 24px; margin-bottom: 8px; `,Hu=r(ze)` width: 40%; height: 18px; `,Uu=r.section` display: flex; flex-direction: column; padding: 5.3333vw; `,Gu=r(ze)` position: relative; width: 100%; aspect-ratio: 560 / 600; border-radius: 5.3333vw; left: 50%; transform: translateX(-50%); margin-bottom: 5.3333vw; `,Fu=r(ze)` width: 50%; height: 9.0667vw; margin-bottom: 2.1333vw; `,zu=r(ze)` width: 80%; height: 9.0667vw; margin-bottom: 7.4667vw; `,Vu=r(ze)` width: 20.2667vw; height: 5.3333vw; margin-bottom: 4.2667vw; `,Yu=r(ze)` width: 30vw; height: 4.2667vw; `,qu=r(ze)` width: 60px; height: 32px; border-radius: 100px; `,Wu=r(ze)` width: 100%; aspect-ratio: 1 / 1; margin-bottom: 8px; `,Ku=r(ze)` width: 80%; height: 16px; margin-bottom: 4px; `,Qu=r(ze)` width: 50%; height: 20px; `,Zu=r.div` background: var(--color-white); `,Xu=r.div` display: flex; justify-content: space-between; padding: 12px 20px; `,Ju=r.div``,ep=r.h2` margin-bottom: 4px; font-size: 1.4rem; ${v.bold} `,tp=r.p` font-size: 1.2rem; color: var(--color-textPrimary); span { display: inline-block; margin-left: 4px; ${v.bold} color: var(--color-highlight); } `,np=r.button.attrs({type:"button"})``,op=r.div``,rp=r.section` img { width: 100%; } `,ip=r.section` iframe { width: 100%; aspect-ratio: 560 / 315; } `,sp=r.section` padding: 24px 20px; `,ap=r.ul``,cp=r.li` img { max-width: 100%; } `,lp=r.button.attrs({type:"button"})` display: inline-block; width: 100%; padding: 15px; background: #007afb; border-radius: 100px; font-size: 1.5rem; ${v.bold} line-height: 1.5; color: var(--color-white); svg { margin-right: 4px; vertical-align: middle; } `,dp=r.div` background: #65656a; `,up=r.ul` padding: 24px 20px 24px 12px; opacity: 0.8; color: var(--color-white); `,pp=r.h2` margin-bottom: 12px; font-size: 1.5rem; ${v.bold} `,mp=r.li` display: inline-flex; font-size: 1.3rem; line-height: 1.5; &::before { content: '•'; padding: 0 4px; } `,hp=r.section``,xp=r.ul` position: ${({$isSticky:e})=>e?"fixed":"static"}; top: ${({$isSticky:e,$headerHeight:n,$isApp:o})=>e?o?"0":`${n}px`:"auto"}; left: 50%; z-index: 10; transform: ${({$isSticky:e})=>e?"translate(-50%, -1px)":"none"}; display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; /* max-width: 768px; */ max-width: 600px; padding: 12px 20px; background: var(--color-white); border-bottom: 1px solid #e9eaef; overflow: auto hidden; `,gp=r.li` flex-shrink: 0; `,fp=r.button.attrs({type:"button"})` padding: 6.5px 12px; border: 1px solid ${({$isActive:e})=>e?"#161a2a":"#e9eaef"}; border-radius: 100px; font-size: 1.3rem; background: ${({$isActive:e})=>e?"#161A2A":"var(--color-white)"}; color: ${({$isActive:e})=>e?"var(--color-white)":"var(--color-textPrimary)"}; `,yp=r.div` padding: 0 20px 30px; border-bottom: 8px solid #f2f3f5; &:last-of-type { border-bottom: none; } `,Cp=r.div` display: flex; justify-content: space-between; align-items: center; padding: 20px 0; `,wp=r.h3` font-size: 1.8rem; ${v.bold} color: var(--color-textPrimary); `,Ep=r.ul` display: flex; flex-wrap: wrap; gap: 20px 11px; `,bp=r.li` width: calc((100% - 11px) / 2); `,Sp=r.div` display: flex; justify-content: center; align-items: center; min-height: 200px; `,vp=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Tp=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border: 1px solid #e9eaef; border-radius: 8px; `,Z={SkeletonContainer:Mu,SkeletonTextBox:Bu,SkeletonTitle:Du,SkeletonSubTitle:Hu,SkeletonBannerSection:Uu,SkeletonBanner:Gu,SkeletonBannerTitleFirstLine:Fu,SkeletonBannerTitleSecondLine:zu,SkeletonBannerSubTitle:Vu,SkeletonBannerCaption:Yu,SkeletonTag:qu,SkeletonProductImage:Wu,SkeletonProductText:Ku,SkeletonProductPrice:Qu,Container:Zu,TitleBox:Xu,TextBox:Ju,Title:ep,SubTitle:tp,ShareButton:np,ContentsBox:op,ImageSection:rp,VideoSection:ip,CouponSection:sp,CouponList:ap,CouponListItem:cp,CouponDownloadButton:lp,CouponInfoSection:dp,InfoList:up,InfoTitle:pp,InfoListItem:mp,ProductSection:hp,TagList:xp,TagListItem:gp,TagLabel:fp,ProductListContainer:yp,ProductListTitleBox:Cp,ProductListTitle:wp,ProductList:Ep,ProductListItem:bp,Nodata:Sp,NodataText:vp,MoreButton:Tp},Ap=()=>t.jsxs("div",{children:[t.jsx(Z.TitleBox,{children:t.jsxs(Z.SkeletonTextBox,{children:[t.jsx(Z.SkeletonTitle,{}),t.jsx(Z.SkeletonSubTitle,{})]})}),t.jsx(Z.SkeletonContainer,{children:t.jsxs(Z.ContentsBox,{children:[t.jsxs(Z.SkeletonBannerSection,{children:[t.jsx(Z.SkeletonBanner,{}),t.jsx(Z.SkeletonBannerSubTitle,{}),t.jsx(Z.SkeletonBannerTitleFirstLine,{}),t.jsx(Z.SkeletonBannerTitleSecondLine,{}),t.jsx(Z.SkeletonBannerCaption,{})]}),t.jsxs(Z.ProductSection,{children:[t.jsx(Z.TagList,{$isSticky:!1,$headerHeight:56,$isApp:K,style:{overflow:"hidden"},children:Array(5).fill(null).map((e,n)=>t.jsx(Z.TagListItem,{children:t.jsx(Z.SkeletonTag,{})},n))}),t.jsxs(Z.ProductListContainer,{children:[t.jsx(Z.ProductListTitleBox,{children:t.jsx(Z.SkeletonTitle,{style:{width:"150px",height:"24px"}})}),t.jsx(Z.ProductList,{children:Array(4).fill(null).map((e,n)=>t.jsxs(Z.ProductListItem,{children:[t.jsx(Z.SkeletonProductImage,{}),t.jsxs("div",{style:{padding:"8px 4px"},children:[t.jsx(Z.SkeletonProductText,{style:{width:"90%"}}),t.jsx(Z.SkeletonProductText,{style:{width:"70%"}}),t.jsx(Z.SkeletonProductPrice,{style:{marginTop:"8px"}})]})]},n))})]})]})]})})]}),Pp=r.div` min-width: 100px; position: relative; z-index: 2; `,jp=r.div``,Ip=r.button` display: flex; justify-content: flex-end; align-items: center; min-width: 100px; font-size: 1.4rem; > span { line-height: 0; } &:focus-visible { box-shadow: 0 0 0 1px var(--color-textPrimary); } `,Lp=r.span` margin-right: 4px; `,Np=r.div` position: absolute; top: calc(100% + 8px); right: 0; width: 100%; `,kp=r.ul` border-radius: 8px; border: 1px solid #f2f3f5; background: #fff; `,Rp=r.li` border-bottom: 1px solid #f2f3f5; min-height: 40px; line-height: 40px; text-align: center; `,$p=r.button` color: ${({$isSelected:e})=>e?"var(--color-textSecondary)":"var(--color-textGray)"}; ${({$isSelected:e})=>e?v.medium:v.regular}; font-size: 1.4rem; &:focus-visible { box-shadow: 0 0 0 1px var(--color-textPrimary); } `,xt={Container:Pp,SortButtonContainer:jp,SortButton:Ip,SortButtonText:Lp,SortDropdownContainer:Np,SortDropdownList:kp,SortDropdownListItem:Rp,SortDropdownListButton:$p},Op=({onClickOutside:e})=>{const n=s.useRef(null),o=s.useCallback(i=>{var a;if(n.current instanceof HTMLElement){if((a=n.current)==null?void 0:a.contains(i.target))return;e()}},[e,n]);return s.useEffect(()=>(document.addEventListener("click",o),()=>document.removeEventListener("click",o)),[o]),n},_p=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14 7L9 12L4 7",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Mp=({selectedDropdown:e,toggleDropdown:n})=>t.jsx(xt.SortButtonContainer,{children:t.jsxs(xt.SortButton,{onClick:n,children:[t.jsx(xt.SortButtonText,{children:e.label}),t.jsx("span",{children:t.jsx(_p,{})})]})}),Bp=({dropdownList:e,selectedDropdown:n,onSelectDropdown:o,toggleDropdown:i,setSelectedDropdown:a,isOpen:l})=>{const d=u=>n.value===u.value;return l&&t.jsx(xt.SortDropdownContainer,{children:t.jsx(xt.SortDropdownList,{children:e.map(u=>t.jsx(xt.SortDropdownListItem,{children:t.jsx(xt.SortDropdownListButton,{$isSelected:d(u),onClick:()=>{a(u),o(u),i()},children:u.label})},u.value))})})},_n=({dropdownList:e,selectedValue:n=e[0],onSelect:o})=>{const[i,a]=s.useState(n);s.useEffect(()=>{a(n)},[n]);const[l,d]=s.useState(!1),u=()=>{d(!l)},c=Op({onClickOutside:()=>{d(!1)}});return t.jsxs(xt.Container,{ref:c,children:[t.jsx(Mp,{selectedDropdown:i,toggleDropdown:u}),t.jsx(Bp,{dropdownList:e,selectedDropdown:i,setSelectedDropdown:a,onSelectDropdown:o,toggleDropdown:u,isOpen:l})]})},Te=[{value:"POPULAR",label:"인기순",by:"POPULAR",direction:"DESC"},{value:"SALE_CNT",label:"판매순",by:"SALE_CNT",direction:"DESC"},{value:"DISCOUNTED_PRICE_ASC",label:"낮은 가격순",by:"DISCOUNTED_PRICE",direction:"ASC"},{value:"DISCOUNTED_PRICE_DESC",label:"높은 가격순",by:"DISCOUNTED_PRICE",direction:"DESC"},{value:"REVIEW",label:"상품 후기순",by:"REVIEW",direction:"DESC"}],Fy=[{value:"3month",label:"최근 3개월"},{value:"6month",label:"최근 6개월",startYmd:Y().subtract(6,"month").format("YYYY-MM-DD")},{value:"1year",label:"최근 1년",startYmd:Y().subtract(1,"year").format("YYYY-MM-DD")}],Sn=[{value:"ADMIN_SETTING",label:"신상품순",by:"ADMIN_SETTING"},{value:"BEST_SELLER",label:"인기순",by:"BEST_SELLER"},{value:"SALE",label:"판매순",by:"SALE"},{value:"BEST_REVIEW",label:"상품 후기순",by:"BEST_REVIEW"}],Dp=[{value:"BEST_REVIEW",by:"BEST_REVIEW",label:"베스트순",direction:"DESC"},{value:"REGISTER_YMDT",by:"REGISTER_YMDT",label:"등록일순",direction:"DESC"},{value:"RATING_DESC",by:"RATING",label:"평점높은순",direction:"DESC"},{value:"RATING_ASC",by:"RATING",label:"평점낮은순",direction:"ASC"}],Hp=({eventId:e,params:n,options:o})=>ie({queryKey:De.detailById(e,n),queryFn:async()=>{const{data:i}=await mn.getEventById(e,n);return i},placeholderData:Oe,...o}),Up=r.div` padding: 20px 20px 0 20px; background: var(--color-white); animation: ${pn} 0.3s ease-in-out; `,Gp=r.section` margin-bottom: 28px; aspect-ratio: 67 / 32; img { width: 100%; } `,Fp=r.section``,zp=r.div` display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1.4rem; color: var(--color-textPrimary); `,Vp=r.p` color: var(--color-black); strong { ${v.bold} } `,Yp=r.div``,qp=r.ul` display: flex; flex-wrap: wrap; gap: 20px 11px; `,Wp=r.li` width: calc((100% - 11px) / 2); `,Kp=r.div` ${z}; flex-direction: column; gap: 16px; min-height: 50vh; `,Qp=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Zp=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,Xp=r.div` > * { margin: 10px auto; } `,ke={Container:Up,BannerSection:Gp,ProductSection:Fp,SortContainer:zp,SortTotalCount:Vp,SortDropdown:Yp,ProductList:qp,ProductListItem:Wp,Nodata:Kp,NodataText:Qp,MoreButton:Zp,SpinnerContainer:Xp},Jp=20,em=()=>{const e="happyDeal",[n,o]=vt({order:Sn[0].by}),i=n.get("order")||Sn[0].by,{data:a,isFetched:l}=Hp({eventId:e,params:{order:i,soldout:!0,saleStatus:"ONSALE"},options:{enabled:!!e}}),[d,u]=s.useState(1),c=s.useMemo(()=>a?a.section.flatMap(f=>f.products):[],[a]),p=s.useMemo(()=>c?c==null?void 0:c.slice(0,d*Jp):[],[d,c]),x=f=>{o({order:f.by},{replace:!0})},y=X(c),S=On({threshold:400});return s.useEffect(()=>{c.length!==p.length&&S&&u(f=>f+1)},[S,p.length,c.length]),l?t.jsxs(ke.Container,{children:[(a==null?void 0:a.top.mobile.url)&&t.jsx(ke.BannerSection,{children:t.jsx("img",{src:a==null?void 0:a.top.mobile.url,alt:""})}),y?t.jsxs(ke.Nodata,{children:[t.jsx($n,{}),t.jsx(ke.NodataText,{children:"해피딜 상품이 존재하지 않습니다."})]}):t.jsxs(ke.ProductSection,{children:[t.jsxs(ke.SortContainer,{children:[t.jsxs(ke.SortTotalCount,{children:[t.jsx("strong",{children:(c==null?void 0:c.length)||0}),"개"]}),t.jsx(ke.SortDropdown,{children:t.jsx(_n,{dropdownList:Sn,onSelect:f=>{x(f)},selectedValue:Sn.find(f=>f.by===i)})})]}),X(c)?t.jsx(ke.Nodata,{children:t.jsx(ke.NodataText,{children:"상품이 존재하지 않습니다."})}):t.jsx(t.Fragment,{children:t.jsx(ke.ProductList,{children:p==null?void 0:p.map((f,C)=>t.jsx(ke.ProductListItem,{children:t.jsx(Yt,{products:f,index:C})},f.productNo))})})]})]}):t.jsx(We,{style:{height:"50vh"}})},tm=r.section` width: 100%; aspect-ratio: 67/24; animation: ${At} 0.3s ease-in-out; `,ur={Container:tm},nm=r.section` width: 100%; animation: ${At} 0.3s ease-in-out; `,om=r.div` width: 100%; aspect-ratio: 67/40; background: #f2f3f5; border-radius: 15px; `,rm=r(om)` aspect-ratio: 67/24; `,go={Container:nm,EmptyMainCenterBannerContainer:rm},im=r.section` width: 100%; `,sm=r.div` width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; > div { display: flex; align-items: center; gap: 6px; } `,am=r.h3` ${v.bold}; font-size: 2rem; line-height: 26px; `,cm=r.p` font-size: 1.4rem; line-height: 18.2px; color: #84858a; `,lm=r(W)` display: flex; align-items: center; gap: 6px; font-size: 1.4rem; line-height: 18.2px; color: var(--color-textPrimary); `,dm=r(W)` width: 100%; height: auto; `,um=r.div` width: 100%; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; `,Pi=r(_e)` margin-right: -20px; padding-right: 20px; `;Pi.displayName="SwiperWrapper";const Rt={Container:im,TitleContainer:sm,Title:am,SubTitle:cm,MoreLink:lm,CustomProductSwiper:Pi,ProductLink:dm,ProductImageContainer:um},pm=e=>s.createElement("svg",{width:6,height:10,viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L5 5L1 9",stroke:"#3A3A3F",strokeLinecap:"round",strokeLinejoin:"round"})),ji=({title:e,subTitle:n,moreLink:o,productCardList:i})=>{const a=s.useMemo(()=>({slidesPerView:2.24,spaceBetween:10,observer:!0,observeParents:!0,preloadImages:!0,lazy:!1,passiveListeners:!0}),[]);return!X(i)&&t.jsxs(Rt.Container,{children:[t.jsxs(Rt.TitleContainer,{children:[t.jsxs("div",{children:[t.jsx(Rt.Title,{children:e}),n&&t.jsx(Rt.SubTitle,{children:n})]}),o&&t.jsxs(Rt.MoreLink,{to:o,children:["더보기 ",t.jsx(pm,{})]})]}),t.jsx(Rt.CustomProductSwiper,{...a,children:i.map((l,d)=>t.jsx(Le,{children:t.jsx(Yt,{products:l,index:d})},l.productNo))})]})},mm=({eventNo:e,searchParams:n,options:o})=>fo({queryKey:De.detail(e,n),queryFn:async()=>{const{data:i}=await mn.getEvent(e,n);return i},placeholderData:Oe,...o}),hm=({params:e,options:n})=>ie({queryKey:De.list(e),queryFn:async()=>{const{data:o}=await mn.getEventsV2(e);return o},placeholderData:Oe,...n}),xm=9,vn=2,gm=e=>({...e,brandName:e.brandName||"",productName:e.productName||"",productNo:e.productNo||0,imageUrls:e.imageUrls||[],salePrice:e.salePrice||0,isSoldOut:e.isSoldOut||!1,liked:e.liked||!1,adult:e.adult||!1,accumulationInfo:e.accumulationInfo||{},partnerNo:e.partnerNo||0,deliveryConditionType:e.deliveryConditionType||null}),fm=()=>{const{data:e,isLoading:n}=hm({params:{keywordInfo:{type:"TAG",value:"MAIN"},page:{number:1,size:100}}}),[o,i]=s.useState([]),[a,l]=s.useState(0),d=s.useRef(!1),u=s.useRef(new Set),c=s.useMemo(()=>e!=null&&e.contents?e.contents.map(f=>f.eventNo):[],[e==null?void 0:e.contents]),{data:p}=jt({banners:[Pt.MAIN_PAGE_BANNER]}),x=s.useMemo(()=>{var f;return(f=p==null?void 0:p[0])!=null&&f.accounts?p[0].accounts.slice(1).map(C=>U(C.banners,un(w=>w.bannerNo),ae)):[]},[p]),y=s.useCallback(async()=>{if(!d.current){d.current=!0;try{const f=a*vn,C=f+vn,w=c.slice(f,C).filter(g=>!u.current.has(g));if(!w.length){d.current=!1;return}const A=(await Promise.all(w.map(g=>mn.getEvent(g)))).map(g=>({eventNo:g.data.eventNo,label:g.data.label,section:U(g.data.section??[],rt(E=>E.products??[]),Xe(gm),Qe(E=>E.productNo>0),ae,E=>E.slice(0,xm))}));i(g=>[...g,...A.filter(E=>E.section.length>0)]),A.forEach(g=>{u.current.add(g.eventNo)}),l(g=>g+1)}catch(f){console.error("Failed to load event chunk:",f)}finally{d.current=!1}}},[a,c]);s.useEffect(()=>{!n&&a===0&&y()},[n,a,y]);const S=s.useRef(null);return s.useEffect(()=>{const f=S.current;if(!f)return;const C=new IntersectionObserver(w=>{w.forEach(b=>{b.isIntersecting&&!d.current&&y()})},{root:null,rootMargin:"700px",threshold:.1});return C.observe(f),()=>{C.unobserve(f)}},[y]),n?t.jsx(ur.Container,{children:t.jsx(go.EmptyMainCenterBannerContainer,{})}):t.jsxs(t.Fragment,{children:[x.map((f,C)=>{const w=o.slice(C*vn,(C+1)*vn);return X(w)?null:t.jsxs(is.Fragment,{children:[t.jsx(ur.Container,{children:t.jsx(Io,{bannerList:f,isTextAnimation:!0})}),w.map(b=>t.jsx(go.Container,{children:t.jsx(ji,{productCardList:b.section,title:b.label,moreLink:`${m.EXHIBITIONS.LIST}/${b.eventNo}`})},b.eventNo))]},C)}),t.jsx("div",{ref:S})]})},ym=r.section` width: 100%; aspect-ratio: 67/40; animation: ${At} 0.3s ease-in-out; `,Cm={Container:ym},wm=()=>{const{data:e}=jt({banners:[Pt.MAIN_PAGE_BANNER]}),n=s.useMemo(()=>{if(!e||!e[0])return[];try{return e[0].accounts[0].banners}catch{return[]}},[e]);return!X(n)&&t.jsx(Cm.Container,{children:t.jsx(Io,{accountNo:0,bannerList:n,isTextAnimation:!0,bannerSwiperStyle:{borderRadius:"15px"},bannerStyle:{borderRadius:"15px"},descriptionStyle:{top:"45%",fontSize:"clamp(1rem, 5.1vw, 2.7rem)",lineHeight:"138%",letterSpacing:"0.05vw"},dateStyle:{bottom:"7.3%",letterSpacing:"0.03vw"}})})},Em=r.section` width: 100%; animation: ${At} 0.3s ease-in-out; /* 섹션 바깥으로 슬라이드가 튀어나오지 않도록 안전 가드 */ overflow: hidden; `,bm=r.div` aspect-ratio: 1/1; display: flex; justify-content: center; align-items: center; border-radius: 20px; overflow: hidden; padding-right: 0; /* 하위 이미지가 컨테이너 경계 밖으로 보이지 않도록 안전 가드 */ img { display: block; max-width: 100%; max-height: 100%; } `,Ii=r(_e)` /* 우측으로 튀는 현상 방지를 위해 음수 마진 제거 */ margin-right: 0; padding-right: 0; `;Ii.displayName="SwiperWrapper";const Li=r(Le)` min-width: 56px; width: 18%; display: flex; flex-direction: column; gap: 16px; `;Li.displayName="SwiperSlide";const Sm=r(W)` > p { margin-top: 8px; text-align: center; font-size: 1.5rem; color: #59595f; white-space: nowrap; } ${ei.XS} { > p { font-size: 1.2rem; } } `,vm=r.div` margin: 16px auto 0; width: fit-content; height: 4px; background: #f6f6fa; border-radius: 100px; overflow: hidden; width: 32px; > div { width: 50% !important; border-radius: 100px; background: #0d0f71; height: 100%; } `,$t={Container:Em,IconContainer:bm,CustomMainIconBannerSwiper:Ii,CustomMainIconBannerSwiperSlide:Li,StyledLink:Sm,ScrollBar:vm},Tm=()=>{const{data:e}=jt({banners:[Pt.MAIN_PAGE_ICON_BANNER]}),n=s.useRef(null),[o,i]=s.useState(5),a=s.useCallback(u=>{n.current=(u==null?void 0:u.el)??null},[]);s.useEffect(()=>{const u=n.current;if(!u)return;const c=()=>{const y=u.querySelectorAll(".swiper-slide");if(!y.length)return;const S=y[0],f=y[1];let C=S.getBoundingClientRect().width;if(f){const A=S.getBoundingClientRect(),E=f.getBoundingClientRect().left-A.left;E>0&&(C=E)}else C+=12;const w=u.clientWidth,b=Math.max(1,Math.floor(w/C));i(b)},p=new ResizeObserver(()=>c());p.observe(u);const x=setTimeout(c,50);return()=>{clearTimeout(x),p.disconnect()}},[]);const l=s.useMemo(()=>({modules:[ea],slidesPerView:"auto",slidesPerGroup:5,spaceBetween:8,breakpoints:{768:{slidesPerView:5,slidesPerGroup:5,spaceBetween:12},1024:{slidesPerView:5,slidesPerGroup:5,spaceBetween:16}},resistanceRatio:.6,onBeforeInit:a,scrollbar:{el:".icon-swiper-scrollbar",dragSize:16}}),[a]),d=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(u=>u.name==="레시피공유"?1e7:u.bannerNo),_s(2),ae),[e]);return!X(d)&&t.jsx($t.Container,{children:t.jsxs($t.CustomMainIconBannerSwiper,{...l,children:[d.map((u,c)=>{const p=o>0&&(c+1)%o===0;return t.jsx($t.CustomMainIconBannerSwiperSlide,{children:u.map(({bannerNo:x,landingUrl:y,browerTargetType:S,imageUrl:f,name:C})=>t.jsxs($t.StyledLink,{to:y,target:jo(S),children:[t.jsx($t.IconContainer,{$edgeFitRight:p,children:t.jsx(yt,{src:f,alt:C,isPlaceHolder:!0,style:{background:"#f6f6fa",objectFit:"contain"}})}),t.jsx("p",{children:C})]},x))},c)}),t.jsx($t.ScrollBar,{className:"icon-swiper-scrollbar"})]})})},Am={HAPPY_DEAL:42465,EMPLOYEE:43271},Pm=()=>{const{data:e}=mm({eventNo:Am.HAPPY_DEAL,searchParams:{order:"ADMIN_SETTING",soldout:!0,saleStatus:"ONSALE"}}),n=s.useMemo(()=>e?U(e.section,ao("products"),br,cn(9),Xe(o=>({brandName:o.brandName,productName:o.productName,productNo:o.productNo,imageUrls:o.imageUrls,salePrice:o.salePrice,immediateDiscountAmt:o.immediateDiscountAmt,additionDiscountAmt:o.additionDiscountAmt,couponDiscountAmt:o.couponDiscountAmt,defaultDeliveryCondition:o.deliveryConditionType,totalReviewCount:o.totalReviewCount,isSoldOut:o.isSoldOut,liked:o.liked,adult:o.adult,isExecutives:!1,accumulationInfo:o.accumulationInfo,partnerNo:o.partnerNo,deliveryConditionType:o.deliveryConditionType})),ae):[],[e]);return e&&!X(n)&&t.jsx(go.Container,{children:t.jsx(ji,{productCardList:n,title:e.label,subTitle:"10% 적립 혜택에 무료배송까지!",moreLink:m.HAPPY_DEAL})})},jm=r.div` padding: 20px 20px 42px; display: flex; flex-direction: column; gap: 28px; background: #fff; `,Ni=r.div` width: 100%; aspect-ratio: 67/40; background: #f2f3f5; border-radius: 15px; `,Im=r(Ni)` aspect-ratio: 67/24; `,Lm=r.div` width: 100%; display: flex; gap: 10px; `,Nm=r.div` width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 16px; column-gap: 12px; `,km=r.div` min-width: 42.7%; aspect-ratio: 1/1; border-radius: 8px; background: #f2f3f5; `,Rm=r.div` width: 100%; aspect-ratio: 1/1; border-radius: 20px; background: #f2f3f5; `,Ot={Container:jm,EmptyMainBannerContainer:Ni,EmptyMainCenterBannerContainer:Im,EmptyProductSwiperContainer:Lm,EmptyIconSectionContainer:Nm,EmptyProductBlock:km,EmptyIconBlock:Rm},$m="https://t1.daumcdn.net/kas/static/ba.min.js",pr="kakao-adfit-script";let Tn=null;const Om=()=>typeof window>"u"?Promise.reject(new Error("window is undefined")):window.adfit?Promise.resolve():Tn||(Tn=new Promise((e,n)=>{const o=document.getElementById(pr);if(o){o.addEventListener("load",()=>e(),{once:!0}),o.addEventListener("error",()=>n(new Error("adfit load failed")),{once:!0});return}const i=document.createElement("script");i.id=pr,i.src=$m,i.async=!0,i.onload=()=>e(),i.onerror=()=>n(new Error("adfit load failed")),document.body.appendChild(i)}),Tn),_m=({unitId:e,slotId:n,width:o=400,height:i=100,timeoutMs:a=4e3,enabled:l=!0})=>{const d=s.useRef(null),[u,c]=s.useState(!1),[p,x]=s.useState(!1),[y,S]=s.useState(null);return s.useEffect(()=>{if(!l||typeof window>"u")return;const f=d.current;if(!f)return;let C,w=!1;const b=new MutationObserver(()=>{!!f.querySelector("iframe")&&(c(!0),b.disconnect(),C&&window.clearTimeout(C))});return(async()=>{var g,E,I;try{if(S(null),c(!1),x(!1),f.id=n,f.setAttribute("data-ad-unit",e),f.setAttribute("data-ad-width",String(o)),f.setAttribute("data-ad-height",String(i)),f.style.display="block",f.style.width="100%",f.style.height=`${i}px`,b.observe(f,{childList:!0,subtree:!0}),await Om(),w)return;try{(E=(g=window.adfit)==null?void 0:g.destroy)==null||E.call(g,f)}catch(k){console.error("[useAdfit] destroy before render failed",k)}await new Promise(k=>requestAnimationFrame(()=>k(null))),await new Promise(k=>requestAnimationFrame(()=>k(null))),(I=window.adfit)!=null&&I.render?window.adfit.render(f):window.adfit&&window.adfit(),x(!0),C=window.setTimeout(()=>{b.disconnect()},a)}catch(k){const _=k instanceof Error?k:new Error("adfit render failed");S(_),b.disconnect()}})(),()=>{var g,E;w=!0,b.disconnect(),C&&window.clearTimeout(C);try{(E=(g=window.adfit)==null?void 0:g.destroy)==null||E.call(g,f)}catch(I){console.error("[useAdfit] destroy on unmount failed",I)}}},[l,e,n,o,i,a]),{ref:d,hasAd:u,isReady:p,error:y}},Mm=({unitId:e,slotId:n,width:o=400,height:i=100,timeoutMs:a=4e3,enabled:l=!0,wrapperStyle:d,slotStyle:u,showOnlyWhenLoaded:c=!1})=>{const{ref:p,hasAd:x}=_m({unitId:e,slotId:n,width:o,height:i,timeoutMs:a,enabled:l});if(!l)return null;const y=c?x:!0;return t.jsx("div",{style:{margin:x?"24px 16px 0":0,display:y?"block":"none",...d},children:t.jsx("div",{style:{borderRadius:12,overflow:"hidden",background:"#ffffff"},children:t.jsx("ins",{ref:p,className:"kakao_ad_area","data-ad-unit":e,"data-ad-width":String(o),"data-ad-height":String(i),style:{display:"block",width:"100%",height:`${i}px`,...u}})})})},Bm=()=>{const e=()=>{if(!K)return null;const a=at()==="IOS"?"DAN-cv08MFGDxvwUrOjT":"DAN-8xnqQTYT4roLzxu7";return t.jsx(Mm,{unitId:a,slotId:"kakaoAdMain",width:400,height:100,showOnlyWhenLoaded:!0,wrapperStyle:{margin:"12px 0 0"}})},n=()=>{const i=Array(3).fill(null);return t.jsx(Ot.EmptyProductSwiperContainer,{children:i.map((a,l)=>t.jsx(Ot.EmptyProductBlock,{},l))})},o=()=>{const i=Array(10).fill(null);return t.jsx(Ot.EmptyIconSectionContainer,{children:i.map((a,l)=>t.jsx(Ot.EmptyIconBlock,{},l))})};return t.jsxs(Ot.Container,{children:[t.jsx(de,{suspenseFallback:t.jsx(Ot.EmptyMainBannerContainer,{}),children:t.jsx(wm,{})}),t.jsx(de,{suspenseFallback:o(),children:t.jsx(Tm,{})}),t.jsx(e,{}),t.jsx(de,{suspenseFallback:n(),children:t.jsx(Pm,{})}),t.jsx(fm,{})]})},ki=({searchParams:e})=>Ut({queryKey:["infiniteProductList",{searchParams:e}],queryFn:async({pageParam:n})=>{const{data:o}=await Vt.searchProducts({...e,pageNumber:n});return{data:o,pageNumber:n}},getNextPageParam:(n,o)=>{if(e.pageSize)return e.pageSize*o.length{const u=Fe();s.useEffect(()=>{if(se(m.PRODUCT.DETAIL,u.pathname)&&e){window.ShopbyExternalScript.setGlobalObjectSb({product:e});return}if(se(m.SEARCH,u.pathname)&&n){window.ShopbyExternalScript.setGlobalObjectSb({searchedProduct:n}),d&&(window.m_skey=d);return}if(zn(C=>se(C,u.pathname),[m.PRODUCT.LIST,m.PRODUCT.BRAND.LIST,m.PRODUCT.PARTNER.LIST,m.CATEGORIES.DETAIL])&&n&&l){window.ShopbyExternalScript.setGlobalObjectSb({searchedProduct:n,currentCategory:l});return}if(se(m.CART,u.pathname)&&o){window.ShopbyExternalScript.setGlobalObjectSb({cart:o});return}if(zn(C=>se(C,u.pathname),[m.ORDER.ORDER_SHEET,m.GUEST.ORDER_DETAIL])&&i){window.ShopbyExternalScript.setGlobalObjectSb({orderSheet:i});return}if(zn(C=>se(C,u.pathname),[m.ORDER.ORDER_COMPLETE,m.MY_PAGE.ORDERS.ORDER_DETAIL,m.GUEST.ORDER_DETAIL])&&a){window.ShopbyExternalScript.setGlobalObjectSb({order:a});return}},[u.pathname,e,l,n,o,i,a,d])},Dm=({categoryNo:e,options:n})=>ie({queryKey:["category",{categoryNo:e}],queryFn:async()=>{const{data:o}=await ii.getCategory(e);return o},enabled:!!e,placeholderData:Oe,...n}),Hm=e=>ie({queryKey:["category_all"],queryFn:async()=>(await ii.getCategories()).data,...e}),Um=r.section``,Ri=r(_e)` padding: 12px 20px; background: #f6f6fa; `,$i=r(Le)` width: auto; font-size: 1.4rem; ${({$isSelected:e})=>v[e?"medium":"regular"]}; white-space: nowrap; color: ${({$isSelected:e})=>e?"var(--color-textSecondary)":"var(--color-textGray)"}; cursor: pointer; `,Oi=r(_e)` padding: 12px 20px; background: var(--color-white); `,_i=r(Le)` width: auto; display: inline-block; padding: 6.5px 12px; border: 1px solid #e9eaef; border-radius: 100px; font-size: 1.3rem; white-space: nowrap; background: ${({$isSelected:e})=>e?"var(--color-black)":"var(--color-white)"}; color: ${({$isSelected:e})=>e?"var(--color-white)":"var(--color-textPrimary)"}; cursor: pointer; `,Gm=r.section` padding: 0 20px; background: var(--color-white); animation: ${pn} 0.3s ease-in-out; `,Fm=r.div` display: flex; justify-content: flex-end; align-items: center; padding: 8px 0 15px; `,zm=r.div``,Vm=r.ul` display: grid; grid-template-columns: repeat(2, 1fr); grid-column-gap: 10px; grid-row-gap: 20px; `,Ym=r.li``,qm=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; grid-column: span 2; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,Wm=r.div` display: flex; justify-content: center; align-items: center; min-height: 60vh; `,Km=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Qm=r.div` > * { margin: 10px auto; } `;Ri.displayName="SwiperWrapper";Oi.displayName="SwiperWrapper";$i.displayName="SwiperSlide";_i.displayName="SwiperSlide";const Se={CategorySection:Um,CategoryList:Ri,CategoryListItem:$i,ChildCategoryList:Oi,ChildCategoryListItem:_i,ProductSection:Gm,SortContainer:Fm,SortDropdown:zm,ProductList:Vm,ProductListItem:Ym,MoreButton:qm,Nodata:Wm,NodataText:Km,SpinnerContainer:Qm},Zm=()=>{const e=we(),[n]=vt(),i=Ft().categoryNo,a=n.get("childCategoryNo"),[l,d]=s.useState({categoryNos:i,pageSize:20,pageNumber:1,order:{by:Te[0].by,direction:Te[0].direction},filter:{soldout:!0},sortValue:Te[0].value}),{data:u}=Hm(),{data:c}=Dm({categoryNo:i}),p=s.useMemo(()=>({slidesPerView:"auto",spaceBetween:16}),[]),x=s.useMemo(()=>({slidesPerView:"auto",spaceBetween:6}),[]),{data:y,fetchNextPage:S,hasNextPage:f,isFetched:C,isFetching:w}=ki({searchParams:l});s.useEffect(()=>{i&&d(P=>({...P,categoryNos:a??i}))},[i,a]);const b=s.useMemo(()=>u?u.multiLevelCategories:[],[u]),A=s.useMemo(()=>{const P=b.find(j=>j.categoryNo===Number(i));return P?P.children:[]},[i,b]),[g,E]=s.useState(!0),I=P=>{d(j=>({...j,pageNumber:1,childCategoryNo:P})),e(`/categories/${P}?childCategoryNo=${P}`)},k=P=>{d(j=>({...j,pageNumber:1,childCategoryNo:P})),E(!1),e(`/categories/${i}?childCategoryNo=${P}`,{replace:!0})},_=P=>{d(j=>({...j,pageNumber:1,order:{by:P.by,direction:P.direction,sortValue:P.value}}))},T=On({threshold:400});return s.useEffect(()=>{!f||!T||S()},[f,T]),_o({searchedProduct:y==null?void 0:y.pages[0].data.items,currentCategory:c}),t.jsxs(t.Fragment,{children:[t.jsxs(Se.CategorySection,{children:[b&&t.jsx(Se.CategoryList,{...p,children:b.map(P=>t.jsx(Se.CategoryListItem,{onClick:()=>I(P.categoryNo),$isSelected:i===P.categoryNo.toString(),children:P.label},P.categoryNo))}),t.jsxs(Se.ChildCategoryList,{...x,children:[t.jsx(Se.ChildCategoryListItem,{onClick:()=>k(Number(i)),$isSelected:g?!0:a===i,children:"전체"}),A.map(P=>t.jsx(Se.ChildCategoryListItem,{onClick:()=>k(P.categoryNo),$isSelected:a===P.categoryNo.toString(),children:P.label},P.categoryNo))]})]}),t.jsxs(Se.ProductSection,{children:[t.jsx(Se.SortContainer,{children:t.jsx(Se.SortDropdown,{children:t.jsx(_n,{dropdownList:Te,onSelect:P=>{_(P)}})})}),C?X(y==null?void 0:y.pages[0].data.items)?t.jsx(Se.Nodata,{children:t.jsx(Se.NodataText,{children:"상품이 존재하지 않습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(Se.ProductList,{children:y==null?void 0:y.pages.map(P=>P.data.items.map((j,M)=>t.jsx(Se.ProductListItem,{children:t.jsx(Yt,{products:j,index:M})},j.productNo)))}),w&&t.jsx(Se.SpinnerContainer,{children:t.jsx(Lo,{})})]}):t.jsx(We,{style:{height:"50vh"}})]})]})},Xm=r(Je.header)` display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 18.5px 0; `,Jm=r.h4` font-size: 1.6rem; ${v.medium}; color: var(--color-textPrimary); `,mr={Header:Xm,Title:Jm},eh=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4 13.1667L10 7.16675L16 13.1667",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Mt=({visible:e,title:n,titleElement:o,children:i})=>{const[a,l]=s.useState(e);s.useEffect(()=>{l(e)},[e]);const d=()=>{l(!a)};return t.jsxs("div",{children:[t.jsxs(mr.Header,{className:"accordion-header",onClick:d,initial:!1,children:[o||t.jsx(mr.Title,{children:n}),t.jsx(Je.span,{animate:{rotate:a?0:180},initial:{rotate:180},transition:{duration:.3},children:t.jsx(eh,{})})]}),t.jsx(Co,{initial:a,children:a&&t.jsx(Je.div,{className:"accordion-content",initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:i})})]})},th=r.span` width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; svg { width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; } > span:first-child { width: ${e=>e.$rateDecimal*100}%; overflow: hidden; > svg { float: inline-start; } } > span:last-child { width: ${e=>(1-e.$rateDecimal)*100}%; overflow: hidden; > svg { width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; float: inline-end; } } `,nh={ReviewIcon:th},oh=e=>s.createElement("svg",{width:29,height:28,viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14.5023 22.4311L22.4804 27.2463C22.9306 27.5181 23.4859 27.1144 23.3665 26.6024L21.2493 17.5269L28.2986 11.4201C28.696 11.0758 28.4836 10.4229 27.9596 10.3785L18.6783 9.59106L15.0496 1.02947C14.8448 0.546167 14.1598 0.546166 13.955 1.02947L10.3263 9.59106L1.04502 10.3785C0.52106 10.4229 0.308601 11.0758 0.706046 11.4201L7.75535 17.5269L5.63818 26.6024C5.51872 27.1144 6.07407 27.5181 6.52425 27.2463L14.5023 22.4311Z",fill:"#007AFB"})),rh=e=>s.createElement("svg",{width:29,height:28,viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14.5023 22.4311L22.4804 27.2463C22.9306 27.5181 23.4859 27.1144 23.3665 26.6024L21.2493 17.5269L28.2986 11.4201C28.696 11.0758 28.4836 10.4229 27.9596 10.3785L18.6783 9.59106L15.0496 1.02947C14.8448 0.546167 14.1598 0.546166 13.955 1.02947L10.3263 9.59106L1.04502 10.3785C0.52106 10.4229 0.308601 11.0758 0.706046 11.4201L7.75535 17.5269L5.63818 26.6024C5.51872 27.1144 6.07407 27.5181 6.52425 27.2463L14.5023 22.4311Z",fill:"#E9EAEF"})),Ln=({rate:e,activeIcon:n=t.jsx(oh,{}),emptyIcon:o=t.jsx(rh,{}),iconSize:i})=>e===1?n:e===0?o:t.jsxs(nh.ReviewIcon,{$rateDecimal:e,$width:i==null?void 0:i.width,$height:i==null?void 0:i.height,children:[t.jsx("span",{children:n}),t.jsx("span",{children:o})]}),ih=r.section` aspect-ratio: 67 / 14; `,sh=r(W)` height: 100%; border-radius: 12px; overflow: hidden; `,Mi=r(_e)` height: 100%; border-radius: 12px; `;Mi.displayName="SwiperWrapper";const to={Container:ih,StyledLink:sh,CustomSwiper:Mi},ah=()=>{const{data:e}=jt({banners:[Pt.PRODUCT_DETAIL_BANNER]}),n=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(i=>i.bannerNo),ae),[e]),o=s.useMemo(()=>({slidesPerView:1}),[]);return e&&t.jsx(to.Container,{children:t.jsx(to.CustomSwiper,{...o,children:n.map(({imageUrl:i,landingUrl:a,browerTargetType:l,bannerNo:d,name:u})=>t.jsx(Le,{children:t.jsx(to.StyledLink,{to:a,target:jo(l),children:t.jsx(yt,{src:i,alt:u,isPlaceHolder:!0,style:{objectFit:"cover"}})})},d))})})},ch=r.div` display: flex; flex-direction: column; gap: 8px; padding: 20px 0; `,lh=r.dl` display: flex; align-items: center; font-size: 1.4rem; ${v.regular}; dt { width: 152px; margin-right: 37px; color: #84858a; } dd { color: var(--color-textPrimary); } `,hr={ContentsContainer:ch,List:lh},Bi=(e,n)=>e||n===0,dh=e=>U(e,JSON.parse,ln("contents"),rt(n=>Ms(n)),Xe(([n,o])=>({key:n,value:o})),ae),Nn=e=>{const n=Math.floor(e),o=parseFloat((e%1).toFixed(2)),i=Array(n).fill(1);for(o>0&&i.push(o);i.length<5;)i.push(0);return i},uh=({dutyInfo:e})=>{const n=s.useMemo(()=>{try{return dh(e)}catch(o){return console.error(o),[]}},[e]);return t.jsx(Mt,{title:"상품판매 일반정보",children:t.jsx(hr.ContentsContainer,{children:n.map((o,i)=>t.jsxs(hr.List,{children:[t.jsx("dt",{children:o.key}),t.jsx("dd",{children:o.value})]},i))})})},ph=()=>Ae({mutationFn:async e=>await Ao.registerCart(e)}),mh=()=>({write:Ae({mutationFn:async({data:e})=>await en.writeOrderSheet(e)}),calculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getCalculatedOrderSheet(e,n)}),couponApply:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.applyCoupon(e,n)}),couponCalculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getAppliedCouponPrice(e,n)}),maxCouponCalculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getMaximumAppliedCouponPrice(e,n)})}),Di=()=>({register:Ae({mutationFn:async({productNo:e,data:n})=>await _t.writeProductInquiry(e,n)}),modify:Ae({mutationFn:async({inquiryNo:e,data:n})=>await _t.updateProductInquiry(e,n)}),delete:Ae({mutationFn:async({inquiryNo:e})=>await _t.deleteProductInquiry(e)}),report:Ae({mutationFn:async({productNo:e,data:n})=>await _t.reportProductInquiry(e,n)})}),hh=()=>({recent:Ae({}),brandLike:Ae({}),like:Ae({mutationFn:async({data:e})=>await $d.updateProductsLike(e)})}),xr=new et,zy=()=>{const e=we(),{isLogin:n}=Pe(),{isApp:o}=Kr(),i=decodeURIComponent(xr.get("hm_aut")||"undefined"),a=xr.get("wHmAut"),l=o?i:a,{mutateAsync:d}=Ae({mutationFn:async()=>{if(n&&X(l)){e(m.MAIN);return}return(await Gr.deactivateMember({hmAut:l,userAgent:o?window.navigator.userAgent:""})).data.success}});return{checkDeactivation:d}},xh=r.div``,gh=r.div` > .swiper { background: var(--color-white); } > div:last-child { margin-bottom: 0; } `,fh=r.div``,yh=r.img` width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; `,Ch=r.div` position: relative; margin-bottom: 8px; padding: 20px; background-color: var(--color-white); `,wh=r.div` padding: 10px 0; color: #84858a; span, p { font-size: 1.4rem !important; font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif !important; } span { display: inline; } `,Eh=r.div` > div { position: relative; margin-bottom: 8px; } /* 형제 요소가 있는 경우에만 스타일 적용 */ &:has(+ *) { margin-bottom: 20px; } `,bh=r.p` position: relative; display: flex; align-items: center; gap: 4px; font-size: 1.8rem; ${v.bold}; color: var(--color-main); span { ${z}; gap: 3px; font-size: 1.4rem; ${v.medium}; /* line-height: 25px; */ } `,Sh=r.button.attrs({type:"button"})` ${z}; `,vh=r.button.attrs({type:"button"})` position: absolute; bottom: 0; right: 0; ${z}; gap: 2px; padding: 8px 12px; background: #007afb; border-radius: 30px; font-size: 1.4rem; ${v.bold}; color: var(--color-white); `,Th=r.div` display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; margin-top: 16px; `,Ah=r.div` display: flex; flex-direction: column; gap: 2px; `,Ph=r.span` font-size: 2rem; ${v.bold}; color: initial; /* color: var(--color-main); */ `,jh=r.span` font-size: 2.2rem; ${v.bold}; color: var(--color-textPrimary); `,Ih=r.span` font-size: 1.2rem; ${v.regular}; color: var(--color-textLightGray); text-decoration: line-through; `,Lh=r.button.attrs({type:"button"})` position: absolute; right: 16px; top: 16px; z-index: 10; `,Nh=r.h3` margin-bottom: 12px; font-size: 1.6rem; ${v.bold}; `,kh=r(W)` width: 50%; p { margin-bottom: 6px; font-size: 1.4rem; ${v.semiBold}; color: var(--color-textGray); } `,Rh=r.h2` margin-bottom: 8px; width: 100%; max-width: 295px; font-size: 2rem; ${v.regular}; `,$h=r.div` display: flex; align-items: center; gap: 4px; `,Oh=r.p` font-size: 1.2rem; color: var(--color-textGray); margin-top: 8px; `,_h=r.ul` display: flex; `,Mh=r.li` svg { width: 12px; height: 12px; } `,Bh=r.span` font-size: 1.2rem; ${v.regular}; color: var(--color-textGray); `,Dh=r.div` display: flex; flex-direction: column; gap: 8px; `,Hh=r.dl` display: flex; gap: 12px; dt { width: 60px; font-size: 1.4rem; ${v.regular}; color: var(--color-textGray); } dd { font-size: 1.4rem; ${v.regular}; color: var(--color-textPrimary); } `,Uh=r.div` margin-bottom: 8px; padding: 0 20px; background-color: var(--color-white); `,Gh=r.div` padding: 20px 0 0; h2 { margin-bottom: 8px; font-size: 1.3rem; font-weight: 600; } p { padding: 0; font-size: 1.2rem; } `,Fh=r.div` img { display: block; width: 100%; max-width: 100%; } `,zh=r.section` padding: 20px 0; ${bo}; display: flex; flex-direction: column; gap: 8px; `,Vh=r.section` padding: 24px 0; `,Yh=r.p` font-size: 1.2rem; color: #84858a; `,qh=r.span` margin: 0 4px; width: 1px; height: 8px; background-color: #e9eaef; `,Wh=r.section` padding: 24px 0 48px 0; `,Kh=r.ul` display: flex; border-bottom: 1px solid #f2f3f5; background-color: var(--color-white); li { flex: 1; } `,Qh=r.li` position: relative; font-size: 1.5rem; ${({$isSelected:e})=>e?v.bold:v.regular}; text-align: center; color: ${({$isSelected:e})=>e?"#1E1E22":"#84858A"}; cursor: pointer; button { width: 100%; height: 100%; padding: 12.5px 0; font-weight: inherit; &::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background-color: #161a2a; border-radius: 3px; transform: scaleX(0); transition: transform 0.3s ease-in-out; } &[aria-selected='true']::after { transform: scaleX(1); } } span { font-size: 1.2rem; font-weight: inherit; } `,Zh=r.div` position: fixed; bottom: 0; ${z}; z-index: 1005; gap: 5.5px; padding: 8px; width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; background-color: var(--color-white); `,Xh=r.button.attrs({type:"button"})` ${z}; padding: 14px; border: 1px solid #e9eaef; border-radius: 8px; `,Jh=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; border: 1px solid var(--color-sub); border-radius: 8px; color: var(--color-white); span { font-size: 1.6rem; ${v.medium}; color: var(--color-sub); } `,e0=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; background-color: var(--color-sub); border-radius: 8px; span { font-size: 1.6rem; ${v.medium}; color: var(--color-white); } `,t0=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; background-color: #e9eaef; border-radius: 8px; span { font-size: 1.6rem; ${v.medium}; ${v.medium}; color: #b3b4b9; } `,n0=r(W)` ${z}; flex-direction: column; gap: 4px; width: 108px; height: 108px; span { font-size: 1.3rem; ${v.regular}; } `,Hi=r(Le)` ${z}; `;Hi.displayName="SwiperSlide";const N={ContainerWrapper:xh,Container:fh,ContentsContainerWrapper:gh,ThumbnailImage:yh,RateContainer:$h,ReviewList:_h,ReviewListItem:Mh,Rate:Bh,PlaceOriginLabel:Oh,ProductInfoContainer:Ch,AdditionalInfoContainer:wh,InfoContentsContainer:Eh,MaxBenefit:bh,InfoButton:Sh,CouponDownloadButton:vh,PriceContainer:Th,PriceBox:Ah,DiscountRate:Ph,Price:jh,SalePrice:Ih,ShareButton:Lh,ProductInfoTitle:Nh,BrandNameLink:kh,ProductName:Rh,ProductInfoContentsContainer:Dh,ProductInfo:Hh,ContentsContainer:Uh,TabList:Kh,TabListItem:Qh,PartnerNotice:Gh,PartnerNoticeContent:Fh,Description:zh,ProductInquiry:Vh,PartnerInfo:Wh,ButtonContainer:Zh,WishButton:Xh,CartButton:Jh,OrderButton:e0,SoldOutButton:t0,MoreLink:n0,MoreSwiperSlide:Hi,SubPayInfo:Yh,SubPayInfoLine:qh},o0=(e,n)=>{switch(n.type){case"OPTION_ADD":return U(e,Ds(n.payload),Bs(o=>o.optionNo),ae);case"OPTION_DELETE":return e.filter(o=>o.optionNo!==n.payload.optionNo);case"OPTION_COUNT_UP":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?o.orderCnt+1:o.orderCnt}));case"OPTION_COUNT_DOWN":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?Math.max(o.orderCnt-1,1):o.orderCnt}));case"OPTION_COUNT_CHANGE":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?n.payload.orderCnt:o.orderCnt}));case"OPTION_RESET":return Ui;default:return e}},Ui=[],r0=()=>{const[e,n]=s.useReducer(o0,Ui);return{state:e,dispatch:n}},i0=({productCount:e})=>{var n;(n=window.AM_PRODUCT)==null||n.call(window,e)},Vy=({productNo:e,count:n})=>{var i;const o="a"+String(e);(i=window.AM_INOUT)==null||i.call(window,o,n),window.AM_Cart&&window.AM_Cart[o]&&(window.AM_Cart[o].qy=n)},Yy=({productList:e})=>{e.forEach(n=>{var i;const o="a"+String(n.productNo);(i=window.AM_DEL)==null||i.call(window,o,n.count),window.AM_Cart&&window.AM_Cart[o]&&delete window.AM_Cart[o]})},s0=e=>{e&&(window.m_skey=e)},a0=e=>s.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M10 18C10 18 0 12.3609 0 5.59388C0 -1.17312 7.77778 -1.73704 10 3.55748C12.2222 -1.73704 20 -1.17312 20 5.59388C20 12.3609 10 18 10 18Z",fill:"#FF5F00"})),c0=e=>s.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M10 18C10 18 0 12.3609 0 5.59388C0 -1.17312 7.77778 -1.73704 10 3.55748C12.2222 -1.73704 20 -1.17312 20 5.59388C20 12.3609 10 18 10 18Z",fill:"#E9EAEF"})),l0=s.lazy(()=>D(()=>import("./index-Cw9g8NQu.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,8,9,10,11,12,13,39,59,60,22,23,24,25,17,18,61,62,63,21,67,27,31,32,33,34,35,36,16,19,20,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),d0=/iPad|iPhone|iPod/.test(navigator.userAgent),Gi=({productNo:e})=>{const{openDialog:n}=Ct(),o=Ht(),i=we(),[a]=vt(),l=a.get("preview"),d=a.get("channelType"),{data:u}=$o({productNo:e,searchParams:l?{preview:!!l}:{}}),[c,p]=s.useState(!1),{isLogin:x}=Pe(),{like:{mutate:y}}=hh(),S=async P=>{if(!x){await n("로그인 후 관심 상품을 추가해 주세요.",[{type:"cancel",label:"닫기"},{type:"ok",label:"로그인"}])&&i(`${m.AUTH.LOGIN}?returnUrl=${window.location.pathname}`);return}y({data:{items:P.map(j=>({...j,partnerNo:u==null?void 0:u.partner.partnerNo}))}},{onSuccess:()=>{o.invalidateQueries({predicate:j=>Ke(j.queryKey[0],[...fe.all])}),o.invalidateQueries({predicate:j=>Ke(j.queryKey[1],[...fe.likes()]),refetchType:"inactive"})},onError:j=>{var M;n(Ue(j)?(M=j.response)==null?void 0:M.data.message:"알 수 없는 오류가 발생했습니다.")}})},f=Jr(),{state:C,dispatch:w}=r0(),b=ph(),{data:A}=_d({productNo:e}),g=s.useMemo(()=>!!A&&A.type==="DEFAULT",[A]),E=U(C,Xe(P=>P.orderCnt),Pn),I=async()=>{if(p(!0),c){if(!(u!=null&&u.limitations.canAddToCart)){n("해당 상품은 장바구니에 담을 수 없습니다.");return}if(C.length===0){n("옵션을 먼저 선택해주세요.");return}if(i0({productCount:E}),x)b.mutate(C,{onSuccess:async()=>{const P=await n(`${C.length}개의 상품을 장바구니에 담았습니다.`,[{type:"cancel",label:"닫기"},{type:"ok",label:"장바구니 보기"}]);g||w({type:"OPTION_RESET"}),o.invalidateQueries({predicate:j=>Ke(j.queryKey[0],[...St.all])}),P&&i(m.CART)},onError:P=>{var j;n(Ue(P)?((j=P.response)==null?void 0:j.data.message)??"장바구니 담기에 실패했습니다.":"장바구니 담기에 실패했습니다.")}});else{const P=await n(`${C.length}개의 상품을 장바구니에 담았습니다.`,[{type:"cancel",label:"닫기"},{type:"ok",label:"장바구니 보기"}]);f(Oc(C)),g||w({type:"OPTION_RESET"}),P&&i(m.CART)}}},{write:{mutate:k}}=mh(),_=()=>{p(!0);const P={products:U(C,Xe(j=>({productNo:e,optionNo:j.optionNo,orderCnt:j.orderCnt})),ae)};if(c){if(P.products.length===0){n("옵션을 먼저 선택해주세요.");return}k({data:d!==null?{...P,channelType:d}:P},{onSuccess:({data:j})=>{x?i({pathname:`${m.ORDER.MAIN}/${j.orderSheetNo}`}):i({pathname:m.AUTH.LOGIN,search:`returnUrl=${m.ORDER.MAIN}/${j.orderSheetNo}`},{state:{type:"guestOrder"}})},onError:async j=>{var M,$;if(Ue(j)&&((M=j.response)==null?void 0:M.data.code)==="PPVE0004"){await n("비회원 구매 불가 상품입니다.
로그인 후 구매해주세요.",[{type:"cancel",label:"닫기"},{type:"ok",label:"로그인"}])&&i(`${m.AUTH.LOGIN}?returnUrl=${window.location.pathname}`);return}n(Ue(j)?(($=j.response)==null?void 0:$.data.message)??"알 수 없는 오류가 발생했습니다.":"알 수 없는 오류가 발생했습니다.")}})}},T=!!u&&Bi(u.status.soldout,u.stock.stockCnt);return t.jsxs(t.Fragment,{children:[t.jsxs(N.ButtonContainer,{style:{borderTop:c?"none":"1px solid #f2f3f5",paddingBottom:d0?"max(calc(8px + env(safe-area-inset-bottom)), 34px)":"8px"},children:[t.jsx(N.WishButton,{onClick:()=>S([{productNo:e,like:u!=null&&u.liked?"N":"Y"}]),children:u!=null&&u.liked?t.jsx(a0,{}):t.jsx(c0,{})}),T?t.jsx(N.SoldOutButton,{disabled:!0,children:t.jsx("span",{children:"품절"})}):t.jsxs(t.Fragment,{children:[t.jsx(N.CartButton,{onClick:I,children:t.jsx("span",{children:"장바구니"})}),t.jsx(N.OrderButton,{onClick:_,children:t.jsx("span",{children:"구매하기"})})]})]}),t.jsx(l0,{productNo:e,isVisible:c,setIsVisible:p,state:C,dispatch:w})]})},u0=r.div` display: flex; flex-direction: column; gap: 8px; `,p0=r.dl` display: flex; gap: 12px; font-size: 1.4rem; ${v.regular}; dt { color: var(--color-textGray); width: 100%; max-width: 100px; } dd { color: var(--color-textPrimary); } `,pt={Container:u0,List:p0},m0=({partner:e})=>e&&t.jsxs(pt.Container,{children:[t.jsxs(pt.List,{children:[t.jsx("dt",{children:"상호명"}),t.jsx("dd",{children:e.companyName})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표자"}),t.jsx("dd",{children:e.ownerName})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표번호"}),t.jsx("dd",{children:e.phoneNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"사업자번호"}),t.jsx("dd",{children:e.businessRegistrationNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"주소"}),t.jsx("dd",{dangerouslySetInnerHTML:{__html:e.officeAddressLabel.split("
")[0]}})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"통신판매신고번호"}),t.jsx("dd",{children:e.onlineMarketingBusinessDeclarationNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표이메일"}),t.jsx("dd",{children:e.email})]})]}),h0=r.div` padding: 24px 20px; max-height: 75vh; overflow: auto; `,x0=r.h6` font-size: 1.5rem; ${v.medium}; text-align: left; color: var(--color-textPrimary); margin-bottom: 24px; `,g0=r.form` display: flex; flex-direction: column; gap: 12px; `,f0=r.div` margin-bottom: 32px; display: flex; flex-direction: column; gap: 12px; `,y0=r.input` width: 100%; border: 1px solid #e9eaef; border-radius: 8px; padding: 14.5px 16px; font-size: 1.5rem; ${v.regular}; text-align: left; color: var(--color-textPrimary); `,C0=r.div` display: flex; flex-direction: column; gap: 16px; `,w0=r.div` display: flex; flex-direction: column; gap: 16px; position: relative; `,E0=r.textarea` font-size: 1.5rem; ${v.regular}; line-height: 19.5px; border: 1px solid #e9eaef; border-radius: 8px; padding: 18px 16px 14px 16px; position: relative; min-height: 164px; resize: none; &:focus { border-color: #000000; outline: none; } `,b0=r.span` position: absolute; bottom: 14px; right: 16px; font-size: 1.2rem; color: #888; font-size: 1.2rem; ${v.regular}; line-height: 14.4px; text-align: right; b { color: #000; } `,S0=r.div` padding: 16px; background: #f6f6fa; border: 1px solid #e9eaef; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; color: #84858a; margin-bottom: 45px; `,v0=r.h6` font-size: 1.3rem; ${v.bold}; display: flex; align-items: center; gap: 4px; svg { width: 18px; height: 18px; } `,T0=r.ul` display: flex; flex-direction: column; gap: 4px; li { position: relative; padding-left: 10px; &::before { position: absolute; content: '·'; left: 0; width: 10px; display: inline-block; } } `,A0=r.div` padding: 12px 0; `,P0=r.button.attrs({type:"submit"})` width: 100%; border-radius: 8px; ${z}; color: ${({disabled:e})=>e?"#B3B4B9":"#ffffff"}; background-color: ${({disabled:e})=>e?"#E9EAEF":"#0D0F71"}; padding: 15.5px 0; span { font-size: 1.6rem; ${v.medium}; } `,j0=r.span` font-size: 1.3rem; ${v.regular}; color: var(--color-textPrimary); `,I0=r.p` color: var(--color-main); font-size: 1.2rem; margin-left: 5px; `,L0=r.p` font-size: 1.5rem; ${v.regular}; color: var(--color-textPrimary); `,le={Container:h0,ProudctName:x0,Form:g0,FormContainer:f0,Input:y0,ContentsContainer:C0,TextAreaContainer:w0,TextArea:E0,TextCount:b0,ButtonContainer:A0,InquiryButton:P0,NoticeContainer:S0,NoticeTitle:v0,NoticeList:T0,SecretCheckLabelText:j0,ErrorText:I0,FormatOptionLabel:L0},N0=r.label` display: flex; align-items: center; gap: 8px; cursor: pointer; width: fit-content; `,k0=r.p` font-size: 1.4rem; color: var(--color-textPrimary); `,R0=r.input` cursor: pointer; ${ia}; `,gr={Label:N0,LabelText:k0,HiddenCheckbox:R0},$0=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{x:1,y:1,width:20,height:20,rx:3,fill:"#FF5F00"}),s.createElement("path",{d:"M17 8L10.4211 16L6 11.9167",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),O0=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{x:1,y:1,width:20,height:20,rx:3,fill:"white",stroke:"#E9EAEF",strokeWidth:1})),Fi=s.forwardRef(({register:e,checked:n,labelStyle:o,labelElement:i,...a},l)=>t.jsxs(gr.Label,{style:o,children:[n?t.jsx($0,{}):t.jsx(O0,{}),t.jsx(gr.HiddenCheckbox,{checked:n,type:"checkbox",readOnly:!0,...a,...e,ref:l}),i]}));Fi.displayName="CheckBox";const _0=({productNo:e,inquiryNo:n,options:o})=>ie({queryKey:he.detail(e,n),queryFn:async()=>{const{data:i}=await _t.getProductInquiry(e,n);return i},enabled:n!==0&&e!==0,...o}),an=e=>s.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:7,cy:7.5,r:6.5,fill:"#C2C3C8",stroke:"#C2C3C8"}),s.createElement("path",{d:"M7.99989 4.50211C8.00831 5.0518 7.54939 5.5 6.99784 5.5C6.46734 5.5 6.00421 5.0518 6 4.50211C6.00421 3.9482 6.46734 3.5 6.99784 3.5C7.54939 3.5 8.00831 3.9482 7.99989 4.50211Z",fill:"white"}),s.createElement("path",{d:"M7 7V11",stroke:"white",strokeWidth:1.6,strokeLinecap:"round"})),zi=({productNo:e,productName:n,inquiryNo:o=0,isVisible:i,setIsVisible:a})=>{const{openDialog:l}=Ct(),{data:d}=Wr(),u=Ht(),{data:c}=_0({productNo:e,inquiryNo:o,options:{enabled:i&&o!==0&&e!==0}}),p=s.useMemo(()=>d?U(d,ln("productInquiryType")):[],[d]),{control:x,register:y,setValue:S,handleSubmit:f,formState:{errors:C}}=Ar({defaultValues:{title:"",content:"",isSecreted:!1}}),w=Vn({control:x,name:"title"}),b=Vn({control:x,name:"content"}),A=Vn({control:x,name:"isSecreted"}),g=!X(w)&&!X(b),E=!!o&&!!c,[I,k]=s.useState(!1);s.useEffect(()=>{if(!E)return;const j=p.find(M=>M.value===(c==null?void 0:c.type));k(!0),S("title",c==null?void 0:c.title),S("content",c==null?void 0:c.content),S("isSecreted",c==null?void 0:c.secreted),j&&S("type",j)},[E]);const{register:{mutate:_},modify:{mutate:T}}=Di(),P=f(({title:j,content:M,type:$,isSecreted:F})=>{E?T({inquiryNo:o,data:{title:j,content:M,type:$==null?void 0:$.value,secreted:!!F,tagValueNos:[]}},{onSuccess:async()=>{await l("상품 문의가 수정되었습니다."),u.invalidateQueries({queryKey:he.detail(e,o)}),u.invalidateQueries({queryKey:he.lists(),refetchType:"all"}),u.invalidateQueries({queryKey:he.myLists()}),a(!1)},onError:pe=>{var me;l(Ue(pe)?((me=pe.response)==null?void 0:me.data.message)??"상품 문의 수정에 실패했습니다.
관리자에게 문의해주세요.":"상품 문의 수정에 실패했습니다.
관리자에게 문의해주세요.")}}):_({productNo:e,data:{title:j,content:M,productNo:e,type:$==null?void 0:$.value,secreted:!!F}},{onSuccess:async({data:pe})=>{pe.inquiryNo&&(await l("상품 문의가 완료되었습니다."),u.invalidateQueries({queryKey:he.lists()}),u.invalidateQueries({queryKey:he.myLists(),refetchType:"all"}),a(!1))},onError:pe=>{var me;l(Ue(pe)?((me=pe.response)==null?void 0:me.data.message)??"상품 문의에 실패했습니다.
관리자에게 문의해주세요.":"상품 문의에 실패했습니다.
관리자에게 문의해주세요.")}})});return t.jsx(Lr,{id:"shareBottomSheet",title:"상품 문의하기",isVisible:i,setIsVisible:a,children:t.jsxs(le.Container,{children:[t.jsx(le.ProudctName,{children:n}),t.jsxs(le.Form,{onSubmit:P,children:[t.jsxs(le.FormContainer,{children:[t.jsx(ta,{control:x,name:"type",rules:{required:"문의 종류를 선택해주세요."},render:({field:{onChange:j,ref:M}})=>t.jsx(oa,{name:"type",placeholder:"문의 종류 선택",isSearchable:!1,options:p,ref:M,value:I?p.find($=>$.value===(c==null?void 0:c.type)):void 0,styles:{control:$=>({...$,borderRadius:"8px",height:"48px",borderColor:C.type?"#000000":"#E9EAEF","&:focus":{borderColor:"#000000"}}),placeholder:$=>({...$,fontSize:"15px",fontWeight:"400",padding:"0 16px",color:"#3a3a3f"}),valueContainer:$=>({...$,padding:0}),singleValue:$=>({...$,fontSize:"15px",fontWeight:"400",color:"#3A3A3F",display:"flex",alignItems:"center",padding:"0 16px",marginLeft:0}),indicatorSeparator:$=>({...$,display:"none"}),option:($,F)=>({...$,backgroundColor:F.isSelected?"#E9EAEF":F.isFocused?"#F0F0F5":$.backgroundColor,"&:hover":{backgroundColor:F.isSelected?"#D0D0D5":"#F0F0F5"}})},formatOptionLabel:({label:$})=>t.jsx(le.FormatOptionLabel,{children:$}),onChange:$=>{k(!1),j($)}})}),t.jsx(rn,{errors:C,name:"type",render:({message:j})=>t.jsx(le.ErrorText,{children:j})}),t.jsx(le.Input,{placeholder:"제목을 작성해주세요.",...y("title",{required:{value:!0,message:"제목을 입력해주세요."}})}),t.jsx(rn,{errors:C,name:"title",render:({message:j})=>t.jsx(le.ErrorText,{children:j})}),t.jsxs(le.ContentsContainer,{children:[t.jsxs(le.TextAreaContainer,{children:[t.jsx(le.TextArea,{placeholder:"내용을 작성해주세요.",...y("content",{required:{value:!0,message:"내용을 입력해주세요."},maxLength:{value:1e3,message:"1000자 이하로 입력해주세요."}})}),t.jsx(le.TextCount,{dangerouslySetInnerHTML:{__html:`${b.length} / 1,000`}})]}),t.jsx(rn,{errors:C,name:"content",render:({message:j})=>t.jsx(le.ErrorText,{children:j})}),t.jsx(Fi,{checked:!!A,labelElement:t.jsx(le.SecretCheckLabelText,{children:"비밀글로 문의하기"}),...y("isSecreted")})]})]}),t.jsxs(le.NoticeContainer,{children:[t.jsxs(le.NoticeTitle,{children:[t.jsx(an,{}),"유의사항"]}),t.jsx(le.NoticeList,{children:t.jsx("li",{children:"성격에 맞지않는 글, 비방성 글, 음람글, 욕설 등은 통보 없이 이동 또는 삭제될 수 있습니다."})})]}),t.jsx(le.ButtonContainer,{children:t.jsx(le.InquiryButton,{disabled:!g,children:t.jsx("span",{children:o?"수정하기":"등록하기"})})})]})]})})},M0=Object.freeze(Object.defineProperty({__proto__:null,default:zi},Symbol.toStringTag,{value:"Module"})),B0=r.div` display: flex; flex-direction: column; gap: 20px; `,D0=r.div` padding: 16px; background: #f6f6fa; border: 1px solid #e9eaef; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; color: #84858a; `,H0=r.h6` font-size: 1.3rem; ${v.bold}; display: flex; align-items: center; gap: 4px; svg { width: 18px; height: 18px; } `,U0=r.ul` display: flex; flex-direction: column; gap: 4px; li { position: relative; padding-left: 10px; &::before { position: absolute; content: '·'; left: 0; width: 10px; display: inline-block; } } `,G0=r.button.attrs({type:"button"})` border-radius: 8px; border: 1px solid #0d0f71; width: 100%; ${z}; padding: 13.5px 0; span { font-size: 1.6rem; ${v.medium}; color: #0d0f71; } `,F0=r.ul``,z0=r.li` padding: 20px 0; border-bottom: 1px solid #f2f3f5; `,V0=r.div` display: flex; flex-direction: column; gap: 12px; `,Y0=r.div` header { padding: 0; } h4 { font-size: 1.4rem; ${v.regular}; color: var(--color-textPrimary); } `,q0=r.div` display: flex; justify-content: space-between; `,W0=r.div` display: flex; gap: 8px; margin-top: 12px; font-size: 1.4rem; `,K0=r.span` color: var(--color-textGray); `,Q0=r.span` color: var(--color-textPrimary); `,Z0=r.div` display: flex; justify-content: space-between; align-items: center; `,X0=r.span` font-size: 1.4rem; ${v.medium}; color: ${({$replied:e})=>e?"#007AFB":"#84858A"}; display: flex; align-items: center; gap: 6px; small { font-size: 1.2rem; ${v.regular}; color: #b3b4b9; } `,J0=r.span` font-size: 1.2rem; color: #b3b4b9; `,ex=r.p` font-size: 1.4rem; ${v.regular}; color: ${({$secreted:e})=>e?"#B3B4B9":"#3A3A3F"}; display: flex; justify-content: flex-start; align-items: center; gap: 2px; `,tx=r.button` svg { transform: ${({$isOpened:e})=>e?"rotate(180deg)":"rotate(0)"}; } `,nx=r.div` display: flex; align-items: center; gap: 8px; button { font-size: 1.3rem; ${v.regular}; color: var(--color-textGray); } `,ox=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin: 10px 0 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,ne={Container:B0,NoticeContainer:D0,NoticeTitle:H0,NoticeList:U0,InquiryButton:G0,List:F0,ListItem:z0,Contents:V0,Accordion:Y0,ContentsBox:q0,ReplyContents:W0,InfoText:K0,ReplyText:Q0,StatusContainer:Z0,Status:X0,RegisterYmdt:J0,Title:ex,ArrowButton:tx,ButtonContainer:nx,MoreButton:ox},rx=({productNo:e,searchParams:n,options:o})=>Ut({queryKey:he.infiniteList(e,n),queryFn:async({pageParam:i})=>{const{data:a}=await _t.getProductInquiries(e,n?{...n,pageNumber:i}:void 0);return{data:a,pageNumber:i}},getNextPageParam:(i,a)=>{if(n!=null&&n.pageSize)return n.pageSize*a.lengths.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7 8V5.77778C7 5.04107 7.31607 4.33453 7.87868 3.81359C8.44129 3.29266 9.20435 3 10 3C10.7956 3 11.5587 3.29266 12.1213 3.81359C12.6839 4.33453 13 5.04107 13 5.77778V8",stroke:"#C2C3C8",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4 8.9C4 8.40294 4.38376 8 4.85714 8H15.1429C15.6162 8 16 8.40294 16 8.9V16.1C16 16.5971 15.6162 17 15.1429 17H4.85714C4.38376 17 4 16.5971 4 16.1V8.9Z",stroke:"#C2C3C8",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("circle",{cx:10,cy:12,r:.5,fill:"#C2C3C8",stroke:"#C2C3C8"})),ix=({productNo:e,onButtonClick:n})=>{const o=Ht(),{data:i,hasNextPage:a,fetchNextPage:l}=rx({productNo:e,searchParams:{startYmd:Y().subtract(1,"year").format("YYYY-MM-DD"),pageNumber:1,pageSize:10,hasTotalCount:!0,isMyInquiries:!1}}),{openDialog:d}=Ct(),{delete:{mutate:u}}=Di(),[c,p]=s.useState(!1),[x,y]=s.useState(0),[S,f]=s.useState(""),C=({inquiryNo:b,productName:A})=>{c||(y(b),f(A),p(!0))},w=async({inquiryNo:b})=>{await d("상품 문의를
삭제하시겠습니까?",[{type:"cancel",label:"아니요"},{type:"ok",label:"삭제하기"}])&&u({inquiryNo:b},{onSuccess:({data:A})=>{o.invalidateQueries({queryKey:he.lists(),refetchType:"all"}),o.invalidateQueries({queryKey:he.myLists()})},onError:A=>{var g;d(Ue(A)?((g=A.response)==null?void 0:g.data.message)??"알 수 없는 오류가 발생했습니다.":"알 수 없는 오류가 발생했습니다.")}})};return t.jsxs(t.Fragment,{children:[t.jsxs(ne.Container,{children:[t.jsxs(ne.NoticeContainer,{children:[t.jsxs(ne.NoticeTitle,{children:[t.jsx(an,{}),"상품문의 안내"]}),t.jsxs(ne.NoticeList,{children:[t.jsx("li",{children:"상품에 대해 궁굼한 내용을 문의해주세요"}),t.jsx("li",{children:"주문/배송 문의는 주문AS, 1:1문의로 문의해 주세요"})]})]}),t.jsx(ne.InquiryButton,{onClick:n,children:t.jsx("span",{children:"상품 문의하기"})}),t.jsx(ne.List,{children:i==null?void 0:i.pages.map(b=>{var A;return(A=b.data.items)==null?void 0:A.map(g=>t.jsx(ne.ListItem,{children:t.jsxs(ne.Contents,{children:[t.jsxs(ne.StatusContainer,{children:[t.jsxs(ne.Status,{$replied:g.replied,children:[g.replied?"답변완료":"답변대기",t.jsx("small",{children:g.memberId})]}),t.jsx(ne.RegisterYmdt,{children:Y(g.registerYmdt).format("YYYY.MM.DD")})]}),g.replied?g.secreted&&!g.myInquiry?t.jsx(ne.ContentsBox,{children:t.jsx(ne.Title,{$secreted:g.secreted&&!g.myInquiry,children:g.secreted&&!g.myInquiry?t.jsxs(t.Fragment,{children:[t.jsx(fr,{}),t.jsx("span",{children:"비밀글입니다."})]}):g.title})}):t.jsx(ne.Accordion,{children:t.jsx(Mt,{title:g.title,children:t.jsx(ne.ReplyContents,{children:g.answers.map(E=>t.jsxs(s.Fragment,{children:[t.jsx(ne.InfoText,{children:"답변"}),t.jsx(ne.ReplyText,{children:E.content})]},E.inquiryNo))})})}):t.jsx(ne.ContentsBox,{children:t.jsx(ne.Title,{$secreted:g.secreted&&!g.myInquiry,children:g.secreted&&!g.myInquiry?t.jsxs(t.Fragment,{children:[t.jsx(fr,{}),t.jsx("span",{children:"비밀글입니다."})]}):g.title})}),g.myInquiry&&t.jsxs(ne.ButtonContainer,{children:[t.jsx("button",{onClick:()=>C({inquiryNo:g.inquiryNo,productName:g.productName}),children:t.jsx("span",{children:"수정"})}),t.jsx("button",{onClick:()=>w({inquiryNo:g.inquiryNo}),children:t.jsx("span",{children:"삭제"})})]})]})},g.inquiryNo))})}),a&&t.jsx(ne.MoreButton,{onClick:()=>l(),children:t.jsx("span",{children:"더보기"})})]}),t.jsx(zi,{isVisible:c,setIsVisible:p,productNo:e,inquiryNo:x,productName:S})]})},sx=r.div` > a { display: flex; flex-direction: column; gap: 6px; } `,ax=r.div` position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; img { width: 100%; object-fit: cover; } `,cx=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.16); backdrop-filter: blur(5px); color: var(--color-white); svg { position: absolute; top: 8px; right: 8px; width: 18px; } `,lx=r.p` font-size: 1.3rem; ${v.bold} word-break: keep-all; `,dx=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); `,ux=r.p` font-size: 1.6rem; ${v.medium} text-align: center; word-break: keep-all; line-height: 1; color: var(--color-white); `,px=r.div` display: flex; flex-direction: column; gap: 4px; `,mx=r.div``,hx=r.p``,xx=r.p` font-size: 1.3rem; line-height: 1.2; ${wo(2)} color: var(--color-textPrimary); `,gx=r.div` > p { line-height: 1.3; } `,fx=r.p` margin-bottom: 2px; font-size: 1.2rem; ${v.medium} color: var(--color-highlight); `,yx=r.p` margin-bottom: 2px; font-size: 1.2rem; ${v.medium} color: var(--color-highlight); `,Cx=r.p` font-size: 1.2rem; text-decoration: line-through; color: var(--color-textLightGray); `,wx=r.div` display: flex; align-items: center; gap: ${({$isOverMillion:e})=>e?"3px":"5px"}; font-size: ${({$isOverMillion:e})=>e?"1.3rem":"1.4rem"}; ${v.bold}; line-height: 1.2; color: var(--color-textPrimary); `,Ex=r.span` color: var(--color-highlight); `,bx=r.span` ${({$isExecutive:e})=>e&&re` text-decoration: line-through; `} `,Sx=r.div` display: flex; gap: 8px; margin-top: 2px; font-size: 1.2rem; color: var(--color-textGray); `,vx=r.div` ${z}; gap: 2px; `,Tx=r.span``,Re={Container:sx,Thumbnail:ax,AdultDimmed:cx,AdultText:lx,SoldOutDimmed:dx,SoldOutText:ux,Info:px,NameBox:mx,BrandName:hx,ProductName:xx,PriceBox:gx,CouponText:fx,ExecutivesText:yx,OriginPrice:Cx,Price:wx,DiscountRate:Ex,ProductPrice:bx,AddInfoBox:Sx,DeliveryType:Tx,ReviewCountContainer:vx},Ax=({products:e})=>{const[n,o]=s.useState(!1),{data:i}=Ee(),a=s.useMemo(()=>{if(!e.adult)return!1;if(!i||!i.adultCertificated)return!0;const d=i.adultCertificatedYmdt?Y(i.adultCertificatedYmdt):null;if(!d)return!0;const u=Y().subtract(3,"month");return d.isBefore(u)},[e.adult,i]),l=d=>{a&&(d.preventDefault(),o(!0))};return t.jsxs(t.Fragment,{children:[t.jsx(Re.Container,{children:t.jsxs(W,{to:`${m.PRODUCT.LIST}/${e.productNo}`,onClick:l,children:[t.jsxs(Re.Thumbnail,{children:[t.jsx("img",{src:e.imageUrls[0],alt:e.productName}),e.adult&&a&&t.jsxs(Re.AdultDimmed,{children:[t.jsx(bi,{}),t.jsx(Re.AdultText,{children:"성인인증 필요"})]}),e.isSoldOut&&t.jsx(Re.SoldOutDimmed,{children:t.jsx(Re.SoldOutText,{children:"SOLD OUT"})})]}),t.jsxs(Re.Info,{children:[t.jsx(Re.NameBox,{children:t.jsx(Re.ProductName,{dangerouslySetInnerHTML:{__html:e.productName}})}),t.jsx(de,{suspenseFallback:t.jsx(t.Fragment,{}),children:t.jsx(Ei,{products:e,isSmallCard:!0})}),t.jsxs(Re.AddInfoBox,{children:[e.totalReviewCount>0&&t.jsxs(Re.ReviewCountContainer,{children:[t.jsx(Si,{}),t.jsx("span",{children:e.totalReviewCount>1e3?"999+":e.totalReviewCount})]}),Ke(e.deliveryConditionType,["FREE","무료배송"])&&t.jsx(Re.DeliveryType,{children:"무료배송"})]})]})]})}),t.jsx(zt,{isVisible:n,setIsVisible:o,productNo:e.productNo})]})},Px=r.div` padding: 20px; background-color: white; margin-bottom: 8px; margin-right: -20px; `,jx=r.h3` margin-bottom: 12px; font-size: 1.6rem; ${v.bold}; color: var(--color-textSecondary); `,Vi=r(Le)` img { width: 100%; border-radius: 8px; object-fit: cover; } `;Vi.displayName="SwiperSlide";const no={Container:Px,Title:jx,CustomSwiperSlide:Vi},yr=({title:e,searchParams:n={pageNumber:1,pageSize:10},moreSlide:o})=>{const{data:i}=Od({searchParams:n}),a=s.useMemo(()=>({spaceBetween:8,slidesPerView:3.13,autoHeight:!0}),[]);return(i==null?void 0:i.items.length)>0&&t.jsxs(no.Container,{children:[e&&t.jsx(no.Title,{children:e}),t.jsxs(_e,{...a,children:[i.items.map(d=>{var u;return t.jsx(no.CustomSwiperSlide,{children:t.jsx(Ax,{products:{...d,isSoldOut:Bi(d.isSoldOut,d.stockCnt),deliveryConditionType:((u=d.deliveryConditionInfo)==null?void 0:u.summary)||null}})},d.productNo)}),o]})]})},Ix=r.div``,Lx=r.div` ${z}; gap: 8px; padding: 28px 0; `,Nx=r.ul` display: flex; gap: 3px; `,kx=r.li` ${z}; svg { width: 20px; height: 21px; } `,Rx=r.ul` display: flex; gap: 1px; `,$x=r.li` svg { width: 11px; height: 11px; } `,Ox=r.span` font-size: 1.8rem; ${v.bold}; color: var(--color-textLightGray); strong { color: var(--color-textPrimary); } `,_x=r.span` color: var(--color-textPrimary); font-size: 1.4rem; ${v.regular}; strong { ${v.bold}; } `,Mx=r.div` ${z}; justify-content: space-between; padding: 8px 0 12px 0; `,Bx=r.ul` padding: 12px 0; `,Dx=r.li` padding: 20px 0; display: flex; flex-direction: column; gap: 16px; border-bottom: 1px solid #f2f3f5; `,Hx=r.div` display: flex; flex-direction: column; gap: 8px; `,Ux=r.p` font-size: 1.4rem; ${v.regular}; color: var(--color-textPrimary); cursor: ${({$isPointer:e})=>e?"pointer":"default"}; `,Gx=r.p` font-size: 1.2rem; ${v.regular}; color: #b3b4b9; `,Fx=r.ul` display: flex; gap: 2px; overflow: hidden; li:first-of-type { border-top-left-radius: 8px; border-bottom-left-radius: 8px; } li:last-of-type { border-top-right-radius: 8px; border-bottom-right-radius: 8px; } li:only-child { border-radius: 8px; } li { aspect-ratio: 1/1; overflow: hidden; } li img { display: inline-block; font-size: 0; } `,zx=r.span` font-size: 1.2rem; ${v.regular}; color: #b3b4b9; `,Vx=r.div` display: flex; justify-content: space-between; align-items: center; `,Yx=r.div` display: flex; gap: 6px; `,qx=r.span` font-size: 1.2rem; ${v.regular}; color: #b3b4b9; `,Wx=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin: 10px 0 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,q={Container:Ix,RateContainer:Lx,StarList:Nx,StarListItem:kx,ContentsStarList:Rx,ContentsStarListItem:$x,Rate:Ox,Count:_x,SortContainer:Mx,ReviewList:Bx,ReviewListItem:Dx,ReviewImageList:Fx,ContentsContainer:Hx,Contents:Ux,ProductName:Gx,RegisterYmdt:zx,ReviewHeader:Vx,NameContainer:Yx,MemberName:qx,MoreButton:Wx},Kx=({productNo:e,searchParams:n,options:o})=>Ut({queryKey:ge.infiniteList(e,n),queryFn:async({pageParam:i})=>{const{data:a}=await li.getProductReviewList(e,{...n,pageNumber:i});return{data:a,pageNumber:i}},initialPageParam:1,getNextPageParam:(i,a)=>{if(n.pageSize)return n.pageSize*a.length{var x,y,S;const[o,i]=s.useState({by:"BEST_REVIEW",direction:"DESC"}),a=f=>{i({by:f.by,direction:f.direction})},l=we(),{data:d,hasNextPage:u,fetchNextPage:c}=Kx({productNo:e,searchParams:{pageNumber:1,pageSize:10,hasTotalCount:!0,order:o}}),p=(f,C,w)=>{if(C)return sessionStorage.setItem("productDetailScrollY",window.scrollY.toString()),sessionStorage.setItem("activeTab","review"),l(`${m.PRODUCT.LIST}/${e}/${f.reviewNo}`,{state:{initialIndex:w??0}})};return t.jsxs(q.Container,{children:[t.jsxs(q.RateContainer,{children:[t.jsx(q.StarList,{children:Nn(n).map((f,C)=>t.jsx(q.StarListItem,{children:t.jsx(Ln,{rate:f,iconSize:{width:"20px",height:"21px"}})},C))}),t.jsxs(q.Rate,{children:[t.jsx("strong",{children:n})," / 5"]})]}),t.jsxs(q.SortContainer,{children:[t.jsx(q.Count,{dangerouslySetInnerHTML:{__html:`${((S=(y=(x=d==null?void 0:d.pages)==null?void 0:x[0])==null?void 0:y.data)==null?void 0:S.totalCount)||0} 건`}}),t.jsx(_n,{dropdownList:Dp,onSelect:a})]}),t.jsx(q.ReviewList,{children:d==null?void 0:d.pages.map(f=>f.data.items.map(C=>{const w=C.fileUrls.length>0;return t.jsxs(q.ReviewListItem,{children:[t.jsxs(q.ContentsContainer,{children:[t.jsxs(q.ReviewHeader,{children:[t.jsxs(q.NameContainer,{children:[t.jsx(q.ContentsStarList,{children:Nn(C.rate).map((b,A)=>t.jsx(q.ContentsStarListItem,{children:t.jsx(Ln,{rate:b,iconSize:{width:"11px",height:"11px"}})},A))}),t.jsx(q.MemberName,{children:C.registerName})]}),t.jsx(q.RegisterYmdt,{children:Y(C.registerYmdt).format("YYYY.MM.DD")})]}),t.jsx(q.ProductName,{children:C.productName}),t.jsx(q.Contents,{onClick:()=>p(C,w),$isPointer:w,children:C.content})]}),t.jsx("div",{children:t.jsx(q.ReviewImageList,{children:C.fileUrls.map((b,A)=>t.jsx("li",{children:t.jsx("img",{src:b,width:"82",height:"82",onClick:g=>{g.preventDefault(),g.stopPropagation(),p(C,w,A)},style:{cursor:"pointer"},alt:"리뷰 이미지"})},b))})})]},C.reviewNo)}))}),u&&t.jsx(q.MoreButton,{onClick:()=>c(),children:t.jsx("span",{children:"더보기"})})]})},Zx=r.div` position: relative; `,Xx=r.div` position: absolute; border-radius: 8px; border: 1px solid #e9eaef; padding: 16px; background-color: white; z-index: 10; left: 0; width: min(calc(100vw - 40px), 560px); ${({$isVisible:e})=>e?re` visibility: visible; opacity: 1; transition: visibility 0.5s, opacity 0.3s ease-in-out; `:re` visibility: hidden; opacity: 0; transition: visibility 0.5s, opacity 0.3s ease-in-out; `} `,Jx=r.h6` font-size: 1.3rem; ${v.bold}; color: var(--color-textGray); margin-bottom: 16px; `,e1=r.div` margin-bottom: 16px; `,t1=r.div` display: flex; flex-direction: column; gap: 4px; `,n1=r.dl` display: flex; justify-content: space-between; align-items: center; dt { font-size: 1.2rem; ${v.regular}; color: var(--color-textGray); } dd { font-size: 1.2rem; color: ${({$isMaxBenefit:e})=>e?"var(--color-main)":"var(--color-textPrimary)"}; } `,o1=r.ul` display: flex; flex-direction: column; gap: 4px; `,r1=r.li` font-size: 1.2rem; ${v.regular}; color: #b3b4b9; &::before { content: '·'; width: 10px; display: inline-block; } `,i1=r.hr` border: 1px solid #e9eaef; margin: 8px 0; `,ve={Container:Zx,TooltipContainer:Xx,Title:Jx,PriceContainer:e1,DiscountListContainer:t1,DescriptionList:o1,DescriptionListItem:r1,DiscountList:n1,Line:i1},s1=({productNo:e,isEmployeeBenefit:n})=>{const{data:o}=Ee(),{data:i}=ko({productNo:e,memberNo:(o==null?void 0:o.memberNo)||0,options:{enabled:e!==0}}),{data:a}=No({memberNo:(o==null?void 0:o.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(o!=null&&o.memberNo)}}),l=new et,d=l.get("hm_aut"),u=l.get("wHmAut"),c=K?decodeURIComponent(d)||"undefined":u||"",{data:p}=Ro({data:{hmAut:c,userAgent:navigator.userAgent}}),{salePrice:x,additionalDiscountAmt:y,couponDiscountAmt:S,benefitPrice:f,employeeDiscountAmt:C}=Oo({productNo:e}),w=s.useMemo(()=>{if(!i||i.length===0)return S.value;const I=i.find(M=>{var $;return($=a==null?void 0:a.items)==null?void 0:$.some(F=>F.couponNo===M.couponNo)});if(!I)return S.value;const{discountInfo:k}=I,{discountRate:_,discountAmt:T,maxDiscountAmt:P,fixedAmt:j}=k;if(j)return T||0;{const $=x.value*(_||0)/100;return Math.min($,P)}},[i,a,S.value,x.value]),b=s.useMemo(()=>x.value-y.value-w,[x.value,y.value,w]),A=s.useMemo(()=>{if(!n)return C.value;const I=(p==null?void 0:p.data.remainEmployeePoint)||0,k=b,_=k*.3;return I>=_?k*(gi/100):Math.floor(I/10)*10},[n,C.value,b,p==null?void 0:p.data.remainEmployeePoint]),g=s.useMemo(()=>{if(!n)return f.value;const I=b-A;return Math.round(I/10)*10},[n,b,A,f.value]),E=s.useMemo(()=>{if(!n)return null;const I=x.value;return Math.round((I-g)/I*100)},[n,x.value,g]);return{salePrice:x,additionalDiscountAmt:y,couponDiscountAmt:S,benefitPrice:f,employeeDiscountAmt:C,actualCouponDiscountAmt:ue(w),actualBenefitPrice:ue(b),actualEmployeeDiscountAmt:ue(A),actualEmployeeBenefitPrice:ue(g),actualEmployeeDiscountRate:E}},oo=({productNo:e,isVisible:n,setIsVisible:o,isEmployeeBenefit:i,children:a})=>{const l=s.useRef(null);Is(l,()=>{o(!1)});const{salePrice:d,additionalDiscountAmt:u,actualCouponDiscountAmt:c,actualBenefitPrice:p,actualEmployeeDiscountAmt:x,actualEmployeeBenefitPrice:y,actualEmployeeDiscountRate:S}=s1({productNo:e,isEmployeeBenefit:i});return t.jsxs(ve.Container,{ref:l,children:[a,t.jsxs(ve.TooltipContainer,{$isVisible:n,children:[t.jsx(ve.Title,{children:"최대혜택"}),t.jsxs(ve.PriceContainer,{children:[t.jsxs(ve.DiscountListContainer,{children:[t.jsxs(ve.DiscountList,{children:[t.jsx("dt",{children:"판매가"}),t.jsx("dd",{children:d.format()})]}),t.jsxs(ve.DiscountList,{children:[t.jsx("dt",{children:"추가할인"}),t.jsx("dd",{children:u.multiply(-1).format()})]}),t.jsxs(ve.DiscountList,{children:[t.jsx("dt",{children:"쿠폰할인"}),t.jsx("dd",{children:c.multiply(-1).format()})]}),i&&t.jsxs(ve.DiscountList,{children:[t.jsxs("dt",{children:["임직원할인 (",S,"% )"]}),t.jsx("dd",{children:x.multiply(-1).format()})]})]}),t.jsx(ve.Line,{}),t.jsxs(ve.DiscountList,{$isMaxBenefit:!0,children:[t.jsx("dt",{children:"최대 혜택가"}),t.jsx("dd",{children:i?y.format():p.format()})]})]}),t.jsxs(ve.DescriptionList,{children:[t.jsx(ve.DescriptionListItem,{children:"상품 옵션에 따라 할인혜택이 상이할 수 있습니다."}),t.jsx(ve.DescriptionListItem,{children:"비회원 구매시 할인적용이 불가능할 수 있습니다."})]})]})]})},a1=({type:e="single",list:n})=>{const[o,i]=s.useState(()=>U(n,Qe(u=>u.isSelected),Xe(u=>u.id),ae)),a=s.useCallback(u=>{e==="single"&&i([u]),e==="multi"&&i(c=>[...c,u])},[e]),l=s.useMemo(()=>n.map(u=>({...u,isSelected:o.length>=1?o.includes(u.id):u.isSelected})),[n,o]),d=s.useMemo(()=>U(l,Qe(u=>u.isSelected),Hs),[l]);return{tabList:l,onTabClick:a,selectedTab:d}},ro=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"),c1=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14 10V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V10",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.66797 6.66675L8.0013 10.0001L11.3346 6.66675",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 10V2",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),l1=e=>s.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:20,cy:20,r:19.5,fill:"white",stroke:"#E9EAEF"}),s.createElement("path",{d:"M18.1811 16.3637L22.7266 20.9091L18.1811 25.4546",stroke:"#232634",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),d1=s.lazy(()=>D(()=>import("./index-BImpVMX0.js"),__vite__mapDeps([68,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,28,16,17,18,19,20,21,22,23,24,25,69,70,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),u1=s.lazy(()=>D(()=>import("./index-CeqtG6b7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),p1=s.lazy(()=>D(()=>Promise.resolve().then(()=>M0),void 0)),m1=()=>{var Uo,Go,Fo,zo,Vo,Yo,qo,Wo,Ko;const{openDialog:e}=Ct(),n=Ft(),o=we(),i=s.useMemo(()=>Number(n.productNo)||0,[n]),[a]=vt(),l=a.get("preview"),d=ee.getAccessToken(),u=!!(d!=null&&d.isEmployee),{data:c}=$o({productNo:i,searchParams:l?{preview:!!l}:{}}),{productSalePrice:p,salePrice:x,discountRate:y}=Oo({productNo:i}),S=xi(i),f=S?p:x,C=s.useMemo(()=>{if(c){const{baseInfo:L,brand:O}=c;return{title:`${xn(O)?"":`[${O==null?void 0:O.name}]`} ${ro(L.productName)}`,og:{title:`${xn(O)?"":`[${O==null?void 0:O.name}]`} ${ro(L.productName)}`,image:ir(L.imageUrls[0]??"")},meta:{title:`${xn(O)?"":`[${O==null?void 0:O.name}]`} ${ro(L.productName)}`,image:ir(L.imageUrls[0]??"")}}}},[c]),w=s.useMemo(()=>({loop:!0}),[]),{tabList:b,onTabClick:A,selectedTab:g}=a1({type:"single",list:[{id:"description",label:"상품설명",isSelected:!0},{id:"review",label:"후기",isSelected:!1},{id:"inquiry",label:"문의",isSelected:!1},{id:"partnerInfo",label:"판매자 정보",isSelected:!1}]}),E=({id:L,label:O})=>{if(c){if(L==="review"){const te=c.counter.reviewCnt;return`${O} ${te>=1e3?"999+":te}`}if(L==="inquiry"){const te=c.counter.inquiryCnt;return`${O} ${te>=1e3?"999+":te}`}return O}return O};s.useEffect(()=>{const L=sessionStorage.getItem("productDetailScrollY");if(!L)return;const O=sessionStorage.getItem("activeTab");O&&L&&A(O);const te=parseInt(L,10),ot=()=>{const lt=document.scrollingElement;lt?lt.scrollTop=te:window.scrollTo(0,te)},Zt=document.querySelectorAll("img");let Xt=0;Zt.length===0?requestAnimationFrame(()=>requestAnimationFrame(ot)):(Zt.forEach(lt=>{lt.complete?Xt++:lt.onload=()=>{Xt++,Xt===Zt.length&&requestAnimationFrame(()=>requestAnimationFrame(ot))}}),setTimeout(ot,200)),sessionStorage.removeItem("productDetailScrollY")},[A]);const I=s.useMemo(()=>{if(c)return JSON.parse(c.baseInfo.dutyInfo)},[c]),k=I?X(I.contents):!1,{isLogin:_}=Pe(),[T,P]=s.useState(!1),j=()=>{P(L=>!L)},[M,$]=s.useState(!1),F=()=>{$(L=>!L)},[pe,me]=s.useState(!1),Ne=async()=>{_||(await e("비회원 문의글 작성이 불가능합니다."),o({pathname:m.AUTH.LOGIN,search:`returnUrl=${m.PRODUCT.LIST}/${i}`})),me(L=>!L)},[ct,qt,Ve]=Qo(!1),[tt,wt,Q]=Qo(!1),ye=(L,O)=>{if(L.stopPropagation(),O==="maxBenefit"){Q(!1),qt();return}if(O==="employeeBenefit"){Ve(!1),wt();return}},ce=s.useMemo(()=>{if(c)try{return c.categories.length===0?void 0:U(c,ln("categories"),rt(L=>L.categories),Us,ln("categoryNo"))}catch(L){console.error(L)}},[c]),Wt=s.useMemo(()=>{if(!c)return"";const{contentHeader:L,content:O,contentFooter:te}=c.baseInfo;return U([L,O,te],Qe(ot=>!!ot),Xe(ot=>`
${ot}
`),Gs(""))},[c]),It=!xn(c==null?void 0:c.partnerNotice),Kt=()=>c!=null&&c.baseInfo.placeOriginLabel?c!=null&&c.baseInfo.placeOriginLabel.includes("직접입력")?c==null?void 0:c.baseInfo.placeOriginEtcLabel:c==null?void 0:c.baseInfo.placeOriginLabel:"상품 상세 참조";_o({product:c});const{data:be}=Ee(),{data:xe}=ko({productNo:i,memberNo:(be==null?void 0:be.memberNo)||0,options:{enabled:i!==0}}),R=U(xe,L=>L==null?void 0:L.some(O=>O.downloadable),L=>L||!1),{data:H}=No({memberNo:(be==null?void 0:be.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(be!=null&&be.memberNo)}}),Ye=U((H==null?void 0:H.items)||[],L=>L.some(O=>xe&&xe.length>0&&xe.some(te=>te.couponNo===O.couponNo))),Qt=xe&&xe.length>0,Mn=R||Qt&&Ye,Lt=s.useMemo(()=>{if(!xe||xe.length===0)return(c==null?void 0:c.price.couponDiscountAmt)||0;const L=xe.find(lt=>{var hn;return(hn=H==null?void 0:H.items)==null?void 0:hn.some(ns=>ns.couponNo===lt.couponNo)});if(!L)return(c==null?void 0:c.price.couponDiscountAmt)||0;const{discountInfo:O}=L,{discountRate:te,discountAmt:ot,maxDiscountAmt:Zt,fixedAmt:Xt}=O;if(Xt)return ot||0;{const hn=(((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0))*(te||0)/100;return Math.min(hn,Zt)}},[xe,H,c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt,c==null?void 0:c.price.couponDiscountAmt]),Bn=s.useMemo(()=>((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0)-((c==null?void 0:c.price.additionDiscountAmt)||0)-Lt,[c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt,c==null?void 0:c.price.additionDiscountAmt,Lt]),Mo=Lt>0&&Mn,Bo=s.useMemo(()=>{if(!Mn||Lt<=0)return null;const L=((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0),O=Lt/L*100;return Math.round(O)},[Mn,Lt,c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt]),Do=new et,Xi=Do.get("hm_aut"),Ji=Do.get("wHmAut"),es=K?decodeURIComponent(Xi)||"undefined":Ji||"",{data:Dn}=Ro({data:{hmAut:es,userAgent:navigator.userAgent}}),{data:nt}=Ci({data:{hmAut:(d==null?void 0:d.hmAut)||"",userAgent:navigator.userAgent}}),Ho=wi({isEmployee:u,errorCode:((Uo=nt==null?void 0:nt.data)==null?void 0:Uo.errorCode)||"",pointUsageAllowedStatus:((Go=nt==null?void 0:nt.data)==null?void 0:Go.pointUsageAllowedStatus)||"0",partnerNo:(Fo=c==null?void 0:c.partner)!=null&&Fo.partnerNo?String(c==null?void 0:c.partner.partnerNo):void 0,partnerNoSet:Array.from(((zo=nt==null?void 0:nt.data)==null?void 0:zo.partnerNoSet)||[])}),Hn=(Dn==null?void 0:Dn.data.remainEmployeePoint)||0,Un=s.useMemo(()=>{const L=Bn,O=L*.3,te=Hn>=O?L*.7:L-Hn;return Math.round(te/10)*10},[Hn,Bn]),ts=ue(Un),Gn=s.useMemo(()=>{if(!u)return null;const L=x.value,te=Math.round((L-Un)/L*100);return ue(te)},[Un,u,x.value]);return t.jsxs(N.ContainerWrapper,{children:[t.jsx(fs,{}),c&&t.jsxs(t.Fragment,{children:[t.jsx(Pr,{...C}),t.jsxs(N.ContentsContainerWrapper,{children:[t.jsx(_e,{...w,children:c.baseInfo.imageUrls.map(L=>{const O=L.includes("cdn-nhncommerce.com")||L.includes("nhncommerce.com");return t.jsx(Le,{children:t.jsx(yt,{src:O?`${L}?750x750`:L,srcSet:[O?`${L}?300x300 300w`:L,O?`${L}?450x450 450w`:L,O?`${L}?600x600 600w`:L,O?`${L}?900x900 900w`:L].join(", "),alt:c.baseInfo.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center"}})},L)})}),t.jsxs(N.ProductInfoContainer,{children:[t.jsx(N.ShareButton,{onClick:j,children:t.jsx(Ai,{})}),t.jsxs(N.InfoContentsContainer,{children:[t.jsxs("div",{children:[c.brand&&t.jsx(N.BrandNameLink,{to:{pathname:`${m.PRODUCT.BRAND.MAIN}/${c.brand.brandNo}`},children:t.jsx("p",{dangerouslySetInnerHTML:{__html:c.brand.name}})}),t.jsx(N.ProductName,{dangerouslySetInnerHTML:{__html:c.baseInfo.productName}}),t.jsxs(N.RateContainer,{children:[t.jsx(N.ReviewList,{children:Nn(c.reviewRate).map((L,O)=>t.jsx(N.ReviewListItem,{children:t.jsx(Ln,{rate:L,iconSize:{width:"11px",height:"11px"}})},O))}),t.jsx(N.Rate,{children:`(상품후기 ${c.counter.reviewCnt}건)`})]}),t.jsxs(N.PlaceOriginLabel,{children:["원산지: ",Kt()]}),t.jsxs(N.PriceContainer,{children:[Ho?t.jsxs(N.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:tt,setIsVisible:Q,isEmployeeBenefit:u,children:hi(i)?t.jsx(t.Fragment,{}):t.jsxs(N.MaxBenefit,{children:[t.jsx("span",{children:"임직원할인가"}),t.jsx(N.DiscountRate,{children:Gn==null?void 0:Gn.format({pattern:"#%"})}),t.jsx(N.SalePrice,{children:f.format()}),t.jsx(N.InfoButton,{onClick:L=>ye(L,"employeeBenefit"),children:t.jsx(an,{})})]})}),t.jsx(N.Price,{children:`${ts.format()}`})]}):!Ho&&Mo?t.jsxs(N.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:ct,setIsVisible:Ve,children:t.jsxs(N.MaxBenefit,{children:[t.jsx("span",{children:"쿠폰할인가"}),t.jsx(N.DiscountRate,{children:Bo?`${Bo}%`:y}),t.jsx(N.SalePrice,{children:f.format()}),t.jsx(N.InfoButton,{onClick:L=>ye(L,"maxBenefit"),children:t.jsx(an,{})})]})}),t.jsx(N.Price,{children:`${ue(Bn).format()}`})]}):S&&p.value!==x.value?t.jsxs(N.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:ct,setIsVisible:Ve,children:t.jsxs(N.MaxBenefit,{children:[t.jsx(N.SalePrice,{children:f.format()}),t.jsx(N.InfoButton,{onClick:L=>ye(L,"maxBenefit"),children:t.jsx(an,{})})]})}),t.jsx(N.Price,{children:x.format()})]}):t.jsx(N.Price,{children:f.format()}),Mo&&t.jsxs(N.CouponDownloadButton,{onClick:F,children:[t.jsx(c1,{}),t.jsx("span",{children:"쿠폰받기"})]})]})]}),t.jsxs(N.SubPayInfo,{children:["최대"," ",ue((c==null?void 0:c.price.accumulationAmtWhenBuyConfirm)||0).format({symbol:""}),"적립",c.baseInfo.accumulationUseYn==="Y"&&t.jsx(N.SubPayInfoLine,{}),c.baseInfo.accumulationUseYn==="Y"?((Vo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:Vo.limitValue)===0?"최대 100% 해피포인트 사용가능":`최대 ${ue(((Yo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:Yo.limitValue)||0).format({symbol:""})}${((qo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:qo.unitType)==="AMOUNT"?"":"%"} 해피포인트 사용가능`:null]})]}),t.jsx(de,{children:t.jsx(ah,{})})]}),t.jsxs(N.ProductInfoContainer,{children:[t.jsx(N.ProductInfoTitle,{children:"상품정보"}),t.jsx(N.ProductInfoContentsContainer,{children:((Wo=c.deliveryFee)==null?void 0:Wo.defaultDeliveryConditionLabel)&&t.jsxs(N.ProductInfo,{children:[t.jsx("dt",{children:"배송비"}),t.jsx("dd",{children:(Ko=c.deliveryFee)==null?void 0:Ko.defaultDeliveryConditionLabel})]})})]}),t.jsx(de,{children:t.jsx(yr,{title:"판매자의 다른 상품",searchParams:{filter:{excludeMallProductNo:i},partnerNo:c.partner.partnerNo,order:{by:"POPULAR",direction:"DESC"},pageNumber:1,pageSize:10,hasTotalCount:!1},moreSlide:t.jsx(N.MoreSwiperSlide,{children:t.jsxs(N.MoreLink,{to:{pathname:`${m.PRODUCT.PARTNER.MAIN}/${c.partner.partnerNo}`},children:[t.jsx(l1,{}),t.jsx("span",{children:"더보기"})]})})})}),t.jsxs(N.Container,{children:[t.jsx(N.TabList,{role:"tablist",children:b.map(({id:L,label:O,isSelected:te})=>t.jsx(N.TabListItem,{role:"presentation",$isSelected:te,children:t.jsx("button",{role:"tab",id:L,"aria-selected":te,"aria-controls":L,onClick:()=>A(L),dangerouslySetInnerHTML:{__html:E({id:L,label:O})}})},L))}),t.jsxs(N.ContentsContainer,{children:[(g==null?void 0:g.id)==="description"&&It&&t.jsxs(N.PartnerNotice,{children:[t.jsx("h2",{children:"공지사항"}),t.jsx(N.PartnerNoticeContent,{dangerouslySetInnerHTML:{__html:c.partnerNotice.content}})]}),t.jsx(N.Description,{id:"description",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="description","aria-labelledby":"description",dangerouslySetInnerHTML:{__html:Wt}}),t.jsx("section",{id:"review",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="review","aria-labelledby":"review",children:t.jsx(de,{children:t.jsx(Qx,{productNo:i,reviewRate:c.reviewRate})})}),t.jsx(N.ProductInquiry,{id:"inquiry",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="inquiry","aria-labelledby":"inquiry",children:t.jsx(de,{children:t.jsx(ix,{productNo:i,onButtonClick:Ne})})}),t.jsx(N.PartnerInfo,{id:"partnerInfo",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="partnerInfo","aria-labelledby":"partnerInfo",children:t.jsx(m0,{partner:c.partner})})]})]}),t.jsx(de,{children:t.jsx(yr,{title:"동일 카테고리 특가 상품",searchParams:{filter:{excludeMallProductNo:i},categoryNos:(ce==null?void 0:ce.toString())??"",order:{by:"POPULAR",direction:"DESC"},pageNumber:1,pageSize:10,hasTotalCount:!1}})}),t.jsxs(N.Container,{children:[!k&&t.jsx(N.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(uh,{dutyInfo:c.baseInfo.dutyInfo})}),(c==null?void 0:c.deliveryGuide)&&t.jsx(N.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"배송안내",children:t.jsx(N.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.deliveryGuide}})})}),(c==null?void 0:c.refundGuide)&&t.jsx(N.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"AS 안내",children:t.jsx(N.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.refundGuide}})})}),(c==null?void 0:c.afterServiceGuide)&&t.jsx(N.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"교환안내",children:t.jsx(N.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.afterServiceGuide}})})}),(c==null?void 0:c.exchangeGuide)&&t.jsx(N.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"환불안내",children:t.jsx(N.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.exchangeGuide}})})})]})]}),t.jsx(Gi,{productNo:i})]}),t.jsx(u1,{isVisible:T,setIsVisible:P,isEventBoard:!1}),t.jsx(d1,{productNo:i,isVisible:M,setIsVisible:$}),t.jsx(p1,{productNo:i,productName:(c==null?void 0:c.baseInfo.productName)??"",isVisible:pe,setIsVisible:me})]})},h1=r(Je.div)` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); z-index: 999; `,x1=r(Je.section)` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2000; display: flex; flex-direction: column; width: 100%; max-width: 600px; height: 100vh; background-color: var(--color-black); color: var(--color-white); `,g1=r.button` position: absolute; top: 20px; right: 20px; z-index: 10; svg { width: 14px; height: 14px; path { stroke: var(--color-white); } } `,f1=r.div` height: 100%; .swiper-pagination-fraction { padding: 17px; font-size: 1.8rem; } .swiper-wrapper { display: flex; align-items: center; } .swiper-slide { height: auto; max-height: calc(100% - 90px); overflow: hidden; } `,An={Dimmed:h1,Container:x1,CloseButton:g1,Contents:f1},y1=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L15 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15 1L1 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),C1=({isVisible:e,setIsVisible:n,review:o,initialIndex:i,...a})=>{So({isLock:e});const l=()=>{n(!1)},d=s.useMemo(()=>({modules:[kn],loop:!0,pagination:{type:"fraction"},initialSlide:i,grabCursor:!0}),[i]);return wr.createPortal(t.jsxs(t.Fragment,{children:[t.jsx(An.Dimmed,{onClick:u=>{u.stopPropagation(),n(!1)},initial:{opacity:0},animate:{opacity:[0,1]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"}},"dimmedreviewImageModal"),t.jsxs(An.Container,{initial:{top:"51%",opacity:0},animate:{top:"50%",opacity:[0,1]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},...a,children:[t.jsx(An.CloseButton,{onClick:l,children:t.jsx(y1,{})}),t.jsx(An.Contents,{children:t.jsx(_e,{...d,style:{display:"flex",flexDirection:"column-reverse",alignItems:"center",justifyContent:"space-between",height:"100%"},children:o.map((u,c)=>{const p=u.includes("cdn-nhncommerce.com")||u.includes("nhncommerce.com");return t.jsx(Le,{children:t.jsx(yt,{src:p?`${u}?600x600`:u,srcSet:[p?`${u}?300x300 300w`:u,p?`${u}?450x450 450w`:u,p?`${u}?900x900 900w`:u].join(", "),alt:o[c],loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",height:"auto",objectFit:"cover",objectPosition:"center"}})},u)})})})]},"reviewImageModal")]}),document.querySelector("#modal"))},w1=({productNo:e,reviewNo:n,options:o})=>ie({queryKey:ge.detail(e,n),queryFn:async()=>{const{data:i}=await li.getProductReview(e,n);return i},enabled:!!e&&!!n,...o}),E1="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC2SURBVHgB7dfRCYMwFEbhO0pHcAQ3SUboCN2ko3WEjnAbaQIpaKJWyL1wPgj4Ip5ffFEEAAAAuIqqzuk80rmJNyk66K9JvFiJX9zFg414dfEZNeKjWEf8KMT/8eB3Oq/lWk7QkW8+h9cOjdDRn01++3pmxPD4HBE3IkLnvjA8voo5NMJUfBW1a4TJ+KI3wnR80RjxNB9fNEbYjy92jIhiXWNEFC9WRkTxJkVP+v0hnwUAAADo+QDHm+diOYlo6AAAAABJRU5ErkJggg==",b1=r.div` background-color: var(--color-white); `,S1=r.div``,Yi=r(_e)``,qi=r(Le)` aspect-ratio: 1/1; overflow: hidden; `,v1=r.div` padding: 20px; `,Wi=r(_e)``,Ki=r(Le)` position: relative; aspect-ratio: 1/1; overflow: hidden; width: clamp( 48px, calc(48px + (16 * ((100vw - 375px) / (600 - 375)))), 64px ); height: clamp( 48px, calc(48px + (16 * ((100vw - 375px) / (600 - 375)))), 64px ); border-radius: clamp( 4px, calc(4px + (2.5 * ((100vw - 375px) / (600 - 375)))), 6.5px ); ${e=>e.$isActive&&re` &::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); } &::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ${sa(E1)} background-repeat: no-repeat; background-position: center; background-size: 32px; @media (max-width: 600px) { background-size: 24px; } } `} `;Yi.displayName="SwiperWrapper";qi.displayName="SwiperSlide";Wi.displayName="SwiperWrapper";Ki.displayName="SwiperSlide";const T1=r.div` display: flex; flex-direction: column; gap: 8px; padding: 0 20px; `,mt={Container:b1,MainImage:S1,MainSwiper:Yi,MainSwiperSlide:qi,ThumbnailImage:v1,ThumbSwiper:Wi,ThumbSwiperSlide:Ki,ContentsContainer:T1},A1=()=>{const e=Ft(),n=e.productNo,o=e.reviewNo,a=Fe().state.initialIndex,{data:l}=w1({productNo:Number(n),reviewNo:Number(o)}),[d,u]=s.useState(null),[c,p]=s.useState(null),[x,y]=s.useState(a),S=yo("(max-width: 600px)"),f=s.useMemo(()=>({modules:[Xo,kn],loop:!0,grabCursor:!0,initialSlide:a,...c?{thumbs:{swiper:c}}:{},onSlideChange:T=>{y(T.realIndex)}}),[a,c]),C=s.useMemo(()=>({modules:[Xo],loop:!1,spaceBetween:S?2:4,watchSlidesProgress:!0,slidesPerView:"auto",initialSlide:a}),[a,S]),[w,b]=s.useState(!1),A=T=>{b(!0),y(T)},g=at(),{pathname:E}=Fe(),{isLogin:I}=Pe(),{data:k}=Ee(),{data:_}=Po({memberId:(k==null?void 0:k.memberId)||(k==null?void 0:k.memberNo.toString())||"",options:{enabled:I}});return s.useEffect(()=>{if(!K)return;const T=To.find(({name:M,url:$})=>se(((pe,me)=>pe==="카테고리"?m.CATEGORIES.DETAIL:me)(M,$),E)),P={visibility:!w,title:(T==null?void 0:T.name)||"",items:w?[]:[{type:"search",url:"https://happymarket.happypointcard.com/hm_front/product/search/list"},{type:"basket",url:"https://happymarket.happypointcard.com/hm_front/cart/list",notice:_?_.count.toString():"0"}]},j={visibility:!1};if(g==="AOS"){window.android.setHeaderProperty(JSON.stringify(P)),window.android.setNaviProperty(JSON.stringify(j));return}else{window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(P)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(j));return}},[_,w,E,g]),l&&t.jsxs(mt.Container,{children:[t.jsx(mt.MainImage,{children:t.jsx(mt.MainSwiper,{...f,onSwiper:u,children:l==null?void 0:l.fileUrls.map((T,P)=>{const j=T.includes("cdn-nhncommerce.com")||T.includes("nhncommerce.com");return t.jsx(mt.MainSwiperSlide,{onClick:()=>A(P),children:t.jsx(yt,{src:j?`${T}?600x600`:T,srcSet:[j?`${T}?300x300 300w`:T,j?`${T}?450x450 450w`:T,j?`${T}?900x900 900w`:T].join(", "),alt:l.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center"}})},T)})})}),t.jsx(mt.ThumbnailImage,{children:t.jsx(mt.ThumbSwiper,{...C,onSwiper:p,children:l==null?void 0:l.fileUrls.map((T,P)=>{const j=P===x,M=T.includes("cdn-nhncommerce.com")||T.includes("nhncommerce.com");return t.jsx(mt.ThumbSwiperSlide,{$isActive:j,onClick:()=>{d&&d.slideToLoop(P)},children:t.jsx(yt,{src:M?`${T}?40x40`:T,srcSet:[M?`${T}?30x30 30w`:T,M?`${T}?45x45 45w`:T,M?`${T}?60x60 60w`:T,M?`${T}?90x90 90w`:T].join(", "),alt:l.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center",cursor:"pointer"}})},T)})})}),t.jsxs(mt.ContentsContainer,{children:[t.jsxs(q.ReviewHeader,{children:[t.jsxs(q.NameContainer,{children:[t.jsx(q.ContentsStarList,{children:Nn((l==null?void 0:l.rate)??0).map((T,P)=>t.jsx(q.ContentsStarListItem,{children:t.jsx(Ln,{rate:T,iconSize:{width:"11px",height:"11px"}})},P))}),t.jsx(q.MemberName,{children:l==null?void 0:l.registerName})]}),t.jsx(q.RegisterYmdt,{children:Y(l==null?void 0:l.registerYmdt).format("YYYY.MM.DD")})]}),t.jsx(q.ProductName,{children:l==null?void 0:l.productName}),t.jsx(q.Contents,{children:l==null?void 0:l.content})]}),t.jsx(Gi,{productNo:Number(n)}),w&&t.jsx(C1,{isVisible:w,setIsVisible:b,review:l.fileUrls,initialIndex:x})]})},P1=r.div` height: 300px; ${z}; flex-direction: column; gap: 16px; ${v.regular}; background: #fff; animation: ${At} 0.3s ease-in-out; > p { text-align: center; font-size: 1.6rem; color: var(--color-textLightGray); } `,j1=r(W)` ${z}; background: var(--color-sub); color: var(--color-white); height: 44px; padding: 0 16px; border-radius: 24px; font-size: 1.6rem; line-height: 0; margin-top: 16px; `,Cr={Container:P1,MarketLink:j1},I1=({text:e="검색 결과가 없습니다.",isMarketLink:n=!1,icon:o,...i})=>t.jsxs(Cr.Container,{...i,children:[o&&o,t.jsx("p",{dangerouslySetInnerHTML:{__html:e}}),n&&t.jsx(Cr.MarketLink,{to:m.BEST,children:"마켓 랭킹 보기"})]}),L1=({size:e=10,options:n})=>ie({queryKey:["favoriteKeywords",{size:e}],queryFn:async()=>{const{data:o}=await Vt.getFavoriteKeywords({size:e});return o},staleTime:1e3*60*5,gcTime:1e3*60*5,...n}),N1=r.div` padding: 8px 20px 20px; background: #fff; `,k1=r.div` margin-bottom: 20px; `,R1=r.label` border-radius: 100px; border: 1px solid #e9eaef; padding: 15px 19px; width: 100%; display: flex; align-items: center; > svg { margin-right: 10px; } input { width: 100%; &::placeholder { font-size: 1.5rem; color: #b3b4b9; } } `,$1=r.div``,O1=r.div` margin-bottom: 32px; `,_1=r.div` display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; `,M1=r.div` font-size: 1.8rem; ${v.bold}; color: var(--color-textSecondary); `,B1=r.div``,D1=r.button` color: #232634; ${v.medium}; font-size: 1.4rem; `,H1=r.ul``,U1=r.li` display: flex; justify-content: space-between; align-items: center; &:not(:last-child) { margin-bottom: 12px; } `,G1=r.button` color: var(--color-textPrimary); font-size: 1.5rem; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; `,F1=r.button``,z1=r.div``,V1=r.p` color: #84858a; font-size: 1.2rem; `,Y1=r.ul` display: flex; flex-wrap: wrap; gap: 8px 6px; `,q1=r.li` > a { border: 1px solid #e9eaef; border-radius: 100px; text-align: center; color: var(--color-textPrimary); font-size: 1.4rem; width: fit-content; padding: 11px 16px; } `,W1=r.div``,K1=r.div` aspect-ratio: 67 / 24; &:not(:last-child) { margin-bottom: 8px; } `,Q1=r.div` opacity: ${({$isFetching:e})=>e?.5:1}; `,Z1=r.p` font-size: 1.4rem; color: var(--color-textSecondary); > span { ${v.bold}; color: var(--color-highlight); } `,X1=r.div``,J1=r.ul` display: flex; flex-wrap: wrap; gap: 24px 11px; margin-bottom: 22px; > li { width: calc((50%) - 5.5px); } `,eg=r.button` width: 100%; padding: 10px; border: 1px solid #e9eaef; border-radius: 8px; `,tg=r.div``,ng=r.div` height: 1px; margin-top: 20px; visibility: hidden; `,B={Container:N1,SearchInputContainer:k1,SearchInputLabel:R1,SearchContainer:$1,Section:O1,SectionHeader:_1,SectionTitle:M1,RecentKeywordContainer:B1,RecentKeywordDeleteAllButton:D1,RecentKeywordList:H1,RecentKeywordListItem:U1,RecentKeyword:G1,RecentKeywordDeleteButton:F1,PopularKeywordContainer:z1,PopularKeywordDate:V1,PopularKeywordList:Y1,PopularKeywordListItem:q1,ExhibitionContainer:W1,Exhibition:K1,SearchResultContainer:Q1,SearchResultTitle:Z1,SearchResultSortContainer:X1,ProductList:J1,NoSearchResultContainer:tg,MoreButton:eg,ObserverTarget:ng},og=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M13.5 13.5L4.5 4.5",stroke:"#B3B4B9",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M13.5 4.5L4.49997 13.5",stroke:"#B3B4B9",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),rg=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21 21L16.6569 16.6569M16.6569 16.6569C18.1046 15.2091 19 13.2091 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C13.2091 19 15.2091 18.1046 16.6569 16.6569Z",stroke:"#2E2E34",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ig=()=>{const{openDialog:e}=Ct(),n=we(),[o,i]=vt({keyword:"",pageNumber:"1",pageSize:"30",by:Te[0].by,direction:Te[0].direction,sortValue:Te[0].value}),a=o.get("keyword")??"",l=o.get("pageNumber")||"1",d=o.get("pageSize")||"30",u=o.get("by")||Te[0].by,c=o.get("direction")||Te[0].direction,p=o.get("sortValue")||Te[0].value,x=R=>{i(H=>({...H,keyword:R,by:Te[0].by,direction:Te[0].direction,pageNumber:"1"}),{replace:!0})},y=R=>{i(H=>({...H,keyword:a,pageNumber:"1",by:R.by,direction:R.direction,sortValue:R.value}),{replace:!0})},[S,f]=s.useState("beforeSearch"),[C,w]=Er("keywordList",[]);s.useEffect(()=>{const H=Date.now()-7*24*60*60*1e3;w(Ye=>U(Ye,Qe(Qt=>Qt.id>H),ae))},[w]),s.useEffect(()=>{if(K)try{window.scrollTo(0,0)}catch{}},[]);const b=R=>{w(H=>U(H,Qe(Ye=>Ye.keyword!==R),cn(9),zs({id:Date.now(),keyword:R}),ae))},A=R=>{var Ye;const H=(Ye=C.find(Qt=>Qt.id===R))==null?void 0:Ye.keyword;H&&(b(H),x(H))},g=R=>{U(C,Qe(H=>H.id!==R),ae,Fs(w))},E=()=>{w([])},{data:I}=L1({size:8}),{fetchNextPage:k,hasNextPage:_,data:T,isFetching:P,isFetchingNextPage:j}=ki({searchParams:{filter:{keywords:a},pageNumber:Number(l),pageSize:Number(d),order:{by:u,direction:c}},options:{enabled:!!a,placeholderData:Oe}}),{ref:M}=Ls({threshold:.1,onChange:R=>{R&&_&&k()}});s.useEffect(()=>{if(!a){f("beforeSearch");return}if(P&&!j){f("searching");return}if(T&&T.pages[0].data.totalCount>0){f("result");return}f("noResult")},[T,P,j,a]);const[$,F]=s.useState(""),pe=R=>{F(R.target.value)},me=R=>{if(R.preventDefault(),!$){e("검색어를 입력해주세요.");return}b($),x($)};s.useEffect(()=>{a&&F(a)},[a]);const{data:Ne}=jt({banners:[Pt.SEARCH_PAGE_BANNER]}),ct=s.useMemo(()=>!Ne||!Ne[0]?[]:U(Ne[0].accounts[0].banners,un(R=>R.bannerNo),cn(2),ae),[Ne]),qt=Y().format("YYYY.MM.DD");_o({searchedProduct:T==null?void 0:T.pages[0].data.items}),s0(a);const Ve=s.useMemo(()=>ct.filter(R=>R.name.includes("adult")),[ct]),[tt,wt]=s.useState(null),Q=R=>{wt(R)},ye=()=>{wt(null)},{data:ce}=Ee(),Wt=(ce==null?void 0:ce.adultCertificated)||!1,It=ce!=null&&ce.adultCertificatedYmdt?Y(ce.adultCertificatedYmdt):null,Kt=Y().subtract(3,"month"),be=!Wt||!It||It.isBefore(Kt),xe=R=>{be?Q(R):n(R.landingUrl)};return t.jsxs(t.Fragment,{children:[t.jsxs(B.Container,{children:[t.jsx(B.SearchInputContainer,{children:t.jsx("form",{onSubmit:me,children:t.jsxs(B.SearchInputLabel,{children:[t.jsx(rg,{}),t.jsx("input",{placeholder:"찾으시는 상품이 있으신가요?",onChange:pe,value:$})]})})}),S==="beforeSearch"&&t.jsxs(B.SearchContainer,{children:[C.length>0&&t.jsxs(B.Section,{children:[t.jsxs(B.SectionHeader,{children:[t.jsx(B.SectionTitle,{children:"최근 검색어"}),t.jsx(B.RecentKeywordDeleteAllButton,{onClick:E,children:"전체 삭제"})]}),t.jsx(B.RecentKeywordContainer,{children:t.jsx(B.RecentKeywordList,{children:C.map(({keyword:R,id:H})=>t.jsxs(B.RecentKeywordListItem,{children:[t.jsx(B.RecentKeyword,{onClick:()=>A(H),children:R}),t.jsx(B.RecentKeywordDeleteButton,{onClick:()=>g(H),children:t.jsx(og,{})})]},H))})})]}),t.jsxs(B.Section,{children:[t.jsxs(B.SectionHeader,{children:[t.jsx(B.SectionTitle,{children:"인기 검색어"}),t.jsxs(B.PopularKeywordDate,{children:[qt," 기준"]})]}),t.jsx(B.PopularKeywordContainer,{children:t.jsx(B.PopularKeywordList,{children:I==null?void 0:I.map((R,H)=>t.jsx(B.PopularKeywordListItem,{children:t.jsxs(W,{to:`${m.SEARCH}?keyword=${R}`,replace:!0,children:["#",R]})},H))})})]}),t.jsxs(B.Section,{children:[t.jsx(B.SectionHeader,{children:t.jsx(B.SectionTitle,{children:"기획전"})}),t.jsx(B.ExhibitionContainer,{children:ct.map(R=>t.jsx(B.Exhibition,{children:t.jsx(oi,{banner:R,isAdultBanner:Ve==null?void 0:Ve.some(H=>H.bannerNo===R.bannerNo),onAdultClick:()=>xe(R)})},R.bannerNo))})]})]}),S==="searching"&&t.jsx(We,{style:{height:"auto",padding:"56px 0"}}),S==="result"&&t.jsxs(B.SearchResultContainer,{$isFetching:j,children:[t.jsxs(B.SectionHeader,{children:[t.jsxs(B.SearchResultTitle,{children:[t.jsx("span",{children:(T==null?void 0:T.pages[0].data.totalCount)||0}),"개의 검색결과"]}),t.jsx(B.SearchResultSortContainer,{children:t.jsx(_n,{dropdownList:Te,onSelect:R=>{y(R)},selectedValue:Te.find(R=>R.value===p)})})]}),t.jsx(B.ProductList,{children:T==null?void 0:T.pages.map(R=>R.data.items.map((H,Ye)=>t.jsx("li",{children:t.jsx(Yt,{products:{...H,isListCard:!1},index:Ye})},H.productNo)))}),_&&t.jsx(B.ObserverTarget,{ref:M})]}),S==="noResult"&&t.jsxs(B.NoSearchResultContainer,{children:[t.jsx(I1,{text:`검색 결과가 없습니다.
다른 키워드로 검색해보세요`,style:{color:"#c2c3c8",height:"auto",padding:"56px 0",margin:" 0 -20px 20px",borderBottom:"8px solid #f2f3f5"}}),t.jsxs(B.Section,{children:[t.jsxs(B.SectionHeader,{children:[t.jsx(B.SectionTitle,{children:"인기 검색어"}),t.jsxs(B.PopularKeywordDate,{children:[qt," 기준"]})]}),t.jsx(B.PopularKeywordContainer,{children:t.jsx(B.PopularKeywordList,{children:I==null?void 0:I.map((R,H)=>t.jsx(B.PopularKeywordListItem,{children:t.jsxs(W,{to:`${m.SEARCH}?keyword=${R}`,replace:!0,children:["#",R]})},H))})})]})]})]}),t.jsx(zt,{isVisible:!!tt,setIsVisible:ye,redirectUrl:tt==null?void 0:tt.landingUrl})]})},sg=({sectionId:e,params:n})=>Ut({queryKey:["infiniteDisplaySection",{sectionId:e,params:n}],queryFn:async({pageParam:o})=>{const{data:i}=await El.getDisplaySection(e,{...n,pageNumber:o});return{data:i,pageNumber:o}},getNextPageParam:(o,i)=>{if(n.pageSize)return n.pageSize*i.length * { margin: 10px auto; } `,ht={Container:ag,BannerSection:cg,ProductSection:lg,SortContainer:dg,SortTotalCount:ug,SortDropdown:pg,ProductList:mg,ProductListItem:hg,Nodata:xg,NodataText:gg,ExhibitionTitle:fg,MoreButton:yg,SpinnerContainer:Cg},wg=e=>s.createElement("svg",{width:6,height:10,viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L5 5L1 9",stroke:"#007AFB",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Eg=()=>{const{data:e,fetchNextPage:n,hasNextPage:o,isFetched:i,isFetching:a}=sg({sectionId:"SPECIAL_DEAL",params:{by:"ADMIN_SETTING",soldout:!0,saleStatus:"ONSALE",pageNumber:1,pageSize:20,hasTotalCount:!0,hasOptionValues:!1,includeStopProduct:!1}}),l=On({threshold:400});s.useEffect(()=>{!o||!l||n()},[o,l]);const d=(e==null?void 0:e.pages.flatMap(c=>c.data.products))||[],u=as({queries:d.map(({productNo:c})=>({queryKey:De.detailByProduct(c),queryFn:async()=>{const{data:p}=await mn.getEventsByProduct(c);return p},enabled:!!c})),combine:c=>c.map((p,x)=>{const y=d[x];return y&&p.data?{productNo:y.productNo,events:p.data.filter(S=>S.progressStatus==="ING")}:null})});return t.jsx(ht.Container,{children:i?t.jsx(ht.ProductSection,{children:X(e==null?void 0:e.pages[0].data.products)?t.jsx(ht.Nodata,{children:t.jsx(ht.NodataText,{children:"특가 상품이 존재하지 않습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(ht.ProductList,{children:e==null?void 0:e.pages.flatMap(c=>c.data.products.map((p,x)=>{var f;const y=u.find(C=>(C==null?void 0:C.productNo)===p.productNo),S=(f=y==null?void 0:y.events)==null?void 0:f[0];return t.jsxs(ht.ProductListItem,{children:[t.jsx(Yt,{products:p,index:x}),S&&t.jsx(ht.ExhibitionTitle,{to:`${m.EXHIBITIONS.LIST}/${S.eventNo}`,children:t.jsxs("p",{children:[t.jsx("span",{children:S.label}),t.jsx(wg,{})]})})]},p.productNo)}))}),a&&t.jsx(ht.SpinnerContainer,{children:t.jsx(Lo,{})})]})}):t.jsx(We,{style:{height:"50vh"}})})},G=e=>s.lazy(async()=>{const n=JSON.parse(window.sessionStorage.getItem("pageRefreshed")??"false");try{const o=await e();return window.sessionStorage.setItem("pageRefreshed","false"),o}catch(o){if(!n)return window.sessionStorage.setItem("pageRefreshed","true"),window.location.reload();throw o}}),bg=G(()=>D(()=>import("./index-ChELz-bD.js"),__vite__mapDeps([71,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,72,27,73,74,28,45,46,47,41,39,40,42,21,22,23,24,25,31,32,33,34,35,36,37,38,29,30,26,43,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Sg=G(()=>D(()=>import("./index-3Mp7MxV1.js"),__vite__mapDeps([75,1,2,3,4,5,6,7,8,9,10,11,12,13,76,77,72,16,17,18,19,20,39,27,40,28,59,60,22,23,24,25,61,62,63,21,67,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),vg=G(()=>D(()=>import("./index-C35ei4hp.js"),__vite__mapDeps([78,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,16,17,18,19,20,21,22,23,24,25,70,28,72,69,79,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Tg=G(()=>D(()=>import("./index-sy0ovtUk.js"),__vite__mapDeps([80,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,16,17,18,19,20,28,29,30,81,59,60,22,23,24,25,61,62,63,21,67,82,83,84,85,86,42,31,32,33,34,35,36,37,38,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),Ag=G(()=>D(()=>import("./index-zthRzg20.js"),__vite__mapDeps([87,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,39,72,88,28,21,22,23,24,25,89,90,91,27,92,93,74,45,46,47,41,94,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Pg=G(()=>D(()=>import("./index-CAqiKbio.js"),__vite__mapDeps([95,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,96,97,98,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),jg=G(()=>D(()=>import("./index-DJSPnbGe.js").then(e=>e.i),__vite__mapDeps([99,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,56,16,17,18,19,20,29,30,21,22,23,24,25,81,59,60,61,62,63,55,40,28,100,73,74,45,46,47,41,82,96,53,54,101,102,26,103,104,105,106,86,42]))),Ig=G(()=>D(()=>import("./index-Ci3f8NGl.js"),__vite__mapDeps([107,1,2,3,4,5,6,7,8,9,10,11,12,13,39,16,17,18,19,20,53,54,103,27,28,97,74,45,46,47,41,21,22,23,24,25,83,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,55,56,57,58,59,60,61,62,63,64,65]))),Qi=G(()=>D(()=>import("./index-CNIyHpvy.js"),__vite__mapDeps([108,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,55,56,40,16,17,18,19,20,92,93,28,109,74,45,46,47,41,81,59,60,22,23,24,25,61,62,63,21,101,82,91,100,104,105,84,85,31,32,33,34,35,36,37,38,29,30,26,42,43,44,14,15,48,49,50,51,52,53,54,57,58,64,65]))),Lg=G(()=>D(()=>import("./index-C-PBqvh1.js"),__vite__mapDeps([110,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,39,72,88,28,21,22,23,24,25,89,90,91,27,92,93,74,45,46,47,41,94,86,42,31,32,33,34,35,36,37,38,29,30,26,40,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Ng=G(()=>D(()=>import("./index-Ceem7Kx7.js"),__vite__mapDeps([111,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,112,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),kg=G(()=>D(()=>import("./index-DzjXPzri.js"),__vite__mapDeps([113,1,2,3,4,5,6,7,8,9,10,11,12,13,82,17,18,21,22,23,24,25,72,16,19,20,114,115,112,27,93,28,31,32,33,34,35,36,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Rg=G(()=>D(()=>import("./index-BBda-CXF.js"),__vite__mapDeps([116,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,96,98,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),$g=G(()=>D(()=>import("./index-CMK4F61w.js"),__vite__mapDeps([117,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,114,21,22,23,24,25,115,27,92,94,31,32,33,34,35,36,37,38,29,30,39,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Og=G(()=>D(()=>import("./index-B_yvm1rI.js"),__vite__mapDeps([118,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,28,16,17,18,19,20,89,21,22,23,24,25,72,114,86,42,31,32,33,34,35,36,37,38,29,30,26,40,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),_g=G(()=>D(()=>import("./index-DwqpbtHC.js"),__vite__mapDeps([119,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,114,21,22,23,24,25,120,39,27,56,109,82,85,31,32,33,34,35,36,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65]))),Mg=G(()=>D(()=>import("./index-Dg4w46_I.js"),__vite__mapDeps([121,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,72,120,39,27,56,109,82,21,22,23,24,25,85,114,31,32,33,34,35,36,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65]))),Bg=G(()=>D(()=>import("./index-DXyIS5YC.js"),__vite__mapDeps([122,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,82,17,18,21,22,23,24,25,72,16,19,20,28,123,105,41,104,106,86,42,31,32,33,34,35,36,37,38,29,30,26,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Dg=G(()=>D(()=>import("./index-BYSs-brk.js"),__vite__mapDeps([124,1,2,3,4,5,6,7,8,9,10,11,12,13,27,56,125,21,22,23,24,25,28,106,17,18,31,32,33,34,35,36,16,19,20,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,82,72,100,123,105]))),Hg=G(()=>D(()=>import("./index-Db2udMaS.js"),__vite__mapDeps([126,1,2,3,4,5,6,7,8,9,10,11,12,13,27,40,56,16,17,18,19,20,125,21,22,23,24,25,28,106,31,32,33,34,35,36,37,38,29,30,39,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,82,72,100,123,105]))),Zi=G(()=>D(()=>import("./index-CNhqpshN.js"),__vite__mapDeps([127,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,56,16,17,18,19,20,74,28,45,46,47,41,125,21,22,23,24,25,106,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,81,82,100]))),Ug=G(()=>D(()=>import("./index-CbjDq0if.js"),__vite__mapDeps([128,1,2,3,4,5,6,7,8,9,10,11,12,13,39,21,22,23,24,25,27,28,45,46,47,41,19,20,17,18,31,32,33,34,35,36,16,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Gg=G(()=>D(()=>import("./index-BZzfdXfb.js"),__vite__mapDeps([129,1,2,3,4,5,6,7,8,9,10,11,12,13,39,29,30,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Fg=G(()=>D(()=>import("./index-Ccw_8hTk.js"),__vite__mapDeps([130,1,2,3,4,5,6,7,8,9,10,11,12,13,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),zg=G(()=>D(()=>import("./index-CkK47dnX.js"),__vite__mapDeps([131,1,2,3,4,5,6,7,8,9,10,11,12,13,27,40,16,17,18,19,20,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Vg=G(()=>D(()=>import("./index-Cf3UiNBX.js"),__vite__mapDeps([132,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,27,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,40,28,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Yg=G(()=>D(()=>import("./index-B9Xd7xqa.js"),__vite__mapDeps([133,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,27,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,40,28,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),qg=G(()=>D(()=>import("./index-cic-jDFA.js"),__vite__mapDeps([134,1,2,3,4,5,6,7,8,9,10,11,12,13,39,16,17,18,19,20,135,27,28,79,21,22,23,24,25,31,32,33,34,35,36,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Wg=G(()=>D(()=>import("./index-EJTNafFs.js"),__vite__mapDeps([136,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,28,39,135,27,21,22,23,24,25,79,31,32,33,34,35,36,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Kg=G(()=>D(()=>import("./index-BRGw4mpU.js"),__vite__mapDeps([137,1,2,3,4,5,6,7,8,9,10,11,12,13,28,21,22,23,24,25,19,20,17,18,27,31,32,33,34,35,36,16,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Qg=G(()=>D(()=>import("./index-CEDmpLP5.js"),__vite__mapDeps([138,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,28,16,17,18,19,20,72,21,22,23,24,25,86,42,31,32,33,34,35,36,37,38,29,30,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Zg=G(()=>D(()=>import("./index-i9raWCVA.js"),__vite__mapDeps([139,1,2,3,4,5,6,7,8,9,10,11,12,13,39,28,103,27,21,22,23,24,25,19,20,17,18,31,32,33,34,35,36,16,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Xg=G(()=>D(()=>import("./index-B6-Eamlh.js"),__vite__mapDeps([140,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,40,28,16,17,18,19,20,69,86,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Jg=[{path:m.CART,element:t.jsx(Tg,{})}],ef=[{path:m.GUEST.MAIN,children:[{path:m.GUEST.ORDER_DETAIL,element:t.jsx(Rg,{})},{path:m.GUEST.CLAIMS.INFO,element:t.jsx($g,{})},{path:m.GUEST.CLAIMS.REQUESTS.REQUEST,children:[{index:!0,element:t.jsx(Qi,{})},{path:m.GUEST.CLAIMS.REQUESTS.CHANGE_ADDRESS,element:t.jsx(Zi,{})}]}]}],tf=[{path:m.MY_PAGE.MAIN,loader:async()=>{if(!K)return null;try{await Rn()}catch{}return null},children:[{index:!0,element:t.jsx(bg,{})},{path:m.MY_PAGE.ORDERS.LIST,children:[{index:!0,element:t.jsx(Ag,{})},{path:m.MY_PAGE.ORDERS.ORDER_DETAIL,element:t.jsx(Pg,{})}]},{path:m.MY_PAGE.CLAIMS.LIST,children:[{index:!0,element:t.jsx(Lg,{})},{path:m.MY_PAGE.CLAIMS.REQUESTS.REQUEST,children:[{index:!0,element:t.jsx(Qi,{})},{path:m.MY_PAGE.CLAIMS.REQUESTS.CHANGE_ADDRESS,element:t.jsx(Zi,{})}]},{path:m.MY_PAGE.CLAIMS.DETAIL,element:t.jsx(Ng,{})},{path:m.MY_PAGE.CLAIMS.INFO,element:t.jsx(kg,{})}]},{path:m.MY_PAGE.PRODUCT_INQUIRIES,element:t.jsx(Qg,{})},{path:m.MY_PAGE.COUPONS,element:t.jsx(vg,{})},{path:m.MY_PAGE.REVIEWS.LIST,children:[{index:!0,element:t.jsx(Og,{})},{path:m.MY_PAGE.REVIEWS.REVIEWS_WRITE,element:t.jsx(de,{errorFallback:({error:e})=>{var n;return e instanceof Gt&&((n=e.response)==null?void 0:n.data.code)==="PNPE001"?t.jsx(Vr,{errorMessage:"판매중지된 상품으로 리뷰 작성이 불가합니다.",returnUrl:m.MY_PAGE.REVIEWS.LIST}):t.jsx(t.Fragment,{})},children:t.jsx(Mg,{})})},{path:m.MY_PAGE.REVIEWS.REVIEWS_MODIFY,element:t.jsx(_g,{})}]},{path:m.MY_PAGE.WISH,element:t.jsx(Sg,{})},{path:m.MY_PAGE.ADDRESSES.LIST,children:[{index:!0,element:t.jsx(Bg,{})},{path:m.MY_PAGE.ADDRESSES.REGISTER,element:t.jsx(Hg,{})},{path:m.MY_PAGE.ADDRESSES.MODIFY,element:t.jsx(Dg,{})}]}]}],nf=[{path:m.ORDER.MAIN,children:[{path:m.ORDER.ORDER_SHEET,element:t.jsx(jg,{})},{path:m.ORDER.ORDER_COMPLETE,element:t.jsx(Ig,{})}]}],of=[{path:m.BOARDS.NOTICE.LIST,children:[{index:!0,element:t.jsx(Wg,{})},{path:m.BOARDS.NOTICE.DETAIL,element:t.jsx(Kg,{})}]},{path:m.BOARDS.FAQ,element:t.jsx(qg,{})}],rf="/assets/service-unavailable-DCqIOZkA.png",sf=ys([{path:m.MAIN,element:t.jsx(Yr,{children:t.jsx(s.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(ed,{})})}),children:[{index:!0,element:t.jsx(Bm,{})},{path:m.AUTH.LOGIN,element:t.jsx(Ed,{})},{path:m.PRODUCT.DETAIL,element:t.jsx(de,{errorFallback:({error:e,resetErrorBoundary:n})=>{var a,l;const{data:o}=Ee(),{productNo:i}=Ft();if(e instanceof Gt){const d=(o==null?void 0:o.adultCertificated)??!1,u=o!=null&&o.adultCertificatedYmdt?Y(o.adultCertificatedYmdt):null,c=d===!1||u&&u.isBefore(Y().subtract(3,"month"));if(((a=e.response)==null?void 0:a.data.code)==="PNPE001")return t.jsx(Vr,{errorMessage:"접근 불가한 상품입니다."});if(((l=e.response)==null?void 0:l.data.code)==="E0008"&&c){const p=()=>{window.history.back();const x=setTimeout(()=>window.location.replace(m.MAIN),300);return()=>{clearTimeout(x)}};return t.jsx(zt,{isVisible:!0,productNo:Number(i),setIsVisible:x=>{x||(n(),p())}})}}throw e},children:t.jsx(m1,{})})},{path:m.PRODUCT.PARTNER.LIST,element:t.jsx(Gg,{})},{path:m.AUTH.TERM_DETAIL,element:t.jsx(de,{suspenseFallback:t.jsx(Cn,{children:t.jsx(We,{})}),children:t.jsx(Ug,{})})},{path:m.SEARCH,element:t.jsx(ig,{})},{path:m.CATEGORIES.DETAIL,element:t.jsx(Zm,{})},{path:m.PRODUCT.BRAND.LIST,element:t.jsx(Fg,{})},{path:m.PRODUCT.REVIEW,element:t.jsx(A1,{})},{path:m.HAPPY_DEAL,element:t.jsx(em,{})},{path:m.SPECIAL_DEAL,element:t.jsx(Eg,{})},{path:m.BEST,element:t.jsx(mu,{})},{path:m.EXHIBITIONS.LIST,children:[{index:!0,element:t.jsx(Zg,{})},{path:m.EXHIBITIONS.DETAIL,element:t.jsx(de,{suspenseFallback:t.jsx(Ap,{}),children:t.jsx(Xg,{})})}]},{path:m.EVENT.LIST,children:[{index:!0,element:t.jsx(Ou,{})},{path:m.EVENT.DETAIL,element:t.jsx(bu,{})}]},...tf,...nf,...Jg,...ef,...of]},{path:m.CALLBACK.KCP_AUTH,element:t.jsx(de,{suspenseFallback:t.jsx(Cn,{children:t.jsx(We,{})}),children:t.jsx(zg,{})})},{path:m.CALLBACK.NICE_AUTH_SUCCESS,element:t.jsx(de,{suspenseFallback:t.jsx(Cn,{children:t.jsx(We,{})}),children:t.jsx(Vg,{})})},{path:m.CALLBACK.NICE_AUTH_ERROR,element:t.jsx(de,{suspenseFallback:t.jsx(Cn,{children:t.jsx(We,{})}),children:t.jsx(Yg,{})})},{path:"*",element:t.jsx(Ja,{})}]),af=vs` ${ra}; :root { --color-main: ${e=>e.theme.color.main}; --color-sub: ${e=>e.theme.color.sub}; --color-black: ${e=>e.theme.color.black}; --color-white: ${e=>e.theme.color.white}; --color-textPrimary: ${e=>e.theme.color.textPrimary}; --color-textSecondary: ${e=>e.theme.color.textSecondary}; --color-textDarkGray: ${e=>e.theme.color.textDarkGray}; --color-textGray: ${e=>e.theme.color.textGray}; --color-textLightGray: ${e=>e.theme.color.textLightGray}; --color-highlight: ${e=>e.theme.color.highLight}; } * { box-sizing: border-box; word-break: keep-all; } html { font-size: 62.5%; padding: 0; margin: 0; } html, body { height: 100%; width: 100%; ${Eo}; } html * { line-height: 1.3; } body { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; } a { display: block; color: inherit; text-decoration: none; } span, strong { display: inline-block; } input, button { background-color: transparent; border: none; outline: none; font-family: inherit; } /* input 기본 스타일 초기화 */ input { -webkit-border-radius: 0; border-radius: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; } input:focus { outline: none; } /* input[type=number]에서 화살표 제거 */ /* Chrome, Safari, Edge, Opera */ input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; -moz-appearance: none; appearance: none; } /* Firefox */ input[type=number] { -moz-appearance: textfield; } /* IE10 이상에서 input box 에 추가된 지우기 버튼 제거 */ input::-ms-clear { display: none; } /** 버튼 기본 스타일 초기화 */ button { padding: 0; color: inherit; font-size: inherit; cursor: pointer; } /** select 기본 스타일 초기화 */ select { /*webkit browsers */ -webkit-appearance: none; /*Firefox */ -moz-appearance: none; /* modern browsers */ appearance: none; background: #fff; color: inherit; } ::-webkit-scrollbar, ::-moz-scrollbar { display: none; height: 0; } b { font-weight: bold; color: var(--color-main); } textarea { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; } `,cf=new cs({defaultOptions:{queries:{retry:2,throwOnError:!0,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!1,networkMode:"always",staleTime:60*1e3,gcTime:30*60*1e3},mutations:{throwOnError:!1}}}),lf=bs(Xr);function df(){const{isDarkMode:e}=Ns();return t.jsx(Ts,{theme:e?td:di,children:t.jsx(ps,{children:t.jsx(ls,{client:cf,children:t.jsx(gs,{store:Xr,children:t.jsxs(Ss,{loading:null,persistor:lf,children:[t.jsx(af,{}),t.jsx(Pr,{}),!1,t.jsx(ha,{children:t.jsx(Cs,{router:sf})})]})})})})})}const uf=r.section` ${z}; flex-direction: column; height: 100vh; margin: 0 auto; background: #f5f6f8; img { /* max-width: ${gt.SM}px; */ max-width: 600px; } `,pf=r.h1` padding: 50px 0 15px; font-size: 2.6rem; ${v.bold}; color: #000; `,mf=r.p` font-size: 1.6rem; line-height: 36px; text-align: center; color: #727171; `,io={Section:uf,Title:pf,Description:mf},hf=()=>t.jsxs(io.Section,{children:[t.jsx("img",{src:rf,alt:"error",width:256,height:167}),t.jsx(io.Title,{children:"서비스 점검 중입니다."}),t.jsxs(io.Description,{children:["보다 안정적인 서비스 제공을 위해 ",t.jsx("br",{}),"shop by DB 시스템 점검을 진행중입니다. ",t.jsx("br",{}),"점검 기간 동안 서비스 접속 및 이용이 제한되오니 ",t.jsx("br",{}),"고객님의 양해 부탁 드립니다."]})]}),xf=e=>s.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7 4.6V7M7 9.4H7.006M13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7Z",stroke:"#F88177",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),gf=r.div` width: 100%; height: 85vh; display: flex; `,ff=r.div` width: 100%; ${z}; flex-direction: column; `,yf=r(xf)` width: 64px; height: 64px; `,Cf=r.p` font-size: 1.6rem; font-weight: 800; margin-top: 22px; `,wf=r.p` font-size: 1.4rem; ${v.regular}; color: #999999; margin-top: 20px; text-align: center; `,Ef=r.a` ${z}; width: 90%; max-width: 400px; height: 50px; font-size: 1.4rem; ${v.regular}; color: #ffffff; background-color: #000000; margin-top: 40px; `,on={Container:gf,ContainerTest:ff,Warning:yf,ErrorText:Cf,ErrorSubText:wf,MoveMain:Ef},bf=()=>t.jsx(on.Container,{children:t.jsxs(on.ContainerTest,{children:[t.jsx(on.Warning,{}),t.jsx(on.ErrorText,{children:"일시적인 오류가 발생했습니다."}),t.jsx(on.ErrorSubText,{children:"잠시 후 다시 시도해주세요."})]})}),Sf=({children:e})=>{const n=({error:o})=>{var l,d;const{HTTP_UNAUTHORIZED:i,HTTP_SERVICE_UNAVAILABLE:a}=dn;if(o instanceof Gt)return((l=o.response)==null?void 0:l.status)===a?t.jsx(hf,{}):((d=o.response)==null?void 0:d.status)===i?t.jsx(t.Fragment,{}):t.jsx(bf,{})};return t.jsx(ds,{children:({reset:o})=>t.jsx(Sr,{onReset:o,fallbackRender:n,children:e})})};ss(document.getElementById("root")).render(t.jsx(s.StrictMode,{children:t.jsx(Sf,{children:t.jsx(df,{})})}));export{St as $,Mm as A,Lr as B,mh as C,Uy as D,a0 as E,c0 as F,Oc as G,sn as H,r0 as I,yt as J,ue as K,bi as L,Ei as M,zi as N,zt as O,m as P,gt as Q,Hy as R,og as S,I1 as T,We as U,Dy as V,pn as W,a1 as X,cr as Y,pi as Z,$u as _,v as a,y1 as a$,Ao as a0,Ic as a1,Vy as a2,_y as a3,$0 as a4,O0 as a5,Uc as a6,_o as a7,dn as a8,Yy as a9,ge as aA,li as aB,_p as aC,oh as aD,rh as aE,w1 as aF,$o as aG,uc as aH,$n as aI,Cl as aJ,pc as aK,Te as aL,ki as aM,Ai as aN,_n as aO,Yt as aP,Bi as aQ,mn as aR,ir as aS,hu as aT,vi as aU,Ua as aV,rg as aW,Gy as aX,jn as aY,xl as aZ,So as a_,By as aa,gl as ab,an as ac,$e as ad,en as ae,Mt as af,At as ag,zr as ah,Fi as ai,gi as aj,hi as ak,zy as al,Kr as am,Ci as an,wi as ao,eh as ap,de as aq,Hm as ar,Vt as as,yl as at,ia as au,fl as av,dd as aw,ba as ax,pm as ay,h as az,Ct as b,Ti as b0,he as b1,_t as b2,Fy as b3,oi as b4,Ap as b5,mm as b6,Z as b7,c1 as b8,Me as b9,Eo as ba,ar as bb,Ee as c,ko as d,jt as e,z as f,Oy as g,jo as h,De as i,qe as j,Pt as k,fi as l,$d as m,Gr as n,Sa as o,fe as p,He as q,K as r,ee as s,at as t,Pe as u,wo as v,Jr as w,_d as x,hh as y,ph as z};