@cashdoc/cashdoc-cms-design-system 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
`),ghost:P("border-none bg-transparent","hover:bg-cms-gray-100 hover:text-cms-gray-900","disabled:bg-transparent disabled:text-cms-gray-450",`
|
|
26
26
|
disabled:cursor-not-allowed
|
|
27
27
|
disabled:hover:bg-transparent
|
|
28
|
-
`)},size:{sm:"h-7 px-2.5 text-[13px]",default:"h-9 px-3 text-sm",lg:"h-11 px-3.5 text-[15px]"}},defaultVariants:{variant:"default",size:"default"}}),QP=Ee(P("box-border h-9 w-full","px-3","rounded-cms-md","border border-solid","leading-tight font-normal","transition-[border-color,box-shadow] duration-150 ease-out","outline-none","bg-cms-white text-sm text-cms-gray-900","placeholder:text-sm placeholder:text-cms-gray-450","hover:border-cms-gray-350"),{variants:{variant:{default:P("border-cms-gray-250","focus:border-cms-gray-900","focus:shadow-[0_0_0_3px_rgba(15,20,25,0.08)]","disabled:bg-cms-gray-100","disabled:text-cms-gray-450","disabled:border-cms-gray-200","disabled:cursor-not-allowed","disabled:hover:border-cms-gray-200"),error:P("border-cms-red-500","focus:border-cms-red-500","focus:shadow-[0_0_0_3px_rgba(229,56,74,0.22)]","hover:border-cms-red-500")},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",fullWidth:!0}}),rm=Ee("mb-1.5 block text-[13px] font-medium text-cms-gray-800"),JP=Ee("mt-1.5 block text-[12px] font-normal text-cms-red-500"),RP=Ee("mt-1.5 block text-[12px] font-normal text-cms-gray-550"),nu=y.forwardRef(({className:e,variant:t,fullWidth:r,label:n,required:o,error:a,errorMessage:i,helperText:s,showCharCount:l,maxLength:c,value:d,defaultValue:u,onChange:f,id:p,labelLayout:g="vertical",labelWidth:m="120px",prefix:v,suffix:b,disabled:x,...O},S)=>{const E=y.useId(),C=d!==void 0,_=te=>te==null?"":String(te),[k,D]=y.useState(_(u)),N=p||E,T=`${N}-error`,M=`${N}-helper`,K=a?"error":t,$=(C?_(d):k).length,A=te=>{C||D(te.target.value),f==null||f(te)},j=C?{value:d}:{defaultValue:u},L=n||l&&c,V=g==="horizontal",H=a&&i?T:s?M:void 0,J=v!=null||b!=null,re=P("absolute inset-y-0 flex items-center","pointer-events-none",x?"text-cms-gray-400":"text-cms-gray-450"),R=te=>{const ne=h.jsx("input",{id:N,ref:S,className:P(QP({variant:K,fullWidth:te}),v!=null&&"pl-9",b!=null&&"pr-9",e),maxLength:c,...j,onChange:A,required:o,disabled:x,"aria-invalid":a||void 0,"aria-describedby":H,...O});return J?h.jsxs("div",{className:"relative",children:[v!=null&&h.jsx("div",{className:P(re,"left-3"),"aria-hidden":"true",children:v}),ne,b!=null&&h.jsx("div",{className:P(re,"right-3"),"aria-hidden":"true",children:b})]}):ne};return h.jsxs("div",{className:P("w-full",!r&&"w-auto"),children:[V&&L?h.jsxs("div",{className:"flex items-center gap-3",children:[n&&h.jsxs("label",{htmlFor:N,className:P(rm(),"mb-0 shrink-0"),style:{width:m},children:[n,o&&h.jsx("span",{className:"ml-1 text-cms-red-400",children:"*"})]}),h.jsx("div",{className:"flex-1",children:R(!0)}),l&&c&&h.jsxs("span",{className:"shrink-0 text-sm text-cms-gray-600",children:[$," / ",c]})]}):h.jsxs(h.Fragment,{children:[L&&h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[n?h.jsxs("label",{htmlFor:N,className:rm(),children:[n,o&&h.jsx("span",{className:"ml-1 text-cms-red-400",children:"*"})]}):h.jsx("div",{}),l&&c&&h.jsxs("span",{className:"text-sm text-cms-gray-600",children:[$," / ",c]})]}),R(r)]}),a&&i&&h.jsx("span",{id:T,className:JP(),children:i}),!a&&s&&h.jsx("span",{id:M,className:RP(),children:s})]})});nu.displayName="TextInput";const nm=y.forwardRef(({options:e,value:t,placeholder:r="선택하세요",onValueChange:n,onValuesChange:o,disabled:a=!1,className:i,dropdownClassName:s,variant:l,size:c,searchable:d=!1,clearable:u=!1,multiple:f=!1,selectAll:p=!1,maxHeight:g=200,defaultOpen:m=!1,renderOption:v,onSearchChange:b,...x},O)=>{if(p&&!f)throw new Error("Dropdown: selectAll={true} requires multiple={true}.");const[S,E]=y.useState(m),[C,_]=y.useState(!1),[k,D]=y.useState(!1),[N,T]=y.useState(null),[M,K]=y.useState(""),[I,$]=y.useState(f?t?t.split(",").filter(Boolean):[]:[]),A=f&&t!==void 0?t.split(",").filter(Boolean):I,[j,L]=y.useState(null),V=y.useRef(new Map),H=y.useRef(null),{ref:J,nodeRef:re,showEnd:R,refresh:te}=em("y"),ne=y.useRef(null),oe=y.useRef(null),pe=y.useRef(null),le=y.useRef(null),B=(ce,ye)=>{for(const Ce of ce){if(Ce.value===ye)return Ce;if(Ce.children){const ft=B(Ce.children,ye);if(ft)return ft}}},U=B(e,t||""),G=f?A.length>0?`${A.length}개 선택됨`:r:(U==null?void 0:U.label)||r,F=e.filter(ce=>ce.label.toLowerCase().includes(M.toLowerCase())),ee=y.useCallback(()=>{_(!0)},[]),q=()=>{if(a)return;if(S&&!C){ee();return}const ce=oe.current;if(ce){const ye=ce.getBoundingClientRect(),Ce=window.innerHeight-ye.bottom,ft=ye.top,yt=(d?40:0)+g+16,Vr=Ce<yt&&ft>Ce;D(Vr),T({topAnchor:ye.bottom+4,bottomAnchor:window.innerHeight-ye.top+4,left:ye.left,width:ye.width})}_(!1),E(!0),M&&(K(""),b==null||b(""))},Z=ce=>{ce.animationName==="dropdownHide"&&ce.currentTarget===ce.target&&(E(!1),_(!1),M&&(K(""),b==null||b("")))},ae=()=>{H.current!==null&&(window.clearTimeout(H.current),H.current=null)},z=()=>{ae(),H.current=window.setTimeout(()=>{L(null)},300)},Q=y.useCallback((ce,ye)=>{if(ae(),!ye){L(null);return}const Ce=V.current.get(ce.value);if(Ce&&re.current){const ft=Ce.getBoundingClientRect(),yt=re.current.getBoundingClientRect();L({value:ce.value,top:ft.top-yt.top+re.current.scrollTop})}},[re]);y.useEffect(()=>()=>{ae()},[]);const ie=ce=>{o?o(ce):n==null||n(ce.join(","))},we=ce=>{if(!ce.disabled)if(f){const ye=A.includes(ce.value)?A.filter(Ce=>Ce!==ce.value):[...A,ce.value];t===void 0&&$(ye),ie(ye)}else n==null||n(ce.value),ee()},Ze=()=>{if(!f)return;const ce=F.filter(Ce=>!Ce.disabled).map(Ce=>Ce.value),ye=Array.from(new Set([...A,...ce]));t===void 0&&$(ye),n==null||n(ye.join(","))},Ye=ce=>{ce.stopPropagation(),f?(t===void 0&&$([]),ie([])):n==null||n("")},kt=ce=>{ce.key==="Escape"?ee():(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),q())};return y.useEffect(()=>{if(!S)return;const ce=ye=>{var ft,yt;const Ce=ye.target;(ft=ne.current)!=null&&ft.contains(Ce)||(yt=pe.current)!=null&&yt.contains(Ce)||ee()};return document.addEventListener("mousedown",ce),()=>document.removeEventListener("mousedown",ce)},[S,ee]),y.useEffect(()=>{if(!S)return;const ce=Ce=>{var yt;const ft=Ce.target;ft&&((yt=pe.current)!=null&&yt.contains(ft))||ee()},ye=()=>ee();return window.addEventListener("scroll",ce,!0),window.addEventListener("resize",ye),()=>{window.removeEventListener("scroll",ce,!0),window.removeEventListener("resize",ye)}},[S,ee]),y.useEffect(()=>{S&&d&&le.current&&le.current.focus()},[S,d]),h.jsxs("div",{ref:ne,className:"relative w-full",children:[p&&h.jsxs("div",{className:"mb-1 flex justify-start -space-x-4",children:[h.jsx(bt,{variant:"underline",type:"button",onClick:Ze,disabled:a,children:"모두 선택"}),h.jsx(bt,{variant:"underline",type:"button",onClick:Ye,disabled:a,children:"해제"})]}),h.jsxs("div",{ref:oe,className:"relative",children:[h.jsx("button",{ref:O,type:"button",className:P(tm({variant:l,size:c}),"pr-8",i),onClick:q,onKeyDown:kt,disabled:a,"aria-expanded":S,"aria-haspopup":"listbox",...x,children:h.jsx("span",{className:P("flex-1 truncate text-left",!U&&!f&&"text-cms-gray-400"),children:G})}),h.jsxs("div",{className:P("absolute top-1/2 right-3 -translate-y-1/2","flex items-center gap-2","pointer-events-none",a&&"text-cms-gray-400"),children:[u&&(t||A.length>0)&&h.jsx("button",{type:"button",className:P("pointer-events-auto border-0 bg-transparent","rounded-cms-md p-1 text-cms-gray-400 transition-colors","hover:text-cms-black"),onClick:Ye,"aria-label":"선택 취소",children:h.jsx(yn,{className:"size-3"})}),h.jsx(Ri,{size:14,strokeWidth:2,className:P("transition-transform duration-200",S&&"rotate-180")})]}),S&&N&&Da.createPortal(h.jsxs("div",{ref:pe,role:"listbox","aria-multiselectable":f||void 0,className:P("fixed z-cms-overlay min-w-0 py-1","rounded-cms-xl border border-cms-gray-300","bg-cms-white shadow-lg",C?"cms-dropdown-hide":"cms-dropdown-show",s),style:{top:k?"auto":N.topAnchor,bottom:k?N.bottomAnchor:"auto",left:N.left,width:N.width,maxHeight:`${g}px`},onAnimationEnd:Z,children:[d&&h.jsx("div",{className:"border-b border-cms-gray-200 p-2",children:h.jsx(nu,{ref:le,type:"text",value:M,onChange:ce=>{K(ce.target.value),b==null||b(ce.target.value),requestAnimationFrame(()=>te())},placeholder:"검색..."})}),h.jsxs("div",{className:"relative min-h-0 flex-1",children:[h.jsx("div",{className:P("h-full overflow-hidden",d?"rounded-b-cms-xl":"rounded-cms-xl"),children:h.jsxs("div",{ref:J,className:"max-h-48 overflow-y-auto",onMouseEnter:ae,onMouseLeave:z,children:[F.length===0?h.jsx("div",{className:P("px-3 py-2","text-sm text-cms-gray-400","text-center"),children:M?"검색 결과가 없습니다":"옵션이 없습니다"}):F.map(ce=>{var yt;const ye=f?A.includes(ce.value):t===ce.value,Ce=!!((yt=ce.children)!=null&&yt.length),ft=(j==null?void 0:j.value)===ce.value;return h.jsx("div",{ref:Vr=>{Vr?V.current.set(ce.value,Vr):V.current.delete(ce.value)},onMouseEnter:()=>Q(ce,Ce),onMouseLeave:()=>{Ce&&z()},children:h.jsxs("button",{type:"button",role:"option","aria-selected":ye,"aria-haspopup":Ce?"menu":void 0,className:P("border-0","flex items-center justify-between gap-2","w-full px-3 py-2","text-left text-sm","transition-colors",ce.disabled?P("cursor-not-allowed bg-cms-white","text-cms-gray-400"):P("bg-cms-white text-cms-black","hover:bg-cms-gray-100","cursor-pointer"),ye&&"bg-cms-gray-150 font-medium",ft&&"bg-cms-gray-100"),onClick:()=>{Ce||we(ce)},disabled:ce.disabled,children:[v?v(ce):h.jsx("span",{className:"truncate",children:ce.label}),Ce?h.jsx(Up,{className:P("size-3 shrink-0","text-cms-gray-400")}):ye?h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"h-4 w-4 shrink-0 text-cms-black",children:h.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]})},ce.value)}),R&&h.jsx("div",{className:P("sticky bottom-0 -mt-8 flex h-8 w-full items-end","justify-center pb-1","bg-linear-to-t from-cms-white to-transparent","pointer-events-none"),children:h.jsx(Ri,{size:16,strokeWidth:2,className:P("text-cms-gray-400","animate-bounce")})})]})}),j&&(()=>{const ce=F.find(ye=>ye.value===j.value);return ce!=null&&ce.children?h.jsx("div",{role:"menu",className:P(`
|
|
28
|
+
`)},size:{sm:"h-7 px-2.5 text-[13px]",default:"h-9 px-3 text-sm",lg:"h-11 px-3.5 text-[15px]"}},defaultVariants:{variant:"default",size:"default"}}),QP=Ee(P("box-border h-9 w-full","px-3","rounded-cms-md","border border-solid","leading-tight font-normal","transition-[border-color,box-shadow] duration-150 ease-out","outline-none","bg-cms-white text-sm text-cms-gray-900","placeholder:text-sm placeholder:text-cms-gray-450","hover:border-cms-gray-350"),{variants:{variant:{default:P("border-cms-gray-250","focus:border-cms-gray-900","focus:shadow-[0_0_0_3px_rgba(15,20,25,0.08)]","disabled:bg-cms-gray-100","disabled:text-cms-gray-450","disabled:border-cms-gray-200","disabled:cursor-not-allowed","disabled:hover:border-cms-gray-200"),error:P("border-cms-red-500","focus:border-cms-red-500","focus:shadow-[0_0_0_3px_rgba(229,56,74,0.22)]","hover:border-cms-red-500")},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",fullWidth:!0}}),rm=Ee("mb-1.5 block text-[13px] font-medium text-cms-gray-800"),JP=Ee("mt-1.5 block text-[12px] font-normal text-cms-red-500"),RP=Ee("mt-1.5 block text-[12px] font-normal text-cms-gray-550"),nu=y.forwardRef(({className:e,variant:t,fullWidth:r,label:n,required:o,error:a,errorMessage:i,helperText:s,showCharCount:l,maxLength:c,value:d,defaultValue:u,onChange:f,id:p,labelLayout:g="vertical",labelWidth:m="120px",prefix:v,suffix:b,disabled:x,...O},S)=>{const E=y.useId(),C=d!==void 0,_=te=>te==null?"":String(te),[k,D]=y.useState(_(u)),N=p||E,T=`${N}-error`,M=`${N}-helper`,K=a?"error":t,$=(C?_(d):k).length,A=te=>{C||D(te.target.value),f==null||f(te)},j=C?{value:d}:{defaultValue:u},L=n||l&&c,V=g==="horizontal",H=a&&i?T:s?M:void 0,J=v!=null||b!=null,re=P("absolute inset-y-0 flex items-center","pointer-events-none",x?"text-cms-gray-400":"text-cms-gray-450"),R=te=>{const ne=h.jsx("input",{id:N,ref:S,className:P(QP({variant:K,fullWidth:te}),v!=null&&"pl-9",b!=null&&"pr-9",e),maxLength:c,...j,onChange:A,required:o,disabled:x,"aria-invalid":a||void 0,"aria-describedby":H,...O});return J?h.jsxs("div",{className:"relative",children:[v!=null&&h.jsx("div",{className:P(re,"left-3"),"aria-hidden":"true",children:v}),ne,b!=null&&h.jsx("div",{className:P(re,"right-3"),"aria-hidden":"true",children:b})]}):ne};return h.jsxs("div",{className:P("w-full",!r&&"w-auto"),children:[V&&L?h.jsxs("div",{className:"flex items-center gap-3",children:[n&&h.jsxs("label",{htmlFor:N,className:P(rm(),"mb-0 shrink-0"),style:{width:m},children:[n,o&&h.jsx("span",{className:"ml-1 text-cms-red-400",children:"*"})]}),h.jsx("div",{className:"flex-1",children:R(!0)}),l&&c&&h.jsxs("span",{className:"shrink-0 text-sm text-cms-gray-600",children:[$," / ",c]})]}):h.jsxs(h.Fragment,{children:[L&&h.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[n?h.jsxs("label",{htmlFor:N,className:rm(),children:[n,o&&h.jsx("span",{className:"ml-1 text-cms-red-400",children:"*"})]}):h.jsx("div",{}),l&&c&&h.jsxs("span",{className:"text-sm text-cms-gray-600",children:[$," / ",c]})]}),R(r)]}),a&&i&&h.jsx("span",{id:T,className:JP(),children:i}),!a&&s&&h.jsx("span",{id:M,className:RP(),children:s})]})});nu.displayName="TextInput";const nm=y.forwardRef(({options:e,value:t,placeholder:r="선택하세요",onValueChange:n,onValuesChange:o,disabled:a=!1,className:i,dropdownClassName:s,variant:l,size:c,searchable:d=!1,clearable:u=!1,multiple:f=!1,selectAll:p=!1,maxHeight:g=200,defaultOpen:m=!1,renderOption:v,onSearchChange:b,...x},O)=>{if(p&&!f)throw new Error("Dropdown: selectAll={true} requires multiple={true}.");const[S,E]=y.useState(m),[C,_]=y.useState(!1),[k,D]=y.useState(!1),[N,T]=y.useState(null),[M,K]=y.useState(""),[I,$]=y.useState(f?t?t.split(",").filter(Boolean):[]:[]),A=f&&t!==void 0?t.split(",").filter(Boolean):I,[j,L]=y.useState(null),V=y.useRef(new Map),H=y.useRef(null),{ref:J,nodeRef:re,showEnd:R,refresh:te}=em("y"),ne=y.useRef(null),oe=y.useRef(null),pe=y.useRef(null),le=y.useRef(null),B=(ce,ye)=>{for(const Ce of ce){if(Ce.value===ye)return Ce;if(Ce.children){const ft=B(Ce.children,ye);if(ft)return ft}}},U=B(e,t||""),G=f?A.length>0?`${A.length}개 선택됨`:r:(U==null?void 0:U.label)||r,F=e.filter(ce=>ce.label.toLowerCase().includes(M.toLowerCase())),ee=y.useCallback(()=>{_(!0)},[]),q=()=>{if(a)return;if(S&&!C){ee();return}const ce=oe.current;if(ce){const ye=ce.getBoundingClientRect(),Ce=window.innerHeight-ye.bottom,ft=ye.top,yt=(d?40:0)+g+16,Vr=Ce<yt&&ft>Ce;D(Vr),T({topAnchor:ye.bottom+4,bottomAnchor:window.innerHeight-ye.top+4,left:ye.left,width:ye.width})}_(!1),E(!0),M&&(K(""),b==null||b(""))},Z=ce=>{ce.animationName==="dropdownHide"&&ce.currentTarget===ce.target&&(E(!1),_(!1),M&&(K(""),b==null||b("")))},ae=()=>{H.current!==null&&(window.clearTimeout(H.current),H.current=null)},z=()=>{ae(),H.current=window.setTimeout(()=>{L(null)},300)},Q=y.useCallback((ce,ye)=>{if(ae(),!ye){L(null);return}const Ce=V.current.get(ce.value);if(Ce&&re.current){const ft=Ce.getBoundingClientRect(),yt=re.current.getBoundingClientRect();L({value:ce.value,top:ft.top-yt.top+re.current.scrollTop})}},[re]);y.useEffect(()=>()=>{ae()},[]);const ie=ce=>{o?o(ce):n==null||n(ce.join(","))},we=ce=>{if(!ce.disabled)if(f){const ye=A.includes(ce.value)?A.filter(Ce=>Ce!==ce.value):[...A,ce.value];t===void 0&&$(ye),ie(ye)}else n==null||n(ce.value),ee()},Ze=()=>{if(!f)return;const ce=F.filter(Ce=>!Ce.disabled).map(Ce=>Ce.value),ye=Array.from(new Set([...A,...ce]));t===void 0&&$(ye),n==null||n(ye.join(","))},Ye=ce=>{ce.stopPropagation(),f?(t===void 0&&$([]),ie([])):n==null||n("")},kt=ce=>{ce.key==="Escape"?ee():(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),q())};return y.useEffect(()=>{if(!S)return;const ce=ye=>{var ft,yt;const Ce=ye.target;(ft=ne.current)!=null&&ft.contains(Ce)||(yt=pe.current)!=null&&yt.contains(Ce)||ee()};return document.addEventListener("mousedown",ce),()=>document.removeEventListener("mousedown",ce)},[S,ee]),y.useEffect(()=>{if(!S)return;const ce=Ce=>{var yt;const ft=Ce.target;ft&&((yt=pe.current)!=null&&yt.contains(ft))||ee()},ye=()=>ee();return window.addEventListener("scroll",ce,!0),window.addEventListener("resize",ye),()=>{window.removeEventListener("scroll",ce,!0),window.removeEventListener("resize",ye)}},[S,ee]),y.useEffect(()=>{S&&d&&le.current&&le.current.focus()},[S,d]),h.jsxs("div",{ref:ne,className:"relative w-full",children:[p&&h.jsxs("div",{className:"mb-1 flex justify-start -space-x-4",children:[h.jsx(bt,{variant:"underline",type:"button",onClick:Ze,disabled:a,children:"모두 선택"}),h.jsx(bt,{variant:"underline",type:"button",onClick:Ye,disabled:a,children:"해제"})]}),h.jsxs("div",{ref:oe,className:"relative",children:[h.jsx("button",{ref:O,type:"button",className:P(tm({variant:l,size:c}),"pr-8",i),onClick:q,onKeyDown:kt,disabled:a,"aria-expanded":S,"aria-haspopup":"listbox",...x,children:h.jsx("span",{className:P("flex-1 truncate text-left",!U&&!f&&"text-cms-gray-400"),children:G})}),h.jsxs("div",{className:P("absolute top-1/2 right-3 -translate-y-1/2","flex items-center gap-2","pointer-events-none",a&&"text-cms-gray-400"),children:[u&&(t||A.length>0)&&h.jsx("button",{type:"button",className:P("pointer-events-auto border-0 bg-transparent","rounded-cms-md p-1 text-cms-gray-400 transition-colors","hover:text-cms-black"),onClick:Ye,"aria-label":"선택 취소",children:h.jsx(yn,{className:"size-3"})}),h.jsx(Ri,{size:14,strokeWidth:2,className:P("transition-transform duration-200",S&&"rotate-180")})]}),S&&N&&Da.createPortal(h.jsxs("div",{ref:pe,role:"listbox","aria-multiselectable":f||void 0,className:P("fixed z-cms-overlay min-w-0 py-1","rounded-cms-xl border border-cms-gray-300","bg-cms-white shadow-lg",C?"cms-dropdown-hide":"cms-dropdown-show",s),style:{top:k?"auto":N.topAnchor,bottom:k?N.bottomAnchor:"auto",left:N.left,width:N.width,maxHeight:`${g}px`},onAnimationEnd:Z,children:[d&&h.jsx("div",{className:"border-b border-cms-gray-200 p-2",children:h.jsx(nu,{ref:le,type:"text",value:M,onChange:ce=>{K(ce.target.value),b==null||b(ce.target.value),requestAnimationFrame(()=>te())},placeholder:"검색..."})}),h.jsxs("div",{className:"relative min-h-0 flex-1",children:[h.jsx("div",{className:P("h-full overflow-hidden",d?"rounded-b-cms-xl":"rounded-cms-xl"),children:h.jsxs("div",{ref:J,className:"overflow-y-auto",style:{maxHeight:`${g}px`},onMouseEnter:ae,onMouseLeave:z,children:[F.length===0?h.jsx("div",{className:P("px-3 py-2","text-sm text-cms-gray-400","text-center"),children:M?"검색 결과가 없습니다":"옵션이 없습니다"}):F.map(ce=>{var yt;const ye=f?A.includes(ce.value):t===ce.value,Ce=!!((yt=ce.children)!=null&&yt.length),ft=(j==null?void 0:j.value)===ce.value;return h.jsx("div",{ref:Vr=>{Vr?V.current.set(ce.value,Vr):V.current.delete(ce.value)},onMouseEnter:()=>Q(ce,Ce),onMouseLeave:()=>{Ce&&z()},children:h.jsxs("button",{type:"button",role:"option","aria-selected":ye,"aria-haspopup":Ce?"menu":void 0,className:P("border-0","flex items-center justify-between gap-2","w-full px-3 py-2","text-left text-sm","transition-colors",ce.disabled?P("cursor-not-allowed bg-cms-white","text-cms-gray-400"):P("bg-cms-white text-cms-black","hover:bg-cms-gray-100","cursor-pointer"),ye&&"bg-cms-gray-150 font-medium",ft&&"bg-cms-gray-100"),onClick:()=>{Ce||we(ce)},disabled:ce.disabled,children:[v?v(ce):h.jsx("span",{className:"truncate",children:ce.label}),Ce?h.jsx(Up,{className:P("size-3 shrink-0","text-cms-gray-400")}):ye?h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"h-4 w-4 shrink-0 text-cms-black",children:h.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]})},ce.value)}),R&&h.jsx("div",{className:P("sticky bottom-0 -mt-8 flex h-8 w-full items-end","justify-center pb-1","bg-linear-to-t from-cms-white to-transparent","pointer-events-none"),children:h.jsx(Ri,{size:16,strokeWidth:2,className:P("text-cms-gray-400","animate-bounce")})})]})}),j&&(()=>{const ce=F.find(ye=>ye.value===j.value);return ce!=null&&ce.children?h.jsx("div",{role:"menu",className:P(`
|
|
29
29
|
absolute left-full z-cms-overlay ml-1 min-w-40
|
|
30
30
|
py-1
|
|
31
31
|
`,"rounded-cms-xl border border-cms-gray-300","bg-cms-white shadow-lg","cms-dropdown-show"),style:{top:j.top},onMouseEnter:()=>{ae(),L(j)},onMouseLeave:z,children:ce.children.map(ye=>{const Ce=f?A.includes(ye.value):t===ye.value;return h.jsxs("button",{type:"button",role:"menuitem","aria-selected":Ce,className:P("border-0","flex items-center justify-between gap-2","w-full px-3 py-2","text-left text-sm","transition-colors",ye.disabled?P("cursor-not-allowed bg-cms-white","text-cms-gray-400"):P("bg-cms-white text-cms-black","hover:bg-cms-gray-100","cursor-pointer"),Ce&&"bg-cms-gray-150 font-medium"),onClick:()=>we(ye),disabled:ye.disabled,children:[h.jsx("span",{className:"truncate",children:ye.label}),Ce&&h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"h-4 w-4 shrink-0 text-cms-black",children:h.jsx("path",{d:"M13.5 4.5L6 12L2.5 8.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},ye.value)})}):null})()]})]}),document.body)]})]})});nm.displayName="Dropdown";const ns=nm,om=y.forwardRef(({label:e,helperText:t,error:r,required:n,className:o,...a},i)=>h.jsxs("div",{className:P("space-y-1",o),children:[e&&h.jsxs("label",{className:"block text-sm font-medium text-cms-black",children:[e,n&&h.jsx("span",{className:"ml-1 text-cms-red-500",children:"*"})]}),h.jsx(ns,{ref:i,...a,className:P(r&&"border-cms-red-500 focus:ring-cms-red-500")}),(t||r)&&h.jsx("p",{className:P("text-xs",r?"text-cms-red-500":"text-cms-gray-400"),children:r||t})]}));om.displayName="Select";const am=y.forwardRef(({options:e,loading:t=!1,createable:r=!1,onCreateOption:n,...o},a)=>{const[i]=y.useState(""),s=e.filter(g=>g.label.toLowerCase().includes(i.toLowerCase())),l=s.some(g=>g.label.toLowerCase()===i.toLowerCase()),c=[...s,...r&&i&&!l?[{value:`__create__${i}`,label:`"${i}" 생성`,disabled:!1}]:[]],d=g=>{var m;if(g.startsWith("__create__")){const v=g.replace("__create__","");n==null||n(v)}else(m=o.onValueChange)==null||m.call(o,g)},{multiple:u,selectAll:f,...p}=o;return u===!0?h.jsx(ns,{...p,ref:a,options:c,searchable:!0,multiple:!0,selectAll:f,dropdownClassName:P(t&&"opacity-75",o.dropdownClassName),onValueChange:d}):h.jsx(ns,{...p,ref:a,options:c,searchable:!0,dropdownClassName:P(t&&"opacity-75",o.dropdownClassName),onValueChange:d})});am.displayName="Combobox";function Se(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function im(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sm(...e){return t=>{let r=!1;const n=e.map(o=>{const a=im(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():im(e[o],null)}}}}function We(...e){return w.useCallback(sm(...e),e)}function eM(e,t){const r=w.createContext(t),n=a=>{const{children:i,...s}=a,l=w.useMemo(()=>s,Object.values(s));return h.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){const i=w.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function At(e,t=[]){let r=[];function n(a,i){const s=w.createContext(i),l=r.length;r=[...r,i];const c=u=>{var b;const{scope:f,children:p,...g}=u,m=((b=f==null?void 0:f[e])==null?void 0:b[l])||s,v=w.useMemo(()=>g,Object.values(g));return h.jsx(m.Provider,{value:v,children:p})};c.displayName=a+"Provider";function d(u,f){var m;const p=((m=f==null?void 0:f[e])==null?void 0:m[l])||s,g=w.useContext(p);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[c,d]}const o=()=>{const a=r.map(i=>w.createContext(i));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,tM(o,...t)]}function tM(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((s,{useScope:l,scopeName:c})=>{const u=l(a)[`__scope${c}`];return{...s,...u}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function La(e){const t=rM(e),r=w.forwardRef((n,o)=>{const{children:a,...i}=n,s=w.Children.toArray(a),l=s.find(oM);if(l){const c=l.props.children,d=s.map(u=>u===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:u);return h.jsx(t,{...i,ref:o,children:w.isValidElement(c)?w.cloneElement(c,void 0,d):null})}return h.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function rM(e){const t=w.forwardRef((r,n)=>{const{children:o,...a}=r;if(w.isValidElement(o)){const i=iM(o),s=aM(a,o.props);return o.type!==w.Fragment&&(s.ref=n?sm(n,i):i),w.cloneElement(o,s)}return w.Children.count(o)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lm=Symbol("radix.slottable");function nM(e){const t=({children:r})=>h.jsx(h.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=lm,t}function oM(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lm}function aM(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function iM(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var sM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xe=sM.reduce((e,t)=>{const r=La(`Primitive.${t}`),n=w.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lM(e,t){e&&Ap.flushSync(()=>e.dispatchEvent(t))}function Bn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function cM(e,t=globalThis==null?void 0:globalThis.document){const r=Bn(e);w.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var uM="DismissableLayer",ou="dismissableLayer.update",dM="dismissableLayer.pointerDownOutside",fM="dismissableLayer.focusOutside",cm,um=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=w.useContext(um),[d,u]=w.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),g=We(t,_=>u(_)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),x=d?m.indexOf(d):-1,O=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,E=mM(_=>{const k=_.target,D=[...c.branches].some(N=>N.contains(k));!S||D||(o==null||o(_),i==null||i(_),_.defaultPrevented||s==null||s())},f),C=vM(_=>{const k=_.target;[...c.branches].some(N=>N.contains(k))||(a==null||a(_),i==null||i(_),_.defaultPrevented||s==null||s())},f);return cM(_=>{x===c.layers.size-1&&(n==null||n(_),!_.defaultPrevented&&s&&(_.preventDefault(),s()))},f),w.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(cm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),dm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=cm)}},[d,f,r,c]),w.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),dm())},[d,c]),w.useEffect(()=>{const _=()=>p({});return document.addEventListener(ou,_),()=>document.removeEventListener(ou,_)},[]),h.jsx(xe.div,{...l,ref:g,style:{pointerEvents:O?S?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,E.onPointerDownCapture)})});os.displayName=uM;var hM="DismissableLayerBranch",pM=w.forwardRef((e,t)=>{const r=w.useContext(um),n=w.useRef(null),o=We(t,n);return w.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),h.jsx(xe.div,{...e,ref:o})});pM.displayName=hM;function mM(e,t=globalThis==null?void 0:globalThis.document){const r=Bn(e),n=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){fm(dM,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function vM(e,t=globalThis==null?void 0:globalThis.document){const r=Bn(e),n=w.useRef(!1);return w.useEffect(()=>{const o=a=>{a.target&&!n.current&&fm(fM,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function dm(){const e=new CustomEvent(ou);document.dispatchEvent(e)}function fm(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?lM(o,a):o.dispatchEvent(a)}var au=0;function hm(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pm()),document.body.insertAdjacentElement("beforeend",e[1]??pm()),au++,()=>{au===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),au--}},[])}function pm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var iu="focusScope.autoFocusOnMount",su="focusScope.autoFocusOnUnmount",mm={bubbles:!1,cancelable:!0},gM="FocusScope",lu=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=w.useState(null),c=Bn(o),d=Bn(a),u=w.useRef(null),f=We(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(O){if(p.paused||!s)return;const S=O.target;s.contains(S)?u.current=S:bn(u.current,{select:!0})},v=function(O){if(p.paused||!s)return;const S=O.relatedTarget;S!==null&&(s.contains(S)||bn(u.current,{select:!0}))},b=function(O){if(document.activeElement===document.body)for(const E of O)E.removedNodes.length>0&&bn(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(b);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[n,s,p.paused]),w.useEffect(()=>{if(s){ym.add(p);const m=document.activeElement;if(!s.contains(m)){const b=new CustomEvent(iu,mm);s.addEventListener(iu,c),s.dispatchEvent(b),b.defaultPrevented||(yM(CM(vm(s)),{select:!0}),document.activeElement===m&&bn(s))}return()=>{s.removeEventListener(iu,c),setTimeout(()=>{const b=new CustomEvent(su,mm);s.addEventListener(su,d),s.dispatchEvent(b),b.defaultPrevented||bn(m??document.body,{select:!0}),s.removeEventListener(su,d),ym.remove(p)},0)}}},[s,c,d,p]);const g=w.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(v&&b){const x=m.currentTarget,[O,S]=bM(x);O&&S?!m.shiftKey&&b===S?(m.preventDefault(),r&&bn(O,{select:!0})):m.shiftKey&&b===O&&(m.preventDefault(),r&&bn(S,{select:!0})):b===x&&m.preventDefault()}},[r,n,p.paused]);return h.jsx(xe.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});lu.displayName=gM;function yM(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(bn(n,{select:t}),document.activeElement!==r)return}function bM(e){const t=vm(e),r=gm(t,e),n=gm(t.reverse(),e);return[r,n]}function vm(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gm(e,t){for(const r of e)if(!wM(r,{upTo:t}))return r}function wM(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xM(e){return e instanceof HTMLInputElement&&"select"in e}function bn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xM(e)&&t&&e.select()}}var ym=OM();function OM(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=bm(e,t),e.unshift(t)},remove(t){var r;e=bm(e,t),(r=e[0])==null||r.resume()}}}function bm(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function CM(e){return e.filter(t=>t.tagName!=="A")}var Ur=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},SM=w[" useId ".trim().toString()]||(()=>{}),EM=0;function Gr(e){const[t,r]=w.useState(SM());return Ur(()=>{r(n=>n??String(EM++))},[e]),e||(t?`radix-${t}`:"")}const _M=["top","right","bottom","left"],wn=Math.min,zt=Math.max,as=Math.round,is=Math.floor,wr=e=>({x:e,y:e}),PM={left:"right",right:"left",bottom:"top",top:"bottom"},MM={start:"end",end:"start"};function cu(e,t,r){return zt(e,wn(t,r))}function Kr(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function ko(e){return e.split("-")[1]}function uu(e){return e==="x"?"y":"x"}function du(e){return e==="y"?"height":"width"}const kM=new Set(["top","bottom"]);function xr(e){return kM.has(qr(e))?"y":"x"}function fu(e){return uu(xr(e))}function NM(e,t,r){r===void 0&&(r=!1);const n=ko(e),o=fu(e),a=du(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ss(i)),[i,ss(i)]}function AM(e){const t=ss(e);return[hu(e),t,hu(t)]}function hu(e){return e.replace(/start|end/g,t=>MM[t])}const wm=["left","right"],xm=["right","left"],DM=["top","bottom"],TM=["bottom","top"];function IM(e,t,r){switch(e){case"top":case"bottom":return r?t?xm:wm:t?wm:xm;case"left":case"right":return t?DM:TM;default:return[]}}function $M(e,t,r,n){const o=ko(e);let a=IM(qr(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(hu)))),a}function ss(e){return e.replace(/left|right|bottom|top/g,t=>PM[t])}function jM(e){return{top:0,right:0,bottom:0,left:0,...e}}function Om(e){return typeof e!="number"?jM(e):{top:e,right:e,bottom:e,left:e}}function ls(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Cm(e,t,r){let{reference:n,floating:o}=e;const a=xr(t),i=fu(t),s=du(i),l=qr(t),c=a==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(ko(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}const LM=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Cm(c,n,l),f=n,p={},g=0;for(let m=0;m<s.length;m++){const{name:v,fn:b}=s[m],{x,y:O,data:S,reset:E}=await b({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});d=x??d,u=O??u,p={...p,[v]:{...p[v],...S}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:d,y:u}=Cm(c,f,l)),m=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}};async function Ya(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Kr(t,e),g=Om(p),v=s[f?u==="floating"?"reference":"floating":u],b=ls(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(O))?await(a.getScale==null?void 0:a.getScale(O))||{x:1,y:1}:{x:1,y:1},E=ls(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:O,strategy:l}):x);return{top:(b.top-E.top+g.top)/S.y,bottom:(E.bottom-b.bottom+g.bottom)/S.y,left:(b.left-E.left+g.left)/S.x,right:(E.right-b.right+g.right)/S.x}}const YM=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Kr(e,t)||{};if(c==null)return{};const u=Om(d),f={x:r,y:n},p=fu(o),g=du(p),m=await i.getDimensions(c),v=p==="y",b=v?"top":"left",x=v?"bottom":"right",O=v?"clientHeight":"clientWidth",S=a.reference[g]+a.reference[p]-f[p]-a.floating[g],E=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let _=C?C[O]:0;(!_||!await(i.isElement==null?void 0:i.isElement(C)))&&(_=s.floating[O]||a.floating[g]);const k=S/2-E/2,D=_/2-m[g]/2-1,N=wn(u[b],D),T=wn(u[x],D),M=N,K=_-m[g]-T,I=_/2-m[g]/2+k,$=cu(M,I,K),A=!l.arrow&&ko(o)!=null&&I!==$&&a.reference[g]/2-(I<M?N:T)-m[g]/2<0,j=A?I<M?I-M:I-K:0;return{[p]:f[p]+j,data:{[p]:$,centerOffset:I-$-j,...A&&{alignmentOffset:j}},reset:A}}}),zM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...v}=Kr(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=qr(o),x=xr(s),O=qr(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(O||!m?[ss(s)]:AM(s)),C=g!=="none";!f&&C&&E.push(...$M(s,m,g,S));const _=[s,...E],k=await Ya(t,v),D=[];let N=((n=a.flip)==null?void 0:n.overflows)||[];if(d&&D.push(k[b]),u){const I=NM(o,i,S);D.push(k[I[0]],k[I[1]])}if(N=[...N,{placement:o,overflows:D}],!D.every(I=>I<=0)){var T,M;const I=(((T=a.flip)==null?void 0:T.index)||0)+1,$=_[I];if($&&(!(u==="alignment"?x!==xr($):!1)||N.every(L=>xr(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:I,overflows:N},reset:{placement:$}};let A=(M=N.filter(j=>j.overflows[0]<=0).sort((j,L)=>j.overflows[1]-L.overflows[1])[0])==null?void 0:M.placement;if(!A)switch(p){case"bestFit":{var K;const j=(K=N.filter(L=>{if(C){const V=xr(L.placement);return V===x||V==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(V=>V>0).reduce((V,H)=>V+H,0)]).sort((L,V)=>L[1]-V[1])[0])==null?void 0:K[0];j&&(A=j);break}case"initialPlacement":A=s;break}if(o!==A)return{reset:{placement:A}}}return{}}}};function Sm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Em(e){return _M.some(t=>e[t]>=0)}const FM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Kr(e,t);switch(n){case"referenceHidden":{const a=await Ya(t,{...o,elementContext:"reference"}),i=Sm(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Em(i)}}}case"escaped":{const a=await Ya(t,{...o,altBoundary:!0}),i=Sm(a,r.floating);return{data:{escapedOffsets:i,escaped:Em(i)}}}default:return{}}}}},_m=new Set(["left","top"]);async function WM(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=qr(r),s=ko(r),l=xr(r)==="y",c=_m.has(i)?-1:1,d=a&&l?-1:1,u=Kr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*d,y:f*c}:{x:f*c,y:p*d}}const BM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await WM(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},VM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...l}=Kr(e,t),c={x:r,y:n},d=await Ya(t,l),u=xr(qr(o)),f=uu(u);let p=c[f],g=c[u];if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=p+d[v],O=p-d[b];p=cu(x,p,O)}if(i){const v=u==="y"?"top":"left",b=u==="y"?"bottom":"right",x=g+d[v],O=g-d[b];g=cu(x,g,O)}const m=s.fn({...t,[f]:p,[u]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:a,[u]:i}}}}}},HM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Kr(e,t),d={x:r,y:n},u=xr(o),f=uu(u);let p=d[f],g=d[u];const m=Kr(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const O=f==="y"?"height":"width",S=a.reference[f]-a.floating[O]+v.mainAxis,E=a.reference[f]+a.reference[O]-v.mainAxis;p<S?p=S:p>E&&(p=E)}if(c){var b,x;const O=f==="y"?"width":"height",S=_m.has(qr(o)),E=a.reference[u]-a.floating[O]+(S&&((b=i.offset)==null?void 0:b[u])||0)+(S?0:v.crossAxis),C=a.reference[u]+a.reference[O]+(S?0:((x=i.offset)==null?void 0:x[u])||0)-(S?v.crossAxis:0);g<E?g=E:g>C&&(g=C)}return{[f]:p,[u]:g}}}},UM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Kr(e,t),d=await Ya(t,c),u=qr(o),f=ko(o),p=xr(o)==="y",{width:g,height:m}=a.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,v=f==="end"?"top":"bottom");const x=m-d.top-d.bottom,O=g-d.left-d.right,S=wn(m-d[v],x),E=wn(g-d[b],O),C=!t.middlewareData.shift;let _=S,k=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(k=O),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(_=x),C&&!f){const N=zt(d.left,0),T=zt(d.right,0),M=zt(d.top,0),K=zt(d.bottom,0);p?k=g-2*(N!==0||T!==0?N+T:zt(d.left,d.right)):_=m-2*(M!==0||K!==0?M+K:zt(d.top,d.bottom))}await l({...t,availableWidth:k,availableHeight:_});const D=await i.getDimensions(s.floating);return g!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function cs(){return typeof window<"u"}function No(e){return Pm(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(Pm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pm(e){return cs()?e instanceof Node||e instanceof Ft(e).Node:!1}function or(e){return cs()?e instanceof Element||e instanceof Ft(e).Element:!1}function Cr(e){return cs()?e instanceof HTMLElement||e instanceof Ft(e).HTMLElement:!1}function Mm(e){return!cs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot}const GM=new Set(["inline","contents"]);function za(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!GM.has(o)}const KM=new Set(["table","td","th"]);function qM(e){return KM.has(No(e))}const XM=[":popover-open",":modal"];function us(e){return XM.some(t=>{try{return e.matches(t)}catch{return!1}})}const ZM=["transform","translate","scale","rotate","perspective"],QM=["transform","translate","scale","rotate","perspective","filter"],JM=["paint","layout","strict","content"];function pu(e){const t=mu(),r=or(e)?ar(e):e;return ZM.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||QM.some(n=>(r.willChange||"").includes(n))||JM.some(n=>(r.contain||"").includes(n))}function RM(e){let t=xn(e);for(;Cr(t)&&!Ao(t);){if(pu(t))return t;if(us(t))return null;t=xn(t)}return null}function mu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ek=new Set(["html","body","#document"]);function Ao(e){return ek.has(No(e))}function ar(e){return Ft(e).getComputedStyle(e)}function ds(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xn(e){if(No(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mm(e)&&e.host||Or(e);return Mm(t)?t.host:t}function km(e){const t=xn(e);return Ao(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cr(t)&&za(t)?t:km(t)}function Fa(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=km(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=Ft(o);if(a){const s=vu(i);return t.concat(i,i.visualViewport||[],za(o)?o:[],s&&r?Fa(s):[])}return t.concat(o,Fa(o,[],r))}function vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Nm(e){const t=ar(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Cr(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=as(r)!==a||as(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function gu(e){return or(e)?e:e.contextElement}function Do(e){const t=gu(e);if(!Cr(t))return wr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Nm(t);let i=(a?as(r.width):r.width)/n,s=(a?as(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const tk=wr(0);function Am(e){const t=Ft(e);return!mu()||!t.visualViewport?tk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rk(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ft(e)?!1:t}function Vn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=gu(e);let i=wr(1);t&&(n?or(n)&&(i=Do(n)):i=Do(e));const s=rk(a,r,n)?Am(a):wr(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const f=Ft(a),p=n&&or(n)?Ft(n):n;let g=f,m=vu(g);for(;m&&n&&p!==g;){const v=Do(m),b=m.getBoundingClientRect(),x=ar(m),O=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,S=b.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,u*=v.y,l+=O,c+=S,g=Ft(m),m=vu(g)}}return ls({width:d,height:u,x:l,y:c})}function fs(e,t){const r=ds(e).scrollLeft;return t?t.left+r:Vn(Or(e)).left+r}function Dm(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-fs(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function nk(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Or(n),s=t?us(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=wr(1);const d=wr(0),u=Cr(n);if((u||!u&&!a)&&((No(n)!=="body"||za(i))&&(l=ds(n)),Cr(n))){const p=Vn(n);c=Do(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}const f=i&&!u&&!a?Dm(i,l):wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function ok(e){return Array.from(e.getClientRects())}function ak(e){const t=Or(e),r=ds(e),n=e.ownerDocument.body,o=zt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=zt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+fs(e);const s=-r.scrollTop;return ar(n).direction==="rtl"&&(i+=zt(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Tm=25;function ik(e,t){const r=Ft(e),n=Or(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const d=mu();(!d||d&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=fs(n);if(c<=0){const d=n.ownerDocument,u=d.body,f=getComputedStyle(u),p=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-p);g<=Tm&&(a-=g)}else c<=Tm&&(a+=c);return{width:a,height:i,x:s,y:l}}const sk=new Set(["absolute","fixed"]);function lk(e,t){const r=Vn(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Cr(e)?Do(e):wr(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function Im(e,t,r){let n;if(t==="viewport")n=ik(e,r);else if(t==="document")n=ak(Or(e));else if(or(t))n=lk(t,r);else{const o=Am(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ls(n)}function $m(e,t){const r=xn(e);return r===t||!or(r)||Ao(r)?!1:ar(r).position==="fixed"||$m(r,t)}function ck(e,t){const r=t.get(e);if(r)return r;let n=Fa(e,[],!1).filter(s=>or(s)&&No(s)!=="body"),o=null;const a=ar(e).position==="fixed";let i=a?xn(e):e;for(;or(i)&&!Ao(i);){const s=ar(i),l=pu(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&sk.has(o.position)||za(i)&&!l&&$m(e,i))?n=n.filter(d=>d!==i):o=s,i=xn(i)}return t.set(e,n),n}function uk(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?us(t)?[]:ck(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,d)=>{const u=Im(t,d,o);return c.top=zt(u.top,c.top),c.right=wn(u.right,c.right),c.bottom=wn(u.bottom,c.bottom),c.left=zt(u.left,c.left),c},Im(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dk(e){const{width:t,height:r}=Nm(e);return{width:t,height:r}}function fk(e,t,r){const n=Cr(t),o=Or(t),a=r==="fixed",i=Vn(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=wr(0);function c(){l.x=fs(o)}if(n||!n&&!a)if((No(t)!=="body"||za(o))&&(s=ds(t)),n){const p=Vn(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();a&&!n&&o&&c();const d=o&&!n&&!a?Dm(o,s):wr(0),u=i.left+s.scrollLeft-l.x-d.x,f=i.top+s.scrollTop-l.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function yu(e){return ar(e).position==="static"}function jm(e,t){if(!Cr(e)||ar(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Or(e)===r&&(r=r.ownerDocument.body),r}function Lm(e,t){const r=Ft(e);if(us(e))return r;if(!Cr(e)){let o=xn(e);for(;o&&!Ao(o);){if(or(o)&&!yu(o))return o;o=xn(o)}return r}let n=jm(e,t);for(;n&&qM(n)&&yu(n);)n=jm(n,t);return n&&Ao(n)&&yu(n)&&!pu(n)?r:n||RM(e)||r}const hk=async function(e){const t=this.getOffsetParent||Lm,r=this.getDimensions,n=await r(e.floating);return{reference:fk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function pk(e){return ar(e).direction==="rtl"}const mk={convertOffsetParentRelativeRectToViewportRelativeRect:nk,getDocumentElement:Or,getClippingRect:uk,getOffsetParent:Lm,getElementRects:hk,getClientRects:ok,getDimensions:dk,getScale:Do,isElement:or,isRTL:pk};function Ym(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vk(e,t){let r=null,n;const o=Or(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(s||t(),!f||!p)return;const g=is(u),m=is(o.clientWidth-(d+f)),v=is(o.clientHeight-(u+p)),b=is(d),O={rootMargin:-g+"px "+-m+"px "+-v+"px "+-b+"px",threshold:zt(0,wn(1,l))||1};let S=!0;function E(C){const _=C[0].intersectionRatio;if(_!==l){if(!S)return i();_?i(!1,_):n=setTimeout(()=>{i(!1,1e-7)},1e3)}_===1&&!Ym(c,e.getBoundingClientRect())&&i(),S=!1}try{r=new IntersectionObserver(E,{...O,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,O)}r.observe(e)}return i(!0),a}function gk(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=gu(e),d=o||a?[...c?Fa(c):[],...Fa(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const u=c&&s?vk(c,r):null;let f=-1,p=null;i&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var O;(O=p)==null||O.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let g,m=l?Vn(e):null;l&&v();function v(){const b=Vn(e);m&&!Ym(m,b)&&r(),m=b,g=requestAnimationFrame(v)}return r(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),u==null||u(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const yk=BM,bk=VM,wk=zM,xk=UM,Ok=FM,zm=YM,Ck=HM,Sk=(e,t,r)=>{const n=new Map,o={platform:mk,...r},a={...o.platform,_c:n};return LM(e,t,{...o,platform:a})};var Ek=typeof document<"u",_k=function(){},hs=Ek?y.useLayoutEffect:_k;function ps(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ps(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ps(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Fm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wm(e,t){const r=Fm(e);return Math.round(t*r)/r}function bu(e){const t=w.useRef(e);return hs(()=>{t.current=e}),t}function Pk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(n);ps(f,n)||p(n);const[g,m]=w.useState(null),[v,b]=w.useState(null),x=w.useCallback(L=>{L!==C.current&&(C.current=L,m(L))},[]),O=w.useCallback(L=>{L!==_.current&&(_.current=L,b(L))},[]),S=a||g,E=i||v,C=w.useRef(null),_=w.useRef(null),k=w.useRef(d),D=l!=null,N=bu(l),T=bu(o),M=bu(c),K=w.useCallback(()=>{if(!C.current||!_.current)return;const L={placement:t,strategy:r,middleware:f};T.current&&(L.platform=T.current),Sk(C.current,_.current,L).then(V=>{const H={...V,isPositioned:M.current!==!1};I.current&&!ps(k.current,H)&&(k.current=H,Ap.flushSync(()=>{u(H)}))})},[f,t,r,T,M]);hs(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,u(L=>({...L,isPositioned:!1})))},[c]);const I=w.useRef(!1);hs(()=>(I.current=!0,()=>{I.current=!1}),[]),hs(()=>{if(S&&(C.current=S),E&&(_.current=E),S&&E){if(N.current)return N.current(S,E,K);K()}},[S,E,K,N,D]);const $=w.useMemo(()=>({reference:C,floating:_,setReference:x,setFloating:O}),[x,O]),A=w.useMemo(()=>({reference:S,floating:E}),[S,E]),j=w.useMemo(()=>{const L={position:r,left:0,top:0};if(!A.floating)return L;const V=Wm(A.floating,d.x),H=Wm(A.floating,d.y);return s?{...L,transform:"translate("+V+"px, "+H+"px)",...Fm(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:H}},[r,s,A.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:K,refs:$,elements:A,floatingStyles:j}),[d,K,$,A,j])}const Mk=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?zm({element:n.current,padding:o}).fn(r):{}:n?zm({element:n,padding:o}).fn(r):{}}}},kk=(e,t)=>({...yk(e),options:[e,t]}),Nk=(e,t)=>({...bk(e),options:[e,t]}),Ak=(e,t)=>({...Ck(e),options:[e,t]}),Dk=(e,t)=>({...wk(e),options:[e,t]}),Tk=(e,t)=>({...xk(e),options:[e,t]}),Ik=(e,t)=>({...Ok(e),options:[e,t]}),$k=(e,t)=>({...Mk(e),options:[e,t]});var jk="Arrow",Bm=w.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return h.jsx(xe.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Bm.displayName=jk;var Lk=Bm;function ms(e){const[t,r]=w.useState(void 0);return Ur(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var wu="Popper",[Vm,vs]=At(wu),[Yk,Hm]=Vm(wu),Um=e=>{const{__scopePopper:t,children:r}=e,[n,o]=w.useState(null);return h.jsx(Yk,{scope:t,anchor:n,onAnchorChange:o,children:r})};Um.displayName=wu;var Gm="PopperAnchor",Km=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Hm(Gm,r),i=w.useRef(null),s=We(t,i),l=w.useRef(null);return w.useEffect(()=>{const c=l.current;l.current=(n==null?void 0:n.current)||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:h.jsx(xe.div,{...o,ref:s})});Km.displayName=Gm;var xu="PopperContent",[zk,Fk]=Vm(xu),qm=w.forwardRef((e,t)=>{var pe,le,B,U,G,F;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,v=Hm(xu,r),[b,x]=w.useState(null),O=We(t,ee=>x(ee)),[S,E]=w.useState(null),C=ms(S),_=(C==null?void 0:C.width)??0,k=(C==null?void 0:C.height)??0,D=n+(a!=="center"?"-"+a:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(c)?c:[c],M=T.length>0,K={padding:N,boundary:T.filter(Bk),altBoundary:M},{refs:I,floatingStyles:$,placement:A,isPositioned:j,middlewareData:L}=Pk({strategy:"fixed",placement:D,whileElementsMounted:(...ee)=>gk(...ee,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[kk({mainAxis:o+k,alignmentAxis:i}),l&&Nk({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Ak():void 0,...K}),l&&Dk({...K}),Tk({...K,apply:({elements:ee,rects:q,availableWidth:Z,availableHeight:ae})=>{const{width:z,height:Q}=q.reference,ie=ee.floating.style;ie.setProperty("--radix-popper-available-width",`${Z}px`),ie.setProperty("--radix-popper-available-height",`${ae}px`),ie.setProperty("--radix-popper-anchor-width",`${z}px`),ie.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),S&&$k({element:S,padding:s}),Vk({arrowWidth:_,arrowHeight:k}),f&&Ik({strategy:"referenceHidden",...K})]}),[V,H]=Qm(A),J=Bn(g);Ur(()=>{j&&(J==null||J())},[j,J]);const re=(pe=L.arrow)==null?void 0:pe.x,R=(le=L.arrow)==null?void 0:le.y,te=((B=L.arrow)==null?void 0:B.centerOffset)!==0,[ne,oe]=w.useState();return Ur(()=>{b&&oe(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:j?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(U=L.transformOrigin)==null?void 0:U.x,(G=L.transformOrigin)==null?void 0:G.y].join(" "),...((F=L.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(zk,{scope:r,placedSide:V,onArrowChange:E,arrowX:re,arrowY:R,shouldHideArrow:te,children:h.jsx(xe.div,{"data-side":V,"data-align":H,...m,ref:O,style:{...m.style,animation:j?void 0:"none"}})})})});qm.displayName=xu;var Xm="PopperArrow",Wk={top:"bottom",right:"left",bottom:"top",left:"right"},Zm=w.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Fk(Xm,n),i=Wk[a.placedSide];return h.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:h.jsx(Lk,{...o,ref:r,style:{...o.style,display:"block"}})})});Zm.displayName=Xm;function Bk(e){return e!==null}var Vk=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:r,rects:n,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=Qm(r),u={start:"0%",center:"50%",end:"100%"}[d],f=(((b=o.arrow)==null?void 0:b.x)??0)+s/2,p=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=i?u:`${f}px`,m=`${-l}px`):c==="top"?(g=i?u:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=i?u:`${p}px`):c==="left"&&(g=`${n.floating.width+l}px`,m=i?u:`${p}px`),{data:{x:g,y:m}}}});function Qm(e){const[t,r="center"]=e.split("-");return[t,r]}var Jm=Um,Ou=Km,Rm=qm,ev=Zm,Hk="Portal",gs=w.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[o,a]=w.useState(!1);Ur(()=>a(!0),[]);const i=r||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Da.createPortal(h.jsx(xe.div,{...n,ref:t}),i):null});gs.displayName=Hk;function Uk(e,t){return w.useReducer((r,n)=>t[r][n]??r,e)}var qt=e=>{const{present:t,children:r}=e,n=Gk(t),o=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),a=We(n.ref,Kk(o));return typeof r=="function"||n.isPresent?w.cloneElement(o,{ref:a}):null};qt.displayName="Presence";function Gk(e){const[t,r]=w.useState(),n=w.useRef(null),o=w.useRef(e),a=w.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Uk(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=ys(n.current);a.current=s==="mounted"?c:"none"},[s]),Ur(()=>{const c=n.current,d=o.current;if(d!==e){const f=a.current,p=ys(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ur(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=p=>{const m=ys(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=ys(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function ys(e){return(e==null?void 0:e.animationName)||"none"}function Kk(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qk=w[" useInsertionEffect ".trim().toString()]||Ur;function Dt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Xk({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const d=w.useRef(e!==void 0);w.useEffect(()=>{const u=d.current;u!==s&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const c=w.useCallback(d=>{var u;if(s){const f=Zk(d)?d(e):d;f!==e&&((u=i.current)==null||u.call(i,f))}else a(d)},[s,e,a,i]);return[l,c]}function Xk({defaultProp:e,onChange:t}){const[r,n]=w.useState(e),o=w.useRef(r),a=w.useRef(t);return qk(()=>{a.current=t},[t]),w.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Zk(e){return typeof e=="function"}var Qk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},To=new WeakMap,bs=new WeakMap,ws={},Cu=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},Jk=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=tv(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Rk=function(e,t,r,n){var o=Jk(t,Array.isArray(e)?e:[e]);ws[r]||(ws[r]=new WeakMap);var a=ws[r],i=[],s=new Set,l=new Set(o),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};o.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(f){if(s.has(f))d(f);else try{var p=f.getAttribute(n),g=p!==null&&p!=="false",m=(To.get(f)||0)+1,v=(a.get(f)||0)+1;To.set(f,m),a.set(f,v),i.push(f),m===1&&g&&bs.set(f,!0),v===1&&f.setAttribute(r,"true"),g||f.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(t),s.clear(),Cu++,function(){i.forEach(function(u){var f=To.get(u)-1,p=a.get(u)-1;To.set(u,f),a.set(u,p),f||(bs.has(u)||u.removeAttribute(n),bs.delete(u)),p||u.removeAttribute(r)}),Cu--,Cu||(To=new WeakMap,To=new WeakMap,bs=new WeakMap,ws={})}},rv=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Qk(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Rk(n,o,r,"aria-hidden")):function(){return null}},Sr=function(){return Sr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Sr.apply(this,arguments)};function nv(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function eN(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var xs="right-scroll-bar-position",Os="width-before-scroll-bar",tN="with-scroll-bars-hidden",rN="--removed-body-scroll-bar-size";function Su(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nN(e,t){var r=y.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var oN=typeof window<"u"?w.useLayoutEffect:w.useEffect,ov=new WeakMap;function aN(e,t){var r=nN(null,function(n){return e.forEach(function(o){return Su(o,n)})});return oN(function(){var n=ov.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||Su(s,null)}),a.forEach(function(s){o.has(s)||Su(s,i)})}ov.set(r,e)},[e]),r}function iN(e){return e}function sN(e,t){t===void 0&&(t=iN);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var d=i;i=[],d.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),r}}}};return o}function lN(e){e===void 0&&(e={});var t=sN(null);return t.options=Sr({async:!0,ssr:!1},e),t}var av=function(e){var t=e.sideCar,r=nv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Sr({},r))};av.isSideCarExport=!0;function cN(e,t){return e.useMedium(t),av}var iv=lN(),Eu=function(){},Cs=w.forwardRef(function(e,t){var r=w.useRef(null),n=w.useState({onScrollCapture:Eu,onWheelCapture:Eu,onTouchMoveCapture:Eu}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,O=e.gapMode,S=nv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,C=aN([r,t]),_=Sr(Sr({},S),o);return w.createElement(w.Fragment,null,d&&w.createElement(E,{sideCar:iv,removeScrollBar:c,shards:u,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:O}),i?w.cloneElement(w.Children.only(s),Sr(Sr({},_),{ref:C})):w.createElement(x,Sr({},_,{className:l,ref:C}),s))});Cs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Cs.classNames={fullWidth:Os,zeroRight:xs};var uN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dN(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uN();return t&&e.setAttribute("nonce",t),e}function fN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hN(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var pN=function(){var e=0,t=null;return{add:function(r){e==0&&(t=dN())&&(fN(t,r),hN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mN=function(){var e=pN();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},sv=function(){var e=mN(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},vN={left:0,top:0,right:0,gap:0},_u=function(e){return parseInt(e||"",10)||0},gN=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[_u(r),_u(n),_u(o)]},yN=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vN;var t=gN(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},bN=sv(),Io="data-scroll-locked",wN=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
shadow-[0_12px_24px_rgba(15,20,25,0.08),0_4px_8px_rgba(15,20,25,0.04)]
|
|
140
140
|
`,"data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2"),children:[h.jsx("div",{className:"p-4",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("div",{className:"flex flex-col",children:[h.jsx("div",{className:P("text-center text-xs text-cms-gray-500","mb-2","font-medium"),children:o==="24h"?"시":"Hour"}),h.jsx("div",{ref:K,className:P("h-44 w-14 overflow-y-auto p-0.5","border border-cms-gray-200","cms-no-scrollbar rounded-cms-sm"),children:H.map(B=>h.jsx("button",{type:"button","data-value":B,onClick:()=>C(B),className:P("cursor-pointer border-0","h-8 w-full text-[13px] transition-colors","hover:bg-cms-gray-100",E===B?"bg-cms-gray-900 font-semibold text-cms-white":"bg-cms-white text-cms-gray-800"),"aria-label":`${B}${ne}`,"aria-selected":E===B,children:o==="24h"?B.toString().padStart(2,"0"):B},B))})]}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("div",{className:P("mb-2","text-center text-xs font-medium text-cms-gray-500"),children:o==="24h"?"분":"Min"}),h.jsx("div",{ref:I,className:P("h-44 w-14 overflow-y-auto p-0.5","border border-cms-gray-200","cms-no-scrollbar rounded-cms-sm"),children:J.map(B=>h.jsx("button",{type:"button","data-value":B,onClick:()=>k(B),className:P("cursor-pointer border-0","h-8 w-full text-[13px] transition-colors","hover:bg-cms-gray-100",_===B?"bg-cms-gray-900 font-semibold text-cms-white":"bg-cms-white text-cms-gray-800"),"aria-label":`${B}${oe}`,"aria-selected":_===B,children:B.toString().padStart(2,"0")},B))})]}),o==="12h"&&h.jsxs("div",{className:"flex flex-col",children:[h.jsx("div",{className:P("text-center text-xs text-cms-gray-500","mb-2","font-medium"),children:"Period"}),h.jsxs("div",{className:"flex w-16 flex-col gap-1",children:[h.jsx("button",{type:"button",onClick:()=>N("AM"),className:P("cursor-pointer border-0","h-9 rounded-cms-sm text-[13px] transition-colors","hover:bg-cms-gray-100",D==="AM"?"bg-cms-gray-900 font-semibold text-cms-white":"bg-cms-white text-cms-gray-800"),"aria-label":"AM","aria-selected":D==="AM",children:"AM"}),h.jsx("button",{type:"button",onClick:()=>N("PM"),className:P("cursor-pointer border-0","h-9 rounded-cms-sm text-[13px] transition-colors","hover:bg-cms-gray-100",D==="PM"?"bg-cms-gray-900 font-semibold text-cms-white":"bg-cms-white text-cms-gray-800"),"aria-label":"PM","aria-selected":D==="PM",children:"PM"})]})]})]})}),h.jsx("div",{className:P("flex items-end justify-end px-3.5 pb-3.5","border-t border-cms-gray-150 pt-2.5"),children:h.jsxs("div",{className:"flex gap-1.5",children:[h.jsx("button",{type:"button",onClick:le,className:P("h-7 cursor-pointer rounded-cms-sm px-2.5","text-[12px] font-semibold text-cms-gray-850","border border-cms-gray-250 bg-cms-white","transition-colors duration-150","hover:border-cms-gray-350 hover:bg-cms-gray-50"),children:"취소"}),h.jsx("button",{type:"button",onClick:pe,disabled:E===null||_===null,className:P("cursor-pointer border-0","h-7 rounded-cms-sm bg-cms-gray-850 px-2.5","text-[12px] font-semibold text-cms-white","hover:bg-cms-gray-750","disabled:opacity-45","disabled:cursor-not-allowed","transition-colors duration-150"),children:"적용"})]})})]})})]}),(l||s)&&h.jsx("div",{children:i&&s?h.jsx("p",{id:v,className:"text-xs text-cms-red-500",children:s}):l&&h.jsx("p",{id:b,className:"text-xs text-cms-gray-500",children:l})})]})});Zg.displayName="TimePicker";function Zu(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ds="Switch",[TI]=At(Ds),[II,$I]=TI(Ds),Qg=w.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:d,...u}=e,[f,p]=w.useState(null),g=We(t,O=>p(O)),m=w.useRef(!1),v=f?d||!!f.closest("form"):!0,[b,x]=Dt({prop:o,defaultProp:a??!1,onChange:c,caller:Ds});return h.jsxs(II,{scope:r,checked:b,disabled:s,children:[h.jsx(xe.button,{type:"button",role:"switch","aria-checked":b,"aria-required":i,"data-state":ty(b),"data-disabled":s?"":void 0,disabled:s,value:l,...u,ref:g,onClick:Se(e.onClick,O=>{x(S=>!S),v&&(m.current=O.isPropagationStopped(),m.current||O.stopPropagation())})}),v&&h.jsx(ey,{control:f,bubbles:!m.current,name:n,value:l,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Qg.displayName=Ds;var Jg="SwitchThumb",Rg=w.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=$I(Jg,r);return h.jsx(xe.span,{"data-state":ty(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Rg.displayName=Jg;var jI="SwitchBubbleInput",ey=w.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=w.useRef(null),s=We(i,a),l=Zu(r),c=ms(t);return w.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==r&&p){const g=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(g)}},[l,r,n]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ey.displayName=jI;function ty(e){return e?"checked":"unchecked"}var ry=Qg,LI=Rg;const Ja=40,ny=3,YI=26,zI=e=>{if(typeof e=="number")return`${Math.max(e,Ja)}px`;if(typeof e=="string"){const t=e.trim();return t?Number.isNaN(Number(t))?t:`${Math.max(Number(t),Ja)}px`:`${Ja}px`}return`${Ja}px`},FI=Ee(P("peer group relative inline-flex items-center transition-colors","box-border rounded-full border-2 border-transparent","h-6 w-(--switch-track-width-safe) shrink-0 px-px py-0.5","cursor-pointer","focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50","data-[state=unchecked]:bg-cms-gray-900/18","shadow-[inset_0_1px_1.5px_rgba(15,20,25,0.08)]"),{variants:{variant:{default:"data-[state=checked]:bg-cms-gray-900/95",primary:"data-[state=checked]:bg-cms-primary-200",green:"data-[state=checked]:bg-cms-green-500",black:"data-[state=checked]:bg-cms-black",blue:"data-[state=checked]:bg-cms-blue-700",red:"data-[state=checked]:bg-cms-red-400"}},defaultVariants:{variant:"default"}}),oy=y.forwardRef(({className:e,variant:t,width:r,checkedLabel:n,uncheckedLabel:o,style:a,...i},s)=>{const l=zI(r),c=`max(var(--switch-track-width), ${Ja}px)`,d=`calc(var(--switch-track-width-safe) - ${YI}px)`,u={...a,"--switch-track-width":l,"--switch-track-width-safe":c,"--switch-thumb-translate":d,"--switch-label-width":d};return h.jsxs(ry,{className:P(FI({variant:t}),e),...i,style:u,ref:s,children:[(n||o)&&h.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",children:[h.jsx("span",{className:P("absolute inset-y-0 flex w-(--switch-label-width) items-center","justify-center overflow-hidden px-1","text-[10px] leading-none font-medium text-ellipsis","whitespace-nowrap text-cms-white","invisible opacity-0 transition-opacity","group-data-[state=checked]:visible","group-data-[state=checked]:opacity-100"),style:{left:`${ny}px`},children:n}),h.jsx("span",{className:P("absolute inset-y-0 flex w-(--switch-label-width) items-center","justify-center overflow-hidden px-1","text-[10px] leading-none font-medium text-ellipsis","visible whitespace-nowrap text-cms-gray-700 opacity-100","transition-opacity","group-data-[state=checked]:invisible","group-data-[state=checked]:opacity-0"),style:{right:`${ny}px`},children:o})]}),h.jsx(LI,{className:P("pointer-events-none absolute top-1/2 left-px z-10 block","rounded-full ring-0","bg-[linear-gradient(180deg,#ffffff_0%,#f6f7f8_100%)]",`
|
|
141
141
|
shadow-[inset_0_1px_0_rgba(255,255,255,0.9),0_1px_2px_rgba(15,20,25,0.22),0_0_0_0.5px_rgba(15,20,25,0.06)]
|
|
142
|
-
`,"size-5","cursor-pointer","-translate-y-1/2","data-[state=unchecked]:translate-x-0","data-[state=checked]:translate-x-(--switch-thumb-translate)","transition-transform")})]})});oy.displayName=ry.displayName;function ay(e){const t=e+"CollectionProvider",[r,n]=At(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:b}=m,x=y.useRef(null),O=y.useRef(new Map).current;return h.jsx(o,{scope:v,itemMap:O,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",l=La(s),c=y.forwardRef((m,v)=>{const{scope:b,children:x}=m,O=a(s,b),S=We(v,O.collectionRef);return h.jsx(l,{ref:S,children:x})});c.displayName=s;const d=e+"CollectionItemSlot",u="data-radix-collection-item",f=La(d),p=y.forwardRef((m,v)=>{const{scope:b,children:x,...O}=m,S=y.useRef(null),E=We(v,S),C=a(d,b);return y.useEffect(()=>(C.itemMap.set(S,{ref:S,...O}),()=>void C.itemMap.delete(S))),h.jsx(f,{[u]:"",ref:E,children:x})});p.displayName=d;function g(m){const v=a(e+"CollectionConsumer",m);return y.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const O=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((C,_)=>O.indexOf(C.ref.current)-O.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},g,n]}var WI=w.createContext(void 0);function Ra(e){const t=w.useContext(WI);return e||t||"ltr"}var Qu="rovingFocusGroup.onEntryFocus",BI={bubbles:!1,cancelable:!0},ei="RovingFocusGroup",[Ju,iy,VI]=ay(ei),[HI,Jo]=At(ei,[VI]),[UI,GI]=HI(ei),sy=w.forwardRef((e,t)=>h.jsx(Ju.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Ju.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(KI,{...e,ref:t})})}));sy.displayName=ei;var KI=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,f=w.useRef(null),p=We(t,f),g=Ra(a),[m,v]=Dt({prop:i,defaultProp:s??null,onChange:l,caller:ei}),[b,x]=w.useState(!1),O=Bn(c),S=iy(r),E=w.useRef(!1),[C,_]=w.useState(0);return w.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(Qu,O),()=>k.removeEventListener(Qu,O)},[O]),h.jsx(UI,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:m,onItemFocus:w.useCallback(k=>v(k),[v]),onItemShiftTab:w.useCallback(()=>x(!0),[]),onFocusableItemAdd:w.useCallback(()=>_(k=>k+1),[]),onFocusableItemRemove:w.useCallback(()=>_(k=>k-1),[]),children:h.jsx(xe.div,{tabIndex:b||C===0?-1:0,"data-orientation":n,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{E.current=!0}),onFocus:Se(e.onFocus,k=>{const D=!E.current;if(k.target===k.currentTarget&&D&&!b){const N=new CustomEvent(Qu,BI);if(k.currentTarget.dispatchEvent(N),!N.defaultPrevented){const T=S().filter(A=>A.focusable),M=T.find(A=>A.active),K=T.find(A=>A.id===m),$=[M,K,...T].filter(Boolean).map(A=>A.ref.current);uy($,d)}}E.current=!1}),onBlur:Se(e.onBlur,()=>x(!1))})})}),ly="RovingFocusGroupItem",cy=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Gr(),c=a||l,d=GI(ly,r),u=d.currentTabStopId===c,f=iy(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=d;return w.useEffect(()=>{if(n)return p(),()=>g()},[n,p,g]),h.jsx(Ju.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:h.jsx(xe.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Se(e.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:Se(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Se(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=ZI(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let O=f().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")O.reverse();else if(b==="prev"||b==="next"){b==="prev"&&O.reverse();const S=O.indexOf(v.currentTarget);O=d.loop?QI(O,S+1):O.slice(S+1)}setTimeout(()=>uy(O))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:m!=null}):i})})});cy.displayName=ly;var qI={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XI(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ZI(e,t,r){const n=XI(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qI[n]}function uy(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function QI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ru=sy,ed=cy,td="Radio",[JI,dy]=At(td),[RI,e5]=JI(td),fy=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:l,form:c,...d}=e,[u,f]=w.useState(null),p=We(t,v=>f(v)),g=w.useRef(!1),m=u?c||!!u.closest("form"):!0;return h.jsxs(RI,{scope:r,checked:o,disabled:i,children:[h.jsx(xe.button,{type:"button",role:"radio","aria-checked":o,"data-state":vy(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:p,onClick:Se(e.onClick,v=>{o||l==null||l(),m&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),m&&h.jsx(my,{control:u,bubbles:!g.current,name:n,value:s,checked:o,required:a,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});fy.displayName=td;var hy="RadioIndicator",py=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=e5(hy,r);return h.jsx(qt,{present:n||a.checked,children:h.jsx(xe.span,{"data-state":vy(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});py.displayName=hy;var t5="RadioBubbleInput",my=w.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=w.useRef(null),s=We(i,a),l=Zu(r),c=ms(t);return w.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==r&&p){const g=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(g)}},[l,r,n]),h.jsx(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});my.displayName=t5;function vy(e){return e?"checked":"unchecked"}var r5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ts="RadioGroup",[n5]=At(Ts,[Jo,dy]),gy=Jo(),yy=dy(),[o5,a5]=n5(Ts),by=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...f}=e,p=gy(r),g=Ra(c),[m,v]=Dt({prop:a,defaultProp:o??null,onChange:u,caller:Ts});return h.jsx(o5,{scope:r,name:n,required:i,disabled:s,value:m,onValueChange:v,children:h.jsx(Ru,{asChild:!0,...p,orientation:l,dir:g,loop:d,children:h.jsx(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:g,...f,ref:t})})})});by.displayName=Ts;var wy="RadioGroupItem",xy=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=a5(wy,r),i=a.disabled||n,s=gy(r),l=yy(r),c=w.useRef(null),d=We(t,c),u=a.value===o.value,f=w.useRef(!1);return w.useEffect(()=>{const p=m=>{r5.includes(m.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),h.jsx(ed,{asChild:!0,...s,focusable:!i,active:u,children:h.jsx(fy,{disabled:i,required:a.required,checked:u,...l,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:Se(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Se(o.onFocus,()=>{var p;f.current&&((p=c.current)==null||p.click())})})})});xy.displayName=wy;var i5="RadioGroupIndicator",Oy=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=yy(r);return h.jsx(py,{...o,...n,ref:t})});Oy.displayName=i5;var Cy=by,Sy=xy,s5=Oy;const Ey=y.forwardRef(({className:e,...t},r)=>h.jsx(Cy,{className:e,...t,ref:r}));Ey.displayName=Cy.displayName;const l5=Ee(P("flex items-center justify-center","aspect-square rounded-full bg-cms-white","border-[1.5px] border-cms-gray-350","transition-colors duration-150 ease-out","focus:outline-none","focus-visible:ring-2 focus-visible:ring-cms-gray-900/15","focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-100","disabled:border-cms-gray-250 disabled:bg-cms-gray-100","cursor-pointer","hover:border-cms-gray-600"),{variants:{variant:{black:P("text-cms-gray-900","data-[state=checked]:border-cms-gray-900"),default:P("text-cms-gray-900","data-[state=checked]:border-cms-gray-900"),green:P("text-cms-green-500","data-[state=checked]:border-cms-green-500"),blue:P("text-cms-blue-600","data-[state=checked]:border-cms-blue-600"),red:P("text-cms-red-500","data-[state=checked]:border-cms-red-500")},size:{sm:"size-4",md:"size-[18px]",lg:"size-5"}},defaultVariants:{variant:"black",size:"md"}}),c5=Ee("flex aspect-square items-center justify-center rounded-full bg-current",{variants:{variant:{black:"text-cms-gray-900",default:"text-cms-gray-900",green:"text-cms-green-500",blue:"text-cms-blue-600",red:"text-cms-red-500"},size:{sm:"size-1.5",md:"size-2",lg:"size-2.5"}},defaultVariants:{variant:"black",size:"md"}}),_y=y.forwardRef(({className:e,variant:t,size:r,...n},o)=>h.jsx(Sy,{ref:o,className:P(l5({variant:t,size:r}),e),...n,children:h.jsx(s5,{className:P(c5({variant:t,size:r}))})}));_y.displayName=Sy.displayName;var Is="Collapsible",[u5,Py]=At(Is),[d5,rd]=u5(Is),My=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Dt({prop:n,defaultProp:o??!1,onChange:i,caller:Is});return h.jsx(d5,{scope:r,disabled:a,contentId:Gr(),open:l,onOpenToggle:w.useCallback(()=>c(d=>!d),[c]),children:h.jsx(xe.div,{"data-state":od(l),"data-disabled":a?"":void 0,...s,ref:t})})});My.displayName=Is;var ky="CollapsibleTrigger",Ny=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rd(ky,r);return h.jsx(xe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":od(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Se(e.onClick,o.onOpenToggle)})});Ny.displayName=ky;var nd="CollapsibleContent",Ay=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rd(nd,e.__scopeCollapsible);return h.jsx(qt,{present:r||o.open,children:({present:a})=>h.jsx(f5,{...n,ref:t,present:a})})});Ay.displayName=nd;var f5=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rd(nd,r),[s,l]=w.useState(n),c=w.useRef(null),d=We(t,c),u=w.useRef(0),f=u.current,p=w.useRef(0),g=p.current,m=i.open||s,v=w.useRef(m),b=w.useRef(void 0);return w.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),Ur(()=>{const x=c.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const O=x.getBoundingClientRect();u.current=O.height,p.current=O.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(n)}},[i.open,n]),h.jsx(xe.div,{"data-state":od(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&o})});function od(e){return e?"open":"closed"}var h5=My,p5=Ny,m5=Ay,lr="Accordion",v5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ad,g5,y5]=ay(lr),[$s]=At(lr,[y5,Py]),id=Py(),Dy=y.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return h.jsx(ad.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?h.jsx(O5,{...a,ref:t}):h.jsx(x5,{...o,ref:t})})});Dy.displayName=lr;var[Ty,b5]=$s(lr),[Iy,w5]=$s(lr,{collapsible:!1}),x5=y.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Dt({prop:r,defaultProp:n??"",onChange:o,caller:lr});return h.jsx(Ty,{scope:e.__scopeAccordion,value:y.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:y.useCallback(()=>a&&l(""),[a,l]),children:h.jsx(Iy,{scope:e.__scopeAccordion,collapsible:a,children:h.jsx($y,{...i,ref:t})})})}),O5=y.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Dt({prop:r,defaultProp:n??[],onChange:o,caller:lr}),l=y.useCallback(d=>s((u=[])=>[...u,d]),[s]),c=y.useCallback(d=>s((u=[])=>u.filter(f=>f!==d)),[s]);return h.jsx(Ty,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:h.jsx(Iy,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsx($y,{...a,ref:t})})})}),[C5,js]=$s(lr),$y=y.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=y.useRef(null),l=We(s,t),c=g5(r),u=Ra(o)==="ltr",f=Se(e.onKeyDown,p=>{var k;if(!v5.includes(p.key))return;const g=p.target,m=c().filter(D=>{var N;return!((N=D.ref.current)!=null&&N.disabled)}),v=m.findIndex(D=>D.ref.current===g),b=m.length;if(v===-1)return;p.preventDefault();let x=v;const O=0,S=b-1,E=()=>{x=v+1,x>S&&(x=O)},C=()=>{x=v-1,x<O&&(x=S)};switch(p.key){case"Home":x=O;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(u?E():C());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(u?C():E());break;case"ArrowUp":a==="vertical"&&C();break}const _=x%b;(k=m[_].ref.current)==null||k.focus()});return h.jsx(C5,{scope:r,disabled:n,direction:o,orientation:a,children:h.jsx(ad.Slot,{scope:r,children:h.jsx(xe.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),Ls="AccordionItem",[S5,sd]=$s(Ls),jy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=js(Ls,r),i=b5(Ls,r),s=id(r),l=Gr(),c=n&&i.value.includes(n)||!1,d=a.disabled||e.disabled;return h.jsx(S5,{scope:r,open:c,disabled:d,triggerId:l,children:h.jsx(h5,{"data-orientation":a.orientation,"data-state":By(c),...s,...o,ref:t,disabled:d,open:c,onOpenChange:u=>{u?i.onItemOpen(n):i.onItemClose(n)}})})});jy.displayName=Ls;var Ly="AccordionHeader",Yy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(Ly,r);return h.jsx(xe.h3,{"data-orientation":o.orientation,"data-state":By(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Yy.displayName=Ly;var ld="AccordionTrigger",zy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(ld,r),i=w5(ld,r),s=id(r);return h.jsx(ad.ItemSlot,{scope:r,children:h.jsx(p5,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});zy.displayName=ld;var Fy="AccordionContent",Wy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(Fy,r),i=id(r);return h.jsx(m5,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Wy.displayName=Fy;function By(e){return e?"open":"closed"}var Vy=Dy,Hy=jy,Uy=Yy,Gy=zy,Ky=Wy;const E5=({menu:e,isOpen:t,isSelected:r,selectedUrl:n,onMenuClick:o})=>{var s;const a=((s=e.subMenu)==null?void 0:s.some(l=>l.url===n))??!1,i=e.subMenu?a:r;return h.jsxs(Hy,{value:e.url,className:"border-none",children:[h.jsx(Uy,{className:"m-0",children:h.jsxs(Gy,{onClick:l=>{e.subMenu||(l.preventDefault(),o(e.url))},className:P("group flex items-center border-0 bg-transparent px-5","text-[13px] font-medium text-white/72","h-11 w-full","border-l-[3px] border-l-transparent","transition-colors duration-150","cursor-pointer","hover:bg-white/4 hover:text-white",i&&P("bg-cms-primary-200/10 text-cms-primary-200","border-l-cms-primary-200 font-bold")),children:[e.icon&&h.jsx("div",{className:P("mr-2.5 flex items-center","[&>svg]:size-4",i?"text-cms-primary-200":"text-white/45"),children:e.icon}),h.jsx("span",{className:P(i?"text-cms-primary-200":"text-white/72","text-[13px]"),children:e.title}),e.subMenu&&h.jsx(Kg,{className:P("ml-auto transition-transform",i?"text-cms-primary-200":"text-white/45",t&&"rotate-180"),size:14})]})}),e.subMenu&&h.jsx(Ky,{className:P("overflow-hidden","bg-black/25","border-l-[3px] border-l-cms-primary-200","py-1","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"),children:e.subMenu.map(l=>{const c=l.url===n;return h.jsx("button",{type:"button",onClick:()=>o(l.url),className:P("flex items-center border-0 bg-transparent","h-9 w-full pr-5 pl-[44px]","cursor-pointer","transition-colors duration-150","hover:text-white",c&&"bg-cms-primary-200/8"),children:h.jsx("span",{className:P("text-[13px]","transition-colors",c?"font-bold text-cms-primary-200":"text-white/62"),children:l.title})},l.url)})})]})},qy=y.forwardRef(({title:e,menus:t,selectedUrl:r,onMenuClick:n,headerSlot:o,className:a,...i},s)=>{const[l,c]=y.useState([]);return h.jsxs("div",{ref:s,className:P("flex flex-col","h-full w-[232px] max-w-[232px] min-w-[232px]","bg-cms-surface-coal text-cms-gray-200","border-r border-white/6",a),...i,children:[o,e&&!o&&h.jsx("div",{className:"border-b border-white/6 px-[18px] py-5",children:h.jsx("h2",{className:"text-[15px] font-bold tracking-tight text-white",children:e})}),h.jsx("div",{className:P("flex-1 overflow-y-auto","scrollbar-thin","scrollbar-thumb-[#3a3b3e]","scrollbar-track-transparent"),children:h.jsx(Vy,{type:"multiple",value:l,onValueChange:c,children:t.map(d=>h.jsx(E5,{menu:d,isOpen:l.includes(d.url),isSelected:r===d.url,selectedUrl:r,onMenuClick:n},d.url))})})]})});qy.displayName="SideNavigation";const _5="min-w-8 h-8 px-2 text-[13px] font-medium",Xy="size-8 p-0",P5=P("inline-flex items-center justify-center","h-8 min-w-8 px-2","text-[13px] font-medium text-cms-gray-350"),M5=({currentPage:e,totalPages:t,siblingCount:r=1})=>y.useMemo(()=>{const n=(c,d)=>Array.from({length:d-c+1},(u,f)=>c+f);if(r*2+5>=t)return n(1,t);const a=Math.max(e-r,1),i=Math.min(e+r,t),s=a>2,l=i<t-1;return!s&&l?[...n(1,3+2*r),"...",t]:s&&!l?[1,"...",...n(t-(2+2*r),t)]:s&&l?[1,"...",...n(a,i),"...",t]:[]},[e,t,r]),Zy=y.forwardRef(({currentPage:e,totalPages:t,onPageChange:r,siblingCount:n=1,showPrevNext:o=!0,disabled:a=!1,className:i},s)=>{const l=M5({currentPage:e,totalPages:t,siblingCount:n}),c=()=>{e>1&&!a&&r(e-1)},d=()=>{e<t&&!a&&r(e+1)},u=f=>{!a&&f!==e&&r(f)};return h.jsxs("nav",{ref:s,role:"navigation","aria-label":"페이지네이션",className:P("inline-flex items-center gap-0.5",i),children:[o&&h.jsx(bt,{type:"button",variant:"ghost",size:"sm",onClick:c,disabled:a||e===1,"aria-label":"이전 페이지",className:Xy,children:h.jsx(qg,{className:"size-4"})}),l.map((f,p)=>{if(f==="...")return h.jsx("span",{className:P5,"aria-hidden":"true",children:"..."},`ellipsis-${p}`);const g=f===e;return h.jsx(bt,{type:"button",variant:g?"default":"ghost",size:"sm",onClick:()=>u(f),disabled:a,"aria-label":`페이지 ${f}${g?" (현재 페이지)":"로 이동"}`,"aria-current":g?"page":void 0,className:_5,children:f},f)}),o&&h.jsx(bt,{type:"button",variant:"ghost",size:"sm",onClick:d,disabled:a||e===t,"aria-label":"다음 페이지",className:Xy,children:h.jsx(qu,{className:"size-4"})})]})});Zy.displayName="Pagination";var Ys="Checkbox",[k5]=At(Ys),[N5,cd]=k5(Ys);function A5(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[f,p]=Dt({prop:r,defaultProp:o??!1,onChange:l,caller:Ys}),[g,m]=w.useState(null),[v,b]=w.useState(null),x=w.useRef(!1),O=g?!!i||!!g.closest("form"):!0,S={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:Sn(o)?!1:o,isFormControl:O,bubbleInput:v,setBubbleInput:b};return h.jsx(N5,{scope:t,...S,children:D5(u)?u(S):n})}var Qy="CheckboxTrigger",Jy=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:s,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=cd(Qy,e),m=We(o,d),v=w.useRef(l);return w.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const x=()=>u(v.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[a,u]),h.jsx(xe.button,{type:"button",role:"checkbox","aria-checked":Sn(l)?"mixed":l,"aria-required":c,"data-state":o0(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:m,onKeyDown:Se(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Se(r,b=>{u(x=>Sn(x)?!0:!x),g&&p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});Jy.displayName=Qy;var Ry=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:d,...u}=e;return h.jsx(A5,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:d,value:l,internal_do_not_use_render:({isFormControl:f})=>h.jsxs(h.Fragment,{children:[h.jsx(Jy,{...u,ref:t,__scopeCheckbox:r}),f&&h.jsx(n0,{__scopeCheckbox:r})]})})});Ry.displayName=Ys;var e0="CheckboxIndicator",t0=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=cd(e0,r);return h.jsx(qt,{present:n||Sn(a.checked)||a.checked===!0,children:h.jsx(xe.span,{"data-state":o0(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});t0.displayName=e0;var r0="CheckboxBubbleInput",n0=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:d,form:u,bubbleInput:f,setBubbleInput:p}=cd(r0,e),g=We(r,p),m=Zu(a),v=ms(n);w.useEffect(()=>{const x=f;if(!x)return;const O=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(O,"checked").set,C=!o.current;if(m!==a&&E){const _=new Event("click",{bubbles:C});x.indeterminate=Sn(a),E.call(x,Sn(a)?!1:a),x.dispatchEvent(_)}},[f,m,a,o]);const b=w.useRef(Sn(a)?!1:a);return h.jsx(xe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:s,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});n0.displayName=r0;function D5(e){return typeof e=="function"}function Sn(e){return e==="indeterminate"}function o0(e){return Sn(e)?"indeterminate":e?"checked":"unchecked"}const a0=y.forwardRef(({className:e,label:t,id:r,disabled:n,...o},a)=>{const i=y.useId(),s=r??`checkbox-${i.replace(/:/g,"")}`;return h.jsxs("div",{className:"flex items-center",children:[h.jsx(Ry,{ref:a,id:s,disabled:n,className:P("peer size-[18px] shrink-0 rounded-cms-xs p-0","border-[1.5px] border-cms-gray-350 bg-cms-white","focus-visible:outline-none","focus-visible:ring-2 focus-visible:ring-cms-gray-900/15","focus-visible:ring-offset-1","cursor-pointer","hover:border-cms-gray-600","disabled:cursor-not-allowed disabled:opacity-100","disabled:border-cms-gray-250 disabled:bg-cms-gray-100","data-[state=checked]:border-cms-gray-900","data-[state=checked]:bg-cms-gray-900","data-[state=checked]:hover:border-cms-gray-900","transition-colors duration-150 ease-out",e),...o,children:h.jsx(t0,{className:P("flex items-center justify-center text-cms-white"),children:h.jsx(es,{size:12,strokeWidth:3,viewBox:"2 2 20 20"})})}),t&&h.jsx("label",{htmlFor:s,className:P("ml-2 text-sm font-normal text-cms-gray-900","cursor-pointer select-none","transition-colors","hover:text-cms-gray-900",n&&"cursor-not-allowed text-cms-gray-450"),children:t})]})});a0.displayName="Checkbox";var zs="Dialog",[i0]=At(zs),[T5,cr]=i0(zs),s0=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=w.useRef(null),l=w.useRef(null),[c,d]=Dt({prop:n,defaultProp:o??!1,onChange:a,caller:zs});return h.jsx(T5,{scope:t,triggerRef:s,contentRef:l,contentId:Gr(),titleId:Gr(),descriptionId:Gr(),open:c,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(u=>!u),[d]),modal:i,children:r})};s0.displayName=zs;var l0="DialogTrigger",I5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(l0,r),a=We(t,o.triggerRef);return h.jsx(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fd(o.open),...n,ref:a,onClick:Se(e.onClick,o.onOpenToggle)})});I5.displayName=l0;var ud="DialogPortal",[$5,c0]=i0(ud,{forceMount:void 0}),u0=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=cr(ud,t);return h.jsx($5,{scope:t,forceMount:r,children:w.Children.map(n,i=>h.jsx(qt,{present:r||a.open,children:h.jsx(gs,{asChild:!0,container:o,children:i})}))})};u0.displayName=ud;var Fs="DialogOverlay",d0=w.forwardRef((e,t)=>{const r=c0(Fs,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=cr(Fs,e.__scopeDialog);return a.modal?h.jsx(qt,{present:n||a.open,children:h.jsx(L5,{...o,ref:t})}):null});d0.displayName=Fs;var j5=La("DialogOverlay.RemoveScroll"),L5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(Fs,r);return h.jsx(Mu,{as:j5,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(xe.div,{"data-state":fd(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),qn="DialogContent",f0=w.forwardRef((e,t)=>{const r=c0(qn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=cr(qn,e.__scopeDialog);return h.jsx(qt,{present:n||a.open,children:a.modal?h.jsx(Y5,{...o,ref:t}):h.jsx(z5,{...o,ref:t})})});f0.displayName=qn;var Y5=w.forwardRef((e,t)=>{const r=cr(qn,e.__scopeDialog),n=w.useRef(null),o=We(t,r.contentRef,n);return w.useEffect(()=>{const a=n.current;if(a)return rv(a)},[]),h.jsx(h0,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,a=>a.preventDefault())})}),z5=w.forwardRef((e,t)=>{const r=cr(qn,e.__scopeDialog),n=w.useRef(!1),o=w.useRef(!1);return h.jsx(h0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),h0=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=cr(qn,r),l=w.useRef(null),c=We(t,l);return hm(),h.jsxs(h.Fragment,{children:[h.jsx(lu,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:h.jsx(os,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fd(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(F5,{titleId:s.titleId}),h.jsx(B5,{contentRef:l,descriptionId:s.descriptionId})]})]})}),dd="DialogTitle",p0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(dd,r);return h.jsx(xe.h2,{id:o.titleId,...n,ref:t})});p0.displayName=dd;var m0="DialogDescription",v0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(m0,r);return h.jsx(xe.p,{id:o.descriptionId,...n,ref:t})});v0.displayName=m0;var g0="DialogClose",y0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(g0,r);return h.jsx(xe.button,{type:"button",...n,ref:t,onClick:Se(e.onClick,()=>o.onOpenChange(!1))})});y0.displayName=g0;function fd(e){return e?"open":"closed"}var b0="DialogTitleWarning",[BK,w0]=eM(b0,{contentName:qn,titleName:dd,docsSlug:"dialog"}),F5=({titleId:e})=>{const t=w0(b0),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
142
|
+
`,"size-5","cursor-pointer","-translate-y-1/2","data-[state=unchecked]:translate-x-0","data-[state=checked]:translate-x-(--switch-thumb-translate)","transition-transform")})]})});oy.displayName=ry.displayName;function ay(e){const t=e+"CollectionProvider",[r,n]=At(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:b}=m,x=y.useRef(null),O=y.useRef(new Map).current;return h.jsx(o,{scope:v,itemMap:O,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",l=La(s),c=y.forwardRef((m,v)=>{const{scope:b,children:x}=m,O=a(s,b),S=We(v,O.collectionRef);return h.jsx(l,{ref:S,children:x})});c.displayName=s;const d=e+"CollectionItemSlot",u="data-radix-collection-item",f=La(d),p=y.forwardRef((m,v)=>{const{scope:b,children:x,...O}=m,S=y.useRef(null),E=We(v,S),C=a(d,b);return y.useEffect(()=>(C.itemMap.set(S,{ref:S,...O}),()=>void C.itemMap.delete(S))),h.jsx(f,{[u]:"",ref:E,children:x})});p.displayName=d;function g(m){const v=a(e+"CollectionConsumer",m);return y.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const O=Array.from(x.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((C,_)=>O.indexOf(C.ref.current)-O.indexOf(_.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},g,n]}var WI=w.createContext(void 0);function Ra(e){const t=w.useContext(WI);return e||t||"ltr"}var Qu="rovingFocusGroup.onEntryFocus",BI={bubbles:!1,cancelable:!0},ei="RovingFocusGroup",[Ju,iy,VI]=ay(ei),[HI,Jo]=At(ei,[VI]),[UI,GI]=HI(ei),sy=w.forwardRef((e,t)=>h.jsx(Ju.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Ju.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(KI,{...e,ref:t})})}));sy.displayName=ei;var KI=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,f=w.useRef(null),p=We(t,f),g=Ra(a),[m,v]=Dt({prop:i,defaultProp:s??null,onChange:l,caller:ei}),[b,x]=w.useState(!1),O=Bn(c),S=iy(r),E=w.useRef(!1),[C,_]=w.useState(0);return w.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(Qu,O),()=>k.removeEventListener(Qu,O)},[O]),h.jsx(UI,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:m,onItemFocus:w.useCallback(k=>v(k),[v]),onItemShiftTab:w.useCallback(()=>x(!0),[]),onFocusableItemAdd:w.useCallback(()=>_(k=>k+1),[]),onFocusableItemRemove:w.useCallback(()=>_(k=>k-1),[]),children:h.jsx(xe.div,{tabIndex:b||C===0?-1:0,"data-orientation":n,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{E.current=!0}),onFocus:Se(e.onFocus,k=>{const D=!E.current;if(k.target===k.currentTarget&&D&&!b){const N=new CustomEvent(Qu,BI);if(k.currentTarget.dispatchEvent(N),!N.defaultPrevented){const T=S().filter(A=>A.focusable),M=T.find(A=>A.active),K=T.find(A=>A.id===m),$=[M,K,...T].filter(Boolean).map(A=>A.ref.current);uy($,d)}}E.current=!1}),onBlur:Se(e.onBlur,()=>x(!1))})})}),ly="RovingFocusGroupItem",cy=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Gr(),c=a||l,d=GI(ly,r),u=d.currentTabStopId===c,f=iy(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=d;return w.useEffect(()=>{if(n)return p(),()=>g()},[n,p,g]),h.jsx(Ju.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:h.jsx(xe.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:Se(e.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:Se(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Se(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=ZI(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let O=f().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")O.reverse();else if(b==="prev"||b==="next"){b==="prev"&&O.reverse();const S=O.indexOf(v.currentTarget);O=d.loop?QI(O,S+1):O.slice(S+1)}setTimeout(()=>uy(O))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:m!=null}):i})})});cy.displayName=ly;var qI={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XI(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ZI(e,t,r){const n=XI(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qI[n]}function uy(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function QI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ru=sy,ed=cy,td="Radio",[JI,dy]=At(td),[RI,e5]=JI(td),fy=w.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:l,form:c,...d}=e,[u,f]=w.useState(null),p=We(t,v=>f(v)),g=w.useRef(!1),m=u?c||!!u.closest("form"):!0;return h.jsxs(RI,{scope:r,checked:o,disabled:i,children:[h.jsx(xe.button,{type:"button",role:"radio","aria-checked":o,"data-state":vy(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:p,onClick:Se(e.onClick,v=>{o||l==null||l(),m&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),m&&h.jsx(my,{control:u,bubbles:!g.current,name:n,value:s,checked:o,required:a,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});fy.displayName=td;var hy="RadioIndicator",py=w.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=e5(hy,r);return h.jsx(qt,{present:n||a.checked,children:h.jsx(xe.span,{"data-state":vy(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});py.displayName=hy;var t5="RadioBubbleInput",my=w.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=w.useRef(null),s=We(i,a),l=Zu(r),c=ms(t);return w.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==r&&p){const g=new Event("click",{bubbles:n});p.call(d,r),d.dispatchEvent(g)}},[l,r,n]),h.jsx(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});my.displayName=t5;function vy(e){return e?"checked":"unchecked"}var r5=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ts="RadioGroup",[n5]=At(Ts,[Jo,dy]),gy=Jo(),yy=dy(),[o5,a5]=n5(Ts),by=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...f}=e,p=gy(r),g=Ra(c),[m,v]=Dt({prop:a,defaultProp:o??null,onChange:u,caller:Ts});return h.jsx(o5,{scope:r,name:n,required:i,disabled:s,value:m,onValueChange:v,children:h.jsx(Ru,{asChild:!0,...p,orientation:l,dir:g,loop:d,children:h.jsx(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:g,...f,ref:t})})})});by.displayName=Ts;var wy="RadioGroupItem",xy=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=a5(wy,r),i=a.disabled||n,s=gy(r),l=yy(r),c=w.useRef(null),d=We(t,c),u=a.value===o.value,f=w.useRef(!1);return w.useEffect(()=>{const p=m=>{r5.includes(m.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),h.jsx(ed,{asChild:!0,...s,focusable:!i,active:u,children:h.jsx(fy,{disabled:i,required:a.required,checked:u,...l,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:Se(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Se(o.onFocus,()=>{var p;f.current&&((p=c.current)==null||p.click())})})})});xy.displayName=wy;var i5="RadioGroupIndicator",Oy=w.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=yy(r);return h.jsx(py,{...o,...n,ref:t})});Oy.displayName=i5;var Cy=by,Sy=xy,s5=Oy;const Ey=y.forwardRef(({className:e,...t},r)=>h.jsx(Cy,{className:e,...t,ref:r}));Ey.displayName=Cy.displayName;const l5=Ee(P("flex items-center justify-center","aspect-square rounded-full bg-cms-white","border-[1.5px] border-cms-gray-350","transition-colors duration-150 ease-out","focus:outline-none","focus-visible:ring-2 focus-visible:ring-cms-gray-900/15","focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-100","disabled:border-cms-gray-250 disabled:bg-cms-gray-100","cursor-pointer","hover:border-cms-gray-600"),{variants:{variant:{black:P("text-cms-gray-900","data-[state=checked]:border-cms-gray-900"),default:P("text-cms-gray-900","data-[state=checked]:border-cms-gray-900"),green:P("text-cms-green-500","data-[state=checked]:border-cms-green-500"),blue:P("text-cms-blue-600","data-[state=checked]:border-cms-blue-600"),red:P("text-cms-red-500","data-[state=checked]:border-cms-red-500")},size:{sm:"size-4",md:"size-[18px]",lg:"size-5"}},defaultVariants:{variant:"black",size:"md"}}),c5=Ee("flex aspect-square items-center justify-center rounded-full bg-current",{variants:{variant:{black:"text-cms-gray-900",default:"text-cms-gray-900",green:"text-cms-green-500",blue:"text-cms-blue-600",red:"text-cms-red-500"},size:{sm:"size-1.5",md:"size-2",lg:"size-2.5"}},defaultVariants:{variant:"black",size:"md"}}),_y=y.forwardRef(({className:e,variant:t,size:r,...n},o)=>h.jsx(Sy,{ref:o,className:P(l5({variant:t,size:r}),e),...n,children:h.jsx(s5,{className:P(c5({variant:t,size:r}))})}));_y.displayName=Sy.displayName;var Is="Collapsible",[u5,Py]=At(Is),[d5,rd]=u5(Is),My=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Dt({prop:n,defaultProp:o??!1,onChange:i,caller:Is});return h.jsx(d5,{scope:r,disabled:a,contentId:Gr(),open:l,onOpenToggle:w.useCallback(()=>c(d=>!d),[c]),children:h.jsx(xe.div,{"data-state":od(l),"data-disabled":a?"":void 0,...s,ref:t})})});My.displayName=Is;var ky="CollapsibleTrigger",Ny=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rd(ky,r);return h.jsx(xe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":od(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Se(e.onClick,o.onOpenToggle)})});Ny.displayName=ky;var nd="CollapsibleContent",Ay=w.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rd(nd,e.__scopeCollapsible);return h.jsx(qt,{present:r||o.open,children:({present:a})=>h.jsx(f5,{...n,ref:t,present:a})})});Ay.displayName=nd;var f5=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rd(nd,r),[s,l]=w.useState(n),c=w.useRef(null),d=We(t,c),u=w.useRef(0),f=u.current,p=w.useRef(0),g=p.current,m=i.open||s,v=w.useRef(m),b=w.useRef(void 0);return w.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),Ur(()=>{const x=c.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const O=x.getBoundingClientRect();u.current=O.height,p.current=O.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(n)}},[i.open,n]),h.jsx(xe.div,{"data-state":od(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&o})});function od(e){return e?"open":"closed"}var h5=My,p5=Ny,m5=Ay,lr="Accordion",v5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ad,g5,y5]=ay(lr),[$s]=At(lr,[y5,Py]),id=Py(),Dy=y.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return h.jsx(ad.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?h.jsx(O5,{...a,ref:t}):h.jsx(x5,{...o,ref:t})})});Dy.displayName=lr;var[Ty,b5]=$s(lr),[Iy,w5]=$s(lr,{collapsible:!1}),x5=y.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Dt({prop:r,defaultProp:n??"",onChange:o,caller:lr});return h.jsx(Ty,{scope:e.__scopeAccordion,value:y.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:y.useCallback(()=>a&&l(""),[a,l]),children:h.jsx(Iy,{scope:e.__scopeAccordion,collapsible:a,children:h.jsx($y,{...i,ref:t})})})}),O5=y.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Dt({prop:r,defaultProp:n??[],onChange:o,caller:lr}),l=y.useCallback(d=>s((u=[])=>[...u,d]),[s]),c=y.useCallback(d=>s((u=[])=>u.filter(f=>f!==d)),[s]);return h.jsx(Ty,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:h.jsx(Iy,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsx($y,{...a,ref:t})})})}),[C5,js]=$s(lr),$y=y.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=y.useRef(null),l=We(s,t),c=g5(r),u=Ra(o)==="ltr",f=Se(e.onKeyDown,p=>{var k;if(!v5.includes(p.key))return;const g=p.target,m=c().filter(D=>{var N;return!((N=D.ref.current)!=null&&N.disabled)}),v=m.findIndex(D=>D.ref.current===g),b=m.length;if(v===-1)return;p.preventDefault();let x=v;const O=0,S=b-1,E=()=>{x=v+1,x>S&&(x=O)},C=()=>{x=v-1,x<O&&(x=S)};switch(p.key){case"Home":x=O;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(u?E():C());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(u?C():E());break;case"ArrowUp":a==="vertical"&&C();break}const _=x%b;(k=m[_].ref.current)==null||k.focus()});return h.jsx(C5,{scope:r,disabled:n,direction:o,orientation:a,children:h.jsx(ad.Slot,{scope:r,children:h.jsx(xe.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),Ls="AccordionItem",[S5,sd]=$s(Ls),jy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=js(Ls,r),i=b5(Ls,r),s=id(r),l=Gr(),c=n&&i.value.includes(n)||!1,d=a.disabled||e.disabled;return h.jsx(S5,{scope:r,open:c,disabled:d,triggerId:l,children:h.jsx(h5,{"data-orientation":a.orientation,"data-state":By(c),...s,...o,ref:t,disabled:d,open:c,onOpenChange:u=>{u?i.onItemOpen(n):i.onItemClose(n)}})})});jy.displayName=Ls;var Ly="AccordionHeader",Yy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(Ly,r);return h.jsx(xe.h3,{"data-orientation":o.orientation,"data-state":By(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Yy.displayName=Ly;var ld="AccordionTrigger",zy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(ld,r),i=w5(ld,r),s=id(r);return h.jsx(ad.ItemSlot,{scope:r,children:h.jsx(p5,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});zy.displayName=ld;var Fy="AccordionContent",Wy=y.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=js(lr,r),a=sd(Fy,r),i=id(r);return h.jsx(m5,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Wy.displayName=Fy;function By(e){return e?"open":"closed"}var Vy=Dy,Hy=jy,Uy=Yy,Gy=zy,Ky=Wy;const E5=({menu:e,isOpen:t,isSelected:r,selectedUrl:n,onMenuClick:o})=>{var s;const a=((s=e.subMenu)==null?void 0:s.some(l=>l.url===n))??!1,i=e.subMenu?a:r;return h.jsxs(Hy,{value:e.url,className:"border-none",children:[h.jsx(Uy,{className:"m-0",children:h.jsxs(Gy,{onClick:l=>{e.subMenu||(l.preventDefault(),o(e.url))},className:P("group flex items-center border-0 bg-transparent px-5","text-[14px] font-medium text-white/72","h-11 w-full","border-l-[3px] border-l-transparent","transition-colors duration-150","cursor-pointer","hover:bg-white/4 hover:text-white",i&&P("bg-cms-primary-200/10 text-cms-primary-200","border-l-cms-primary-200 font-bold")),children:[e.icon&&h.jsx("div",{className:P("mr-2.5 flex items-center","[&>svg]:size-[18px]",i?"text-cms-primary-200":"text-white/45"),children:e.icon}),h.jsx("span",{className:P(i?"text-cms-primary-200":"text-white/72","text-[14px]"),children:e.title}),e.subMenu&&h.jsx(Kg,{className:P("ml-auto transition-transform",i?"text-cms-primary-200":"text-white/45",t&&"rotate-180"),size:16})]})}),e.subMenu&&h.jsx(Ky,{className:P("overflow-hidden","bg-black/25","border-l-[3px] border-l-cms-primary-200","py-1","data-[state=open]:animate-accordion-down","data-[state=closed]:animate-accordion-up"),children:e.subMenu.map(l=>{const c=l.url===n;return h.jsx("button",{type:"button",onClick:()=>o(l.url),className:P("flex items-center border-0 bg-transparent","h-9 w-full pr-5 pl-[48px]","cursor-pointer","transition-colors duration-150","hover:text-white",c&&"bg-cms-primary-200/8"),children:h.jsx("span",{className:P("text-[14px]","transition-colors",c?"font-bold text-cms-primary-200":"text-white/62"),children:l.title})},l.url)})})]})},qy=y.forwardRef(({title:e,menus:t,selectedUrl:r,onMenuClick:n,headerSlot:o,className:a,...i},s)=>{const[l,c]=y.useState([]);return h.jsxs("div",{ref:s,className:P("flex flex-col","h-full w-[248px] max-w-[248px] min-w-[248px]","bg-cms-surface-coal text-cms-gray-200","border-r border-white/6",a),...i,children:[o,e&&!o&&h.jsx("div",{className:"border-b border-white/6 px-[18px] py-5",children:h.jsx("h2",{className:"text-[16px] font-bold tracking-tight text-white",children:e})}),h.jsx("div",{className:P("flex-1 overflow-y-auto","scrollbar-thin","scrollbar-thumb-[#3a3b3e]","scrollbar-track-transparent"),children:h.jsx(Vy,{type:"multiple",value:l,onValueChange:c,children:t.map(d=>h.jsx(E5,{menu:d,isOpen:l.includes(d.url),isSelected:r===d.url,selectedUrl:r,onMenuClick:n},d.url))})})]})});qy.displayName="SideNavigation";const _5="min-w-8 h-8 px-2 text-[13px] font-medium",Xy="size-8 p-0",P5=P("inline-flex items-center justify-center","h-8 min-w-8 px-2","text-[13px] font-medium text-cms-gray-350"),M5=({currentPage:e,totalPages:t,siblingCount:r=1})=>y.useMemo(()=>{const n=(c,d)=>Array.from({length:d-c+1},(u,f)=>c+f);if(r*2+5>=t)return n(1,t);const a=Math.max(e-r,1),i=Math.min(e+r,t),s=a>2,l=i<t-1;return!s&&l?[...n(1,3+2*r),"...",t]:s&&!l?[1,"...",...n(t-(2+2*r),t)]:s&&l?[1,"...",...n(a,i),"...",t]:[]},[e,t,r]),Zy=y.forwardRef(({currentPage:e,totalPages:t,onPageChange:r,siblingCount:n=1,showPrevNext:o=!0,disabled:a=!1,className:i},s)=>{const l=M5({currentPage:e,totalPages:t,siblingCount:n}),c=()=>{e>1&&!a&&r(e-1)},d=()=>{e<t&&!a&&r(e+1)},u=f=>{!a&&f!==e&&r(f)};return h.jsxs("nav",{ref:s,role:"navigation","aria-label":"페이지네이션",className:P("inline-flex items-center gap-0.5",i),children:[o&&h.jsx(bt,{type:"button",variant:"ghost",size:"sm",onClick:c,disabled:a||e===1,"aria-label":"이전 페이지",className:Xy,children:h.jsx(qg,{className:"size-4"})}),l.map((f,p)=>{if(f==="...")return h.jsx("span",{className:P5,"aria-hidden":"true",children:"..."},`ellipsis-${p}`);const g=f===e;return h.jsx(bt,{type:"button",variant:g?"default":"ghost",size:"sm",onClick:()=>u(f),disabled:a,"aria-label":`페이지 ${f}${g?" (현재 페이지)":"로 이동"}`,"aria-current":g?"page":void 0,className:_5,children:f},f)}),o&&h.jsx(bt,{type:"button",variant:"ghost",size:"sm",onClick:d,disabled:a||e===t,"aria-label":"다음 페이지",className:Xy,children:h.jsx(qu,{className:"size-4"})})]})});Zy.displayName="Pagination";var Ys="Checkbox",[k5]=At(Ys),[N5,cd]=k5(Ys);function A5(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[f,p]=Dt({prop:r,defaultProp:o??!1,onChange:l,caller:Ys}),[g,m]=w.useState(null),[v,b]=w.useState(null),x=w.useRef(!1),O=g?!!i||!!g.closest("form"):!0,S={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:d,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:Sn(o)?!1:o,isFormControl:O,bubbleInput:v,setBubbleInput:b};return h.jsx(N5,{scope:t,...S,children:D5(u)?u(S):n})}var Qy="CheckboxTrigger",Jy=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:i,disabled:s,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=cd(Qy,e),m=We(o,d),v=w.useRef(l);return w.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const x=()=>u(v.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[a,u]),h.jsx(xe.button,{type:"button",role:"checkbox","aria-checked":Sn(l)?"mixed":l,"aria-required":c,"data-state":o0(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:m,onKeyDown:Se(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Se(r,b=>{u(x=>Sn(x)?!0:!x),g&&p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});Jy.displayName=Qy;var Ry=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:d,...u}=e;return h.jsx(A5,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:d,value:l,internal_do_not_use_render:({isFormControl:f})=>h.jsxs(h.Fragment,{children:[h.jsx(Jy,{...u,ref:t,__scopeCheckbox:r}),f&&h.jsx(n0,{__scopeCheckbox:r})]})})});Ry.displayName=Ys;var e0="CheckboxIndicator",t0=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=cd(e0,r);return h.jsx(qt,{present:n||Sn(a.checked)||a.checked===!0,children:h.jsx(xe.span,{"data-state":o0(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});t0.displayName=e0;var r0="CheckboxBubbleInput",n0=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:d,form:u,bubbleInput:f,setBubbleInput:p}=cd(r0,e),g=We(r,p),m=Zu(a),v=ms(n);w.useEffect(()=>{const x=f;if(!x)return;const O=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(O,"checked").set,C=!o.current;if(m!==a&&E){const _=new Event("click",{bubbles:C});x.indeterminate=Sn(a),E.call(x,Sn(a)?!1:a),x.dispatchEvent(_)}},[f,m,a,o]);const b=w.useRef(Sn(a)?!1:a);return h.jsx(xe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:s,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});n0.displayName=r0;function D5(e){return typeof e=="function"}function Sn(e){return e==="indeterminate"}function o0(e){return Sn(e)?"indeterminate":e?"checked":"unchecked"}const a0=y.forwardRef(({className:e,label:t,id:r,disabled:n,...o},a)=>{const i=y.useId(),s=r??`checkbox-${i.replace(/:/g,"")}`;return h.jsxs("div",{className:"flex items-center",children:[h.jsx(Ry,{ref:a,id:s,disabled:n,className:P("peer size-[18px] shrink-0 rounded-cms-xs p-0","border-[1.5px] border-cms-gray-350 bg-cms-white","focus-visible:outline-none","focus-visible:ring-2 focus-visible:ring-cms-gray-900/15","focus-visible:ring-offset-1","cursor-pointer","hover:border-cms-gray-600","disabled:cursor-not-allowed disabled:opacity-100","disabled:border-cms-gray-250 disabled:bg-cms-gray-100","data-[state=checked]:border-cms-gray-900","data-[state=checked]:bg-cms-gray-900","data-[state=checked]:hover:border-cms-gray-900","transition-colors duration-150 ease-out",e),...o,children:h.jsx(t0,{className:P("flex items-center justify-center text-cms-white"),children:h.jsx(es,{size:12,strokeWidth:3,viewBox:"2 2 20 20"})})}),t&&h.jsx("label",{htmlFor:s,className:P("ml-2 text-sm font-normal text-cms-gray-900","cursor-pointer select-none","transition-colors","hover:text-cms-gray-900",n&&"cursor-not-allowed text-cms-gray-450"),children:t})]})});a0.displayName="Checkbox";var zs="Dialog",[i0]=At(zs),[T5,cr]=i0(zs),s0=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=w.useRef(null),l=w.useRef(null),[c,d]=Dt({prop:n,defaultProp:o??!1,onChange:a,caller:zs});return h.jsx(T5,{scope:t,triggerRef:s,contentRef:l,contentId:Gr(),titleId:Gr(),descriptionId:Gr(),open:c,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(u=>!u),[d]),modal:i,children:r})};s0.displayName=zs;var l0="DialogTrigger",I5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(l0,r),a=We(t,o.triggerRef);return h.jsx(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fd(o.open),...n,ref:a,onClick:Se(e.onClick,o.onOpenToggle)})});I5.displayName=l0;var ud="DialogPortal",[$5,c0]=i0(ud,{forceMount:void 0}),u0=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=cr(ud,t);return h.jsx($5,{scope:t,forceMount:r,children:w.Children.map(n,i=>h.jsx(qt,{present:r||a.open,children:h.jsx(gs,{asChild:!0,container:o,children:i})}))})};u0.displayName=ud;var Fs="DialogOverlay",d0=w.forwardRef((e,t)=>{const r=c0(Fs,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=cr(Fs,e.__scopeDialog);return a.modal?h.jsx(qt,{present:n||a.open,children:h.jsx(L5,{...o,ref:t})}):null});d0.displayName=Fs;var j5=La("DialogOverlay.RemoveScroll"),L5=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(Fs,r);return h.jsx(Mu,{as:j5,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(xe.div,{"data-state":fd(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),qn="DialogContent",f0=w.forwardRef((e,t)=>{const r=c0(qn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=cr(qn,e.__scopeDialog);return h.jsx(qt,{present:n||a.open,children:a.modal?h.jsx(Y5,{...o,ref:t}):h.jsx(z5,{...o,ref:t})})});f0.displayName=qn;var Y5=w.forwardRef((e,t)=>{const r=cr(qn,e.__scopeDialog),n=w.useRef(null),o=We(t,r.contentRef,n);return w.useEffect(()=>{const a=n.current;if(a)return rv(a)},[]),h.jsx(h0,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,a=>a.preventDefault())})}),z5=w.forwardRef((e,t)=>{const r=cr(qn,e.__scopeDialog),n=w.useRef(!1),o=w.useRef(!1);return h.jsx(h0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),h0=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=cr(qn,r),l=w.useRef(null),c=We(t,l);return hm(),h.jsxs(h.Fragment,{children:[h.jsx(lu,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:h.jsx(os,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fd(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(F5,{titleId:s.titleId}),h.jsx(B5,{contentRef:l,descriptionId:s.descriptionId})]})]})}),dd="DialogTitle",p0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(dd,r);return h.jsx(xe.h2,{id:o.titleId,...n,ref:t})});p0.displayName=dd;var m0="DialogDescription",v0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(m0,r);return h.jsx(xe.p,{id:o.descriptionId,...n,ref:t})});v0.displayName=m0;var g0="DialogClose",y0=w.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=cr(g0,r);return h.jsx(xe.button,{type:"button",...n,ref:t,onClick:Se(e.onClick,()=>o.onOpenChange(!1))})});y0.displayName=g0;function fd(e){return e?"open":"closed"}var b0="DialogTitleWarning",[BK,w0]=eM(b0,{contentName:qn,titleName:dd,docsSlug:"dialog"}),F5=({titleId:e})=>{const t=w0(b0),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
143
143
|
|
|
144
144
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
145
145
|
|