1"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[652],{48808:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(23175),r=n(70579);const a=e=>{let{width:t=48,height:n=48,$widthWt:a,$heightWt:o}=e;return(0,r.jsxs)(i.E,{width:t,height:n,$widthWt:a,$heightWt:o,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.3243 15.1755C17.0899 15.4099 16.7101 15.4099 16.4757 15.1755L15.8753 14.5752C15.7628 14.4626 15.6102 14.3994 15.4511 14.3994H12.1C10.1118 14.3994 8.5 16.0112 8.5 17.9994V29.9994C8.5 31.9876 10.1118 33.5994 12.1 33.5994H15.4519C15.611 33.5994 15.7636 33.5362 15.8761 33.4237L16.4757 32.8241C16.71 32.5898 17.0899 32.5898 17.3243 32.8241L17.9239 33.4237C18.0364 33.5362 18.189 33.5994 18.3481 33.5994H36.1C38.0882 33.5994 39.7 31.9876 39.7 29.9994V17.9994C39.7 16.0112 38.0882 14.3994 36.1 14.3994H18.3489C18.1898 14.3994 18.0372 14.4626 17.9247 14.5751L17.3243 15.1755Z",fill:"#FD96B3"}),(0,r.jsx)("path",{d:"M16.9023 16.7998L16.9023 31.1998",stroke:"#FF6C95",strokeWidth:"1.2",strokeLinecap:"round",strokeDasharray:"1.8 2.4"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.4527 24.3012C25.4526 24.3012 25.4525 24.3012 25.4523 24.3012C24.044 24.3012 22.9023 23.1595 22.9023 21.7512C22.9023 20.3428 24.044 19.2012 25.4523 19.2012C26.8604 19.2012 28.0019 20.3424 28.0023 21.7504C28.0028 20.3424 29.1443 19.2012 30.5523 19.2012C31.9607 19.2012 33.1023 20.3428 33.1023 21.7512C33.1023 23.1594 31.9609 24.301 30.5527 24.3012C31.9609 24.3014 33.1023 25.443 33.1023 26.8512C33.1023 28.2595 31.9607 29.4012 30.5523 29.4012C29.144 29.4012 28.0023 28.2595 28.0023 26.8512M25.4527 24.3012C25.4526 24.3012 25.4525 24.3012 25.4523 24.3012C24.044 24.3012 22.9023 25.4428 22.9023 26.8512C22.9023 28.2595 24.044 29.4012 25.4523 29.4012C26.8607 29.4012 28.0023 28.2595 28.0023 26.8512",fill:"#FFEBF1"})]})}},36903:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(23175),r=n(70579);const a=e=>{let{width:t=48,height:n=48,$widthWt:a,$heightWt:o}=e;return(0,r.jsxs)(i.E,{width:t,height:n,$widthWt:a,$heightWt:o,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("rect",{x:"7.19922",y:"26.4004",width:"8.4",height:"10.8",rx:"2.4",fill:"#A5E9CB"}),(0,r.jsx)("rect",{x:"16.8008",y:"20.4004",width:"8.4",height:"16.8",rx:"2.4",fill:"#68CD9B"}),(0,r.jsx)("rect",{x:"26.3984",y:"9.59961",width:"8.4",height:"27.6",rx:"2.4",fill:"#5AC18E"}),(0,r.jsx)("circle",{cx:"32.4",cy:"32.4",r:"8.4",fill:"#FFDE70"}),(0,r.jsx)("circle",{cx:"32.3984",cy:"32.4004",r:"6",fill:"#FFC82C"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.4008 28.7988C32.6217 28.7988 32.8008 28.9872 32.8008 29.2196L32.8008 29.7717C32.8008 30.0041 32.6217 30.1924 32.4008 30.1924C32.1799 30.1924 32.0008 30.0041 32.0008 29.7717L32.0008 29.2196C32.0008 28.9872 32.1799 28.7988 32.4008 28.7988Z",fill:"#FFF7DC",stroke:"#FFF7DC",strokeWidth:"0.9",strokeLinecap:"round"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.4008 34.6045C32.6217 34.6045 32.8008 34.7929 32.8008 35.0252L32.8008 35.5774C32.8008 35.8097 32.6217 35.9981 32.4008 35.9981C32.1799 35.9981 32.0008 35.8097 32.0008 35.5774L32.0008 35.0252C32.0008 34.7929 32.1799 34.6045 32.4008 34.6045Z",fill:"#FFF7DC",stroke:"#FFF7DC",strokeWidth:"0.9",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M30.5421 33.7349C30.7764 33.6227 31.0518 33.7091 31.2253 33.9024C31.3542 34.0461 31.4902 34.1604 31.6333 34.2451C31.8813 34.3921 32.1353 34.4655 32.3955 34.4655C32.8068 34.4655 33.1153 34.3946 33.321 34.2527C33.5327 34.1058 33.6386 33.9082 33.6386 33.6599C33.6386 33.5079 33.5811 33.3787 33.4662 33.2723C33.3512 33.1659 33.206 33.0798 33.0306 33.0139C32.8612 32.943 32.6223 32.8619 32.3138 32.7707C31.8904 32.6441 31.5425 32.5225 31.2703 32.4059C31.0042 32.2843 30.7743 32.1146 30.5807 31.8967C30.3932 31.6738 30.2994 31.3875 30.2994 31.0379C30.2994 30.7238 30.3932 30.4502 30.5807 30.2171C30.7682 29.9841 31.0284 29.8067 31.3611 29.6851C31.6938 29.5585 32.0749 29.4951 32.5043 29.4951C32.952 29.4951 33.3784 29.6066 33.7837 29.8295C34.0139 29.9561 34.2109 30.1195 34.3748 30.3196C34.5803 30.5707 34.4167 30.923 34.106 31.0166C33.8484 31.0942 33.5843 30.9596 33.411 30.7538C33.3335 30.6617 33.2491 30.5867 33.1577 30.5287C32.958 30.4021 32.7463 30.3362 32.5225 30.3311C32.1958 30.3311 31.9388 30.397 31.7512 30.5287C31.5637 30.6605 31.4699 30.8302 31.4699 31.0379C31.4699 31.1899 31.5274 31.3217 31.6423 31.4331C31.7633 31.5395 31.9115 31.6282 32.087 31.6991C32.2624 31.7701 32.5043 31.8562 32.8129 31.9575C33.2302 32.0943 33.572 32.2235 33.8382 32.3451C34.1043 32.4617 34.3312 32.6289 34.5187 32.8467C34.7062 33.0646 34.8 33.3382 34.8 33.6675C34.8 33.9867 34.7032 34.2705 34.5096 34.5187C34.3161 34.767 34.0378 34.9595 33.6749 35.0963C33.318 35.2331 32.8975 35.3015 32.4136 35.3015C31.9115 35.3015 31.4548 35.1901 31.0435 34.9671C30.8024 34.8315 30.5816 34.6618 30.3812 34.458C30.16 34.2331 30.2576 33.871 30.5421 33.7349Z",fill:"#FFF7DC",stroke:"#FFF7DC",strokeWidth:"0.9"}),(0,r.jsx)("path",{d:"M29.7261 6.93381C30.2002 6.42811 31.0029 6.42811 31.477 6.93381L37.7071 13.5793C38.4256 14.3457 37.8822 15.6 36.8317 15.6H24.3714C23.3209 15.6 22.7775 14.3457 23.496 13.5793L29.7261 6.93381Z",fill:"#5AC18E"})]})}}
1,33339:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(23175),r=n(70579);const a=e=>{let{width:t=48,height:n=48,$widthWt:a,$heightWt:o}=e;return(0,r.jsxs)(i.E,{width:t,height:n,$widthWt:a,$heightWt:o,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.4867 22.5764C30.7293 21.0682 32.2048 18.507 32.2048 15.6012C32.2048 10.962 28.444 7.20117 23.8048 7.20117C19.1656 7.20117 15.4048 10.962 15.4048 15.6012C15.4048 18.507 16.8803 21.0682 19.1229 22.5764C18.9991 22.6298 18.8759 22.6853 18.7534 22.743C17.1519 23.4968 15.6967 24.6017 14.471 25.9946C13.2453 27.3874 12.2729 29.041 11.6096 30.8609C11.4074 31.4157 11.2351 31.9826 11.0932 32.5585C10.5541 34.7475 12.4323 36.6012 14.6867 36.6012H23.8048H32.9229C35.1773 36.6012 37.0555 34.7475 36.5164 32.5585C36.3745 31.9826 36.2022 31.4157 36 30.8609C35.3366 29.041 34.3643 27.3874 33.1386 25.9946C31.9129 24.6017 30.4577 23.4968 28.8562 22.743C28.7337 22.6853 28.6105 22.6298 28.4867 22.5764Z",fill:"#B2DDFF"}),(0,r.jsx)("circle",{cx:"33",cy:"33",r:"9",fill:"#2E90FB"}),(0,r.jsx)("path",{d:"M34.1969 37.7986C34.1969 38.4614 33.6596 38.9986 32.9969 38.9986C32.3341 38.9986 31.7969 38.4614 31.7969 37.7986C31.7969 37.1359 32.3341 36.5986 32.9969 36.5986C33.6596 36.5986 34.1969 37.1359 34.1969 37.7986Z",fill:"white"}),(0,r.jsx)("path",{d:"M30.5977 30.5041L30.6197 30.4414C30.966 29.4573 31.8957 28.7988 32.939 28.7988H33.1483C34.3906 28.7988 35.3977 29.8059 35.3977 31.0482V31.0482C35.3977 31.7767 35.0449 32.46 34.4511 32.8819L33.9244 33.2561C33.343 33.6692 32.9977 34.3383 32.9977 35.
10515V35.0515",stroke:"white",strokeWidth:"2.1",strokeLinecap:"round"})]})}},87206:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(23175),r=n(70579);const a=e=>{let{width:t=48,height:n=48,$widthWt:a,$heightWt:o}=e;return(0,r.jsxs)(i.E,{width:t,height:n,$widthWt:a,$heightWt:o,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("rect",{x:"10.1992",y:"23.4014",width:"13.2",height:"13.2",rx:"4.2",transform:"rotate(-90 10.1992 23.4014)",fill:"#FF7E7E"}),(0,r.jsx)("rect",{x:"24.5977",y:"23.4014",width:"13.2",height:"13.2",rx:"6.6",transform:"rotate(-90 24.5977 23.4014)",fill:"#B2DDFF"}),(0,r.jsx)("path",{d:"M30.5859 25.0275C30.7961 24.4596 31.5993 24.4596 31.8094 25.0275L33.2076 28.8062C33.2737 28.9847 33.4145 29.1255 33.593 29.1916L37.3717 30.5898C37.9396 30.8 37.9396 31.6032 37.3717 31.8133L33.593 33.2116C33.4145 33.2776 33.2737 33.4184 33.2076 33.5969L31.8094 37.3757C31.5993 37.9435 30.7961 37.9435 30.5859 37.3757L29.1877 33.5969C29.1216 33.4184 28.9808 33.2776 28.8023 33.2116L25.0236 31.8133C24.4557 31.6032 24.4557 30.8 25.0236 30.5898L28.8023 29.1916C28.9808 29.1255 29.1216 28.9847 29.1877 28.8062L30.5859 25.0275Z",fill:"#C7B8FF"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7992 31.1881C13.7004 31.197 13.6003 31.2016 13.4992 31.2016C11.6767 31.2016 10.1992 29.7241 10.1992 27.9016C10.1992 26.079 11.6767 24.6016 13.4992 24.6016C15.3218 24.6016 16.7992 26.079 16.7992 27.9016C16.7992 28.0026 16.7947 28.1025 16.7858 28.2012H16.8126C16.8038 28.1025 16.7992 28.0026 16.7992 27.9016C16.7992 26.079 18.2767 24.6016 20.0992 24.6016C21.9218 24.6016 23.3992 26.079 23.3992 27.9016C23.3992 29.7241 21.9218 31.2016 20.0992 31.2016C19.9981 31.2016 19.898 31.197 19.7992 31.1881V31.215C19.898 31.2061 19.9981 31.2016 20.0992 31.2016C21.9218 31.2016 23.3992 32.679 23.3992 34.5016C23.3992 36.3241 21.9218 37.8016 20.0992 37.8016C18.2767 37.8016 16.7992 36.3241 16.7992 34.5016C16.7992 34.4003 16.8038 34.3001 16.8127 34.2012H16.7857C16.7947 34.3001 16.7992 34.4003 16.7992 34.5016C16.7992 36.3241 15.3218 37.8016 13.4992 37.8016C11.6767 37.8016 10.1992 36.3241 10.1992 34.5016C10.1992 32.679 11.6767 31.2016 13.4992 31.2016C13.6003 31.2016 13.7004 31.2061 13.7992 31.215V31.1881Z",fill:"#FCDBAB"})]})}},13457:(e,t,n)=>{n.d(t,{A:()=>b});var i=n(65043),r=n(46655),a=n(53692),o=n(97605),l=n(17120);const s=n.p+"static/media/ico_sort_asc.2dc8bce78a6a9899a6d98b4e878ac0fc.svg";const d=n.p+"static/media/ico_sort_desc.9b9e9855c861c483d12a394546590894.svg";var c=n(98380),h=n(94839),p=n(49774),x=n(36579),u=n(29875),g=n(7685),v=n(59116),m=n(24678),j=n(23175),y=n(70579);const f=e=>{let{width:t=24,height:n=24,$widthWt:i,$heightWt:r,stroke:a="var(--color-gray-700-main)"}=e;return(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(j.E,{width:t,height:n,$widthWt:i,$heightWt:r,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,y.jsx)("circle",{cx:"14.3996",cy:"8.99922",r:"1.8",stroke:a,strokeWidth:"1.2"}),(0,y.jsx)("line",{x1:"5.3998",y1:"8.99961",x2:"11.9998",y2:"8.99961",stroke:a,strokeWidth:"1.2",strokeLinecap:"round"}),(0,y.jsx)("line",{x1:"16.1996",y1:"8.99961",x2:"18.5996",y2:"8.99961",stroke:a,strokeWidth:"1.2",strokeLinecap:"round"}),(0,y.jsx)("circle",{cx:"1.8",cy:"1.8",r:"1.8",transform:"matrix(-1 0 0 1 11.4004 13.1992)",stroke:a,strokeWidth:"1.2"}),(0,y.jsx)("line",{x1:"0.6",y1:"-0.6",x2:"7.2",y2:"-0.6",transform:"matrix(-1 0 0 1 19.2002 15.5996)",stroke:a,strokeWidth:"1.2",strokeLinecap:"round"}),(0,y.jsx)("line",{x1:"0.6",y1:"-0.6",x2:"3",y2:"-0.6",transform:"matrix(-1 0 0 1 8.40039 15.5996)",stroke:a,strokeWidth:"1.2",strokeLinecap:"round"})]})})},w=e=>{const{data:t,getSelectedValue:n,getSelectedText:r,setSelectedData:a,isSelectAll:l,selectAllText:s,hasSelectState:d,placeholder:c,width:h,$widthWt:x,$fontSizeWt:j,justify:w,positionTop:S,positionTopWt:$,positionLeft:A,setIsSelected:C,categoryPadding:b,hasEllipsis:T=!0,hasBtnEllipsis:W=!0}=e,k=(0,p.C)((e=>e.setPageParams)),[D,P]=(0,i.useState)(!1),[R,N]=(0,i.useState)(n?n():""),[E,L]=(0,i.useState)(r?r():""),I=(0,i.useRef)(null),z=C&&E&&E!==c?"var(--color-primary-500-main)":"var(--color-gray-700-main)",M=e=>{P(!1),R!==e.value&&(null===a||void 0===a||a(e,c),N(e.value),L(e.text),k({category:e.text,categoryId:e.value}),null===C||void 0===C||C(!(e.text===c)))};return(0,i.useEffect)((()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&P(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),(0,y.jsxs)(u.SR,{ref:I,$fontWeight:v.sO.semiBold,position:"unset",children:[(0,y.jsx)(u.m7,{$isOpen:D,$hasSelectState:d,onClick:()=>P((e=>!e)),$fontSize:v.$N.size14,$fontSizeWt:j,$lineHeight:v.kj.height22,$fontWeight:v.sO.regular,padding:b||"0 16px",children:(0,y.jsxs)(o.pT,{gap:"4px",children:[(0,y.jsx)("span",{style:{color:z},children:E?W?(0,g.PR)(E,6):E:c}),(0,y.jsx)(f,{stroke:z})]})}),D&&(0,y.jsx)(u.yf,{style:{zIndex:m.A.zIndexDialog},width:h,$widthWt:x,left:A||(h?"50%":""),transform:h?"translate(-50%, 0)":"",top:S||"110%",$to
1pWt:$,children:(0,y.jsxs)(u.IO,{$maxHeight:"210px",children:[l&&(0,y.jsx)(u.xD,{height:"42px",padding:"10px 16px",justify:w||"center",$textAlign:"center",$fontSize:v.$N.size14,$fontSizeWt:v.$N.size14,$fontWeight:v.sO.regular,$lineHeight:v.kj.height22,$lineHeightWt:v.kj.height22,onClick:()=>M({value:"all",text:c}),children:(0,y.jsx)("li",{children:(0,y.jsx)("span",{children:s||"\uc804\uccb4"})})},-1),t&&(null===t||void 0===t?void 0:t.map(((e,t)=>{const n="hasShopServe"in e&&!e.hasShopServe;return(0,y.jsx)(u.xD,{height:"42px",padding:"10px 16px",$textAlign:"center",justify:w||"center",$fontSize:v.$N.size14,$fontSizeWt:v.$N.size14,$fontWeight:v.sO.regular,$lineHeight:v.kj.height22,$lineHeightWt:v.kj.height22,$disabledBackground:"var(--color-white)",$disabledColor:"var(--color-gray-300)",$isDisabled:n,onClick:t=>{t.stopPropagation(),M(e)},children:(0,y.jsx)("li",{children:(0,y.jsx)("span",{children:T?(0,g.PR)(e.text,6):e.text})})},t)})))]})})]})};var S=n(76172),$=n(15996),A=n(92858),C=n(30285);const b=e=>{const{tHeadList:t,onChangeAllCheck:n,sortBy:u,setSortBy:g,setDirection:v,color:m,padding:j,$paddingWt:f,background:b,$checkboxWidth:T,$checkboxHeight:W,dropdownData:k,getSelectedValue:D,getSelectedText:P,setSelectedData:R,$borderTop:N,$borderBottom:E,isAllChecked:L,hasNoData:I,isSelectCustomerModal:z}=e,{pageParams:M,setPageParams:H}=(0,p.C)((0,r.k)((e=>({pageParams:e.pageParams,setPageParams:e.setPageParams}))));(0,A.e)();const B=(0,A.E)((e=>e.isUnderWideTabletScreen)),[F,O]=(0,i.useState)(t.map((()=>!1))),[V,U]=(0,i.useState)(M&&M.sortState?M.sortState:"DEFAULT"),[Y,K]=(0,i.useState)(!1),q=(0,i.useRef)([]),Z=(0,i.useRef)(null),X=e=>{e.stopPropagation(),Z.current&&clearTimeout(Z.current),B&&(K(!0),Z.current=setTimeout((()=>{K(!1),Z.current=null}),3e3))};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("colgroup",{children:t.map(((e,t)=>(0,y.jsx)("col",{style:{width:e.colWidth}},t)))}),(0,y.jsx)(x.d8,{$borderTop:N,$borderBottom:E,children:(0,y.jsx)("tr",{children:t.map(((e,r)=>{var p,A,N,E,M,B;return(0,y.jsx)(i.Fragment,{children:"CHECKBOX"===e.text?(0,y.jsx)(x.o4,{$first:0===r?"true":"undefined",$last:r===t.length-1?"true":"undefined",padding:z?"0":"2px 0 2px 24px",$paddingWt:z?"0":"2px 0 2px 24px",background:b,radius:z?"0":"",$hasCursor:!0,onClick:e=>{const t=e.currentTarget.querySelector("input[type='checkbox']");if(t){const e=t.checked;n&&n(!e)}},children:(0,y.jsx)(a.S,{id:"",name:"all",checked:L&&!I||!1,width:T,height:W,hasNoData:I,onChange:e=>{n&&n(e.target.checked)},isRemoveEvent:!0,padding:"9px 8px"})}):e.hasFilter?(0,y.jsx)(x.o4,{padding:e.padding?e.padding:j,$paddingWt:f,background:b,radius:z?"0":"",style:{position:"relative"},align:e.textAlign,children:(0,y.jsx)(x.l8,{gap:"2px",background:F[r]?"var(--color-primary-50)":"unset",padding:e.hoverBoxPadding?e.hoverBoxPadding:"4px 16px",justify:e.textAlign,border:F[r]?"1px solid var(--color-primary-300)":"",isFiltered:F[r],style:{position:"relative"},children:(0,y.jsxs)(o.pT,{gap:"4px",children:[e.info&&(0,y.jsx)(y.Fragment,{children:(0,y.jsxs)(o.oO,{onMouseEnter:()=>{e.info&&K(!0)},onMouseLeave:()=>K(!1),onClick:X,children:[(0,y.jsx)(o.pT,{children:(0,y.jsx)(C.A,{width:16,height:16,stroke:"var(--color-gray-300)"})}),e.info&&Y&&(0,y.jsx)($.A,{text:"\uc0c1\ud0dc\uac12\uc744 \ub204\ub974\uba74 \ubcc0\uacbd\uc774 \uac00\ub2a5\ud574\uc694!",top:"42px",$leftWt:"-10px",$triangleLeftWt:"60%"})]})}),(0,y.jsx)(w,{data:null!==(p=e.filterData)&&void 0!==p?p:k,isSelectAll:!0,placeholder:e.text,width:e.categoryButtonWidth?e.categoryButtonWidth:"150px",categoryPadding:e.categoryPadding,setIsSelected:e=>{const t=[...F];t[r]=e,O(t)},positionLeft:e.categoryPositionLeft,hasEllipsis:e.hasEllipsis,hasBtnEllipsis:e.hasBtnEllipsis,getSelectedValue:D,getSelectedText:P,setSelectedData:R})]})})},r):(0,y.jsx)(x.o4,{$first:0===r?"true":"undefined",$last:r===t.length-1?"true":"undefined",color:null!==m&&void 0!==m?m:e.hasSort&&u===e.sortValue&&"DEFAULT"!==V?"var(--color-gray-700-main)":"",padding:e.padding?e.padding:j,$paddingWt:f,background:b,radius:z?"0":"",align:e.textAlign,children:e.hasSort?(0,y.jsxs)(x.l8,{style:{whiteSpace:"pre"},padding:e.hoverBoxPadding?e.hoverBoxPadding:"4px 16px",$paddingWt:e.hoverBoxPadding?e.hoverBoxPadding:"4px 16px",gap:"4px",justify:e.textAlign,position:"relative",$hasCursor:!0,width:"max-content",margin:"left"===e.textAlign?"0":"0 auto",onClick:t=>{var n;if(!e.hasSort)return;const i=u===e.sortValue?"DEFAULT"===V?"DESC":"DESC"===V?"ASC":"DEFAULT":"DESC";U(i),(0,S.aO)(i,"newSortState"),(0,S.aO)(e.sortValue,"data.sortValue!"),"DEFAULT"===i?(v("DESC"),e.defaultSortValue?g(e.defaultSortValue):g("createdAt")):(v("DESC"===i?"DESC":"ASC"),g(e.sortValue)),H({sortState:i}),null===(n=q.current[r])||void 0===n||n.handleClick(t)},children:[e.text,e.hasSort&&(0,y.jsx)(c.A,{ref:e=>q.current[r]=e,text:"SORT_PRICE"===e.sortValue?null===(A=h.xp.find((e=>e.state===V)))||void 0===A?void 0:A.text:"SORT_COUNT"===e.sortValue?null===(N=h.Nk.find((e=>e.state===V)))||void 0===N?void 0:N.text:"SORT_DATE"===e.sortValue?null===(E=h.ww.find((e=>e.state===V)))||void 0===E?void 0:E.text:"SORT_DEFAULT"===e.sortValue?null===(M=h.Z7.find((e=>e.state===V)))||void 0===M?void 0:M.text:null===(B=h.Z7.find((e=>e.state===V)))||void 0===B?void 0:B.text,direction:"top",children:(0,y.jsx)("img",{src:u===e.sortValue?"DEFAULT"===V?l.A:"ASC"===V?s:d:l.A,width:"20px",height:"20px",alt:"\uc815\ub82c"})})]}):(0,y.jsx)(o.pT,{justify:e.textAlign,children:(0,y.jsx)(o.pT,{$whiteSpace:"pre",children:e.text})})},r)},r)}))})})]})}},36579:(e,t,n)=>{n.d(t,{Du:()=>w,Ic:()=>P,NN:()=>T,PT:()=>C,Td:()=>b,Th:()=>A,Tr:()=>$,d8:()=>W,l8:()=>D,o4:()=>k,vc:()=>S});var i,r,a,o,l,s,d,c,h,p,x,u,g=n(57528),v=n(97605),m=n(5464),j=n(81293),y=n(48120),f=n(59116);const w=m.Ay.div(i||(i=(0,g.A)(["\n\tdisplay: ",";\n\tflex-direction: ",";\n\tflex: ",";\n\toverflow-y: ",";\n\toverflow-x: ",";\n\tmargin: ",";\n\tpadding: ",";\n\toverflow: ",";\n\tmin-height: ",";\n\twidth: ",";\n\tposition: relative;\n\tborder: ",";\n\tborder-radius: ",";\n\n\ttable {\n\t\twidth: 100%;\n\t\tmin-width: ","; //: BREAKPOINTS.tablet\n\t\tmax-width: ",";\n\t\tborder-collapse: collapse;\n\t}\n\n\t@media (max-width: ",") {\n\t\tdisplay: ",";\n\t\tpadding: ",";\n\t\tmin-width: ",";\n\t\tmin-height: ",";\n\t}\n\n\t@media (max-width: ",") {\n\t\tdisplay: ",";\n\t\tpadding: ",";\n\t\tmin-width: ",";\n\t\tmin-height: ",";\n\t}\n"])),(e=>{var t;
1return null!==(t=e.display)&&void 0!==t?t:e.display}),(e=>{var t;return null!==(t=e.direction)&&void 0!==t?t:e.direction}),(e=>{var t;return null!==(t=e.flex)&&void 0!==t?t:e.flex}),(e=>e.$overflowY||"auto"),(e=>{var t;return null!==(t=e.$overflowX)&&void 0!==t?t:e.$overflowX}),(e=>e.margin||"0"),(e=>{var t;return null!==(t=e.padding)&&void 0!==t?t:e.padding}),(e=>e.overflow||"visible"),(e=>e.$minHeight||"432px"),(e=>{var t;return null!==(t=e.width)&&void 0!==t?t:e.width}),(e=>{var t;return null!==(t=e.border)&&void 0!==t?t:e.border}),(e=>{var t;return null!==(t=e.radius)&&void 0!==t?t:e.radius}),(e=>e.$minWidth||"unset"),(e=>e.$maxWidth||"unset"),j.A.wideTablet,(e=>{var t;return null!==(t=e.$displayWt)&&void 0!==t?t:e.$displayWt}),(e=>{var t;return null!==(t=e.$paddingWt)&&void 0!==t?t:e.$paddingWt}),(e=>{var t;return null!==(t=e.$minWidthWt)&&void 0!==t?t:e.$minWidthWt}),(e=>{var t;return null!==(t=e.$minHeightWt)&&void 0!==t?t:e.$minHeightWt}),j.A.tablet,(e=>{var t;return null!==(t=e.$displayMd)&&void 0!==t?t:e.$displayMd}),(e=>{var t;return null!==(t=e.$paddingMd)&&void 0!==t?t:e.$paddingMd}),(e=>{var t;return null!==(t=e.$minWidthMd)&&void 0!==t?t:e.$minWidthMd}),(e=>{var t;return null!==(t=e.$minHeightMd)&&void 0!==t?t:e.$minHeightMd})),S=m.Ay.tbody(r||(r=(0,g.A)(["\n\twidth: 100%;\n\theight: ",";\n\tborder-top: ",";\n"])),(e=>{var t;return null!==(t=e.height)&&void 0!==t?t:e.height}),(e=>{var t;return null!==(t=e.$borderTop)&&void 0!==t?t:e.$borderTop})),$=m.Ay.tr(a||(a=(0,g.A)(["\n\tcursor: ",";\n\tbackground-color: ",";\n\t&:not(:first-child) {\n\t\tborder-top: 1px solid var(--color-gray-100);\n\t}\n\n\t&:hover {\n\t\tbackground-color: ",";\n\t}\n"])),(e=>e.$isNoneClickable?"default":"pointer"),(e=>{var t;return null!==(t=e.background)&&void 0!==t?t:e.background}),(e=>{var t,n;return e.$isNoneClickable?null!==(t=e.background)&&void 0!==t?t:"transparent":null!==(n=e.$hoverBackground)&&void 0!==n?n:"var(--color-gray-50)"})),A=m.Ay.th(o||(o=(0,g.A)(["\n\tpadding: ",";\n\tbackground-color: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\tmargin: ",";\n\ttext-align: ",";\n\tline-height: ",";\n\tborder-radius: ",";\n\tborder-bottom: ",";\n\n\t&.fixedHead {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\t\tline-height: ",";\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\t}\n"])),(e=>e.padding||"8px 0"),(e=>e.background||"var(--color-white)"),(e=>e.color||"var(--color-gray-400)"),(e=>e.fontSize||f.$N.size14),(e=>e.fontWeight||f.sO.semiBold),(e=>{var t;return null!==(t=e.margin)&&void 0!==t?t:e.margin}),(e=>e.align||"center"),(e=>e.$lineHeight||f.kj.height20),(e=>"true"===e.$first?"8px 0 0 0":"true"===e.$last?"0 8px 0 0":"0"),(e=>{var t;return null!==(t=e.$borderBottom)&&void 0!==t?t:e.$borderBottom}),j.A.wideTablet,(e=>{var t;return null!==(t=e.$paddingWt)&&void 0!==t?t:e.$paddingWt}),(e=>{var t;return null!==(t=e.$lineHeightWt)&&void 0!==t?t:e.$lineHeightWt}),j.A.tablet,(e=>{var t;return null!==(t=e.$paddingMd)&&void 0!==t?t:e.$paddingMd})),C=m.Ay.th(l||(l=(0,g.A)(["\n\tpadding: ",";\n\tbackground-color: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\ttext-align: ",";\n\tline-height: ",";\n\n\t&.fixedHead {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t}\n"])),(e=>e.padding||"12px 0"),(e=>e.background||"var(--color-gray-100)"),(e=>e.color||"var(--color-gray-700-main)"),(e=>e.fontSize||f.$N.headingS),(e=>e.fontWeight||f.sO.bold),(e=>e.align||"center"),(e=>e.$lineHeight||f.kj.heading)),b=(m.Ay.th(s||(s=(0,g.A)(["\n\tpadding: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\ttext-align: ",";\n\tline-height: ",";\n\tborder-top: 1px solid ",";\n\tborder-bottom: 1px solid ",";\n\n\t&.fixedHead {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t}\n"])),(e=>e.padding||"16px 0"),(e=>e.color||"var(--color-gray-500)"),(e=>e.fontSize||f.$N.bodyL),(e=>e.fontWeight||f.sO.semiBold),(e=>e.align||"center"),(e=>e.$lineHeight||f.kj.body),(e=>e.$borderColor||"var(--color-gray-200)"),(e=>e.$borderColor||"var(--color-gray-200)")),m.Ay.td(d||(d=(0,g.A)(["\n\tposition: ",";\n\theight: ",";\n\tvertical-align: ",";\n\tpadding: ",";\n\tbackground-color: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\tline-height: ",";\n\tmargin: ",";\n\ttext-align: ",";\n\tmax-width: ",";\n\toverflow: ",";\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\tborder-bottom: ",";\n\t@media all and (max-width: ",") {\n\t\theight: ",";\n\t\tpadding: ",";\n\t\tfont-size: ",";\n\t\tline-height: ",";\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\t}\n"])),(e=>{var t;return null!==(t=e.position)&&void 0!==t?t:e.position}),(e=>e.height||"46px"),(e=>e.$verticalAlign||"middle"),(e=>{var t;return null!==(t=e.padding)&&void 0!==t?t:e.padding}),(e=>e.background||"unset"),(e=>e.color||"var(--color-gray-600)"),(e=>e.fontSize||f.$N.size14),(e=>e.fontWeight||f.sO.regular),(e=>e.$lineHeight||f.kj.height22),(e=>{var t;return null!==(t=e.margin)&&void 0!==t?t:e.margin}),(e=>e.align||"center"),(e=>e.$maxWidth),(e=>e.overflow||"hidden"),(e=>{var t;return null!==(t=e.$borderBottom)&&void 0!==t?t:e.$borderBottom}),j.A.wideTablet,(e=>{var t;return null!==(t=e.$heightWt)&&void 0!==t?t:e.$heightWt}),(e=>{var t;return null!==(t=e.$paddingWt)&&void 0!==t?t:e.$paddingWt}),(e=>e.$fontSizeWt?e.$fontSizeWt:f.$N.size14),(e=>e.$lineHeightWt||f.kj.height22),j.A.tablet,(e=>{var t;return null!==(t=e.$paddingMd)&&void 0!==t?t:e.$paddingMd}))),T=m.Ay.tbody(c||(c=(0,g.A)(["\n\tborder-top: ",";\n\tmin-height: ",";\n\tmax-height: ",";\n"])),(e=>{var t;return null!==(t=e.$borderTop)&&void 0!==t?t:e.$borderTop}),(e=>{var t;return null!==(t=e.$minHeight)&&void 0!==t?t:e.$minHeight}),(e=>{var t;return null!==(t=e.$maxHeight)&&void 0!==t?t:e.$maxHeight})),W=m.Ay.thead(h||(h=(0,g.A)(["\n\tborder-top: ",";\n\tborder-bottom: ",";\n\tbackground-color: var(--color-gray-50);\n"])),(e=>{var t;return null!==(t=e.$borderTop)&&void 0!==t?t:e.$borderTop}),(e=>e.$borderBottom||"1px solid var(--color-gray-50)")),k=m.Ay.th(p||(p=(0,g.A)(["\n\theight: ",";\n\tbackground-color: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\tmargin: ",";\n\tpadding: ",";\n\ttext-align: ",";\n\tline-height: ",";\n\tborder-radius: ",";\n\tcursor: ",";\n\n\t&.fixedHead {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\t\tfont-size: ",";\n\t\tline-height: ",";\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\t}\n"])),(e=>e.height||"38px"),(e=>e.background||"transparent"),(e=>e.color||"var(--color-gray-700-main)"),(e=>e.fontSize||f.$N.size14),(e=>e.fontWeight||f.sO.regular),(e=>{var t;return null!==(t=e.margin)&&void 0!==t?t:e.margin}),(e=>{var t;return null!==(t=e.padding)&&void 0!==t?t:e.padding}),(e=>e.align||"center"),(e=>e.$lineHeight||f.kj.height22),(e=>
1e.radius?e.radius:"true"===e.$first?"16px 0 0 0":"true"===e.$last?"0 16px 0 0":"0"),(e=>e.$hasCursor?"pointer":"auto"),j.A.wideTablet,(e=>{var t;return null!==(t=e.$paddingWt)&&void 0!==t?t:e.$paddingWt}),(e=>{var t;return null!==(t=e.$fontSizeWt)&&void 0!==t?t:f.$N.size14}),(e=>e.$lineHeightWt||f.kj.height22),j.A.tablet,(e=>{var t;return null!==(t=e.$paddingMd)&&void 0!==t?t:e.$paddingMd})),D=(0,m.Ay)(v.pT)(x||(x=(0,g.A)(["\n\tdisplay: inline-flex;\n\tpadding: ",";\n\tborder-radius: ",";\n\t&:hover {\n\t\tbackground-color: ",";\n\t}\n\n\t@media all and (max-width: ",") {\n\t\tpadding: ",";\n\n\t\t&:hover {\n\t\t\tbackground-color: ",";\n\t\t}\n\t}\n"])),(e=>{var t;return null!==(t=e.padding)&&void 0!==t?t:"8px 0"}),y.A.corner8,(e=>"0"===e.padding?"":e.isFiltered?"var(--color-primary-50)":"var(--color-gray)"),j.A.wideTablet,(e=>{var t;return null!==(t=e.$paddingWt)&&void 0!==t?t:e.$paddingWt}),(e=>"0"===e.$paddingWt?"":e.isFiltered?"var(--color-primary-50)":"var(--color-gray-50)")),P=m.Ay.table(u||(u=(0,g.A)(["\n\tmin-height: ",";\n\tflex: ",";\n"])),(e=>{var t;return null!==(t=e.$minHeight)&&void 0!==t?t:e.$minHeight}),(e=>e.flex?e.flex:1))},58220:(e,t,n)=>{n.d(t,{A:()=>j});var i=n(65043),r=n(59116),a=n(21099),o=n(48808),l=n(39914),s=n(36903),d=n(30285),c=n(33339),h=n(87206),p=n(97605),x=n(15996),u=n(399),g=n(48120),v=n(7685),m=n(70579);const j=e=>{const{paymentAggregateData:t={},isFromCustomer:n}=e,{totalSales:j,paymentAmount:y,couponSales:f,totalProcedureSales:w,visitCount:S,procedureCount:$}=t,A=[{icon:s.A,value:"\ucd1d \ub9e4\ucd9c \ud569\uacc4",price:"".concat((0,v.nm)(j),"\uc6d0"),tooltipIcon:d.A,tooltipText:"\uacb0\uc81c \uae08\uc561 + \ud68c\uc6d0\uad8c \ud310\ub9e4 \uae08\uc561"},{icon:a.A,value:"\uacb0\uc81c\uae08\uc561",price:"".concat((0,v.nm)(y),"\uc6d0"),tooltipIcon:d.A,tooltipText:"\uc608\uc57d\uae08 + \ubc29\ubb38 \uacb0\uc81c \uae08\uc561"},{icon:l.A,value:"\ud68c\uc6d0\uad8c \ud310\ub9e4 \uae08\uc561",price:"".concat((0,v.nm)(f),"\uc6d0")},{icon:o.A,value:"\uc2dc\uc220 \ud310\ub9e4 \uae08\uc561",price:"".concat((0,v.nm)(w),"\uc6d0"),tooltipIcon:d.A,tooltipText:"\ub9e4\ucd9c\uc5d0 \ub4f1\ub85d\ub41c \uc2dc\uc220 \ud310\ub9e4\uac00\uc758 \ucd1d \ud569\uacc4"},{icon:c.A,value:"".concat(n?"\ub204\uc801":"\uace0\uac1d"," \ubc29\ubb38 \uc218"),price:"".concat((0,v.nm)(null===S||void 0===S?void 0:S.count),"\ud68c"),averageValue:(0,v.jU)(null===S||void 0===S?void 0:S.unitPrice,"1\ud68c"),tooltipIcon:n?d.A:null,tooltipText:(0,v.jU)(null===S||void 0===S?void 0:S.unitPrice,"1\ud68c")},{icon:h.A,value:"".concat(n?"\ub204\uc801 ":"","\uc2dc\uc220 \uac74\uc218"),price:"".concat((0,v.nm)(null===$||void 0===$?void 0:$.count),"\ud68c"),averageValue:(0,v.jU)(null===$||void 0===$?void 0:$.unitPrice,"1\ud68c"),tooltipIcon:n?d.A:null,tooltipText:(0,v.jU)(null===$||void 0===$?void 0:$.unitPrice,"1\ud68c")}],[C,b]=(0,i.useState)(null),T=()=>b(null);return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(p.He,{display:"flex",padding:"12px",...!n&&{margin:"16px 0",$marginWt:"20px 0",$boxShadow:"unset",border:"1px solid var(--color-gray-200)"},children:A.map(((e,t)=>{const i=e.icon,a=e.tooltipIcon,o=n&&e.averageValue;return(0,m.jsxs)(p.pT,{$directionWt:"column",$alignWt:"start",gap:n?"8px":"12px",justify:"start",$maxWidth:"236px",width:"100%",children:[(0,m.jsx)(p.pT,{...n?{width:"32px",height:"32px",radius:g.A.corner10}:{width:"56px",height:"56px",radius:g.A.corner16},$widthWt:"36px",$heightWt:"36px",background:"var(--color-gray-50)",$flexShrink:"0",children:(0,m.jsx)(i,{width:n?28:48,height:n?28:48,$widthWt:30,$heightWt:30})}),(0,m.jsxs)(p.pT,{direction:"column",align:"start",$maxWidth:"168px",width:"100%",children:[(0,m.jsxs)(p.pT,{gap:"4px",onMouseEnter:()=>(e=>b(e))(t),onMouseLeave:T,children:[(0,m.jsx)(u.x5,{width:"100%",color:"var(--color-gray-400)",fontSize:r.$N.size12,$lineHeight:r.kj.height20,children:e.value}),(0,m.jsx)(p.pT,{position:"relative",$hasCursor:!0,$isPcException:!0,display:o?"none":"",$displayLg:o?"block":"",$displayWt:o?"none":"",children:a&&!!e.tooltipText&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{width:16,height:16}),C===t&&(0,m.jsx)(x.A,{text:e.tooltipText,trianglePosition:"top",top:"calc(100% - 55px)",$triangleTop:"unset",$triangleBottom:"-14px",$triangleBorderColor:"var(--color-primary-500-main) transparent transparent transparent",$leftWt:n&&0===t?"260%":"",$triangleLeftWt:n&&0===t?"36%":""})]})})]}),(0,m.jsxs)(p.pT,{gap:"4px",children:[(0,m.jsx)(u.ld,{color:"var(--color-gray-600)",...n&&{fontSize:r.$N.size12,$lineHeight:r.kj.height20},fontWeight:r.sO.semiBold,$fontSizeWt:r.$N.size14,children:e.price}),(0,m.jsx)(u.x5,{color:"var(--color-gray-500)",fontSize:r.$N.size10,$lineHeight:r.kj.height18,$displayLg:n?"none":"",$displayWt:n?"block":"",$isPcException:!0,children:e.averageValue?"(".concat(e.averageValue,")"):""})]})]})]},e.value)}))})})}}
1,20652:(e,t,n)=>{n.r(t),n.d(t,{default:()=>gn});var i=n(97605),r=n(65043),a=n(29917),o=n(69428),l=n(399),s=n(46655),d=n(11289),c=n(48120),h=n(59116),p=n(3018),x=n(70579);const u=e=>{const{type:t,hasNoBackground:n,$gapWt:r}=e,a=o.Ow.find((e=>e.value===t));return a?(0,x.jsxs)(i.pT,{gap:"6px",padding:n?"2px 0":"2px 8px",radius:c.A.corner16,background:n?"unset":a.bgColor,$gapWt:r,children:[(0,x.jsx)(p.Dv,{width:"6px",height:"6px",background:a.bulletColor}),(0,x.jsx)(l.x5,{color:n?"var(--color-gray-500)":"var(--color-gray-600)",fontSize:h.$N.size12,fontWeight:h.sO.medium,$lineHeight:h.kj.height20,children:null===a||void 0===a?void 0:a.text})]}):null};var g=n(56743),v=n(7685);const m=e=>{const{color:t,amount:n,unit:r,$amountFontWeight:a}=e;return(0,x.jsxs)(i.pT,{gap:"2px",children:[(0,x.jsx)(l.x5,{color:t||"var(--color-gray-600)",fontWeight:a||h.sO.medium,children:(0,v.nm)(n)}),(0,x.jsx)(l.x5,{color:t||"var(--color-gray-600)",children:r||"\uc6d0"})]})},j=e=>{const{customerCount:t,procedureCount:n,procedureSales:r,cashCouponSales:a,passCouponSales:o}=e;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"flex-start",margin:"12px 0 0",gap:"14px",children:[(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:"\ubc29\ubb38\uc218"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:[(0,v.nm)(t),"\ud68c"]})]}),(0,x.jsx)(i.Vg,{width:"1px",height:"14px"}),(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:"\uc2dc\uc220\uac74"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:[(0,v.nm)(n),"\ud68c"]})]})]}),(0,x.jsx)(i.WZ,{background:"var(--color-gray-200)",margin:"16px 0"}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"12px",children:[(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.TREATMENT}),(0,x.jsx)(m,{amount:r,$amountFontWeight:h.sO.regular})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.CASH}),(0,x.jsx)(m,{amount:a,$amountFontWeight:h.sO.regular})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.PASS}),(0,x.jsx)(m,{amount:o,$amountFontWeight:h.sO.regular})]})]})]})};var y=n(94569),f=n(71867);const w=e=>{const{isOpened:t,paymentsCalendaWeeklyData:n,isFuture:r}=e,{selectedWeek:a,setSelectedWeek:o}=(0,y.A)((0,s.k)((e=>({selectedWeek:e.selectedWeek,setSelectedWeek:e.setSelectedWeek}))));return(0,x.jsxs)(i.pT,{width:"100%",direction:"column",padding:t?"12px 16px":"",border:"1px solid var(--color-gray-200)",background:"var(--color-white)",radius:t?c.A.corner16:c.A.corner40,$hasCursor:!0,onClick:()=>{return e=n.weekNumber,void o(a===e?0:e);var e},children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",padding:t?"8px 12px":"12px",background:t?"var(--color-gray-50)":"var(--color-white)",radius:c.A.corner40,children:[(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsx)(d.A,{}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:[n.weekNumber,"\uc8fc\ucc28"]})]}),(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsxs)(i.pT,{gap:"2px",children:[(0,x.jsx)(l.ld,{color:r?"var(--color-gray-500)":"var(--color-green-500-main)",fontWeight:h.sO.semiBold,children:(0,v.nm)(n.totalSales||0)}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:"\uc6d0"})]}),(0,x.jsx)(f.A,{isOpen:t})]})]}),t&&(0,x.jsx)(j,{customerCount:n.customerCount,procedureCount:n.procedureCount,procedureSales:n.procedureSales,cashCouponSales:n.cashCouponSales,passCouponSales:n.passCouponSales})]})};var S=n(81919),$=n(57377),A=n(59380);const C=()=>{const{paymentsCalendaWeeklyData:e}=(0,S.A)(),{selectedWeek:t,selectedMonth:n}=(0,y.A)((0,s.k)((e=>({selectedWeek:e.selectedWeek,selectedMonth:e.selectedMonth}))));return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",margin:"0 0 16px",children:[(0,x.jsx)(l.V9,{fontWeight:h.sO.medium,$lineHeight:h.kj.height28,children:"\uc8fc\uac04 \ub9e4\ucd9c"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",children:["* ",(0,$.FS)(n)]})]}),(0,x.jsx)(i.pT,{direction:"column",width:"100%",gap:"12px",children:null===e||void 0===e?void 0:e.map((e=>{const n=(0,A.E)(e.startDate);return(0,x.jsx)(w,{isFuture:n,isOpened:t===e.weekNumber,paymentsCalendaWeeklyData:e},e.weekNumber)}))})]})};const b=(0,n(4548).vt)((e=>({selectedUnRegisteredInfo:null,setSelectedUnRegisteredInfo:t=>e({selectedUnRegisteredInfo:t})})));var T=n(49153),W=n(86178),k=n.n(W);const D=e=>{const{data:t,setCreatePaymentModal:n}=e,{startTime:r,allAmount:a,customerName:o,shopPaymentServeList:s,customerGender:d,isCustomerDeleted:p}=t,u=b((e=>e.setSelectedUnRegisteredInfo));return(0,x.jsxs)(i.pT,{width:"100%",direction:"column",padding:"12px 16px",background:"var(--color-white)",border:"1px solid var(--color-gray-200)",radius:c.A.corner12,$hasCursor:!0,onClick:()=>{n(!0),u(t)},children:[(0,x.jsxs)(i.pT,{width:"inherit",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:k()(r).format("YY.MM.DD HH:mm")}
1),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",children:[" ",(0,v.nm)(a),"\uc6d0"]})]}),(0,x.jsxs)(i.pT,{width:"inherit",justify:"space-between",children:[(0,x.jsx)(T.A,{$maxWidth:"90px",name:o,gender:d,isDeleted:p,color:"var(--color-gray-500)",$fontSize:h.$N.size12,$lineHeight:h.kj.height20}),(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,$whiteSpace:"nowrap",children:(0,v.kS)(s)})]})]})};var P=n(2634);const R=e=>{const{setModal:t,unRegisteredListData:n,setCreatePaymentModal:r}=e;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.pT,{direction:"column",align:"start",width:"100%",gap:"12px",children:[(0,x.jsxs)(i.pT,{gap:"8px",margin:"0 0 4px",children:[(0,x.jsx)(l.V9,{fontWeight:h.sO.medium,children:"\ubbf8\ub4f1\ub85d \ub9e4\ucd9c"}),(0,x.jsx)(i.pT,{padding:"2px 8px",background:"var(--color-gray)",radius:c.A.corner16,children:(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontWeight:h.sO.medium,children:[(0,v.nm)(null===n||void 0===n?void 0:n.pagination.totalElements),"\uac74"]})})]}),n&&n.content.slice(0,3).map((e=>(0,x.jsx)(D,{data:e,setCreatePaymentModal:r},e.id))),n&&n.content.length>3&&(0,x.jsxs)(i.pT,{width:"100%",height:"48px",justify:"start",gap:"8px",padding:"8px 16px",radius:c.A.corner12,border:"1px solid var(--color-gray-200)",background:"var(--color-white)",$hoverBackground:"var(--color-gray-50)",$activeBackground:"var(--color-gray-100)",$hasCursor:!0,onClick:()=>t(!0),children:[(0,x.jsx)(P.A,{stroke:"var(--color-gray-300)",width:24,height:24}),(0,x.jsx)(l.x5,{fontWeight:h.sO.regular,$lineHeight:h.kj.height22,color:"var(--color-gray-400)",$userSelect:"none",children:"\uc804\uccb4\ubcf4\uae30"})]})]})})},N=e=>{const{mode:t,type:n,salesChangePercentage:r,totalSales:a,isFuture:o}=e;return(0,x.jsxs)(i.pT,{width:"100%",padding:"NARROW"===t?"8px 12px":"12px 16px",justify:"space-between",background:"var(--color-gray-50)",radius:c.A.corner40,children:[(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsx)(d.A,{}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontSize:"NARROW"===t?"":h.$N.size16,$lineHeight:"NARROW"===t?"":h.kj.height24,fontWeight:h.sO.medium,children:"\ucd1d \ub9e4\ucd9c"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-500)",fontSize:"NARROW"===t?h.$N.size12:"",$lineHeight:"NARROW"===t?h.kj.height18:"",fontWeight:"NARROW"===t?h.sO.medium:"",children:["MONTHLY"===n?"\uc804\uc6d4":"\uc804\uc77c"," \ub300\ube44"]}),(0,x.jsxs)(l.x5,{color:o||null===r?"var(--color-gray-500)":r<0?"var(--color-red-500-main)":"var(--color-green-500-main)",fontSize:"NARROW"===t?h.$N.size12:"",$lineHeight:"NARROW"===t?h.kj.height18:"",fontWeight:h.sO.medium,children:[null===r?"-":"".concat(Math.trunc(r)),"%"]})]}),(0,x.jsxs)(i.pT,{gap:"2px",children:[(0,x.jsx)(l.ld,{color:o?"var(--color-gray-500)":"var(--color-green-500-main)",fontSize:"NARROW"===t?"":h.$N.size18,$lineHeight:"NARROW"===t?"":h.kj.height26,fontWeight:h.sO.semiBold,children:(0,v.nm)(a)}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontSize:"NARROW"===t?"":h.$N.size16,$lineHeight:"NARROW"===t?"":h.kj.height24,children:"\uc6d0"})]})]})},E=()=>{var e,t,n,r,a,o;const{paymentsCalendarMonthlyData:s}=(0,S.A)(),d=(0,y.A)((e=>e.selectedMonth)),p=(0,A._s)(d);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",margin:"32px 0 16px",children:[(0,x.jsx)(l.V9,{fontWeight:h.sO.medium,$lineHeight:h.kj.height28,children:"\uc6d4\uac04 \ub9e4\ucd9c"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",children:["* ",(0,$.FS)(d)]})]}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",padding:"12px 16px",border:"1px solid var(--color-gray-200)",background:"var(--color-white)",radius:c.A.corner16,children:[(0,x.jsx)(N,{mode:"NARROW",type:"MONTHLY",salesChangePercentage:null!==(e=null===s||void 0===s?void 0:s.salesChangePercentage)&&void 0!==e?e:null,totalSales:(null===s||void 0===s?void 0:s.totalSales)||0,isFuture:p}),(0,x.jsx)(j,{customerCount:null!==(t=null===s||void 0===s?void 0:s.customerCount)&&void 0!==t?t:0,procedureCount:null!==(n=null===s||void 0===s?void 0:s.procedureCount)&&void 0!==n?n:0,procedureSales:null!==(r=null===s||void 0===s?void 0:s.procedureSales)&&void 0!==r?r:0,cashCouponSales:null!==(a=null===s||void 0===s?void 0:s.cashCouponSales)&&void 0!==a?a:0,passCouponSales:null!==(o=null===s||void 0===s?void 0:s.passCouponSales)&&void 0!==o?o:0})]})]})};var L=n(29206);const I=e=>{const{selectedDate:t,selectedViewType:n,setTodayTodoListModal:l,todayReservationTotalCount:s,todayReservationDtoList:d,hasNoReserveStatus:c,setUnRegisteredModal:h,setCreatePaymentModal:p}=e,{unRegisteredListData:u,setIsFetchUnRegistered:g}=(0,L.A)();return(0,r.useEffect)((()=>{g(!0)}),[]),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.pT,{direction:"column",width:"100%",children:[n===o.PC[0].value&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(R,{setModal:h,unRegisteredListData:u,setCreatePaymentModal:p}),(0,x.jsx)(i.WZ,{background:"var(--color-gray-200)",margin:u&&u.content.length>0?"24px 0":"16px 0"}),(0,x.jsx)(a.A,{selectedDate:t,setTodayTodoListModal:l,todayReservationTotalCount:s,todayReservationDtoList:d,hasNoReserveStatus:c})]}),n===o.PC[1].value&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(C,{}),(0,x.jsx)(E,{})]})]})})};
1var z=n(11177),M=n(87648),H=n(61158),B=n(93417),F=n(35509),O=n(73216),V=n(23178),U=n(6263),Y=n(44342);const K=e=>{const{selectedViewType:t,setSelectedViewType:n}=e,r=(0,O.Zp)(),{hasCouponList:a,hasTreatmentList:l}=(0,U.A)(),s=(0,V.W)((e=>e.setToast));return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.pT,{width:"100%",$maxHeight:"40px",justify:"space-between",children:[(0,x.jsxs)(i.pT,{gap:"14px",children:[(0,x.jsx)(H.A,{title:"\ub9e4\ucd9c",hasOnlyTitle:!0}),(0,x.jsx)(B.A,{selectedValue:t,setSelectedValue:n,tabValueArray:o.PC})]}),t===o.PC[0].value&&(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsxs)(F.cO,{height:"40px",padding:"8px 28px",$paddingWt:"8px 18px 8px 24px",gap:"4px",fontSize:h.$N.size14,fontWeight:h.sO.regular,$lineHeight:h.kj.height22,onClick:()=>{a?r("create/coupon"):s("\ud310\ub9e4 \uc911\uc778 \ud68c\uc6d0\uad8c\uc774 \uc5c6\uc5b4\uc694. [\ud68c\uc6d0\uad8c] \uba54\ub274\ub97c \ud655\uc778\ud574 \uc8fc\uc138\uc694.","warning")},children:["\ud68c\uc6d0\uad8c \ub4f1\ub85d",(0,x.jsx)(Y.A,{stroke:"var(--color-gray-600)"})]}),(0,x.jsxs)(F.oT,{height:"40px",padding:"8px 28px",$paddingWt:"8px 18px 8px 24px",gap:"4px",fontSize:h.$N.size14,fontWeight:h.sO.regular,$lineHeight:h.kj.height22,$activeTransform:"scale(0.8408)",onClick:()=>{l?r("create/treatment"):s("\ud310\ub9e4 \uc911\uc778 \uc2dc\uc220\uc774 \uc5c6\uc5b4\uc694. [\uc2dc\uc220] \uba54\ub274\ub97c \ud655\uc778\ud574\uc8fc\uc138\uc694.","warning")},children:["\ub9e4\ucd9c \ub4f1\ub85d",(0,x.jsx)(Y.A,{stroke:"var(--color-white)"})]})]})]})})};var q=n(92858),Z=n(86047),X=n(30956),Q=n(24678),G=n(71761),J=n(27016),_=n(13457),ee=n(36579),te=n(94839),ne=n(57501),ie=n(61760);const re=()=>{const e=sessionStorage.getItem("shopId"),{data:t}=(0,ne._P)(e,!0),{data:n}=(0,ie.lU)(!0),[i,a]=(0,r.useState)([]),[o,l]=(0,r.useState)([]),s=(0,r.useMemo)((()=>[{colWidth:"125px",text:"\ub4f1\ub85d\uc77c",textAlign:"center",value:"createdAt",hasSort:!0,sortValue:"createdAt",padding:"0 14px 0 26px"},{colWidth:"125px",text:"\uace0\uac1d\uba85",textAlign:"center",value:"name",hasSort:!0,sortValue:"customerName",padding:"0 16px"},{colWidth:"80px",text:"\ubc29\ubb38",value:"tag",textAlign:"center",hasFilter:!0,filterData:te.bB,hoverBoxPadding:"4px 0",categoryButtonWidth:"80px",categoryPadding:"0 12px"},{colWidth:"150px",text:"\ub2f4\ub2f9\uc790",textAlign:"center",value:"tel",hoverBoxPadding:"4px 0",filterData:i,hasFilter:!0,categoryButtonWidth:"100px"},{colWidth:"142px",text:"\uad6c\ubd84",textAlign:"center",value:"tel",hasFilter:!0,filterData:te.Vo,hoverBo
1xPadding:"4px 0",categoryButtonWidth:"80px"},{colWidth:"125px",text:"\ub9e4\ucd9c\ud56d\ubaa9",value:"memo",textAlign:"center"},{colWidth:"125px",text:"\uacb0\uc81c\uc218\ub2e8",textAlign:"center",hoverBoxPadding:"4px 0",filterData:o,hasFilter:!0,categoryButtonWidth:"100px",hasBtnEllipsis:!0},{colWidth:"125px",text:"\ud310\ub9e4\uac00",value:"memo",textAlign:"center",hasSort:!0,sortValue:"allAmount"},{colWidth:"125px",text:"\ud68c\uc6d0\uad8c\uc0ac\uc6a9",value:"memo",textAlign:"center",hasSort:!0,sortValue:"couponUsedAmount"},{colWidth:"125px",text:"\ud560\uc778",value:"memo",textAlign:"center"},{colWidth:"125px",text:"\ub9e4\ucd9c\uae08\uc561",value:"memo",textAlign:"center",hasSort:!0,sortValue:"paymentAmountAndDeposit"},{colWidth:"80px",text:"\uc0c1\ud0dc",value:"memo",textAlign:"center",hasFilter:!0,hoverBoxPadding:"4px 0px",padding:"0 8px 0 0",filterData:te.QZ,categoryButtonWidth:"80px",categoryPadding:"0 12px"}]),[i,o]),d=(0,r.useMemo)((()=>[{colWidth:"180px",text:"\uc608\uc57d\uc77c",textAlign:"center",value:"startTime",hasSort:!0,sortValue:"startTime",padding:"0 14px 0 26px",defaultSortValue:"startTime"},{colWidth:"180px",text:"\uace0\uac1d\uba85",textAlign:"center",value:"customerName",hasSort:!0,sortValue:"customerName",padding:"0 16px",defaultSortValue:"startTime"},{colWidth:"180px",text:"\ub2f4\ub2f9\uc790",textAlign:"center",value:"staffNickName",hoverBoxPadding:"4px 0",filterData:i,hasFilter:!0,categoryButtonWidth:"100px"},{colWidth:"180px",text:"\ub9e4\ucd9c\ud56d\ubaa9",value:"shopPaymentServeList",textAlign:"center"},{colWidth:"180px",text:"\ud310\ub9e4\uac00",value:"allAmount",textAlign:"center",hasSort:!0,sortValue:"allAmount",defaultSortValue:"startTime"},{colWidth:"64px",text:"\uc0ad\uc81c",value:"memo",textAlign:"center"}]),[i]);return(0,r.useEffect)((()=>{t&&a(t.staffPreviewList.map((e=>({value:e.staffId,text:e.staffName}))))}),[t]),(0,r.useEffect)((()=>{n&&l(n.map((e=>({value:e.paymentType===g.gb.ETC?e.manualMethodId:e.paymentType,text:e.methodName}))))}),[n]),{THEAD_PAYMENTS:s,THEAD_UNREGISTERED_PAYMENTS:d}};var ae=n(90322);const oe=(0,r.forwardRef)(((e,t)=>{const{top:n,left:r,paymentTooltipListData:a}=e;return(0,x.jsx)(i.vp,{ref:t,top:n,left:r,$zIndex:Q.A.zIndexInlineTooltip,children:(0,x.jsxs)(i.He,{width:"100%",$minWidth:"240px",direction:"column",align:"start",background:"var(--color-white)",padding:"16px",gap:"4px",$boxShadow:"var(--shadow-5)",border:"1px solid var(--color-gray-200)",children:[(0,x.jsx)(l.x5,{fontWeight:h.sO.medium,children:a.customerName}),(0,x.jsxs)(i.pT,{width:"100%",gap:"8px",justify:"space-between",children:[a.customerTel&&(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",fontWeight:h.sO.medium,children:(0,v.n4)(a.customerTel)}),a.customerRecentReservationAt&&(0,x.jsx)(l.x5,{color:"var(--color-gray-300)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"".concat((0,v._V)(a.customerRecentReservationAt)," (").concat((0,v.yQ)(a.customerRecentReservationAt),")")})]})]})})}));oe.displayName="CustomerInfoTooltip";const le=oe,se=(0,r.forwardRef)(((e,t)=>{const{top:n,left:r,setDeleteConfirmModal:a,setCancelConfirmModal:o,selectedData:s}=e,d=(0,O.Zp)(),h=g.gi.CANCELED===(null===s||void 0===s?void 0:s.status),p=e=>{if(s)return s.paymentItemTypeList[0]===g.gE.COUPON?d("/payments/coupon/".concat(null===s||void 0===s?void 0:s.paymentId),{state:{isCanceled:h}}):d("/payments/treatment/".concat(null===s||void 0===s?void 0:s.paymentId),{state:{isCanceled:h,isRecreate:e}})};return(0,x.jsx)(i.vp,{ref:t,position:"fixed",top:n,left:r,$zIndex:Q.A.zIndexInlineTooltip,children:(0,x.jsx)(i.He,{direction:"column",align:"start",width:"80px",background:"var(--color-white)",padding:"0",gap:"4px",$boxShadow:"var(--shadow-5)",border:"1px solid var(--color-gray-200)",radius:c.A.corner12,$hasCursor:!0,children:s.status===g.gi.REGISTERED?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.pT,{padding:"8px",onClick:()=>p(!1),children:(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:"\uc218\uc815"})}),(0,x.jsx)(i.pT,{padding:"8px",onClick:()=>o(!0),children:(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:"\ucde8\uc18c"})})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.pT,{padding:"8px",onClick:()=>p(!0),children:(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:"\uc7ac\ub4f1\ub85d"})}),(0,x.jsx)(i.pT,{padding:"8px",onClick:()=>a(!0),children:(0,x.jsx)(l.x5,{color:"var(--color-red-500-main)",children:"\uc0ad\uc81c"})})]})})})}));
1se.displayName="EditPopup";const de=se,ce=(0,r.forwardRef)(((e,t)=>{const{top:n,left:r,paymentTooltipListData:a}=e;return(0,x.jsx)(i.vp,{ref:t,top:n,left:r,$zIndex:Q.A.zIndexInlineTooltip,children:(0,x.jsx)(i.He,{width:"100%",$minWidth:"240px",direction:"column",align:"start",background:"var(--color-white)",padding:"0",$boxShadow:"var(--shadow-5)",border:"1px solid var(--color-gray-200)",overflow:"hidden",children:a.shopPaymentServeList.map(((e,t)=>(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",padding:"12px 16px",$borderBottom:"1px solid var(--color-gray-100)",gap:"8px",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:(0,v.kS)([{name:e.name,count:e.count}])}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",children:[(0,v.nm)(e.amount*e.count),"\uc6d0"]})]},t)))})})}));ce.displayName="PaymentListTooltip";const he=ce,pe=e=>{const{scrollRef:t,safeMargin:n=8}=e;(0,q.e)();const i=(0,q.E)((e=>e.isUnderWideTabletScreen)),a=(0,r.useRef)(null),[o,l]=(0,r.useState)(null),[s,d]=(0,r.useState)(null),[c,h]=(0,r.useState)({top:0,left:0}),[p,x]=(0,r.useState)(),u=e=>{const n=t.current;if(!n)return;const i=n.getBoundingClientRect(),r=e.getBoundingClientRect(),a=r.bottom-i.top,o=r.left-i.left+r.width/2;h({top:a,left:o})};return(0,r.useEffect)((()=>{if(!o||!s||i)return;const e=()=>u(o),n=t.current;return n?(n.addEventListener("scroll",e),window.addEventListener("resize",e),e(),()=>{n.removeEventListener("scroll",e),window.removeEventListener("resize",e)}):void 0}),[o,s,i]),(0,r.useLayoutEffect)((()=>{if(!a.current||!t.current||!s||i)return;const e=a.current.offsetHeight,r=t.current.getBoundingClientRect();r.top+c.top+e+n>r.bottom&&h((t=>({...t,top:t.top-e-n})))}),[c.top,s,i]),{tooltipRef:a,visibleId:s,setVisibleId:d,position:c,handleMouseEnter:(e,t,n)=>{if(i)return;const r=e.currentTarget;l(r),n&&x(n),u(r),d(t)},paymentTooltipListData:p,setPaymentTooltipListData:x}};var xe=n(76172),ue=n(49774);const ge=e=>{const{setPageParams:t}=(0,ue.C)(),[n,i]=(0,r.useState)(null),[a,o]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),[d,c]=(0,r.useState)(null),[h,p]=(0,r.useState)(null),[x,u]=(0,r.useState)(null),[v,m]=(0,r.useState)("createdAt"),[j,y]=(0,r.useState)("desc"),f=(n,i)=>{(0,xe.CV)([{valueName:"pn",newValue:0},{valueName:n,newValue:i}],e),t({[n]:i,pageNumber:0})};(0,r.useEffect)((()=>{var e;f("vtf","all"===(null===n||void 0===n?void 0:n.value)?null:null!==(e=null===n||void 0===n?void 0:n.value)&&void 0!==e?e:null)}),[n]),(0,r.useEffect)((()=>{var e;f("ssf","all"===(null===a||void 0===a?void 0:a.value)?null:null!==(e=null===a||void 0===a?void 0:a.value)&&void 0!==e?e:null)}),[a]),(0,r.useEffect)((()=>{var e;f("ptf","all"===(null===l||void 0===l?void 0:l.value)?null:null!==(e=null===l||void 0===l?void 0:l.value)&&void 0!==e?e:null)}),[l]),(0,r.useEffect)((()=>{var e;f("psf","all"===(null===d||void 0===d?void 0:d.value)?null:null!==(e=null===d||void 0===d?void 0:d.value)&&void 0!==e?e:null)}),[d]),(0,r.useEffect)((()=>{var e;const t=null===h||void 0===h?void 0:h.value;return"all"===t?(f("pm",null),void f("pmi",null)):"number"===typeof t?(f("pm",g.gb.ETC),void f("pmi",String(t))):(f("pm",null!==(e=t)&&void 0!==e?e:null),void f("pmi",null))}),[h]),(0,r.useEffect)((()=>{(0,xe.CV)([{valueName:"sb",newValue:v},{valueName:"d",newValue:j}],e),t({direction:j})}),[j,v]),(0,r.useEffect)((()=>{const t=setTimeout((()=>{(0,xe.CV)([{valueName:"st",newValue:x}],e)}),500);return()=>clearTimeout(t)}),[x]);return{getSelectedValue:e=>{var t,i,r,o,s;switch(e){case"\ubc29\ubb38":return String(null!==(t=null===n||void 0===n?void 0:n.value)&&void 0!==t?t:"");case"\ub2f4\ub2f9\uc790":return String(null!==(i=null===a||void 0===a?void 0:a.value)&&void 0!==i?i:"");case"\uad6c\ubd84":return String(null!==(r=null===l||void 0===l?void 0:l.value)&&void 0!==r?r:"");case"\uc0c1\ud0dc":return String(null!==(o=null===d||void 0===d?void 0:d.value)&&void 0!==o?o:"");case"\uacb0\uc81c\uc218\ub2e8":return String(null!==(s=null===h||void 0===h?void 0:h.value)&&void 0!==s?s:"");default:return""}},getSelectedText:e=>{switch(e){case"\ubc29\ubb38":return(null===n||void 0===n?void 0:n.text)||"";case"\ub2f4\ub2f9\uc790":return(null===a||void 0===a?void 0:a.text)||"";case"\uad6c\ubd84":return(null===l||void 0===l?void 0:l.text)||"";case"\uc0c1\ud0dc":return(null===d||void 0===d?void 0:d.text)||"";case"\uacb0\uc81c\uc218\ub2e8":return(null===h||void 0===h?void 0:h.text)||"";default:return""}},setSelectedData:(e,t)=>{switch(t){case"\ubc29\ubb38":i(e);break;case"\ub2f4\ub2f9\uc790":o(e);break;case"\uad6c\ubd84":s(e);break;case"\uc0c1\ud0dc":c(e);break;case"\uacb0\uc81c\uc218\ub2e8":p(e)}},sortBy:v,setSortBy:m,direction:j,setDirection:y,searchInput:x,setSearchInput:u,onSearch:()=>{(0,xe.CV)([{valueName:"st",newValue:x}],e)},onClear:()=>{(0,xe.CV)([{valueName:"st",newValue:null},{valueName:"pn",newValue:0}],e)}}};var ve=n(42586),me=n(76269),je=n(80663);const ye=e=>{const{scrollBoxRef:t,isHorizontalScrollable:n}=(0,je.A)();(0,me.v)(t),(0,q.e)();const i=(0,ve._)((e=>e.isAtEnd)),a=(0,r.useRef)(null),[o,l]=(0,r.useState)(null),[s,d]=(0,r.useState)({x:0,y:0}
1),[c,h]=(0,r.useState)(),p=e=>{a.current&&!a.current.contains(e.target)&&l(null)};return(0,r.useEffect)((()=>(null!==o&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)})),[o]),{scrollBoxRef:t,isHorizontalScrollable:n,isAtEnd:i,activeRowId:o,editPopupRef:a,editPopupPosition:s,onMovePage:t=>{(0,xe.CV)([{valueName:"pn",newValue:t-1}],e)},handleRightClick:(e,t,n)=>{e.preventDefault(),l(t),d({x:e.clientX,y:e.clientY}),h(n)},selectedData:c}};var fe=n(65650),we=n(28568);const Se=e=>{var t,n,a,s,d,p,u;const{paymentListData:m,setPaymentsParams:j,paymentPagination:y,paymentsParams:f}=e,w=(0,O.Zp)(),{scrollBoxRef:S,isHorizontalScrollable:$,isAtEnd:A,activeRowId:C,editPopupRef:b,editPopupPosition:W,onMovePage:D,handleRightClick:P,selectedData:R}=ye(j),{THEAD_PAYMENTS:N}=re(),{getSelectedValue:E,getSelectedText:L,setSelectedData:I,sortBy:z,setSortBy:M,setDirection:H}=ge(j),{putPaymentStatus:B}=(0,G.A)(),{tooltipRef:F,visibleId:V,setVisibleId:U,position:Y,handleMouseEnter:K,paymentTooltipListData:q}=pe({scrollRef:S,safeMargin:22}),{tooltipRef:Z,visibleId:X,setVisibleId:ne,position:ie,handleMouseEnter:oe,paymentTooltipListData:se}=pe({scrollRef:S,safeMargin:22}),[ce,xe]=(0,r.useState)(!1),[ue,ve]=(0,r.useState)(!1);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.oO,{width:"100%",radius:c.A.corner16,overflow:"hidden",children:[!A&&$&&(0,x.jsx)(i.gb,{$zIndex:"99"}),(0,x.jsxs)(i.He,{ref:S,display:"flex",direction:"column",height:"calc(100dvh - 354px)",$heightWt:m&&(null===m||void 0===m||null===(t=m.content)||void 0===t?void 0:t.length)>1?"calc(100dvh - 354px)":"318px",padding:m&&(null===m||void 0===m||null===(n=m.content)||void 0===n?void 0:n.length)>0?"0 0 48px":"0",$overflowX:"scroll",$boxShadow:"unset",border:"1px solid var(--color-gray-200)",$minHeight:"400px",$minHeightWt:m&&(null===m||void 0===m||null===(a=m.content)||void 0===a?void 0:a.length)>1?"400px":"318px",$maxHeight:"564px",children:[(0,x.jsx)(ee.Du,{display:"flex",direction:"column",padding:"0",width:"100%",$minWidth:"1400px",$minHeight:"320px",$minHeightWt:m&&(null===m||void 0===m||null===(s=m.content)||void 0===s?void 0:s.length)>1?"320px":"280px",overflow:"unset",$overflowY:"unset",flex:"1",children:(0,x.jsxs)(ee.Ic,{flex:m&&(null===m||void 0===m||null===(d=m.content)||void 0===d?void 0:d.length)>6?"1":"unset",children:[(0,x.jsx)(_.A,{sortBy:z,setSortBy:M,setDirection:H,getSelectedValue:E,getSelectedText:L,setSelectedData:I,tHeadList:N}),(0,x.jsx)(ee.NN,{$maxHeight:"460px",children:m&&m.content.map((e=>{var t,n;const{paymentId:r,createdAt:a,customerName:s,customerId:d,staffName:c,paymentItemTypeList:p,shopPaymentServeList:u,paymentMethodList:g,saleAmount:j,usedCouponAmount:y,discountedAmount:f,totalAmount:S,visitStatus:$,status:A,customerGender:C,isCustomerDeleted:b}=e,W=m.content.length>7?"22px":"46px",D=null===(t=o.Xr.filter((e=>e.value===A))[0])||void 0===t?void 0:t.text,R=null===(n=te.Vo.filter((e=>e.value===p[0]))[0])||void 0===n?void 0:n.text;return(0,x.jsxs)(ee.Tr,{onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),P(t,r,e)},onClick:()=>"\uc2dc\uc220"===R?w("/payments/treatment/view/".concat(r)):"\ud68c\uc6d0\uad8c"===R?w("/payments/coupon/view/".concat(r)):void 0,children:[(0,x.jsx)(ee.Td,{height:W,children:(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",width:"125px",margin:"0 16px",$marginWt:"0 24px",align:"center",children:k()(a).format("YY.MM.DD HH:mm")})}),(0,x.jsx)(ee.Td,{position:"relative",height:W,children:(0,x.jsx)(i.pT,{$maxWidth:"90px",margin:"0 auto",onMouseEnter:t=>{d&&K(t,r,e)},onMouseLeave:()=>U(null),onClick:e=>{d&&(e.stopPropagation(),w("/customer/detail/".concat(d)))},children:(0,x.jsx)(T.A,{name:s,gender:C,isDeleted:b,$fontSize:h.$N.size14,$lineHeight:h.kj.height22,$fontWeight:h.sO.regular,showClickableStyle:!!d,isShortUnassigned:!0})})}),(0,x.jsx)(ee.Td,{height:W,children:(0,x.jsx)(i.pT,{children:(0,x.jsx)(ae.A,{type:$})})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsx)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:c})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"142px",children:(0,x.jsx)(i.pT,{children:(0,x.jsx)(ae.A,{type:p[0]})})}),(0,x.jsx)(ee.Td,{position:"relative",height:W,$maxWidth:"125px",children:(0,x.jsx)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",onMouseEnter:t=>oe(t,r,e),onMouseLeave:()=>ne(null),children:(0,v.kS)(u)})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsx)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:[...new Set(g)].join("+")})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsxs)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:[(0,v.nm)(j),"\uc6d0"]})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsxs)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:[(0,v.nm)(y),"\uc6d0"]})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsxs)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:[(0,v.nm)(f),"\uc6d0"]})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"125px",children:(0,x.jsxs)(l.x5,{className:"ellipsis",width:"125px",color:"var(--color-gray-600)",align:"center",children:[(0,v.nm)(S),"\uc6d0"]})}),(0,x.jsx)(ee.Td,{height:W,$maxWidth:"80px",children:(0,x.jsx)(l.x5,{color:"\ucde8\uc18c"===D?"var(--color-red-500-main)":"var(--color-gray-600)",align:"center",children:D})})]},r)}))}),m&&(null===m||void 0===m||null===(p=m.content)||void 0===p?void 0:p.length)<1&&(0,x.jsx)(i.cS,{display:"block",$displayWt:"none",left:"0",top:"50%",transform:"translateY(calc(-50% + 23px))",children:(0,x.jsx)(fe.A,{description:"\ub4f1\ub85d\ub41c \ub9e4\ucd9c\uc774 \uc5c6\uc5b4\uc694",height:"auto",margin:"0"})})]})}),m&&!((null===m||void 0===m?void 0:m.content.length)>0)&&(0,x.jsx)(i.cS,{display:"none",left:"0",top:"50%",$transformWt:"translateY(calc(-50% - 10px
1))",children:(0,x.jsx)(fe.A,{description:"\ub4f1\ub85d\ub41c \ub9e4\ucd9c\uc774 \uc5c6\uc5b4\uc694",height:"auto",$marginWt:"0"})}),y&&(null===y||void 0===y?void 0:y.totalPages)>0?(0,x.jsx)(i.vp,{justify:"end",bottom:"20px",right:"16px",children:(0,x.jsx)(J.A,{onMovePage:D,pagination:y})}):""]}),V&&(0,x.jsx)(le,{ref:F,top:"".concat(Y.top,"px"),left:"".concat(Y.left,"px"),paymentTooltipListData:q}),X&&se&&(null===se||void 0===se||null===(u=se.shopPaymentServeList)||void 0===u?void 0:u.length)>0&&(0,x.jsx)(he,{ref:Z,top:"".concat(ie.top,"px"),left:"".concat(ie.left,"px"),paymentTooltipListData:se}),C&&(0,x.jsx)("div",{ref:b,style:{zIndex:Q.A.zIndexTooltip,position:"absolute"},children:(0,x.jsx)(de,{top:"".concat(W.y,"px"),left:"".concat(W.x,"px"),selectedData:R,setDeleteConfirmModal:ve,setCancelConfirmModal:xe})})]}),(0,x.jsx)(we.A,{modal:ce,setModal:xe,description:"\ub4f1\ub85d\ub41c \ub9e4\ucd9c\uc744 \ucde8\uc18c\ud558\uc2dc\uaca0\uc5b4\uc694?",caption:"\ucde8\uc18c \ub0b4\uc5ed\uc740 \ub418\ub3cc\ub9b4 \uc218 \uc5c6\uc5b4\uc694",onSubmit:()=>{B(null===R||void 0===R?void 0:R.paymentId,{status:g.gi.CANCELED,comeFrom:"PAYMENT"},f,(()=>xe(!1)))}}),(0,x.jsx)(we.A,{modal:ue,setModal:ve,description:"\ucde8\uc18c\ub41c \ub9e4\ucd9c\uc744 \uc0ad\uc81c\ud560\uae4c\uc694?",caption:"\uc0ad\uc81c\ub41c \ub9e4\ucd9c\uc740 \ubcf5\uad6c\ud560 \uc218 \uc5c6\uc5b4\uc694",onSubmit:()=>{B(null===R||void 0===R?void 0:R.paymentId,{status:g.gi.DELETED,comeFrom:"PAYMENT"},f,(()=>ve(!1)))}})]})};var $e=n(31140),Ae=n(2690),Ce=n(2060),be=n(28007),Te=n(56036);const We=e=>{const{startDate:t,endDate:n,setStartDate:a,setEndDate:d,setPaymentsParams:p,selectedStaff:u,setSelectedStaff:g,hasStaffFilter:v,dateLimit:m}=e,j=k()(),{setPageParams:y,pageParams:f}=(0,ue.C)((0,s.k)((e=>({setPageParams:e.setPageParams,pageParams:e.pageParams})))),{searchInput:w,setSearchInput:S,onSearch:A,onClear:C}=ge(p),[b,T]=(0,r.useState)(null!==f&&void 0!==f&&f.selectedDateButton?null===f||void 0===f?void 0:f.selectedDateButton:"week"),W=(e,t)=>{if("startDate"===t){const t=k()(e).format("YYYY-MM-DDT00:00:00");y({startDate:t}),a(e)}else{const t=k()(e).format("YYYY-MM-DDT23:59:59");y({endDate:t}),d(e)}},D=e=>{T(e);const{from:t,to:n}=(0,$.su)(e,j);y({startDate:(0,$._y)(t),endDate:(0,$._y)(n),selectedDateButton:e}),a(t),d(n)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",padding:"12px 16px",$paddingWt:"12px 14px",background:"var(--color-gray-50)",radius:c.A.corner16,border:"1px solid var(--color-gray-100)",margin:"24px 0 0",$marginWt:"24px 0 16px",children:[(0,x.jsxs)(i.pT,{gap:"12px",children:[(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsx)($e.A,{className:"smallOutlineInput",calendarClassName:"rangeCalendar startPosition",maxDate:n,minDate:m?(0,be.e)(n,m):void 0,selected:t,startDate:t,endDate:n,selectsStart:!0,isStart:!0,monthsShown:2,dateFormat:"yy.MM.dd",onChange:e=>W(e,"startDate")}),(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",$whiteSpace:"nowrap",children:"~"}),(0,x.jsx)($e.A,{className:"smallOutlineInput",calendarClassName:"rangeCalendar endPosition",minDate:t,maxDate:m?(0,Te.f)(t,m):void 0,selected:n,startDate:t,endDate:n,selectsEnd:!0,monthsShown:2,dateFormat:"yy.MM.dd",onChange:e=>W(e,"endDate")})]}),(0,x.jsx)(i.pT,{gap:"8px",$displayWt:"none",children:o.J9.map((e=>{const t=b===e.value;return(0,x.jsx)(F.oT,{width:"max-content",height:"34px",padding:"6px 16px",background:t?"var(--color-gray-600)":"var(--color-gray-50)",border:t?"none":"1px solid var(--color-gray-200)",color:t?"var(--color-white)":"var(--color-gray-400)",fontSize:h.$N.size14,$lineHeight:h.kj.height22,fontWeight:h.sO.regular,onClick:()=>D(e.value),children:e.label},e.value)}))})]}),v?(0,x.jsx)(Ce.A,{selectedStaff:u,setSelectedStaff:g}):(0,x.jsx)(Ae.A,{searchBarInput:w,setSearchBarInput:S,onSearch:A,onClear:C,placeholder:"\uace0\uac1d\uba85, \uc2dc\uc220\uba85, \ud734\ub300\ud3f0 \ubc88\ud638 \uac80\uc0c9"})]}),(0,x.jsx)(i.pT,{display:"none",$displayWt:"flex",gap:"8px",width:"100%",justify:"start",children:o.J9.map((e=>{const t=b===e.value;return(0,x.jsx)(F.oT,{width:"max-content",height:"34px",padding:"6px 16px",background:t?"var(--color-gray-600)":"var(--color-gray-50)",border:t?"none":"1px solid var(--color-gray-200)",color:t?"var(--color-white)":"var(--color-gray-400)",fontSize:h.$N.size14,$lineHeight:h.kj.height22,fontWeight:h.sO.regular,onClick:()=>D(e.value),children:e.label},e.value)}))})]})};var ke=n(58220);const De=()=>{const{paymentAggregateData:e,startDate:t,endDate:n,setStartDate:i,setEndDate:a,paymentListData:o,paymentsParams:l,setPaymentsParams:s,paymentPagination:d,setIsFetchAggregate:c,setIsFetchPaymentList:h}=(0,G.A)();return(0,r.useEffect)((()=>{c(!0),h(!0)}),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(We,{dateLimit:365,startDate:t,endDate:n,setStartDate:i,setEndDate:a,setPaymentsParams:s}),(0,x.jsx)(ke.A,{paymentAggregateData:e}),(0,x.jsx)(Se,{paymentListData:o,setPaymentsParams:s,paymentPagination:d,paymentsParams:l})]})};var Pe=n(58528),Re=n(39263),Ne=n(92633),Ee=n(1262);const Le=e=>{const{selectedDate:t,paymentsDayDetailData:{salesChangePercentage:n,totalSales:r=0,customerCount:a,procedureCount:o,procedureSales:s,cashCouponSales:d,passCouponSales:p,unRegisteredSales:j}}=e;return(0,x.jsxs)(i.pT,{width:"100%",direction:"column",justify:"flex-start",align:"flex-start",padding:"16px 20px",gap:"12px",radius:c.A.corner16,$boxShadow:"var(--shadow-3)",children:[(0,x.jsx)(l.ld,{color:"var(--color-gray-600)",fontWeight:h.sO.semiBold,children:(0,v._V)(t)}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"16px",padding:"12px 16px",radius:c.A.corner16,border:"1px solid var(--color-gray-200)",children:[(0,x.jsx)(N,{salesChangePercentage:n,totalSales:r}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"12px",children:[(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-300)",children:"\ubbf8\ub4f1\ub85d \ub9e4\ucd9c"}),(0,x.jsx)(m,{color:"var(--color-gray-400)",amount:j})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsxs)(i.pT,{gap:"3px",children:[(0,x.jsx)("img",{src:"data:image/png;
1base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAdCAYAAAC5UQwxAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAP0SURBVHgB3ZZNTBtHFMf/u15/gHEIBUUkhhI7bVUpPSD50ANBHKtUaqqoUtqiKsWVqioHkJIQhfbQFocI1f2QotADam7JqaUoaitLlUrTXqoeqjSKSJQ4cWwM2AFBAGP87Z28mcUL5stgcsp//Vbzdt/Ob9/smxkDz7skvdX/Yg2k9CnJgI+gYD9kaq0J2b4YkKdTDkGWxxBm932Fb24vrfTWX38QZjYi1yhOl/01HK59FRWGCpQvhqVcAnef+PH/5B3k57MhJA1H8VnknoT+6hpUmv+zHrA6Pzx8Ages9cuvUU5mxVD+iyw9xrW7w4hNxghqbVZgMbpRJzlbna8DJoZILopnKjPQ4nDh9/TfB9Vo/BMCso69tXtgNMsIZyawOzFIrNAik/g4STCYJdheqMRCbP4DBSa8LFFm4ew4diMDk/F1xZc4VOUQ/mQ2irPxL5BUk4LOocQ6pEBRpRQSiGYeYzd6x/IW2l5qhUHRivtTfx8epYL6/SQdxFIUXr8pNYVMLoNytYdZcc7ZpcP+mP8LP85cL4phKh9klWYcnRhNlryaR3li6NrbBUddk/BUpuLjB6eov+zasGUgwYiIcqeBQ2rEOccZ3e8NeRBKb1B8nEFGQFVz1DKAVJKf7+uB1WoV7nh6HN9FBqiv/FbAvFa/ZahVaUF703u6fzpwFvF8bONgpp1E0UD7nkJHjEfQmG0sJIAR9iem5Kl1z8t0fNvghclsEv51KpKfp3/Cpp+GaaZo329F43IYv7b8gmqlWvhX/VfhjrhpxNWiuHcrT8Bld4l2juVw/uH5VT1jU6hcIIsMycaSY+gJ9ECSJGHtznYcsxzT73OrUqvgdXohy7Lo52LwIvwJf1HMOmNrgas0ODmIkScjoq0YFQy8MkD71X79fnddNxrqGkR7LDUGb9iLkmKbZFh4m47RDkxnpkWsvdaOPnufuN5ExxnnyjTo9ncjQVvRltmVypBrghZyT8Cj+yedJ3HcfBwX7Bdgq7KJa74ZH4amhrAtLTMkDCKFetpELOtj+Ep/w3UDbbVtwl9cXITJaILZYqbyj6P5n2YEkgFsS2myKDJyYTroma4yRhXsHnVjLjsnQmw2m4BxXQ5eRiAR2PC5rUwuFRBMBtH7oLfoZSPpCDyPPDuGaUCUDroUugTftE8Hdt7pRCqfKhOo0lKjlgjkkNFOLOQW4JvyYTg6vHOYVq2qAUfxNiphhxFbai43h9n0LK6Er2AmO4MdiQP5dhvHLQPeoPo04U0BLLGG34zd3DmMi2dHUxVL8PA1+Aci3xZlW2poyzHeZ0pkdx8TuKbl9D3NRBN+gxUu/rduuZR2Lw5Li8z+JeD7OI3QU+kj/apurODhAAAAAElFTkSuQmCC",width:"14px",alt:"\uace0\uac1d\uc218"}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:"\ubc29\ubb38\uc218"})]}),(0,x.jsx)(m,{amount:a,unit:"\ud68c"})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsxs)(i.pT,{gap:"3px",children:[(0,x.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAdCAYAAAC5UQwxAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAWaSURBVHgB3ZVbbBRVGMf/Z2bO7M7udrew5bJLKQUqUMItJBKKYFB4QcVgQiKhPAgGTVAjGjFoICkPBo0mxsRANBEDMVFjIpqSeGkU1AdAhQSlhkspLULbbbdddnd2d3Z25hy/ma0xEm9Ey4NfcjKXM+f8vsv/OwP8303Fv7T9+/c3RiKRezs7O3/ELTBl69atx0OhkKT7dho1GEvbtWvX7ubmZg8mFca6GmIYh7Gytra2eWvWrMl7MMaYDAa1VRhDUzdv3twVDAb96HRNeQljaTt27NibSCR8mKYwTywKxsq2bdu2rKWlRaBaNysMLMJY2PdtydA9y5qntba2dmuaVk2lruzGTZr2V5OZw421umE8wWvqNmmh2lkbIiE8/eJncB0HQa6esGz3BfwXQHm0sbbkxDbxmol7tUgiAtXA6YvAywdPIJ1OIxpgOLA5FFlyO1/d8PDI57gJYze+KHQs3MJjyTYeTk4FIy0IE8N5Ddtfy+HdD45ACIFXNsbwaOsEWi1QKTlf2o79+v59/e1tx+D8Y2Dp+NJGFYH3eXT6EigBApUgrQG4xRG82TERO1/9BqaZx8aWMN7eOwcK55CODccuwSlbcG27y8wUn6rfkjnyt0DZBsVe1XJKr5u/CNIFKiNwCgPIp/rwxZka7H5P4Pz5nzC7PoCON5aivmEi4JYAx4IgoEujYpn0WEK5VGnP5dmepq39p/4I6NfwWrKuabKuL4SwgPIQrJErSPf2o/OsgkPnpuNy19e4a24Q+55fgPpp9bSC00qD2t+GohXANBOKqkJRNKpCYS3X7bWZDxPHSkX3LSuNjhnbB1O/A9bEjRhTdAZZhEMpzPan8Gm7g2/FPBSuncHBZxvxwP1zoEcJxkZ7XFK5GP1smAfhUAnmzXnTlbIK4TgrQxF1ZTjC3OzHDSnGeca1rFYfKLVgLeOGdyrShxb6rthIqQ1Yv9zC6j13UknraDM+6qOswrzUQ1SfvTk9DEU4UFwbGgnLpWpJKckBip0HkpoeSCI6/kEf6EiWYErQ36BsFpDqZ9iwPoCZCxbSoaXfAKp4K6r3v5qUvhyYQmlVOYTmgLku+VT9hqkKiSwAIXmTD9SYnAdG+hE23IqNO+6biZqGxfDfyfJvIK/GFEE1Kulf/Bx6gyKWolIF+M+SnoX/DaWXRgWOU0r4QFXXGiHKcMwUog3zoRjJ6qauScFkyY8CpKdGagMphS8OleujsFGx03sp3OqgyLzTyHOeUkpZotqS847jKj5Q0bWwqOSp/kYVRiBJILc4jEohC7tgomSWYZm0iS1hxFTU1EWhGyE/jfDrJXyodzA4ZWoPWiMorQrBpJB+slyHDVaPNuHqxeE0NI3qoPZQi2VQKeZQGLmOvu4yui4JXB0AcqVq4FPiLlYsTyNeHwY3gv6m1W1c2JaFcr5EV5fg0gsORlT4dWSMX/GBxaHMJ4e+m7o6anVj3coUitkyrl6u4PRZSelUkbcZ4iHme097YDDDcOwrYPE8E+MTJgJh1Y/ALgmUci4yQwzZ6wo5wBCLSdRNKSNiO3AYP+NXYMWKFesGB4cOX7xwHgsnc3vdrGCZU9a8yURMwaTxAtkCw5QJEhUi/jygIFcgAGUxFJAYVyNBfY8Saao/Q+cx6SrMGcJ0yBvUMfEYMK3RkVpEu82PsK+v7/He3l5fdBdGxHO1BktMqWXPpE1cVZjUwyE50YusZ4BlJ41DbHJceBu7BlfUIkFGTBKEqHYHSecaXU5et9wLQwVmck1G+3Na3WBO63rko+wlL4hQLBYbzuVywQDnByYnk481KT2BtbOje0IaTlYq+ulI2N5J0vrhaLfzTvN4PqfoOjKdF9mYoTSRUGfQT0MWHdmjS/3cWSfY036qr4g/s3g8freqqqmwYTyJW2Gc84eoo+biFtkvCrCUYZvoLj8AAAAASUVORK5CYII=",width:"14px",alt:"\uc2dc\uc220\uac74"}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:"\uc2dc\uc220\uac74"})]}),(0,x.jsx)(m,{amount:o,unit:"\ud68c"})]})]}),(0,x.jsx)(i.WZ,{background:"var(--color-gray-200)"}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"12px",children:[(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.TREATMENT}),(0,x.jsx)(m,{amount:s})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.CASH}),(0,x.jsx)(m,{amount:d})]}),(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsx)(u,{type:g.fm.PASS}),(0,x.jsx)(m,{amount:p})]})]})]})]})};var Ie=n(79753);const ze=e=>{var t,n;const{createdAt:r,paymentId:a,customerName:s,visitStatus:d,staffName:p,staffMainColor:u,paymentItemTypeList:m,shopPaymentServeList:j,saleAmount:y,discountedAmount:f,deposit:w,paymentAmount:S,status:$,onClickCard:A,totalAmount:C,usedCouponList:b,customerGender:W,isCustomerDeleted:k}=e,D=null===(t=o.Xr.filter((e=>e.value===$))[0])||void 0===t?void 0:t.text,P=null===(n=te.Vo.filter((e=>e.value===m[0]))[0])||void 0===n?void 0:n.value;return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"12px",padding:"12px",radius:c.A.corner16,$boxShadow:"var(--shadow-3)",$hasCursor:!0,onClick:()=>A(P,a),children:[(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"4px",children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(ae.A,{type:P}),(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:(0,v._V)(r,{includeTime:!0})})]}),(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsxs)(l.ld,{fontWeight:h.sO.semiBold,children:[(0,v.nm)(C),"\uc6d0"]}),(0,x.jsxs)(i.pT,{gap:"4px",$alignSelf:"flex-start",children:[(0,x.jsx)(Ie.A,{status:$}),(0,x.jsx)(l.x5,{color:$===g.gi.CANCELED?"var(--color-red-500-main)":"var(--color-gray-500)",fontWeight:h.sO.medium,children:D})]})]})]}),(0,x.jsx)(i.WZ,{background:"var(--color-gray-200)"}),(0,x.jsxs)(i.pT,{width:"100%",direction:"column",gap:"12px",opacity:$===g.gi.CANCELED?"0.5":"1",children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\uace0\uac1d\uba85"}),(0,x.jsxs)(i.pT,{gap:"4px",children:[s&&(0,x.jsx)(ae.A,{type:d}),(0,x.jsx)(T.A,{name:s,gender:W,isDeleted:k})]})]}),P===g.gE.TREATMENT?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\uc2dc\uc220\uba85"}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:(0,v.kS)(j)})]}),(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\uc608\uc57d\uae08"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:[(0,v.nm)(w||0),"\uc6d0"]})]}),!(C===w)&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\ubc29\ubb38\uacb0\uc81c"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:[(0,v.nm)(S),"\uc6d0"]})]}),(0,x.jsxs)(i.pT,{direction:"column",width:"100%",gap:"4px",padding:"8px 12px",background:"var(--color-gray-50)",radius:c.A.corner12,children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:"\ucd1d \uc2dc\uc220 \uae08\uc561"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.semiBold,children:[(0,v.nm)(y),"\uc6d0"]})]}),!!f&&(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"\u3134 \ud560\uc778"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:["-",(0,v.nm)(f),"\uc6d0"]})]}),b.length>0&&b.map((e=>(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:["\u3134 ",e.name]}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:["-",(0,v.nm)(e.amount),"\uc6d0"]})]},e.name))),!!w&&(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"\u3134 \uc608\uc57d\uae08"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:["-",(0,v.nm)(w),"\uc6d0"]})]}),!!S&&(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"\u3134 \ubc29\ubb38\uacb0\uc81c"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:["-",(0,v.nm)(S),"\uc6d0"]})]})]})]})]}):(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\ud68c\uc6d0\uad8c\uba85"}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:(0,v.kS)(j)})]}),(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",children:"\ub2f4\ub2f9\uc790"}),(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(i.pT,{width:"16px",height:"16px",radius:c.A.corner16,background:"#".concat(u),children:(0,x.jsx)(l.x5,{color:"var(--color-white)",fontSize:"8px",$lineHeight:h.kj.height16,fontWeight:h.sO.semiBold,children:(0,v.Od)(p)})}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.medium,children:p})]})]})]})]})})};var Me=n(93926);const He=e=>{const{modal:t,setModal:n,paymentsList:r,setShouldResetList:a,handleScroll:o,isLoading:l,setSelectedPaymentsId:d,setVie
1wPaymentModal:h,setCouponViewPaymentModal:p}=e;(0,Ne.A)(t);const{selectedDate:u,resetDayDetailDateOnly:v}=(0,y.A)((0,s.k)((e=>({selectedDate:e.selectedDate,resetDayDetailDateOnly:e.resetDayDetailDateOnly})))),{paymentsDayDetailData:m}=(0,S.A)(),j=()=>{v(),a(!0),n(!1)},f=(e,t)=>{d(t),e===g.gE.COUPON?p(!0):h(!0)};return(0,x.jsx)(x.Fragment,{children:t?(0,x.jsx)(Re.hE,{onClick:e=>{e.stopPropagation(),j()},children:(0,x.jsxs)(Re.lT,{$maxWidth:null!==r&&void 0!==r&&r.length?"1120px":"572px",$minHeight:null!==r&&void 0!==r&&r.length?"656px":"475px",padding:"28px 8px 0 0",$maxWidthWt:"560px",radius:c.A.corner24,onClick:e=>{e.stopPropagation()},overflow:"hidden",children:[(0,x.jsxs)(i.pT,{justify:"space-between",padding:"0 24px",children:[(0,x.jsx)(Re.wt,{children:"\uc77c\ubcc4\ub9e4\ucd9c"}),(0,x.jsx)(F.Oi,{type:"button",onClick:j,children:(0,x.jsx)(Ee.A,{stroke:"var(--color-gray-500)",width:24,height:24})})]}),!m&&!r&&(0,x.jsx)(i.vp,{top:"50%",left:"50%",transform:"translate(-50%)",children:(0,x.jsx)(Me.A,{})}),(0,x.jsxs)(i.Z6,{onScroll:o,padding:"16px 8px 24px 24px",$maxHeight:"600px",children:[(0,x.jsxs)(i.pT,{gap:"16px",$directionWt:"column",align:"flex-start",padding:"0 8px 0 0",children:[m&&(0,x.jsx)(Le,{selectedDate:u,paymentsDayDetailData:m}),r&&!!r.length&&(0,x.jsx)(i.pT,{direction:"column",width:"100%",gap:"16px",children:r.map((e=>(0,x.jsx)(ze,{...e,onClickCard:f},e.paymentId)))})]}),l&&(0,x.jsx)("div",{style:{padding:"10px 0"},children:(0,x.jsx)(Me.A,{})})]})]})}):""})};var Be,Fe,Oe,Ve,Ue,Ye,Ke,qe,Ze=n(2907),Xe=n(91668),Qe=n(58388),Ge=n(79741),Je=n(29044),_e=n(15132),et=n(3845),tt=n(65612),nt=n(49684),it=n(57528),rt=n(5464),at=n(81293);const ot=rt.I4.div(Be||(Be=(0,it.A)(["\n\twidth: 320px;\n\tpadding: 16px;\n\tborder-radius: ",";\n\tbackground-color: var(--color-white);\n\tbox-shadow: var(--shadow-3);\n"])),c.A.corner16),lt=rt.I4.div(Fe||(Fe=(0,it.A)(["\n\tdisplay: grid;\n\tgrid-template-columns: repeat(3, 1fr);\n\tgap: 8px;\n"]))),st=rt.I4.button(Oe||(Oe=(0,it.A)(["\n\tpadding: 12px 0;\n\tmax-height: 46px;\n\tborder-radius: ",";\n\tborder: 1px solid ",";\n\tbackground-color: ",";\n\tcolor: ",";\n\tfont-size: ",";\n\tfont-weight: ",";\n\tline-height: ",";\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: ",";\n\t}\n"])),c.A.corner12,(e=>e.$isSelected?"var(--color-primary-300)":"var(--color-gray-200)"),(e=>e.$isSelected?"var(--color-primary-50)":"var(--color-white)"),(e=>e.$isSelected?"var(--color-primary-500-main)":"var(--color-gray-400)"),h.$N.size14,h.sO.regular,h.kj.height22,(e=>e.$isSelected?"var(--color-primary-50)":"var(--color-gray-50)")),dt=rt.I4.div(Ve||(Ve=(0,it.A)(["\n\t","\n"])),(e=>{if(e.$isSelected)return"\n\t\t\tpadding: 1px 8px;\n\t\t\tbackground: var(--color-primary-400);\n\t\t\tborder-radius: 40px;\n\n\t\t\t@media (max-width: ".concat(at.A.wideTablet,") {\n\t\t\t\tpadding: 1px 6px;\n\t\t\t}\n\t\t\t")})),ct=(0,rt.I4)(i.pT)(Ue||(Ue=(0,it.A)(["\n\tgrid-template-columns: repeat(2, 1fr);\n\talign-items: flex-start;\n\tgap: 16px;\n"]))),ht=(0,rt.I4)(i.pT)(Ye||(Ye=(0,it.A)(["\n\tflex-direction: column;\n\talign-items: flex-start;\n\tjustify-content: flex-start;\n\twidth: 100%;\n\tborder-radius: ",";\n\tborder: 1px solid var(--color-gray-200);\n\tbackground: var(--color-white);\n\tpadding: ",";\n\n\tcanvas {\n\t\twidth: 100% !important;\n\t}\n"])),c.A.corner16,(e=>e.padding||"12px 16px")),pt=(0,rt.I4)(i.pT)(Ke||(Ke=(0,it.A)(["\n\tflex: 0 0 ",";\n\tpadding: ",";\n\tjustify-content: flex-start;\n\tbackground: var(--color-white);\n\tborder-radius: ",";\n\tgap: 12px;\n\n\t@media (max-width: ",") {\n\t\tflex: 0 0 calc(50% - 6px);\n\t\tgap: 10px;\n\t}\n"])),(e=>{let{$layoutType:t}=e;return"half"===t?"calc(50% - 6px)":"100%"}),(e=>e.padding||"12px"),c.A.corner16,at.A.wideTablet),xt=rt.I4.div(qe||(qe=(0,it.A)(["\n\twidth: 100%;\n\theight: 100%;\n\toverflow-x: auto;\n\toverflow-y: hidden;\n\tscroll-behavior: smooth;\n\tscrollbar-width: none;\n\tz-index: 0;\n"]))),ut=e=>{const{onSelect:t,defaultYear:n,selectedMonth:a}=e,[o,s]=(0,r.useState)(n||(new Date).getFullYear()),d=Array.from({length:12},((e,t)=>t+1));return(0,x.jsxs)(ot,{onClick:e=>e.stopPropagation(),children:[(0,x.jsxs)(i.pT,{justify:"space-between",margin:"0 0 14px",children:[(0,x.jsxs)(l.ld,{color:"var(--color-gray-600)",fontSize:h.$N.size18,$lineHeight:h.kj.height26,fontWeight:h.sO.semiBold,children:[o,"\ub144"]}),(0,x.jsxs)(i.pT,{gap:"5px",children:[(0,x.jsx)(F.Oi,{width:"24px",height:"24px",$hoverImage:Je.A,$activeImage:_e.A,onClick:()=>s((e=>e-1)),children:(0,x.jsx)("img",{src:Ge.A,alt:"\uc6d4 \uc774\ub3d9"})}),(0,x.jsx)(F.Oi,{width:"24px",height:"24px",$hoverImage:tt.A,$activeImage:nt.A,onClick:()=>s((e=>e+1)),children:(0,x.jsx)("img",{src:et.A,alt:"\uc6d4 \uc774\ub3d9"})})]})]}),(0,x.jsx)(lt,{children:d.map((e=>(0,x.jsxs)(st,{onClick:()=>(e=>{t(o,e)})(e),$isSelected:e===a&&o===n,children:[e,"\uc6d4"]},e)))})]})},gt=()=>{const e=(0,r.useRef)(null),{selectedMonth:t,setSelectedMonth:n,selectedStaff:a,setSelectedStaff:o}=(0,y.A)((0,s.k)((e=>({selectedMonth:e.selectedMonth,setSelectedMonth:e.setSelectedMonth,selectedStaff:e.selectedStaff,setSelectedStaff:e.setSelectedStaff})))),[d,c]=(0,r.useState)(!1),p=(0,r.useCallback)(((e,t)=>{n(new Date(e,t-1)),c(!1)}),[n,c]);return(0,r.useEffect)((()=>{const t=t=>{e.current&&!e.current.contains(t.target)&&c(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)}),[]),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",$maxHeight:"40px",children:[(0,x.jsxs)(i.pT,{gap:"12px",$gapWt:"8px",children:[(0,x.jsxs)(i.pT,{ref:e,position:"relative",gap:"8px",$hasCursor:!0,onClick:()=>c((e=>!e)),children:[(0,x.jsx)(Qe.A,{width:32,height:32}),(0,x.jsx)(l.V9,{color:"var(--color-gray-600)",fontSize:h.$N.size24,$lineHeight:h.kj.height32,fontWeight:h.sO.bold,$fontSizeWt:h.$N.size20,$lineHeightWt:h.kj.height28,$fontWeightWt:h.sO.semiBold,$colorWt:"var(--color-gray-700-main)",children:(0,$.FS)(t)}),d&&(0,x.jsx)(i.vp,{top:"40px",left:"0",$zIndex:Q.A.zIndexDialog,children:(0,x.jsx)(ut,{onSelect:p,defaultYear:t.getFullYear(),selectedMonth:t.getMonth()+1})})]}),(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(F.Oi,{width:"40px",height:"40px",$widthWt:"32px",$heightWt:"32px",$hoverImage:Je.A,$activeImage:_e.A,onClick:()=>{n((0,Ze.a)(t,1))},children:(0,x.jsx)("img",{src:Ge.A,alt:"\uc6d4 \uc774\ub3d9"})}),(0,x.jsx)(F.Oi,{width:"40px",height:"40px",$widthWt:"32px",$heightWt:"32px",$hoverImage:tt.A,$activeImage:nt.A,onClick:()=>{n((0,Xe.P)(t,1))},children:(0,x.jsx)("img",{src:et.A,alt:"\uc6d4 \uc774\ub3d9"})})]})]}),(0,x.jsx)(Ce.A,{selectedStaff:a,setSelectedStaff:o})]})})};var vt=n(15122),mt=n(21099),jt=n(63137);const yt=e=>{const{event:t}=e;(0,q.e)();const n=(0,q.E)((e=>
1e.isUnderWideTabletScreen)),r=new Date(t.start),a=new Date,o=t.isSelectedDay,s=r.setHours(0,0,0,0)===a.setHours(0,0,0,0),d=r>a;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{justify:"space-between",margin:"8px 0 6.5px",padding:s?"0px 12px":"1px 12px",$marginWt:"4px 0 8px",$paddingWt:s?"0 6px 0 4px":"1px 6px 1px 8px",children:[(0,x.jsx)(dt,{$isSelected:s,children:(0,x.jsx)(l.ld,{color:s?"var(--color-white)":"var(--color-gray-600)",fontWeight:h.sO.regular,$fontSizeWt:h.$N.size14,$lineHeightWt:h.kj.height22,children:new Date(t.start).getDate()})}),(0,x.jsxs)(i.pT,{background:o?"var(--color-white)":"var(--color-gray-50)",radius:c.A.corner24,padding:"2px 10px 2px 8px",gap:"2px",$paddingWt:"2px 8px 1px 6px",children:[(0,x.jsx)(jt.A,{width:16,height:16,stroke:"var(--color-gray-500)"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-500)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:[t.customerCount,!n&&"\ud68c"]})]})]}),(0,x.jsxs)(i.pT,{direction:"column",gap:"2px",$gapWt:"0",children:[(0,x.jsxs)(i.pT,{padding:"2px 12px",justify:"space-between",width:"100%",$paddingWt:"2px 6px",children:[(0,x.jsx)(u,{type:g.fm.TREATMENT,hasNoBackground:!0,$gapWt:"4px"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:[(0,v.nm)(t.procedureSales),!n&&"\uc6d0"]})]}),(0,x.jsxs)(i.pT,{padding:"2px 12px",justify:"space-between",width:"100%",$paddingWt:"2px 6px",children:[(0,x.jsx)(u,{type:g.fm.CASH,hasNoBackground:!0,$gapWt:"4px"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:[(0,v.nm)(t.cashCouponSales),!n&&"\uc6d0"]})]}),(0,x.jsxs)(i.pT,{padding:"2px 12px",justify:"space-between",width:"100%",$paddingWt:"2px 6px",children:[(0,x.jsx)(u,{type:g.fm.PASS,hasNoBackground:!0,$gapWt:"4px"}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:[(0,v.nm)(t.passCouponSales),!n&&"\uc6d0"]})]})]}),(0,x.jsx)(i.bQ,{padding:"0 8px",margin:"6.5px 0 8px",$marginWt:"8px 0",$paddingWt:"0 4px",children:(0,x.jsxs)(i.pT,{padding:"4px 8px",background:d?"var(--color-gray-50)":o?"var(--color-white)":"var(--color-yellow-50)",radius:c.A.corner40,justify:d?"space-between":"flex-end",$paddingWt:"2px 8px 2px 6px",children:[d&&(0,x.jsx)(mt.A,{width:24,height:24,$widthWt:16,$heightWt:16}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-600)",fontWeight:h.sO.semiBold,$fontSizeWt:h.$N.size12,$fontWeightWt:h.sO.medium,$lineHeightWt:h.kj.height20,children:[(0,v.nm)(t.totalSales)||0,!n&&"\uc6d0"]})]})})]})};var ft=n(78639),wt=n(71262),St=n(33072);const $t=(0,Pe.ye)(k()),At=()=>{k().updateLocale("ko",{week:{dow:1}});const{paymentsCalendarData:e,setIsFetchCalendar:t}=(0,S.A)(),{setStartDate:n,setEndDate:i,paymentsParams:a,setPaymentsParams:o,paymentsList:l,setShouldResetList:d,paymentPagination:c,setIsFetchPaymentList:h}=(0,G.A)(),{selectedWeek:p,setSelectedWeek:u,selectedMonth:g,setSelectedDate:v,setShopId:m}=(0,y.A)((0,s.k)((e=>({selectedWeek:e.selectedWeek,setSelectedWeek:e.setSelectedWeek,selectedMonth:e.selectedMonth,setSelectedDate:e.setSelectedDate,setShopId:e.setShopId})))),[j,f]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1),[b,T]=(0,r.useState)(!1),[W,D]=(0,r.useState)(!1),[P,R]=(0,r.useState)(null),N=(0,r.useMemo)((()=>{var t;return null!==(t=null===e||void 0===e?void 0:e.map((e=>{const t=new Date(e.date);return{...e,start:t,end:t,title:"\ucd1d \ub9e4\ucd9c: ".concat(e.totalSales.toLocaleString(),"\uc6d0"),isSelectedDay:p===(0,$.QW)(new Date(t))}})))&&void 0!==t?t:[]}),[e,p]),E=(0,r.useCallback)((0,ft.U)(c,a,o,d,C),[c]);return(0,r.useEffect)((()=>{var e;t(!0),h(!0);const n=null!==(e=sessionStorage.getItem("shopId"))&&void 0!==e?e:"";return m(n),()=>u(0)}),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(gt,{}),(0,x.jsx)(Pe.Vv,{className:"calendar-payments",localizer:$t,events:N,date:g,selectable:!0,defaultView:Pe.Pp.MONTH,view:"month",onSelectSlot:e=>{const t=new Date(e.start);(0,A.J)(t,g)&&(v(e.start),n(t),i(t),f(!0))},onSelectEvent:e=>{const t=new Date(e.start);(0,A.J)(t,g)&&(v(t),n(t),i(t),f(!0))},dayPropGetter:e=>{const t=(0,$.QW)(e);return 0!==p&&(0,A.J)(e,g)&&t===p?{style:{backgroundColor:"#FFF8E0"}}:{}},eventPropGetter:e=>{let{start:t}=e;const n=(0,$.QW)(t);return 0===p?{}:n!==p?{style:{opacity:.7},className:"unSelectedWeek"}:{}},components:{month:{header:vt.A},event:e=>(0,x.jsx)(yt,{...e})}}),(0,x.jsx)(He,{modal:j,setModal:f,paymentsList:l,handleScroll:E,isLoading:w,setShouldResetList:d,setVie
1wPaymentModal:T,setCouponViewPaymentModal:D,setSelectedPaymentsId:R}),(0,x.jsx)(wt.A,{modal:b,setModal:T,paymentsParams:a,paymentId:P}),(0,x.jsx)(St.A,{modal:W,setModal:D,paymentsParams:a,paymentId:P})]})},Ct=e=>{const{scrollBoxRef:t,isHorizontalScrollable:n}=(0,je.A)();(0,me.v)(t),(0,q.e)();return{onMovePage:t=>{(0,xe.CV)([{valueName:"pn",newValue:t-1}],e)},scrollBoxRef:t,isHorizontalScrollable:n,isAtEnd:(0,ve._)((e=>e.isAtEnd))}};var bt=n(45555);const Tt=e=>{const[t,n]=(0,r.useState)(null),[i,a]=(0,r.useState)(null),[o,l]=(0,r.useState)(null),[s,d]=(0,r.useState)("startTime"),[c,h]=(0,r.useState)("desc"),p=(t,n)=>{(0,xe.CV)([{valueName:"pn",newValue:0},{valueName:t,newValue:n}],e)};(0,r.useEffect)((()=>{var e;p("vs","all"===(null===t||void 0===t?void 0:t.value)?null:null!==(e=null===t||void 0===t?void 0:t.value)&&void 0!==e?e:null)}),[t]),(0,r.useEffect)((()=>{var e;p("ssi","all"===(null===i||void 0===i?void 0:i.value)?null:null!==(e=null===i||void 0===i?void 0:i.value)&&void 0!==e?e:null)}),[i]),(0,r.useEffect)((()=>{(0,xe.CV)([{valueName:"sb",newValue:s},{valueName:"d",newValue:c}],e)}),[c,s]),(0,r.useEffect)((()=>{const t=setTimeout((()=>{(0,xe.CV)([{valueName:"st",newValue:o}],e)}),500);return()=>clearTimeout(t)}),[o]);return{getSelectedValue:e=>{var n,r;switch(e){case"\ubc29\ubb38":return String(null!==(n=null===t||void 0===t?void 0:t.value)&&void 0!==n?n:"");case"\ub2f4\ub2f9\uc790":return String(null!==(r=null===i||void 0===i?void 0:i.value)&&void 0!==r?r:"");default:return""}},getSelectedText:e=>{switch(e){case"\ubc29\ubb38":return(null===t||void 0===t?void 0:t.text)||"";case"\ub2f4\ub2f9\uc790":return(null===i||void 0===i?void 0:i.text)||"";default:return""}},setSelectedData:(e,t)=>{switch(t){case"\ubc29\ubb38":n(e);break;case"\ub2f4\ub2f9\uc790":a(e)}},sortBy:s,setSortBy:d,direction:c,setDirection:h,searchInput:o,setSearchInput:l,onSearch:()=>{(0,xe.CV)([{valueName:"st",newValue:o},{valueName:"pn",newValue:0}],e)},onClear:()=>{(0,xe.CV)([{valueName:"st",newValue:null},{valueName:"pn",newValue:0}],e)}}};var Wt=n(60441),kt=n(12213);const Dt=e=>{var t;const{unRegisteredListData:n,unRegisteredPaymentParams:a,setUnRegisteredPaymentParams:o,unRegisteredPaymentPagination:d,setCreatePaymentModal:p,selectedViewType:u}=e,m=(0,O.Zp)(),{selectedUnRegisteredInfo:j,setSelectedUnRegisteredInfo:y}=b((0,s.k)((e=>({selectedUnRegisteredInfo:e.selectedUnRegisteredInfo,setSelectedUnRegisteredInfo:e.setSelectedUnRegisteredInfo})))),{THEAD_UNREGISTERED_PAYMENTS:f}=re(),{onMovePage:w,scrollBoxRef:S,isHorizontalScrollable:$,isAtEnd:A}=Ct(o),{getSelectedValue:C,getSelectedText:W,setSelectedData:D,sortBy:P,setSortBy:R,setDirection:N}=Tt(o),E=(0,kt.f)(u),{tooltipRef:L,visibleId:I,setVisibleId:z,position:M,handleMouseEnter:H,paymentTooltipListData:B}=pe({scrollRef:S,safeMargin:22}),{tooltipRef:F,visibleId:V,setVisibleId:U,position:Y,handleMouseEnter:K,paymentTooltipListData:q}=pe({scrollRef:S,safeMargin:22}),{putPaymentStatus:Z,paymentsParams:X}=(0,G.A)(),[Q,te]=(0,r.useState)(!1),[ne,ae]=(0,r.useState)(46),oe=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const e=()=>{if(oe.current){const e=(oe.current.getBoundingClientRect().height-48)/8,t=22;ae(Math.max(t,e))}},t=new ResizeObserver(e);return oe.current&&t.observe(oe.current),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),oe.current&&t.unobserve(oe.current)}}),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.oO,{width:"100%",radius:c.A.corner16,overflow:"hidden",children:[!A&&$&&(0,x.jsx)(i.gb,{$zIndex:"99"}),(0,x.jsxs)(i.He,{ref:S,display:"flex",direction:"column",height:"calc(100dvh - 180px)",padding:n&&n.content.length>0?"0 0 48px":"0",$overflowX:"scroll",$boxShadow:"unset",border:"1px solid var(--color-gray-200)",$minHeight:"400px",$maxHeight:"564px",children:[(0,x.jsx)(ee.Du,{ref:e=>{oe.current=e},display:"flex",direction:"column",padding:"0",width:"100%",$minWidth:"1000px",$minHeight:"300px",overflow:"unset",$overflowY:"unset",flex:"1",children:(0,x.jsxs)(ee.Ic,{flex:"unset",children:[(0,x.jsx)(_.A,{sortBy:P,setSortBy:R,setDirection:N,getSelectedValue:C,getSelectedText:W,setSelectedData:D,tHeadList:f}),(0,x.jsx)(ee.NN,{$maxHeight:"460px",children:n&&n.content.map((e=>{const{id:t,startTime:n,customerName:r,customerId:a,staffNickName:o,shopPaymentServeList:s,allAmount:d,customerGender:c,isCustomerDeleted:u}=e,g="".concat(ne,"px");return(0,x.jsxs)(ee.Tr,{onClick:()=>{y(e),p(!0)},children:[(0,x.jsx)(ee.Td,{height:g,align:"center",$hasCursor:!0,children:(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",margin:"0 32px",$marginWt:"0 24px",align:"center",children:k()(n).format("YY.MM.DD HH:mm")}
1)}),(0,x.jsx)(ee.Td,{position:"relative",height:g,children:(0,x.jsx)(i.pT,{$maxWidth:"90px",margin:"0 auto",onMouseEnter:n=>{a&&H(n,t,e)},onMouseLeave:()=>z(null),onClick:e=>{a&&E&&(e.stopPropagation(),m("/customer/detail/".concat(a)))},children:(0,x.jsx)(T.A,{name:r,gender:c,isDeleted:u,$fontSize:h.$N.size14,$lineHeight:h.kj.height22,$fontWeight:h.sO.regular,showClickableStyle:E,isShortUnassigned:!0})})}),(0,x.jsx)(ee.Td,{height:g,children:(0,x.jsx)(l.x5,{className:"ellipsis",color:"var(--color-gray-600)",align:"center",children:o})}),(0,x.jsx)(ee.Td,{height:g,children:(0,x.jsx)(l.x5,{className:"ellipsis",align:"center",$maxWidth:"200px",color:"var(--color-gray-600)",onMouseEnter:n=>K(n,t,e),onMouseLeave:()=>U(null),children:(0,v.kS)(s)})}),(0,x.jsx)(ee.Td,{position:"relative",height:g,children:(0,x.jsxs)(l.x5,{className:"ellipsis",color:"var(--color-gray-600)",align:"center",children:[(0,v.nm)(d),"\uc6d0"]})}),(0,x.jsx)(ee.Td,{height:g,children:(0,x.jsx)(i.pT,{onClick:t=>{t.stopPropagation(),(e=>{y(e),te(!0)})(e)},children:(0,x.jsx)(bt.A,{width:24,height:24,stroke:"var(--color-red-500-main)"})})})]},t)}))})]})}),d&&(null===d||void 0===d?void 0:d.totalPages)>0?(0,x.jsx)(i.vp,{justify:"end",bottom:"20px",right:"16px",children:(0,x.jsx)(J.A,{onMovePage:w,pagination:d})}):""]}),I&&(0,x.jsx)(le,{ref:L,top:"".concat(M.top,"px"),left:"".concat(M.left,"px"),paymentTooltipListData:B}),V&&q&&(null===q||void 0===q||null===(t=q.shopPaymentServeList)||void 0===t?void 0:t.length)>0&&(0,x.jsx)(he,{ref:F,top:"".concat(Y.top,"px"),left:"".concat(Y.left,"px"),paymentTooltipListData:q})]}),(0,x.jsx)(we.A,{modal:Q,setModal:te,description:"\ubbf8\ub4f1\ub85d\ub41c \ub9e4\ucd9c\uc744 \uc0ad\uc81c\ud560\uae4c\uc694?",caption:"\uc774\ud6c4 \ub9e4\ucd9c \ub4f1\ub85d\uc740 \uc608\uc57d \uce98\ub9b0\ub354\uc5d0\uc11c \uc9c4\ud589 \uac00\ub2a5\ud574\uc694",onSubmit:()=>{Z(null===j||void 0===j?void 0:j.id,{status:g.gi.DELETED,comeFrom:"UNREGISTERED"},X,(()=>{Wt.A.invalidateQueries(ie.q9.fetchUnregisteredPaymentList(a)),te(!1)}))}})]})};var Pt=n(38554);const Rt=e=>{const{modal:t,setModal:n,setCreatePaymentModal:r,unRegisteredPaymentParams:a,setUnRegisteredPaymentParams:o,unRegisteredPaymentPagination:s,unRegisteredListData:d,selectedViewType:p}=e;(0,Ne.A)(t);const{searchInput:u,setSearchInput:g,onSearch:m,onClear:j}=Tt(o);return(0,x.jsx)(x.Fragment,{children:t&&(0,x.jsx)(Re.hE,{children:(0,x.jsxs)(Re.lT,{padding:"28px 24px 24px",$maxWidth:"1120px",children:[(0,x.jsxs)(i.pT,{width:"100%",justify:"space-between",margin:"0 0 16px 0",children:[(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(Re.zC,{fontWeight:h.sO.regular,$lineHeight:h.kj.height28,children:"\ubbf8\ub4f1\ub85d \ub9e4\ucd9c"}),(0,x.jsx)(i.pT,{padding:"2px 8px",background:"var(--color-gray)",radius:c.A.corner16,children:(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontWeight:h.sO.medium,children:[(0,v.nm)(null===d||void 0===d?void 0:d.pagination.totalElements),"\uac74"]})})]}),(0,x.jsxs)(i.pT,{gap:"16px",children:[(0,x.jsx)(Ae.A,{searchBarInput:u,setSearchBarInput:g,onSearch:m,onClear:j,placeholder:"\uace0\uac1d\uba85, \uc2dc\uc220\uba85, \ud734\ub300\ud3f0 \ubc88\ud638 \uac80\uc0c9"}),(0,x.jsx)(F.Oi,{onClick:()=>n(!1),children:(0,x.jsx)(Pt.A,{stroke:"var(--color-gray-700-main)"})})]})]}),(0,x.jsx)(i.Z6,{$maxHeight:"calc(100dvh - 96px - 28px - 48px)",children:(0,x.jsx)(Dt,{unRegisteredListData:d,setUnRegisteredPaymentParams:o,unRegisteredPaymentPagination:s,unRegisteredPaymentParams:a,setCreatePaymentModal:r,selectedViewType:p})})]})})})};var Nt=n(81072),Et=n(6058),Lt=n(76361),It=n(59042);const zt=e=>{let{x:t,y:n,right:r,type:a="TOTAL",date:o,amount:s}=e;return(0,x.jsxs)(i.G2,{width:"max-content",direction:"column",align:"flex-start",padding:"12px",radius:c.A.corner12,background:"var(--color-gray-600)",opacity:"0.8",top:"".concat(n,"px"),left:r?"unset":"".concat(t,"px"),$leftWt:r?"100%":"",right:r,$rightWt:r?"unset":"",$transformWt:r?"translateX(-50%)":"",$zIndex:Q.A.zIndexInlineTooltip,$pointerEvents:"none",children:[(0,x.jsx)(l.x5,{color:"var(--color-white)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"DATE"===a?(0,v._V)(o||""):"\ub9e4\ucd9c \ud569\uacc4"}),(0,x.jsxs)(l.ld,{color:"var(--color-white)",fontWeight:h.sO.semiBold,children:[(0,v.nm)(s),"\uc6d0"]})]})},Mt=e=>{let{x:t,y:n,top:r,right:a,outerBgColor:o="var(--color-green-100)",innerBgColor:l="var(--color-green-500-main)"}=e;return(0,x.jsx)(i.G2,{direction:"column",align:"flex-start",width:"12px",height:"12px",padding:"3px",radius:c.A.corner6,background:o,opacity:"0.8",top:r||"".concat(n-12,"px"),left:a?"unset":"".concat(t-10,"px"),right:a,$pointerEvents:"none",children:(0,x.jsx)(i.pT,{width:"6px",height:"6px",radius:c.A.corner6,background:l})})},Ht=e=>{let{paymentsCalendarData:t}=e;Lt.t1.register(Lt.PP,Lt.kc,Lt.E8,It.A,Lt.m_);const{scrollBoxRef:n,isHorizontalScrollable:a}=(0,je.A)(),[o,l]=(0,r.useState)(null),s=(0,r.useMemo)((()=>{var e;return null!==(e=null===t||void 0===t?void 0:t.map((e=>({label:new Date(e.date).getDate()+"\uc77c",date:e.date,totalSales:e.totalSales}))))&&void 0!==e?e:[]}),[t]),d=(0,r.useMemo)((()=>{const e=Math.max(...s.map((e=>{var t;return null!==(t=e.totalSales)&&void 0!==t?t:0})),0);return Math.round(e)}),[s]),c=Math.round(d/14),h={labels:null===s||void 0===s?void 0:s.map((e=>({text:e.label,date:e.date}))),datasets:[{data:null===s||void 0===s?void 0:s.map((e=>0===e.totalSales?null:Math.min(e.totalSales,d))),backgroundColor:e=>{const t=e.chart.ctx.createLinearGradient(0,0,0,e.chart.height);return t.addColorStop(0,"#67DBA2"),t.addColorStop(1,"#00BB5E"),t},borderRadius:6,borderSkipped:!1,barThickness:12}]},p={id:"monthLabel",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n},scales:{x:i},data:r}=e,a=r.labels;if(null===a||void 0===a||!a.length)return;let o=null;a.forEach(((e,r)=>{const a=Number(e.text.replace("\uc77c",""));if(!isNaN(a)){if(null===o||a<o){const a=i.getPixelForValue(r),o=new Date(e.date).getMonth()+1;t.save(),t.font="600 16px Pretendard",t.fillStyle="#161616",t.textAlign="center",t.textBaseline="middle",t.fillText("".concat(o,"\uc6d4"),a,n-28),t.restore(
1)}o=a}}))}},u={animation:!1,maintainAspectRatio:!1,responsive:!0,clip:!1,indexAxis:"x",layout:{padding:{top:40}},scales:{x:{offset:!1,grid:{display:!1},ticks:{color:"#3D3D3D",font:{family:"Pretendard",size:14,weight:400},align:"center",callback:(e,t)=>{var n,i,r;return null!==(n=null===(i=h.labels)||void 0===i||null===(r=i[t])||void 0===r?void 0:r.text)&&void 0!==n?n:""}},border:{display:!1}},y:{min:0,max:d,ticks:{stepSize:c,display:!1},grid:{display:!1},border:{display:!1}}},plugins:{legend:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:e=>{var t,i,r;const a=e.tooltip;if(!a||0===a.opacity)return void l((e=>null!==e?null:e));const o=null===(t=a.dataPoints)||void 0===t||null===(i=t[0])||void 0===i?void 0:i.dataIndex,s=e.chart.canvas.getBoundingClientRect(),d=null===(r=n.current)||void 0===r?void 0:r.getBoundingClientRect();if(!d)return;const c=a.caretX+s.left-(null===d||void 0===d?void 0:d.left)+20,h=a.caretY+24;let p=c;const x=a.caretX+s.left;d.right-x<120&&(p-=120),"number"===typeof o&&l((e=>e&&e.index===o&&e.x===c&&e.adjustedX===p&&e.y===h?e:{index:o,x:c,adjustedX:p,y:h}))}}}},g=42*(null===s||void 0===s?void 0:s.length)-15+32,v=e=>{if(!n.current)return;n.current.scrollBy({left:"next"===e?254:-254,behavior:"smooth"})};return(0,x.jsxs)(ht,{padding:"16px",height:"316px",position:"relative",$minWidth:"0",children:[(0,x.jsxs)(i.G2,{gap:"8px",display:a?"flex":"none",justify:"flex-end",width:"100%",margin:"0 0 8px",top:"16px",right:"16px",$zIndex:Q.A.zIndexDialog,children:[(0,x.jsx)(F.Oi,{type:"button",width:"32px",height:"32px",background:"var(--color-white)",onClick:()=>v("prev"),children:(0,x.jsx)("img",{src:Ge.A,alt:"\uc774\uc804"})}),(0,x.jsx)(F.Oi,{type:"button",width:"32px",height:"32px",background:"var(--color-white)",onClick:()=>v("next"),children:(0,x.jsx)("img",{src:et.A,alt:"\ub2e4\uc74c"})})]}),(0,x.jsx)(i.G2,{width:"calc(100% - 32px)",left:"16px",bottom:"46px",gap:"14px",direction:"column",children:Array.from({length:15}).map(((e,t)=>(0,x.jsx)(i.WZ,{background:"var(--color-gray-50)"},t)))}),(0,x.jsx)(xt,{ref:n,onMouseEnter:()=>{if(a&&n.current){const e=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight="".concat(e,"px")}},onMouseLeave:()=>{a&&n.current&&(document.body.style.overflow="auto",document.body.style.paddingRight="")},onWheel:e=>{a&&n.current&&(e.preventDefault(),n.current.scrollLeft+=e.deltaY)},children:(0,x.jsxs)("div",{style:{width:"".concat(g,"px"),height:"100%"},children:[(0,x.jsx)(Et.yP,{data:h,options:u,plugins:[p]}),o&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(zt,{x:o.adjustedX,y:o.y,type:"DATE",date:s[o.index].date,amount:s[o.index].totalSales}),(0,x.jsx)(Mt,{x:o.x,y:o.y})]})]})})]})},Bt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAZCAYAAAArK+5dAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARESURBVHgBzVVLixxVFP5u1a1H1/Rjeh46iZnpnmScQYLIMEFwIWQTGdyIiAsVwZW4ENyKuIhbwZ2b/AFdBUQ0OhCSaIgaQhCEMZEkTFAzj+7pV3XXu+peT1V3ZjIK6RayyIWib9W93/nO+c6jgcdp+VdWjoUXl0/8H4wy6kVvbelj3Tp0W5uYv+ZfWt7Y+nKmOgpuZII4jp9lvADoUzDKc9XCeOHC+vrr+qMj8IMbUoS0YwAvwihMzJeuXXjxERI4N2XsD95UKJoOVSqnhuFGJsgfLv0iknjwJiCiEHHkucNwIxP4bjSu8IHkJFXQa8Fz1Z+H4UYm0NX8u4pe7L9IAb/rgimdH4fhRiLwvqtWjdKTb0O1kCU5JTSNOJw5LodhhxLcOZObg5Y/pxYq+TS55D6hFJjjZX5Ysz9rnFsoPgzPHnYovymVu5i6mp9dfprpk/e/Ug4CSH8bfvNPJKHvQqrnuWW16NBMRAxVyPO1+ubZylud1h5B7/vF52Qcv8K4ZlNcu6LntXmxdNqcXlrpG2d941JCRh04W79Bz+UouCmw3JEHxKA7YR29zd/XCi/fXuXpp85PL0zkFPYVGK+CkQz0iDEXanGOPhX3gRlBALd+C6aVI5sq0uZjMiGMMjinvYgQB+FLcuOkmREUiwuvUef0jWeeMigZSH1QsD6YvHNqNbgKg1WiZnN70Kg/mKIRWUySubC3d9DZsj8vv3rJzwjAx06loR/Mzr+N049wkHip1BHWr7g4VGUwLBVark0uMUShgOtIhL7amprW1zLTfXwyu5/vgdb/2QuaFz3IOICR07C4YqL81DRUGhl6uUIFRkWGOOsRRN2yfe/mF80zyRwfgI9Asn6imDzoefZDIElzKKHqoT0j7VWN9I9pXJBs3G+Swn4moST9RegjdNyxIIr5IIKgCMn7ski2b3SPhDwTfrZnLDXOUbvbwO49D6rKYBZsaCblg+BJnCCJwrYInU/m33cafYLErZNxIkkjIAKRZPNmT7WMLMmiS+cRN0wUJjVYhTGI1CGNoETMCGvk6I4S+DzWvwWcQQ5i9zIZOAYhKMqYnhCh1wMnY9mAoxJk5B6jDmYUNFM48mUD1riVwc3yFEmU65cqyRR16zPOTnuVjm5lBEnk/IAoeicJPdoHiHwfvm2jXReYOVaCPpankuf06BlRutrbDt2LSRplkBOjLwaNcafZcigH1++XSbbsr6sXPbt7stcK4LQl2g0FzSYLZo8iqDxjFY18LjOkEEH6v7D5Rw3tXcAwZSZrkqoqGKkpNywzfuP4R97V/TKltXOXr9rbwYe1HfWJjicvcxjXJxfH/vLcnnbn196nhQnnveKkCq6TEeoZrgosnSiDZhDM4nTWRmlVdetb842/3Rs0g3EggmHr7JvjFZoOHyg8eV7XZYWKZ2J2iZn5aUuxCiXyXiBwPXS2uxtHG/YCO42sDP8BKCLki1hAOTUAAAAASUVORK5CYII=";var Ft=n(1281);const Ot=e=>{let{title:t,subTitle:n,width:r,$widthLg:a}=e;return(0,x.jsxs)(i.pT,{$isPcException:!0,width:r||"100%",$widthLg:a||"",justify:"flex-start",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontWeight:n?h.sO.medium:h.sO.regular,className:"ellipsis",children:t}),n&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Ft.A,{width:16,height:16,stroke:"var(--color-gray-400)"}),(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",className:"ellipsis",children:n})]})]})},Vt=e=>{const{percent:t,direction:n,$directionLg:a,tone:o,label:s,subLabel:d,totalSalesAmount:h}=e,[p,u]=(0,r.useState)(!1);return(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",$isPcException:!0,direction:n||"",$directionLg:a||"",gap:n?"":"20px",$gapLg:a?"unset":"",children:[(0,x.jsx)(Ot,{width:n?"":"60px",$widthLg:a?"100%":"",title:s,subTitle:d}),(0,x.jsxs)(i.pT,{width:"100%",gap:"6px",children:[(0,x.jsx)(i.pT,{width:"100%",height:"12px",background:"var(--color-gray-200)",justify:"flex-start",radiu
1s:c.A.corner12,children:(0,x.jsx)(i.Pu,{width:"".concat(t,"%"),height:"100%",radius:c.A.corner12,..."blue"===o?{startColor:"#91C6FF",endColor:"#2E90FB"}:{startColor:"#FFA3A3",endColor:"#FF6768"},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:p&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Mt,{x:0,y:0,top:"0",right:"-6px",..."blue"===o?{innerBgColor:"var(--color-blue-500-main)",outerBgColor:"var(--color-blue-100)"}:{innerBgColor:"var(--color-primary-500-main)",outerBgColor:"var(--color-primary-200)"}}),(0,x.jsx)(zt,{x:0,y:16,right:"0",amount:h||0})]})})}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",width:"60px",align:"right",children:[Number(t.toFixed(2)),"%"]})]})]})},Ut=e=>{var t,n;let{statisticsProduct:a}=e;const o=(0,r.useMemo)((()=>[...null!==a&&void 0!==a?a:[]].sort(((e,t)=>t.percentage-e.percentage)).slice(0,20)),[a]),s=o[0]?"".concat(null===(t=o[0])||void 0===t?void 0:t.category," > ").concat(null===(n=o[0])||void 0===n?void 0:n.productName):"-";return(0,x.jsxs)(ht,{$minHeight:"490px",padding:"12px 16px",position:"relative",children:[(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",$directionWt:"column",$alignWt:"flex-start",gap:"8px",wrap:"wrap",children:[(0,x.jsx)(l.ld,{children:"\uc2dc\uc220\ubcc4 \ub9e4\ucd9c"}),o&&o.length>0&&(0,x.jsxs)(i.pT,{padding:"4px 12px",radius:c.A.corner40,background:"var(--color-gray-50)",children:[(0,x.jsx)("img",{src:Bt,alt:"\uc2dc\uc220Top",width:"14px"}),(0,x.jsxs)(l.x5,{fontSize:h.$N.size12,fontWeight:h.sO.medium,$lineHeight:h.kj.height20,children:[" ","\uc81c\uc77c \ub9ce\uc740 \uc2dc\uc220\uc740 ",(0,x.jsx)(l.D7,{color:"var(--color-primary-500-main)",children:s})," \uc785\ub2c8\ub2e4"]})]})]}),o&&o.length>0?(0,x.jsx)(i.pT,{direction:"column",align:"flex-start",gap:"8px",$gapWt:"10px",width:"100%",margin:"12px 0 0",children:o.map((e=>(0,x.jsx)(Vt,{label:e.category,subLabel:e.productName,percent:e.percentage,totalSalesAmount:e.totalSalesAmount,direction:"column"},e.productName)))}):(0,x.jsx)(i.vp,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",children:(0,x.jsx)(fe.A,{description:"\ub9e4\ucd9c \ub0b4\uc5ed\uc774 \uc5c6\uc5b4\uc694",$imageWidth:"120px",$imageWidthWt:"100px",margin:"0",$marginWt:"0",$fontSize:h.$N.size14,$lineHeight:h.kj.height22,gap:"8px",height:"100%"})})]})},Yt=e=>{var t,n;let{statisticsMethod:a}=e;const o=(0,r.useMemo)((()=>[...null!==a&&void 0!==a?a:[]].sort(((e,t)=>t.percentage-e.percentage))),[a]),s=null!==(t=null===(n=o[0])||void 0===n?void 0:n.paymentType)&&void 0!==t?t:"-";return(0,x.jsxs)(ht,{$minHeight:"218px",padding:"12px 16px",$paddingWt:"12px 16px 16px",position:"relative",children:[(0,x.jsxs)(i.pT,{$isPcException:!0,justify:"space-between",width:"100%",margin:"0 0 4px",$directionWt:"column",$alignWt:"flex-start",$gapWt:"8px",children:[(0,x.jsx)(l.ld,{children:"\uacb0\uc81c\uc218\ub2e8\ubcc4 \ub9e4\ucd9c"}),o&&o.length>0&&(0,x.jsxs)(i.pT,{padding:"4px 12px",radius:c.A.corner40,background:"var(--color-gray-50)",children:[(0,x.jsx)("img",{src:Bt,alt:"\uacb0\uc81c\uc218\ub2e8Top",width:"14px"}),(0,x.jsxs)(l.x5,{fontSize:h.$N.size12,fontWeight:h.sO.medium,$lineHeight:h.kj.height20,children:[" ","\uc81c\uc77c \ub9ce\uc774 \uc0ac\uc6a9\ud55c \uacb0\uc81c \uc218\ub2e8\uc740 ",(0,x.jsx)(l.D7,{color:"var(--color-blue-500-main)",children:s}),"\uc785\ub2c8\ub2e4"]})]})]}),o&&o.length>0?(0,x.jsx)(i.pT,{direction:"column",align:"flex-start",gap:"8px",$gapWt:"10px",width:"100%",margin:"12px 0 0",children:o.map((e=>(0,x.jsx)(Vt,{label:e.paymentType,percent:e.percentage,totalSalesAmount:e.totalSalesAmount,tone:"blue",$directionLg:"column"},e.paymentType)))}):(0,x.jsx)(i.vp,{top:"50%",left:"50%",transform:"translate(-50%, -50%)",children:(0,x.jsx)(fe.A,{description:"\ub9e4\ucd9c \ub0b4\uc5ed\uc774 \uc5c6\uc5b4\uc694",$imageWidth:"120px",$imageWidthWt:"100px",margin:"0",$marginWt:"0",$fontSize:h.$N.size14,$lineHeight:h.kj.height22,gap:"8px",height:"100%"})})]})},Kt=e=>{let{title:t,rank:n,percentage:r,amount:a,bulletColor:o}=e;return(0,x.jsxs)(i.pT,{direction:"column",width:"100%",align:"flex-start",children:[(0,x.jsxs)(i.pT,{justify:"space-between",width:"100%",children:[(0,x.jsxs)(i.pT,{gap:"8px",children:[(0,x.jsx)(p.Dv,{background:o,width:"6px",height:"6px"}),(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsxs)(l.x5,{width:"20px",color:"var(--color-gray-600)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,fontWeight:h.sO.medium,children:[n,"\uc704"]}),(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:t})]})]}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:[Number(r.toFixed(2)),"%"]})]}),(0,x.jsxs)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,margin:"0 0 0 14px",children:[(0,v.nm)(a),"\uc6d0"]})]})},qt=e=>{let{x:t,y:n,count:r,color:a,unit:o="\uba85"}=e;return(0,x.jsx)(i.G2,{width:"48px",height:"48px",radius:c.A.corner24,background:"var(--color-white)",$boxShadow:"var(--shadow-1)",top:"".concat(n,"px"),left:"".concat(t,"px"),transform:"translate(-50%)",$pointerEvents:"none",children:(0,x.jsxs)(l.x5,{color:a,fontSize:h.$N.size10,fontWeight:h.sO.medium,$lineHeight:h.kj.height18,children:[(0,v.nm)(r),o]})})},Zt=e=>{let{statisticsReservationChannel:t}=e;Lt.t1.register(Lt.Bs,It.A,Lt.m_);const[n,a]=(0,r.useState)(null),o=(0,r.useMemo)((()=>null===t||void 0===t?void 0:t.map((e=>{const t=(n=e.reservationRoute,te.qj.find((e=>e.value===n)));var n;return{label:(null===t||void 0===t?void 0:t.text)||"",color:(null===t||void 0===t?void 0:t.color)||"",percentage:e.percentage,amount:e.amount,count:e.count}}))),[t]),s=(0,r.useMemo)((()=>null===o||void 0===o?void 0:o.sort(((e,t)=>t.percentage-e.percentage))),[o]),d={labels:null===o||void 0===o?void 0:o.map((e=>e.label)),datasets:[{data:null===o||void 0===o?void 0:o.map((e=>e.percentage)),backgroundColor:null===o||void 0===o?void 0:o.map((e=>e.color)),borderWidth:3,borderRadius:4,hoverOffset:0,hoverBackgroun
1dColor:null===o||void 0===o?void 0:o.map((e=>e.color)),hoverBorderColor:"#fff",hoverBorderWidth:3}]},c={id:"hoverScalePlugin",afterDatasetDraw(e,t){var n,i,r;const{ctx:a,tooltip:o}=e,l=e.getDatasetMeta(t.index);if(null===o||void 0===o||null===(n=o.dataPoints)||void 0===n||!n.length)return;const s=o&&o.opacity>0?null===(i=o.dataPoints)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.dataIndex:-1;l.data.forEach(((e,t)=>{const n=e;a.save(),a.translate(n.x,n.y),t===s&&a.scale(1.13,1.13),a.translate(-n.x,-n.y),n.draw(a),a.restore()}))}},p={responsive:!0,maintainAspectRatio:!1,layout:{padding:5},plugins:{legend:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:e=>{var t,n;const i=e.tooltip;if(!i||0===i.opacity)return void a((e=>null!==e?null:e));const r=null===(t=i.dataPoints)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.dataIndex,o=i.caretX,l=i.caretY-24;"number"===typeof r&&a((e=>e&&e.index===r&&e.x===o&&e.y===l?e:{index:r,x:o,y:l}))}}}};return(0,x.jsxs)(ht,{$isPcException:!0,height:"256px",$heightLg:"384px",$heightWt:"256px",children:[(0,x.jsx)(l.ld,{children:"\uc720\uc785 \ucc44\ub110\ubcc4 \ub9e4\ucd9c"}),o&&o.length>0?(0,x.jsxs)(i.pT,{$isPcException:!0,$directionLg:"column",$directionWt:"row",gap:"24px",width:"100%",$marginLg:"16px 0 0",$gapLg:"16px",$marginWt:"8px 0 0",$gapWt:"24px",$alignSelf:"center",height:"100%",$heightLg:"unset",$heightWt:"100%",$minWidth:"240px",$minWidthLg:"unset",children:[(0,x.jsxs)(i.pT,{width:"120px",height:"120px",$flexShrink:"0",position:"relative",children:[(0,x.jsx)(Et.nu,{data:d,options:p,plugins:[c]}),n&&(0,x.jsx)(qt,{x:n.x,y:n.y,count:o[n.index].count,color:o[n.index].color,unit:"\ud68c"})]}),(0,x.jsx)(i.pT,{$isPcException:!0,direction:"column",align:"flex-start",gap:"8px",width:"100%",$maxWidth:"129px",$maxWidthLg:"unset",children:s&&s.map(((e,t)=>(0,x.jsx)(Kt,{bulletColor:e.color,title:e.label,percentage:e.percentage,amount:e.amount,rank:t+1},e.label)))})]}):(0,x.jsx)(fe.A,{description:"\ub9e4\ucd9c \ub0b4\uc5ed\uc774 \uc5c6\uc5b4\uc694",$imageWidth:"120px",$imageWidthWt:"100px",margin:"0",$marginWt:"0",$fontSize:h.$N.size14,$lineHeight:h.kj.height22,gap:"8px",height:"100%"})]})};var Xt=n(79627);const Qt=e=>{let{statisticsCustomers:t}=e;Lt.t1.register(Lt.Bs,It.A,Lt.m_);const[n,a]=(0,r.useState)(null),o=e=>{var t;const n=te.bB.find((t=>t.value===e));return null!==(t=null===n||void 0===n?void 0:n.text)&&void 0!==t?t:"\uccab\ubc29"},s=(0,r.useMemo)((()=>(null!==t&&void 0!==t?t:[]).filter((e=>te.bB.some((t=>t.value===e.tag)))).map((e=>({...e,label:o(e.tag),percentage:e.percentage,color:Xt.ER[e.tag]}))).sort(((e,t)=>t.percentage-e.percentage))),[t]),d={labels:null===s||void 0===s?void 0:s.map((e=>e.label)),datasets:[{data:null===s||void 0===s?void 0:s.map((e=>e.percentage)),backgroundColor:null===s||void 0===s?void 0:s.map((e=>e.color)),borderWidth:3,borderRadius:4,hoverBackgroundColor:null===s||void 0===s?void 0:s.map((e=>e.color)),hoverBorderColor:"#fff"}]},c={responsive:!0,maintainAspectRatio:!1,layout:{padding:5},plugins:{legend:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:e=>{var t,n;const i=e.tooltip;if(!i||0===i.opacity)return void a((e=>null!==e?null:e));const r=null===(t=i.dataPoints)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.dataIndex,o=i.caretX,l=i.caretY-24;"number"===typeof r&&a((e=>e&&e.index===r&&e.x===o&&e.y===l?e:{index:r,x:o,y:l}))}}}};return(0,x.jsxs)(ht,{$isPcException:!0,height:"256px",$heightLg:"384px",$heightWt:"256px",children:[(0,x.jsx)(l.ld,{children:"\ubc29\ubb38 \uc720\ud615\ubcc4 \ub9e4\ucd9c"}),s&&s.length>0?(0,x.jsxs)(i.pT,{$isPcException:!0,$directionLg:"column",$directionWt:"row",gap:"24px",width:"100%",$marginLg:"16px 0 0",$gapLg:"16px",$gapWt:"24px",$alignSelf:"center",height:"100%",$heightLg:"unset",$heightWt:"100%",$minWidth:"240px",$minWidthLg:"unset",children:[(0,x.jsxs)(i.pT,{width:"120px",height:"120px",$flexShrink:"0",position:"relative",children:[(0,x.jsx)(Et.nu,{data:d,options:c}),n&&(0,x.jsx)(qt,{x:n.x,y:n.y,count:s[n.index].totalSalesCount,color:s[n.index].color})]}),(0,x.jsx)(i.pT,{$isPcException:!0,direction:"column",align:"flex-start",ga
1p:"8px",width:"100%",$maxWidth:"129px",$maxWidthLg:"unset",children:s&&s.map(((e,t)=>(0,x.jsx)(Kt,{bulletColor:e.color,title:e.label,percentage:e.percentage,amount:e.totalSalesAmount,rank:t+1},e.tag)))})]}):(0,x.jsx)(fe.A,{description:"\ub9e4\ucd9c \ub0b4\uc5ed\uc774 \uc5c6\uc5b4\uc694",$imageWidth:"120px",$imageWidthWt:"100px",margin:"0",$marginWt:"0",$fontSize:h.$N.size14,$lineHeight:h.kj.height22,gap:"8px",height:"100%"})]})};var Gt=n(48808),Jt=n(39914),_t=n(36903),en=n(33339),tn=n(87206),nn=n(30285),rn=n(15996);const an=e=>{let{icon:t,title:n,value:a,unit:o,averageValue:s,tooltipText:d,comparedToPrevious:p,padding:u,$layoutType:g}=e;const[m,j]=(0,r.useState)(!1),y="\uc608\uc57d \uac74 \uc218 \uc99d\uac10\uc728"===n?Number(null===a||void 0===a?void 0:a.replace(/,/g,"").replace("%","")):void 0,f=void 0!==y?y>0?"var(--color-green-500-main)":y<0?"var(--color-red-500-main)":void 0:void 0,w="\uc608\uc57d \uac74 \uc218 \uc99d\uac10\uc728"===n&&void 0!==y?"".concat(y>0?"+":""," ").concat(a):a;return(0,x.jsxs)(pt,{padding:u||"",$layoutType:g,children:[t&&(0,x.jsx)(t,{width:48,height:48,$widthWt:36,$heightWt:36}),(0,x.jsxs)(i.pT,{direction:"column",align:"flex-start",children:[(0,x.jsx)(i.pT,{direction:"column",$directionWt:"row",$gapWt:"4px",align:"flex-start",children:(0,x.jsxs)(i.pT,{gap:"4px",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-500)",fontWeight:h.sO.medium,$fontSizeWt:h.$N.size12,$lineHeightWt:h.kj.height20,children:n}),d&&(0,x.jsxs)(i.pT,{position:"relative",$hasCursor:!0,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[(0,x.jsx)(nn.A,{width:16,height:16}),m&&(0,x.jsx)(rn.A,{text:d,trianglePosition:"top",top:"calc(100% - 55px)",$triangleTop:"unset",$triangleBottom:"-14px",$triangleBorderColor:"var(--color-primary-500-main) transparent transparent transparent"})]}),s&&(0,x.jsxs)(l.x5,{fontSize:h.$N.size12,$lineHeight:h.kj.height20,color:"var(--color-gray-400)",style:{alignSelf:"flex-end"},children:["(",s,")"]})]})}),(0,x.jsxs)(i.pT,{gap:"2px",children:[(0,x.jsx)(l.ld,{fontWeight:h.sO.semiBold,color:f,children:w}),o&&(0,x.jsx)(l.x5,{color:"var(--color-gray-600)",children:o})]})]}),void 0!==p&&(0,x.jsxs)(i.pT,{$alignSelf:"center",margin:"0 0 0 auto",gap:"4px",children:[(0,x.jsx)(l.x5,{color:"var(--color-gray-400)",fontSize:h.$N.size12,$lineHeight:h.kj.height20,children:"\uc774\uc804 \ub300\ube44"}),(0,x.jsx)(i.pT,{padding:"2px 8px",radius:c.A.corner12,background:p>=0?"var(--color-green-50)":"var(--color-red-50)",children:(0,x.jsx)(l.x5,{color:p>=0?"var(--color-green-500-main)":"var(--color-red-500-main)",fontSize:h.$N.size12,fontWeight:h.sO.medium,$lineHeight:h.kj.height20,children:null!==p?(0,x.jsxs)(x.Fragment,{children:[p>=0?"+ ":"- ",(0,v.nm)(Math.abs(p)),"%"]}):"- %"})})]})]})},on=e=>{let{summary:t}=e;const{totalSales:n=0,paymentAmount:r=0,couponSales:a=0,totalProcedureSales:o=0,visitCount:l=0,visitUnitPrice:s=0,procedureCount:d=0,procedureUnitPrice:h=0,reservationChangeRate:p=0,visitRate:u=0,averageRevisitInterval:g=0,couponCount:m=0,totalSalesChangeRate:j=0,paymentAmountChangeRate:y=0}=t,f=[{icon:_t.A,title:"\ucd1d \ub9e4\ucd9c \ud569\uacc4",value:"".concat((0,v.nm)(n),"\uc6d0"),tooltipText:"\uacb0\uc81c \uae08\uc561 + \ud68c\uc6d0\uad8c \ud310\ub9e4 \uae08\uc561",comparedToPrevious:j},{icon:mt.A,title:"\uacb0\uc81c\uae08\uc561",value:"".concat((0,v.nm)(r),"\uc6d0"),tooltipText:"\uc608\uc57d\uae08 + \ubc29\ubb38 \uacb0\uc81c \uae08\uc561",comparedToPrevious:y},{icon:Jt.A,title:"\ud68c\uc6d0\uad8c \ud310\ub9e4 \uae08\uc561",value:"".concat((0,v.nm)(a)),unit:"\uc6d0"}
1,{icon:Gt.A,title:"\uc2dc\uc220 \ud310\ub9e4 \uae08\uc561",value:"".concat((0,v.nm)(o)),unit:"\uc6d0",tooltipText:"\ub9e4\ucd9c\uc5d0 \ub4f1\ub85d\ub41c \uc2dc\uc220 \ud310\ub9e4\uac00\uc758 \ucd1d \ud569\uacc4"},{icon:en.A,title:"\uace0\uac1d \ubc29\ubb38 \uc218",value:"".concat((0,v.nm)(l)),unit:"\ud68c",averageValue:(0,v.jU)(s,"1\ud68c")},{icon:tn.A,title:"\uc2dc\uc220 \uac74\uc218",value:"".concat((0,v.nm)(d)),unit:"\ud68c",averageValue:(0,v.jU)(h,"1\ud68c")},{title:"\uc608\uc57d \uac74 \uc218 \uc99d\uac10\uc728",value:"".concat((0,v.nm)(Math.round(p)),"%"),padding:"12px 16px",$layoutType:"half"},{title:"\ubc29\ubb38\uc728",value:"".concat((0,v.nm)(Math.round(u)),"%"),tooltipText:"\uae30\uac04/\uc9c1\uc6d0\uacfc \ubb34\uad00\ud55c \uc804\uccb4 \ub204\uc801 \uae30\uc900\uc774\uc5d0\uc694",padding:"12px 16px",$layoutType:"half"},{title:"\ud3c9\uade0 \uc7ac\ubc29\ubb38 \uc18c\uc694\uae30\uac04",value:"".concat((0,v.nm)(Math.round(g))),unit:"\uc77c",tooltipText:"\uae30\uac04/\uc9c1\uc6d0\uacfc \ubb34\uad00\ud55c \uc804\uccb4 \ub204\uc801 \uae30\uc900\uc774\uc5d0\uc694",padding:"12px 14px 12px 16px",$layoutType:"half"},{title:"\ucd1d \ud68c\uc6d0\uad8c \ud310\ub9e4 \uac74 \uc218",value:"".concat((0,v.nm)(m)),unit:"\uac74",padding:"12px 16px",$layoutType:"half"}];return(0,x.jsx)(i.pT,{gap:"12px",$isPcException:!0,$maxWidth:"500px",width:"100%",$maxWidthLg:"370px",$maxWidthWt:"100%",align:"flex-start",wrap:"wrap",background:"var(--color-gray-100)",border:"1px solid var(--color-gray-200)",$boxShadow:"var(--shadow-2)",padding:"12px",radius:c.A.corner16,$minHeight:"822px",$minHeightWt:"unset",style:{alignContent:"flex-start"},children:f.map((e=>(0,x.jsx)(an,{...e},e.title)))})};var ln=n(14365),sn=n(93747),dn=n(85897);const cn=(0,ln.DY)("statistic",{fetchPaymentAmount:e=>[e],fetchCouponSales:e=>[e],fetchTotalProcedureSales:e=>[e],fetchVisitCount:e=>[e],fetchProcedureCount:e=>[e],fetchReservationChangeRate:e=>[e],fetchVisitRate:e=>[e],fetchAverageRevisitInterval:e=>[e],fetchCouponCount:e=>[e],fetchStatisticsProduct:e=>[e],fetchStatisticsReservationChannel:e=>[e],fetchStatisticsMethod:e=>[e],fetchStatisticsCustomers:e=>[e]});var hn=n(35643);const pn=()=>{const e=sessionStorage.getItem("shopId"),t=(0,ue.C)((e=>e.pageParams)),n=new Date,i=k()().subtract(6,"days").startOf("day").toDate(),[a,o]=(0,r.useState)(null!==t&&void 0!==t&&t.startDate?new Date(null===t||void 0===t?void 0:t.startDate):i),[l,s]=(0,r.useState)(null!==t&&void 0!==t&&t.endDate?new Date(null===t||void 0===t?void 0:t.endDate):n),[d,c]=(0,r.useState)([]),[h,p]=(0,r.useState)({si:e,sd:(0,$._y)(i),ed:(0,$._y)(n),hscp:!0}),[x,u]=(0,r.useState)(!1),{data:g}=(0,ie.Qv)(h,x),{data:v}=(m=h,j=x,(0,sn.I)({queryKey:cn.fetchPaymentAmount(m).queryKey,queryFn:()=>(0,dn.xd)(m),enabled:!!m&&!!j}));var m,j;const{data:y}=((e,t)=>(0,sn.I)({queryKey:cn.fetchCouponSales(e).queryKey,queryFn:()=>(0,dn.pl)(e),enabled:!!e&&!!t}))(h,x),{data:f}=((e,t)=>(0,sn.I)({queryKey:cn.fetchTotalProcedureSales(e).queryKey,queryFn:()=>(0,dn.wF)(e),enabled:!!e&&!!t}))(h,x),{data:w}=((e,t)=>(0,sn.I)({queryKey:cn.fetchVisitCount(e).queryKey,queryFn:()=>(0,dn.pe)(e),enabled:!!e&&!!t}))(h,x),{data:S}=((e,t)=>(0,sn.I)({queryKey:cn.fetchProcedureCount(e).queryKey,queryFn:()=>(0,dn.dt)(e),enabled:!!e&&!!t}))(h,x),{data:A}=((e,t)=>(0,sn.I)({queryKey:cn.fetchReservationChangeRate(e).queryKey,queryFn:()=>(0,dn.vR)(e),enabled:!!e&&!!t}))(h,x),{data:C}=((e,t)=>(0,sn.I)({queryKey:cn.fetchVisitRate(e).queryKey,queryFn:()=>(0,dn.uG)(e),enabled:!!e&&!!t}))(e,x),{data:b}=((e,t)=>(0,sn.I)({queryKey:cn.fetchAverageRevisitInterval(e).queryKey,queryFn:()=>(0,dn.LI)(e),enabled:!!e&&!!t}))(e,x),{data:T}=((e,t)=>(0,sn.I)({queryKey:cn.fetchCouponCount(e).queryKey,queryFn:()=>(0,dn.i4)(e),enabled:!!e&&!!t}))(h,x),{data:W}=((e,t)=>(0,sn.I)({queryKey:cn.fetchStatisticsProduct(e).queryKey,queryFn:()=>(0,dn.dB)(e),enabled:!!e&&!!t}))(h,x),{data:D}=((e,t)=>(0,sn.I)({queryKey:cn.fetchStatisticsReservationChannel(e).queryKey,queryFn:()=>(0,dn.H3)(e),enabled:!!e&&!!t}))(h,x),{data:P}=((e,t)=>(0,sn.I)({queryKey:cn.fetchStatisticsMethod(e).queryKey,queryFn:()=>(0,dn.Lb)(e),enabled:!!e&&!!t}))(h,x),{data:R}=((e,t)=>(0,sn.I)({queryKey:cn.fetchStatisticsCustomers(e).queryKey,queryFn:()=>(0,dn.t0)(e),enabled:!!e&&!!t}))(h,x),{data:N}=(0,hn.Ps)(h,x);return(0,r.useEffect)((()=>{p((e=>({...e,sd:(0,$._y)(a),ed:(0,$._y)(l)})))}),[a,l]),(0,r.useEffect)((()=>{p((e=>(e=>{const t={...e};return 1===d.length?t.ssf=d[0]:delete t.ssf,t})(e)))}),[d]),{setIsFetchStatistics:u,startDate:a,setStartDate:o,endDate:l,setEndDate:s,selectedStaff:d,setSelectedStaff:c,setStatisticsParams:p,summary:{totalSales:null===g||void 0===g?void 0:g.amount,paymentAmount:null===v||void 0===v?void 0:v.amount,couponSales:y,totalProcedureSales:f,visitCount:null===w||void 0===w?void 0:w.count,visitUnitPrice:null===w||void 0===w?void 0:w.unitPrice,procedureCount:null===S||void 0===S?void 0:S.count,procedureUnitPrice:null===S||void 0===S?void 0:S.unitPrice,reservationChangeRate:null===A||void 0===A?void 0:A.changeRatePercent,visitRate:null===C||void 0===C?void 0:C.ratePercent,averageRevisitInterval:null===b||void 0===b?void 0:b.averageIntervalDays,couponCount:null===T||void 0===T?void 0:T.count,totalSalesChangeRate:null===g||void 0===g?void 0:g.salesChangePercentage,paymentAmountChangeRate:null===v||void 0===v?void 0:v.salesChangePercentage},statisticsProduct:W,statisticsReservationChannel:D,statisticsMethod:P,statisticsCustomers:R,paymentsCalendarData:N}},xn=()=>{const{setIsFetchStatistics:e,startDate:t,endDate:n,setStartDate:a,setEndDate:o,selectedStaff:l,setSelectedStaff:s,summary:d,statisticsProduct:c,statisticsMethod:h,statisticsReservationChannel:p,statisticsCustomers:u,paymentsCalendarData:g}=pn();return(0,r.useEffect)((()=>{e(!0)}),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(We,{startDate:t,endDate:n,setStartDate:a,setEndDate:o,selectedStaff:l,setSelectedStaff:s,setPaymentsParams:()=>{},hasStaffFilter:!0,dateLimit:90}),(0,x.jsxs)(i.pT,{gap:"16px",align:"flex-start",$directionWt:"column",width:"calc(100% + 48px)",background:"var(--color-gray-50)",margin:"16px 0 0",padding:"16px 24px",children:[(0,x.jsx)(on,{summary:d}),(0,x.jsxs)(i.pT,{$isPcException:!0,direction:"column",gap:"16px",width:"100%",$minWidth:"930px",$minWidthLg:"0",children:[(0,x.jsx)(Ht,{paymentsCalendarData:g}),(0,x.jsxs)(i.pT,{gap:"16px",width:"100%",$displayWt:"none",align:"flex-start",children:[(0,x.jsx)(Ut,{statisticsProduct:c}),(0,x.jsxs)(i.pT,{direction:"column",gap:"16px",width:"100%",children:[(0,x.jsx)(Yt,{statisticsMethod:h}),(0,x.jsxs)(i.pT,{gap:"16px",width:"100%",children:[(0,x.jsx)(Zt,{statisticsReservationChannel:p}),(0,x.jsx)(Qt,{statisticsCustomers:u})]})]})]}),(0,x.jsxs)(ct,{width:"100%",display:"none",$displayWt:"grid",children:[(0,x.jsx)(Zt,{statisticsReservationChannel:p}),(0,x.jsx)(Qt,{statisticsCustomers:u}),(0,x.jsx)(Ut,{statisticsProduct:c}),(0,x.jsx)(Yt,{statisticsMethod:h})]})]})]})]})};var un=n(471);const gn=()=>{const e=(0,O.wQ)(),{isTabletRightDrawerOpen:t,isDrawerOpen:n}=(0,Z.A)((0,s.k)((e=>({isTabletRightDrawerOpen:e.isTabletRightDrawerOpen,isDrawerOpen:e.isDrawerOpen})))),a=(0,ue.C)((e=>e.resetPageParams));(0,q.e)();const l=(0,q.E)((e=>e.isUnder1440PcScreen)),d=(0,y.A)((e=>e.resetCalendarState)),{selectedUnRegisteredInfo:c}=b((0,s.k)((e=>({selectedUnRegisteredInfo:e.selectedUnRegisteredInfo})))),{todayReservationTotalCount:h,todayReservationDtoList:p,hasNoReserveStatus:u,setIsFetchTodayReservationData:g}
1=(0,z.A)(),{unRegisteredListData:v,unRegisteredPaymentParams:m,setUnRegisteredPaymentParams:j,unRegisteredPaymentPagination:f,setIsFetchUnRegistered:w}=(0,L.A)(),[S,$]=(0,r.useState)(new Date),[A,C]=(0,r.useState)(!1),[T,W]=(0,r.useState)(!1),[k,D]=(0,r.useState)(!1),[P,R]=(0,r.useState)(o.PC[0].value),N=P===o.PC[0].value,E=P===o.PC[1].value,H=P===o.PC[2].value;return(0,r.useEffect)((()=>(g(!0),w(!0),"POP"!==e&&a(),()=>{d()})),[]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(i.pT,{width:"100%",align:"flex-start",justify:"flex-start",children:[(0,x.jsxs)(i.pT,{$isPcException:!0,width:H?"100%":"calc(100% - 360px)",direction:"column",gap:E?"20px":"unset",$widthLg:"100%",padding:H?"82px 24px 0":"82px 24px 24px",$paddingLg:H?"":"82px 40px 24px 24px",$paddingWt:H?"":"78px 32px 20px 24px",$gapWt:E?"16px":"unset",children:[(0,x.jsx)(K,{selectedViewType:P,setSelectedViewType:R}),N&&(0,x.jsx)(De,{}),E&&(0,x.jsx)(At,{}),H&&(0,x.jsx)(xn,{})]}),!H&&(l?(0,x.jsx)(x.Fragment,{children:t?(0,x.jsxs)(i.JC,{className:"open",$heightWt:"100dvh",$boxShadow:"unset",$borderLeft:"1px solid var(--color-gray-200)",$zIndex:Q.A.zIndexDialog,children:[(0,x.jsx)(X.A,{top:"40%"}),(0,x.jsx)(i.Z6,{$maxHeight:"100dvh",background:"var(--color-gray-50)",$paddingRight:"0",children:(0,x.jsx)(i.pT,{position:"relative",width:"100%",background:"var(--color-gray-50)",direction:"column",padding:"78px 16px 16px",justify:"start",$minWidth:"360px",$maxWidth:"360px",children:(0,x.jsx)(I,{selectedDate:S,setSelectedDate:$,selectedViewType:P,setTodayTodoListModal:C,todayReservationTotalCount:h,todayReservationDtoList:p,hasNoReserveStatus:u,setUnRegisteredModal:W,setCreatePaymentModal:D})})})]}):(0,x.jsx)(i.JC,{className:"",$heightWt:"100dvh",$boxShadow:"unset",transform:"translateX(0%)",width:"20px",$zIndex:Q.A.zIndexDialog,children:(0,x.jsx)(i.pT,{position:"relative",width:"100%",height:"100%",background:"var(--color-gray-50)",$borderLeft:"1px solid var(--color-gray-200)",children:(0,x.jsx)(X.A,{top:"40%"})})})}):(0,x.jsx)(i.Z6,{width:"unset",$overflowX:"hidden",$maxHeight:"100%",$paddingRight:"0",background:"var(--color-gray-50)",style:{position:"fixed",right:"0"},children:(0,x.jsx)(i.pT,{width:"360px",height:"100dvh",$minHeight:"720px",background:"var(--color-gray-50)",direction:"column",padding:"78px 16px 16px",justify:"start",children:(0,x.jsx)(I,{selectedDate:S,setSelectedDate:$,selectedViewType:P,setTodayTodoListModal:C,todayReservationTotalCount:h,todayReservationDtoList:p,hasNoReserveStatus:u,setUnRegisteredModal:W,setCreatePaymentModal:D})})}))]}),(0,x.jsx)(M.A,{todayTodoListModal:A,setTodayTodoListModal:C,todayReservationTotalCount:h,todayReservationDtoList:p}),(0,x.jsx)(Rt,{modal:T,setModal:W,unRegisteredListData:v,setCreatePaymentModal:D,unRegisteredPaymentParams:m,setUnRegisteredPaymentParams:j,unRegisteredPaymentPagination:f,selectedViewType:P}),(0,x.jsx)(Nt.A,{modal:k,setModal:D,customerId:null===c||void 0===c?void 0:c.customerId,reservationId:null===c||void 0===c?void 0:c.id,unRegisteredPaymentParams:m,selectedViewType:P}),n&&(0,x.jsx)(un.A,{isDrawerOpen:n})]})}},76269:(e,t,n)=>{n.d(t,{v:()=>o});var i=n(65043),r=n(42586),a=n(92858);const o=e=>{const t=(0,r._)((e=>e.handleScroll)),n=(0,a.E)((e=>e.isUnderWideTabletScreen));(0,i.useEffect)((()=>{const n=e.current,i=()=>{n&&t(n)};if(i(),n)return n.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{n.removeEventListener("scroll",i),window.removeEventListener("resize",i)}}),[n,t,e])}},61158:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(73216),r=n(97605),a=n(399),o=n(8720),l=n(59116),s=n(70579);const d=e=>{const{title:t,hasOnlyTitle:n,backMode:d,setModal:c,onClose:h}=e,p=(0,i.Zp)();return(0,s.jsxs)(r.pT,{justify:"start",gap:"8px",children:[!n&&(0,s.jsx)(o.A,{width:"30px",height:"30px",$widthWt:"24px",$heightWt:"24px",handleBack:()=>{h?h():"formBack"===d?null===c||void 0===c||c(!0):p(-1)}}),(0,s.jsx)(a.V9,{fontSize:l.$N.size24,$lineHeight:l.kj.height32,$fontSizeWt:l.$N.size20,$lineHeightWt:l.kj.height28,$whiteSpace:"nowrap",children:t})]})}},42586:(e,t,n)=>{n.d(t,{_:()=>i});const i=(0,n(4548).vt)((e=>({isAtEnd:!1,setIsAtEnd:t=>e({isAtEnd:t}),handleScroll:t=>{const{scrollWidth:n,clientWidth:i,scrollLeft:r}=t;e(r+i>=n-1?{isAtEnd:!0}:{isAtEnd:!1})}})))}}]); 2//# sourceMappingURL=652.67956a54.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.