boottent-design 0.1.7 → 0.1.8
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/boottent-design.hooks.cjs.js +1 -1
- package/dist/boottent-design.hooks.es.js +2 -15
- package/dist/boottent-design.main.cjs.js +1 -1
- package/dist/boottent-design.main.es.js +34 -30
- package/dist/boottent-design.provider.cjs.js +1 -1
- package/dist/boottent-design.provider.es.js +2 -104
- package/dist/boottent-design.types.cjs.js +1 -0
- package/dist/boottent-design.types.es.js +1 -0
- package/dist/boottent-design.ui.cjs.js +1 -1
- package/dist/boottent-design.ui.es.js +2 -2
- package/dist/boottent-design.utils.cjs.js +1 -1
- package/dist/boottent-design.utils.es.js +40 -40
- package/dist/{index-j8ablNp2.js → index-CW0d1ZBT.js} +1 -1
- package/dist/{index-JOCM_DIz.cjs → index-DOi5WXd1.cjs} +1 -1
- package/dist/portal-provider-BfanQezQ.cjs +1 -0
- package/dist/portal-provider-DJjQI95d.js +106 -0
- package/dist/{tooltip-x7XcU5XA.js → tooltip-CQQ6mZXI.js} +10 -10
- package/dist/{tooltip-Dbl2Hiq4.cjs → tooltip-Da-8zZlA.cjs} +1 -1
- package/dist/types/hooks.d.ts +4 -8
- package/dist/types/main.d.ts +25 -18
- package/dist/types/types.d.ts +570 -0
- package/dist/types/ui.d.ts +1 -1
- package/dist/types/utils.d.ts +4 -8
- package/dist/use-portal-Ck3GPJQN.cjs +1 -0
- package/dist/use-portal-TiMPd_EZ.js +17 -0
- package/package.json +6 -1
|
@@ -48,4 +48,4 @@ You can add a description to the \`${we}\` by passing a \`${bo}\` component as a
|
|
|
48
48
|
|
|
49
49
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${we}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
50
|
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ol=vo,il=go,Po=xo,To=Co,No=Eo,So=jo,Mo=yo,Oo=Ao;const Lo=ol,sl=il,Do=l.forwardRef(({className:e,...t},n)=>s.jsx(Po,{className:P.cn("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Do.displayName=Po.displayName;const al={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},cn=l.forwardRef(({className:e,size:t="sm",...n},r)=>s.jsxs(sl,{children:[s.jsx(Do,{}),s.jsx(To,{ref:r,className:P.cn("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-4 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",al[t],e),...n})]}));cn.displayName=To.displayName;const ln=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ln.displayName="AlertDialogHeader";const un=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});un.displayName="AlertDialogFooter";const dn=l.forwardRef(({className:e,...t},n)=>s.jsx(Mo,{ref:n,className:P.cn("whitespace-pre-wrap text-semibold16",e),...t}));dn.displayName=Mo.displayName;const Me=l.forwardRef(({className:e,...t},n)=>s.jsx(Oo,{ref:n,className:P.cn("whitespace-pre-wrap text-xs font-normal text-grey-600",e),...t}));Me.displayName=Oo.displayName;const fn=l.forwardRef(({className:e,...t},n)=>s.jsx(No,{ref:n,className:P.cn(ie({size:"sm"}),e),...t}));fn.displayName=No.displayName;const _o=l.forwardRef(({className:e,...t},n)=>s.jsx(So,{ref:n,className:P.cn(ie({variant:"outline",size:"sm"}),"mt-2 w-1/2 sm:mt-0",e),...t}));_o.displayName=So.displayName;const Io=({title:e="알림",description:t,confirmText:n="확인",onConfirm:r,size:o="sm",onClose:i})=>s.jsx(Lo,{open:!0,onOpenChange:a=>{!a&&i&&i()},children:s.jsxs(cn,{size:o,children:[s.jsxs(ln,{children:[s.jsx(dn,{children:e}),s.jsx(Me,{children:t})]}),s.jsx(un,{children:s.jsx(fn,{className:P.cn("w-full font-normal"),onClick:()=>{i&&i(),r&&r()},children:n})})]})});Io.displayName="Alert";const cl=po,ll=ho,ko=l.forwardRef(({className:e,...t},n)=>s.jsx(nn,{ref:n,className:P.cn("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ko.displayName=nn.displayName;const Ho=l.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(ll,{children:[s.jsx(ko,{}),s.jsxs(rn,{ref:r,className:P.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-xl translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...n,children:[t,s.jsxs(an,{className:"absolute right-4 top-5 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[s.jsx(rt.Cancel,{size:"16"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ho.displayName=rn.displayName;const Vo=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col text-left md:text-center",e),...t});Vo.displayName="DialogHeader";const Fo=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fo.displayName="DialogFooter";const $o=l.forwardRef(({className:e,...t},n)=>s.jsx(on,{ref:n,className:P.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));$o.displayName=on.displayName;const Bo=l.forwardRef(({className:e,...t},n)=>s.jsx(sn,{ref:n,className:P.cn("text-sm text-muted",e),...t}));Bo.displayName=sn.displayName;const Zo=l.forwardRef(({id:e,title:t,description:n,onConfirm:r,onCancel:o,onClose:i,confirmText:a="확인",cancelText:c="취소",size:d="sm",content:u,className:f,...p},m)=>s.jsx(cl,{open:!0,onOpenChange:v=>{!v&&i&&i()},children:s.jsxs(Ho,{className:P.cn("max-w-[328px] gap-0 px-0 py-0 md:max-w-[600px]",f),...p,ref:m,children:[s.jsxs(Vo,{className:"border-b border-b-border",children:[s.jsx($o,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),n&&s.jsx(Bo,{children:n})]}),u&&s.jsx("div",{children:u}),s.jsxs(Fo,{children:[o&&s.jsx(Xe,{onClick:()=>{o&&o(),i&&i()},className:P.cn(ie({variant:"outline",size:"sm"}),"w-full sm:w-auto"),children:c}),r&&s.jsx(Xe,{onClick:()=>{r&&r(),i&&i()},className:P.cn(ie({size:"sm"}),"w-full sm:w-auto"),children:a})]})]})}));Zo.displayName="Dialog";const Wo=l.forwardRef(({title:e,description:t,subDescription:n,contents:r,onConfirm:o,confirmText:i="확인",cancelText:a="취소",size:c="sm",className:d,onClose:u,...f},p)=>s.jsx(Lo,{open:!0,onOpenChange:m=>{!m&&u&&u()},children:s.jsxs(cn,{size:c,className:d,...f,ref:p,children:[s.jsxs(ln,{children:[s.jsx(dn,{children:e}),t&&s.jsx(Me,{children:t}),n&&s.jsx(Me,{className:"text-xs text-grey-600",children:n})]}),r&&s.jsx(Me,{className:"text-sm font-normal text-grey-600",children:r}),s.jsxs(un,{children:[s.jsx(_o,{className:P.cn("w-full font-normal"),children:a}),s.jsx(fn,{className:P.cn("w-full font-normal"),onClick:()=>{o&&o()},children:i})]})]})}));Wo.displayName="Modal";var ul="VisuallyHidden",ct=l.forwardRef((e,t)=>s.jsx(I.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ct.displayName=ul;var dl=ct,pn="ToastProvider",[hn,fl,pl]=lr("Toast"),[Uo,mu]=Re("Toast",[pl]),[hl,lt]=Uo(pn),Ko=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[c,d]=l.useState(null),[u,f]=l.useState(0),p=l.useRef(!1),m=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${pn}\`. Expected non-empty \`string\`.`),s.jsx(hn.Provider,{scope:t,children:s.jsx(hl,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:l.useCallback(()=>f(v=>v+1),[]),onToastRemove:l.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:a})})};Ko.displayName=pn;var Yo="ToastViewport",ml=["F8"],Ot="toast.viewportPause",Lt="toast.viewportResume",zo=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ml,label:o="Notifications ({hotkey})",...i}=e,a=lt(Yo,n),c=fl(n),d=l.useRef(null),u=l.useRef(null),f=l.useRef(null),p=l.useRef(null),m=B(t,p,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;l.useEffect(()=>{const g=C=>{var y;r.length!==0&&r.every(b=>C[b]||C.code===b)&&((y=p.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),l.useEffect(()=>{const g=d.current,C=p.current;if(x&&g&&C){const w=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Ot);C.dispatchEvent(E),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Lt);C.dispatchEvent(E),a.isClosePausedRef.current=!1}},b=E=>{!g.contains(E.relatedTarget)&&y()},A=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",w),g.addEventListener("focusout",b),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",A),window.addEventListener("blur",w),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",A),window.removeEventListener("blur",w),window.removeEventListener("focus",y)}}},[x,a.isClosePausedRef]);const h=l.useCallback(({tabbingDirection:g})=>{const w=c().map(y=>{const b=y.ref.current,A=[b,...Tl(b)];return g==="forwards"?A:A.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const g=p.current;if(g){const C=w=>{var A,E,R;const y=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!y){const N=document.activeElement,M=w.shiftKey;if(w.target===g&&M){(A=u.current)==null||A.focus();return}const V=h({tabbingDirection:M?"backwards":"forwards"}),k=V.findIndex(j=>j===N);Rt(V.slice(k+1))?w.preventDefault():M?(E=u.current)==null||E.focus():(R=f.current)==null||R.focus()}};return g.addEventListener("keydown",C),()=>g.removeEventListener("keydown",C)}},[c,h]),s.jsxs(Za,{ref:d,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&s.jsx(Dt,{ref:u,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"forwards"});Rt(g)}}),s.jsx(hn.Slot,{scope:n,children:s.jsx(I.ol,{tabIndex:-1,...i,ref:m})}),x&&s.jsx(Dt,{ref:f,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"backwards"});Rt(g)}})]})});zo.displayName=Yo;var Go="ToastFocusProxy",Dt=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=lt(Go,n);return s.jsx(ct,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const c=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(c))&&r()}})});Dt.displayName=Go;var ut="Toast",vl="toast.swipeStart",gl="toast.swipeMove",xl="toast.swipeCancel",Cl="toast.swipeEnd",Xo=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[c=!0,d]=je({prop:r,defaultProp:o,onChange:i});return s.jsx(fe,{present:n||c,children:s.jsx(bl,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:K(e.onPause),onResume:K(e.onResume),onSwipeStart:D(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:D(e.onSwipeMove,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:D(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:D(e.onSwipeEnd,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),d(!1)})})})});Xo.displayName=ut;var[wl,yl]=Uo(ut,{onClose(){}}),bl=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:v,...x}=e,h=lt(ut,n),[g,C]=l.useState(null),w=B(t,j=>C(j)),y=l.useRef(null),b=l.useRef(null),A=o||h.duration,E=l.useRef(0),R=l.useRef(A),N=l.useRef(0),{onToastAdd:M,onToastRemove:O}=h,F=K(()=>{var _;(g==null?void 0:g.contains(document.activeElement))&&((_=h.viewport)==null||_.focus()),a()}),V=l.useCallback(j=>{!j||j===1/0||(window.clearTimeout(N.current),E.current=new Date().getTime(),N.current=window.setTimeout(F,j))},[F]);l.useEffect(()=>{const j=h.viewport;if(j){const _=()=>{V(R.current),u==null||u()},L=()=>{const H=new Date().getTime()-E.current;R.current=R.current-H,window.clearTimeout(N.current),d==null||d()};return j.addEventListener(Ot,L),j.addEventListener(Lt,_),()=>{j.removeEventListener(Ot,L),j.removeEventListener(Lt,_)}}},[h.viewport,A,d,u,V]),l.useEffect(()=>{i&&!h.isClosePausedRef.current&&V(A)},[i,A,h.isClosePausedRef,V]),l.useEffect(()=>(M(),()=>O()),[M,O]);const k=l.useMemo(()=>g?ri(g):null,[g]);return h.viewport?s.jsxs(s.Fragment,{children:[k&&s.jsx(Al,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:k}),s.jsx(wl,{scope:n,onClose:F,children:Bt.createPortal(s.jsx(hn.ItemSlot,{scope:n,children:s.jsx(Ba,{asChild:!0,onEscapeKeyDown:D(c,()=>{h.isFocusedToastEscapeKeyDownRef.current||F(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(I.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...x,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:D(e.onKeyDown,j=>{j.key==="Escape"&&(c==null||c(j.nativeEvent),j.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:D(e.onPointerDown,j=>{j.button===0&&(y.current={x:j.clientX,y:j.clientY})}),onPointerMove:D(e.onPointerMove,j=>{if(!y.current)return;const _=j.clientX-y.current.x,L=j.clientY-y.current.y,H=!!b.current,T=["left","right"].includes(h.swipeDirection),$=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,U=T?$(0,_):0,pe=T?0:$(0,L),Ne=j.pointerType==="touch"?10:2,he={x:U,y:pe},_e={originalEvent:j,delta:he};H?(b.current=he,Be(gl,p,_e,{discrete:!1})):Gn(he,h.swipeDirection,Ne)?(b.current=he,Be(vl,f,_e,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(_)>Ne||Math.abs(L)>Ne)&&(y.current=null)}),onPointerUp:D(e.onPointerUp,j=>{const _=b.current,L=j.target;if(L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),b.current=null,y.current=null,_){const H=j.currentTarget,T={originalEvent:j,delta:_};Gn(_,h.swipeDirection,h.swipeThreshold)?Be(Cl,v,T,{discrete:!0}):Be(xl,m,T,{discrete:!0}),H.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Al=e=>{const{__scopeToast:t,children:n,...r}=e,o=lt(ut,t),[i,a]=l.useState(!1),[c,d]=l.useState(!1);return jl(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),c?null:s.jsx(qt,{asChild:!0,children:s.jsx(ct,{...r,children:i&&s.jsxs(s.Fragment,{children:[o.label," ",n]})})})},El="ToastTitle",qo=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(I.div,{...r,ref:t})});qo.displayName=El;var Rl="ToastDescription",Qo=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(I.div,{...r,ref:t})});Qo.displayName=Rl;var Jo="ToastAction",ei=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(ni,{altText:n,asChild:!0,children:s.jsx(mn,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jo}\`. Expected non-empty \`string\`.`),null)});ei.displayName=Jo;var ti="ToastClose",mn=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=yl(ti,n);return s.jsx(ni,{asChild:!0,children:s.jsx(I.button,{type:"button",...r,ref:t,onClick:D(e.onClick,o.onClose)})})});mn.displayName=ti;var ni=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return s.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function ri(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Pl(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...ri(r))}}),t}function Be(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ur(o,i):o.dispatchEvent(i)}var Gn=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function jl(e=()=>{}){const t=K(e);J(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Pl(e){return e.nodeType===e.ELEMENT_NODE}function Tl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Nl=Ko,oi=zo,ii=Xo,si=qo,ai=Qo,ci=ei,li=mn;const Sl=Nl,ui=l.forwardRef(({className:e,id:t,...n},r)=>s.jsx(oi,{ref:r,id:t,className:P.cn("fixed z-[100] flex max-h-screen flex-col-reverse gap-2 p-4 outline-none ring-transparent",e),...n}));ui.displayName=oi.displayName;const Ml=Lr("group pointer-events-auto relative flex w-full whitespace-pre-wrap bg-opacity-90 items-end justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},position:{"top-left":"top-0 left-0","top-center":"top-0 left-1/2 transform -translate-x-1/2","top-right":"top-0 right-0","bottom-left":"bottom-0 left-0","bottom-center":"bottom-0 left-1/2 transform -translate-x-1/2","bottom-right":"bottom-0 right-0"},size:{sm:"max-w-xs",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-full",fit:"max-w-fit"}},defaultVariants:{variant:"black",position:"top-center",size:"fit"}}),di=l.forwardRef(({className:e,variant:t,position:n,size:r,...o},i)=>s.jsx(ii,{ref:i,className:P.cn(Ml({variant:t,position:n,size:r}),e),...o,duration:2500}));di.displayName=ii.displayName;const fi=l.forwardRef(({className:e,...t},n)=>s.jsx(ci,{ref:n,className:P.cn(ie({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));fi.displayName=ci.displayName;const pi=l.forwardRef(({className:e,...t},n)=>s.jsx(li,{ref:n,className:P.cn("absolute right-1.5 top-1.5 rounded-md p-1 text-grey-50/50 opacity-0 transition-opacity hover:text-grey-50 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.white]:text-grey-300 group-[.white]:hover:text-grey-50 group-[.white]:focus:ring-grey-400",e),"toast-close":"",...t,children:s.jsx(rt.Cancel,{size:"12"})}));pi.displayName=li.displayName;const hi=l.forwardRef(({className:e,...t},n)=>s.jsx(si,{ref:n,className:P.cn("text-sm font-semibold",e),...t}));hi.displayName=si.displayName;const mi=l.forwardRef(({className:e,...t},n)=>s.jsx(ai,{ref:n,className:P.cn("text-sm font-normal",e),...t}));mi.displayName=ai.displayName;function Ol(){const{toasts:e}=P.toaster(),t=e.reduce((n,r)=>{const o=r.position||"center";return n[o]||(n[o]=[]),n[o].push(r),n},{});return s.jsx(S.Fragment,{children:Object.entries(t).map(([n,r])=>s.jsxs(Sl,{children:[s.jsx(ui,{className:P.cn(n==="top-left"&&"top-0 left-0",n==="top-center"&&"top-0 left-1/2 transform -translate-x-1/2",n==="top-right"&&"top-0 right-0 items-end",n==="bottom-left"&&"bottom-0 left-0",n==="bottom-center"&&"bottom-0 left-1/2 transform -translate-x-1/2",n==="bottom-right"&&"bottom-0 right-0 items-end")}),r.map(function({id:o,title:i,description:a,action:c,actionText:d="확인",closeButton:u=!1,variant:f="black",...p}){const m=f==="black"?"solid":"outline";return s.jsxs(di,{variant:f,position:n,...p,children:[s.jsxs("div",{className:"grid gap-1",children:[i&&s.jsx(hi,{children:i}),a&&s.jsx(mi,{children:a})]}),c&&s.jsx(fi,{altText:o,onClick:c,className:P.cn(ie({variant:m,size:"sm",theme:"secondary"})),children:d}),u&&s.jsx(pi,{})]},o)})]},n))})}const Ll=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState(null);return S.useEffect(()=>{n(!0);let i=document.getElementById("portal");i||(i=document.createElement("div"),i.id="portal",document.body.appendChild(i)),o(i)},[]),!t||!r?null:$t.createPortal(e,r)},Dl=["top","right","bottom","left"],se=Math.min,Z=Math.max,Qe=Math.round,Ze=Math.floor,ae=e=>({x:e,y:e}),_l={left:"right",right:"left",bottom:"top",top:"bottom"},Il={start:"end",end:"start"};function _t(e,t,n){return Z(e,se(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function vn(e){return e==="x"?"y":"x"}function gn(e){return e==="y"?"height":"width"}function ce(e){return["top","bottom"].includes(te(e))?"y":"x"}function xn(e){return vn(ce(e))}function kl(e,t,n){n===void 0&&(n=!1);const r=Pe(e),o=xn(e),i=gn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Je(a)),[a,Je(a)]}function Hl(e){const t=Je(e);return[It(e),t,It(t)]}function It(e){return e.replace(/start|end/g,t=>Il[t])}function Vl(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Fl(e,t,n,r){const o=Pe(e);let i=Vl(te(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(It)))),i}function Je(e){return e.replace(/left|right|bottom|top/g,t=>_l[t])}function $l(e){return{top:0,right:0,bottom:0,left:0,...e}}function vi(e){return typeof e!="number"?$l(e):{top:e,right:e,bottom:e,left:e}}function et(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Xn(e,t,n){let{reference:r,floating:o}=e;const i=ce(t),a=xn(t),c=gn(a),d=te(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let v;switch(d){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Pe(t)){case"start":v[a]-=m*(n&&u?-1:1);break;case"end":v[a]+=m*(n&&u?-1:1);break}return v}const Bl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Xn(u,r,d),m=r,v={},x=0;for(let h=0;h<c.length;h++){const{name:g,fn:C}=c[h],{x:w,y,data:b,reset:A}=await C({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,p=y??p,v={...v,[g]:{...v[g],...b}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(u=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:p}=Xn(u,m,d)),h=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:v}};async function Oe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=ee(t,e),x=vi(v),g=c[m?p==="floating"?"reference":"floating":p],C=et(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:d})),w=p==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},A=et(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:y,strategy:d}):w);return{top:(C.top-A.top+x.top)/b.y,bottom:(A.bottom-C.bottom+x.bottom)/b.y,left:(C.left-A.left+x.left)/b.x,right:(A.right-C.right+x.right)/b.x}}const Zl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:d}=t,{element:u,padding:f=0}=ee(e,t)||{};if(u==null)return{};const p=vi(f),m={x:n,y:r},v=xn(o),x=gn(v),h=await a.getDimensions(u),g=v==="y",C=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",b=i.reference[x]+i.reference[v]-m[v]-i.floating[x],A=m[v]-i.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let R=E?E[y]:0;(!R||!await(a.isElement==null?void 0:a.isElement(E)))&&(R=c.floating[y]||i.floating[x]);const N=b/2-A/2,M=R/2-h[x]/2-1,O=se(p[C],M),F=se(p[w],M),V=O,k=R-h[x]-F,j=R/2-h[x]/2+N,_=_t(V,j,k),L=!d.arrow&&Pe(o)!=null&&j!==_&&i.reference[x]/2-(j<V?O:F)-h[x]/2<0,H=L?j<V?j-V:j-k:0;return{[v]:m[v]+H,data:{[v]:_,centerOffset:j-_-H,...L&&{alignmentOffset:H}},reset:L}}}),Wl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=ee(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=te(o),w=ce(c),y=te(c)===c,b=await(d.isRTL==null?void 0:d.isRTL(u.floating)),A=m||(y||!h?[Je(c)]:Hl(c)),E=x!=="none";!m&&E&&A.push(...Fl(c,h,x,b));const R=[c,...A],N=await Oe(t,g),M=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&M.push(N[C]),p){const j=kl(o,a,b);M.push(N[j[0]],N[j[1]])}if(O=[...O,{placement:o,overflows:M}],!M.every(j=>j<=0)){var F,V;const j=(((F=i.flip)==null?void 0:F.index)||0)+1,_=R[j];if(_)return{data:{index:j,overflows:O},reset:{placement:_}};let L=(V=O.filter(H=>H.overflows[0]<=0).sort((H,T)=>H.overflows[1]-T.overflows[1])[0])==null?void 0:V.placement;if(!L)switch(v){case"bestFit":{var k;const H=(k=O.filter(T=>{if(E){const $=ce(T.placement);return $===w||$==="y"}return!0}).map(T=>[T.placement,T.overflows.filter($=>$>0).reduce(($,U)=>$+U,0)]).sort((T,$)=>T[1]-$[1])[0])==null?void 0:k[0];H&&(L=H);break}case"initialPlacement":L=c;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function qn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qn(e){return Dl.some(t=>e[t]>=0)}const Ul=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ee(e,t);switch(r){case"referenceHidden":{const i=await Oe(t,{...o,elementContext:"reference"}),a=qn(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qn(a)}}}case"escaped":{const i=await Oe(t,{...o,altBoundary:!0}),a=qn(i,n.floating);return{data:{escapedOffsets:a,escaped:Qn(a)}}}default:return{}}}}};async function Kl(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=te(n),c=Pe(n),d=ce(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&d?-1:1,p=ee(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),d?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const Yl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,d=await Kl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:a}}}}},zl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:C,y:w}=g;return{x:C,y:w}}},...d}=ee(e,t),u={x:n,y:r},f=await Oe(t,d),p=ce(te(o)),m=vn(p);let v=u[m],x=u[p];if(i){const g=m==="y"?"top":"left",C=m==="y"?"bottom":"right",w=v+f[g],y=v-f[C];v=_t(w,v,y)}if(a){const g=p==="y"?"top":"left",C=p==="y"?"bottom":"right",w=x+f[g],y=x-f[C];x=_t(w,x,y)}const h=c.fn({...t,[m]:v,[p]:x});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[p]:a}}}}}},Gl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=ee(e,t),f={x:n,y:r},p=ce(o),m=vn(p);let v=f[m],x=f[p];const h=ee(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const y=m==="y"?"height":"width",b=i.reference[m]-i.floating[y]+g.mainAxis,A=i.reference[m]+i.reference[y]-g.mainAxis;v<b?v=b:v>A&&(v=A)}if(u){var C,w;const y=m==="y"?"width":"height",b=["top","left"].includes(te(o)),A=i.reference[p]-i.floating[y]+(b&&((C=a.offset)==null?void 0:C[p])||0)+(b?0:g.crossAxis),E=i.reference[p]+i.reference[y]+(b?0:((w=a.offset)==null?void 0:w[p])||0)-(b?g.crossAxis:0);x<A?x=A:x>E&&(x=E)}return{[m]:v,[p]:x}}}},Xl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:d=()=>{},...u}=ee(e,t),f=await Oe(t,u),p=te(o),m=Pe(o),v=ce(o)==="y",{width:x,height:h}=i.floating;let g,C;p==="top"||p==="bottom"?(g=p,C=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(C=p,g=m==="end"?"top":"bottom");const w=h-f.top-f.bottom,y=x-f.left-f.right,b=se(h-f[g],w),A=se(x-f[C],y),E=!t.middlewareData.shift;let R=b,N=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),E&&!m){const O=Z(f.left,0),F=Z(f.right,0),V=Z(f.top,0),k=Z(f.bottom,0);v?N=x-2*(O!==0||F!==0?O+F:Z(f.left,f.right)):R=h-2*(V!==0||k!==0?V+k:Z(f.top,f.bottom))}await d({...t,availableWidth:N,availableHeight:R});const M=await a.getDimensions(c.floating);return x!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function dt(){return typeof window<"u"}function Te(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=(gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gi(e){return dt()?e instanceof Node||e instanceof W(e).Node:!1}function Y(e){return dt()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return dt()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Jn(e){return!dt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function De(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ql(e){return["table","td","th"].includes(Te(e))}function ft(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Cn(e){const t=wn(),n=Y(e)?z(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Ql(e){let t=le(e);for(;q(t)&&!Ae(t);){if(Cn(t))return t;if(ft(t))return null;t=le(t)}return null}function wn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Te(e))}function z(e){return W(e).getComputedStyle(e)}function pt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function le(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jn(e)&&e.host||Q(e);return Jn(t)?t.host:t}function xi(e){const t=le(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&De(t)?t:xi(t)}function Le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=xi(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o);if(i){const c=kt(a);return t.concat(a,a.visualViewport||[],De(o)?o:[],c&&n?Le(c):[])}return t.concat(o,Le(o,[],n))}function kt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ci(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=q(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Qe(n)!==i||Qe(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function yn(e){return Y(e)?e:e.contextElement}function ye(e){const t=yn(e);if(!q(t))return ae(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ci(t);let a=(i?Qe(n.width):n.width)/r,c=(i?Qe(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Jl=ae(0);function wi(e){const t=W(e);return!wn()||!t.visualViewport?Jl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function e1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function de(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=yn(e);let a=ae(1);t&&(r?Y(r)&&(a=ye(r)):a=ye(e));const c=e1(i,n,r)?wi(i):ae(0);let d=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(i){const m=W(i),v=r&&Y(r)?W(r):r;let x=m,h=kt(x);for(;h&&r&&v!==x;){const g=ye(h),C=h.getBoundingClientRect(),w=z(h),y=C.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=C.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;d*=g.x,u*=g.y,f*=g.x,p*=g.y,d+=y,u+=b,x=W(h),h=kt(x)}}return et({width:f,height:p,x:d,y:u})}function t1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Q(r),c=t?ft(t.floating):!1;if(r===a||c&&i)return n;let d={scrollLeft:0,scrollTop:0},u=ae(1);const f=ae(0),p=q(r);if((p||!p&&!i)&&((Te(r)!=="body"||De(a))&&(d=pt(r)),q(r))){const m=de(r);u=ye(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+f.x,y:n.y*u.y-d.scrollTop*u.y+f.y}}function n1(e){return Array.from(e.getClientRects())}function Ht(e,t){const n=pt(e).scrollLeft;return t?t.left+n:de(Q(e)).left+n}function r1(e){const t=Q(e),n=pt(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ht(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(a+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}function o1(e,t){const n=W(e),r=Q(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,d=0;if(o){i=o.width,a=o.height;const u=wn();(!u||u&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:i,height:a,x:c,y:d}}function i1(e,t){const n=de(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=q(e)?ye(e):ae(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,d=o*i.x,u=r*i.y;return{width:a,height:c,x:d,y:u}}function er(e,t,n){let r;if(t==="viewport")r=o1(e,n);else if(t==="document")r=r1(Q(e));else if(Y(t))r=i1(t,n);else{const o=wi(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return et(r)}function yi(e,t){const n=le(e);return n===t||!Y(n)||Ae(n)?!1:z(n).position==="fixed"||yi(n,t)}function s1(e,t){const n=t.get(e);if(n)return n;let r=Le(e,[],!1).filter(c=>Y(c)&&Te(c)!=="body"),o=null;const i=z(e).position==="fixed";let a=i?le(e):e;for(;Y(a)&&!Ae(a);){const c=z(a),d=Cn(a);!d&&c.position==="fixed"&&(o=null),(i?!d&&!o:!d&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||De(a)&&!d&&yi(e,a))?r=r.filter(f=>f!==a):o=c,a=le(a)}return t.set(e,r),r}function a1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ft(t)?[]:s1(t,this._c):[].concat(n),r],c=a[0],d=a.reduce((u,f)=>{const p=er(t,f,o);return u.top=Z(p.top,u.top),u.right=se(p.right,u.right),u.bottom=se(p.bottom,u.bottom),u.left=Z(p.left,u.left),u},er(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c1(e){const{width:t,height:n}=Ci(e);return{width:t,height:n}}function l1(e,t,n){const r=q(t),o=Q(t),i=n==="fixed",a=de(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=ae(0);if(r||!r&&!i)if((Te(t)!=="body"||De(o))&&(c=pt(t)),r){const v=de(t,!0,i,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else o&&(d.x=Ht(o));let u=0,f=0;if(o&&!r&&!i){const v=o.getBoundingClientRect();f=v.top+c.scrollTop,u=v.left+c.scrollLeft-Ht(o,v)}const p=a.left+c.scrollLeft-d.x-u,m=a.top+c.scrollTop-d.y-f;return{x:p,y:m,width:a.width,height:a.height}}function jt(e){return z(e).position==="static"}function tr(e,t){if(!q(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function bi(e,t){const n=W(e);if(ft(e))return n;if(!q(e)){let o=le(e);for(;o&&!Ae(o);){if(Y(o)&&!jt(o))return o;o=le(o)}return n}let r=tr(e,t);for(;r&&ql(r)&&jt(r);)r=tr(r,t);return r&&Ae(r)&&jt(r)&&!Cn(r)?n:r||Ql(e)||n}const u1=async function(e){const t=this.getOffsetParent||bi,n=this.getDimensions,r=await n(e.floating);return{reference:l1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function d1(e){return z(e).direction==="rtl"}const f1={convertOffsetParentRelativeRectToViewportRelativeRect:t1,getDocumentElement:Q,getClippingRect:a1,getOffsetParent:bi,getElementRects:u1,getClientRects:n1,getDimensions:c1,getScale:ye,isElement:Y,isRTL:d1};function p1(e,t){let n=null,r;const o=Q(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const{left:u,top:f,width:p,height:m}=e.getBoundingClientRect();if(c||t(),!p||!m)return;const v=Ze(f),x=Ze(o.clientWidth-(u+p)),h=Ze(o.clientHeight-(f+m)),g=Ze(u),w={rootMargin:-v+"px "+-x+"px "+-h+"px "+-g+"px",threshold:Z(0,se(1,d))||1};let y=!0;function b(A){const E=A[0].intersectionRatio;if(E!==d){if(!y)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return a(!0),i}function h1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=yn(e),f=o||i?[...u?Le(u):[],...Le(t)]:[];f.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const p=u&&c?p1(u,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),u&&!d&&v.observe(u),v.observe(t));let x,h=d?de(e):null;d&&g();function g(){const C=de(e);h&&(C.x!==h.x||C.y!==h.y||C.width!==h.width||C.height!==h.height)&&n(),h=C,x=requestAnimationFrame(g)}return n(),()=>{var C;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(C=v)==null||C.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const m1=Yl,v1=zl,g1=Wl,x1=Xl,C1=Ul,nr=Zl,w1=Gl,y1=(e,t,n)=>{const r=new Map,o={platform:f1,...n},i={...o.platform,_c:r};return Bl(e,t,{...o,platform:i})};var Ke=typeof document<"u"?S.useLayoutEffect:S.useEffect;function tt(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!tt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ai(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rr(e,t){const n=Ai(e);return Math.round(t*n)/n}function Pt(e){const t=l.useRef(e);return Ke(()=>{t.current=e}),t}function b1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(r);tt(m,r)||v(r);const[x,h]=l.useState(null),[g,C]=l.useState(null),w=l.useCallback(T=>{T!==E.current&&(E.current=T,h(T))},[]),y=l.useCallback(T=>{T!==R.current&&(R.current=T,C(T))},[]),b=i||x,A=a||g,E=l.useRef(null),R=l.useRef(null),N=l.useRef(f),M=d!=null,O=Pt(d),F=Pt(o),V=Pt(u),k=l.useCallback(()=>{if(!E.current||!R.current)return;const T={placement:t,strategy:n,middleware:m};F.current&&(T.platform=F.current),y1(E.current,R.current,T).then($=>{const U={...$,isPositioned:V.current!==!1};j.current&&!tt(N.current,U)&&(N.current=U,Bt.flushSync(()=>{p(U)}))})},[m,t,n,F,V]);Ke(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const j=l.useRef(!1);Ke(()=>(j.current=!0,()=>{j.current=!1}),[]),Ke(()=>{if(b&&(E.current=b),A&&(R.current=A),b&&A){if(O.current)return O.current(b,A,k);k()}},[b,A,k,O,M]);const _=l.useMemo(()=>({reference:E,floating:R,setReference:w,setFloating:y}),[w,y]),L=l.useMemo(()=>({reference:b,floating:A}),[b,A]),H=l.useMemo(()=>{const T={position:n,left:0,top:0};if(!L.floating)return T;const $=rr(L.floating,f.x),U=rr(L.floating,f.y);return c?{...T,transform:"translate("+$+"px, "+U+"px)",...Ai(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:U}},[n,c,L.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:k,refs:_,elements:L,floatingStyles:H}),[f,k,_,L,H])}const A1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nr({element:r.current,padding:o}).fn(n):{}:r?nr({element:r,padding:o}).fn(n):{}}}},E1=(e,t)=>({...m1(e),options:[e,t]}),R1=(e,t)=>({...v1(e),options:[e,t]}),j1=(e,t)=>({...w1(e),options:[e,t]}),P1=(e,t)=>({...g1(e),options:[e,t]}),T1=(e,t)=>({...x1(e),options:[e,t]}),N1=(e,t)=>({...C1(e),options:[e,t]}),S1=(e,t)=>({...A1(e),options:[e,t]});var M1="Arrow",Ei=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.jsx(I.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ei.displayName=M1;var O1=Ei;function L1(e,t=[]){let n=[];function r(i,a){const c=l.createContext(a),d=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...x}=p,h=(m==null?void 0:m[e][d])||c,g=l.useMemo(()=>x,Object.values(x));return s.jsx(h.Provider,{value:g,children:v})}function f(p,m){const v=(m==null?void 0:m[e][d])||c,x=l.useContext(v);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(c){const d=(c==null?void 0:c[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,D1(o,...t)]}function D1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:d,scopeName:u})=>{const p=d(i)[`__scope${u}`];return{...c,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _1(e){const[t,n]=l.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const d=i.borderBoxSize,u=Array.isArray(d)?d[0]:d;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bn="Popper",[Ri,ji]=L1(bn),[I1,Pi]=Ri(bn),Ti=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return s.jsx(I1,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ti.displayName=bn;var Ni="PopperAnchor",Si=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Pi(Ni,n),a=l.useRef(null),c=B(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:s.jsx(I.div,{...o,ref:c})});Si.displayName=Ni;var An="PopperContent",[k1,H1]=Ri(An),Mi=l.forwardRef((e,t)=>{var Rn,jn,Pn,Tn,Nn,Sn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,g=Pi(An,n),[C,w]=l.useState(null),y=B(t,Se=>w(Se)),[b,A]=l.useState(null),E=_1(b),R=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,M=r+(i!=="center"?"-"+i:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(u)?u:[u],V=F.length>0,k={padding:O,boundary:F.filter(F1),altBoundary:V},{refs:j,floatingStyles:_,placement:L,isPositioned:H,middlewareData:T}=b1({strategy:"fixed",placement:M,whileElementsMounted:(...Se)=>h1(...Se,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[E1({mainAxis:o+N,alignmentAxis:a}),d&&R1({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?j1():void 0,...k}),d&&P1({...k}),T1({...k,apply:({elements:Se,rects:Mn,availableWidth:Ki,availableHeight:Yi})=>{const{width:zi,height:Gi}=Mn.reference,Ie=Se.floating.style;Ie.setProperty("--radix-popper-available-width",`${Ki}px`),Ie.setProperty("--radix-popper-available-height",`${Yi}px`),Ie.setProperty("--radix-popper-anchor-width",`${zi}px`),Ie.setProperty("--radix-popper-anchor-height",`${Gi}px`)}}),b&&S1({element:b,padding:c}),$1({arrowWidth:R,arrowHeight:N}),m&&N1({strategy:"referenceHidden",...k})]}),[$,U]=Di(L),pe=K(x);J(()=>{H&&(pe==null||pe())},[H,pe]);const Ne=(Rn=T.arrow)==null?void 0:Rn.x,he=(jn=T.arrow)==null?void 0:jn.y,_e=((Pn=T.arrow)==null?void 0:Pn.centerOffset)!==0,[Wi,Ui]=l.useState();return J(()=>{C&&Ui(window.getComputedStyle(C).zIndex)},[C]),s.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:H?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Wi,"--radix-popper-transform-origin":[(Tn=T.transformOrigin)==null?void 0:Tn.x,(Nn=T.transformOrigin)==null?void 0:Nn.y].join(" "),...((Sn=T.hide)==null?void 0:Sn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(k1,{scope:n,placedSide:$,onArrowChange:A,arrowX:Ne,arrowY:he,shouldHideArrow:_e,children:s.jsx(I.div,{"data-side":$,"data-align":U,...h,ref:y,style:{...h.style,animation:H?void 0:"none"}})})})});Mi.displayName=An;var Oi="PopperArrow",V1={top:"bottom",right:"left",bottom:"top",left:"right"},Li=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=H1(Oi,r),a=V1[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(O1,{...o,ref:n,style:{...o.style,display:"block"}})})});Li.displayName=Oi;function F1(e){return e!==null}var $1=e=>({name:"transformOrigin",options:e,fn(t){var g,C,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[u,f]=Di(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((C=o.arrow)==null?void 0:C.x)??0)+c/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+d/2;let x="",h="";return u==="bottom"?(x=a?p:`${m}px`,h=`${-d}px`):u==="top"?(x=a?p:`${m}px`,h=`${r.floating.height+d}px`):u==="right"?(x=`${-d}px`,h=a?p:`${v}px`):u==="left"&&(x=`${r.floating.width+d}px`,h=a?p:`${v}px`),{data:{x,y:h}}}});function Di(e){const[t,n="center"]=e.split("-");return[t,n]}var B1=Ti,Z1=Si,W1=Mi,U1=Li,[ht,vu]=Re("Tooltip",[ji]),mt=ji(),_i="TooltipProvider",K1=700,Vt="tooltip.open",[Y1,En]=ht(_i),Ii=e=>{const{__scopeTooltip:t,delayDuration:n=K1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,c]=l.useState(!0),d=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),s.jsx(Y1,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:l.useCallback(f=>{d.current=f},[]),disableHoverableContent:o,children:i})};Ii.displayName=_i;var vt="Tooltip",[z1,gt]=ht(vt),ki=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,d=En(vt,e.__scopeTooltip),u=mt(t),[f,p]=l.useState(null),m=xe(),v=l.useRef(0),x=a??d.disableHoverableContent,h=c??d.delayDuration,g=l.useRef(!1),[C=!1,w]=je({prop:r,defaultProp:o,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(Vt))):d.onClose(),i==null||i(R)}}),y=l.useMemo(()=>C?g.current?"delayed-open":"instant-open":"closed",[C]),b=l.useCallback(()=>{window.clearTimeout(v.current),g.current=!1,w(!0)},[w]),A=l.useCallback(()=>{window.clearTimeout(v.current),w(!1)},[w]),E=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0)},h)},[h,w]);return l.useEffect(()=>()=>window.clearTimeout(v.current),[]),s.jsx(B1,{...u,children:s.jsx(z1,{scope:t,contentId:m,open:C,stateAttribute:y,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{d.isOpenDelayed?E():b()},[d.isOpenDelayed,E,b]),onTriggerLeave:l.useCallback(()=>{x?A():window.clearTimeout(v.current)},[A,x]),onOpen:b,onClose:A,disableHoverableContent:x,children:n})})};ki.displayName=vt;var Ft="TooltipTrigger",Hi=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gt(Ft,n),i=En(Ft,n),a=mt(n),c=l.useRef(null),d=B(t,c,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(Z1,{asChild:!0,...a,children:s.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:D(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:D(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:D(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:D(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:D(e.onBlur,o.onClose),onClick:D(e.onClick,o.onClose)})})});Hi.displayName=Ft;var G1="TooltipPortal",[gu,X1]=ht(G1,{forceMount:void 0}),Ee="TooltipContent",Vi=l.forwardRef((e,t)=>{const n=X1(Ee,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=gt(Ee,e.__scopeTooltip);return s.jsx(fe,{present:r||a.open,children:a.disableHoverableContent?s.jsx(Fi,{side:o,...i,ref:t}):s.jsx(q1,{side:o,...i,ref:t})})}),q1=l.forwardRef((e,t)=>{const n=gt(Ee,e.__scopeTooltip),r=En(Ee,e.__scopeTooltip),o=l.useRef(null),i=B(t,o),[a,c]=l.useState(null),{trigger:d,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=l.useCallback(()=>{c(null),p(!1)},[p]),v=l.useCallback((x,h)=>{const g=x.currentTarget,C={x:x.clientX,y:x.clientY},w=tu(C,g.getBoundingClientRect()),y=nu(C,w),b=ru(h.getBoundingClientRect()),A=iu([...y,...b]);c(A),p(!0)},[p]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(d&&f){const x=g=>v(g,f),h=g=>v(g,d);return d.addEventListener("pointerleave",x),f.addEventListener("pointerleave",h),()=>{d.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",h)}}},[d,f,v,m]),l.useEffect(()=>{if(a){const x=h=>{const g=h.target,C={x:h.clientX,y:h.clientY},w=(d==null?void 0:d.contains(g))||(f==null?void 0:f.contains(g)),y=!ou(C,a);w?m():y&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,f,a,u,m]),s.jsx(Fi,{...e,ref:i})}),[Q1,J1]=ht(vt,{isInside:!1}),Fi=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,d=gt(Ee,n),u=mt(n),{onClose:f}=d;return l.useEffect(()=>(document.addEventListener(Vt,f),()=>document.removeEventListener(Vt,f)),[f]),l.useEffect(()=>{if(d.trigger){const p=m=>{const v=m.target;v!=null&&v.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),s.jsx(st,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(W1,{"data-state":d.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Zt,{children:r}),s.jsx(Q1,{scope:n,isInside:!0,children:s.jsx(dl,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Vi.displayName=Ee;var $i="TooltipArrow",eu=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=mt(n);return J1($i,n).isInside?null:s.jsx(U1,{...o,...r,ref:t})});eu.displayName=$i;function tu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ru(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ou(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i].x,d=t[i].y,u=t[a].x,f=t[a].y;d>r!=f>r&&n<(u-c)*(r-d)/(f-d)+c&&(o=!o)}return o}function iu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),su(t)}function su(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var au=Ii,cu=ki,lu=Hi,Bi=Vi;const uu=au,du=cu,fu=lu,Zi=l.forwardRef(({className:e,variant:t="primary",size:n="pc",position:r="top-center",arrow:o=!0,sideOffset:i=8,icLeft:a,icRight:c,...d},u)=>{const f={primary:"bg-main-600 text-white",secondary:"bg-grey-800 text-grey-50"},p={pc:"p-2 text-sm",mobile:"p-2 text-[13px]"},m={"top-left":{classes:"absolute left-3 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"start"},"top-center":{classes:"absolute left-1/2 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"center"},"top-right":{classes:"absolute right-3 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"end"},"bottom-left":{classes:"absolute left-3 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"start"},"bottom-center":{classes:"absolute left-1/2 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"center"},"bottom-right":{classes:"absolute right-3 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"end"}}[r];return s.jsxs(Bi,{ref:u,avoidCollisions:!1,sideOffset:i,side:m.side,align:m.align,className:P.cn("relative z-50 rounded-lg my-1"),...d,children:[o&&s.jsx("div",{className:P.cn("z-0 w-3 h-3 bg-main-600 opacity-90 rotate-45 rounded-[2px]",f[t],m.classes)}),s.jsx("div",{className:"absolute z-10 inset-0 bg-white"}),s.jsxs("div",{className:P.cn("relative z-20 flex items-center font-normal bg-opacity-90 rounded",f[t],p[n]),children:[a&&s.jsx("span",{className:"mr-1",children:a}),s.jsx("span",{children:d.children}),c&&s.jsx("span",{className:"ml-1",children:c})]})]})});Zi.displayName=Bi.displayName;exports.Accordion=La;exports.AccordionContent=Mr;exports.AccordionItem=Nr;exports.AccordionTrigger=Sr;exports.Alert=Io;exports.Button=Xe;exports.Dialog=Zo;exports.Icon=rt;exports.Input=Dr;exports.Modal=Wo;exports.PortalContainer=Ll;exports.Toaster=Ol;exports.Tooltip=du;exports.TooltipContent=Zi;exports.TooltipProvider=uu;exports.TooltipTrigger=fu;exports.buttonVariants=ie;
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ol=vo,il=go,Po=xo,To=Co,No=Eo,So=jo,Mo=yo,Oo=Ao;const Lo=ol,sl=il,Do=l.forwardRef(({className:e,...t},n)=>s.jsx(Po,{className:P.cn("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Do.displayName=Po.displayName;const al={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},cn=l.forwardRef(({className:e,size:t="sm",...n},r)=>s.jsxs(sl,{children:[s.jsx(Do,{}),s.jsx(To,{ref:r,className:P.cn("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-4 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",al[t],e),...n})]}));cn.displayName=To.displayName;const ln=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});ln.displayName="AlertDialogHeader";const un=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});un.displayName="AlertDialogFooter";const dn=l.forwardRef(({className:e,...t},n)=>s.jsx(Mo,{ref:n,className:P.cn("whitespace-pre-wrap text-semibold16",e),...t}));dn.displayName=Mo.displayName;const Me=l.forwardRef(({className:e,...t},n)=>s.jsx(Oo,{ref:n,className:P.cn("whitespace-pre-wrap text-xs font-normal text-grey-600",e),...t}));Me.displayName=Oo.displayName;const fn=l.forwardRef(({className:e,...t},n)=>s.jsx(No,{ref:n,className:P.cn(ie({size:"sm"}),e),...t}));fn.displayName=No.displayName;const _o=l.forwardRef(({className:e,...t},n)=>s.jsx(So,{ref:n,className:P.cn(ie({variant:"outline",size:"sm",theme:"secondary"}),"mt-2 w-1/2 sm:mt-0",e),...t}));_o.displayName=So.displayName;const Io=({title:e="알림",description:t,confirmText:n="확인",onConfirm:r,size:o="sm",onClose:i})=>s.jsx(Lo,{open:!0,onOpenChange:a=>{!a&&i&&i()},children:s.jsxs(cn,{size:o,children:[s.jsxs(ln,{children:[s.jsx(dn,{children:e}),s.jsx(Me,{children:t})]}),s.jsx(un,{children:s.jsx(fn,{className:P.cn("w-full font-normal"),onClick:()=>{i&&i(),r&&r()},children:n})})]})});Io.displayName="Alert";const cl=po,ll=ho,ko=l.forwardRef(({className:e,...t},n)=>s.jsx(nn,{ref:n,className:P.cn("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ko.displayName=nn.displayName;const Ho=l.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(ll,{children:[s.jsx(ko,{}),s.jsxs(rn,{ref:r,className:P.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-xl translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...n,children:[t,s.jsxs(an,{className:"absolute right-4 top-5 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[s.jsx(rt.Cancel,{size:"16"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ho.displayName=rn.displayName;const Vo=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col text-left md:text-center",e),...t});Vo.displayName="DialogHeader";const Fo=({className:e,...t})=>s.jsx("div",{className:P.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fo.displayName="DialogFooter";const $o=l.forwardRef(({className:e,...t},n)=>s.jsx(on,{ref:n,className:P.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));$o.displayName=on.displayName;const Bo=l.forwardRef(({className:e,...t},n)=>s.jsx(sn,{ref:n,className:P.cn("text-sm text-muted",e),...t}));Bo.displayName=sn.displayName;const Zo=l.forwardRef(({id:e,title:t,description:n,onConfirm:r,onCancel:o,onClose:i,confirmText:a="확인",cancelText:c="취소",size:d="sm",content:u,className:f,...p},m)=>s.jsx(cl,{open:!0,onOpenChange:v=>{!v&&i&&i()},children:s.jsxs(Ho,{className:P.cn("max-w-[328px] gap-0 px-0 py-0 md:max-w-[600px]",f),...p,ref:m,children:[s.jsxs(Vo,{className:"border-b border-b-border",children:[s.jsx($o,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),n&&s.jsx(Bo,{children:n})]}),u&&s.jsx("div",{children:u}),s.jsxs(Fo,{children:[o&&s.jsx(Xe,{onClick:()=>{o&&o(),i&&i()},className:P.cn(ie({variant:"outline",size:"sm"}),"w-full sm:w-auto"),children:c}),r&&s.jsx(Xe,{onClick:()=>{r&&r(),i&&i()},className:P.cn(ie({size:"sm"}),"w-full sm:w-auto"),children:a})]})]})}));Zo.displayName="Dialog";const Wo=l.forwardRef(({title:e,description:t,subDescription:n,contents:r,onConfirm:o,confirmText:i="확인",cancelText:a="취소",size:c="sm",className:d,onClose:u,...f},p)=>s.jsx(Lo,{open:!0,onOpenChange:m=>{!m&&u&&u()},children:s.jsxs(cn,{size:c,className:d,...f,ref:p,children:[s.jsxs(ln,{children:[s.jsx(dn,{children:e}),t&&s.jsx(Me,{className:"text-sm text-grey-800",children:t}),n&&s.jsx(Me,{className:"text-xs text-grey-600",children:n})]}),r&&s.jsx(Me,{className:"text-sm font-normal text-grey-600",children:r}),s.jsxs(un,{children:[s.jsx(_o,{className:P.cn("w-full font-normal"),children:a}),s.jsx(fn,{className:P.cn("w-full font-normal"),onClick:()=>{o&&o()},children:i})]})]})}));Wo.displayName="Modal";var ul="VisuallyHidden",ct=l.forwardRef((e,t)=>s.jsx(I.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ct.displayName=ul;var dl=ct,pn="ToastProvider",[hn,fl,pl]=lr("Toast"),[Uo,mu]=Re("Toast",[pl]),[hl,lt]=Uo(pn),Ko=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[c,d]=l.useState(null),[u,f]=l.useState(0),p=l.useRef(!1),m=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${pn}\`. Expected non-empty \`string\`.`),s.jsx(hn.Provider,{scope:t,children:s.jsx(hl,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:l.useCallback(()=>f(v=>v+1),[]),onToastRemove:l.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:a})})};Ko.displayName=pn;var Yo="ToastViewport",ml=["F8"],Ot="toast.viewportPause",Lt="toast.viewportResume",zo=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ml,label:o="Notifications ({hotkey})",...i}=e,a=lt(Yo,n),c=fl(n),d=l.useRef(null),u=l.useRef(null),f=l.useRef(null),p=l.useRef(null),m=B(t,p,a.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;l.useEffect(()=>{const g=C=>{var y;r.length!==0&&r.every(b=>C[b]||C.code===b)&&((y=p.current)==null||y.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),l.useEffect(()=>{const g=d.current,C=p.current;if(x&&g&&C){const w=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Ot);C.dispatchEvent(E),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(Lt);C.dispatchEvent(E),a.isClosePausedRef.current=!1}},b=E=>{!g.contains(E.relatedTarget)&&y()},A=()=>{g.contains(document.activeElement)||y()};return g.addEventListener("focusin",w),g.addEventListener("focusout",b),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",A),window.addEventListener("blur",w),window.addEventListener("focus",y),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",A),window.removeEventListener("blur",w),window.removeEventListener("focus",y)}}},[x,a.isClosePausedRef]);const h=l.useCallback(({tabbingDirection:g})=>{const w=c().map(y=>{const b=y.ref.current,A=[b,...Tl(b)];return g==="forwards"?A:A.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const g=p.current;if(g){const C=w=>{var A,E,R;const y=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!y){const N=document.activeElement,M=w.shiftKey;if(w.target===g&&M){(A=u.current)==null||A.focus();return}const V=h({tabbingDirection:M?"backwards":"forwards"}),k=V.findIndex(j=>j===N);Rt(V.slice(k+1))?w.preventDefault():M?(E=u.current)==null||E.focus():(R=f.current)==null||R.focus()}};return g.addEventListener("keydown",C),()=>g.removeEventListener("keydown",C)}},[c,h]),s.jsxs(Za,{ref:d,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&s.jsx(Dt,{ref:u,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"forwards"});Rt(g)}}),s.jsx(hn.Slot,{scope:n,children:s.jsx(I.ol,{tabIndex:-1,...i,ref:m})}),x&&s.jsx(Dt,{ref:f,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"backwards"});Rt(g)}})]})});zo.displayName=Yo;var Go="ToastFocusProxy",Dt=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=lt(Go,n);return s.jsx(ct,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const c=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(c))&&r()}})});Dt.displayName=Go;var ut="Toast",vl="toast.swipeStart",gl="toast.swipeMove",xl="toast.swipeCancel",Cl="toast.swipeEnd",Xo=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[c=!0,d]=je({prop:r,defaultProp:o,onChange:i});return s.jsx(fe,{present:n||c,children:s.jsx(bl,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:K(e.onPause),onResume:K(e.onResume),onSwipeStart:D(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:D(e.onSwipeMove,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:D(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:D(e.onSwipeEnd,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),d(!1)})})})});Xo.displayName=ut;var[wl,yl]=Uo(ut,{onClose(){}}),bl=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:v,...x}=e,h=lt(ut,n),[g,C]=l.useState(null),w=B(t,j=>C(j)),y=l.useRef(null),b=l.useRef(null),A=o||h.duration,E=l.useRef(0),R=l.useRef(A),N=l.useRef(0),{onToastAdd:M,onToastRemove:O}=h,F=K(()=>{var _;(g==null?void 0:g.contains(document.activeElement))&&((_=h.viewport)==null||_.focus()),a()}),V=l.useCallback(j=>{!j||j===1/0||(window.clearTimeout(N.current),E.current=new Date().getTime(),N.current=window.setTimeout(F,j))},[F]);l.useEffect(()=>{const j=h.viewport;if(j){const _=()=>{V(R.current),u==null||u()},L=()=>{const H=new Date().getTime()-E.current;R.current=R.current-H,window.clearTimeout(N.current),d==null||d()};return j.addEventListener(Ot,L),j.addEventListener(Lt,_),()=>{j.removeEventListener(Ot,L),j.removeEventListener(Lt,_)}}},[h.viewport,A,d,u,V]),l.useEffect(()=>{i&&!h.isClosePausedRef.current&&V(A)},[i,A,h.isClosePausedRef,V]),l.useEffect(()=>(M(),()=>O()),[M,O]);const k=l.useMemo(()=>g?ri(g):null,[g]);return h.viewport?s.jsxs(s.Fragment,{children:[k&&s.jsx(Al,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:k}),s.jsx(wl,{scope:n,onClose:F,children:Bt.createPortal(s.jsx(hn.ItemSlot,{scope:n,children:s.jsx(Ba,{asChild:!0,onEscapeKeyDown:D(c,()=>{h.isFocusedToastEscapeKeyDownRef.current||F(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(I.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...x,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:D(e.onKeyDown,j=>{j.key==="Escape"&&(c==null||c(j.nativeEvent),j.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:D(e.onPointerDown,j=>{j.button===0&&(y.current={x:j.clientX,y:j.clientY})}),onPointerMove:D(e.onPointerMove,j=>{if(!y.current)return;const _=j.clientX-y.current.x,L=j.clientY-y.current.y,H=!!b.current,T=["left","right"].includes(h.swipeDirection),$=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,U=T?$(0,_):0,pe=T?0:$(0,L),Ne=j.pointerType==="touch"?10:2,he={x:U,y:pe},_e={originalEvent:j,delta:he};H?(b.current=he,Be(gl,p,_e,{discrete:!1})):Gn(he,h.swipeDirection,Ne)?(b.current=he,Be(vl,f,_e,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(_)>Ne||Math.abs(L)>Ne)&&(y.current=null)}),onPointerUp:D(e.onPointerUp,j=>{const _=b.current,L=j.target;if(L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),b.current=null,y.current=null,_){const H=j.currentTarget,T={originalEvent:j,delta:_};Gn(_,h.swipeDirection,h.swipeThreshold)?Be(Cl,v,T,{discrete:!0}):Be(xl,m,T,{discrete:!0}),H.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Al=e=>{const{__scopeToast:t,children:n,...r}=e,o=lt(ut,t),[i,a]=l.useState(!1),[c,d]=l.useState(!1);return jl(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),c?null:s.jsx(qt,{asChild:!0,children:s.jsx(ct,{...r,children:i&&s.jsxs(s.Fragment,{children:[o.label," ",n]})})})},El="ToastTitle",qo=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(I.div,{...r,ref:t})});qo.displayName=El;var Rl="ToastDescription",Qo=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(I.div,{...r,ref:t})});Qo.displayName=Rl;var Jo="ToastAction",ei=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(ni,{altText:n,asChild:!0,children:s.jsx(mn,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jo}\`. Expected non-empty \`string\`.`),null)});ei.displayName=Jo;var ti="ToastClose",mn=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=yl(ti,n);return s.jsx(ni,{asChild:!0,children:s.jsx(I.button,{type:"button",...r,ref:t,onClick:D(e.onClick,o.onClose)})})});mn.displayName=ti;var ni=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return s.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function ri(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Pl(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...ri(r))}}),t}function Be(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ur(o,i):o.dispatchEvent(i)}var Gn=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function jl(e=()=>{}){const t=K(e);J(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Pl(e){return e.nodeType===e.ELEMENT_NODE}function Tl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Nl=Ko,oi=zo,ii=Xo,si=qo,ai=Qo,ci=ei,li=mn;const Sl=Nl,ui=l.forwardRef(({className:e,id:t,...n},r)=>s.jsx(oi,{ref:r,id:t,className:P.cn("fixed z-[100] flex max-h-screen flex-col-reverse gap-2 p-4 outline-none ring-transparent",e),...n}));ui.displayName=oi.displayName;const Ml=Lr("group pointer-events-auto relative flex w-full whitespace-pre-wrap bg-opacity-90 items-end justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},position:{"top-left":"top-0 left-0","top-center":"top-0 left-1/2 transform -translate-x-1/2","top-right":"top-0 right-0","bottom-left":"bottom-0 left-0","bottom-center":"bottom-0 left-1/2 transform -translate-x-1/2","bottom-right":"bottom-0 right-0"},size:{sm:"max-w-xs",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",full:"max-w-full",fit:"max-w-fit"}},defaultVariants:{variant:"black",position:"top-center",size:"fit"}}),di=l.forwardRef(({className:e,variant:t,position:n,size:r,...o},i)=>s.jsx(ii,{ref:i,className:P.cn(Ml({variant:t,position:n,size:r}),e),...o,duration:2500}));di.displayName=ii.displayName;const fi=l.forwardRef(({className:e,...t},n)=>s.jsx(ci,{ref:n,className:P.cn(ie({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));fi.displayName=ci.displayName;const pi=l.forwardRef(({className:e,...t},n)=>s.jsx(li,{ref:n,className:P.cn("absolute right-1.5 top-1.5 rounded-md p-1 text-grey-50/50 opacity-0 transition-opacity hover:text-grey-50 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.white]:text-grey-300 group-[.white]:hover:text-grey-50 group-[.white]:focus:ring-grey-400",e),"toast-close":"",...t,children:s.jsx(rt.Cancel,{size:"12"})}));pi.displayName=li.displayName;const hi=l.forwardRef(({className:e,...t},n)=>s.jsx(si,{ref:n,className:P.cn("text-sm font-semibold",e),...t}));hi.displayName=si.displayName;const mi=l.forwardRef(({className:e,...t},n)=>s.jsx(ai,{ref:n,className:P.cn("text-sm font-normal",e),...t}));mi.displayName=ai.displayName;function Ol(){const{toasts:e}=P.toaster(),t=e.reduce((n,r)=>{const o=r.position||"top-center";return n[o]||(n[o]=[]),n[o].push(r),n},{});return s.jsx(S.Fragment,{children:Object.entries(t).map(([n,r])=>s.jsxs(Sl,{children:[s.jsx(ui,{className:P.cn(n==="top-left"&&"top-16 left-0",n==="top-center"&&"top-16 left-1/2 transform -translate-x-1/2",n==="top-right"&&"top-16 right-0 items-end",n==="bottom-left"&&"bottom-4 left-0",n==="bottom-center"&&"bottom-4 left-1/2 transform -translate-x-1/2",n==="bottom-right"&&"bottom-4 right-0 items-end")}),r.map(function({id:o,title:i,description:a,action:c,actionText:d="확인",closeButton:u=!1,variant:f="black",...p}){const m=f==="black"?"solid":"outline";return s.jsxs(di,{variant:f,position:n,...p,children:[s.jsxs("div",{className:"grid gap-1",children:[i&&s.jsx(hi,{children:i}),a&&s.jsx(mi,{children:a})]}),c&&s.jsx(fi,{altText:o||"toast action",onClick:c,className:P.cn(ie({variant:m,size:"sm",theme:"secondary"})),children:d}),u&&s.jsx(pi,{})]},o)})]},n))})}const Ll=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState(null);return S.useEffect(()=>{n(!0);let i=document.getElementById("portal");i||(i=document.createElement("div"),i.id="portal",document.body.appendChild(i)),o(i)},[]),!t||!r?null:$t.createPortal(e,r)},Dl=["top","right","bottom","left"],se=Math.min,Z=Math.max,Qe=Math.round,Ze=Math.floor,ae=e=>({x:e,y:e}),_l={left:"right",right:"left",bottom:"top",top:"bottom"},Il={start:"end",end:"start"};function _t(e,t,n){return Z(e,se(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function vn(e){return e==="x"?"y":"x"}function gn(e){return e==="y"?"height":"width"}function ce(e){return["top","bottom"].includes(te(e))?"y":"x"}function xn(e){return vn(ce(e))}function kl(e,t,n){n===void 0&&(n=!1);const r=Pe(e),o=xn(e),i=gn(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Je(a)),[a,Je(a)]}function Hl(e){const t=Je(e);return[It(e),t,It(t)]}function It(e){return e.replace(/start|end/g,t=>Il[t])}function Vl(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Fl(e,t,n,r){const o=Pe(e);let i=Vl(te(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(It)))),i}function Je(e){return e.replace(/left|right|bottom|top/g,t=>_l[t])}function $l(e){return{top:0,right:0,bottom:0,left:0,...e}}function vi(e){return typeof e!="number"?$l(e):{top:e,right:e,bottom:e,left:e}}function et(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Xn(e,t,n){let{reference:r,floating:o}=e;const i=ce(t),a=xn(t),c=gn(a),d=te(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let v;switch(d){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Pe(t)){case"start":v[a]-=m*(n&&u?-1:1);break;case"end":v[a]+=m*(n&&u?-1:1);break}return v}const Bl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Xn(u,r,d),m=r,v={},x=0;for(let h=0;h<c.length;h++){const{name:g,fn:C}=c[h],{x:w,y,data:b,reset:A}=await C({x:f,y:p,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,p=y??p,v={...v,[g]:{...v[g],...b}},A&&x<=50&&(x++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(u=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:f,y:p}=Xn(u,m,d)),h=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:v}};async function Oe(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=ee(t,e),x=vi(v),g=c[m?p==="floating"?"reference":"floating":p],C=et(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:d})),w=p==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},A=et(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:y,strategy:d}):w);return{top:(C.top-A.top+x.top)/b.y,bottom:(A.bottom-C.bottom+x.bottom)/b.y,left:(C.left-A.left+x.left)/b.x,right:(A.right-C.right+x.right)/b.x}}const Zl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:d}=t,{element:u,padding:f=0}=ee(e,t)||{};if(u==null)return{};const p=vi(f),m={x:n,y:r},v=xn(o),x=gn(v),h=await a.getDimensions(u),g=v==="y",C=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",b=i.reference[x]+i.reference[v]-m[v]-i.floating[x],A=m[v]-i.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let R=E?E[y]:0;(!R||!await(a.isElement==null?void 0:a.isElement(E)))&&(R=c.floating[y]||i.floating[x]);const N=b/2-A/2,M=R/2-h[x]/2-1,O=se(p[C],M),F=se(p[w],M),V=O,k=R-h[x]-F,j=R/2-h[x]/2+N,_=_t(V,j,k),L=!d.arrow&&Pe(o)!=null&&j!==_&&i.reference[x]/2-(j<V?O:F)-h[x]/2<0,H=L?j<V?j-V:j-k:0;return{[v]:m[v]+H,data:{[v]:_,centerOffset:j-_-H,...L&&{alignmentOffset:H}},reset:L}}}),Wl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=ee(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=te(o),w=ce(c),y=te(c)===c,b=await(d.isRTL==null?void 0:d.isRTL(u.floating)),A=m||(y||!h?[Je(c)]:Hl(c)),E=x!=="none";!m&&E&&A.push(...Fl(c,h,x,b));const R=[c,...A],N=await Oe(t,g),M=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&M.push(N[C]),p){const j=kl(o,a,b);M.push(N[j[0]],N[j[1]])}if(O=[...O,{placement:o,overflows:M}],!M.every(j=>j<=0)){var F,V;const j=(((F=i.flip)==null?void 0:F.index)||0)+1,_=R[j];if(_)return{data:{index:j,overflows:O},reset:{placement:_}};let L=(V=O.filter(H=>H.overflows[0]<=0).sort((H,T)=>H.overflows[1]-T.overflows[1])[0])==null?void 0:V.placement;if(!L)switch(v){case"bestFit":{var k;const H=(k=O.filter(T=>{if(E){const $=ce(T.placement);return $===w||$==="y"}return!0}).map(T=>[T.placement,T.overflows.filter($=>$>0).reduce(($,U)=>$+U,0)]).sort((T,$)=>T[1]-$[1])[0])==null?void 0:k[0];H&&(L=H);break}case"initialPlacement":L=c;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function qn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qn(e){return Dl.some(t=>e[t]>=0)}const Ul=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ee(e,t);switch(r){case"referenceHidden":{const i=await Oe(t,{...o,elementContext:"reference"}),a=qn(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qn(a)}}}case"escaped":{const i=await Oe(t,{...o,altBoundary:!0}),a=qn(i,n.floating);return{data:{escapedOffsets:a,escaped:Qn(a)}}}default:return{}}}}};async function Kl(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=te(n),c=Pe(n),d=ce(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&d?-1:1,p=ee(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),d?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const Yl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,d=await Kl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:a}}}}},zl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:C,y:w}=g;return{x:C,y:w}}},...d}=ee(e,t),u={x:n,y:r},f=await Oe(t,d),p=ce(te(o)),m=vn(p);let v=u[m],x=u[p];if(i){const g=m==="y"?"top":"left",C=m==="y"?"bottom":"right",w=v+f[g],y=v-f[C];v=_t(w,v,y)}if(a){const g=p==="y"?"top":"left",C=p==="y"?"bottom":"right",w=x+f[g],y=x-f[C];x=_t(w,x,y)}const h=c.fn({...t,[m]:v,[p]:x});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:i,[p]:a}}}}}},Gl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=ee(e,t),f={x:n,y:r},p=ce(o),m=vn(p);let v=f[m],x=f[p];const h=ee(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const y=m==="y"?"height":"width",b=i.reference[m]-i.floating[y]+g.mainAxis,A=i.reference[m]+i.reference[y]-g.mainAxis;v<b?v=b:v>A&&(v=A)}if(u){var C,w;const y=m==="y"?"width":"height",b=["top","left"].includes(te(o)),A=i.reference[p]-i.floating[y]+(b&&((C=a.offset)==null?void 0:C[p])||0)+(b?0:g.crossAxis),E=i.reference[p]+i.reference[y]+(b?0:((w=a.offset)==null?void 0:w[p])||0)-(b?g.crossAxis:0);x<A?x=A:x>E&&(x=E)}return{[m]:v,[p]:x}}}},Xl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:c}=t,{apply:d=()=>{},...u}=ee(e,t),f=await Oe(t,u),p=te(o),m=Pe(o),v=ce(o)==="y",{width:x,height:h}=i.floating;let g,C;p==="top"||p==="bottom"?(g=p,C=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(C=p,g=m==="end"?"top":"bottom");const w=h-f.top-f.bottom,y=x-f.left-f.right,b=se(h-f[g],w),A=se(x-f[C],y),E=!t.middlewareData.shift;let R=b,N=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=w),E&&!m){const O=Z(f.left,0),F=Z(f.right,0),V=Z(f.top,0),k=Z(f.bottom,0);v?N=x-2*(O!==0||F!==0?O+F:Z(f.left,f.right)):R=h-2*(V!==0||k!==0?V+k:Z(f.top,f.bottom))}await d({...t,availableWidth:N,availableHeight:R});const M=await a.getDimensions(c.floating);return x!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function dt(){return typeof window<"u"}function Te(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=(gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gi(e){return dt()?e instanceof Node||e instanceof W(e).Node:!1}function Y(e){return dt()?e instanceof Element||e instanceof W(e).Element:!1}function q(e){return dt()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function Jn(e){return!dt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function De(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ql(e){return["table","td","th"].includes(Te(e))}function ft(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Cn(e){const t=wn(),n=Y(e)?z(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Ql(e){let t=le(e);for(;q(t)&&!Ae(t);){if(Cn(t))return t;if(ft(t))return null;t=le(t)}return null}function wn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Te(e))}function z(e){return W(e).getComputedStyle(e)}function pt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function le(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jn(e)&&e.host||Q(e);return Jn(t)?t.host:t}function xi(e){const t=le(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&De(t)?t:xi(t)}function Le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=xi(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o);if(i){const c=kt(a);return t.concat(a,a.visualViewport||[],De(o)?o:[],c&&n?Le(c):[])}return t.concat(o,Le(o,[],n))}function kt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ci(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=q(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Qe(n)!==i||Qe(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function yn(e){return Y(e)?e:e.contextElement}function ye(e){const t=yn(e);if(!q(t))return ae(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ci(t);let a=(i?Qe(n.width):n.width)/r,c=(i?Qe(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Jl=ae(0);function wi(e){const t=W(e);return!wn()||!t.visualViewport?Jl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function e1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function de(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=yn(e);let a=ae(1);t&&(r?Y(r)&&(a=ye(r)):a=ye(e));const c=e1(i,n,r)?wi(i):ae(0);let d=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(i){const m=W(i),v=r&&Y(r)?W(r):r;let x=m,h=kt(x);for(;h&&r&&v!==x;){const g=ye(h),C=h.getBoundingClientRect(),w=z(h),y=C.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=C.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;d*=g.x,u*=g.y,f*=g.x,p*=g.y,d+=y,u+=b,x=W(h),h=kt(x)}}return et({width:f,height:p,x:d,y:u})}function t1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Q(r),c=t?ft(t.floating):!1;if(r===a||c&&i)return n;let d={scrollLeft:0,scrollTop:0},u=ae(1);const f=ae(0),p=q(r);if((p||!p&&!i)&&((Te(r)!=="body"||De(a))&&(d=pt(r)),q(r))){const m=de(r);u=ye(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+f.x,y:n.y*u.y-d.scrollTop*u.y+f.y}}function n1(e){return Array.from(e.getClientRects())}function Ht(e,t){const n=pt(e).scrollLeft;return t?t.left+n:de(Q(e)).left+n}function r1(e){const t=Q(e),n=pt(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ht(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(a+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}function o1(e,t){const n=W(e),r=Q(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,d=0;if(o){i=o.width,a=o.height;const u=wn();(!u||u&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}return{width:i,height:a,x:c,y:d}}function i1(e,t){const n=de(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=q(e)?ye(e):ae(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,d=o*i.x,u=r*i.y;return{width:a,height:c,x:d,y:u}}function er(e,t,n){let r;if(t==="viewport")r=o1(e,n);else if(t==="document")r=r1(Q(e));else if(Y(t))r=i1(t,n);else{const o=wi(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return et(r)}function yi(e,t){const n=le(e);return n===t||!Y(n)||Ae(n)?!1:z(n).position==="fixed"||yi(n,t)}function s1(e,t){const n=t.get(e);if(n)return n;let r=Le(e,[],!1).filter(c=>Y(c)&&Te(c)!=="body"),o=null;const i=z(e).position==="fixed";let a=i?le(e):e;for(;Y(a)&&!Ae(a);){const c=z(a),d=Cn(a);!d&&c.position==="fixed"&&(o=null),(i?!d&&!o:!d&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||De(a)&&!d&&yi(e,a))?r=r.filter(f=>f!==a):o=c,a=le(a)}return t.set(e,r),r}function a1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?ft(t)?[]:s1(t,this._c):[].concat(n),r],c=a[0],d=a.reduce((u,f)=>{const p=er(t,f,o);return u.top=Z(p.top,u.top),u.right=se(p.right,u.right),u.bottom=se(p.bottom,u.bottom),u.left=Z(p.left,u.left),u},er(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function c1(e){const{width:t,height:n}=Ci(e);return{width:t,height:n}}function l1(e,t,n){const r=q(t),o=Q(t),i=n==="fixed",a=de(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=ae(0);if(r||!r&&!i)if((Te(t)!=="body"||De(o))&&(c=pt(t)),r){const v=de(t,!0,i,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else o&&(d.x=Ht(o));let u=0,f=0;if(o&&!r&&!i){const v=o.getBoundingClientRect();f=v.top+c.scrollTop,u=v.left+c.scrollLeft-Ht(o,v)}const p=a.left+c.scrollLeft-d.x-u,m=a.top+c.scrollTop-d.y-f;return{x:p,y:m,width:a.width,height:a.height}}function jt(e){return z(e).position==="static"}function tr(e,t){if(!q(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function bi(e,t){const n=W(e);if(ft(e))return n;if(!q(e)){let o=le(e);for(;o&&!Ae(o);){if(Y(o)&&!jt(o))return o;o=le(o)}return n}let r=tr(e,t);for(;r&&ql(r)&&jt(r);)r=tr(r,t);return r&&Ae(r)&&jt(r)&&!Cn(r)?n:r||Ql(e)||n}const u1=async function(e){const t=this.getOffsetParent||bi,n=this.getDimensions,r=await n(e.floating);return{reference:l1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function d1(e){return z(e).direction==="rtl"}const f1={convertOffsetParentRelativeRectToViewportRelativeRect:t1,getDocumentElement:Q,getClippingRect:a1,getOffsetParent:bi,getElementRects:u1,getClientRects:n1,getDimensions:c1,getScale:ye,isElement:Y,isRTL:d1};function p1(e,t){let n=null,r;const o=Q(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const{left:u,top:f,width:p,height:m}=e.getBoundingClientRect();if(c||t(),!p||!m)return;const v=Ze(f),x=Ze(o.clientWidth-(u+p)),h=Ze(o.clientHeight-(f+m)),g=Ze(u),w={rootMargin:-v+"px "+-x+"px "+-h+"px "+-g+"px",threshold:Z(0,se(1,d))||1};let y=!0;function b(A){const E=A[0].intersectionRatio;if(E!==d){if(!y)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return a(!0),i}function h1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=yn(e),f=o||i?[...u?Le(u):[],...Le(t)]:[];f.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const p=u&&c?p1(u,n):null;let m=-1,v=null;a&&(v=new ResizeObserver(C=>{let[w]=C;w&&w.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),u&&!d&&v.observe(u),v.observe(t));let x,h=d?de(e):null;d&&g();function g(){const C=de(e);h&&(C.x!==h.x||C.y!==h.y||C.width!==h.width||C.height!==h.height)&&n(),h=C,x=requestAnimationFrame(g)}return n(),()=>{var C;f.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),p==null||p(),(C=v)==null||C.disconnect(),v=null,d&&cancelAnimationFrame(x)}}const m1=Yl,v1=zl,g1=Wl,x1=Xl,C1=Ul,nr=Zl,w1=Gl,y1=(e,t,n)=>{const r=new Map,o={platform:f1,...n},i={...o.platform,_c:r};return Bl(e,t,{...o,platform:i})};var Ke=typeof document<"u"?S.useLayoutEffect:S.useEffect;function tt(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 n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!tt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ai(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rr(e,t){const n=Ai(e);return Math.round(t*n)/n}function Pt(e){const t=l.useRef(e);return Ke(()=>{t.current=e}),t}function b1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(r);tt(m,r)||v(r);const[x,h]=l.useState(null),[g,C]=l.useState(null),w=l.useCallback(T=>{T!==E.current&&(E.current=T,h(T))},[]),y=l.useCallback(T=>{T!==R.current&&(R.current=T,C(T))},[]),b=i||x,A=a||g,E=l.useRef(null),R=l.useRef(null),N=l.useRef(f),M=d!=null,O=Pt(d),F=Pt(o),V=Pt(u),k=l.useCallback(()=>{if(!E.current||!R.current)return;const T={placement:t,strategy:n,middleware:m};F.current&&(T.platform=F.current),y1(E.current,R.current,T).then($=>{const U={...$,isPositioned:V.current!==!1};j.current&&!tt(N.current,U)&&(N.current=U,Bt.flushSync(()=>{p(U)}))})},[m,t,n,F,V]);Ke(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const j=l.useRef(!1);Ke(()=>(j.current=!0,()=>{j.current=!1}),[]),Ke(()=>{if(b&&(E.current=b),A&&(R.current=A),b&&A){if(O.current)return O.current(b,A,k);k()}},[b,A,k,O,M]);const _=l.useMemo(()=>({reference:E,floating:R,setReference:w,setFloating:y}),[w,y]),L=l.useMemo(()=>({reference:b,floating:A}),[b,A]),H=l.useMemo(()=>{const T={position:n,left:0,top:0};if(!L.floating)return T;const $=rr(L.floating,f.x),U=rr(L.floating,f.y);return c?{...T,transform:"translate("+$+"px, "+U+"px)",...Ai(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:U}},[n,c,L.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:k,refs:_,elements:L,floatingStyles:H}),[f,k,_,L,H])}const A1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nr({element:r.current,padding:o}).fn(n):{}:r?nr({element:r,padding:o}).fn(n):{}}}},E1=(e,t)=>({...m1(e),options:[e,t]}),R1=(e,t)=>({...v1(e),options:[e,t]}),j1=(e,t)=>({...w1(e),options:[e,t]}),P1=(e,t)=>({...g1(e),options:[e,t]}),T1=(e,t)=>({...x1(e),options:[e,t]}),N1=(e,t)=>({...C1(e),options:[e,t]}),S1=(e,t)=>({...A1(e),options:[e,t]});var M1="Arrow",Ei=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return s.jsx(I.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ei.displayName=M1;var O1=Ei;function L1(e,t=[]){let n=[];function r(i,a){const c=l.createContext(a),d=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...x}=p,h=(m==null?void 0:m[e][d])||c,g=l.useMemo(()=>x,Object.values(x));return s.jsx(h.Provider,{value:g,children:v})}function f(p,m){const v=(m==null?void 0:m[e][d])||c,x=l.useContext(v);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(c){const d=(c==null?void 0:c[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,D1(o,...t)]}function D1(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:d,scopeName:u})=>{const p=d(i)[`__scope${u}`];return{...c,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _1(e){const[t,n]=l.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const d=i.borderBoxSize,u=Array.isArray(d)?d[0]:d;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bn="Popper",[Ri,ji]=L1(bn),[I1,Pi]=Ri(bn),Ti=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return s.jsx(I1,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ti.displayName=bn;var Ni="PopperAnchor",Si=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Pi(Ni,n),a=l.useRef(null),c=B(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:s.jsx(I.div,{...o,ref:c})});Si.displayName=Ni;var An="PopperContent",[k1,H1]=Ri(An),Mi=l.forwardRef((e,t)=>{var Rn,jn,Pn,Tn,Nn,Sn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,g=Pi(An,n),[C,w]=l.useState(null),y=B(t,Se=>w(Se)),[b,A]=l.useState(null),E=_1(b),R=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,M=r+(i!=="center"?"-"+i:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},F=Array.isArray(u)?u:[u],V=F.length>0,k={padding:O,boundary:F.filter(F1),altBoundary:V},{refs:j,floatingStyles:_,placement:L,isPositioned:H,middlewareData:T}=b1({strategy:"fixed",placement:M,whileElementsMounted:(...Se)=>h1(...Se,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[E1({mainAxis:o+N,alignmentAxis:a}),d&&R1({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?j1():void 0,...k}),d&&P1({...k}),T1({...k,apply:({elements:Se,rects:Mn,availableWidth:Ki,availableHeight:Yi})=>{const{width:zi,height:Gi}=Mn.reference,Ie=Se.floating.style;Ie.setProperty("--radix-popper-available-width",`${Ki}px`),Ie.setProperty("--radix-popper-available-height",`${Yi}px`),Ie.setProperty("--radix-popper-anchor-width",`${zi}px`),Ie.setProperty("--radix-popper-anchor-height",`${Gi}px`)}}),b&&S1({element:b,padding:c}),$1({arrowWidth:R,arrowHeight:N}),m&&N1({strategy:"referenceHidden",...k})]}),[$,U]=Di(L),pe=K(x);J(()=>{H&&(pe==null||pe())},[H,pe]);const Ne=(Rn=T.arrow)==null?void 0:Rn.x,he=(jn=T.arrow)==null?void 0:jn.y,_e=((Pn=T.arrow)==null?void 0:Pn.centerOffset)!==0,[Wi,Ui]=l.useState();return J(()=>{C&&Ui(window.getComputedStyle(C).zIndex)},[C]),s.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:H?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Wi,"--radix-popper-transform-origin":[(Tn=T.transformOrigin)==null?void 0:Tn.x,(Nn=T.transformOrigin)==null?void 0:Nn.y].join(" "),...((Sn=T.hide)==null?void 0:Sn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(k1,{scope:n,placedSide:$,onArrowChange:A,arrowX:Ne,arrowY:he,shouldHideArrow:_e,children:s.jsx(I.div,{"data-side":$,"data-align":U,...h,ref:y,style:{...h.style,animation:H?void 0:"none"}})})})});Mi.displayName=An;var Oi="PopperArrow",V1={top:"bottom",right:"left",bottom:"top",left:"right"},Li=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=H1(Oi,r),a=V1[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(O1,{...o,ref:n,style:{...o.style,display:"block"}})})});Li.displayName=Oi;function F1(e){return e!==null}var $1=e=>({name:"transformOrigin",options:e,fn(t){var g,C,w;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[u,f]=Di(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((C=o.arrow)==null?void 0:C.x)??0)+c/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+d/2;let x="",h="";return u==="bottom"?(x=a?p:`${m}px`,h=`${-d}px`):u==="top"?(x=a?p:`${m}px`,h=`${r.floating.height+d}px`):u==="right"?(x=`${-d}px`,h=a?p:`${v}px`):u==="left"&&(x=`${r.floating.width+d}px`,h=a?p:`${v}px`),{data:{x,y:h}}}});function Di(e){const[t,n="center"]=e.split("-");return[t,n]}var B1=Ti,Z1=Si,W1=Mi,U1=Li,[ht,vu]=Re("Tooltip",[ji]),mt=ji(),_i="TooltipProvider",K1=700,Vt="tooltip.open",[Y1,En]=ht(_i),Ii=e=>{const{__scopeTooltip:t,delayDuration:n=K1,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,c]=l.useState(!0),d=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),s.jsx(Y1,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:l.useCallback(f=>{d.current=f},[]),disableHoverableContent:o,children:i})};Ii.displayName=_i;var vt="Tooltip",[z1,gt]=ht(vt),ki=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,d=En(vt,e.__scopeTooltip),u=mt(t),[f,p]=l.useState(null),m=xe(),v=l.useRef(0),x=a??d.disableHoverableContent,h=c??d.delayDuration,g=l.useRef(!1),[C=!1,w]=je({prop:r,defaultProp:o,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(Vt))):d.onClose(),i==null||i(R)}}),y=l.useMemo(()=>C?g.current?"delayed-open":"instant-open":"closed",[C]),b=l.useCallback(()=>{window.clearTimeout(v.current),g.current=!1,w(!0)},[w]),A=l.useCallback(()=>{window.clearTimeout(v.current),w(!1)},[w]),E=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0)},h)},[h,w]);return l.useEffect(()=>()=>window.clearTimeout(v.current),[]),s.jsx(B1,{...u,children:s.jsx(z1,{scope:t,contentId:m,open:C,stateAttribute:y,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{d.isOpenDelayed?E():b()},[d.isOpenDelayed,E,b]),onTriggerLeave:l.useCallback(()=>{x?A():window.clearTimeout(v.current)},[A,x]),onOpen:b,onClose:A,disableHoverableContent:x,children:n})})};ki.displayName=vt;var Ft="TooltipTrigger",Hi=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gt(Ft,n),i=En(Ft,n),a=mt(n),c=l.useRef(null),d=B(t,c,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(Z1,{asChild:!0,...a,children:s.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:D(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:D(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:D(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:D(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:D(e.onBlur,o.onClose),onClick:D(e.onClick,o.onClose)})})});Hi.displayName=Ft;var G1="TooltipPortal",[gu,X1]=ht(G1,{forceMount:void 0}),Ee="TooltipContent",Vi=l.forwardRef((e,t)=>{const n=X1(Ee,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=gt(Ee,e.__scopeTooltip);return s.jsx(fe,{present:r||a.open,children:a.disableHoverableContent?s.jsx(Fi,{side:o,...i,ref:t}):s.jsx(q1,{side:o,...i,ref:t})})}),q1=l.forwardRef((e,t)=>{const n=gt(Ee,e.__scopeTooltip),r=En(Ee,e.__scopeTooltip),o=l.useRef(null),i=B(t,o),[a,c]=l.useState(null),{trigger:d,onClose:u}=n,f=o.current,{onPointerInTransitChange:p}=r,m=l.useCallback(()=>{c(null),p(!1)},[p]),v=l.useCallback((x,h)=>{const g=x.currentTarget,C={x:x.clientX,y:x.clientY},w=tu(C,g.getBoundingClientRect()),y=nu(C,w),b=ru(h.getBoundingClientRect()),A=iu([...y,...b]);c(A),p(!0)},[p]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(d&&f){const x=g=>v(g,f),h=g=>v(g,d);return d.addEventListener("pointerleave",x),f.addEventListener("pointerleave",h),()=>{d.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",h)}}},[d,f,v,m]),l.useEffect(()=>{if(a){const x=h=>{const g=h.target,C={x:h.clientX,y:h.clientY},w=(d==null?void 0:d.contains(g))||(f==null?void 0:f.contains(g)),y=!ou(C,a);w?m():y&&(m(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,f,a,u,m]),s.jsx(Fi,{...e,ref:i})}),[Q1,J1]=ht(vt,{isInside:!1}),Fi=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,d=gt(Ee,n),u=mt(n),{onClose:f}=d;return l.useEffect(()=>(document.addEventListener(Vt,f),()=>document.removeEventListener(Vt,f)),[f]),l.useEffect(()=>{if(d.trigger){const p=m=>{const v=m.target;v!=null&&v.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),s.jsx(st,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(W1,{"data-state":d.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Zt,{children:r}),s.jsx(Q1,{scope:n,isInside:!0,children:s.jsx(dl,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Vi.displayName=Ee;var $i="TooltipArrow",eu=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=mt(n);return J1($i,n).isInside?null:s.jsx(U1,{...o,...r,ref:t})});eu.displayName=$i;function tu(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ru(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ou(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i].x,d=t[i].y,u=t[a].x,f=t[a].y;d>r!=f>r&&n<(u-c)*(r-d)/(f-d)+c&&(o=!o)}return o}function iu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),su(t)}function su(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var au=Ii,cu=ki,lu=Hi,Bi=Vi;const uu=au,du=cu,fu=lu,Zi=l.forwardRef(({className:e,variant:t="primary",size:n="pc",position:r="top-center",arrow:o=!0,sideOffset:i=8,icLeft:a,icRight:c,...d},u)=>{const f={primary:"bg-main-600 text-white",secondary:"bg-grey-800 text-grey-50"},p={pc:"p-2 text-sm",mobile:"p-2 text-[13px]"},m={"top-left":{classes:"absolute left-3 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"start"},"top-center":{classes:"absolute left-1/2 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"center"},"top-right":{classes:"absolute right-3 top-full transform -translate-y-2 -translate-x-1/2",side:"top",align:"end"},"bottom-left":{classes:"absolute left-3 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"start"},"bottom-center":{classes:"absolute left-1/2 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"center"},"bottom-right":{classes:"absolute right-3 top-auto bottom-full transform translate-y-2 -translate-x-1/2",side:"bottom",align:"end"}}[r];return s.jsxs(Bi,{ref:u,avoidCollisions:!1,sideOffset:i,side:m.side,align:m.align,className:P.cn("relative z-50 rounded-lg my-1"),...d,children:[o&&s.jsx("div",{className:P.cn("z-0 w-3 h-3 bg-main-600 opacity-90 rotate-45 rounded-[2px]",f[t],m.classes)}),s.jsx("div",{className:"absolute z-10 inset-0 bg-white"}),s.jsxs("div",{className:P.cn("relative z-20 flex items-center font-normal bg-opacity-90 rounded",f[t],p[n]),children:[a&&s.jsx("span",{className:"mr-1",children:a}),s.jsx("span",{children:d.children}),c&&s.jsx("span",{className:"ml-1",children:c})]})]})});Zi.displayName=Bi.displayName;exports.Accordion=La;exports.AccordionContent=Mr;exports.AccordionItem=Nr;exports.AccordionTrigger=Sr;exports.Alert=Io;exports.Button=Xe;exports.Dialog=Zo;exports.Icon=rt;exports.Input=Dr;exports.Modal=Wo;exports.PortalContainer=Ll;exports.Toaster=Ol;exports.Tooltip=du;exports.TooltipContent=Zi;exports.TooltipProvider=uu;exports.TooltipTrigger=fu;exports.buttonVariants=ie;
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -42,22 +42,18 @@ declare const Toast: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.Toas
|
|
|
42
42
|
size?: "sm" | "md" | "lg" | "xl" | "full" | "fit" | null | undefined;
|
|
43
43
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLLIElement>>;
|
|
44
44
|
|
|
45
|
-
declare
|
|
46
|
-
id
|
|
47
|
-
title?:
|
|
45
|
+
declare interface ToasterProps extends ToastProps {
|
|
46
|
+
id?: string;
|
|
47
|
+
title?: string;
|
|
48
48
|
description?: React.ReactNode;
|
|
49
49
|
action?: () => void;
|
|
50
50
|
actionText?: string | React.ReactNode;
|
|
51
51
|
closeButton?: boolean;
|
|
52
52
|
onClose?: () => void;
|
|
53
|
-
}
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
|
|
56
56
|
|
|
57
|
-
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> & React_2.RefAttributes<HTMLOListElement>>;
|
|
58
|
-
|
|
59
|
-
declare type ToastViewportProps = React_2.ComponentPropsWithoutRef<typeof ToastViewport>;
|
|
60
|
-
|
|
61
57
|
export declare const usePortal: () => {
|
|
62
58
|
modal: (props: ModalProps) => string | null;
|
|
63
59
|
toast: (props: ToasterProps) => string | null;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -49,13 +49,13 @@ declare const actionTypes: {
|
|
|
49
49
|
|
|
50
50
|
export declare const Alert: React_2.FC<AlertProps>;
|
|
51
51
|
|
|
52
|
-
declare interface AlertPortalOptions {
|
|
52
|
+
export declare interface AlertPortalOptions {
|
|
53
53
|
id: string;
|
|
54
54
|
type: "alert";
|
|
55
55
|
props: AlertProps;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
declare interface AlertProps {
|
|
58
|
+
export declare interface AlertProps {
|
|
59
59
|
id?: string;
|
|
60
60
|
title?: string;
|
|
61
61
|
description: string | React.ReactNode;
|
|
@@ -103,7 +103,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
103
103
|
|
|
104
104
|
export declare const buttonVariants: (props?: ({
|
|
105
105
|
theme?: "primary" | "secondary" | "etc" | null | undefined;
|
|
106
|
-
size?: "
|
|
106
|
+
size?: "sm" | "md" | "lg" | "xs" | "icon" | null | undefined;
|
|
107
107
|
variant?: "text" | "solid" | "outline" | null | undefined;
|
|
108
108
|
shape?: "square" | "rounded" | null | undefined;
|
|
109
109
|
} & ClassProp) | undefined) => string;
|
|
@@ -143,13 +143,13 @@ declare function DefaultProfile({ size }: SvgIconType): JSX_2.Element;
|
|
|
143
143
|
|
|
144
144
|
export declare const Dialog: React_2.ForwardRefExoticComponent<CustomDialogProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
145
145
|
|
|
146
|
-
declare interface DialogPortalOptions {
|
|
146
|
+
export declare interface DialogPortalOptions {
|
|
147
147
|
id: string;
|
|
148
148
|
type: "dialog";
|
|
149
149
|
props: DialogProps;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
declare interface DialogProps {
|
|
152
|
+
export declare interface DialogProps {
|
|
153
153
|
id?: string;
|
|
154
154
|
title: string;
|
|
155
155
|
content: string | React.ReactNode;
|
|
@@ -237,13 +237,13 @@ declare function Message({ size, fill, className, }: SvgIconType): JSX_2.Element
|
|
|
237
237
|
|
|
238
238
|
export declare const Modal: React_2.ForwardRefExoticComponent<ModalProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
239
239
|
|
|
240
|
-
declare interface ModalPortalOptions {
|
|
240
|
+
export declare interface ModalPortalOptions {
|
|
241
241
|
id: string;
|
|
242
242
|
type: "modal";
|
|
243
243
|
props: ModalProps;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
declare interface ModalProps {
|
|
246
|
+
export declare interface ModalProps {
|
|
247
247
|
id?: string;
|
|
248
248
|
title: string;
|
|
249
249
|
description?: string | React.ReactNode;
|
|
@@ -282,6 +282,8 @@ export declare const portalManager: PortalManager;
|
|
|
282
282
|
|
|
283
283
|
export declare type PortalOptions = ModalPortalOptions | ToastPortalOptions | AlertPortalOptions | DialogPortalOptions;
|
|
284
284
|
|
|
285
|
+
export declare const PortalProvider: () => JSX_2.Element;
|
|
286
|
+
|
|
285
287
|
export declare type PortalType = "modal" | "toast" | "alert" | "dialog";
|
|
286
288
|
|
|
287
289
|
declare function Present({ size, fill, className, }: SvgIconType): JSX_2.Element;
|
|
@@ -316,7 +318,7 @@ declare type Props_5 = {
|
|
|
316
318
|
|
|
317
319
|
declare function Radio({ type, size }: Props_4): JSX_2.Element;
|
|
318
320
|
|
|
319
|
-
declare interface ReactIconProps {
|
|
321
|
+
export declare interface ReactIconProps {
|
|
320
322
|
size?: number;
|
|
321
323
|
color?: string;
|
|
322
324
|
className?: string;
|
|
@@ -342,7 +344,7 @@ declare interface State {
|
|
|
342
344
|
toasts: ToasterProps[];
|
|
343
345
|
}
|
|
344
346
|
|
|
345
|
-
declare type SvgIconType = {
|
|
347
|
+
export declare type SvgIconType = {
|
|
346
348
|
size?: string;
|
|
347
349
|
fill?: string;
|
|
348
350
|
className?: string;
|
|
@@ -384,17 +386,17 @@ export declare function toaster(): {
|
|
|
384
386
|
toasts: ToasterProps[];
|
|
385
387
|
};
|
|
386
388
|
|
|
387
|
-
declare
|
|
388
|
-
id
|
|
389
|
-
title?:
|
|
389
|
+
export declare interface ToasterProps extends ToastProps {
|
|
390
|
+
id?: string;
|
|
391
|
+
title?: string;
|
|
390
392
|
description?: React.ReactNode;
|
|
391
393
|
action?: () => void;
|
|
392
394
|
actionText?: string | React.ReactNode;
|
|
393
395
|
closeButton?: boolean;
|
|
394
396
|
onClose?: () => void;
|
|
395
|
-
}
|
|
397
|
+
}
|
|
396
398
|
|
|
397
|
-
declare interface ToastPortalOptions {
|
|
399
|
+
export declare interface ToastPortalOptions {
|
|
398
400
|
id: string;
|
|
399
401
|
type: "toast";
|
|
400
402
|
props: ToastProps;
|
|
@@ -402,10 +404,6 @@ declare interface ToastPortalOptions {
|
|
|
402
404
|
|
|
403
405
|
declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
|
|
404
406
|
|
|
405
|
-
declare const ToastViewport: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React_2.RefAttributes<HTMLOListElement>, "ref"> & React_2.RefAttributes<HTMLOListElement>>;
|
|
406
|
-
|
|
407
|
-
declare type ToastViewportProps = React_2.ComponentPropsWithoutRef<typeof ToastViewport>;
|
|
408
|
-
|
|
409
407
|
export declare const TooltipButton: React_2.FC<TooltipButtonProps>;
|
|
410
408
|
|
|
411
409
|
declare interface TooltipButtonProps extends TooltipContentProps {
|
|
@@ -425,6 +423,15 @@ declare type TooltipContentProps = React_2.ComponentPropsWithoutRef<typeof Toolt
|
|
|
425
423
|
|
|
426
424
|
export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
427
425
|
|
|
426
|
+
export declare const usePortal: () => {
|
|
427
|
+
modal: (props: ModalProps) => string | null;
|
|
428
|
+
toast: (props: ToasterProps) => string | null;
|
|
429
|
+
alert: (props: AlertProps) => string | null;
|
|
430
|
+
dialog: (props: DialogProps) => string | null;
|
|
431
|
+
getIsOpen: (id: string) => boolean | undefined;
|
|
432
|
+
openPortals: string[];
|
|
433
|
+
};
|
|
434
|
+
|
|
428
435
|
declare function ViewCard({ size, fill, }: SvgIconType): JSX_2.Element;
|
|
429
436
|
|
|
430
437
|
declare function ViewMore({ size, fill, }: SvgIconType): JSX_2.Element;
|