adminizer 4.2.0-build.71 → 4.2.0

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/assets/app.js CHANGED
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-Br44s2D6.js","./app-layout-DecN527i.js","./app-shell-DHzMWA1L.js","./app-sidebar-4JFP8UdU.js","./nav-main-BUp9qA8R.js","./material-icon-DsiW0iQG.js","./app-sidebar-header-CIKLfLsF.js","./breadcrumbs-Bo2z-LNC.js","./nav-user-DeF3SDRj.js","./user-info-CAgkqARx.js","./user-menu-content-BxL0QMC9.js","./theme-switcher-D8T9NgWG.js","./use-appearance-CXP5cHaQ.js","./icon-C_X2cQ6W.js","./add-group-form-YI6KS37x.js","./add-user-DWcH0s9-.js","./add-user-form-bv5BNX5A.js","./input-error-Bab-HPbn.js","./add-CYZwY0d_.js","./add-form-u6CCTy3n.js","./field-renderer-CFBp-IrC.js","./dynamic-controls-CSVVCONh.js","./multi-select-BbKSrMw2.js","./field-renderer-CsBa_tMB.css","./form-state-702tb_BV.js","./catalog-BpAw4095.js","./index-C148XJoK.js","./del-modal-l3LxJWCN.js","./debounce-D6eaSoDg.js","./catalog-C71LuRag.css","./dashboard-Dy3pk9t7.js","./dashboard-BOltB2Hq.css","./form-COsFQmSc.js","./form-D7o1HNUE.js","./init-user-DgCD4ZN1.js","./list-C-27EH39.js","./list-table-_OiQmr2A.js","./pagination-render-B9U_hVbB.js","./login-jzvVXgAV.js","./module-Ceq6vuwa.js","./register-C6acWsLe.js","./welcome-Dk7GoS5R.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group-Br44s2D6.js","./app-layout-DecN527i.js","./app-shell-DHzMWA1L.js","./app-sidebar-4JFP8UdU.js","./nav-main-BUp9qA8R.js","./material-icon-DsiW0iQG.js","./app-sidebar-header-CIKLfLsF.js","./breadcrumbs-Bo2z-LNC.js","./nav-user-DeF3SDRj.js","./user-info-CAgkqARx.js","./user-menu-content-BxL0QMC9.js","./theme-switcher-D8T9NgWG.js","./use-appearance-CXP5cHaQ.js","./icon-C_X2cQ6W.js","./add-group-form-YI6KS37x.js","./add-user-DWcH0s9-.js","./add-user-form-bv5BNX5A.js","./input-error-Bab-HPbn.js","./add-DOaZgoTz.js","./add-form-BjackXJe.js","./field-renderer-BHo944Cn.js","./dynamic-controls-CSVVCONh.js","./multi-select-BbKSrMw2.js","./field-renderer-CsBa_tMB.css","./form-state-702tb_BV.js","./catalog-DVyrGTNR.js","./index-C148XJoK.js","./del-modal-l3LxJWCN.js","./debounce-D6eaSoDg.js","./catalog-C71LuRag.css","./dashboard-Dy3pk9t7.js","./dashboard-BOltB2Hq.css","./form-BXfnz6h5.js","./form-hP8sjbND.js","./init-user-DgCD4ZN1.js","./list-C-27EH39.js","./list-table-_OiQmr2A.js","./pagination-render-B9U_hVbB.js","./login-jzvVXgAV.js","./module-Ceq6vuwa.js","./register-C6acWsLe.js","./welcome-Dk7GoS5R.js"])))=>i.map(i=>d[i]);
2
2
  function QQ(t,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in t)){const c=Object.getOwnPropertyDescriptor(a,i);c&&Object.defineProperty(t,i,c.get?c:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const JQ="modulepreload",eJ=function(t,e){return new URL(t,e).href},PP={},Rn=function(e,n,a){let i=Promise.resolve();if(n&&n.length>0){let l=function(k){return Promise.all(k.map(m=>Promise.resolve(m).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};const h=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),f=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));i=l(n.map(k=>{if(k=eJ(k,a),k in PP)return;PP[k]=!0;const m=k.endsWith(".css"),x=m?'[rel="stylesheet"]':"";if(!!a)for(let S=h.length-1;S>=0;S--){const _=h[S];if(_.href===k&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${k}"]${x}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":JQ,m||(w.as="script"),w.crossOrigin="",w.href=k,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((S,_)=>{w.addEventListener("load",S),w.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${k}`)))})}))}function c(l){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=l,window.dispatchEvent(h),!h.defaultPrevented)throw l}return i.then(l=>{for(const h of l||[])h.status==="rejected"&&c(h.reason);return e().catch(c)})};var zP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fB(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tJ(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var i=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:function(){return t[a]}})}),n}var yE={exports:{}},bd={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -8020,4 +8020,4 @@ Error generating stack: `+s.message+`
8020
8020
 
8021
8021
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
8022
8022
 
8023
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},qLe="DialogDescriptionWarning",PLe=({contentRef:t,descriptionId:e})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gU(qLe).contentName}}.`;return v.useEffect(()=>{var c;const i=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(a))},[a,t,e]),null},yj=rU,MU=cU,mj=lU,kj=dU,vj=uU,xU=pU,bU=yU,FA=kU,Id='[cmdk-group=""]',zR='[cmdk-group-items=""]',zLe='[cmdk-group-heading=""]',wU='[cmdk-item=""]',WH=`${wU}:not([aria-disabled="true"])`,mT="cmdk-item-select",al="data-value",HLe=(t,e,n)=>ACe(t,e,n),_U=v.createContext(void 0),cu=()=>v.useContext(_U),SU=v.createContext(void 0),gj=()=>v.useContext(SU),CU=v.createContext(void 0),LU=v.forwardRef((t,e)=>{let n=ol(()=>{var O,V;return{search:"",value:(V=(O=t.value)!=null?O:t.defaultValue)!=null?V:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=ol(()=>new Set),i=ol(()=>new Map),c=ol(()=>new Map),l=ol(()=>new Set),h=NU(t),{label:p,children:f,value:k,onValueChange:m,filter:x,shouldFilter:b,loop:w,disablePointerSelection:S=!1,vimBindings:_=!0,...C}=t,N=ht(),A=ht(),$=ht(),E=v.useRef(null),P=QLe();c1(()=>{if(k!==void 0){let O=k.trim();n.current.value=O,D.emit()}},[k]),c1(()=>{P(6,fe)},[]);let D=v.useMemo(()=>({subscribe:O=>(l.current.add(O),()=>l.current.delete(O)),snapshot:()=>n.current,setState:(O,V,W)=>{var ae,ce,ee,ge;if(!Object.is(n.current[O],V)){if(n.current[O]=V,O==="search")Q(),re(),P(1,le);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById($);ve?ve.focus():(ae=document.getElementById(N))==null||ae.focus()}if(P(7,()=>{var ve;n.current.selectedItemId=(ve=ke())==null?void 0:ve.id,D.emit()}),W||P(5,fe),((ce=h.current)==null?void 0:ce.value)!==void 0){let ve=V??"";(ge=(ee=h.current).onValueChange)==null||ge.call(ee,ve);return}}D.emit()}},emit:()=>{l.current.forEach(O=>O())}}),[]),H=v.useMemo(()=>({value:(O,V,W)=>{var ae;V!==((ae=c.current.get(O))==null?void 0:ae.value)&&(c.current.set(O,{value:V,keywords:W}),n.current.filtered.items.set(O,ie(V,W)),P(2,()=>{re(),D.emit()}))},item:(O,V)=>(a.current.add(O),V&&(i.current.has(V)?i.current.get(V).add(O):i.current.set(V,new Set([O]))),P(3,()=>{Q(),re(),n.current.value||le(),D.emit()}),()=>{c.current.delete(O),a.current.delete(O),n.current.filtered.items.delete(O);let W=ke();P(4,()=>{Q(),(W==null?void 0:W.getAttribute("id"))===O&&le(),D.emit()})}),group:O=>(i.current.has(O)||i.current.set(O,new Set),()=>{c.current.delete(O),i.current.delete(O)}),filter:()=>h.current.shouldFilter,label:p||t["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:N,inputId:$,labelId:A,listInnerRef:E}),[]);function ie(O,V){var W,ae;let ce=(ae=(W=h.current)==null?void 0:W.filter)!=null?ae:HLe;return O?ce(O,n.current.search,V):0}function re(){if(!n.current.search||h.current.shouldFilter===!1)return;let O=n.current.filtered.items,V=[];n.current.filtered.groups.forEach(ae=>{let ce=i.current.get(ae),ee=0;ce.forEach(ge=>{let ve=O.get(ge);ee=Math.max(ve,ee)}),V.push([ae,ee])});let W=E.current;ye().sort((ae,ce)=>{var ee,ge;let ve=ae.getAttribute("id"),Me=ce.getAttribute("id");return((ee=O.get(Me))!=null?ee:0)-((ge=O.get(ve))!=null?ge:0)}).forEach(ae=>{let ce=ae.closest(zR);ce?ce.appendChild(ae.parentElement===ce?ae:ae.closest(`${zR} > *`)):W.appendChild(ae.parentElement===W?ae:ae.closest(`${zR} > *`))}),V.sort((ae,ce)=>ce[1]-ae[1]).forEach(ae=>{var ce;let ee=(ce=E.current)==null?void 0:ce.querySelector(`${Id}[${al}="${encodeURIComponent(ae[0])}"]`);ee==null||ee.parentElement.appendChild(ee)})}function le(){let O=ye().find(W=>W.getAttribute("aria-disabled")!=="true"),V=O==null?void 0:O.getAttribute(al);D.setState("value",V||void 0)}function Q(){var O,V,W,ae;if(!n.current.search||h.current.shouldFilter===!1){n.current.filtered.count=a.current.size;return}n.current.filtered.groups=new Set;let ce=0;for(let ee of a.current){let ge=(V=(O=c.current.get(ee))==null?void 0:O.value)!=null?V:"",ve=(ae=(W=c.current.get(ee))==null?void 0:W.keywords)!=null?ae:[],Me=ie(ge,ve);n.current.filtered.items.set(ee,Me),Me>0&&ce++}for(let[ee,ge]of i.current)for(let ve of ge)if(n.current.filtered.items.get(ve)>0){n.current.filtered.groups.add(ee);break}n.current.filtered.count=ce}function fe(){var O,V,W;let ae=ke();ae&&(((O=ae.parentElement)==null?void 0:O.firstChild)===ae&&((W=(V=ae.closest(Id))==null?void 0:V.querySelector(zLe))==null||W.scrollIntoView({block:"nearest"})),ae.scrollIntoView({block:"nearest"}))}function ke(){var O;return(O=E.current)==null?void 0:O.querySelector(`${wU}[aria-selected="true"]`)}function ye(){var O;return Array.from(((O=E.current)==null?void 0:O.querySelectorAll(WH))||[])}function j(O){let V=ye()[O];V&&D.setState("value",V.getAttribute(al))}function B(O){var V;let W=ke(),ae=ye(),ce=ae.findIndex(ge=>ge===W),ee=ae[ce+O];(V=h.current)!=null&&V.loop&&(ee=ce+O<0?ae[ae.length-1]:ce+O===ae.length?ae[0]:ae[ce+O]),ee&&D.setState("value",ee.getAttribute(al))}function R(O){let V=ke(),W=V==null?void 0:V.closest(Id),ae;for(;W&&!ae;)W=O>0?XLe(W,Id):KLe(W,Id),ae=W==null?void 0:W.querySelector(WH);ae?D.setState("value",ae.getAttribute(al)):B(O)}let U=()=>j(ye().length-1),T=O=>{O.preventDefault(),O.metaKey?U():O.altKey?R(1):B(1)},z=O=>{O.preventDefault(),O.metaKey?j(0):O.altKey?R(-1):B(-1)};return v.createElement(Ce.div,{ref:e,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:O=>{var V;(V=C.onKeyDown)==null||V.call(C,O);let W=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||W))switch(O.key){case"n":case"j":{_&&O.ctrlKey&&T(O);break}case"ArrowDown":{T(O);break}case"p":case"k":{_&&O.ctrlKey&&z(O);break}case"ArrowUp":{z(O);break}case"Home":{O.preventDefault(),j(0);break}case"End":{O.preventDefault(),U();break}case"Enter":{O.preventDefault();let ae=ke();if(ae){let ce=new Event(mT);ae.dispatchEvent(ce)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:eNe},p),UA(t,O=>v.createElement(SU.Provider,{value:D},v.createElement(_U.Provider,{value:H},O))))}),BLe=v.forwardRef((t,e)=>{var n,a;let i=ht(),c=v.useRef(null),l=v.useContext(CU),h=cu(),p=NU(t),f=(a=(n=p.current)==null?void 0:n.forceMount)!=null?a:l==null?void 0:l.forceMount;c1(()=>{if(!f)return h.item(i,l==null?void 0:l.id)},[f]);let k=AU(i,c,[t.value,t.children,c],t.keywords),m=gj(),x=Ho(P=>P.value&&P.value===k.current),b=Ho(P=>f||h.filter()===!1?!0:P.search?P.filtered.items.get(i)>0:!0);v.useEffect(()=>{let P=c.current;if(!(!P||t.disabled))return P.addEventListener(mT,w),()=>P.removeEventListener(mT,w)},[b,t.onSelect,t.disabled]);function w(){var P,D;S(),(D=(P=p.current).onSelect)==null||D.call(P,k.current)}function S(){m.setState("value",k.current,!0)}if(!b)return null;let{disabled:_,value:C,onSelect:N,forceMount:A,keywords:$,...E}=t;return v.createElement(Ce.div,{ref:ra(c,e),...E,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!x,"data-disabled":!!_,"data-selected":!!x,onPointerMove:_||h.getDisablePointerSelection()?void 0:S,onClick:_?void 0:w},t.children)}),VLe=v.forwardRef((t,e)=>{let{heading:n,children:a,forceMount:i,...c}=t,l=ht(),h=v.useRef(null),p=v.useRef(null),f=ht(),k=cu(),m=Ho(b=>i||k.filter()===!1?!0:b.search?b.filtered.groups.has(l):!0);c1(()=>k.group(l),[]),AU(l,h,[t.value,t.heading,p]);let x=v.useMemo(()=>({id:l,forceMount:i}),[i]);return v.createElement(Ce.div,{ref:ra(h,e),...c,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),UA(t,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},v.createElement(CU.Provider,{value:x},b))))}),FLe=v.forwardRef((t,e)=>{let{alwaysRender:n,...a}=t,i=v.useRef(null),c=Ho(l=>!l.search);return!n&&!c?null:v.createElement(Ce.div,{ref:ra(i,e),...a,"cmdk-separator":"",role:"separator"})}),ULe=v.forwardRef((t,e)=>{let{onValueChange:n,...a}=t,i=t.value!=null,c=gj(),l=Ho(f=>f.search),h=Ho(f=>f.selectedItemId),p=cu();return v.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),v.createElement(Ce.input,{ref:e,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":h,id:p.inputId,type:"text",value:i?t.value:l,onChange:f=>{i||c.setState("search",f.target.value),n==null||n(f.target.value)}})}),GLe=v.forwardRef((t,e)=>{let{children:n,label:a="Suggestions",...i}=t,c=v.useRef(null),l=v.useRef(null),h=Ho(f=>f.selectedItemId),p=cu();return v.useEffect(()=>{if(l.current&&c.current){let f=l.current,k=c.current,m,x=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let b=f.offsetHeight;k.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(f),()=>{cancelAnimationFrame(m),x.unobserve(f)}}},[]),v.createElement(Ce.div,{ref:ra(c,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":a,id:p.listId},UA(t,f=>v.createElement("div",{ref:ra(l,p.listInnerRef),"cmdk-list-sizer":""},f)))}),ZLe=v.forwardRef((t,e)=>{let{open:n,onOpenChange:a,overlayClassName:i,contentClassName:c,container:l,...h}=t;return v.createElement(yj,{open:n,onOpenChange:a},v.createElement(mj,{container:l},v.createElement(kj,{"cmdk-overlay":"",className:i}),v.createElement(vj,{"aria-label":t.label,"cmdk-dialog":"",className:c},v.createElement(LU,{ref:e,...h}))))}),WLe=v.forwardRef((t,e)=>Ho(n=>n.filtered.count===0)?v.createElement(Ce.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),YLe=v.forwardRef((t,e)=>{let{progress:n,children:a,label:i="Loading...",...c}=t;return v.createElement(Ce.div,{ref:e,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},UA(t,l=>v.createElement("div",{"aria-hidden":!0},l)))}),p1=Object.assign(LU,{List:GLe,Item:BLe,Input:ULe,Group:VLe,Separator:FLe,Dialog:ZLe,Empty:WLe,Loading:YLe});function XLe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function KLe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function NU(t){let e=v.useRef(t);return c1(()=>{e.current=t}),e}var c1=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ol(t){let e=v.useRef();return e.current===void 0&&(e.current=t()),e}function Ho(t){let e=gj(),n=()=>t(e.snapshot());return v.useSyncExternalStore(e.subscribe,n,n)}function AU(t,e,n,a=[]){let i=v.useRef(),c=cu();return c1(()=>{var l;let h=(()=>{var f;for(let k of n){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(f=k.current.textContent)==null?void 0:f.trim():i.current}})(),p=a.map(f=>f.trim());c.value(t,h,p),(l=e.current)==null||l.setAttribute(al,h),i.current=h}),i}var QLe=()=>{let[t,e]=v.useState(),n=ol(()=>new Map);return c1(()=>{n.current.forEach(a=>a()),n.current=new Map},[t]),(a,i)=>{n.current.set(a,i),e({})}};function JLe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function UA({asChild:t,children:e},n){return t&&v.isValidElement(e)?v.cloneElement(JLe(e),{ref:e.ref},n(e.props.children)):n(e)}var eNe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function IU(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(yj,{"data-slot":"dialog",...n}),e[2]=n,e[3]=a):a=e[3],a}function tNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(MU,{"data-slot":"dialog-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function $U(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(mj,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function nNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(FA,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=a):a=e[3],a}function EU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1010] bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kj,{"data-slot":"dialog-overlay",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function RU(t){const e=Z.c(12);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(EU,{}),e[4]=c):c=e[4];let l;e[5]!==a?(l=oe("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsxs(FA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[M.jsx(a1,{}),M.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==l?(p=M.jsxs($U,{"data-slot":"dialog-portal",children:[c,M.jsxs(vj,{"data-slot":"dialog-content",className:l,...i,children:[n,h]})]}),e[8]=n,e[9]=i,e[10]=l,e[11]=p):p=e[11],p}function TU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 text-center sm:text-left",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"dialog-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"dialog-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function jU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-lg leading-none font-semibold",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(xU,{"data-slot":"dialog-title",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function DU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(bU,{"data-slot":"dialog-description",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function OU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1,{"data-slot":"command",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function oNe(t){const e=Z.c(18);let n,a,i,c;e[0]!==t?({title:i,description:c,children:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"Command Palette":i,h=c===void 0?"Search for a command to run...":c;let p;e[5]!==l?(p=M.jsx(jU,{children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==h?(f=M.jsx(DU,{children:h}),e[7]=h,e[8]=f):f=e[8];let k;e[9]!==p||e[10]!==f?(k=M.jsxs(TU,{className:"sr-only",children:[p,f]}),e[9]=p,e[10]=f,e[11]=k):k=e[11];let m;e[12]!==n?(m=M.jsx(RU,{className:"overflow-hidden p-0",children:M.jsx(OU,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})}),e[12]=n,e[13]=m):m=e[13];let x;return e[14]!==a||e[15]!==k||e[16]!==m?(x=M.jsxs(IU,{...a,children:[k,m]}),e[14]=a,e[15]=k,e[16]=m,e[17]=x):x=e[17],x}function rNe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=M.jsx(zd,{className:"size-4 shrink-0 opacity-50"}),e[3]=i):i=e[3];let c;e[4]!==n?(c=oe("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==c?(l=M.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[i,M.jsx(p1.Input,{"data-slot":"command-input",className:c,...a})]}),e[6]=a,e[7]=c,e[8]=l):l=e[8],l}function iNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.List,{"data-slot":"command-list",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function cNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(p1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n}),e[2]=n,e[3]=a):a=e[3],a}function sNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Group,{"data-slot":"command-group",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Separator,{"data-slot":"command-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Item,{"data-slot":"command-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function uNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"command-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function mA(t){const e=hNe(t),n=v.forwardRef((a,i)=>{const{children:c,...l}=a,h=v.Children.toArray(c),p=h.find(fNe);if(p){const f=p.props.children,k=h.map(m=>m===p?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:m);return M.jsx(e,{...l,ref:i,children:v.isValidElement(f)?v.cloneElement(f,void 0,k):null})}return M.jsx(e,{...l,ref:i,children:c})});return n.displayName=`${t}.Slot`,n}function hNe(t){const e=v.forwardRef((n,a)=>{const{children:i,...c}=n;if(v.isValidElement(i)){const l=mNe(i),h=yNe(c,i.props);return i.type!==v.Fragment&&(h.ref=a?ra(a,l):l),v.cloneElement(i,h)}return v.Children.count(i)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var pNe=Symbol("radix.slottable");function fNe(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===pNe}function yNe(t,e){const n={...e};for(const a in e){const i=t[a],c=e[a];/^on[A-Z]/.test(a)?i&&c?n[a]=(...h)=>{const p=c(...h);return i(...h),p}:i&&(n[a]=i):a==="style"?n[a]={...i,...c}:a==="className"&&(n[a]=[i,c].filter(Boolean).join(" "))}return{...t,...n}}function mNe(t){var a,i;let e=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var kNe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pn=kNe.reduce((t,e)=>{const n=mA(`Primitive.${e}`),a=v.forwardRef((i,c)=>{const{asChild:l,...h}=i,p=l?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(p,{...h,ref:c})});return a.displayName=`Primitive.${e}`,{...t,[e]:a}},{});function qU(t,e){t&&gl.flushSync(()=>t.dispatchEvent(e))}function PU(t){const e=t+"CollectionProvider",[n,a]=Ot(e),[i,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:_,children:C}=S,N=me.useRef(null),A=me.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:A,collectionRef:N,children:C})};l.displayName=e;const h=t+"CollectionSlot",p=mA(h),f=me.forwardRef((S,_)=>{const{scope:C,children:N}=S,A=c(h,C),$=Ae(_,A.collectionRef);return M.jsx(p,{ref:$,children:N})});f.displayName=h;const k=t+"CollectionItemSlot",m="data-radix-collection-item",x=mA(k),b=me.forwardRef((S,_)=>{const{scope:C,children:N,...A}=S,$=me.useRef(null),E=Ae(_,$),P=c(k,C);return me.useEffect(()=>(P.itemMap.set($,{ref:$,...A}),()=>void P.itemMap.delete($))),M.jsx(x,{[m]:"",ref:E,children:N})});b.displayName=k;function w(S){const _=c(t+"CollectionConsumer",S);return me.useCallback(()=>{const N=_.collectionRef.current;if(!N)return[];const A=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,D)=>A.indexOf(P.ref.current)-A.indexOf(D.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:f,ItemSlot:b},w,a]}var vNe=v.createContext(void 0);function f1(t){const e=v.useContext(vNe);return t||e||"ltr"}var gNe="DismissableLayer",kT="dismissableLayer.update",MNe="dismissableLayer.pointerDownOutside",xNe="dismissableLayer.focusOutside",YH,zU=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HU=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:l,onDismiss:h,...p}=t,f=v.useContext(zU),[k,m]=v.useState(null),x=(k==null?void 0:k.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=v.useState({}),w=Ae(e,D=>m(D)),S=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=S.indexOf(_),N=k?S.indexOf(k):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,$=N>=C,E=_Ne(D=>{const H=D.target,ie=[...f.branches].some(re=>re.contains(H));!$||ie||(i==null||i(D),l==null||l(D),D.defaultPrevented||h==null||h())},x),P=SNe(D=>{const H=D.target;[...f.branches].some(re=>re.contains(H))||(c==null||c(D),l==null||l(D),D.defaultPrevented||h==null||h())},x);return GF(D=>{N===f.layers.size-1&&(a==null||a(D),!D.defaultPrevented&&h&&(D.preventDefault(),h()))},x),v.useEffect(()=>{if(k)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(YH=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(k)),f.layers.add(k),XH(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=YH)}},[k,x,n,f]),v.useEffect(()=>()=>{k&&(f.layers.delete(k),f.layersWithOutsidePointerEventsDisabled.delete(k),XH())},[k,f]),v.useEffect(()=>{const D=()=>b({});return document.addEventListener(kT,D),()=>document.removeEventListener(kT,D)},[]),M.jsx(pn.div,{...p,ref:w,style:{pointerEvents:A?$?"auto":"none":void 0,...t.style},onFocusCapture:ue(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ue(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ue(t.onPointerDownCapture,E.onPointerDownCapture)})});HU.displayName=gNe;var bNe="DismissableLayerBranch",wNe=v.forwardRef((t,e)=>{const n=v.useContext(zU),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),M.jsx(pn.div,{...t,ref:i})});wNe.displayName=bNe;function _Ne(t,e=globalThis==null?void 0:globalThis.document){const n=It(t),a=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const c=h=>{if(h.target&&!a.current){let p=function(){BU(MNe,n,f,{discrete:!0})};const f={originalEvent:h};h.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=p,e.addEventListener("click",i.current,{once:!0})):p()}else e.removeEventListener("click",i.current);a.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",c),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>a.current=!0}}function SNe(t,e=globalThis==null?void 0:globalThis.document){const n=It(t),a=v.useRef(!1);return v.useEffect(()=>{const i=c=>{c.target&&!a.current&&BU(xNe,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function XH(){const t=new CustomEvent(kT);document.dispatchEvent(t)}function BU(t,e,n,{discrete:a}){const i=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),a?qU(i,c):i.dispatchEvent(c)}var HR="focusScope.autoFocusOnMount",BR="focusScope.autoFocusOnUnmount",KH={bubbles:!1,cancelable:!0},CNe="FocusScope",VU=v.forwardRef((t,e)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...l}=t,[h,p]=v.useState(null),f=It(i),k=It(c),m=v.useRef(null),x=Ae(e,S=>p(S)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let S=function(A){if(b.paused||!h)return;const $=A.target;h.contains($)?m.current=$:jo(m.current,{select:!0})},_=function(A){if(b.paused||!h)return;const $=A.relatedTarget;$!==null&&(h.contains($)||jo(m.current,{select:!0}))},C=function(A){if(document.activeElement===document.body)for(const E of A)E.removedNodes.length>0&&jo(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",_);const N=new MutationObserver(C);return h&&N.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",_),N.disconnect()}}},[a,h,b.paused]),v.useEffect(()=>{if(h){JH.add(b);const S=document.activeElement;if(!h.contains(S)){const C=new CustomEvent(HR,KH);h.addEventListener(HR,f),h.dispatchEvent(C),C.defaultPrevented||(LNe(ENe(FU(h)),{select:!0}),document.activeElement===S&&jo(h))}return()=>{h.removeEventListener(HR,f),setTimeout(()=>{const C=new CustomEvent(BR,KH);h.addEventListener(BR,k),h.dispatchEvent(C),C.defaultPrevented||jo(S??document.body,{select:!0}),h.removeEventListener(BR,k),JH.remove(b)},0)}}},[h,f,k,b]);const w=v.useCallback(S=>{if(!n&&!a||b.paused)return;const _=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,C=document.activeElement;if(_&&C){const N=S.currentTarget,[A,$]=NNe(N);A&&$?!S.shiftKey&&C===$?(S.preventDefault(),n&&jo(A,{select:!0})):S.shiftKey&&C===A&&(S.preventDefault(),n&&jo($,{select:!0})):C===N&&S.preventDefault()}},[n,a,b.paused]);return M.jsx(pn.div,{tabIndex:-1,...l,ref:x,onKeyDown:w})});VU.displayName=CNe;function LNe(t,{select:e=!1}={}){const n=document.activeElement;for(const a of t)if(jo(a,{select:e}),document.activeElement!==n)return}function NNe(t){const e=FU(t),n=QH(e,t),a=QH(e.reverse(),t);return[n,a]}function FU(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const i=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||i?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function QH(t,e){for(const n of t)if(!ANe(n,{upTo:e}))return n}function ANe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function INe(t){return t instanceof HTMLInputElement&&"select"in t}function jo(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&INe(t)&&e&&t.select()}}var JH=$Ne();function $Ne(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=eB(t,e),t.unshift(e)},remove(e){var n;t=eB(t,e),(n=t[0])==null||n.resume()}}}function eB(t,e){const n=[...t],a=n.indexOf(e);return a!==-1&&n.splice(a,1),n}function ENe(t){return t.filter(e=>e.tagName!=="A")}const RNe=["top","right","bottom","left"],Bo=Math.min,jn=Math.max,kA=Math.round,B2=Math.floor,Aa=t=>({x:t,y:t}),TNe={left:"right",right:"left",bottom:"top",top:"bottom"},jNe={start:"end",end:"start"};function vT(t,e,n){return jn(t,Bo(e,n))}function ao(t,e){return typeof t=="function"?t(e):t}function oo(t){return t.split("-")[0]}function _l(t){return t.split("-")[1]}function Mj(t){return t==="x"?"y":"x"}function xj(t){return t==="y"?"height":"width"}function Vo(t){return["top","bottom"].includes(oo(t))?"y":"x"}function bj(t){return Mj(Vo(t))}function DNe(t,e,n){n===void 0&&(n=!1);const a=_l(t),i=bj(t),c=xj(i);let l=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return e.reference[c]>e.floating[c]&&(l=vA(l)),[l,vA(l)]}function ONe(t){const e=vA(t);return[gT(t),e,gT(e)]}function gT(t){return t.replace(/start|end/g,e=>jNe[e])}function qNe(t,e,n){const a=["left","right"],i=["right","left"],c=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:a:e?a:i;case"left":case"right":return e?c:l;default:return[]}}function PNe(t,e,n,a){const i=_l(t);let c=qNe(oo(t),n==="start",a);return i&&(c=c.map(l=>l+"-"+i),e&&(c=c.concat(c.map(gT)))),c}function vA(t){return t.replace(/left|right|bottom|top/g,e=>TNe[e])}function zNe(t){return{top:0,right:0,bottom:0,left:0,...t}}function UU(t){return typeof t!="number"?zNe(t):{top:t,right:t,bottom:t,left:t}}function gA(t){const{x:e,y:n,width:a,height:i}=t;return{width:a,height:i,top:n,left:e,right:e+a,bottom:n+i,x:e,y:n}}function tB(t,e,n){let{reference:a,floating:i}=t;const c=Vo(e),l=bj(e),h=xj(l),p=oo(e),f=c==="y",k=a.x+a.width/2-i.width/2,m=a.y+a.height/2-i.height/2,x=a[h]/2-i[h]/2;let b;switch(p){case"top":b={x:k,y:a.y-i.height};break;case"bottom":b={x:k,y:a.y+a.height};break;case"right":b={x:a.x+a.width,y:m};break;case"left":b={x:a.x-i.width,y:m};break;default:b={x:a.x,y:a.y}}switch(_l(e)){case"start":b[l]-=x*(n&&f?-1:1);break;case"end":b[l]+=x*(n&&f?-1:1);break}return b}const HNe=async(t,e,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,h=c.filter(Boolean),p=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:k,y:m}=tB(f,a,p),x=a,b={},w=0;for(let S=0;S<h.length;S++){const{name:_,fn:C}=h[S],{x:N,y:A,data:$,reset:E}=await C({x:k,y:m,initialPlacement:a,placement:x,strategy:i,middlewareData:b,rects:f,platform:l,elements:{reference:t,floating:e}});k=N??k,m=A??m,b={...b,[_]:{...b[_],...$}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(x=E.placement),E.rects&&(f=E.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:k,y:m}=tB(f,x,p)),S=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}};async function Vd(t,e){var n;e===void 0&&(e={});const{x:a,y:i,platform:c,rects:l,elements:h,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:k="viewport",elementContext:m="floating",altBoundary:x=!1,padding:b=0}=ao(e,t),w=UU(b),_=h[x?m==="floating"?"reference":"floating":m],C=gA(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(_)))==null||n?_:_.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:f,rootBoundary:k,strategy:p})),N=m==="floating"?{x:a,y:i,width:l.floating.width,height:l.floating.height}:l.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),$=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},E=gA(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:N,offsetParent:A,strategy:p}):N);return{top:(C.top-E.top+w.top)/$.y,bottom:(E.bottom-C.bottom+w.bottom)/$.y,left:(C.left-E.left+w.left)/$.x,right:(E.right-C.right+w.right)/$.x}}const BNe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:a,placement:i,rects:c,platform:l,elements:h,middlewareData:p}=e,{element:f,padding:k=0}=ao(t,e)||{};if(f==null)return{};const m=UU(k),x={x:n,y:a},b=bj(i),w=xj(b),S=await l.getDimensions(f),_=b==="y",C=_?"top":"left",N=_?"bottom":"right",A=_?"clientHeight":"clientWidth",$=c.reference[w]+c.reference[b]-x[b]-c.floating[w],E=x[b]-c.reference[b],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let D=P?P[A]:0;(!D||!await(l.isElement==null?void 0:l.isElement(P)))&&(D=h.floating[A]||c.floating[w]);const H=$/2-E/2,ie=D/2-S[w]/2-1,re=Bo(m[C],ie),le=Bo(m[N],ie),Q=re,fe=D-S[w]-le,ke=D/2-S[w]/2+H,ye=vT(Q,ke,fe),j=!p.arrow&&_l(i)!=null&&ke!==ye&&c.reference[w]/2-(ke<Q?re:le)-S[w]/2<0,B=j?ke<Q?ke-Q:ke-fe:0;return{[b]:x[b]+B,data:{[b]:ye,centerOffset:ke-ye-B,...j&&{alignmentOffset:B}},reset:j}}}),VNe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,a;const{placement:i,middlewareData:c,rects:l,initialPlacement:h,platform:p,elements:f}=e,{mainAxis:k=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,..._}=ao(t,e);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const C=oo(i),N=Vo(h),A=oo(h)===h,$=await(p.isRTL==null?void 0:p.isRTL(f.floating)),E=x||(A||!S?[vA(h)]:ONe(h)),P=w!=="none";!x&&P&&E.push(...PNe(h,S,w,$));const D=[h,...E],H=await Vd(e,_),ie=[];let re=((a=c.flip)==null?void 0:a.overflows)||[];if(k&&ie.push(H[C]),m){const ke=DNe(i,l,$);ie.push(H[ke[0]],H[ke[1]])}if(re=[...re,{placement:i,overflows:ie}],!ie.every(ke=>ke<=0)){var le,Q;const ke=(((le=c.flip)==null?void 0:le.index)||0)+1,ye=D[ke];if(ye)return{data:{index:ke,overflows:re},reset:{placement:ye}};let j=(Q=re.filter(B=>B.overflows[0]<=0).sort((B,R)=>B.overflows[1]-R.overflows[1])[0])==null?void 0:Q.placement;if(!j)switch(b){case"bestFit":{var fe;const B=(fe=re.filter(R=>{if(P){const U=Vo(R.placement);return U===N||U==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(U=>U>0).reduce((U,T)=>U+T,0)]).sort((R,U)=>R[1]-U[1])[0])==null?void 0:fe[0];B&&(j=B);break}case"initialPlacement":j=h;break}if(i!==j)return{reset:{placement:j}}}return{}}}};function nB(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function aB(t){return RNe.some(e=>t[e]>=0)}const FNe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:a="referenceHidden",...i}=ao(t,e);switch(a){case"referenceHidden":{const c=await Vd(e,{...i,elementContext:"reference"}),l=nB(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:aB(l)}}}case"escaped":{const c=await Vd(e,{...i,altBoundary:!0}),l=nB(c,n.floating);return{data:{escapedOffsets:l,escaped:aB(l)}}}default:return{}}}}};async function UNe(t,e){const{placement:n,platform:a,elements:i}=t,c=await(a.isRTL==null?void 0:a.isRTL(i.floating)),l=oo(n),h=_l(n),p=Vo(n)==="y",f=["left","top"].includes(l)?-1:1,k=c&&p?-1:1,m=ao(e,t);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return h&&typeof w=="number"&&(b=h==="end"?w*-1:w),p?{x:b*k,y:x*f}:{x:x*f,y:b*k}}const GNe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,a;const{x:i,y:c,placement:l,middlewareData:h}=e,p=await UNe(e,t);return l===((n=h.offset)==null?void 0:n.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:i+p.x,y:c+p.y,data:{...p,placement:l}}}}},ZNe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:a,placement:i}=e,{mainAxis:c=!0,crossAxis:l=!1,limiter:h={fn:_=>{let{x:C,y:N}=_;return{x:C,y:N}}},...p}=ao(t,e),f={x:n,y:a},k=await Vd(e,p),m=Vo(oo(i)),x=Mj(m);let b=f[x],w=f[m];if(c){const _=x==="y"?"top":"left",C=x==="y"?"bottom":"right",N=b+k[_],A=b-k[C];b=vT(N,b,A)}if(l){const _=m==="y"?"top":"left",C=m==="y"?"bottom":"right",N=w+k[_],A=w-k[C];w=vT(N,w,A)}const S=h.fn({...e,[x]:b,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[x]:c,[m]:l}}}}}},WNe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:a,placement:i,rects:c,middlewareData:l}=e,{offset:h=0,mainAxis:p=!0,crossAxis:f=!0}=ao(t,e),k={x:n,y:a},m=Vo(i),x=Mj(m);let b=k[x],w=k[m];const S=ao(h,e),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(p){const A=x==="y"?"height":"width",$=c.reference[x]-c.floating[A]+_.mainAxis,E=c.reference[x]+c.reference[A]-_.mainAxis;b<$?b=$:b>E&&(b=E)}if(f){var C,N;const A=x==="y"?"width":"height",$=["top","left"].includes(oo(i)),E=c.reference[m]-c.floating[A]+($&&((C=l.offset)==null?void 0:C[m])||0)+($?0:_.crossAxis),P=c.reference[m]+c.reference[A]+($?0:((N=l.offset)==null?void 0:N[m])||0)-($?_.crossAxis:0);w<E?w=E:w>P&&(w=P)}return{[x]:b,[m]:w}}}},YNe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,a;const{placement:i,rects:c,platform:l,elements:h}=e,{apply:p=()=>{},...f}=ao(t,e),k=await Vd(e,f),m=oo(i),x=_l(i),b=Vo(i)==="y",{width:w,height:S}=c.floating;let _,C;m==="top"||m==="bottom"?(_=m,C=x===(await(l.isRTL==null?void 0:l.isRTL(h.floating))?"start":"end")?"left":"right"):(C=m,_=x==="end"?"top":"bottom");const N=S-k.top-k.bottom,A=w-k.left-k.right,$=Bo(S-k[_],N),E=Bo(w-k[C],A),P=!e.middlewareData.shift;let D=$,H=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(H=A),(a=e.middlewareData.shift)!=null&&a.enabled.y&&(D=N),P&&!x){const re=jn(k.left,0),le=jn(k.right,0),Q=jn(k.top,0),fe=jn(k.bottom,0);b?H=w-2*(re!==0||le!==0?re+le:jn(k.left,k.right)):D=S-2*(Q!==0||fe!==0?Q+fe:jn(k.top,k.bottom))}await p({...e,availableWidth:H,availableHeight:D});const ie=await l.getDimensions(h.floating);return w!==ie.width||S!==ie.height?{reset:{rects:!0}}:{}}}};function GA(){return typeof window<"u"}function Sl(t){return GU(t)?(t.nodeName||"").toLowerCase():"#document"}function Dn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ea(t){var e;return(e=(GU(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function GU(t){return GA()?t instanceof Node||t instanceof Dn(t).Node:!1}function sa(t){return GA()?t instanceof Element||t instanceof Dn(t).Element:!1}function $a(t){return GA()?t instanceof HTMLElement||t instanceof Dn(t).HTMLElement:!1}function oB(t){return!GA()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dn(t).ShadowRoot}function su(t){const{overflow:e,overflowX:n,overflowY:a,display:i}=la(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&!["inline","contents"].includes(i)}function XNe(t){return["table","td","th"].includes(Sl(t))}function ZA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function wj(t){const e=_j(),n=sa(t)?la(t):t;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function KNe(t){let e=Fo(t);for(;$a(e)&&!pl(e);){if(wj(e))return e;if(ZA(e))return null;e=Fo(e)}return null}function _j(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pl(t){return["html","body","#document"].includes(Sl(t))}function la(t){return Dn(t).getComputedStyle(t)}function WA(t){return sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fo(t){if(Sl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||oB(t)&&t.host||Ea(t);return oB(e)?e.host:e}function ZU(t){const e=Fo(t);return pl(e)?t.ownerDocument?t.ownerDocument.body:t.body:$a(e)&&su(e)?e:ZU(e)}function Fd(t,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ZU(t),c=i===((a=t.ownerDocument)==null?void 0:a.body),l=Dn(i);if(c){const h=MT(l);return e.concat(l,l.visualViewport||[],su(i)?i:[],h&&n?Fd(h):[])}return e.concat(i,Fd(i,[],n))}function MT(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function WU(t){const e=la(t);let n=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const i=$a(t),c=i?t.offsetWidth:n,l=i?t.offsetHeight:a,h=kA(n)!==c||kA(a)!==l;return h&&(n=c,a=l),{width:n,height:a,$:h}}function Sj(t){return sa(t)?t:t.contextElement}function dl(t){const e=Sj(t);if(!$a(e))return Aa(1);const n=e.getBoundingClientRect(),{width:a,height:i,$:c}=WU(e);let l=(c?kA(n.width):n.width)/a,h=(c?kA(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const QNe=Aa(0);function YU(t){const e=Dn(t);return!_j()||!e.visualViewport?QNe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function JNe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dn(t)?!1:e}function s1(t,e,n,a){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),c=Sj(t);let l=Aa(1);e&&(a?sa(a)&&(l=dl(a)):l=dl(t));const h=JNe(c,n,a)?YU(c):Aa(0);let p=(i.left+h.x)/l.x,f=(i.top+h.y)/l.y,k=i.width/l.x,m=i.height/l.y;if(c){const x=Dn(c),b=a&&sa(a)?Dn(a):a;let w=x,S=MT(w);for(;S&&a&&b!==w;){const _=dl(S),C=S.getBoundingClientRect(),N=la(S),A=C.left+(S.clientLeft+parseFloat(N.paddingLeft))*_.x,$=C.top+(S.clientTop+parseFloat(N.paddingTop))*_.y;p*=_.x,f*=_.y,k*=_.x,m*=_.y,p+=A,f+=$,w=Dn(S),S=MT(w)}}return gA({width:k,height:m,x:p,y:f})}function Cj(t,e){const n=WA(t).scrollLeft;return e?e.left+n:s1(Ea(t)).left+n}function XU(t,e,n){n===void 0&&(n=!1);const a=t.getBoundingClientRect(),i=a.left+e.scrollLeft-(n?0:Cj(t,a)),c=a.top+e.scrollTop;return{x:i,y:c}}function eAe(t){let{elements:e,rect:n,offsetParent:a,strategy:i}=t;const c=i==="fixed",l=Ea(a),h=e?ZA(e.floating):!1;if(a===l||h&&c)return n;let p={scrollLeft:0,scrollTop:0},f=Aa(1);const k=Aa(0),m=$a(a);if((m||!m&&!c)&&((Sl(a)!=="body"||su(l))&&(p=WA(a)),$a(a))){const b=s1(a);f=dl(a),k.x=b.x+a.clientLeft,k.y=b.y+a.clientTop}const x=l&&!m&&!c?XU(l,p,!0):Aa(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-p.scrollLeft*f.x+k.x+x.x,y:n.y*f.y-p.scrollTop*f.y+k.y+x.y}}function tAe(t){return Array.from(t.getClientRects())}function nAe(t){const e=Ea(t),n=WA(t),a=t.ownerDocument.body,i=jn(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),c=jn(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let l=-n.scrollLeft+Cj(t);const h=-n.scrollTop;return la(a).direction==="rtl"&&(l+=jn(e.clientWidth,a.clientWidth)-i),{width:i,height:c,x:l,y:h}}function aAe(t,e){const n=Dn(t),a=Ea(t),i=n.visualViewport;let c=a.clientWidth,l=a.clientHeight,h=0,p=0;if(i){c=i.width,l=i.height;const f=_j();(!f||f&&e==="fixed")&&(h=i.offsetLeft,p=i.offsetTop)}return{width:c,height:l,x:h,y:p}}function oAe(t,e){const n=s1(t,!0,e==="fixed"),a=n.top+t.clientTop,i=n.left+t.clientLeft,c=$a(t)?dl(t):Aa(1),l=t.clientWidth*c.x,h=t.clientHeight*c.y,p=i*c.x,f=a*c.y;return{width:l,height:h,x:p,y:f}}function rB(t,e,n){let a;if(e==="viewport")a=aAe(t,n);else if(e==="document")a=nAe(Ea(t));else if(sa(e))a=oAe(e,n);else{const i=YU(t);a={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return gA(a)}function KU(t,e){const n=Fo(t);return n===e||!sa(n)||pl(n)?!1:la(n).position==="fixed"||KU(n,e)}function rAe(t,e){const n=e.get(t);if(n)return n;let a=Fd(t,[],!1).filter(h=>sa(h)&&Sl(h)!=="body"),i=null;const c=la(t).position==="fixed";let l=c?Fo(t):t;for(;sa(l)&&!pl(l);){const h=la(l),p=wj(l);!p&&h.position==="fixed"&&(i=null),(c?!p&&!i:!p&&h.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||su(l)&&!p&&KU(t,l))?a=a.filter(k=>k!==l):i=h,l=Fo(l)}return e.set(t,a),a}function iAe(t){let{element:e,boundary:n,rootBoundary:a,strategy:i}=t;const l=[...n==="clippingAncestors"?ZA(e)?[]:rAe(e,this._c):[].concat(n),a],h=l[0],p=l.reduce((f,k)=>{const m=rB(e,k,i);return f.top=jn(m.top,f.top),f.right=Bo(m.right,f.right),f.bottom=Bo(m.bottom,f.bottom),f.left=jn(m.left,f.left),f},rB(e,h,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function cAe(t){const{width:e,height:n}=WU(t);return{width:e,height:n}}function sAe(t,e,n){const a=$a(e),i=Ea(e),c=n==="fixed",l=s1(t,!0,c,e);let h={scrollLeft:0,scrollTop:0};const p=Aa(0);if(a||!a&&!c)if((Sl(e)!=="body"||su(i))&&(h=WA(e)),a){const x=s1(e,!0,c,e);p.x=x.x+e.clientLeft,p.y=x.y+e.clientTop}else i&&(p.x=Cj(i));const f=i&&!a&&!c?XU(i,h):Aa(0),k=l.left+h.scrollLeft-p.x-f.x,m=l.top+h.scrollTop-p.y-f.y;return{x:k,y:m,width:l.width,height:l.height}}function VR(t){return la(t).position==="static"}function iB(t,e){if(!$a(t)||la(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ea(t)===n&&(n=n.ownerDocument.body),n}function QU(t,e){const n=Dn(t);if(ZA(t))return n;if(!$a(t)){let i=Fo(t);for(;i&&!pl(i);){if(sa(i)&&!VR(i))return i;i=Fo(i)}return n}let a=iB(t,e);for(;a&&XNe(a)&&VR(a);)a=iB(a,e);return a&&pl(a)&&VR(a)&&!wj(a)?n:a||KNe(t)||n}const lAe=async function(t){const e=this.getOffsetParent||QU,n=this.getDimensions,a=await n(t.floating);return{reference:sAe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function dAe(t){return la(t).direction==="rtl"}const uAe={convertOffsetParentRelativeRectToViewportRelativeRect:eAe,getDocumentElement:Ea,getClippingRect:iAe,getOffsetParent:QU,getElementRects:lAe,getClientRects:tAe,getDimensions:cAe,getScale:dl,isElement:sa,isRTL:dAe};function JU(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function hAe(t,e){let n=null,a;const i=Ea(t);function c(){var h;clearTimeout(a),(h=n)==null||h.disconnect(),n=null}function l(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),c();const f=t.getBoundingClientRect(),{left:k,top:m,width:x,height:b}=f;if(h||e(),!x||!b)return;const w=B2(m),S=B2(i.clientWidth-(k+x)),_=B2(i.clientHeight-(m+b)),C=B2(k),A={rootMargin:-w+"px "+-S+"px "+-_+"px "+-C+"px",threshold:jn(0,Bo(1,p))||1};let $=!0;function E(P){const D=P[0].intersectionRatio;if(D!==p){if(!$)return l();D?l(!1,D):a=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!JU(f,t.getBoundingClientRect())&&l(),$=!1}try{n=new IntersectionObserver(E,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,A)}n.observe(t)}return l(!0),c}function eG(t,e,n,a){a===void 0&&(a={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=a,f=Sj(t),k=i||c?[...f?Fd(f):[],...Fd(e)]:[];k.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const m=f&&h?hAe(f,n):null;let x=-1,b=null;l&&(b=new ResizeObserver(C=>{let[N]=C;N&&N.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(e)})),n()}),f&&!p&&b.observe(f),b.observe(e));let w,S=p?s1(t):null;p&&_();function _(){const C=s1(t);S&&!JU(S,C)&&n(),S=C,w=requestAnimationFrame(_)}return n(),()=>{var C;k.forEach(N=>{i&&N.removeEventListener("scroll",n),c&&N.removeEventListener("resize",n)}),m==null||m(),(C=b)==null||C.disconnect(),b=null,p&&cancelAnimationFrame(w)}}const pAe=GNe,fAe=ZNe,yAe=VNe,mAe=YNe,kAe=FNe,cB=BNe,vAe=WNe,gAe=(t,e,n)=>{const a=new Map,i={platform:uAe,...n},c={...i.platform,_c:a};return HNe(t,e,{...i,platform:c})};var iA=typeof document<"u"?v.useLayoutEffect:v.useEffect;function MA(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,a,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(a=n;a--!==0;)if(!MA(t[a],e[a]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(e,i[a]))return!1;for(a=n;a--!==0;){const c=i[a];if(!(c==="_owner"&&t.$$typeof)&&!MA(t[c],e[c]))return!1}return!0}return t!==t&&e!==e}function tG(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function sB(t,e){const n=tG(t);return Math.round(e*n)/n}function FR(t){const e=v.useRef(t);return iA(()=>{e.current=t}),e}function nG(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:a=[],platform:i,elements:{reference:c,floating:l}={},transform:h=!0,whileElementsMounted:p,open:f}=t,[k,m]=v.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=v.useState(a);MA(x,a)||b(a);const[w,S]=v.useState(null),[_,C]=v.useState(null),N=v.useCallback(R=>{R!==P.current&&(P.current=R,S(R))},[]),A=v.useCallback(R=>{R!==D.current&&(D.current=R,C(R))},[]),$=c||w,E=l||_,P=v.useRef(null),D=v.useRef(null),H=v.useRef(k),ie=p!=null,re=FR(p),le=FR(i),Q=FR(f),fe=v.useCallback(()=>{if(!P.current||!D.current)return;const R={placement:e,strategy:n,middleware:x};le.current&&(R.platform=le.current),gAe(P.current,D.current,R).then(U=>{const T={...U,isPositioned:Q.current!==!1};ke.current&&!MA(H.current,T)&&(H.current=T,gl.flushSync(()=>{m(T)}))})},[x,e,n,le,Q]);iA(()=>{f===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,m(R=>({...R,isPositioned:!1})))},[f]);const ke=v.useRef(!1);iA(()=>(ke.current=!0,()=>{ke.current=!1}),[]),iA(()=>{if($&&(P.current=$),E&&(D.current=E),$&&E){if(re.current)return re.current($,E,fe);fe()}},[$,E,fe,re,ie]);const ye=v.useMemo(()=>({reference:P,floating:D,setReference:N,setFloating:A}),[N,A]),j=v.useMemo(()=>({reference:$,floating:E}),[$,E]),B=v.useMemo(()=>{const R={position:n,left:0,top:0};if(!j.floating)return R;const U=sB(j.floating,k.x),T=sB(j.floating,k.y);return h?{...R,transform:"translate("+U+"px, "+T+"px)",...tG(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:T}},[n,h,j.floating,k.x,k.y]);return v.useMemo(()=>({...k,update:fe,refs:ye,elements:j,floatingStyles:B}),[k,fe,ye,j,B])}const MAe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:a,padding:i}=typeof t=="function"?t(n):t;return a&&e(a)?a.current!=null?cB({element:a.current,padding:i}).fn(n):{}:a?cB({element:a,padding:i}).fn(n):{}}}},aG=(t,e)=>({...pAe(t),options:[t,e]}),oG=(t,e)=>({...fAe(t),options:[t,e]}),rG=(t,e)=>({...vAe(t),options:[t,e]}),iG=(t,e)=>({...yAe(t),options:[t,e]}),cG=(t,e)=>({...mAe(t),options:[t,e]}),sG=(t,e)=>({...kAe(t),options:[t,e]}),lG=(t,e)=>({...MAe(t),options:[t,e]});var xAe="Arrow",dG=v.forwardRef((t,e)=>{const{children:n,width:a=10,height:i=5,...c}=t;return M.jsx(pn.svg,{...c,ref:e,width:a,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});dG.displayName=xAe;var bAe=dG,Lj="Popper",[uG,hG]=Ot(Lj),[wAe,pG]=uG(Lj),fG=t=>{const{__scopePopper:e,children:n}=t,[a,i]=v.useState(null);return M.jsx(wAe,{scope:e,anchor:a,onAnchorChange:i,children:n})};fG.displayName=Lj;var yG="PopperAnchor",mG=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:a,...i}=t,c=pG(yG,n),l=v.useRef(null),h=Ae(e,l);return v.useEffect(()=>{c.onAnchorChange((a==null?void 0:a.current)||l.current)}),a?null:M.jsx(pn.div,{...i,ref:h})});mG.displayName=yG;var Nj="PopperContent",[_Ae,SAe]=uG(Nj),kG=v.forwardRef((t,e)=>{var ee,ge,ve,Me,be,xe;const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:f=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...S}=t,_=pG(Nj,n),[C,N]=v.useState(null),A=Ae(e,Te=>N(Te)),[$,E]=v.useState(null),P=au($),D=(P==null?void 0:P.width)??0,H=(P==null?void 0:P.height)??0,ie=a+(c!=="center"?"-"+c:""),re=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},le=Array.isArray(f)?f:[f],Q=le.length>0,fe={padding:re,boundary:le.filter(LAe),altBoundary:Q},{refs:ke,floatingStyles:ye,placement:j,isPositioned:B,middlewareData:R}=nG({strategy:"fixed",placement:ie,whileElementsMounted:(...Te)=>eG(...Te,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[aG({mainAxis:i+H,alignmentAxis:l}),p&&oG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rG():void 0,...fe}),p&&iG({...fe}),cG({...fe,apply:({elements:Te,rects:Be,availableWidth:ft,availableHeight:nt})=>{const{width:Pe,height:$t}=Be.reference,at=Te.floating.style;at.setProperty("--radix-popper-available-width",`${ft}px`),at.setProperty("--radix-popper-available-height",`${nt}px`),at.setProperty("--radix-popper-anchor-width",`${Pe}px`),at.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),$&&lG({element:$,padding:h}),NAe({arrowWidth:D,arrowHeight:H}),x&&sG({strategy:"referenceHidden",...fe})]}),[U,T]=MG(j),z=It(w);bt(()=>{B&&(z==null||z())},[B,z]);const O=(ee=R.arrow)==null?void 0:ee.x,V=(ge=R.arrow)==null?void 0:ge.y,W=((ve=R.arrow)==null?void 0:ve.centerOffset)!==0,[ae,ce]=v.useState();return bt(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),M.jsx("div",{ref:ke.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:B?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Me=R.transformOrigin)==null?void 0:Me.x,(be=R.transformOrigin)==null?void 0:be.y].join(" "),...((xe=R.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:M.jsx(_Ae,{scope:n,placedSide:U,onArrowChange:E,arrowX:O,arrowY:V,shouldHideArrow:W,children:M.jsx(pn.div,{"data-side":U,"data-align":T,...S,ref:A,style:{...S.style,animation:B?void 0:"none"}})})})});kG.displayName=Nj;var vG="PopperArrow",CAe={top:"bottom",right:"left",bottom:"top",left:"right"},gG=v.forwardRef(function(e,n){const{__scopePopper:a,...i}=e,c=SAe(vG,a),l=CAe[c.placedSide];return M.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:M.jsx(bAe,{...i,ref:n,style:{...i.style,display:"block"}})})});gG.displayName=vG;function LAe(t){return t!==null}var NAe=t=>({name:"transformOrigin",options:t,fn(e){var _,C,N;const{placement:n,rects:a,middlewareData:i}=e,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:t.arrowWidth,p=l?0:t.arrowHeight,[f,k]=MG(n),m={start:"0%",center:"50%",end:"100%"}[k],x=(((C=i.arrow)==null?void 0:C.x)??0)+h/2,b=(((N=i.arrow)==null?void 0:N.y)??0)+p/2;let w="",S="";return f==="bottom"?(w=l?m:`${x}px`,S=`${-p}px`):f==="top"?(w=l?m:`${x}px`,S=`${a.floating.height+p}px`):f==="right"?(w=`${-p}px`,S=l?m:`${b}px`):f==="left"&&(w=`${a.floating.width+p}px`,S=l?m:`${b}px`),{data:{x:w,y:S}}}});function MG(t){const[e,n="center"]=t.split("-");return[e,n]}var xG=fG,AAe=mG,IAe=kG,$Ae=gG,EAe="Portal",bG=v.forwardRef((t,e)=>{var h;const{container:n,...a}=t,[i,c]=v.useState(!1);bt(()=>c(!0),[]);const l=n||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?OA.createPortal(M.jsx(pn.div,{...a,ref:e}),l):null});bG.displayName=EAe;var UR="rovingFocusGroup.onEntryFocus",RAe={bubbles:!1,cancelable:!0},lu="RovingFocusGroup",[xT,wG,TAe]=PU(lu),[jAe,_G]=Ot(lu,[TAe]),[DAe,OAe]=jAe(lu),SG=v.forwardRef((t,e)=>M.jsx(xT.Provider,{scope:t.__scopeRovingFocusGroup,children:M.jsx(xT.Slot,{scope:t.__scopeRovingFocusGroup,children:M.jsx(qAe,{...t,ref:e})})}));SG.displayName=lu;var qAe=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:k=!1,...m}=t,x=v.useRef(null),b=Ae(e,x),w=f1(c),[S,_]=on({prop:l,defaultProp:h??null,onChange:p,caller:lu}),[C,N]=v.useState(!1),A=It(f),$=wG(n),E=v.useRef(!1),[P,D]=v.useState(0);return v.useEffect(()=>{const H=x.current;if(H)return H.addEventListener(UR,A),()=>H.removeEventListener(UR,A)},[A]),M.jsx(DAe,{scope:n,orientation:a,dir:w,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(H=>_(H),[_]),onItemShiftTab:v.useCallback(()=>N(!0),[]),onFocusableItemAdd:v.useCallback(()=>D(H=>H+1),[]),onFocusableItemRemove:v.useCallback(()=>D(H=>H-1),[]),children:M.jsx(pn.div,{tabIndex:C||P===0?-1:0,"data-orientation":a,...m,ref:b,style:{outline:"none",...t.style},onMouseDown:ue(t.onMouseDown,()=>{E.current=!0}),onFocus:ue(t.onFocus,H=>{const ie=!E.current;if(H.target===H.currentTarget&&ie&&!C){const re=new CustomEvent(UR,RAe);if(H.currentTarget.dispatchEvent(re),!re.defaultPrevented){const le=$().filter(j=>j.focusable),Q=le.find(j=>j.active),fe=le.find(j=>j.id===S),ye=[Q,fe,...le].filter(Boolean).map(j=>j.ref.current);NG(ye,k)}}E.current=!1}),onBlur:ue(t.onBlur,()=>N(!1))})})}),CG="RovingFocusGroupItem",LG=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:c,children:l,...h}=t,p=ht(),f=c||p,k=OAe(CG,n),m=k.currentTabStopId===f,x=wG(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:S}=k;return v.useEffect(()=>{if(a)return b(),()=>w()},[a,b,w]),M.jsx(xT.ItemSlot,{scope:n,id:f,focusable:a,active:i,children:M.jsx(pn.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:e,onMouseDown:ue(t.onMouseDown,_=>{a?k.onItemFocus(f):_.preventDefault()}),onFocus:ue(t.onFocus,()=>k.onItemFocus(f)),onKeyDown:ue(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const C=HAe(_,k.orientation,k.dir);if(C!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let A=x().filter($=>$.focusable).map($=>$.ref.current);if(C==="last")A.reverse();else if(C==="prev"||C==="next"){C==="prev"&&A.reverse();const $=A.indexOf(_.currentTarget);A=k.loop?BAe(A,$+1):A.slice($+1)}setTimeout(()=>NG(A))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});LG.displayName=CG;var PAe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zAe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function HAe(t,e,n){const a=zAe(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return PAe[a]}function NG(t,e=!1){const n=document.activeElement;for(const a of t)if(a===n||(a.focus({preventScroll:e}),document.activeElement!==n))return}function BAe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var VAe=SG,FAe=LG,bT=["Enter"," "],UAe=["ArrowDown","PageUp","Home"],AG=["ArrowUp","PageDown","End"],GAe=[...UAe,...AG],ZAe={ltr:[...bT,"ArrowRight"],rtl:[...bT,"ArrowLeft"]},WAe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},du="Menu",[Ud,YAe,XAe]=PU(du),[y1,IG]=Ot(du,[XAe,hG,_G]),uu=hG(),$G=_G(),[EG,Zo]=y1(du),[KAe,hu]=y1(du),RG=t=>{const{__scopeMenu:e,open:n=!1,children:a,dir:i,onOpenChange:c,modal:l=!0}=t,h=uu(e),[p,f]=v.useState(null),k=v.useRef(!1),m=It(c),x=f1(i);return v.useEffect(()=>{const b=()=>{k.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>k.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),M.jsx(xG,{...h,children:M.jsx(EG,{scope:e,open:n,onOpenChange:m,content:p,onContentChange:f,children:M.jsx(KAe,{scope:e,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:a})})})};RG.displayName=du;var QAe="MenuAnchor",Aj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=uu(n);return M.jsx(AAe,{...i,...a,ref:e})});Aj.displayName=QAe;var Ij="MenuPortal",[JAe,TG]=y1(Ij,{forceMount:void 0}),jG=t=>{const{__scopeMenu:e,forceMount:n,children:a,container:i}=t,c=Zo(Ij,e);return M.jsx(JAe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(bG,{asChild:!0,container:i,children:a})})})};jG.displayName=Ij;var Kn="MenuContent",[eIe,$j]=y1(Kn),DG=v.forwardRef((t,e)=>{const n=TG(Kn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Zo(Kn,t.__scopeMenu),l=hu(Kn,t.__scopeMenu);return M.jsx(Ud.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Ud.Slot,{scope:t.__scopeMenu,children:l.modal?M.jsx(tIe,{...i,ref:e}):M.jsx(nIe,{...i,ref:e})})})})}),tIe=v.forwardRef((t,e)=>{const n=Zo(Kn,t.__scopeMenu),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return iu(c)},[]),M.jsx(Ej,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),nIe=v.forwardRef((t,e)=>{const n=Zo(Kn,t.__scopeMenu);return M.jsx(Ej,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aIe=mA("MenuContent.ScrollLock"),Ej=v.forwardRef((t,e)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,disableOutsideScroll:w,...S}=t,_=Zo(Kn,n),C=hu(Kn,n),N=uu(n),A=$G(n),$=YAe(n),[E,P]=v.useState(null),D=v.useRef(null),H=Ae(e,D,_.onContentChange),ie=v.useRef(0),re=v.useRef(""),le=v.useRef(0),Q=v.useRef(null),fe=v.useRef("right"),ke=v.useRef(0),ye=w?wl:v.Fragment,j=w?{as:aIe,allowPinchZoom:!0}:void 0,B=U=>{var ee,ge;const T=re.current+U,z=$().filter(ve=>!ve.disabled),O=document.activeElement,V=(ee=z.find(ve=>ve.ref.current===O))==null?void 0:ee.textValue,W=z.map(ve=>ve.textValue),ae=yIe(W,T,V),ce=(ge=z.find(ve=>ve.textValue===ae))==null?void 0:ge.ref.current;(function ve(Me){re.current=Me,window.clearTimeout(ie.current),Me!==""&&(ie.current=window.setTimeout(()=>ve(""),1e3))})(T),ce&&setTimeout(()=>ce.focus())};v.useEffect(()=>()=>window.clearTimeout(ie.current),[]),ru();const R=v.useCallback(U=>{var z,O;return fe.current===((z=Q.current)==null?void 0:z.side)&&kIe(U,(O=Q.current)==null?void 0:O.area)},[]);return M.jsx(eIe,{scope:n,searchRef:re,onItemEnter:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),onItemLeave:v.useCallback(U=>{var T;R(U)||((T=D.current)==null||T.focus(),P(null))},[R]),onTriggerLeave:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),pointerGraceTimerRef:le,onPointerGraceIntentChange:v.useCallback(U=>{Q.current=U},[]),children:M.jsx(ye,{...j,children:M.jsx(VU,{asChild:!0,trapped:i,onMountAutoFocus:ue(c,U=>{var T;U.preventDefault(),(T=D.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(HU,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,children:M.jsx(VAe,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:ue(p,U=>{C.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(IAe,{role:"menu","aria-orientation":"vertical","data-state":JG(_.open),"data-radix-menu-content":"",dir:C.dir,...N,...S,ref:H,style:{outline:"none",...S.style},onKeyDown:ue(S.onKeyDown,U=>{const z=U.target.closest("[data-radix-menu-content]")===U.currentTarget,O=U.ctrlKey||U.altKey||U.metaKey,V=U.key.length===1;z&&(U.key==="Tab"&&U.preventDefault(),!O&&V&&B(U.key));const W=D.current;if(U.target!==W||!GAe.includes(U.key))return;U.preventDefault();const ce=$().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);AG.includes(U.key)&&ce.reverse(),pIe(ce)}),onBlur:ue(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(ie.current),re.current="")}),onPointerMove:ue(t.onPointerMove,Gd(U=>{const T=U.target,z=ke.current!==U.clientX;if(U.currentTarget.contains(T)&&z){const O=U.clientX>ke.current?"right":"left";fe.current=O,ke.current=U.clientX}}))})})})})})})});DG.displayName=Kn;var oIe="MenuGroup",Rj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{role:"group",...a,ref:e})});Rj.displayName=oIe;var rIe="MenuLabel",OG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{...a,ref:e})});OG.displayName=rIe;var xA="MenuItem",lB="menu.itemSelect",YA=v.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:a,...i}=t,c=v.useRef(null),l=hu(xA,t.__scopeMenu),h=$j(xA,t.__scopeMenu),p=Ae(e,c),f=v.useRef(!1),k=()=>{const m=c.current;if(!n&&m){const x=new CustomEvent(lB,{bubbles:!0,cancelable:!0});m.addEventListener(lB,b=>a==null?void 0:a(b),{once:!0}),qU(m,x),x.defaultPrevented?f.current=!1:l.onClose()}};return M.jsx(qG,{...i,ref:p,disabled:n,onClick:ue(t.onClick,k),onPointerDown:m=>{var x;(x=t.onPointerDown)==null||x.call(t,m),f.current=!0},onPointerUp:ue(t.onPointerUp,m=>{var x;f.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:ue(t.onKeyDown,m=>{const x=h.searchRef.current!=="";n||x&&m.key===" "||bT.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});YA.displayName=xA;var qG=v.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:a=!1,textValue:i,...c}=t,l=$j(xA,n),h=$G(n),p=v.useRef(null),f=Ae(e,p),[k,m]=v.useState(!1),[x,b]=v.useState("");return v.useEffect(()=>{const w=p.current;w&&b((w.textContent??"").trim())},[c.children]),M.jsx(Ud.ItemSlot,{scope:n,disabled:a,textValue:i??x,children:M.jsx(FAe,{asChild:!0,...h,focusable:!a,children:M.jsx(pn.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:f,onPointerMove:ue(t.onPointerMove,Gd(w=>{a?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(t.onPointerLeave,Gd(w=>l.onItemLeave(w))),onFocus:ue(t.onFocus,()=>m(!0)),onBlur:ue(t.onBlur,()=>m(!1))})})})}),iIe="MenuCheckboxItem",PG=v.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:a,...i}=t;return M.jsx(FG,{scope:t.__scopeMenu,checked:n,children:M.jsx(YA,{role:"menuitemcheckbox","aria-checked":bA(n)?"mixed":n,...i,ref:e,"data-state":Dj(n),onSelect:ue(i.onSelect,()=>a==null?void 0:a(bA(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PG.displayName=iIe;var zG="MenuRadioGroup",[cIe,sIe]=y1(zG,{value:void 0,onValueChange:()=>{}}),HG=v.forwardRef((t,e)=>{const{value:n,onValueChange:a,...i}=t,c=It(a);return M.jsx(cIe,{scope:t.__scopeMenu,value:n,onValueChange:c,children:M.jsx(Rj,{...i,ref:e})})});HG.displayName=zG;var BG="MenuRadioItem",VG=v.forwardRef((t,e)=>{const{value:n,...a}=t,i=sIe(BG,t.__scopeMenu),c=n===i.value;return M.jsx(FG,{scope:t.__scopeMenu,checked:c,children:M.jsx(YA,{role:"menuitemradio","aria-checked":c,...a,ref:e,"data-state":Dj(c),onSelect:ue(a.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});VG.displayName=BG;var Tj="MenuItemIndicator",[FG,lIe]=y1(Tj,{checked:!1}),UG=v.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:a,...i}=t,c=lIe(Tj,n);return M.jsx(Yt,{present:a||bA(c.checked)||c.checked===!0,children:M.jsx(pn.span,{...i,ref:e,"data-state":Dj(c.checked)})})});UG.displayName=Tj;var dIe="MenuSeparator",GG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...a,ref:e})});GG.displayName=dIe;var uIe="MenuArrow",ZG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=uu(n);return M.jsx($Ae,{...i,...a,ref:e})});ZG.displayName=uIe;var jj="MenuSub",[hIe,WG]=y1(jj),YG=t=>{const{__scopeMenu:e,children:n,open:a=!1,onOpenChange:i}=t,c=Zo(jj,e),l=uu(e),[h,p]=v.useState(null),[f,k]=v.useState(null),m=It(i);return v.useEffect(()=>(c.open===!1&&m(!1),()=>m(!1)),[c.open,m]),M.jsx(xG,{...l,children:M.jsx(EG,{scope:e,open:a,onOpenChange:m,content:f,onContentChange:k,children:M.jsx(hIe,{scope:e,contentId:ht(),triggerId:ht(),trigger:h,onTriggerChange:p,children:n})})})};YG.displayName=jj;var Td="MenuSubTrigger",XG=v.forwardRef((t,e)=>{const n=Zo(Td,t.__scopeMenu),a=hu(Td,t.__scopeMenu),i=WG(Td,t.__scopeMenu),c=$j(Td,t.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=c,f={__scopeMenu:t.__scopeMenu},k=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>k,[k]),v.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),p(null)}},[h,p]),M.jsx(Aj,{asChild:!0,...f,children:M.jsx(qG,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":JG(n.open),...t,ref:ra(e,i.onTriggerChange),onClick:m=>{var x;(x=t.onClick)==null||x.call(t,m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(t.onPointerMove,Gd(m=>{c.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!n.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),k()},100))})),onPointerLeave:ue(t.onPointerLeave,Gd(m=>{var b,w;k();const x=(b=n.content)==null?void 0:b.getBoundingClientRect();if(x){const S=(w=n.content)==null?void 0:w.dataset.side,_=S==="right",C=_?-5:5,N=x[_?"left":"right"],A=x[_?"right":"left"];c.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:N,y:x.top},{x:A,y:x.top},{x:A,y:x.bottom},{x:N,y:x.bottom}],side:S}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(m),m.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:ue(t.onKeyDown,m=>{var b;const x=c.searchRef.current!=="";t.disabled||x&&m.key===" "||ZAe[a.dir].includes(m.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),m.preventDefault())})})})});XG.displayName=Td;var KG="MenuSubContent",QG=v.forwardRef((t,e)=>{const n=TG(Kn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Zo(Kn,t.__scopeMenu),l=hu(Kn,t.__scopeMenu),h=WG(KG,t.__scopeMenu),p=v.useRef(null),f=Ae(e,p);return M.jsx(Ud.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Ud.Slot,{scope:t.__scopeMenu,children:M.jsx(Ej,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=p.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:ue(t.onFocusOutside,k=>{k.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:ue(t.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:ue(t.onKeyDown,k=>{var b;const m=k.currentTarget.contains(k.target),x=WAe[l.dir].includes(k.key);m&&x&&(c.onOpenChange(!1),(b=h.trigger)==null||b.focus(),k.preventDefault())})})})})})});QG.displayName=KG;function JG(t){return t?"open":"closed"}function bA(t){return t==="indeterminate"}function Dj(t){return bA(t)?"indeterminate":t?"checked":"unchecked"}function pIe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function fIe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}function yIe(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=fIe(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function mIe(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function kIe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return mIe(n,e)}function Gd(t){return e=>e.pointerType==="mouse"?t(e):void 0}var vIe=RG,gIe=Aj,MIe=jG,xIe=DG,bIe=Rj,wIe=OG,_Ie=YA,SIe=PG,CIe=HG,LIe=VG,NIe=UG,AIe=GG,IIe=ZG,$Ie=YG,EIe=XG,RIe=QG,Oj="ContextMenu",[TIe,Tqe]=Ot(Oj,[IG]),rn=IG(),[jIe,eZ]=TIe(Oj),tZ=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:a,dir:i,modal:c=!0}=t,[l,h]=v.useState(!1),p=rn(e),f=It(a),k=v.useCallback(m=>{h(m),f(m)},[f]);return M.jsx(jIe,{scope:e,open:l,onOpenChange:k,modal:c,children:M.jsx(vIe,{...p,dir:i,open:l,onOpenChange:k,modal:c,children:n})})};tZ.displayName=Oj;var nZ="ContextMenuTrigger",aZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:a=!1,...i}=t,c=eZ(nZ,n),l=rn(n),h=v.useRef({x:0,y:0}),p=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),f=v.useRef(0),k=v.useCallback(()=>window.clearTimeout(f.current),[]),m=x=>{h.current={x:x.clientX,y:x.clientY},c.onOpenChange(!0)};return v.useEffect(()=>k,[k]),v.useEffect(()=>void(a&&k()),[a,k]),M.jsxs(M.Fragment,{children:[M.jsx(gIe,{...l,virtualRef:p}),M.jsx(pn.span,{"data-state":c.open?"open":"closed","data-disabled":a?"":void 0,...i,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:a?t.onContextMenu:ue(t.onContextMenu,x=>{k(),m(x),x.preventDefault()}),onPointerDown:a?t.onPointerDown:ue(t.onPointerDown,V2(x=>{k(),f.current=window.setTimeout(()=>m(x),700)})),onPointerMove:a?t.onPointerMove:ue(t.onPointerMove,V2(k)),onPointerCancel:a?t.onPointerCancel:ue(t.onPointerCancel,V2(k)),onPointerUp:a?t.onPointerUp:ue(t.onPointerUp,V2(k))})]})});aZ.displayName=nZ;var DIe="ContextMenuPortal",oZ=t=>{const{__scopeContextMenu:e,...n}=t,a=rn(e);return M.jsx(MIe,{...a,...n})};oZ.displayName=DIe;var rZ="ContextMenuContent",iZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=eZ(rZ,n),c=rn(n),l=v.useRef(!1);return M.jsx(xIe,{...c,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var p;(p=t.onCloseAutoFocus)==null||p.call(t,h),!h.defaultPrevented&&l.current&&h.preventDefault(),l.current=!1},onInteractOutside:h=>{var p;(p=t.onInteractOutside)==null||p.call(t,h),!h.defaultPrevented&&!i.modal&&(l.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iZ.displayName=rZ;var OIe="ContextMenuGroup",cZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(bIe,{...i,...a,ref:e})});cZ.displayName=OIe;var qIe="ContextMenuLabel",sZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(wIe,{...i,...a,ref:e})});sZ.displayName=qIe;var PIe="ContextMenuItem",lZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(_Ie,{...i,...a,ref:e})});lZ.displayName=PIe;var zIe="ContextMenuCheckboxItem",dZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(SIe,{...i,...a,ref:e})});dZ.displayName=zIe;var HIe="ContextMenuRadioGroup",uZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(CIe,{...i,...a,ref:e})});uZ.displayName=HIe;var BIe="ContextMenuRadioItem",hZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(LIe,{...i,...a,ref:e})});hZ.displayName=BIe;var VIe="ContextMenuItemIndicator",pZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(NIe,{...i,...a,ref:e})});pZ.displayName=VIe;var FIe="ContextMenuSeparator",fZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(AIe,{...i,...a,ref:e})});fZ.displayName=FIe;var UIe="ContextMenuArrow",GIe=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(IIe,{...i,...a,ref:e})});GIe.displayName=UIe;var yZ="ContextMenuSub",mZ=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:a,open:i,defaultOpen:c}=t,l=rn(e),[h,p]=on({prop:i,defaultProp:c??!1,onChange:a,caller:yZ});return M.jsx($Ie,{...l,open:h,onOpenChange:p,children:n})};mZ.displayName=yZ;var ZIe="ContextMenuSubTrigger",kZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(EIe,{...i,...a,ref:e})});kZ.displayName=ZIe;var WIe="ContextMenuSubContent",vZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(RIe,{...i,...a,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vZ.displayName=WIe;function V2(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var YIe=tZ,XIe=aZ,gZ=oZ,KIe=iZ,QIe=cZ,JIe=sZ,e$e=lZ,t$e=dZ,n$e=uZ,a$e=hZ,MZ=pZ,o$e=fZ,r$e=mZ,i$e=kZ,c$e=vZ;function s$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YIe,{"data-slot":"context-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function l$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(XIe,{"data-slot":"context-menu-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function d$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(QIe,{"data-slot":"context-menu-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function u$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(gZ,{"data-slot":"context-menu-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function h$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(r$e,{"data-slot":"context-menu-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function p$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(n$e,{"data-slot":"context-menu-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function f$e(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(i$e,{"data-slot":"context-menu-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function y$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(c$e,{"data-slot":"context-menu-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function m$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(gZ,{children:M.jsx(KIe,{"data-slot":"context-menu-content",className:i,...a})}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function k$e(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(e$e,{"data-slot":"context-menu-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function v$e(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(MZ,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(t$e,{"data-slot":"context-menu-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function g$e(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(MZ,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(a$e,{"data-slot":"context-menu-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function M$e(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(JIe,{"data-slot":"context-menu-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function x$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(o$e,{"data-slot":"context-menu-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function b$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"context-menu-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const Uo=v.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),xZ=v.forwardRef((t,e)=>{const n=Z.c(36);let a,i,c,l,h,p;n[0]!==t?({children:a,className:i,open:h,onOpenChange:c,clickable:p,...l}=t,n[0]=t,n[1]=a,n[2]=i,n[3]=c,n[4]=l,n[5]=h,n[6]=p):(a=n[1],i=n[2],c=n[3],l=n[4],h=n[5],p=n[6]);const f=h===void 0?!1:h,k=p===void 0?!1:p,[m,x]=v.useState(0),[b,w]=v.useState(f),[S,_]=v.useState(!1),[C,N]=v.useState(0);let A;n[7]!==m?(A=Q=>{Q===m&&(m>0?x(R$e):w(!1))},n[7]=m,n[8]=A):A=n[8];const $=A;let E;n[9]!==m||n[10]!==$||n[11]!==b||n[12]!==C?(E=()=>({open:()=>{w(!0)},close:()=>{w(!1),x(0)},next:()=>{x(m+1)},prev:()=>{m>0&&x(m-1)},goTo:Q=>{Q>=0&&Q<C&&x(Q)},closeCurrent:()=>$(m),isOpen:b,activeIndex:m,totalDialogs:C}),n[9]=m,n[10]=$,n[11]=b,n[12]=C,n[13]=E):E=n[13];let P;n[14]!==m||n[15]!==b||n[16]!==C?(P=[m,C,b],n[14]=m,n[15]=b,n[16]=C,n[17]=P):P=n[17],v.useImperativeHandle(e,E,P);let D,H;n[18]!==b||n[19]!==c?(D=()=>{const Q=document.documentElement;return b?(Q.style.overflow="hidden",_(!0)):Q.style.overflow="",c==null||c(b),()=>{Q.style.overflow=""}},H=[b,c],n[18]=b,n[19]=c,n[20]=D,n[21]=H):(D=n[20],H=n[21]),v.useEffect(D,H);let ie;n[22]!==m||n[23]!==k||n[24]!==$||n[25]!==b||n[26]!==S||n[27]!==C?(ie={activeIndex:m,setActiveIndex:x,totalDialogs:C,setTotalDialogs:N,isOpen:b,setIsOpen:w,clickable:k,shouldAnimate:S,setShouldAnimate:_,closeDialog:$},n[22]=m,n[23]=k,n[24]=$,n[25]=b,n[26]=S,n[27]=C,n[28]=ie):ie=n[28];let re;n[29]!==a||n[30]!==i||n[31]!==l?(re=M.jsx("div",{className:i,...l,children:a}),n[29]=a,n[30]=i,n[31]=l,n[32]=re):re=n[32];let le;return n[33]!==ie||n[34]!==re?(le=M.jsx(Uo.Provider,{value:ie,children:re}),n[33]=ie,n[34]=re,n[35]=le):le=n[35],le});xZ.displayName="DialogStack";const w$e=t=>{const e=Z.c(28);let n,a,i,c,l;e[0]!==t?({children:a,className:i,onClick:c,asChild:n,...l}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=v.useContext(Uo);if(!h)throw new Error("DialogStackTrigger must be used within a DialogStack");let p;e[6]!==h||e[7]!==c?(p=x=>{h.setIsOpen(!0),c==null||c(x)},e[6]=h,e[7]=c,e[8]=p):p=e[8];const f=p;if(n&&v.isValidElement(a)){let x;if(e[9]!==a||e[10]!==i||e[11]!==f||e[12]!==l){let b;e[14]!==a.props.className||e[15]!==i?(b=oe(i,a.props.className),e[14]=a.props.className,e[15]=i,e[16]=b):b=e[16];let w;e[17]!==f||e[18]!==l||e[19]!==b?(w={onClick:f,className:b,...l},e[17]=f,e[18]=l,e[19]=b,e[20]=w):w=e[20],x=v.cloneElement(a,w),e[9]=a,e[10]=i,e[11]=f,e[12]=l,e[13]=x}else x=e[13];return x}let k;e[21]!==i?(k=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm","ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","bg-primary text-primary-foreground hover:bg-primary/90","h-10 px-4 py-2",i),e[21]=i,e[22]=k):k=e[22];let m;return e[23]!==a||e[24]!==f||e[25]!==l||e[26]!==k?(m=M.jsx("button",{onClick:f,className:k,...l,children:a}),e[23]=a,e[24]=f,e[25]=l,e[26]=k,e[27]=m):m=e[27],m},_$e=t=>{const e=Z.c(11);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const i=v.useContext(Uo);if(!i)throw new Error("DialogStackOverlay must be used within a DialogStack");if(!i.isOpen)return null;let c;e[3]!==n?(c=oe("fixed inset-0 z-[1001] bg-black/80 backdrop-blur-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 slide-in-from-right-1/2 data-[state=open]:fade-in-0",n),e[3]=n,e[4]=c):c=e[4];let l;e[5]!==i?(l=()=>{i.activeIndex===0?i.setIsOpen(!1):i.setActiveIndex(i.activeIndex-1)},e[5]=i,e[6]=l):l=e[6];let h;return e[7]!==a||e[8]!==c||e[9]!==l?(h=M.jsx("div",{className:c,onClick:l,...a}),e[7]=a,e[8]=c,e[9]=l,e[10]=h):h=e[10],h},S$e=t=>{const e=Z.c(20);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=v.useContext(Uo);let l;e[4]!==n?(l=v.Children.count(n),e[4]=n,e[5]=l):l=e[5];const[h,p]=v.useState(l);if(!c)throw new Error("DialogStackBody must be used within a DialogStack");if(!c.isOpen)return null;let f;e[6]!==c||e[7]!==h?(f={...c,totalDialogs:h,setTotalDialogs:p},e[6]=c,e[7]=h,e[8]=f):f=e[8];let k;e[9]!==a?(k=oe("pointer-events-none fixed z-[1002] w-full max-w-full md:max-w-[67%] right-0 top-0 md:top-[1vh]",a),e[9]=a,e[10]=k):k=e[10];let m;e[11]!==n?(m=v.Children.map(n,T$e),e[11]=n,e[12]=m):m=e[12];let x;e[13]!==i||e[14]!==k||e[15]!==m?(x=M.jsx(UCe,{children:M.jsx("div",{className:k,...i,children:m})}),e[13]=i,e[14]=k,e[15]=m,e[16]=x):x=e[16];let b;return e[17]!==f||e[18]!==x?(b=M.jsx(Uo.Provider,{value:f,children:x}),e[17]=f,e[18]=x,e[19]=b):b=e[19],b},C$e=({children:t,className:e,index:n=0,offset:a=20,...i})=>{const c=v.useContext(Uo);if(!c)throw new Error("DialogStackContent must be used within a DialogStack");if(!c.isOpen)return null;const l=()=>{c.closeDialog(n)},h=m=>{m.stopPropagation(),c.clickable&&c.activeIndex>n&&c.setActiveIndex(n??0)},p=n-c.activeIndex,f=p<0?`-${Math.abs(p)*a}px`:"0",k=n===0&&c.activeIndex===0&&c.shouldAnimate;return v.useEffect(()=>{if(k){const m=setTimeout(()=>{c.setShouldAnimate(!1)},200);return()=>clearTimeout(m)}},[k]),M.jsxs("div",{onClick:h,className:oe("h-[100vh] md:h-[98vh] w-full md:rounded-l-md border bg-background p-6 shadow-lg md:transition-all duration-200",k&&"animate-in slide-in-from-right-1/2",p<0&&"brightness-75 blur-[2px]",e),style:{top:0,marginLeft:`${f}`,marginTop:`${window.innerWidth>768?Math.abs(p)*10:0}px`,width:`calc(100% + ${Math.abs(p)*a}px)`,zIndex:50-Math.abs(c.activeIndex-(n??0)),position:p?"absolute":"relative",opacity:p>0?0:1,pointerEvents:p>0?"none":"auto",cursor:c.clickable&&c.activeIndex>n?"pointer":"default"},...i,children:[c.activeIndex===n&&M.jsx(XT,{asChild:!0,variant:"ghost",className:"absolute z-[1005] top-4 right-4 p-1 size-8",onClick:l,"aria-label":"Close",children:M.jsx(a1,{})}),M.jsx("div",{className:oe("h-full w-full transition-all duration-200",c.activeIndex!==n&&"pointer-events-none select-none"),children:t})]})},L$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("font-semibold text-lg leading-none tracking-tight",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("h2",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},N$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("text-muted-foreground text-sm",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("p",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},A$e=t=>{const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col space-y-1.5 text-center sm:text-left",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c},I$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("flex items-center justify-end space-x-2 pt-4",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("div",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},$$e=t=>{const e=Z.c(27);let n,a,i,c;e[0]!==t?({children:a,className:i,asChild:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=v.useContext(Uo);if(!l)throw new Error("DialogStackNext must be used within a DialogStack");let h;e[5]!==l?(h=()=>{l.activeIndex<l.totalDialogs-1&&l.setActiveIndex(l.activeIndex+1)},e[5]=l,e[6]=h):h=e[6];const p=h;if(n&&v.isValidElement(a)){let b;if(e[7]!==a||e[8]!==i||e[9]!==p||e[10]!==c){let w;e[12]!==a.props.className||e[13]!==i?(w=oe(i,a.props.className),e[12]=a.props.className,e[13]=i,e[14]=w):w=e[14];let S;e[15]!==p||e[16]!==c||e[17]!==w?(S={onClick:p,className:w,...c},e[15]=p,e[16]=c,e[17]=w,e[18]=S):S=e[18],b=v.cloneElement(a,S),e[7]=a,e[8]=i,e[9]=p,e[10]=c,e[11]=b}else b=e[11];return b}let f;e[19]!==i?(f=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",i),e[19]=i,e[20]=f):f=e[20];const k=l.activeIndex>=l.totalDialogs-1,m=a||"Next";let x;return e[21]!==p||e[22]!==c||e[23]!==f||e[24]!==k||e[25]!==m?(x=M.jsx("button",{type:"button",onClick:p,className:f,disabled:k,...c,children:m}),e[21]=p,e[22]=c,e[23]=f,e[24]=k,e[25]=m,e[26]=x):x=e[26],x},E$e=t=>{const e=Z.c(27);let n,a,i,c;e[0]!==t?({children:a,className:i,asChild:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=v.useContext(Uo);if(!l)throw new Error("DialogStackPrevious must be used within a DialogStack");let h;e[5]!==l?(h=()=>{l.activeIndex>0&&l.setActiveIndex(l.activeIndex-1)},e[5]=l,e[6]=h):h=e[6];const p=h;if(n&&v.isValidElement(a)){let b;if(e[7]!==a||e[8]!==i||e[9]!==p||e[10]!==c){let w;e[12]!==a.props.className||e[13]!==i?(w=oe(i,a.props.className),e[12]=a.props.className,e[13]=i,e[14]=w):w=e[14];let S;e[15]!==p||e[16]!==c||e[17]!==w?(S={onClick:p,className:w,...c},e[15]=p,e[16]=c,e[17]=w,e[18]=S):S=e[18],b=v.cloneElement(a,S),e[7]=a,e[8]=i,e[9]=p,e[10]=c,e[11]=b}else b=e[11];return b}let f;e[19]!==i?(f=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",i),e[19]=i,e[20]=f):f=e[20];const k=l.activeIndex<=0,m=a||"Previous";let x;return e[21]!==p||e[22]!==c||e[23]!==f||e[24]!==k||e[25]!==m?(x=M.jsx("button",{type:"button",onClick:p,className:f,disabled:k,...c,children:m}),e[21]=p,e[22]=c,e[23]=f,e[24]=k,e[25]=m,e[26]=x):x=e[26],x};function R$e(t){return t-1}function T$e(t,e){return v.isValidElement(t)?v.cloneElement(t,{index:e}):t}function pu(t){const e=t+"CollectionProvider",[n,a]=Ot(e),[i,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:_,children:C}=S,N=me.useRef(null),A=me.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:A,collectionRef:N,children:C})};l.displayName=e;const h=t+"CollectionSlot",p=zo(h),f=me.forwardRef((S,_)=>{const{scope:C,children:N}=S,A=c(h,C),$=Ae(_,A.collectionRef);return M.jsx(p,{ref:$,children:N})});f.displayName=h;const k=t+"CollectionItemSlot",m="data-radix-collection-item",x=zo(k),b=me.forwardRef((S,_)=>{const{scope:C,children:N,...A}=S,$=me.useRef(null),E=Ae(_,$),P=c(k,C);return me.useEffect(()=>(P.itemMap.set($,{ref:$,...A}),()=>void P.itemMap.delete($))),M.jsx(x,{[m]:"",ref:E,children:N})});b.displayName=k;function w(S){const _=c(t+"CollectionConsumer",S);return me.useCallback(()=>{const N=_.collectionRef.current;if(!N)return[];const A=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,D)=>A.indexOf(P.ref.current)-A.indexOf(D.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:f,ItemSlot:b},w,a]}var j$e="Arrow",bZ=v.forwardRef((t,e)=>{const{children:n,width:a=10,height:i=5,...c}=t;return M.jsx(Ce.svg,{...c,ref:e,width:a,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});bZ.displayName=j$e;var D$e=bZ,qj="Popper",[wZ,Wo]=Ot(qj),[O$e,_Z]=wZ(qj),SZ=t=>{const{__scopePopper:e,children:n}=t,[a,i]=v.useState(null);return M.jsx(O$e,{scope:e,anchor:a,onAnchorChange:i,children:n})};SZ.displayName=qj;var CZ="PopperAnchor",LZ=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:a,...i}=t,c=_Z(CZ,n),l=v.useRef(null),h=Ae(e,l);return v.useEffect(()=>{c.onAnchorChange((a==null?void 0:a.current)||l.current)}),a?null:M.jsx(Ce.div,{...i,ref:h})});LZ.displayName=CZ;var Pj="PopperContent",[q$e,P$e]=wZ(Pj),NZ=v.forwardRef((t,e)=>{var ee,ge,ve,Me,be,xe;const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:f=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...S}=t,_=_Z(Pj,n),[C,N]=v.useState(null),A=Ae(e,Te=>N(Te)),[$,E]=v.useState(null),P=au($),D=(P==null?void 0:P.width)??0,H=(P==null?void 0:P.height)??0,ie=a+(c!=="center"?"-"+c:""),re=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},le=Array.isArray(f)?f:[f],Q=le.length>0,fe={padding:re,boundary:le.filter(H$e),altBoundary:Q},{refs:ke,floatingStyles:ye,placement:j,isPositioned:B,middlewareData:R}=nG({strategy:"fixed",placement:ie,whileElementsMounted:(...Te)=>eG(...Te,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[aG({mainAxis:i+H,alignmentAxis:l}),p&&oG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rG():void 0,...fe}),p&&iG({...fe}),cG({...fe,apply:({elements:Te,rects:Be,availableWidth:ft,availableHeight:nt})=>{const{width:Pe,height:$t}=Be.reference,at=Te.floating.style;at.setProperty("--radix-popper-available-width",`${ft}px`),at.setProperty("--radix-popper-available-height",`${nt}px`),at.setProperty("--radix-popper-anchor-width",`${Pe}px`),at.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),$&&lG({element:$,padding:h}),B$e({arrowWidth:D,arrowHeight:H}),x&&sG({strategy:"referenceHidden",...fe})]}),[U,T]=$Z(j),z=It(w);bt(()=>{B&&(z==null||z())},[B,z]);const O=(ee=R.arrow)==null?void 0:ee.x,V=(ge=R.arrow)==null?void 0:ge.y,W=((ve=R.arrow)==null?void 0:ve.centerOffset)!==0,[ae,ce]=v.useState();return bt(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),M.jsx("div",{ref:ke.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:B?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Me=R.transformOrigin)==null?void 0:Me.x,(be=R.transformOrigin)==null?void 0:be.y].join(" "),...((xe=R.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:M.jsx(q$e,{scope:n,placedSide:U,onArrowChange:E,arrowX:O,arrowY:V,shouldHideArrow:W,children:M.jsx(Ce.div,{"data-side":U,"data-align":T,...S,ref:A,style:{...S.style,animation:B?void 0:"none"}})})})});NZ.displayName=Pj;var AZ="PopperArrow",z$e={top:"bottom",right:"left",bottom:"top",left:"right"},IZ=v.forwardRef(function(e,n){const{__scopePopper:a,...i}=e,c=P$e(AZ,a),l=z$e[c.placedSide];return M.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:M.jsx(D$e,{...i,ref:n,style:{...i.style,display:"block"}})})});IZ.displayName=AZ;function H$e(t){return t!==null}var B$e=t=>({name:"transformOrigin",options:t,fn(e){var _,C,N;const{placement:n,rects:a,middlewareData:i}=e,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:t.arrowWidth,p=l?0:t.arrowHeight,[f,k]=$Z(n),m={start:"0%",center:"50%",end:"100%"}[k],x=(((C=i.arrow)==null?void 0:C.x)??0)+h/2,b=(((N=i.arrow)==null?void 0:N.y)??0)+p/2;let w="",S="";return f==="bottom"?(w=l?m:`${x}px`,S=`${-p}px`):f==="top"?(w=l?m:`${x}px`,S=`${a.floating.height+p}px`):f==="right"?(w=`${-p}px`,S=l?m:`${b}px`):f==="left"&&(w=`${a.floating.width+p}px`,S=l?m:`${b}px`),{data:{x:w,y:S}}}});function $Z(t){const[e,n="center"]=t.split("-");return[e,n]}var fu=SZ,yu=LZ,XA=NZ,KA=IZ,GR="rovingFocusGroup.onEntryFocus",V$e={bubbles:!1,cancelable:!0},mu="RovingFocusGroup",[wT,EZ,F$e]=pu(mu),[U$e,QA]=Ot(mu,[F$e]),[G$e,Z$e]=U$e(mu),RZ=v.forwardRef((t,e)=>M.jsx(wT.Provider,{scope:t.__scopeRovingFocusGroup,children:M.jsx(wT.Slot,{scope:t.__scopeRovingFocusGroup,children:M.jsx(W$e,{...t,ref:e})})}));RZ.displayName=mu;var W$e=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:k=!1,...m}=t,x=v.useRef(null),b=Ae(e,x),w=f1(c),[S,_]=on({prop:l,defaultProp:h??null,onChange:p,caller:mu}),[C,N]=v.useState(!1),A=It(f),$=EZ(n),E=v.useRef(!1),[P,D]=v.useState(0);return v.useEffect(()=>{const H=x.current;if(H)return H.addEventListener(GR,A),()=>H.removeEventListener(GR,A)},[A]),M.jsx(G$e,{scope:n,orientation:a,dir:w,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(H=>_(H),[_]),onItemShiftTab:v.useCallback(()=>N(!0),[]),onFocusableItemAdd:v.useCallback(()=>D(H=>H+1),[]),onFocusableItemRemove:v.useCallback(()=>D(H=>H-1),[]),children:M.jsx(Ce.div,{tabIndex:C||P===0?-1:0,"data-orientation":a,...m,ref:b,style:{outline:"none",...t.style},onMouseDown:ue(t.onMouseDown,()=>{E.current=!0}),onFocus:ue(t.onFocus,H=>{const ie=!E.current;if(H.target===H.currentTarget&&ie&&!C){const re=new CustomEvent(GR,V$e);if(H.currentTarget.dispatchEvent(re),!re.defaultPrevented){const le=$().filter(j=>j.focusable),Q=le.find(j=>j.active),fe=le.find(j=>j.id===S),ye=[Q,fe,...le].filter(Boolean).map(j=>j.ref.current);DZ(ye,k)}}E.current=!1}),onBlur:ue(t.onBlur,()=>N(!1))})})}),TZ="RovingFocusGroupItem",jZ=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:c,children:l,...h}=t,p=ht(),f=c||p,k=Z$e(TZ,n),m=k.currentTabStopId===f,x=EZ(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:S}=k;return v.useEffect(()=>{if(a)return b(),()=>w()},[a,b,w]),M.jsx(wT.ItemSlot,{scope:n,id:f,focusable:a,active:i,children:M.jsx(Ce.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:e,onMouseDown:ue(t.onMouseDown,_=>{a?k.onItemFocus(f):_.preventDefault()}),onFocus:ue(t.onFocus,()=>k.onItemFocus(f)),onKeyDown:ue(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const C=K$e(_,k.orientation,k.dir);if(C!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let A=x().filter($=>$.focusable).map($=>$.ref.current);if(C==="last")A.reverse();else if(C==="prev"||C==="next"){C==="prev"&&A.reverse();const $=A.indexOf(_.currentTarget);A=k.loop?Q$e(A,$+1):A.slice($+1)}setTimeout(()=>DZ(A))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});jZ.displayName=TZ;var Y$e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function X$e(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function K$e(t,e,n){const a=X$e(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Y$e[a]}function DZ(t,e=!1){const n=document.activeElement;for(const a of t)if(a===n||(a.focus({preventScroll:e}),document.activeElement!==n))return}function Q$e(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var OZ=RZ,qZ=jZ,_T=["Enter"," "],J$e=["ArrowDown","PageUp","Home"],PZ=["ArrowUp","PageDown","End"],eEe=[...J$e,...PZ],tEe={ltr:[..._T,"ArrowRight"],rtl:[..._T,"ArrowLeft"]},nEe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ku="Menu",[Zd,aEe,oEe]=pu(ku),[m1,zj]=Ot(ku,[oEe,Wo,QA]),vu=Wo(),zZ=QA(),[HZ,Yo]=m1(ku),[rEe,gu]=m1(ku),BZ=t=>{const{__scopeMenu:e,open:n=!1,children:a,dir:i,onOpenChange:c,modal:l=!0}=t,h=vu(e),[p,f]=v.useState(null),k=v.useRef(!1),m=It(c),x=f1(i);return v.useEffect(()=>{const b=()=>{k.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>k.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),M.jsx(fu,{...h,children:M.jsx(HZ,{scope:e,open:n,onOpenChange:m,content:p,onContentChange:f,children:M.jsx(rEe,{scope:e,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:a})})})};BZ.displayName=ku;var iEe="MenuAnchor",Hj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=vu(n);return M.jsx(yu,{...i,...a,ref:e})});Hj.displayName=iEe;var Bj="MenuPortal",[cEe,VZ]=m1(Bj,{forceMount:void 0}),FZ=t=>{const{__scopeMenu:e,forceMount:n,children:a,container:i}=t,c=Yo(Bj,e);return M.jsx(cEe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};FZ.displayName=Bj;var Qn="MenuContent",[sEe,Vj]=m1(Qn),UZ=v.forwardRef((t,e)=>{const n=VZ(Qn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Yo(Qn,t.__scopeMenu),l=gu(Qn,t.__scopeMenu);return M.jsx(Zd.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Zd.Slot,{scope:t.__scopeMenu,children:l.modal?M.jsx(lEe,{...i,ref:e}):M.jsx(dEe,{...i,ref:e})})})})}),lEe=v.forwardRef((t,e)=>{const n=Yo(Qn,t.__scopeMenu),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return iu(c)},[]),M.jsx(Fj,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dEe=v.forwardRef((t,e)=>{const n=Yo(Qn,t.__scopeMenu);return M.jsx(Fj,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),uEe=zo("MenuContent.ScrollLock"),Fj=v.forwardRef((t,e)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,disableOutsideScroll:w,...S}=t,_=Yo(Qn,n),C=gu(Qn,n),N=vu(n),A=zZ(n),$=aEe(n),[E,P]=v.useState(null),D=v.useRef(null),H=Ae(e,D,_.onContentChange),ie=v.useRef(0),re=v.useRef(""),le=v.useRef(0),Q=v.useRef(null),fe=v.useRef("right"),ke=v.useRef(0),ye=w?wl:v.Fragment,j=w?{as:uEe,allowPinchZoom:!0}:void 0,B=U=>{var ee,ge;const T=re.current+U,z=$().filter(ve=>!ve.disabled),O=document.activeElement,V=(ee=z.find(ve=>ve.ref.current===O))==null?void 0:ee.textValue,W=z.map(ve=>ve.textValue),ae=wEe(W,T,V),ce=(ge=z.find(ve=>ve.textValue===ae))==null?void 0:ge.ref.current;(function ve(Me){re.current=Me,window.clearTimeout(ie.current),Me!==""&&(ie.current=window.setTimeout(()=>ve(""),1e3))})(T),ce&&setTimeout(()=>ce.focus())};v.useEffect(()=>()=>window.clearTimeout(ie.current),[]),ru();const R=v.useCallback(U=>{var z,O;return fe.current===((z=Q.current)==null?void 0:z.side)&&SEe(U,(O=Q.current)==null?void 0:O.area)},[]);return M.jsx(sEe,{scope:n,searchRef:re,onItemEnter:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),onItemLeave:v.useCallback(U=>{var T;R(U)||((T=D.current)==null||T.focus(),P(null))},[R]),onTriggerLeave:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),pointerGraceTimerRef:le,onPointerGraceIntentChange:v.useCallback(U=>{Q.current=U},[]),children:M.jsx(ye,{...j,children:M.jsx(ou,{asChild:!0,trapped:i,onMountAutoFocus:ue(c,U=>{var T;U.preventDefault(),(T=D.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,children:M.jsx(OZ,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:ue(p,U=>{C.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(XA,{role:"menu","aria-orientation":"vertical","data-state":sW(_.open),"data-radix-menu-content":"",dir:C.dir,...N,...S,ref:H,style:{outline:"none",...S.style},onKeyDown:ue(S.onKeyDown,U=>{const z=U.target.closest("[data-radix-menu-content]")===U.currentTarget,O=U.ctrlKey||U.altKey||U.metaKey,V=U.key.length===1;z&&(U.key==="Tab"&&U.preventDefault(),!O&&V&&B(U.key));const W=D.current;if(U.target!==W||!eEe.includes(U.key))return;U.preventDefault();const ce=$().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);PZ.includes(U.key)&&ce.reverse(),xEe(ce)}),onBlur:ue(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(ie.current),re.current="")}),onPointerMove:ue(t.onPointerMove,Wd(U=>{const T=U.target,z=ke.current!==U.clientX;if(U.currentTarget.contains(T)&&z){const O=U.clientX>ke.current?"right":"left";fe.current=O,ke.current=U.clientX}}))})})})})})})});UZ.displayName=Qn;var hEe="MenuGroup",Uj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{role:"group",...a,ref:e})});Uj.displayName=hEe;var pEe="MenuLabel",GZ=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{...a,ref:e})});GZ.displayName=pEe;var wA="MenuItem",dB="menu.itemSelect",JA=v.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:a,...i}=t,c=v.useRef(null),l=gu(wA,t.__scopeMenu),h=Vj(wA,t.__scopeMenu),p=Ae(e,c),f=v.useRef(!1),k=()=>{const m=c.current;if(!n&&m){const x=new CustomEvent(dB,{bubbles:!0,cancelable:!0});m.addEventListener(dB,b=>a==null?void 0:a(b),{once:!0}),XV(m,x),x.defaultPrevented?f.current=!1:l.onClose()}};return M.jsx(ZZ,{...i,ref:p,disabled:n,onClick:ue(t.onClick,k),onPointerDown:m=>{var x;(x=t.onPointerDown)==null||x.call(t,m),f.current=!0},onPointerUp:ue(t.onPointerUp,m=>{var x;f.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:ue(t.onKeyDown,m=>{const x=h.searchRef.current!=="";n||x&&m.key===" "||_T.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});JA.displayName=wA;var ZZ=v.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:a=!1,textValue:i,...c}=t,l=Vj(wA,n),h=zZ(n),p=v.useRef(null),f=Ae(e,p),[k,m]=v.useState(!1),[x,b]=v.useState("");return v.useEffect(()=>{const w=p.current;w&&b((w.textContent??"").trim())},[c.children]),M.jsx(Zd.ItemSlot,{scope:n,disabled:a,textValue:i??x,children:M.jsx(qZ,{asChild:!0,...h,focusable:!a,children:M.jsx(Ce.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:f,onPointerMove:ue(t.onPointerMove,Wd(w=>{a?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(t.onPointerLeave,Wd(w=>l.onItemLeave(w))),onFocus:ue(t.onFocus,()=>m(!0)),onBlur:ue(t.onBlur,()=>m(!1))})})})}),fEe="MenuCheckboxItem",WZ=v.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:a,...i}=t;return M.jsx(JZ,{scope:t.__scopeMenu,checked:n,children:M.jsx(JA,{role:"menuitemcheckbox","aria-checked":_A(n)?"mixed":n,...i,ref:e,"data-state":Wj(n),onSelect:ue(i.onSelect,()=>a==null?void 0:a(_A(n)?!0:!n),{checkForDefaultPrevented:!1})})})});WZ.displayName=fEe;var YZ="MenuRadioGroup",[yEe,mEe]=m1(YZ,{value:void 0,onValueChange:()=>{}}),XZ=v.forwardRef((t,e)=>{const{value:n,onValueChange:a,...i}=t,c=It(a);return M.jsx(yEe,{scope:t.__scopeMenu,value:n,onValueChange:c,children:M.jsx(Uj,{...i,ref:e})})});XZ.displayName=YZ;var KZ="MenuRadioItem",QZ=v.forwardRef((t,e)=>{const{value:n,...a}=t,i=mEe(KZ,t.__scopeMenu),c=n===i.value;return M.jsx(JZ,{scope:t.__scopeMenu,checked:c,children:M.jsx(JA,{role:"menuitemradio","aria-checked":c,...a,ref:e,"data-state":Wj(c),onSelect:ue(a.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});QZ.displayName=KZ;var Gj="MenuItemIndicator",[JZ,kEe]=m1(Gj,{checked:!1}),eW=v.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:a,...i}=t,c=kEe(Gj,n);return M.jsx(Yt,{present:a||_A(c.checked)||c.checked===!0,children:M.jsx(Ce.span,{...i,ref:e,"data-state":Wj(c.checked)})})});eW.displayName=Gj;var vEe="MenuSeparator",tW=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{role:"separator","aria-orientation":"horizontal",...a,ref:e})});tW.displayName=vEe;var gEe="MenuArrow",nW=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=vu(n);return M.jsx(KA,{...i,...a,ref:e})});nW.displayName=gEe;var Zj="MenuSub",[MEe,aW]=m1(Zj),oW=t=>{const{__scopeMenu:e,children:n,open:a=!1,onOpenChange:i}=t,c=Yo(Zj,e),l=vu(e),[h,p]=v.useState(null),[f,k]=v.useState(null),m=It(i);return v.useEffect(()=>(c.open===!1&&m(!1),()=>m(!1)),[c.open,m]),M.jsx(fu,{...l,children:M.jsx(HZ,{scope:e,open:a,onOpenChange:m,content:f,onContentChange:k,children:M.jsx(MEe,{scope:e,contentId:ht(),triggerId:ht(),trigger:h,onTriggerChange:p,children:n})})})};oW.displayName=Zj;var jd="MenuSubTrigger",rW=v.forwardRef((t,e)=>{const n=Yo(jd,t.__scopeMenu),a=gu(jd,t.__scopeMenu),i=aW(jd,t.__scopeMenu),c=Vj(jd,t.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=c,f={__scopeMenu:t.__scopeMenu},k=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>k,[k]),v.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),p(null)}},[h,p]),M.jsx(Hj,{asChild:!0,...f,children:M.jsx(ZZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":sW(n.open),...t,ref:ra(e,i.onTriggerChange),onClick:m=>{var x;(x=t.onClick)==null||x.call(t,m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(t.onPointerMove,Wd(m=>{c.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!n.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),k()},100))})),onPointerLeave:ue(t.onPointerLeave,Wd(m=>{var b,w;k();const x=(b=n.content)==null?void 0:b.getBoundingClientRect();if(x){const S=(w=n.content)==null?void 0:w.dataset.side,_=S==="right",C=_?-5:5,N=x[_?"left":"right"],A=x[_?"right":"left"];c.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:N,y:x.top},{x:A,y:x.top},{x:A,y:x.bottom},{x:N,y:x.bottom}],side:S}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(m),m.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:ue(t.onKeyDown,m=>{var b;const x=c.searchRef.current!=="";t.disabled||x&&m.key===" "||tEe[a.dir].includes(m.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),m.preventDefault())})})})});rW.displayName=jd;var iW="MenuSubContent",cW=v.forwardRef((t,e)=>{const n=VZ(Qn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Yo(Qn,t.__scopeMenu),l=gu(Qn,t.__scopeMenu),h=aW(iW,t.__scopeMenu),p=v.useRef(null),f=Ae(e,p);return M.jsx(Zd.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Zd.Slot,{scope:t.__scopeMenu,children:M.jsx(Fj,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=p.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:ue(t.onFocusOutside,k=>{k.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:ue(t.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:ue(t.onKeyDown,k=>{var b;const m=k.currentTarget.contains(k.target),x=nEe[l.dir].includes(k.key);m&&x&&(c.onOpenChange(!1),(b=h.trigger)==null||b.focus(),k.preventDefault())})})})})})});cW.displayName=iW;function sW(t){return t?"open":"closed"}function _A(t){return t==="indeterminate"}function Wj(t){return _A(t)?"indeterminate":t?"checked":"unchecked"}function xEe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function bEe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}function wEe(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=bEe(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function _Ee(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function SEe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return _Ee(n,e)}function Wd(t){return e=>e.pointerType==="mouse"?t(e):void 0}var lW=BZ,dW=Hj,uW=FZ,hW=UZ,pW=Uj,fW=GZ,yW=JA,mW=WZ,kW=XZ,vW=QZ,gW=eW,MW=tW,xW=nW,bW=oW,wW=rW,_W=cW,eI="DropdownMenu",[CEe,jqe]=Ot(eI,[zj]),cn=zj(),[LEe,SW]=CEe(eI),CW=t=>{const{__scopeDropdownMenu:e,children:n,dir:a,open:i,defaultOpen:c,onOpenChange:l,modal:h=!0}=t,p=cn(e),f=v.useRef(null),[k,m]=on({prop:i,defaultProp:c??!1,onChange:l,caller:eI});return M.jsx(LEe,{scope:e,triggerId:ht(),triggerRef:f,contentId:ht(),open:k,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(x=>!x),[m]),modal:h,children:M.jsx(lW,{...p,open:k,onOpenChange:m,dir:a,modal:h,children:n})})};CW.displayName=eI;var LW="DropdownMenuTrigger",NW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...i}=t,c=SW(LW,n),l=cn(n);return M.jsx(dW,{asChild:!0,...l,children:M.jsx(Ce.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:ra(e,c.triggerRef),onPointerDown:ue(t.onPointerDown,h=>{!a&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:ue(t.onKeyDown,h=>{a||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});NW.displayName=LW;var NEe="DropdownMenuPortal",AW=t=>{const{__scopeDropdownMenu:e,...n}=t,a=cn(e);return M.jsx(uW,{...a,...n})};AW.displayName=NEe;var IW="DropdownMenuContent",$W=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=SW(IW,n),c=cn(n),l=v.useRef(!1);return M.jsx(hW,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...a,ref:e,onCloseAutoFocus:ue(t.onCloseAutoFocus,h=>{var p;l.current||(p=i.triggerRef.current)==null||p.focus(),l.current=!1,h.preventDefault()}),onInteractOutside:ue(t.onInteractOutside,h=>{const p=h.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,k=p.button===2||f;(!i.modal||k)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$W.displayName=IW;var AEe="DropdownMenuGroup",EW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(pW,{...i,...a,ref:e})});EW.displayName=AEe;var IEe="DropdownMenuLabel",RW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(fW,{...i,...a,ref:e})});RW.displayName=IEe;var $Ee="DropdownMenuItem",TW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(yW,{...i,...a,ref:e})});TW.displayName=$Ee;var EEe="DropdownMenuCheckboxItem",jW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(mW,{...i,...a,ref:e})});jW.displayName=EEe;var REe="DropdownMenuRadioGroup",DW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(kW,{...i,...a,ref:e})});DW.displayName=REe;var TEe="DropdownMenuRadioItem",OW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(vW,{...i,...a,ref:e})});OW.displayName=TEe;var jEe="DropdownMenuItemIndicator",qW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(gW,{...i,...a,ref:e})});qW.displayName=jEe;var DEe="DropdownMenuSeparator",PW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(MW,{...i,...a,ref:e})});PW.displayName=DEe;var OEe="DropdownMenuArrow",qEe=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(xW,{...i,...a,ref:e})});qEe.displayName=OEe;var PEe=t=>{const{__scopeDropdownMenu:e,children:n,open:a,onOpenChange:i,defaultOpen:c}=t,l=cn(e),[h,p]=on({prop:a,defaultProp:c??!1,onChange:i,caller:"DropdownMenuSub"});return M.jsx(bW,{...l,open:h,onOpenChange:p,children:n})},zEe="DropdownMenuSubTrigger",zW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(wW,{...i,...a,ref:e})});zW.displayName=zEe;var HEe="DropdownMenuSubContent",HW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(_W,{...i,...a,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HW.displayName=HEe;var BEe=CW,VEe=NW,BW=AW,FEe=$W,UEe=EW,GEe=RW,ZEe=TW,WEe=jW,YEe=DW,XEe=OW,VW=qW,KEe=PW,QEe=PEe,JEe=zW,eRe=HW;function tRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BEe,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function nRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BW,{"data-slot":"dropdown-menu-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function aRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(VEe,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function oRe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,sideOffset:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=i===void 0?4:i;let l;e[4]!==n?(l=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[4]=n,e[5]=l):l=e[5];let h;return e[6]!==a||e[7]!==c||e[8]!==l?(h=M.jsx(BW,{children:M.jsx(FEe,{"data-slot":"dropdown-menu-content",sideOffset:c,className:l,...a})}),e[6]=a,e[7]=c,e[8]=l,e[9]=h):h=e[9],h}function rRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(UEe,{"data-slot":"dropdown-menu-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function iRe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(ZEe,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function cRe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(VW,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(WEe,{"data-slot":"dropdown-menu-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function sRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YEe,{"data-slot":"dropdown-menu-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function lRe(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(VW,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(XEe,{"data-slot":"dropdown-menu-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function dRe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(GEe,{"data-slot":"dropdown-menu-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function uRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(KEe,{"data-slot":"dropdown-menu-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function hRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function pRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(QEe,{"data-slot":"dropdown-menu-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function fRe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto size-4"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(JEe,{"data-slot":"dropdown-menu-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function yRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(eRe,{"data-slot":"dropdown-menu-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function FW(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,type:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==c||e[8]!==i?(l=M.jsx("input",{type:i,"data-slot":"input",className:c,...a}),e[6]=a,e[7]=c,e[8]=i,e[9]=l):l=e[9],l}var mRe="Label",UW=v.forwardRef((t,e)=>M.jsx(Ce.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));UW.displayName=mRe;var kRe=UW;function vRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kRe,{"data-slot":"label",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}var Mu="Menubar",[ST,gRe,MRe]=pu(Mu),[GW,Dqe]=Ot(Mu,[MRe,QA]),sn=zj(),ZW=QA(),[xRe,Yj]=GW(Mu),WW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,value:a,onValueChange:i,defaultValue:c,loop:l=!0,dir:h,...p}=t,f=f1(h),k=ZW(n),[m,x]=on({prop:a,onChange:i,defaultProp:c??"",caller:Mu}),[b,w]=v.useState(null);return M.jsx(xRe,{scope:n,value:m,onMenuOpen:v.useCallback(S=>{x(S),w(S)},[x]),onMenuClose:v.useCallback(()=>x(""),[x]),onMenuToggle:v.useCallback(S=>{x(_=>_?"":S),w(S)},[x]),dir:f,loop:l,children:M.jsx(ST.Provider,{scope:n,children:M.jsx(ST.Slot,{scope:n,children:M.jsx(OZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:f,currentTabStopId:b,onCurrentTabStopIdChange:w,children:M.jsx(Ce.div,{role:"menubar",...p,ref:e})})})})})});WW.displayName=Mu;var Xj="MenubarMenu",[bRe,YW]=GW(Xj),XW=t=>{const{__scopeMenubar:e,value:n,...a}=t,i=ht(),c=n||i||"LEGACY_REACT_AUTO_VALUE",l=Yj(Xj,e),h=sn(e),p=v.useRef(null),f=v.useRef(!1),k=l.value===c;return v.useEffect(()=>{k||(f.current=!1)},[k]),M.jsx(bRe,{scope:e,value:c,triggerId:ht(),triggerRef:p,contentId:ht(),wasKeyboardTriggerOpenRef:f,children:M.jsx(lW,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...a})})};XW.displayName=Xj;var CT="MenubarTrigger",KW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:a=!1,...i}=t,c=ZW(n),l=sn(n),h=Yj(CT,n),p=YW(CT,n),f=v.useRef(null),k=Ae(e,f,p.triggerRef),[m,x]=v.useState(!1),b=h.value===p.value;return M.jsx(ST.ItemSlot,{scope:n,value:p.value,disabled:a,children:M.jsx(qZ,{asChild:!0,...c,focusable:!a,tabStopId:p.value,children:M.jsx(dW,{asChild:!0,...l,children:M.jsx(Ce.button,{type:"button",role:"menuitem",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?p.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":b?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:k,onPointerDown:ue(t.onPointerDown,w=>{!a&&w.button===0&&w.ctrlKey===!1&&(h.onMenuOpen(p.value),b||w.preventDefault())}),onPointerEnter:ue(t.onPointerEnter,()=>{var S;!!h.value&&!b&&(h.onMenuOpen(p.value),(S=f.current)==null||S.focus())}),onKeyDown:ue(t.onKeyDown,w=>{a||(["Enter"," "].includes(w.key)&&h.onMenuToggle(p.value),w.key==="ArrowDown"&&h.onMenuOpen(p.value),["Enter"," ","ArrowDown"].includes(w.key)&&(p.wasKeyboardTriggerOpenRef.current=!0,w.preventDefault()))}),onFocus:ue(t.onFocus,()=>x(!0)),onBlur:ue(t.onBlur,()=>x(!1))})})})})});KW.displayName=CT;var wRe="MenubarPortal",QW=t=>{const{__scopeMenubar:e,...n}=t,a=sn(e);return M.jsx(uW,{...a,...n})};QW.displayName=wRe;var LT="MenubarContent",JW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,align:a="start",...i}=t,c=sn(n),l=Yj(LT,n),h=YW(LT,n),p=gRe(n),f=v.useRef(!1);return M.jsx(hW,{id:h.contentId,"aria-labelledby":h.triggerId,"data-radix-menubar-content":"",...c,...i,ref:e,align:a,onCloseAutoFocus:ue(t.onCloseAutoFocus,k=>{var x;!!!l.value&&!f.current&&((x=h.triggerRef.current)==null||x.focus()),f.current=!1,k.preventDefault()}),onFocusOutside:ue(t.onFocusOutside,k=>{const m=k.target;p().some(b=>{var w;return(w=b.ref.current)==null?void 0:w.contains(m)})&&k.preventDefault()}),onInteractOutside:ue(t.onInteractOutside,()=>{f.current=!0}),onEntryFocus:k=>{h.wasKeyboardTriggerOpenRef.current||k.preventDefault()},onKeyDown:ue(t.onKeyDown,k=>{if(["ArrowRight","ArrowLeft"].includes(k.key)){const m=k.target,x=m.hasAttribute("data-radix-menubar-subtrigger"),b=m.closest("[data-radix-menubar-content]")!==k.currentTarget,S=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===k.key;if(!S&&x||b&&S)return;let N=p().filter(E=>!E.disabled).map(E=>E.value);S&&N.reverse();const A=N.indexOf(h.value);N=l.loop?DRe(N,A+1):N.slice(A+1);const[$]=N;$&&l.onMenuOpen($)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});JW.displayName=LT;var _Re="MenubarGroup",eY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(pW,{...i,...a,ref:e})});eY.displayName=_Re;var SRe="MenubarLabel",tY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(fW,{...i,...a,ref:e})});tY.displayName=SRe;var CRe="MenubarItem",nY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(yW,{...i,...a,ref:e})});nY.displayName=CRe;var LRe="MenubarCheckboxItem",aY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(mW,{...i,...a,ref:e})});aY.displayName=LRe;var NRe="MenubarRadioGroup",oY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(kW,{...i,...a,ref:e})});oY.displayName=NRe;var ARe="MenubarRadioItem",rY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(vW,{...i,...a,ref:e})});rY.displayName=ARe;var IRe="MenubarItemIndicator",iY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(gW,{...i,...a,ref:e})});iY.displayName=IRe;var $Re="MenubarSeparator",cY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(MW,{...i,...a,ref:e})});cY.displayName=$Re;var ERe="MenubarArrow",RRe=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(xW,{...i,...a,ref:e})});RRe.displayName=ERe;var sY="MenubarSub",lY=t=>{const{__scopeMenubar:e,children:n,open:a,onOpenChange:i,defaultOpen:c}=t,l=sn(e),[h,p]=on({prop:a,defaultProp:c??!1,onChange:i,caller:sY});return M.jsx(bW,{...l,open:h,onOpenChange:p,children:n})};lY.displayName=sY;var TRe="MenubarSubTrigger",dY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(wW,{"data-radix-menubar-subtrigger":"",...i,...a,ref:e})});dY.displayName=TRe;var jRe="MenubarSubContent",uY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(_W,{...i,"data-radix-menubar-content":"",...a,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});uY.displayName=jRe;function DRe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var ORe=WW,qRe=XW,PRe=KW,zRe=QW,HRe=JW,BRe=eY,VRe=tY,FRe=nY,URe=aY,GRe=oY,ZRe=rY,hY=iY,WRe=cY,YRe=lY,XRe=dY,KRe=uY;function QRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(ORe,{"data-slot":"menubar",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function JRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(qRe,{"data-slot":"menubar-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function eTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BRe,{"data-slot":"menubar-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function pY(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(zRe,{"data-slot":"menubar-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function tTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(GRe,{"data-slot":"menubar-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function nTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(PRe,{"data-slot":"menubar-trigger",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aTe(t){const e=Z.c(14);let n,a,i,c,l;e[0]!==t?({className:n,align:i,alignOffset:c,sideOffset:l,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=i===void 0?"start":i,p=c===void 0?-4:c,f=l===void 0?8:l;let k;e[6]!==n?(k=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",n),e[6]=n,e[7]=k):k=e[7];let m;return e[8]!==h||e[9]!==p||e[10]!==a||e[11]!==f||e[12]!==k?(m=M.jsx(pY,{children:M.jsx(HRe,{"data-slot":"menubar-content",align:h,alignOffset:p,sideOffset:f,className:k,...a})}),e[8]=h,e[9]=p,e[10]=a,e[11]=f,e[12]=k,e[13]=m):m=e[13],m}function oTe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(FRe,{"data-slot":"menubar-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function rTe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(hY,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(URe,{"data-slot":"menubar-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function iTe(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(hY,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(ZRe,{"data-slot":"menubar-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function cTe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(VRe,{"data-slot":"menubar-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function sTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(WRe,{"data-slot":"menubar-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"menubar-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YRe,{"data-slot":"menubar-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function uTe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto h-4 w-4"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(XRe,{"data-slot":"menubar-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function hTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(KRe,{"data-slot":"menubar-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function pTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("mx-auto flex w-full justify-center",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function fTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-row items-center gap-1",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"pagination-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function yTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx("li",{"data-slot":"pagination-item",...n}),e[2]=n,e[3]=a):a=e[3],a}function Kj(t){const e=Z.c(14);let n,a,i,c;e[0]!==t?({className:n,isActive:a,size:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"icon":c,h=a?"page":void 0,p=a?"outline":"ghost";let f;e[5]!==n||e[6]!==l||e[7]!==p?(f=oe(hA({variant:p,size:l}),n),e[5]=n,e[6]=l,e[7]=p,e[8]=f):f=e[8];let k;return e[9]!==a||e[10]!==i||e[11]!==h||e[12]!==f?(k=M.jsx("a",{"aria-current":h,"data-slot":"pagination-link","data-active":a,className:f,...i}),e[9]=a,e[10]=i,e[11]=h,e[12]=f,e[13]=k):k=e[13],k}function mTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("gap-1 px-2.5 sm:pl-2.5",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(sl,{}),l=M.jsx("span",{className:"hidden sm:block",children:"Previous"}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs(Kj,{"aria-label":"Go to previous page",size:"default",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}function kTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("gap-1 px-2.5 sm:pr-2.5",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx("span",{className:"hidden sm:block",children:"Next"}),l=M.jsx(Na,{}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs(Kj,{"aria-label":"Go to next page",size:"default",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}function vTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex size-9 items-center justify-center",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(to,{className:"size-4"}),l=M.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}var tI="Popover",[fY,Oqe]=Ot(tI,[Wo]),xu=Wo(),[gTe,Xo]=fY(tI),yY=t=>{const{__scopePopover:e,children:n,open:a,defaultOpen:i,onOpenChange:c,modal:l=!1}=t,h=xu(e),p=v.useRef(null),[f,k]=v.useState(!1),[m,x]=on({prop:a,defaultProp:i??!1,onChange:c,caller:tI});return M.jsx(fu,{...h,children:M.jsx(gTe,{scope:e,contentId:ht(),triggerRef:p,open:m,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(b=>!b),[x]),hasCustomAnchor:f,onCustomAnchorAdd:v.useCallback(()=>k(!0),[]),onCustomAnchorRemove:v.useCallback(()=>k(!1),[]),modal:l,children:n})})};yY.displayName=tI;var mY="PopoverAnchor",kY=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(mY,n),c=xu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return v.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(yu,{...c,...a,ref:e})});kY.displayName=mY;var vY="PopoverTrigger",gY=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(vY,n),c=xu(n),l=Ae(e,i.triggerRef),h=M.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_Y(i.open),...a,ref:l,onClick:ue(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(yu,{asChild:!0,...c,children:h})});gY.displayName=vY;var Qj="PopoverPortal",[MTe,xTe]=fY(Qj,{forceMount:void 0}),MY=t=>{const{__scopePopover:e,forceMount:n,children:a,container:i}=t,c=Xo(Qj,e);return M.jsx(MTe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};MY.displayName=Qj;var fl="PopoverContent",xY=v.forwardRef((t,e)=>{const n=xTe(fl,t.__scopePopover),{forceMount:a=n.forceMount,...i}=t,c=Xo(fl,t.__scopePopover);return M.jsx(Yt,{present:a||c.open,children:c.modal?M.jsx(wTe,{...i,ref:e}):M.jsx(_Te,{...i,ref:e})})});xY.displayName=fl;var bTe=zo("PopoverContent.RemoveScroll"),wTe=v.forwardRef((t,e)=>{const n=Xo(fl,t.__scopePopover),a=v.useRef(null),i=Ae(e,a),c=v.useRef(!1);return v.useEffect(()=>{const l=a.current;if(l)return iu(l)},[]),M.jsx(wl,{as:bTe,allowPinchZoom:!0,children:M.jsx(bY,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(t.onCloseAutoFocus,l=>{var h;l.preventDefault(),c.current||(h=n.triggerRef.current)==null||h.focus()}),onPointerDownOutside:ue(t.onPointerDownOutside,l=>{const h=l.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,f=h.button===2||p;c.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:ue(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),_Te=v.forwardRef((t,e)=>{const n=Xo(fl,t.__scopePopover),a=v.useRef(!1),i=v.useRef(!1);return M.jsx(bY,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var l,h;(l=t.onCloseAutoFocus)==null||l.call(t,c),c.defaultPrevented||(a.current||(h=n.triggerRef.current)==null||h.focus(),c.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:c=>{var p,f;(p=t.onInteractOutside)==null||p.call(t,c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=c.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),bY=v.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:k,...m}=t,x=Xo(fl,n),b=xu(n);return ru(),M.jsx(ou,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:c,children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:f,onDismiss:()=>x.onOpenChange(!1),children:M.jsx(XA,{"data-state":_Y(x.open),role:"dialog",id:x.contentId,...b,...m,ref:e,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wY="PopoverClose",STe=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(wY,n);return M.jsx(Ce.button,{type:"button",...a,ref:e,onClick:ue(t.onClick,()=>i.onOpenChange(!1))})});STe.displayName=wY;var CTe="PopoverArrow",LTe=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=xu(n);return M.jsx(KA,{...i,...a,ref:e})});LTe.displayName=CTe;function _Y(t){return t?"open":"closed"}var NTe=yY,ATe=kY,ITe=gY,$Te=MY,ETe=xY;function RTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(NTe,{"data-slot":"popover",...n}),e[2]=n,e[3]=a):a=e[3],a}function TTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(ITe,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function jTe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,align:i,sideOffset:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"center":i,h=c===void 0?4:c;let p;e[5]!==n?(p=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),e[5]=n,e[6]=p):p=e[6];let f;return e[7]!==l||e[8]!==a||e[9]!==h||e[10]!==p?(f=M.jsx($Te,{children:M.jsx(ETe,{"data-slot":"popover-content",align:l,sideOffset:h,className:p,...a})}),e[7]=l,e[8]=a,e[9]=h,e[10]=p,e[11]=f):f=e[11],f}function DTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(ATe,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=a):a=e[3],a}function SA(t,[e,n]){return Math.min(n,Math.max(e,t))}var SY=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),OTe="VisuallyHidden",CY=v.forwardRef((t,e)=>M.jsx(Ce.span,{...t,ref:e,style:{...SY,...t.style}}));CY.displayName=OTe;var qTe=CY,PTe=[" ","Enter","ArrowUp","ArrowDown"],zTe=[" ","Enter"],l1="Select",[nI,aI,HTe]=pu(l1),[Cl,qqe]=Ot(l1,[HTe,Wo]),oI=Wo(),[BTe,Ko]=Cl(l1),[VTe,FTe]=Cl(l1),LY=t=>{const{__scopeSelect:e,children:n,open:a,defaultOpen:i,onOpenChange:c,value:l,defaultValue:h,onValueChange:p,dir:f,name:k,autoComplete:m,disabled:x,required:b,form:w}=t,S=oI(e),[_,C]=v.useState(null),[N,A]=v.useState(null),[$,E]=v.useState(!1),P=f1(f),[D,H]=on({prop:a,defaultProp:i??!1,onChange:c,caller:l1}),[ie,re]=on({prop:l,defaultProp:h,onChange:p,caller:l1}),le=v.useRef(null),Q=_?w||!!_.closest("form"):!0,[fe,ke]=v.useState(new Set),ye=Array.from(fe).map(j=>j.props.value).join(";");return M.jsx(fu,{...S,children:M.jsxs(BTe,{required:b,scope:e,trigger:_,onTriggerChange:C,valueNode:N,onValueNodeChange:A,valueNodeHasChildren:$,onValueNodeHasChildrenChange:E,contentId:ht(),value:ie,onValueChange:re,open:D,onOpenChange:H,dir:P,triggerPointerDownPosRef:le,disabled:x,children:[M.jsx(nI.Provider,{scope:e,children:M.jsx(VTe,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(j=>{ke(B=>new Set(B).add(j))},[]),onNativeOptionRemove:v.useCallback(j=>{ke(B=>{const R=new Set(B);return R.delete(j),R})},[]),children:n})}),Q?M.jsxs(QY,{"aria-hidden":!0,required:b,tabIndex:-1,name:k,autoComplete:m,value:ie,onChange:j=>re(j.target.value),disabled:x,form:w,children:[ie===void 0?M.jsx("option",{value:""}):null,Array.from(fe)]},ye):null]})})};LY.displayName=l1;var NY="SelectTrigger",AY=v.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:a=!1,...i}=t,c=oI(n),l=Ko(NY,n),h=l.disabled||a,p=Ae(e,l.onTriggerChange),f=aI(n),k=v.useRef("touch"),[m,x,b]=eX(S=>{const _=f().filter(A=>!A.disabled),C=_.find(A=>A.value===l.value),N=tX(_,S,C);N!==void 0&&l.onValueChange(N.value)}),w=S=>{h||(l.onOpenChange(!0),b()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return M.jsx(yu,{asChild:!0,...c,children:M.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":JY(l.value)?"":void 0,...i,ref:p,onClick:ue(i.onClick,S=>{S.currentTarget.focus(),k.current!=="mouse"&&w(S)}),onPointerDown:ue(i.onPointerDown,S=>{k.current=S.pointerType;const _=S.target;_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:ue(i.onKeyDown,S=>{const _=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(_&&S.key===" ")&&PTe.includes(S.key)&&(w(),S.preventDefault())})})})});AY.displayName=NY;var IY="SelectValue",$Y=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:a,style:i,children:c,placeholder:l="",...h}=t,p=Ko(IY,n),{onValueNodeHasChildrenChange:f}=p,k=c!==void 0,m=Ae(e,p.onValueNodeChange);return bt(()=>{f(k)},[f,k]),M.jsx(Ce.span,{...h,ref:m,style:{pointerEvents:"none"},children:JY(p.value)?M.jsx(M.Fragment,{children:l}):c})});$Y.displayName=IY;var UTe="SelectIcon",EY=v.forwardRef((t,e)=>{const{__scopeSelect:n,children:a,...i}=t;return M.jsx(Ce.span,{"aria-hidden":!0,...i,ref:e,children:a||"▼"})});EY.displayName=UTe;var GTe="SelectPortal",RY=t=>M.jsx(h1,{asChild:!0,...t});RY.displayName=GTe;var d1="SelectContent",TY=v.forwardRef((t,e)=>{const n=Ko(d1,t.__scopeSelect),[a,i]=v.useState();if(bt(()=>{i(new DocumentFragment)},[]),!n.open){const c=a;return c?gl.createPortal(M.jsx(jY,{scope:t.__scopeSelect,children:M.jsx(nI.Slot,{scope:t.__scopeSelect,children:M.jsx("div",{children:t.children})})}),c):null}return M.jsx(DY,{...t,ref:e})});TY.displayName=d1;var aa=10,[jY,Qo]=Cl(d1),ZTe="SelectContentImpl",WTe=zo("SelectContent.RemoveScroll"),DY=v.forwardRef((t,e)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:l,side:h,sideOffset:p,align:f,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:_,...C}=t,N=Ko(d1,n),[A,$]=v.useState(null),[E,P]=v.useState(null),D=Ae(e,ee=>$(ee)),[H,ie]=v.useState(null),[re,le]=v.useState(null),Q=aI(n),[fe,ke]=v.useState(!1),ye=v.useRef(!1);v.useEffect(()=>{if(A)return iu(A)},[A]),ru();const j=v.useCallback(ee=>{const[ge,...ve]=Q().map(xe=>xe.ref.current),[Me]=ve.slice(-1),be=document.activeElement;for(const xe of ee)if(xe===be||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ge&&E&&(E.scrollTop=0),xe===Me&&E&&(E.scrollTop=E.scrollHeight),xe==null||xe.focus(),document.activeElement!==be))return},[Q,E]),B=v.useCallback(()=>j([H,A]),[j,H,A]);v.useEffect(()=>{fe&&B()},[fe,B]);const{onOpenChange:R,triggerPointerDownPosRef:U}=N;v.useEffect(()=>{if(A){let ee={x:0,y:0};const ge=Me=>{var be,xe;ee={x:Math.abs(Math.round(Me.pageX)-(((be=U.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((xe=U.current)==null?void 0:xe.y)??0))}},ve=Me=>{ee.x<=10&&ee.y<=10?Me.preventDefault():A.contains(Me.target)||R(!1),document.removeEventListener("pointermove",ge),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",ve,{capture:!0})}}},[A,R,U]),v.useEffect(()=>{const ee=()=>R(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[R]);const[T,z]=eX(ee=>{const ge=Q().filter(be=>!be.disabled),ve=ge.find(be=>be.ref.current===document.activeElement),Me=tX(ge,ee,ve);Me&&setTimeout(()=>Me.ref.current.focus())}),O=v.useCallback((ee,ge,ve)=>{const Me=!ye.current&&!ve;(N.value!==void 0&&N.value===ge||Me)&&(ie(ee),Me&&(ye.current=!0))},[N.value]),V=v.useCallback(()=>A==null?void 0:A.focus(),[A]),W=v.useCallback((ee,ge,ve)=>{const Me=!ye.current&&!ve;(N.value!==void 0&&N.value===ge||Me)&&le(ee)},[N.value]),ae=a==="popper"?NT:OY,ce=ae===NT?{side:h,sideOffset:p,align:f,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:_}:{};return M.jsx(jY,{scope:n,content:A,viewport:E,onViewportChange:P,itemRefCallback:O,selectedItem:H,onItemLeave:V,itemTextRefCallback:W,focusSelectedItem:B,selectedItemText:re,position:a,isPositioned:fe,searchRef:T,children:M.jsx(wl,{as:WTe,allowPinchZoom:!0,children:M.jsx(ou,{asChild:!0,trapped:N.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:ue(i,ee=>{var ge;(ge=N.trigger)==null||ge.focus({preventScroll:!0}),ee.preventDefault()}),children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:M.jsx(ae,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ee=>ee.preventDefault(),...C,...ce,onPlaced:()=>ke(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ue(C.onKeyDown,ee=>{const ge=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ge&&ee.key.length===1&&z(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Me=Q().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const be=ee.target,xe=Me.indexOf(be);Me=Me.slice(xe+1)}setTimeout(()=>j(Me)),ee.preventDefault()}})})})})})})});DY.displayName=ZTe;var YTe="SelectItemAlignedPosition",OY=v.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:a,...i}=t,c=Ko(d1,n),l=Qo(d1,n),[h,p]=v.useState(null),[f,k]=v.useState(null),m=Ae(e,D=>k(D)),x=aI(n),b=v.useRef(!1),w=v.useRef(!0),{viewport:S,selectedItem:_,selectedItemText:C,focusSelectedItem:N}=l,A=v.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&f&&S&&_&&C){const D=c.trigger.getBoundingClientRect(),H=f.getBoundingClientRect(),ie=c.valueNode.getBoundingClientRect(),re=C.getBoundingClientRect();if(c.dir!=="rtl"){const be=re.left-H.left,xe=ie.left-be,Te=D.left-xe,Be=D.width+Te,ft=Math.max(Be,H.width),nt=window.innerWidth-aa,Pe=SA(xe,[aa,Math.max(aa,nt-ft)]);h.style.minWidth=Be+"px",h.style.left=Pe+"px"}else{const be=H.right-re.right,xe=window.innerWidth-ie.right-be,Te=window.innerWidth-D.right-xe,Be=D.width+Te,ft=Math.max(Be,H.width),nt=window.innerWidth-aa,Pe=SA(xe,[aa,Math.max(aa,nt-ft)]);h.style.minWidth=Be+"px",h.style.right=Pe+"px"}const le=x(),Q=window.innerHeight-aa*2,fe=S.scrollHeight,ke=window.getComputedStyle(f),ye=parseInt(ke.borderTopWidth,10),j=parseInt(ke.paddingTop,10),B=parseInt(ke.borderBottomWidth,10),R=parseInt(ke.paddingBottom,10),U=ye+j+fe+R+B,T=Math.min(_.offsetHeight*5,U),z=window.getComputedStyle(S),O=parseInt(z.paddingTop,10),V=parseInt(z.paddingBottom,10),W=D.top+D.height/2-aa,ae=Q-W,ce=_.offsetHeight/2,ee=_.offsetTop+ce,ge=ye+j+ee,ve=U-ge;if(ge<=W){const be=le.length>0&&_===le[le.length-1].ref.current;h.style.bottom="0px";const xe=f.clientHeight-S.offsetTop-S.offsetHeight,Te=Math.max(ae,ce+(be?V:0)+xe+B),Be=ge+Te;h.style.height=Be+"px"}else{const be=le.length>0&&_===le[0].ref.current;h.style.top="0px";const Te=Math.max(W,ye+S.offsetTop+(be?O:0)+ce)+ve;h.style.height=Te+"px",S.scrollTop=ge-W+S.offsetTop}h.style.margin=`${aa}px 0`,h.style.minHeight=T+"px",h.style.maxHeight=Q+"px",a==null||a(),requestAnimationFrame(()=>b.current=!0)}},[x,c.trigger,c.valueNode,h,f,S,_,C,c.dir,a]);bt(()=>A(),[A]);const[$,E]=v.useState();bt(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const P=v.useCallback(D=>{D&&w.current===!0&&(A(),N==null||N(),w.current=!1)},[A,N]);return M.jsx(KTe,{scope:n,contentWrapper:h,shouldExpandOnScrollRef:b,onScrollButtonChange:P,children:M.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:$},children:M.jsx(Ce.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});OY.displayName=YTe;var XTe="SelectPopperPosition",NT=v.forwardRef((t,e)=>{const{__scopeSelect:n,align:a="start",collisionPadding:i=aa,...c}=t,l=oI(n);return M.jsx(XA,{...l,...c,ref:e,align:a,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});NT.displayName=XTe;var[KTe,Jj]=Cl(d1,{}),AT="SelectViewport",qY=v.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:a,...i}=t,c=Qo(AT,n),l=Jj(AT,n),h=Ae(e,c.onViewportChange),p=v.useRef(0);return M.jsxs(M.Fragment,{children:[M.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),M.jsx(nI.Slot,{scope:n,children:M.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ue(i.onScroll,f=>{const k=f.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&m){const b=Math.abs(p.current-k.scrollTop);if(b>0){const w=window.innerHeight-aa*2,S=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),C=Math.max(S,_);if(C<w){const N=C+b,A=Math.min(w,N),$=N-A;m.style.height=A+"px",m.style.bottom==="0px"&&(k.scrollTop=$>0?$:0,m.style.justifyContent="flex-end")}}}p.current=k.scrollTop})})})]})});qY.displayName=AT;var PY="SelectGroup",[QTe,JTe]=Cl(PY),zY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=ht();return M.jsx(QTe,{scope:n,id:i,children:M.jsx(Ce.div,{role:"group","aria-labelledby":i,...a,ref:e})})});zY.displayName=PY;var HY="SelectLabel",BY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=JTe(HY,n);return M.jsx(Ce.div,{id:i.id,...a,ref:e})});BY.displayName=HY;var CA="SelectItem",[eje,VY]=Cl(CA),FY=v.forwardRef((t,e)=>{const{__scopeSelect:n,value:a,disabled:i=!1,textValue:c,...l}=t,h=Ko(CA,n),p=Qo(CA,n),f=h.value===a,[k,m]=v.useState(c??""),[x,b]=v.useState(!1),w=Ae(e,N=>{var A;return(A=p.itemRefCallback)==null?void 0:A.call(p,N,a,i)}),S=ht(),_=v.useRef("touch"),C=()=>{i||(h.onValueChange(a),h.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return M.jsx(eje,{scope:n,value:a,disabled:i,textId:S,isSelected:f,onItemTextChange:v.useCallback(N=>{m(A=>A||((N==null?void 0:N.textContent)??"").trim())},[]),children:M.jsx(nI.ItemSlot,{scope:n,value:a,disabled:i,textValue:k,children:M.jsx(Ce.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:ue(l.onFocus,()=>b(!0)),onBlur:ue(l.onBlur,()=>b(!1)),onClick:ue(l.onClick,()=>{_.current!=="mouse"&&C()}),onPointerUp:ue(l.onPointerUp,()=>{_.current==="mouse"&&C()}),onPointerDown:ue(l.onPointerDown,N=>{_.current=N.pointerType}),onPointerMove:ue(l.onPointerMove,N=>{var A;_.current=N.pointerType,i?(A=p.onItemLeave)==null||A.call(p):_.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(l.onPointerLeave,N=>{var A;N.currentTarget===document.activeElement&&((A=p.onItemLeave)==null||A.call(p))}),onKeyDown:ue(l.onKeyDown,N=>{var $;(($=p.searchRef)==null?void 0:$.current)!==""&&N.key===" "||(zTe.includes(N.key)&&C(),N.key===" "&&N.preventDefault())})})})})});FY.displayName=CA;var Dd="SelectItemText",UY=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:a,style:i,...c}=t,l=Ko(Dd,n),h=Qo(Dd,n),p=VY(Dd,n),f=FTe(Dd,n),[k,m]=v.useState(null),x=Ae(e,C=>m(C),p.onItemTextChange,C=>{var N;return(N=h.itemTextRefCallback)==null?void 0:N.call(h,C,p.value,p.disabled)}),b=k==null?void 0:k.textContent,w=v.useMemo(()=>M.jsx("option",{value:p.value,disabled:p.disabled,children:b},p.value),[p.disabled,p.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:_}=f;return bt(()=>(S(w),()=>_(w)),[S,_,w]),M.jsxs(M.Fragment,{children:[M.jsx(Ce.span,{id:p.textId,...c,ref:x}),p.isSelected&&l.valueNode&&!l.valueNodeHasChildren?gl.createPortal(c.children,l.valueNode):null]})});UY.displayName=Dd;var GY="SelectItemIndicator",ZY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t;return VY(GY,n).isSelected?M.jsx(Ce.span,{"aria-hidden":!0,...a,ref:e}):null});ZY.displayName=GY;var IT="SelectScrollUpButton",WY=v.forwardRef((t,e)=>{const n=Qo(IT,t.__scopeSelect),a=Jj(IT,t.__scopeSelect),[i,c]=v.useState(!1),l=Ae(e,a.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let h=function(){const f=p.scrollTop>0;c(f)};const p=n.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?M.jsx(XY,{...t,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=n;h&&p&&(h.scrollTop=h.scrollTop-p.offsetHeight)}}):null});WY.displayName=IT;var $T="SelectScrollDownButton",YY=v.forwardRef((t,e)=>{const n=Qo($T,t.__scopeSelect),a=Jj($T,t.__scopeSelect),[i,c]=v.useState(!1),l=Ae(e,a.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let h=function(){const f=p.scrollHeight-p.clientHeight,k=Math.ceil(p.scrollTop)<f;c(k)};const p=n.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?M.jsx(XY,{...t,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=n;h&&p&&(h.scrollTop=h.scrollTop+p.offsetHeight)}}):null});YY.displayName=$T;var XY=v.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:a,...i}=t,c=Qo("SelectScrollButton",n),l=v.useRef(null),h=aI(n),p=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>p(),[p]),bt(()=>{var k;const f=h().find(m=>m.ref.current===document.activeElement);(k=f==null?void 0:f.ref.current)==null||k.scrollIntoView({block:"nearest"})},[h]),M.jsx(Ce.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:ue(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(a,50))}),onPointerMove:ue(i.onPointerMove,()=>{var f;(f=c.onItemLeave)==null||f.call(c),l.current===null&&(l.current=window.setInterval(a,50))}),onPointerLeave:ue(i.onPointerLeave,()=>{p()})})}),tje="SelectSeparator",KY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t;return M.jsx(Ce.div,{"aria-hidden":!0,...a,ref:e})});KY.displayName=tje;var ET="SelectArrow",nje=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=oI(n),c=Ko(ET,n),l=Qo(ET,n);return c.open&&l.position==="popper"?M.jsx(KA,{...i,...a,ref:e}):null});nje.displayName=ET;var aje="SelectBubbleInput",QY=v.forwardRef(({__scopeSelect:t,value:e,...n},a)=>{const i=v.useRef(null),c=Ae(a,i),l=PA(e);return v.useEffect(()=>{const h=i.current;if(!h)return;const p=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(p,"value").set;if(l!==e&&k){const m=new Event("change",{bubbles:!0});k.call(h,e),h.dispatchEvent(m)}},[l,e]),M.jsx(Ce.select,{...n,style:{...SY,...n.style},ref:c,defaultValue:e})});QY.displayName=aje;function JY(t){return t===""||t===void 0}function eX(t){const e=It(t),n=v.useRef(""),a=v.useRef(0),i=v.useCallback(l=>{const h=n.current+l;e(h),function p(f){n.current=f,window.clearTimeout(a.current),f!==""&&(a.current=window.setTimeout(()=>p(""),1e3))}(h)},[e]),c=v.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,i,c]}function tX(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=oje(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function oje(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var rje=LY,ije=AY,cje=$Y,sje=EY,lje=RY,dje=TY,uje=qY,hje=zY,pje=BY,fje=FY,yje=UY,mje=ZY,kje=WY,vje=YY,gje=KY;function Mje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(rje,{"data-slot":"select",...n}),e[2]=n,e[3]=a):a=e[3],a}function xje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(hje,{"data-slot":"select-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function bje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(cje,{"data-slot":"select-value",...n}),e[2]=n,e[3]=a):a=e[3],a}function wje(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,size:c,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==a?(h=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(sje,{asChild:!0,children:M.jsx(cl,{className:"size-4 opacity-50"})}),e[7]=p):p=e[7];let f;return e[8]!==n||e[9]!==i||e[10]!==l||e[11]!==h?(f=M.jsxs(ije,{"data-slot":"select-trigger","data-size":l,className:h,...i,children:[n,p]}),e[8]=n,e[9]=i,e[10]=l,e[11]=h,e[12]=f):f=e[12],f}function _je(t){const e=Z.c(20);let n,a,i,c;e[0]!==t?({className:a,children:n,position:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"popper":c,h=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let p;e[5]!==a||e[6]!==h?(p=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",h,a),e[5]=a,e[6]=h,e[7]=p):p=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=M.jsx(nX,{}),e[8]=f):f=e[8];const k=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let m;e[9]!==k?(m=oe("p-1",k),e[9]=k,e[10]=m):m=e[10];let x;e[11]!==n||e[12]!==m?(x=M.jsx(uje,{className:m,children:n}),e[11]=n,e[12]=m,e[13]=x):x=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=M.jsx(aX,{}),e[14]=b):b=e[14];let w;return e[15]!==l||e[16]!==i||e[17]!==p||e[18]!==x?(w=M.jsx(lje,{children:M.jsxs(dje,{"data-slot":"select-content",className:p,position:l,...i,children:[f,x,b]})}),e[15]=l,e[16]=i,e[17]=p,e[18]=x,e[19]=w):w=e[19],w}function Sje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground px-2 py-1.5 text-xs",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(pje,{"data-slot":"select-label",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Cje(t){const e=Z.c(13);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:M.jsx(mje,{children:M.jsx(no,{className:"size-4"})})}),e[6]=l):l=e[6];let h;e[7]!==n?(h=M.jsx(yje,{children:n}),e[7]=n,e[8]=h):h=e[8];let p;return e[9]!==i||e[10]!==c||e[11]!==h?(p=M.jsxs(fje,{"data-slot":"select-item",className:c,...i,children:[l,h]}),e[9]=i,e[10]=c,e[11]=h,e[12]=p):p=e[12],p}function Lje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border pointer-events-none -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(gje,{"data-slot":"select-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function nX(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex cursor-default items-center justify-center py-1",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(Pd,{className:"size-4"}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(kje,{"data-slot":"select-scroll-up-button",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}function aX(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex cursor-default items-center justify-center py-1",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(cl,{className:"size-4"}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(vje,{"data-slot":"select-scroll-down-button",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}var Nje="Separator",uB="horizontal",Aje=["horizontal","vertical"],oX=v.forwardRef((t,e)=>{const{decorative:n,orientation:a=uB,...i}=t,c=Ije(a)?a:uB,h=n?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return M.jsx(Ce.div,{"data-orientation":c,...h,...i,ref:e})});oX.displayName=Nje;function Ije(t){return Aje.includes(t)}var $je=oX;function rX(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,orientation:i,decorative:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"horizontal":i,h=c===void 0?!0:c;let p;e[5]!==n?(p=oe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=p):p=e[6];let f;return e[7]!==h||e[8]!==l||e[9]!==a||e[10]!==p?(f=M.jsx($je,{"data-slot":"separator-root",decorative:h,orientation:l,className:p,...a}),e[7]=h,e[8]=l,e[9]=a,e[10]=p,e[11]=f):f=e[11],f}function iX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(yj,{"data-slot":"sheet",...n}),e[2]=n,e[3]=a):a=e[3],a}function Eje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(MU,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function Rje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(FA,{"data-slot":"sheet-close",...n}),e[2]=n,e[3]=a):a=e[3],a}function Tje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(mj,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function jje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1002] bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kj,{"data-slot":"sheet-overlay",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function cX(t){const e=Z.c(17);let n,a,i,c;e[0]!==t?({className:a,children:n,side:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"right":c;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(jje,{}),e[5]=h):h=e[5];const p=l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",f=l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",k=l==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",m=l==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[6]!==a||e[7]!==p||e[8]!==f||e[9]!==k||e[10]!==m?(x=oe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",p,f,k,m,a),e[6]=a,e[7]=p,e[8]=f,e[9]=k,e[10]=m,e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=M.jsxs(FA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[M.jsx(a1,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=b):b=e[12];let w;return e[13]!==n||e[14]!==i||e[15]!==x?(w=M.jsxs(Tje,{children:[h,M.jsxs(vj,{"data-slot":"sheet-content",className:x,...i,children:[n,b]})]}),e[13]=n,e[14]=i,e[15]=x,e[16]=w):w=e[16],w}function sX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sheet-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Dje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("mt-auto flex flex-col gap-2 p-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sheet-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(xU,{"data-slot":"sheet-title",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(bU,{"data-slot":"sheet-description",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const ZR=768;function Oje(){const t=Z.c(2),[e,n]=v.useState(void 0);let a,i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const c=window.matchMedia(`(max-width: ${ZR-1}px)`),l=()=>{n(window.innerWidth<ZR)};return c.addEventListener("change",l),n(window.innerWidth<ZR),()=>c.removeEventListener("change",l)},i=[],t[0]=a,t[1]=i):(a=t[0],i=t[1]),v.useEffect(a,i),!!e}function RT(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"skeleton",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}var[rI,Pqe]=Ot("Tooltip",[Wo]),iI=Wo(),uX="TooltipProvider",qje=700,TT="tooltip.open",[Pje,eD]=rI(uX),hX=t=>{const{__scopeTooltip:e,delayDuration:n=qje,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:c}=t,l=v.useRef(!0),h=v.useRef(!1),p=v.useRef(0);return v.useEffect(()=>{const f=p.current;return()=>window.clearTimeout(f)},[]),M.jsx(Pje,{scope:e,isOpenDelayedRef:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(p.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:v.useCallback(f=>{h.current=f},[]),disableHoverableContent:i,children:c})};hX.displayName=uX;var Yd="Tooltip",[zje,bu]=rI(Yd),pX=t=>{const{__scopeTooltip:e,children:n,open:a,defaultOpen:i,onOpenChange:c,disableHoverableContent:l,delayDuration:h}=t,p=eD(Yd,t.__scopeTooltip),f=iI(e),[k,m]=v.useState(null),x=ht(),b=v.useRef(0),w=l??p.disableHoverableContent,S=h??p.delayDuration,_=v.useRef(!1),[C,N]=on({prop:a,defaultProp:i??!1,onChange:D=>{D?(p.onOpen(),document.dispatchEvent(new CustomEvent(TT))):p.onClose(),c==null||c(D)},caller:Yd}),A=v.useMemo(()=>C?_.current?"delayed-open":"instant-open":"closed",[C]),$=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_.current=!1,N(!0)},[N]),E=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,N(!1)},[N]),P=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{_.current=!0,N(!0),b.current=0},S)},[S,N]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),M.jsx(fu,{...f,children:M.jsx(zje,{scope:e,contentId:x,open:C,stateAttribute:A,trigger:k,onTriggerChange:m,onTriggerEnter:v.useCallback(()=>{p.isOpenDelayedRef.current?P():$()},[p.isOpenDelayedRef,P,$]),onTriggerLeave:v.useCallback(()=>{w?E():(window.clearTimeout(b.current),b.current=0)},[E,w]),onOpen:$,onClose:E,disableHoverableContent:w,children:n})})};pX.displayName=Yd;var jT="TooltipTrigger",fX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...a}=t,i=bu(jT,n),c=eD(jT,n),l=iI(n),h=v.useRef(null),p=Ae(e,h,i.onTriggerChange),f=v.useRef(!1),k=v.useRef(!1),m=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),M.jsx(yu,{asChild:!0,...l,children:M.jsx(Ce.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:p,onPointerMove:ue(t.onPointerMove,x=>{x.pointerType!=="touch"&&!k.current&&!c.isPointerInTransitRef.current&&(i.onTriggerEnter(),k.current=!0)}),onPointerLeave:ue(t.onPointerLeave,()=>{i.onTriggerLeave(),k.current=!1}),onPointerDown:ue(t.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:ue(t.onFocus,()=>{f.current||i.onOpen()}),onBlur:ue(t.onBlur,i.onClose),onClick:ue(t.onClick,i.onClose)})})});fX.displayName=jT;var tD="TooltipPortal",[Hje,Bje]=rI(tD,{forceMount:void 0}),yX=t=>{const{__scopeTooltip:e,forceMount:n,children:a,container:i}=t,c=bu(tD,e);return M.jsx(Hje,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};yX.displayName=tD;var yl="TooltipContent",mX=v.forwardRef((t,e)=>{const n=Bje(yl,t.__scopeTooltip),{forceMount:a=n.forceMount,side:i="top",...c}=t,l=bu(yl,t.__scopeTooltip);return M.jsx(Yt,{present:a||l.open,children:l.disableHoverableContent?M.jsx(kX,{side:i,...c,ref:e}):M.jsx(Vje,{side:i,...c,ref:e})})}),Vje=v.forwardRef((t,e)=>{const n=bu(yl,t.__scopeTooltip),a=eD(yl,t.__scopeTooltip),i=v.useRef(null),c=Ae(e,i),[l,h]=v.useState(null),{trigger:p,onClose:f}=n,k=i.current,{onPointerInTransitChange:m}=a,x=v.useCallback(()=>{h(null),m(!1)},[m]),b=v.useCallback((w,S)=>{const _=w.currentTarget,C={x:w.clientX,y:w.clientY},N=Zje(C,_.getBoundingClientRect()),A=Wje(C,N),$=Yje(S.getBoundingClientRect()),E=Kje([...A,...$]);h(E),m(!0)},[m]);return v.useEffect(()=>()=>x(),[x]),v.useEffect(()=>{if(p&&k){const w=_=>b(_,k),S=_=>b(_,p);return p.addEventListener("pointerleave",w),k.addEventListener("pointerleave",S),()=>{p.removeEventListener("pointerleave",w),k.removeEventListener("pointerleave",S)}}},[p,k,b,x]),v.useEffect(()=>{if(l){const w=S=>{const _=S.target,C={x:S.clientX,y:S.clientY},N=(p==null?void 0:p.contains(_))||(k==null?void 0:k.contains(_)),A=!Xje(C,l);N?x():A&&(x(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[p,k,l,f,x]),M.jsx(kX,{...t,ref:c})}),[Fje,Uje]=rI(Yd,{isInside:!1}),Gje=Wne("TooltipContent"),kX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,children:a,"aria-label":i,onEscapeKeyDown:c,onPointerDownOutside:l,...h}=t,p=bu(yl,n),f=iI(n),{onClose:k}=p;return v.useEffect(()=>(document.addEventListener(TT,k),()=>document.removeEventListener(TT,k)),[k]),v.useEffect(()=>{if(p.trigger){const m=x=>{const b=x.target;b!=null&&b.contains(p.trigger)&&k()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[p.trigger,k]),M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:k,children:M.jsxs(XA,{"data-state":p.stateAttribute,...f,...h,ref:e,style:{...h.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:[M.jsx(Gje,{children:a}),M.jsx(Fje,{scope:n,isInside:!0,children:M.jsx(qTe,{id:p.contentId,role:"tooltip",children:i||a})})]})})});mX.displayName=yl;var vX="TooltipArrow",gX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...a}=t,i=iI(n);return Uje(vX,n).isInside?null:M.jsx(KA,{...i,...a,ref:e})});gX.displayName=vX;function Zje(t,e){const n=Math.abs(e.top-t.y),a=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),c=Math.abs(e.left-t.x);switch(Math.min(n,a,i,c)){case c:return"left";case i:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function Wje(t,e,n=5){const a=[];switch(e){case"top":a.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":a.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":a.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":a.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return a}function Yje(t){const{top:e,right:n,bottom:a,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:a},{x:i,y:a}]}function Xje(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function Kje(t){const e=t.slice();return e.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),Qje(e)}function Qje(t){if(t.length<=1)return t.slice();const e=[];for(let a=0;a<t.length;a++){const i=t[a];for(;e.length>=2;){const c=e[e.length-1],l=e[e.length-2];if((c.x-l.x)*(i.y-l.y)>=(c.y-l.y)*(i.x-l.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let a=t.length-1;a>=0;a--){const i=t[a];for(;n.length>=2;){const c=n[n.length-1],l=n[n.length-2];if((c.x-l.x)*(i.y-l.y)>=(c.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Jje=hX,eDe=pX,tDe=fX,nDe=yX,aDe=mX,oDe=gX;function nD(t){const e=Z.c(6);let n,a;e[0]!==t?({delayDuration:a,...n}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const i=a===void 0?0:a;let c;return e[3]!==i||e[4]!==n?(c=M.jsx(Jje,{"data-slot":"tooltip-provider",delayDuration:i,...n}),e[3]=i,e[4]=n,e[5]=c):c=e[5],c}function MX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(nD,{children:M.jsx(eDe,{"data-slot":"tooltip",...n})}),e[2]=n,e[3]=a):a=e[3],a}function xX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(tDe,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function bX(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,sideOffset:c,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?0:c;let h;e[5]!==a?(h=oe("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",a),e[5]=a,e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(oDe,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=p):p=e[7];let f;return e[8]!==n||e[9]!==i||e[10]!==l||e[11]!==h?(f=M.jsx(nDe,{children:M.jsxs(aDe,{"data-slot":"tooltip-content",sideOffset:l,className:h,...i,children:[n,p]})}),e[8]=n,e[9]=i,e[10]=l,e[11]=h,e[12]=f):f=e[12],f}const rDe="sidebar_state",iDe=60*60*24*7,cDe="16rem",sDe="18rem",lDe="3rem",dDe="b",wX=v.createContext(null);function wu(){const t=v.useContext(wX);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function uDe({defaultOpen:t=!0,open:e,onOpenChange:n,className:a,style:i,children:c,...l}){const h=Oje(),[p,f]=v.useState(!1),[k,m]=v.useState(t),x=e??k,b=v.useCallback(C=>{const N=typeof C=="function"?C(x):C;n?n(N):m(N),document.cookie=`${rDe}=${N}; path=/; max-age=${iDe}`},[n,x]),w=v.useCallback(()=>h?f(C=>!C):b(C=>!C),[h,b,f]);v.useEffect(()=>{const C=N=>{N.key===dDe&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),w())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[w]);const S=x?"expanded":"collapsed",_=v.useMemo(()=>({state:S,open:x,setOpen:b,isMobile:h,openMobile:p,setOpenMobile:f,toggleSidebar:w}),[S,x,b,h,p,f,w]);return M.jsx(wX.Provider,{value:_,children:M.jsx(nD,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":cDe,"--sidebar-width-icon":lDe,...i},className:oe("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...l,children:c})})})}function hDe(t){const e=Z.c(46);let n,a,i,c,l,h;e[0]!==t?({side:c,variant:l,collapsible:h,className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6]);const p=c===void 0?"left":c,f=l===void 0?"sidebar":l,k=h===void 0?"offcanvas":h,{isMobile:m,state:x,openMobile:b,setOpenMobile:w}=wu();if(k==="none"){let ie;e[7]!==a?(ie=oe("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=ie):ie=e[8];let re;return e[9]!==n||e[10]!==i||e[11]!==ie?(re=M.jsx("div",{"data-slot":"sidebar",className:ie,...i,children:n}),e[9]=n,e[10]=i,e[11]=ie,e[12]=re):re=e[12],re}if(m){let ie;e[13]===Symbol.for("react.memo_cache_sentinel")?(ie={"--sidebar-width":sDe},e[13]=ie):ie=e[13];let re;e[14]===Symbol.for("react.memo_cache_sentinel")?(re=M.jsxs(sX,{className:"sr-only",children:[M.jsx(lX,{children:"Sidebar"}),M.jsx(dX,{children:"Displays the mobile sidebar."})]}),e[14]=re):re=e[14];let le;e[15]!==n?(le=M.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=le):le=e[16];let Q;e[17]!==p||e[18]!==le?(Q=M.jsxs(cX,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:ie,side:p,children:[re,le]}),e[17]=p,e[18]=le,e[19]=Q):Q=e[19];let fe;return e[20]!==b||e[21]!==i||e[22]!==w||e[23]!==Q?(fe=M.jsx(iX,{open:b,onOpenChange:w,...i,children:Q}),e[20]=b,e[21]=i,e[22]=w,e[23]=Q,e[24]=fe):fe=e[24],fe}const S=x==="collapsed"?k:"",_=f==="floating"||f==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[25]!==_?(C=oe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",_),e[25]=_,e[26]=C):C=e[26];let N;e[27]!==C?(N=M.jsx("div",{"data-slot":"sidebar-gap",className:C}),e[27]=C,e[28]=N):N=e[28];const A=p==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",$=f==="floating"||f==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let E;e[29]!==a||e[30]!==A||e[31]!==$?(E=oe("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",A,$,a),e[29]=a,e[30]=A,e[31]=$,e[32]=E):E=e[32];let P;e[33]!==n?(P=M.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=P):P=e[34];let D;e[35]!==i||e[36]!==E||e[37]!==P?(D=M.jsx("div",{"data-slot":"sidebar-container",className:E,...i,children:P}),e[35]=i,e[36]=E,e[37]=P,e[38]=D):D=e[38];let H;return e[39]!==p||e[40]!==x||e[41]!==D||e[42]!==S||e[43]!==N||e[44]!==f?(H=M.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":x,"data-collapsible":S,"data-variant":f,"data-side":p,"data-slot":"sidebar",children:[N,D]}),e[39]=p,e[40]=x,e[41]=D,e[42]=S,e[43]=N,e[44]=f,e[45]=H):H=e[45],H}function pDe(t){const e=Z.c(15);let n,a,i;e[0]!==t?({className:n,onClick:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const{toggleSidebar:c}=wu();let l;e[4]!==n?(l=oe("size-7",n),e[4]=n,e[5]=l):l=e[5];let h;e[6]!==a||e[7]!==c?(h=m=>{a==null||a(m),c()},e[6]=a,e[7]=c,e[8]=h):h=e[8];let p,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(Do,{}),f=M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=f):(p=e[9],f=e[10]);let k;return e[11]!==i||e[12]!==l||e[13]!==h?(k=M.jsxs(XT,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l,onClick:h,...i,children:[p,f]}),e[11]=i,e[12]=l,e[13]=h,e[14]=k):k=e[14],k}function fDe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const{toggleSidebar:i}=wu();let c;e[3]!==n?(c=oe("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",n),e[3]=n,e[4]=c):c=e[4];let l;return e[5]!==a||e[6]!==c||e[7]!==i?(l=M.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:c,...a}),e[5]=a,e[6]=c,e[7]=i,e[8]=l):l=e[8],l}function yDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function mDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background h-8 w-full shadow-none",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(FW,{"data-slot":"sidebar-input","data-sidebar":"input",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function kDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function vDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function gDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-sidebar-border mx-2 w-auto",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(rX,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function MDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function xDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function bDe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,asChild:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const l=(i===void 0?!1:i)?Go:"div";let h;e[4]!==n?(h=oe("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",n),e[4]=n,e[5]=h):h=e[5];let p;return e[6]!==l||e[7]!==a||e[8]!==h?(p=M.jsx(l,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:h,...a}),e[6]=l,e[7]=a,e[8]=h,e[9]=p):p=e[9],p}function wDe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,asChild:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const l=(i===void 0?!1:i)?Go:"button";let h;e[4]!==n?(h=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",n),e[4]=n,e[5]=h):h=e[5];let p;return e[6]!==l||e[7]!==a||e[8]!==h?(p=M.jsx(l,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:h,...a}),e[6]=l,e[7]=a,e[8]=h,e[9]=p):p=e[9],p}function _De(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("w-full text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function SDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function CDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("group/menu-item relative",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const LDe=YT("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function NDe(t){const e=Z.c(28);let n,a,i,c,l,h,p;e[0]!==t?({asChild:i,isActive:c,variant:l,size:h,tooltip:p,className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h,e[7]=p):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6],p=e[7]);const f=i===void 0?!1:i,k=c===void 0?!1:c,m=l===void 0?"default":l,x=h===void 0?"default":h,b=f?Go:"button",{isMobile:w,state:S}=wu();let _;e[8]!==n||e[9]!==x||e[10]!==m?(_=oe(LDe({variant:m,size:x}),n),e[8]=n,e[9]=x,e[10]=m,e[11]=_):_=e[11];let C;e[12]!==b||e[13]!==k||e[14]!==a||e[15]!==x||e[16]!==_?(C=M.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":x,"data-active":k,className:_,...a}),e[12]=b,e[13]=k,e[14]=a,e[15]=x,e[16]=_,e[17]=C):C=e[17];const N=C;if(!p)return N;if(typeof p=="string"){let D;e[18]!==p?(D={children:p},e[18]=p,e[19]=D):D=e[19],p=D}let A;e[20]!==N?(A=M.jsx(xX,{asChild:!0,children:N}),e[20]=N,e[21]=A):A=e[21];const $=S!=="collapsed"||w;let E;e[22]!==$||e[23]!==p?(E=M.jsx(bX,{side:"right",align:"center",hidden:$,...p}),e[22]=$,e[23]=p,e[24]=E):E=e[24];let P;return e[25]!==A||e[26]!==E?(P=M.jsxs(MX,{children:[A,E]}),e[25]=A,e[26]=E,e[27]=P):P=e[27],P}function ADe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,asChild:i,showOnHover:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?!1:i,h=c===void 0?!1:c,p=l?Go:"button",f=h&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0";let k;e[5]!==n||e[6]!==f?(k=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",f,n),e[5]=n,e[6]=f,e[7]=k):k=e[7];let m;return e[8]!==p||e[9]!==a||e[10]!==k?(m=M.jsx(p,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:k,...a}),e[8]=p,e[9]=a,e[10]=k,e[11]=m):m=e[11],m}function IDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function $De(t){const e=Z.c(14);let n,a,i;e[0]!==t?({className:n,showIcon:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=i===void 0?!1:i;let l;l=`${Math.floor(Math.random()*40)+50}%`;const h=l;let p;e[4]!==n?(p=oe("flex h-8 items-center gap-2 rounded-md px-2",n),e[4]=n,e[5]=p):p=e[5];let f;e[6]!==c?(f=c&&M.jsx(RT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e[6]=c,e[7]=f):f=e[7];let k;e[8]===Symbol.for("react.memo_cache_sentinel")?(k={"--skeleton-width":h},e[8]=k):k=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=M.jsx(RT,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:k}),e[9]=m):m=e[9];let x;return e[10]!==a||e[11]!==p||e[12]!==f?(x=M.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:p,...a,children:[f,m]}),e[10]=a,e[11]=p,e[12]=f,e[13]=x):x=e[13],x}function EDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function RDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("group/menu-sub-item relative",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function TDe(t){const e=Z.c(16);let n,a,i,c,l;e[0]!==t?({asChild:i,size:c,isActive:l,className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=i===void 0?!1:i,p=c===void 0?"md":c,f=l===void 0?!1:l,k=h?Go:"a",m=p==="sm"&&"text-xs",x=p==="md"&&"text-sm";let b;e[6]!==n||e[7]!==m||e[8]!==x?(b=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",m,x,"group-data-[collapsible=icon]:hidden",n),e[6]=n,e[7]=m,e[8]=x,e[9]=b):b=e[9];let w;return e[10]!==k||e[11]!==f||e[12]!==a||e[13]!==p||e[14]!==b?(w=M.jsx(k,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":p,"data-active":f,className:b,...a}),e[10]=k,e[11]=f,e[12]=a,e[13]=p,e[14]=b,e[15]=w):w=e[15],w}var _X=["PageUp","PageDown"],SX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],CX={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ll="Slider",[DT,jDe,DDe]=pu(Ll),[LX,zqe]=Ot(Ll,[DDe]),[ODe,cI]=LX(Ll),NX=v.forwardRef((t,e)=>{const{name:n,min:a=0,max:i=100,step:c=1,orientation:l="horizontal",disabled:h=!1,minStepsBetweenThumbs:p=0,defaultValue:f=[a],value:k,onValueChange:m=()=>{},onValueCommit:x=()=>{},inverted:b=!1,form:w,...S}=t,_=v.useRef(new Set),C=v.useRef(0),A=l==="horizontal"?qDe:PDe,[$=[],E]=on({prop:k,defaultProp:f,onChange:le=>{var fe;(fe=[..._.current][C.current])==null||fe.focus(),m(le)}}),P=v.useRef($);function D(le){const Q=FDe($,le);re(le,Q)}function H(le){re(le,C.current)}function ie(){const le=P.current[C.current];$[C.current]!==le&&x($)}function re(le,Q,{commit:fe}={commit:!1}){const ke=WDe(c),ye=YDe(Math.round((le-a)/c)*c+a,ke),j=SA(ye,[a,i]);E((B=[])=>{const R=BDe(B,j,Q);if(ZDe(R,p*c)){C.current=R.indexOf(j);const U=String(R)!==String(B);return U&&fe&&x(R),U?R:B}else return B})}return M.jsx(ODe,{scope:t.__scopeSlider,name:n,disabled:h,min:a,max:i,valueIndexToChangeRef:C,thumbs:_.current,values:$,orientation:l,form:w,children:M.jsx(DT.Provider,{scope:t.__scopeSlider,children:M.jsx(DT.Slot,{scope:t.__scopeSlider,children:M.jsx(A,{"aria-disabled":h,"data-disabled":h?"":void 0,...S,ref:e,onPointerDown:ue(S.onPointerDown,()=>{h||(P.current=$)}),min:a,max:i,inverted:b,onSlideStart:h?void 0:D,onSlideMove:h?void 0:H,onSlideEnd:h?void 0:ie,onHomeKeyDown:()=>!h&&re(a,0,{commit:!0}),onEndKeyDown:()=>!h&&re(i,$.length-1,{commit:!0}),onStepKeyDown:({event:le,direction:Q})=>{if(!h){const ye=_X.includes(le.key)||le.shiftKey&&SX.includes(le.key)?10:1,j=C.current,B=$[j],R=c*ye*Q;re(B+R,j,{commit:!0})}}})})})})});NX.displayName=Ll;var[AX,IX]=LX(Ll,{startEdge:"left",endEdge:"right",size:"width",direction:1}),qDe=v.forwardRef((t,e)=>{const{min:n,max:a,dir:i,inverted:c,onSlideStart:l,onSlideMove:h,onSlideEnd:p,onStepKeyDown:f,...k}=t,[m,x]=v.useState(null),b=Ae(e,A=>x(A)),w=v.useRef(void 0),S=f1(i),_=S==="ltr",C=_&&!c||!_&&c;function N(A){const $=w.current||m.getBoundingClientRect(),E=[0,$.width],D=aD(E,C?[n,a]:[a,n]);return w.current=$,D(A-$.left)}return M.jsx(AX,{scope:t.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:M.jsx($X,{dir:S,"data-orientation":"horizontal",...k,ref:b,style:{...k.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:A=>{const $=N(A.clientX);l==null||l($)},onSlideMove:A=>{const $=N(A.clientX);h==null||h($)},onSlideEnd:()=>{w.current=void 0,p==null||p()},onStepKeyDown:A=>{const E=CX[C?"from-left":"from-right"].includes(A.key);f==null||f({event:A,direction:E?-1:1})}})})}),PDe=v.forwardRef((t,e)=>{const{min:n,max:a,inverted:i,onSlideStart:c,onSlideMove:l,onSlideEnd:h,onStepKeyDown:p,...f}=t,k=v.useRef(null),m=Ae(e,k),x=v.useRef(void 0),b=!i;function w(S){const _=x.current||k.current.getBoundingClientRect(),C=[0,_.height],A=aD(C,b?[a,n]:[n,a]);return x.current=_,A(S-_.top)}return M.jsx(AX,{scope:t.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:M.jsx($X,{"data-orientation":"vertical",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const _=w(S.clientY);c==null||c(_)},onSlideMove:S=>{const _=w(S.clientY);l==null||l(_)},onSlideEnd:()=>{x.current=void 0,h==null||h()},onStepKeyDown:S=>{const C=CX[b?"from-bottom":"from-top"].includes(S.key);p==null||p({event:S,direction:C?-1:1})}})})}),$X=v.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:a,onSlideMove:i,onSlideEnd:c,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:p,...f}=t,k=cI(Ll,n);return M.jsx(Ce.span,{...f,ref:e,onKeyDown:ue(t.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):_X.concat(SX).includes(m.key)&&(p(m),m.preventDefault())}),onPointerDown:ue(t.onPointerDown,m=>{const x=m.target;x.setPointerCapture(m.pointerId),m.preventDefault(),k.thumbs.has(x)?x.focus():a(m)}),onPointerMove:ue(t.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:ue(t.onPointerUp,m=>{const x=m.target;x.hasPointerCapture(m.pointerId)&&(x.releasePointerCapture(m.pointerId),c(m))})})}),EX="SliderTrack",RX=v.forwardRef((t,e)=>{const{__scopeSlider:n,...a}=t,i=cI(EX,n);return M.jsx(Ce.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:e})});RX.displayName=EX;var OT="SliderRange",TX=v.forwardRef((t,e)=>{const{__scopeSlider:n,...a}=t,i=cI(OT,n),c=IX(OT,n),l=v.useRef(null),h=Ae(e,l),p=i.values.length,f=i.values.map(x=>OX(x,i.min,i.max)),k=p>1?Math.min(...f):0,m=100-Math.max(...f);return M.jsx(Ce.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...a,ref:h,style:{...t.style,[c.startEdge]:k+"%",[c.endEdge]:m+"%"}})});TX.displayName=OT;var qT="SliderThumb",jX=v.forwardRef((t,e)=>{const n=jDe(t.__scopeSlider),[a,i]=v.useState(null),c=Ae(e,h=>i(h)),l=v.useMemo(()=>a?n().findIndex(h=>h.ref.current===a):-1,[n,a]);return M.jsx(zDe,{...t,ref:c,index:l})}),zDe=v.forwardRef((t,e)=>{const{__scopeSlider:n,index:a,name:i,...c}=t,l=cI(qT,n),h=IX(qT,n),[p,f]=v.useState(null),k=Ae(e,N=>f(N)),m=p?l.form||!!p.closest("form"):!0,x=au(p),b=l.values[a],w=b===void 0?0:OX(b,l.min,l.max),S=VDe(a,l.values.length),_=x==null?void 0:x[h.size],C=_?UDe(_,w,h.direction):0;return v.useEffect(()=>{if(p)return l.thumbs.add(p),()=>{l.thumbs.delete(p)}},[p,l.thumbs]),M.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[h.startEdge]:`calc(${w}% + ${C}px)`},children:[M.jsx(DT.ItemSlot,{scope:t.__scopeSlider,children:M.jsx(Ce.span,{role:"slider","aria-label":t["aria-label"]||S,"aria-valuemin":l.min,"aria-valuenow":b,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...c,ref:k,style:b===void 0?{display:"none"}:t.style,onFocus:ue(t.onFocus,()=>{l.valueIndexToChangeRef.current=a})})}),m&&M.jsx(DX,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:b},a)]})});jX.displayName=qT;var HDe="RadioBubbleInput",DX=v.forwardRef(({__scopeSlider:t,value:e,...n},a)=>{const i=v.useRef(null),c=Ae(i,a),l=PA(e);return v.useEffect(()=>{const h=i.current;if(!h)return;const p=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(p,"value").set;if(l!==e&&k){const m=new Event("input",{bubbles:!0});k.call(h,e),h.dispatchEvent(m)}},[l,e]),M.jsx(Ce.input,{style:{display:"none"},...n,ref:c,defaultValue:e})});DX.displayName=HDe;function BDe(t=[],e,n){const a=[...t];return a[n]=e,a.sort((i,c)=>i-c)}function OX(t,e,n){const c=100/(n-e)*(t-e);return SA(c,[0,100])}function VDe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function FDe(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),a=Math.min(...n);return n.indexOf(a)}function UDe(t,e,n){const a=t/2,c=aD([0,50],[0,a]);return(a-c(e)*n)*n}function GDe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function ZDe(t,e){if(e>0){const n=GDe(t);return Math.min(...n)>=e}return!0}function aD(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const a=(e[1]-e[0])/(t[1]-t[0]);return e[0]+a*(n-t[0])}}function WDe(t){return(String(t).split(".")[1]||"").length}function YDe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var XDe=NX,KDe=RX,QDe=TX,JDe=jX;function eOe(t){const e=Z.c(28);let n,a,i,c,l,h,p;e[0]!==t?({className:n,defaultValue:a,value:p,min:l,max:h,id:i,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h,e[7]=p):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6],p=e[7]);const f=l===void 0?0:l,k=h===void 0?100:h;let m,x;e[8]!==a||e[9]!==k||e[10]!==f||e[11]!==p?(x=Array.isArray(p)?p:Array.isArray(a)?a:[f,k],e[8]=a,e[9]=k,e[10]=f,e[11]=p,e[12]=x):x=e[12],m=x;const b=m;let w;e[13]!==n?(w=oe("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",n),e[13]=n,e[14]=w):w=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=oe("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),e[15]=S):S=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=M.jsx(KDe,{"data-slot":"slider-track",className:S,children:M.jsx(QDe,{"data-slot":"slider-range",className:oe("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),e[16]=_):_=e[16];let C;e[17]!==b.length?(C=Array.from({length:b.length},tOe),e[17]=b.length,e[18]=C):C=e[18];let N;return e[19]!==a||e[20]!==i||e[21]!==k||e[22]!==f||e[23]!==c||e[24]!==w||e[25]!==C||e[26]!==p?(N=M.jsxs(XDe,{"data-slot":"slider",defaultValue:a,value:p,min:f,max:k,id:i,className:w,...c,children:[_,C]}),e[19]=a,e[20]=i,e[21]=k,e[22]=f,e[23]=c,e[24]=w,e[25]=C,e[26]=p,e[27]=N):N=e[27],N}function tOe(t,e){return M.jsx(JDe,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},e)}var nOe=(t,e,n,a,i,c,l,h)=>{let p=document.documentElement,f=["light","dark"];function k(b){(Array.isArray(t)?t:[t]).forEach(w=>{let S=w==="class",_=S&&c?i.map(C=>c[C]||C):i;S?(p.classList.remove(..._),p.classList.add(c&&c[b]?c[b]:b)):p.setAttribute(w,b)}),m(b)}function m(b){h&&f.includes(b)&&(p.style.colorScheme=b)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)k(a);else try{let b=localStorage.getItem(e)||n,w=l&&b==="system"?x():b;k(w)}catch{}},aOe=v.createContext(void 0),oOe={setTheme:t=>{},themes:[]},rOe=()=>{var t;return(t=v.useContext(aOe))!=null?t:oOe};v.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:a,enableColorScheme:i,defaultTheme:c,value:l,themes:h,nonce:p,scriptProps:f})=>{let k=JSON.stringify([n,e,c,t,h,l,a,i]).slice(1,-1);return v.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${nOe.toString()})(${k})`}})});function iOe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const cOe=t=>{switch(t){case"success":return dOe;case"info":return hOe;case"warning":return uOe;case"error":return pOe;default:return null}},sOe=Array(12).fill(0),lOe=({visible:t,className:e})=>me.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},me.createElement("div",{className:"sonner-spinner"},sOe.map((n,a)=>me.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),dOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),uOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},me.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),me.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yOe=()=>{const[t,e]=me.useState(document.hidden);return me.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let PT=1;class mOe{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:a,...i}=e,c=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:PT++,l=this.toasts.find(p=>p.id===c),h=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),l?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...e,id:c,title:a}),{...p,...e,id:c,dismissible:h,title:a}):p):this.addToast({title:a,...i,dismissible:h,id:c}),c},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let c=a!==void 0,l;const h=i.then(async f=>{if(l=["resolve",f],me.isValidElement(f))c=!1,this.create({id:a,type:"default",message:f});else if(vOe(f)&&!f.ok){c=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,x=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:x,...w})}else if(f instanceof Error){c=!1;const m=typeof n.error=="function"?await n.error(f):n.error,x=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:x,...w})}else if(n.success!==void 0){c=!1;const m=typeof n.success=="function"?await n.success(f):n.success,x=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"success",description:x,...w})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){c=!1;const k=typeof n.error=="function"?await n.error(f):n.error,m=typeof n.description=="function"?await n.description(f):n.description,b=typeof k=="object"&&!me.isValidElement(k)?k:{message:k};this.create({id:a,type:"error",description:m,...b})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),p=()=>new Promise((f,k)=>h.then(()=>l[0]==="reject"?k(l[1]):f(l[1])).catch(k));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(e,n)=>{const a=(n==null?void 0:n.id)||PT++;return this.create({jsx:e(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vn=new mOe,kOe=(t,e)=>{const n=(e==null?void 0:e.id)||PT++;return vn.addToast({title:t,...e,id:n}),n},vOe=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",gOe=kOe,MOe=()=>vn.toasts,xOe=()=>vn.getActiveToasts(),Hqe=Object.assign(gOe,{success:vn.success,info:vn.info,warning:vn.warning,error:vn.error,custom:vn.custom,message:vn.message,promise:vn.promise,dismiss:vn.dismiss,loading:vn.loading},{getHistory:MOe,getToasts:xOe});iOe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function F2(t){return t.label!==void 0}const bOe=3,wOe="24px",_Oe="16px",hB=4e3,SOe=356,COe=14,LOe=45,NOe=200;function wa(...t){return t.filter(Boolean).join(" ")}function AOe(t){const[e,n]=t.split("-"),a=[];return e&&a.push(e),n&&a.push(n),a}const IOe=t=>{var e,n,a,i,c,l,h,p,f;const{invert:k,toast:m,unstyled:x,interacting:b,setHeights:w,visibleToasts:S,heights:_,index:C,toasts:N,expanded:A,removeToast:$,defaultRichColors:E,closeButton:P,style:D,cancelButtonStyle:H,actionButtonStyle:ie,className:re="",descriptionClassName:le="",duration:Q,position:fe,gap:ke,expandByDefault:ye,classNames:j,icons:B,closeButtonAriaLabel:R="Close toast"}=t,[U,T]=me.useState(null),[z,O]=me.useState(null),[V,W]=me.useState(!1),[ae,ce]=me.useState(!1),[ee,ge]=me.useState(!1),[ve,Me]=me.useState(!1),[be,xe]=me.useState(!1),[Te,Be]=me.useState(0),[ft,nt]=me.useState(0),Pe=me.useRef(m.duration||Q||hB),$t=me.useRef(null),at=me.useRef(null),wn=C===0,Bt=C+1<=S,wt=m.type,en=m.dismissible!==!1,pa=m.className||"",Nl=m.descriptionClassName||"",qn=me.useMemo(()=>_.findIndex(Le=>Le.toastId===m.id)||0,[_,m.id]),Vt=me.useMemo(()=>{var Le;return(Le=m.closeButton)!=null?Le:P},[m.closeButton,P]),_n=me.useMemo(()=>m.duration||Q||hB,[m.duration,Q]),Mt=me.useRef(0),Pn=me.useRef(0),Jo=me.useRef(0),fa=me.useRef(null),[ro,ya]=fe.split("-"),ln=me.useMemo(()=>_.reduce((Le,tt,yt)=>yt>=qn?Le:Le+tt.height,0),[_,qn]),K=yOe(),te=m.invert||k,Ue=wt==="loading";Pn.current=me.useMemo(()=>qn*ke+ln,[qn,ln]),me.useEffect(()=>{Pe.current=_n},[_n]),me.useEffect(()=>{W(!0)},[]),me.useEffect(()=>{const Le=at.current;if(Le){const tt=Le.getBoundingClientRect().height;return nt(tt),w(yt=>[{toastId:m.id,height:tt,position:m.position},...yt]),()=>w(yt=>yt.filter(mt=>mt.toastId!==m.id))}},[w,m.id]),me.useLayoutEffect(()=>{if(!V)return;const Le=at.current,tt=Le.style.height;Le.style.height="auto";const yt=Le.getBoundingClientRect().height;Le.style.height=tt,nt(yt),w(mt=>mt.find(_t=>_t.toastId===m.id)?mt.map(_t=>_t.toastId===m.id?{..._t,height:yt}:_t):[{toastId:m.id,height:yt,position:m.position},...mt])},[V,m.title,m.description,w,m.id]);const Ve=me.useCallback(()=>{ce(!0),Be(Pn.current),w(Le=>Le.filter(tt=>tt.toastId!==m.id)),setTimeout(()=>{$(m)},NOe)},[m,$,w,Pn]);me.useEffect(()=>{if(m.promise&&wt==="loading"||m.duration===1/0||m.type==="loading")return;let Le;return A||b||K?(()=>{if(Jo.current<Mt.current){const mt=new Date().getTime()-Mt.current;Pe.current=Pe.current-mt}Jo.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(Mt.current=new Date().getTime(),Le=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Ve()},Pe.current))})(),()=>clearTimeout(Le)},[A,b,m,wt,K,Ve]),me.useEffect(()=>{m.delete&&Ve()},[Ve,m.delete]);function et(){var Le;if(B!=null&&B.loading){var tt;return me.createElement("div",{className:wa(j==null?void 0:j.loader,m==null||(tt=m.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":wt==="loading"},B.loading)}return me.createElement(lOe,{className:wa(j==null?void 0:j.loader,m==null||(Le=m.classNames)==null?void 0:Le.loader),visible:wt==="loading"})}const je=m.icon||(B==null?void 0:B[wt])||cOe(wt);var Xt,zn;return me.createElement("li",{tabIndex:0,ref:at,className:wa(re,pa,j==null?void 0:j.toast,m==null||(e=m.classNames)==null?void 0:e.toast,j==null?void 0:j.default,j==null?void 0:j[wt],m==null||(n=m.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(Xt=m.richColors)!=null?Xt:E,"data-styled":!(m.jsx||m.unstyled||x),"data-mounted":V,"data-promise":!!m.promise,"data-swiped":be,"data-removed":ae,"data-visible":Bt,"data-y-position":ro,"data-x-position":ya,"data-index":C,"data-front":wn,"data-swiping":ee,"data-dismissible":en,"data-type":wt,"data-invert":te,"data-swipe-out":ve,"data-swipe-direction":z,"data-expanded":!!(A||ye&&V),style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${ae?Te:Pn.current}px`,"--initial-height":ye?"auto":`${ft}px`,...D,...m.style},onDragEnd:()=>{ge(!1),T(null),fa.current=null},onPointerDown:Le=>{Ue||!en||($t.current=new Date,Be(Pn.current),Le.target.setPointerCapture(Le.pointerId),Le.target.tagName!=="BUTTON"&&(ge(!0),fa.current={x:Le.clientX,y:Le.clientY}))},onPointerUp:()=>{var Le,tt,yt;if(ve||!en)return;fa.current=null;const mt=Number(((Le=at.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((tt=at.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_t=new Date().getTime()-((yt=$t.current)==null?void 0:yt.getTime()),kt=U==="x"?mt:qt,vt=Math.abs(kt)/_t;if(Math.abs(kt)>=LOe||vt>.11){Be(Pn.current),m.onDismiss==null||m.onDismiss.call(m,m),O(U==="x"?mt>0?"right":"left":qt>0?"down":"up"),Ve(),Me(!0);return}else{var Xe,St;(Xe=at.current)==null||Xe.style.setProperty("--swipe-amount-x","0px"),(St=at.current)==null||St.style.setProperty("--swipe-amount-y","0px")}xe(!1),ge(!1),T(null)},onPointerMove:Le=>{var tt,yt,mt;if(!fa.current||!en||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const _t=Le.clientY-fa.current.y,kt=Le.clientX-fa.current.x;var vt;const Xe=(vt=t.swipeDirections)!=null?vt:AOe(fe);!U&&(Math.abs(kt)>1||Math.abs(_t)>1)&&T(Math.abs(kt)>Math.abs(_t)?"x":"y");let St={x:0,y:0};const Jn=Sn=>1/(1.5+Math.abs(Sn)/20);if(U==="y"){if(Xe.includes("top")||Xe.includes("bottom"))if(Xe.includes("top")&&_t<0||Xe.includes("bottom")&&_t>0)St.y=_t;else{const Sn=_t*Jn(_t);St.y=Math.abs(Sn)<Math.abs(_t)?Sn:_t}}else if(U==="x"&&(Xe.includes("left")||Xe.includes("right")))if(Xe.includes("left")&&kt<0||Xe.includes("right")&&kt>0)St.x=kt;else{const Sn=kt*Jn(kt);St.x=Math.abs(Sn)<Math.abs(kt)?Sn:kt}(Math.abs(St.x)>0||Math.abs(St.y)>0)&&xe(!0),(yt=at.current)==null||yt.style.setProperty("--swipe-amount-x",`${St.x}px`),(mt=at.current)==null||mt.style.setProperty("--swipe-amount-y",`${St.y}px`)}},Vt&&!m.jsx&&wt!=="loading"?me.createElement("button",{"aria-label":R,"data-disabled":Ue,"data-close-button":!0,onClick:Ue||!en?()=>{}:()=>{Ve(),m.onDismiss==null||m.onDismiss.call(m,m)},className:wa(j==null?void 0:j.closeButton,m==null||(a=m.classNames)==null?void 0:a.closeButton)},(zn=B==null?void 0:B.close)!=null?zn:fOe):null,(wt||m.icon||m.promise)&&m.icon!==null&&((B==null?void 0:B[wt])!==null||m.icon)?me.createElement("div",{"data-icon":"",className:wa(j==null?void 0:j.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||et():null,m.type!=="loading"?je:null):null,me.createElement("div",{"data-content":"",className:wa(j==null?void 0:j.content,m==null||(c=m.classNames)==null?void 0:c.content)},me.createElement("div",{"data-title":"",className:wa(j==null?void 0:j.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?me.createElement("div",{"data-description":"",className:wa(le,Nl,j==null?void 0:j.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),me.isValidElement(m.cancel)?m.cancel:m.cancel&&F2(m.cancel)?me.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||H,onClick:Le=>{F2(m.cancel)&&en&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Le),Ve())},className:wa(j==null?void 0:j.cancelButton,m==null||(p=m.classNames)==null?void 0:p.cancelButton)},m.cancel.label):null,me.isValidElement(m.action)?m.action:m.action&&F2(m.action)?me.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||ie,onClick:Le=>{F2(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Le),!Le.defaultPrevented&&Ve())},className:wa(j==null?void 0:j.actionButton,m==null||(f=m.classNames)==null?void 0:f.actionButton)},m.action.label):null)};function pB(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function $Oe(t,e){const n={};return[t,e].forEach((a,i)=>{const c=i===1,l=c?"--mobile-offset":"--offset",h=c?_Oe:wOe;function p(f){["top","right","bottom","left"].forEach(k=>{n[`${l}-${k}`]=typeof f=="number"?`${f}px`:f})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(f=>{a[f]===void 0?n[`${l}-${f}`]=h:n[`${l}-${f}`]=typeof a[f]=="number"?`${a[f]}px`:a[f]}):p(h)}),n}const EOe=me.forwardRef(function(e,n){const{invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:l,closeButton:h,className:p,offset:f,mobileOffset:k,theme:m="light",richColors:x,duration:b,style:w,visibleToasts:S=bOe,toastOptions:_,dir:C=pB(),gap:N=COe,icons:A,containerAriaLabel:$="Notifications"}=e,[E,P]=me.useState([]),D=me.useMemo(()=>Array.from(new Set([i].concat(E.filter(z=>z.position).map(z=>z.position)))),[E,i]),[H,ie]=me.useState([]),[re,le]=me.useState(!1),[Q,fe]=me.useState(!1),[ke,ye]=me.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=me.useRef(null),B=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=me.useRef(null),U=me.useRef(!1),T=me.useCallback(z=>{P(O=>{var V;return(V=O.find(W=>W.id===z.id))!=null&&V.delete||vn.dismiss(z.id),O.filter(({id:W})=>W!==z.id)})},[]);return me.useEffect(()=>vn.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{P(O=>O.map(V=>V.id===z.id?{...V,delete:!0}:V))});return}setTimeout(()=>{OA.flushSync(()=>{P(O=>{const V=O.findIndex(W=>W.id===z.id);return V!==-1?[...O.slice(0,V),{...O[V],...z},...O.slice(V+1)]:[z,...O]})})})}),[E]),me.useEffect(()=>{if(m!=="system"){ye(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ye("dark"):ye("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:O})=>{ye(O?"dark":"light")})}catch{z.addListener(({matches:V})=>{try{ye(V?"dark":"light")}catch(W){console.error(W)}})}},[m]),me.useEffect(()=>{E.length<=1&&le(!1)},[E]),me.useEffect(()=>{const z=O=>{var V;if(c.every(ce=>O[ce]||O.code===ce)){var ae;le(!0),(ae=j.current)==null||ae.focus()}O.code==="Escape"&&(document.activeElement===j.current||(V=j.current)!=null&&V.contains(document.activeElement))&&le(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[c]),me.useEffect(()=>{if(j.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,U.current=!1)}},[j.current]),me.createElement("section",{ref:n,"aria-label":`${$} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((z,O)=>{var V;const[W,ae]=z.split("-");return E.length?me.createElement("ol",{key:z,dir:C==="auto"?pB():C,tabIndex:-1,ref:j,className:p,"data-sonner-toaster":!0,"data-sonner-theme":ke,"data-y-position":W,"data-lifted":re&&E.length>1&&!l,"data-x-position":ae,style:{"--front-toast-height":`${((V=H[0])==null?void 0:V.height)||0}px`,"--width":`${SOe}px`,"--gap":`${N}px`,...w,...$Oe(f,k)},onBlur:ce=>{U.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(U.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||U.current||(U.current=!0,R.current=ce.relatedTarget)},onMouseEnter:()=>le(!0),onMouseMove:()=>le(!0),onMouseLeave:()=>{Q||le(!1)},onDragEnd:()=>le(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||fe(!0)},onPointerUp:()=>fe(!1)},E.filter(ce=>!ce.position&&O===0||ce.position===z).map((ce,ee)=>{var ge,ve;return me.createElement(IOe,{key:ce.id,icons:A,index:ee,toast:ce,defaultRichColors:x,duration:(ge=_==null?void 0:_.duration)!=null?ge:b,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:a,visibleToasts:S,closeButton:(ve=_==null?void 0:_.closeButton)!=null?ve:h,interacting:Q,position:z,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:T,toasts:E.filter(Me=>Me.position==ce.position),heights:H.filter(Me=>Me.position==ce.position),setHeights:ie,expandByDefault:l,gap:N,expanded:re,swipeDirections:e.swipeDirections})})):null}))}),ROe=t=>{const e=Z.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{theme:a}=rOe(),c=a===void 0?"system":a;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},e[2]=l):l=e[2];let h;return e[3]!==n||e[4]!==c?(h=M.jsx(EOe,{theme:c,className:"toaster group",style:l,...n}),e[3]=n,e[4]=c,e[5]=h):h=e[5],h};function TOe(t){const e=jOe(t),n=v.forwardRef((a,i)=>{const{children:c,...l}=a,h=v.Children.toArray(c),p=h.find(OOe);if(p){const f=p.props.children,k=h.map(m=>m===p?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:m);return M.jsx(e,{...l,ref:i,children:v.isValidElement(f)?v.cloneElement(f,void 0,k):null})}return M.jsx(e,{...l,ref:i,children:c})});return n.displayName=`${t}.Slot`,n}function jOe(t){const e=v.forwardRef((n,a)=>{const{children:i,...c}=n,l=v.isValidElement(i)?POe(i):void 0,h=Ae(l,a);if(v.isValidElement(i)){const p=qOe(c,i.props);return i.type!==v.Fragment&&(p.ref=h),v.cloneElement(i,p)}return v.Children.count(i)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var DOe=Symbol("radix.slottable");function OOe(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===DOe}function qOe(t,e){const n={...e};for(const a in e){const i=t[a],c=e[a];/^on[A-Z]/.test(a)?i&&c?n[a]=(...h)=>{const p=c(...h);return i(...h),p}:i&&(n[a]=i):a==="style"?n[a]={...i,...c}:a==="className"&&(n[a]=[i,c].filter(Boolean).join(" "))}return{...t,...n}}function POe(t){var a,i;let e=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var zOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qX=zOe.reduce((t,e)=>{const n=TOe(`Primitive.${e}`),a=v.forwardRef((i,c)=>{const{asChild:l,...h}=i,p=l?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(p,{...h,ref:c})});return a.displayName=`Primitive.${e}`,{...t,[e]:a}},{}),sI="Switch",[HOe,Bqe]=Ot(sI),[BOe,VOe]=HOe(sI),PX=v.forwardRef((t,e)=>{const{__scopeSwitch:n,name:a,checked:i,defaultChecked:c,required:l,disabled:h,value:p="on",onCheckedChange:f,form:k,...m}=t,[x,b]=v.useState(null),w=Ae(e,A=>b(A)),S=v.useRef(!1),_=x?k||!!x.closest("form"):!0,[C,N]=on({prop:i,defaultProp:c??!1,onChange:f,caller:sI});return M.jsxs(BOe,{scope:n,checked:C,disabled:h,children:[M.jsx(qX.button,{type:"button",role:"switch","aria-checked":C,"aria-required":l,"data-state":VX(C),"data-disabled":h?"":void 0,disabled:h,value:p,...m,ref:w,onClick:ue(t.onClick,A=>{N($=>!$),_&&(S.current=A.isPropagationStopped(),S.current||A.stopPropagation())})}),_&&M.jsx(BX,{control:x,bubbles:!S.current,name:a,value:p,checked:C,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});PX.displayName=sI;var zX="SwitchThumb",HX=v.forwardRef((t,e)=>{const{__scopeSwitch:n,...a}=t,i=VOe(zX,n);return M.jsx(qX.span,{"data-state":VX(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:e})});HX.displayName=zX;var FOe="SwitchBubbleInput",BX=v.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:a=!0,...i},c)=>{const l=v.useRef(null),h=Ae(l,c),p=PA(n),f=au(e);return v.useEffect(()=>{const k=l.current;if(!k)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"checked").set;if(p!==n&&b){const w=new Event("click",{bubbles:a});b.call(k,n),k.dispatchEvent(w)}},[p,n,a]),M.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:h,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});BX.displayName=FOe;function VX(t){return t?"checked":"unchecked"}var UOe=PX,GOe=HX;function ZOe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(GOe,{"data-slot":"switch-thumb",className:oe("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(UOe,{"data-slot":"switch",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}function WOe(t){const e=Z.c(14);let n,a,i;e[0]!==t?({className:n,wrapperHeight:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==i?(c=oe("relative w-full overflow-x-auto",i),e[4]=i,e[5]=c):c=e[5];let l;e[6]!==n?(l=oe("w-full caption-bottom text-sm",n),e[6]=n,e[7]=l):l=e[7];let h;e[8]!==a||e[9]!==l?(h=M.jsx("table",{"data-slot":"table",className:l,...a}),e[8]=a,e[9]=l,e[10]=h):h=e[10];let p;return e[11]!==c||e[12]!==h?(p=M.jsx("div",{"data-slot":"table-container",className:c,children:h}),e[11]=c,e[12]=h,e[13]=p):p=e[13],p}function YOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("[&_tr]:border-b",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("thead",{"data-slot":"table-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function XOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("[&_tr:last-child]:border-0",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tbody",{"data-slot":"table-body",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function KOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tfoot",{"data-slot":"table-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function QOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tr",{"data-slot":"table-row",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function JOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("th",{"data-slot":"table-head",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function eqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("td",{"data-slot":"table-cell",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function tqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground mt-4 text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("caption",{"data-slot":"table-caption",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function nqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("textarea",{"data-slot":"textarea",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aqe(){window.UIComponents??(window.UIComponents={}),Object.assign(window.UIComponents,{Avatar:Fae,AvatarImage:Uae,AvatarFallback:Gae,Badge:Wae,Breadcrumb:X9e,BreadcrumbList:K9e,BreadcrumbItem:Q9e,BreadcrumbLink:J9e,BreadcrumbPage:ewe,BreadcrumbSeparator:twe,BreadcrumbEllipsis:nwe,Button:XT,Calendar:VSe,Card:GSe,CardHeader:ZSe,CardFooter:QSe,CardTitle:WSe,CardAction:XSe,CardDescription:YSe,CardContent:KSe,Checkbox:uCe,Collapsible:vCe,CollapsibleTrigger:gCe,CollapsibleContent:MCe,Command:OU,CommandDialog:oNe,CommandInput:rNe,CommandList:iNe,CommandEmpty:cNe,CommandGroup:sNe,CommandItem:dNe,CommandShortcut:uNe,CommandSeparator:lNe,ContextMenu:s$e,ContextMenuTrigger:l$e,ContextMenuContent:m$e,ContextMenuItem:k$e,ContextMenuCheckboxItem:v$e,ContextMenuRadioItem:g$e,ContextMenuLabel:M$e,ContextMenuSeparator:x$e,ContextMenuShortcut:b$e,ContextMenuGroup:d$e,ContextMenuPortal:u$e,ContextMenuSub:h$e,ContextMenuSubContent:y$e,ContextMenuSubTrigger:f$e,ContextMenuRadioGroup:p$e,Dialog:IU,DialogClose:nNe,DialogContent:RU,DialogDescription:DU,DialogFooter:aNe,DialogHeader:TU,DialogOverlay:EU,DialogPortal:$U,DialogTitle:jU,DialogTrigger:tNe,DialogStack:xZ,DialogStackTrigger:w$e,DialogStackOverlay:_$e,DialogStackBody:S$e,DialogStackContent:C$e,DialogStackTitle:L$e,DialogStackDescription:N$e,DialogStackHeader:A$e,DialogStackFooter:I$e,DialogStackNext:$$e,DialogStackPrevious:E$e,DropdownMenu:tRe,DropdownMenuPortal:nRe,DropdownMenuTrigger:aRe,DropdownMenuContent:oRe,DropdownMenuGroup:rRe,DropdownMenuLabel:dRe,DropdownMenuItem:iRe,DropdownMenuCheckboxItem:cRe,DropdownMenuRadioGroup:sRe,DropdownMenuRadioItem:lRe,DropdownMenuSeparator:uRe,DropdownMenuShortcut:hRe,DropdownMenuSub:pRe,DropdownMenuSubTrigger:fRe,DropdownMenuSubContent:yRe,Input:FW,Label:vRe,Menubar:QRe,MenubarPortal:pY,MenubarMenu:JRe,MenubarTrigger:nTe,MenubarContent:aTe,MenubarGroup:eTe,MenubarSeparator:sTe,MenubarLabel:cTe,MenubarItem:oTe,MenubarShortcut:lTe,MenubarCheckboxItem:rTe,MenubarRadioGroup:tTe,MenubarRadioItem:iTe,MenubarSub:dTe,MenubarSubTrigger:uTe,MenubarSubContent:hTe,Pagination:pTe,PaginationContent:fTe,PaginationLink:Kj,PaginationItem:yTe,PaginationPrevious:mTe,PaginationNext:kTe,PaginationEllipsis:vTe,Popover:RTe,PopoverTrigger:TTe,PopoverContent:jTe,PopoverAnchor:DTe,Select:Mje,SelectContent:_je,SelectGroup:xje,SelectItem:Cje,SelectLabel:Sje,SelectScrollDownButton:aX,SelectScrollUpButton:nX,SelectSeparator:Lje,SelectTrigger:wje,SelectValue:bje,Separator:rX,Sheet:iX,SheetTrigger:Eje,SheetClose:Rje,SheetContent:cX,SheetHeader:sX,SheetFooter:Dje,SheetTitle:lX,SheetDescription:dX,Sidebar:hDe,SidebarContent:MDe,SidebarFooter:vDe,SidebarGroup:xDe,SidebarGroupAction:wDe,SidebarGroupContent:_De,SidebarGroupLabel:bDe,SidebarHeader:kDe,SidebarInput:mDe,SidebarInset:yDe,SidebarMenu:SDe,SidebarMenuAction:ADe,SidebarMenuBadge:IDe,SidebarMenuButton:NDe,SidebarMenuItem:CDe,SidebarMenuSkeleton:$De,SidebarMenuSub:EDe,SidebarMenuSubButton:TDe,SidebarMenuSubItem:RDe,SidebarProvider:uDe,SidebarRail:fDe,SidebarSeparator:gDe,SidebarTrigger:pDe,useSidebar:wu,Skeleton:RT,Slider:eOe,Toaster:ROe,Switch:ZOe,Table:WOe,TableHeader:YOe,TableBody:XOe,TableFooter:KOe,TableHead:JOe,TableRow:QOe,TableCell:eqe,TableCaption:tqe,Textarea:nqe,Tooltip:MX,TooltipTrigger:xX,TooltipContent:bX,TooltipProvider:nD})}const{createInertiaApp:oqe}=ZV;window.React=me;window.ReactDOM=OA;window.InertiajsReact=ZV;window.LucideReact=Y9e;aqe();async function rqe(t,e){for(const n of Array.isArray(t)?t:[t]){const a=e[n];if(!(typeof a>"u"))return typeof a=="function"?a():a}throw new Error(`Page not found: ${t}`)}oqe({title:t=>`${t}`,resolve:t=>rqe(`./pages/${t}.tsx`,Object.assign({"./pages/add-group.tsx":()=>Rn(()=>import("./add-group-Br44s2D6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"./pages/add-user.tsx":()=>Rn(()=>import("./add-user-DWcH0s9-.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17]),import.meta.url),"./pages/add.tsx":()=>Rn(()=>import("./add-CYZwY0d_.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,19,20,21,22,23,24,17]),import.meta.url),"./pages/catalog.tsx":()=>Rn(()=>import("./catalog-BpAw4095.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,26,27,19,20,21,22,23,24,17,28,29]),import.meta.url),"./pages/dashboard.tsx":()=>Rn(()=>import("./dashboard-Dy3pk9t7.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,31]),import.meta.url),"./pages/form.tsx":()=>Rn(()=>import("./form-COsFQmSc.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,13,33,24,19,20,21,22,23,17]),import.meta.url),"./pages/home.tsx":()=>Rn(()=>import("./home-DFu_vF7z.js"),[],import.meta.url),"./pages/init-user.tsx":()=>Rn(()=>import("./init-user-DgCD4ZN1.js"),__vite__mapDeps([34,17,12]),import.meta.url),"./pages/list.tsx":()=>Rn(()=>import("./list-C-27EH39.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,36,27,37]),import.meta.url),"./pages/login.tsx":()=>Rn(()=>import("./login-jzvVXgAV.js"),__vite__mapDeps([38,13,17,12]),import.meta.url),"./pages/module.tsx":()=>Rn(()=>import("./module-Ceq6vuwa.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"./pages/register.tsx":()=>Rn(()=>import("./register-C6acWsLe.js"),__vite__mapDeps([40,17,12]),import.meta.url),"./pages/welcome.tsx":()=>Rn(()=>import("./welcome-Dk7GoS5R.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)})),setup({el:t,App:e,props:n}){Bne.createRoot(t).render(M.jsx(e,{...n}))},progress:{color:"#0f4898"}});export{Ene as $,s$e as A,XT as B,Na as C,_$e as D,l$e as E,m$e as F,k$e as G,Qd as H,FW as I,tJ as J,WV as K,sc as L,GSe as M,ZSe as N,WSe as O,Wb as P,QSe as Q,nD as R,wje as S,ROe as T,MX as U,xX as V,bX as W,ZOe as X,w$e as Y,L$e as Z,$ne as _,vRe as a,nTe as a$,Rn as a0,Rne as a1,JL as a2,yDe as a3,zP as a4,OA as a5,S7 as a6,c6 as a7,j9 as a8,no as a9,tNe as aA,Eh as aB,fh as aC,vh as aD,bh as aE,Ki as aF,tx as aG,E6 as aH,uDe as aI,pDe as aJ,mm as aK,aTe as aL,FF as aM,EDe as aN,kDe as aO,SDe as aP,CDe as aQ,MDe as aR,dTe as aS,uTe as aT,hTe as aU,oTe as aV,HF as aW,gCe as aX,NDe as aY,RDe as aZ,TDe as a_,lL as aa,gl as ab,qs as ac,a1 as ad,ra as ae,Ot as af,Ae as ag,ht as ah,ue as ai,f1 as aj,on as ak,It as al,Yt as am,oe as an,TU as ao,jU as ap,nNe as aq,aNe as ar,RU as as,IU as at,JOe as au,YOe as av,QOe as aw,eqe as ax,XOe as ay,WOe as az,bje as b,QRe as b0,JRe as b1,xDe as b2,vDe as b3,hDe as b4,X9e as b5,K9e as b6,Q9e as b7,ewe as b8,J9e as b9,Si as bA,YT as bB,rX as bC,cl as bD,Ks as bE,rNe as bF,cNe as bG,dNe as bH,sNe as bI,lNe as bJ,iNe as bK,OU as bL,Ch as bM,zd as bN,ws as bO,B9 as bP,C5 as bQ,Kj as bR,yTe as bS,mTe as bT,kTe as bU,pTe as bV,fTe as bW,twe as ba,u1 as bb,Ly as bc,TTe as bd,VSe as be,jTe as bf,RTe as bg,nqe as bh,eOe as bi,vCe as bj,MCe as bk,bDe as bl,_De as bm,wu as bn,Oje as bo,tRe as bp,HS as bq,zM as br,VS as bs,Uae as bt,Gae as bu,Fae as bv,dRe as bw,uRe as bx,J8 as by,iRe as bz,Z as c,uCe as d,me as e,Cje as f,fB as g,At as h,_je as i,M as j,Mje as k,C$e as l,S$e as m,xZ as n,RT as o,GV as p,BV as q,v as r,yb as s,Hqe as t,ip as u,CW as v,aRe as w,$r as x,oRe as y,rRe as z};
8023
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},qLe="DialogDescriptionWarning",PLe=({contentRef:t,descriptionId:e})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gU(qLe).contentName}}.`;return v.useEffect(()=>{var c;const i=(c=t.current)==null?void 0:c.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(a))},[a,t,e]),null},yj=rU,MU=cU,mj=lU,kj=dU,vj=uU,xU=pU,bU=yU,FA=kU,Id='[cmdk-group=""]',zR='[cmdk-group-items=""]',zLe='[cmdk-group-heading=""]',wU='[cmdk-item=""]',WH=`${wU}:not([aria-disabled="true"])`,mT="cmdk-item-select",al="data-value",HLe=(t,e,n)=>ACe(t,e,n),_U=v.createContext(void 0),cu=()=>v.useContext(_U),SU=v.createContext(void 0),gj=()=>v.useContext(SU),CU=v.createContext(void 0),LU=v.forwardRef((t,e)=>{let n=ol(()=>{var O,V;return{search:"",value:(V=(O=t.value)!=null?O:t.defaultValue)!=null?V:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=ol(()=>new Set),i=ol(()=>new Map),c=ol(()=>new Map),l=ol(()=>new Set),h=NU(t),{label:p,children:f,value:k,onValueChange:m,filter:x,shouldFilter:b,loop:w,disablePointerSelection:S=!1,vimBindings:_=!0,...C}=t,N=ht(),A=ht(),$=ht(),E=v.useRef(null),P=QLe();c1(()=>{if(k!==void 0){let O=k.trim();n.current.value=O,D.emit()}},[k]),c1(()=>{P(6,fe)},[]);let D=v.useMemo(()=>({subscribe:O=>(l.current.add(O),()=>l.current.delete(O)),snapshot:()=>n.current,setState:(O,V,W)=>{var ae,ce,ee,ge;if(!Object.is(n.current[O],V)){if(n.current[O]=V,O==="search")Q(),re(),P(1,le);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById($);ve?ve.focus():(ae=document.getElementById(N))==null||ae.focus()}if(P(7,()=>{var ve;n.current.selectedItemId=(ve=ke())==null?void 0:ve.id,D.emit()}),W||P(5,fe),((ce=h.current)==null?void 0:ce.value)!==void 0){let ve=V??"";(ge=(ee=h.current).onValueChange)==null||ge.call(ee,ve);return}}D.emit()}},emit:()=>{l.current.forEach(O=>O())}}),[]),H=v.useMemo(()=>({value:(O,V,W)=>{var ae;V!==((ae=c.current.get(O))==null?void 0:ae.value)&&(c.current.set(O,{value:V,keywords:W}),n.current.filtered.items.set(O,ie(V,W)),P(2,()=>{re(),D.emit()}))},item:(O,V)=>(a.current.add(O),V&&(i.current.has(V)?i.current.get(V).add(O):i.current.set(V,new Set([O]))),P(3,()=>{Q(),re(),n.current.value||le(),D.emit()}),()=>{c.current.delete(O),a.current.delete(O),n.current.filtered.items.delete(O);let W=ke();P(4,()=>{Q(),(W==null?void 0:W.getAttribute("id"))===O&&le(),D.emit()})}),group:O=>(i.current.has(O)||i.current.set(O,new Set),()=>{c.current.delete(O),i.current.delete(O)}),filter:()=>h.current.shouldFilter,label:p||t["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:N,inputId:$,labelId:A,listInnerRef:E}),[]);function ie(O,V){var W,ae;let ce=(ae=(W=h.current)==null?void 0:W.filter)!=null?ae:HLe;return O?ce(O,n.current.search,V):0}function re(){if(!n.current.search||h.current.shouldFilter===!1)return;let O=n.current.filtered.items,V=[];n.current.filtered.groups.forEach(ae=>{let ce=i.current.get(ae),ee=0;ce.forEach(ge=>{let ve=O.get(ge);ee=Math.max(ve,ee)}),V.push([ae,ee])});let W=E.current;ye().sort((ae,ce)=>{var ee,ge;let ve=ae.getAttribute("id"),Me=ce.getAttribute("id");return((ee=O.get(Me))!=null?ee:0)-((ge=O.get(ve))!=null?ge:0)}).forEach(ae=>{let ce=ae.closest(zR);ce?ce.appendChild(ae.parentElement===ce?ae:ae.closest(`${zR} > *`)):W.appendChild(ae.parentElement===W?ae:ae.closest(`${zR} > *`))}),V.sort((ae,ce)=>ce[1]-ae[1]).forEach(ae=>{var ce;let ee=(ce=E.current)==null?void 0:ce.querySelector(`${Id}[${al}="${encodeURIComponent(ae[0])}"]`);ee==null||ee.parentElement.appendChild(ee)})}function le(){let O=ye().find(W=>W.getAttribute("aria-disabled")!=="true"),V=O==null?void 0:O.getAttribute(al);D.setState("value",V||void 0)}function Q(){var O,V,W,ae;if(!n.current.search||h.current.shouldFilter===!1){n.current.filtered.count=a.current.size;return}n.current.filtered.groups=new Set;let ce=0;for(let ee of a.current){let ge=(V=(O=c.current.get(ee))==null?void 0:O.value)!=null?V:"",ve=(ae=(W=c.current.get(ee))==null?void 0:W.keywords)!=null?ae:[],Me=ie(ge,ve);n.current.filtered.items.set(ee,Me),Me>0&&ce++}for(let[ee,ge]of i.current)for(let ve of ge)if(n.current.filtered.items.get(ve)>0){n.current.filtered.groups.add(ee);break}n.current.filtered.count=ce}function fe(){var O,V,W;let ae=ke();ae&&(((O=ae.parentElement)==null?void 0:O.firstChild)===ae&&((W=(V=ae.closest(Id))==null?void 0:V.querySelector(zLe))==null||W.scrollIntoView({block:"nearest"})),ae.scrollIntoView({block:"nearest"}))}function ke(){var O;return(O=E.current)==null?void 0:O.querySelector(`${wU}[aria-selected="true"]`)}function ye(){var O;return Array.from(((O=E.current)==null?void 0:O.querySelectorAll(WH))||[])}function j(O){let V=ye()[O];V&&D.setState("value",V.getAttribute(al))}function B(O){var V;let W=ke(),ae=ye(),ce=ae.findIndex(ge=>ge===W),ee=ae[ce+O];(V=h.current)!=null&&V.loop&&(ee=ce+O<0?ae[ae.length-1]:ce+O===ae.length?ae[0]:ae[ce+O]),ee&&D.setState("value",ee.getAttribute(al))}function R(O){let V=ke(),W=V==null?void 0:V.closest(Id),ae;for(;W&&!ae;)W=O>0?XLe(W,Id):KLe(W,Id),ae=W==null?void 0:W.querySelector(WH);ae?D.setState("value",ae.getAttribute(al)):B(O)}let U=()=>j(ye().length-1),T=O=>{O.preventDefault(),O.metaKey?U():O.altKey?R(1):B(1)},z=O=>{O.preventDefault(),O.metaKey?j(0):O.altKey?R(-1):B(-1)};return v.createElement(Ce.div,{ref:e,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:O=>{var V;(V=C.onKeyDown)==null||V.call(C,O);let W=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||W))switch(O.key){case"n":case"j":{_&&O.ctrlKey&&T(O);break}case"ArrowDown":{T(O);break}case"p":case"k":{_&&O.ctrlKey&&z(O);break}case"ArrowUp":{z(O);break}case"Home":{O.preventDefault(),j(0);break}case"End":{O.preventDefault(),U();break}case"Enter":{O.preventDefault();let ae=ke();if(ae){let ce=new Event(mT);ae.dispatchEvent(ce)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:eNe},p),UA(t,O=>v.createElement(SU.Provider,{value:D},v.createElement(_U.Provider,{value:H},O))))}),BLe=v.forwardRef((t,e)=>{var n,a;let i=ht(),c=v.useRef(null),l=v.useContext(CU),h=cu(),p=NU(t),f=(a=(n=p.current)==null?void 0:n.forceMount)!=null?a:l==null?void 0:l.forceMount;c1(()=>{if(!f)return h.item(i,l==null?void 0:l.id)},[f]);let k=AU(i,c,[t.value,t.children,c],t.keywords),m=gj(),x=Ho(P=>P.value&&P.value===k.current),b=Ho(P=>f||h.filter()===!1?!0:P.search?P.filtered.items.get(i)>0:!0);v.useEffect(()=>{let P=c.current;if(!(!P||t.disabled))return P.addEventListener(mT,w),()=>P.removeEventListener(mT,w)},[b,t.onSelect,t.disabled]);function w(){var P,D;S(),(D=(P=p.current).onSelect)==null||D.call(P,k.current)}function S(){m.setState("value",k.current,!0)}if(!b)return null;let{disabled:_,value:C,onSelect:N,forceMount:A,keywords:$,...E}=t;return v.createElement(Ce.div,{ref:ra(c,e),...E,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!x,"data-disabled":!!_,"data-selected":!!x,onPointerMove:_||h.getDisablePointerSelection()?void 0:S,onClick:_?void 0:w},t.children)}),VLe=v.forwardRef((t,e)=>{let{heading:n,children:a,forceMount:i,...c}=t,l=ht(),h=v.useRef(null),p=v.useRef(null),f=ht(),k=cu(),m=Ho(b=>i||k.filter()===!1?!0:b.search?b.filtered.groups.has(l):!0);c1(()=>k.group(l),[]),AU(l,h,[t.value,t.heading,p]);let x=v.useMemo(()=>({id:l,forceMount:i}),[i]);return v.createElement(Ce.div,{ref:ra(h,e),...c,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),UA(t,b=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},v.createElement(CU.Provider,{value:x},b))))}),FLe=v.forwardRef((t,e)=>{let{alwaysRender:n,...a}=t,i=v.useRef(null),c=Ho(l=>!l.search);return!n&&!c?null:v.createElement(Ce.div,{ref:ra(i,e),...a,"cmdk-separator":"",role:"separator"})}),ULe=v.forwardRef((t,e)=>{let{onValueChange:n,...a}=t,i=t.value!=null,c=gj(),l=Ho(f=>f.search),h=Ho(f=>f.selectedItemId),p=cu();return v.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),v.createElement(Ce.input,{ref:e,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":h,id:p.inputId,type:"text",value:i?t.value:l,onChange:f=>{i||c.setState("search",f.target.value),n==null||n(f.target.value)}})}),GLe=v.forwardRef((t,e)=>{let{children:n,label:a="Suggestions",...i}=t,c=v.useRef(null),l=v.useRef(null),h=Ho(f=>f.selectedItemId),p=cu();return v.useEffect(()=>{if(l.current&&c.current){let f=l.current,k=c.current,m,x=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let b=f.offsetHeight;k.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(f),()=>{cancelAnimationFrame(m),x.unobserve(f)}}},[]),v.createElement(Ce.div,{ref:ra(c,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":a,id:p.listId},UA(t,f=>v.createElement("div",{ref:ra(l,p.listInnerRef),"cmdk-list-sizer":""},f)))}),ZLe=v.forwardRef((t,e)=>{let{open:n,onOpenChange:a,overlayClassName:i,contentClassName:c,container:l,...h}=t;return v.createElement(yj,{open:n,onOpenChange:a},v.createElement(mj,{container:l},v.createElement(kj,{"cmdk-overlay":"",className:i}),v.createElement(vj,{"aria-label":t.label,"cmdk-dialog":"",className:c},v.createElement(LU,{ref:e,...h}))))}),WLe=v.forwardRef((t,e)=>Ho(n=>n.filtered.count===0)?v.createElement(Ce.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),YLe=v.forwardRef((t,e)=>{let{progress:n,children:a,label:i="Loading...",...c}=t;return v.createElement(Ce.div,{ref:e,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},UA(t,l=>v.createElement("div",{"aria-hidden":!0},l)))}),p1=Object.assign(LU,{List:GLe,Item:BLe,Input:ULe,Group:VLe,Separator:FLe,Dialog:ZLe,Empty:WLe,Loading:YLe});function XLe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function KLe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function NU(t){let e=v.useRef(t);return c1(()=>{e.current=t}),e}var c1=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ol(t){let e=v.useRef();return e.current===void 0&&(e.current=t()),e}function Ho(t){let e=gj(),n=()=>t(e.snapshot());return v.useSyncExternalStore(e.subscribe,n,n)}function AU(t,e,n,a=[]){let i=v.useRef(),c=cu();return c1(()=>{var l;let h=(()=>{var f;for(let k of n){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(f=k.current.textContent)==null?void 0:f.trim():i.current}})(),p=a.map(f=>f.trim());c.value(t,h,p),(l=e.current)==null||l.setAttribute(al,h),i.current=h}),i}var QLe=()=>{let[t,e]=v.useState(),n=ol(()=>new Map);return c1(()=>{n.current.forEach(a=>a()),n.current=new Map},[t]),(a,i)=>{n.current.set(a,i),e({})}};function JLe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function UA({asChild:t,children:e},n){return t&&v.isValidElement(e)?v.cloneElement(JLe(e),{ref:e.ref},n(e.props.children)):n(e)}var eNe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function IU(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(yj,{"data-slot":"dialog",...n}),e[2]=n,e[3]=a):a=e[3],a}function tNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(MU,{"data-slot":"dialog-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function $U(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(mj,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function nNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(FA,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=a):a=e[3],a}function EU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1010] bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kj,{"data-slot":"dialog-overlay",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function RU(t){const e=Z.c(12);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(EU,{}),e[4]=c):c=e[4];let l;e[5]!==a?(l=oe("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsxs(FA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[M.jsx(a1,{}),M.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==l?(p=M.jsxs($U,{"data-slot":"dialog-portal",children:[c,M.jsxs(vj,{"data-slot":"dialog-content",className:l,...i,children:[n,h]})]}),e[8]=n,e[9]=i,e[10]=l,e[11]=p):p=e[11],p}function TU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 text-center sm:text-left",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"dialog-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"dialog-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function jU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-lg leading-none font-semibold",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(xU,{"data-slot":"dialog-title",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function DU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(bU,{"data-slot":"dialog-description",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function OU(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1,{"data-slot":"command",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function oNe(t){const e=Z.c(18);let n,a,i,c;e[0]!==t?({title:i,description:c,children:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"Command Palette":i,h=c===void 0?"Search for a command to run...":c;let p;e[5]!==l?(p=M.jsx(jU,{children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==h?(f=M.jsx(DU,{children:h}),e[7]=h,e[8]=f):f=e[8];let k;e[9]!==p||e[10]!==f?(k=M.jsxs(TU,{className:"sr-only",children:[p,f]}),e[9]=p,e[10]=f,e[11]=k):k=e[11];let m;e[12]!==n?(m=M.jsx(RU,{className:"overflow-hidden p-0",children:M.jsx(OU,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})}),e[12]=n,e[13]=m):m=e[13];let x;return e[14]!==a||e[15]!==k||e[16]!==m?(x=M.jsxs(IU,{...a,children:[k,m]}),e[14]=a,e[15]=k,e[16]=m,e[17]=x):x=e[17],x}function rNe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=M.jsx(zd,{className:"size-4 shrink-0 opacity-50"}),e[3]=i):i=e[3];let c;e[4]!==n?(c=oe("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==c?(l=M.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[i,M.jsx(p1.Input,{"data-slot":"command-input",className:c,...a})]}),e[6]=a,e[7]=c,e[8]=l):l=e[8],l}function iNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.List,{"data-slot":"command-list",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function cNe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(p1.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...n}),e[2]=n,e[3]=a):a=e[3],a}function sNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Group,{"data-slot":"command-group",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Separator,{"data-slot":"command-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(p1.Item,{"data-slot":"command-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function uNe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"command-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function mA(t){const e=hNe(t),n=v.forwardRef((a,i)=>{const{children:c,...l}=a,h=v.Children.toArray(c),p=h.find(fNe);if(p){const f=p.props.children,k=h.map(m=>m===p?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:m);return M.jsx(e,{...l,ref:i,children:v.isValidElement(f)?v.cloneElement(f,void 0,k):null})}return M.jsx(e,{...l,ref:i,children:c})});return n.displayName=`${t}.Slot`,n}function hNe(t){const e=v.forwardRef((n,a)=>{const{children:i,...c}=n;if(v.isValidElement(i)){const l=mNe(i),h=yNe(c,i.props);return i.type!==v.Fragment&&(h.ref=a?ra(a,l):l),v.cloneElement(i,h)}return v.Children.count(i)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var pNe=Symbol("radix.slottable");function fNe(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===pNe}function yNe(t,e){const n={...e};for(const a in e){const i=t[a],c=e[a];/^on[A-Z]/.test(a)?i&&c?n[a]=(...h)=>{const p=c(...h);return i(...h),p}:i&&(n[a]=i):a==="style"?n[a]={...i,...c}:a==="className"&&(n[a]=[i,c].filter(Boolean).join(" "))}return{...t,...n}}function mNe(t){var a,i;let e=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var kNe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pn=kNe.reduce((t,e)=>{const n=mA(`Primitive.${e}`),a=v.forwardRef((i,c)=>{const{asChild:l,...h}=i,p=l?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(p,{...h,ref:c})});return a.displayName=`Primitive.${e}`,{...t,[e]:a}},{});function qU(t,e){t&&gl.flushSync(()=>t.dispatchEvent(e))}function PU(t){const e=t+"CollectionProvider",[n,a]=Ot(e),[i,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:_,children:C}=S,N=me.useRef(null),A=me.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:A,collectionRef:N,children:C})};l.displayName=e;const h=t+"CollectionSlot",p=mA(h),f=me.forwardRef((S,_)=>{const{scope:C,children:N}=S,A=c(h,C),$=Ae(_,A.collectionRef);return M.jsx(p,{ref:$,children:N})});f.displayName=h;const k=t+"CollectionItemSlot",m="data-radix-collection-item",x=mA(k),b=me.forwardRef((S,_)=>{const{scope:C,children:N,...A}=S,$=me.useRef(null),E=Ae(_,$),P=c(k,C);return me.useEffect(()=>(P.itemMap.set($,{ref:$,...A}),()=>void P.itemMap.delete($))),M.jsx(x,{[m]:"",ref:E,children:N})});b.displayName=k;function w(S){const _=c(t+"CollectionConsumer",S);return me.useCallback(()=>{const N=_.collectionRef.current;if(!N)return[];const A=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,D)=>A.indexOf(P.ref.current)-A.indexOf(D.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:f,ItemSlot:b},w,a]}var vNe=v.createContext(void 0);function f1(t){const e=v.useContext(vNe);return t||e||"ltr"}var gNe="DismissableLayer",kT="dismissableLayer.update",MNe="dismissableLayer.pointerDownOutside",xNe="dismissableLayer.focusOutside",YH,zU=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),HU=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:l,onDismiss:h,...p}=t,f=v.useContext(zU),[k,m]=v.useState(null),x=(k==null?void 0:k.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=v.useState({}),w=Ae(e,D=>m(D)),S=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=S.indexOf(_),N=k?S.indexOf(k):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,$=N>=C,E=_Ne(D=>{const H=D.target,ie=[...f.branches].some(re=>re.contains(H));!$||ie||(i==null||i(D),l==null||l(D),D.defaultPrevented||h==null||h())},x),P=SNe(D=>{const H=D.target;[...f.branches].some(re=>re.contains(H))||(c==null||c(D),l==null||l(D),D.defaultPrevented||h==null||h())},x);return GF(D=>{N===f.layers.size-1&&(a==null||a(D),!D.defaultPrevented&&h&&(D.preventDefault(),h()))},x),v.useEffect(()=>{if(k)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(YH=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(k)),f.layers.add(k),XH(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=YH)}},[k,x,n,f]),v.useEffect(()=>()=>{k&&(f.layers.delete(k),f.layersWithOutsidePointerEventsDisabled.delete(k),XH())},[k,f]),v.useEffect(()=>{const D=()=>b({});return document.addEventListener(kT,D),()=>document.removeEventListener(kT,D)},[]),M.jsx(pn.div,{...p,ref:w,style:{pointerEvents:A?$?"auto":"none":void 0,...t.style},onFocusCapture:ue(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ue(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ue(t.onPointerDownCapture,E.onPointerDownCapture)})});HU.displayName=gNe;var bNe="DismissableLayerBranch",wNe=v.forwardRef((t,e)=>{const n=v.useContext(zU),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),M.jsx(pn.div,{...t,ref:i})});wNe.displayName=bNe;function _Ne(t,e=globalThis==null?void 0:globalThis.document){const n=It(t),a=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const c=h=>{if(h.target&&!a.current){let p=function(){BU(MNe,n,f,{discrete:!0})};const f={originalEvent:h};h.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=p,e.addEventListener("click",i.current,{once:!0})):p()}else e.removeEventListener("click",i.current);a.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",c),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>a.current=!0}}function SNe(t,e=globalThis==null?void 0:globalThis.document){const n=It(t),a=v.useRef(!1);return v.useEffect(()=>{const i=c=>{c.target&&!a.current&&BU(xNe,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function XH(){const t=new CustomEvent(kT);document.dispatchEvent(t)}function BU(t,e,n,{discrete:a}){const i=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),a?qU(i,c):i.dispatchEvent(c)}var HR="focusScope.autoFocusOnMount",BR="focusScope.autoFocusOnUnmount",KH={bubbles:!1,cancelable:!0},CNe="FocusScope",VU=v.forwardRef((t,e)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...l}=t,[h,p]=v.useState(null),f=It(i),k=It(c),m=v.useRef(null),x=Ae(e,S=>p(S)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let S=function(A){if(b.paused||!h)return;const $=A.target;h.contains($)?m.current=$:jo(m.current,{select:!0})},_=function(A){if(b.paused||!h)return;const $=A.relatedTarget;$!==null&&(h.contains($)||jo(m.current,{select:!0}))},C=function(A){if(document.activeElement===document.body)for(const E of A)E.removedNodes.length>0&&jo(h)};document.addEventListener("focusin",S),document.addEventListener("focusout",_);const N=new MutationObserver(C);return h&&N.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",_),N.disconnect()}}},[a,h,b.paused]),v.useEffect(()=>{if(h){JH.add(b);const S=document.activeElement;if(!h.contains(S)){const C=new CustomEvent(HR,KH);h.addEventListener(HR,f),h.dispatchEvent(C),C.defaultPrevented||(LNe(ENe(FU(h)),{select:!0}),document.activeElement===S&&jo(h))}return()=>{h.removeEventListener(HR,f),setTimeout(()=>{const C=new CustomEvent(BR,KH);h.addEventListener(BR,k),h.dispatchEvent(C),C.defaultPrevented||jo(S??document.body,{select:!0}),h.removeEventListener(BR,k),JH.remove(b)},0)}}},[h,f,k,b]);const w=v.useCallback(S=>{if(!n&&!a||b.paused)return;const _=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,C=document.activeElement;if(_&&C){const N=S.currentTarget,[A,$]=NNe(N);A&&$?!S.shiftKey&&C===$?(S.preventDefault(),n&&jo(A,{select:!0})):S.shiftKey&&C===A&&(S.preventDefault(),n&&jo($,{select:!0})):C===N&&S.preventDefault()}},[n,a,b.paused]);return M.jsx(pn.div,{tabIndex:-1,...l,ref:x,onKeyDown:w})});VU.displayName=CNe;function LNe(t,{select:e=!1}={}){const n=document.activeElement;for(const a of t)if(jo(a,{select:e}),document.activeElement!==n)return}function NNe(t){const e=FU(t),n=QH(e,t),a=QH(e.reverse(),t);return[n,a]}function FU(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const i=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||i?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function QH(t,e){for(const n of t)if(!ANe(n,{upTo:e}))return n}function ANe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function INe(t){return t instanceof HTMLInputElement&&"select"in t}function jo(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&INe(t)&&e&&t.select()}}var JH=$Ne();function $Ne(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=eB(t,e),t.unshift(e)},remove(e){var n;t=eB(t,e),(n=t[0])==null||n.resume()}}}function eB(t,e){const n=[...t],a=n.indexOf(e);return a!==-1&&n.splice(a,1),n}function ENe(t){return t.filter(e=>e.tagName!=="A")}const RNe=["top","right","bottom","left"],Bo=Math.min,jn=Math.max,kA=Math.round,B2=Math.floor,Aa=t=>({x:t,y:t}),TNe={left:"right",right:"left",bottom:"top",top:"bottom"},jNe={start:"end",end:"start"};function vT(t,e,n){return jn(t,Bo(e,n))}function ao(t,e){return typeof t=="function"?t(e):t}function oo(t){return t.split("-")[0]}function _l(t){return t.split("-")[1]}function Mj(t){return t==="x"?"y":"x"}function xj(t){return t==="y"?"height":"width"}function Vo(t){return["top","bottom"].includes(oo(t))?"y":"x"}function bj(t){return Mj(Vo(t))}function DNe(t,e,n){n===void 0&&(n=!1);const a=_l(t),i=bj(t),c=xj(i);let l=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return e.reference[c]>e.floating[c]&&(l=vA(l)),[l,vA(l)]}function ONe(t){const e=vA(t);return[gT(t),e,gT(e)]}function gT(t){return t.replace(/start|end/g,e=>jNe[e])}function qNe(t,e,n){const a=["left","right"],i=["right","left"],c=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:a:e?a:i;case"left":case"right":return e?c:l;default:return[]}}function PNe(t,e,n,a){const i=_l(t);let c=qNe(oo(t),n==="start",a);return i&&(c=c.map(l=>l+"-"+i),e&&(c=c.concat(c.map(gT)))),c}function vA(t){return t.replace(/left|right|bottom|top/g,e=>TNe[e])}function zNe(t){return{top:0,right:0,bottom:0,left:0,...t}}function UU(t){return typeof t!="number"?zNe(t):{top:t,right:t,bottom:t,left:t}}function gA(t){const{x:e,y:n,width:a,height:i}=t;return{width:a,height:i,top:n,left:e,right:e+a,bottom:n+i,x:e,y:n}}function tB(t,e,n){let{reference:a,floating:i}=t;const c=Vo(e),l=bj(e),h=xj(l),p=oo(e),f=c==="y",k=a.x+a.width/2-i.width/2,m=a.y+a.height/2-i.height/2,x=a[h]/2-i[h]/2;let b;switch(p){case"top":b={x:k,y:a.y-i.height};break;case"bottom":b={x:k,y:a.y+a.height};break;case"right":b={x:a.x+a.width,y:m};break;case"left":b={x:a.x-i.width,y:m};break;default:b={x:a.x,y:a.y}}switch(_l(e)){case"start":b[l]-=x*(n&&f?-1:1);break;case"end":b[l]+=x*(n&&f?-1:1);break}return b}const HNe=async(t,e,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,h=c.filter(Boolean),p=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:k,y:m}=tB(f,a,p),x=a,b={},w=0;for(let S=0;S<h.length;S++){const{name:_,fn:C}=h[S],{x:N,y:A,data:$,reset:E}=await C({x:k,y:m,initialPlacement:a,placement:x,strategy:i,middlewareData:b,rects:f,platform:l,elements:{reference:t,floating:e}});k=N??k,m=A??m,b={...b,[_]:{...b[_],...$}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(x=E.placement),E.rects&&(f=E.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):E.rects),{x:k,y:m}=tB(f,x,p)),S=-1)}return{x:k,y:m,placement:x,strategy:i,middlewareData:b}};async function Vd(t,e){var n;e===void 0&&(e={});const{x:a,y:i,platform:c,rects:l,elements:h,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:k="viewport",elementContext:m="floating",altBoundary:x=!1,padding:b=0}=ao(e,t),w=UU(b),_=h[x?m==="floating"?"reference":"floating":m],C=gA(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(_)))==null||n?_:_.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:f,rootBoundary:k,strategy:p})),N=m==="floating"?{x:a,y:i,width:l.floating.width,height:l.floating.height}:l.reference,A=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),$=await(c.isElement==null?void 0:c.isElement(A))?await(c.getScale==null?void 0:c.getScale(A))||{x:1,y:1}:{x:1,y:1},E=gA(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:N,offsetParent:A,strategy:p}):N);return{top:(C.top-E.top+w.top)/$.y,bottom:(E.bottom-C.bottom+w.bottom)/$.y,left:(C.left-E.left+w.left)/$.x,right:(E.right-C.right+w.right)/$.x}}const BNe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:a,placement:i,rects:c,platform:l,elements:h,middlewareData:p}=e,{element:f,padding:k=0}=ao(t,e)||{};if(f==null)return{};const m=UU(k),x={x:n,y:a},b=bj(i),w=xj(b),S=await l.getDimensions(f),_=b==="y",C=_?"top":"left",N=_?"bottom":"right",A=_?"clientHeight":"clientWidth",$=c.reference[w]+c.reference[b]-x[b]-c.floating[w],E=x[b]-c.reference[b],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let D=P?P[A]:0;(!D||!await(l.isElement==null?void 0:l.isElement(P)))&&(D=h.floating[A]||c.floating[w]);const H=$/2-E/2,ie=D/2-S[w]/2-1,re=Bo(m[C],ie),le=Bo(m[N],ie),Q=re,fe=D-S[w]-le,ke=D/2-S[w]/2+H,ye=vT(Q,ke,fe),j=!p.arrow&&_l(i)!=null&&ke!==ye&&c.reference[w]/2-(ke<Q?re:le)-S[w]/2<0,B=j?ke<Q?ke-Q:ke-fe:0;return{[b]:x[b]+B,data:{[b]:ye,centerOffset:ke-ye-B,...j&&{alignmentOffset:B}},reset:j}}}),VNe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,a;const{placement:i,middlewareData:c,rects:l,initialPlacement:h,platform:p,elements:f}=e,{mainAxis:k=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,..._}=ao(t,e);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const C=oo(i),N=Vo(h),A=oo(h)===h,$=await(p.isRTL==null?void 0:p.isRTL(f.floating)),E=x||(A||!S?[vA(h)]:ONe(h)),P=w!=="none";!x&&P&&E.push(...PNe(h,S,w,$));const D=[h,...E],H=await Vd(e,_),ie=[];let re=((a=c.flip)==null?void 0:a.overflows)||[];if(k&&ie.push(H[C]),m){const ke=DNe(i,l,$);ie.push(H[ke[0]],H[ke[1]])}if(re=[...re,{placement:i,overflows:ie}],!ie.every(ke=>ke<=0)){var le,Q;const ke=(((le=c.flip)==null?void 0:le.index)||0)+1,ye=D[ke];if(ye)return{data:{index:ke,overflows:re},reset:{placement:ye}};let j=(Q=re.filter(B=>B.overflows[0]<=0).sort((B,R)=>B.overflows[1]-R.overflows[1])[0])==null?void 0:Q.placement;if(!j)switch(b){case"bestFit":{var fe;const B=(fe=re.filter(R=>{if(P){const U=Vo(R.placement);return U===N||U==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(U=>U>0).reduce((U,T)=>U+T,0)]).sort((R,U)=>R[1]-U[1])[0])==null?void 0:fe[0];B&&(j=B);break}case"initialPlacement":j=h;break}if(i!==j)return{reset:{placement:j}}}return{}}}};function nB(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function aB(t){return RNe.some(e=>t[e]>=0)}const FNe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:a="referenceHidden",...i}=ao(t,e);switch(a){case"referenceHidden":{const c=await Vd(e,{...i,elementContext:"reference"}),l=nB(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:aB(l)}}}case"escaped":{const c=await Vd(e,{...i,altBoundary:!0}),l=nB(c,n.floating);return{data:{escapedOffsets:l,escaped:aB(l)}}}default:return{}}}}};async function UNe(t,e){const{placement:n,platform:a,elements:i}=t,c=await(a.isRTL==null?void 0:a.isRTL(i.floating)),l=oo(n),h=_l(n),p=Vo(n)==="y",f=["left","top"].includes(l)?-1:1,k=c&&p?-1:1,m=ao(e,t);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return h&&typeof w=="number"&&(b=h==="end"?w*-1:w),p?{x:b*k,y:x*f}:{x:x*f,y:b*k}}const GNe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,a;const{x:i,y:c,placement:l,middlewareData:h}=e,p=await UNe(e,t);return l===((n=h.offset)==null?void 0:n.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:i+p.x,y:c+p.y,data:{...p,placement:l}}}}},ZNe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:a,placement:i}=e,{mainAxis:c=!0,crossAxis:l=!1,limiter:h={fn:_=>{let{x:C,y:N}=_;return{x:C,y:N}}},...p}=ao(t,e),f={x:n,y:a},k=await Vd(e,p),m=Vo(oo(i)),x=Mj(m);let b=f[x],w=f[m];if(c){const _=x==="y"?"top":"left",C=x==="y"?"bottom":"right",N=b+k[_],A=b-k[C];b=vT(N,b,A)}if(l){const _=m==="y"?"top":"left",C=m==="y"?"bottom":"right",N=w+k[_],A=w-k[C];w=vT(N,w,A)}const S=h.fn({...e,[x]:b,[m]:w});return{...S,data:{x:S.x-n,y:S.y-a,enabled:{[x]:c,[m]:l}}}}}},WNe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:a,placement:i,rects:c,middlewareData:l}=e,{offset:h=0,mainAxis:p=!0,crossAxis:f=!0}=ao(t,e),k={x:n,y:a},m=Vo(i),x=Mj(m);let b=k[x],w=k[m];const S=ao(h,e),_=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(p){const A=x==="y"?"height":"width",$=c.reference[x]-c.floating[A]+_.mainAxis,E=c.reference[x]+c.reference[A]-_.mainAxis;b<$?b=$:b>E&&(b=E)}if(f){var C,N;const A=x==="y"?"width":"height",$=["top","left"].includes(oo(i)),E=c.reference[m]-c.floating[A]+($&&((C=l.offset)==null?void 0:C[m])||0)+($?0:_.crossAxis),P=c.reference[m]+c.reference[A]+($?0:((N=l.offset)==null?void 0:N[m])||0)-($?_.crossAxis:0);w<E?w=E:w>P&&(w=P)}return{[x]:b,[m]:w}}}},YNe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,a;const{placement:i,rects:c,platform:l,elements:h}=e,{apply:p=()=>{},...f}=ao(t,e),k=await Vd(e,f),m=oo(i),x=_l(i),b=Vo(i)==="y",{width:w,height:S}=c.floating;let _,C;m==="top"||m==="bottom"?(_=m,C=x===(await(l.isRTL==null?void 0:l.isRTL(h.floating))?"start":"end")?"left":"right"):(C=m,_=x==="end"?"top":"bottom");const N=S-k.top-k.bottom,A=w-k.left-k.right,$=Bo(S-k[_],N),E=Bo(w-k[C],A),P=!e.middlewareData.shift;let D=$,H=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(H=A),(a=e.middlewareData.shift)!=null&&a.enabled.y&&(D=N),P&&!x){const re=jn(k.left,0),le=jn(k.right,0),Q=jn(k.top,0),fe=jn(k.bottom,0);b?H=w-2*(re!==0||le!==0?re+le:jn(k.left,k.right)):D=S-2*(Q!==0||fe!==0?Q+fe:jn(k.top,k.bottom))}await p({...e,availableWidth:H,availableHeight:D});const ie=await l.getDimensions(h.floating);return w!==ie.width||S!==ie.height?{reset:{rects:!0}}:{}}}};function GA(){return typeof window<"u"}function Sl(t){return GU(t)?(t.nodeName||"").toLowerCase():"#document"}function Dn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ea(t){var e;return(e=(GU(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function GU(t){return GA()?t instanceof Node||t instanceof Dn(t).Node:!1}function sa(t){return GA()?t instanceof Element||t instanceof Dn(t).Element:!1}function $a(t){return GA()?t instanceof HTMLElement||t instanceof Dn(t).HTMLElement:!1}function oB(t){return!GA()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dn(t).ShadowRoot}function su(t){const{overflow:e,overflowX:n,overflowY:a,display:i}=la(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&!["inline","contents"].includes(i)}function XNe(t){return["table","td","th"].includes(Sl(t))}function ZA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function wj(t){const e=_j(),n=sa(t)?la(t):t;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function KNe(t){let e=Fo(t);for(;$a(e)&&!pl(e);){if(wj(e))return e;if(ZA(e))return null;e=Fo(e)}return null}function _j(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pl(t){return["html","body","#document"].includes(Sl(t))}function la(t){return Dn(t).getComputedStyle(t)}function WA(t){return sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fo(t){if(Sl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||oB(t)&&t.host||Ea(t);return oB(e)?e.host:e}function ZU(t){const e=Fo(t);return pl(e)?t.ownerDocument?t.ownerDocument.body:t.body:$a(e)&&su(e)?e:ZU(e)}function Fd(t,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ZU(t),c=i===((a=t.ownerDocument)==null?void 0:a.body),l=Dn(i);if(c){const h=MT(l);return e.concat(l,l.visualViewport||[],su(i)?i:[],h&&n?Fd(h):[])}return e.concat(i,Fd(i,[],n))}function MT(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function WU(t){const e=la(t);let n=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const i=$a(t),c=i?t.offsetWidth:n,l=i?t.offsetHeight:a,h=kA(n)!==c||kA(a)!==l;return h&&(n=c,a=l),{width:n,height:a,$:h}}function Sj(t){return sa(t)?t:t.contextElement}function dl(t){const e=Sj(t);if(!$a(e))return Aa(1);const n=e.getBoundingClientRect(),{width:a,height:i,$:c}=WU(e);let l=(c?kA(n.width):n.width)/a,h=(c?kA(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!h||!Number.isFinite(h))&&(h=1),{x:l,y:h}}const QNe=Aa(0);function YU(t){const e=Dn(t);return!_j()||!e.visualViewport?QNe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function JNe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dn(t)?!1:e}function s1(t,e,n,a){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),c=Sj(t);let l=Aa(1);e&&(a?sa(a)&&(l=dl(a)):l=dl(t));const h=JNe(c,n,a)?YU(c):Aa(0);let p=(i.left+h.x)/l.x,f=(i.top+h.y)/l.y,k=i.width/l.x,m=i.height/l.y;if(c){const x=Dn(c),b=a&&sa(a)?Dn(a):a;let w=x,S=MT(w);for(;S&&a&&b!==w;){const _=dl(S),C=S.getBoundingClientRect(),N=la(S),A=C.left+(S.clientLeft+parseFloat(N.paddingLeft))*_.x,$=C.top+(S.clientTop+parseFloat(N.paddingTop))*_.y;p*=_.x,f*=_.y,k*=_.x,m*=_.y,p+=A,f+=$,w=Dn(S),S=MT(w)}}return gA({width:k,height:m,x:p,y:f})}function Cj(t,e){const n=WA(t).scrollLeft;return e?e.left+n:s1(Ea(t)).left+n}function XU(t,e,n){n===void 0&&(n=!1);const a=t.getBoundingClientRect(),i=a.left+e.scrollLeft-(n?0:Cj(t,a)),c=a.top+e.scrollTop;return{x:i,y:c}}function eAe(t){let{elements:e,rect:n,offsetParent:a,strategy:i}=t;const c=i==="fixed",l=Ea(a),h=e?ZA(e.floating):!1;if(a===l||h&&c)return n;let p={scrollLeft:0,scrollTop:0},f=Aa(1);const k=Aa(0),m=$a(a);if((m||!m&&!c)&&((Sl(a)!=="body"||su(l))&&(p=WA(a)),$a(a))){const b=s1(a);f=dl(a),k.x=b.x+a.clientLeft,k.y=b.y+a.clientTop}const x=l&&!m&&!c?XU(l,p,!0):Aa(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-p.scrollLeft*f.x+k.x+x.x,y:n.y*f.y-p.scrollTop*f.y+k.y+x.y}}function tAe(t){return Array.from(t.getClientRects())}function nAe(t){const e=Ea(t),n=WA(t),a=t.ownerDocument.body,i=jn(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),c=jn(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let l=-n.scrollLeft+Cj(t);const h=-n.scrollTop;return la(a).direction==="rtl"&&(l+=jn(e.clientWidth,a.clientWidth)-i),{width:i,height:c,x:l,y:h}}function aAe(t,e){const n=Dn(t),a=Ea(t),i=n.visualViewport;let c=a.clientWidth,l=a.clientHeight,h=0,p=0;if(i){c=i.width,l=i.height;const f=_j();(!f||f&&e==="fixed")&&(h=i.offsetLeft,p=i.offsetTop)}return{width:c,height:l,x:h,y:p}}function oAe(t,e){const n=s1(t,!0,e==="fixed"),a=n.top+t.clientTop,i=n.left+t.clientLeft,c=$a(t)?dl(t):Aa(1),l=t.clientWidth*c.x,h=t.clientHeight*c.y,p=i*c.x,f=a*c.y;return{width:l,height:h,x:p,y:f}}function rB(t,e,n){let a;if(e==="viewport")a=aAe(t,n);else if(e==="document")a=nAe(Ea(t));else if(sa(e))a=oAe(e,n);else{const i=YU(t);a={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return gA(a)}function KU(t,e){const n=Fo(t);return n===e||!sa(n)||pl(n)?!1:la(n).position==="fixed"||KU(n,e)}function rAe(t,e){const n=e.get(t);if(n)return n;let a=Fd(t,[],!1).filter(h=>sa(h)&&Sl(h)!=="body"),i=null;const c=la(t).position==="fixed";let l=c?Fo(t):t;for(;sa(l)&&!pl(l);){const h=la(l),p=wj(l);!p&&h.position==="fixed"&&(i=null),(c?!p&&!i:!p&&h.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||su(l)&&!p&&KU(t,l))?a=a.filter(k=>k!==l):i=h,l=Fo(l)}return e.set(t,a),a}function iAe(t){let{element:e,boundary:n,rootBoundary:a,strategy:i}=t;const l=[...n==="clippingAncestors"?ZA(e)?[]:rAe(e,this._c):[].concat(n),a],h=l[0],p=l.reduce((f,k)=>{const m=rB(e,k,i);return f.top=jn(m.top,f.top),f.right=Bo(m.right,f.right),f.bottom=Bo(m.bottom,f.bottom),f.left=jn(m.left,f.left),f},rB(e,h,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function cAe(t){const{width:e,height:n}=WU(t);return{width:e,height:n}}function sAe(t,e,n){const a=$a(e),i=Ea(e),c=n==="fixed",l=s1(t,!0,c,e);let h={scrollLeft:0,scrollTop:0};const p=Aa(0);if(a||!a&&!c)if((Sl(e)!=="body"||su(i))&&(h=WA(e)),a){const x=s1(e,!0,c,e);p.x=x.x+e.clientLeft,p.y=x.y+e.clientTop}else i&&(p.x=Cj(i));const f=i&&!a&&!c?XU(i,h):Aa(0),k=l.left+h.scrollLeft-p.x-f.x,m=l.top+h.scrollTop-p.y-f.y;return{x:k,y:m,width:l.width,height:l.height}}function VR(t){return la(t).position==="static"}function iB(t,e){if(!$a(t)||la(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ea(t)===n&&(n=n.ownerDocument.body),n}function QU(t,e){const n=Dn(t);if(ZA(t))return n;if(!$a(t)){let i=Fo(t);for(;i&&!pl(i);){if(sa(i)&&!VR(i))return i;i=Fo(i)}return n}let a=iB(t,e);for(;a&&XNe(a)&&VR(a);)a=iB(a,e);return a&&pl(a)&&VR(a)&&!wj(a)?n:a||KNe(t)||n}const lAe=async function(t){const e=this.getOffsetParent||QU,n=this.getDimensions,a=await n(t.floating);return{reference:sAe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function dAe(t){return la(t).direction==="rtl"}const uAe={convertOffsetParentRelativeRectToViewportRelativeRect:eAe,getDocumentElement:Ea,getClippingRect:iAe,getOffsetParent:QU,getElementRects:lAe,getClientRects:tAe,getDimensions:cAe,getScale:dl,isElement:sa,isRTL:dAe};function JU(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function hAe(t,e){let n=null,a;const i=Ea(t);function c(){var h;clearTimeout(a),(h=n)==null||h.disconnect(),n=null}function l(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),c();const f=t.getBoundingClientRect(),{left:k,top:m,width:x,height:b}=f;if(h||e(),!x||!b)return;const w=B2(m),S=B2(i.clientWidth-(k+x)),_=B2(i.clientHeight-(m+b)),C=B2(k),A={rootMargin:-w+"px "+-S+"px "+-_+"px "+-C+"px",threshold:jn(0,Bo(1,p))||1};let $=!0;function E(P){const D=P[0].intersectionRatio;if(D!==p){if(!$)return l();D?l(!1,D):a=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!JU(f,t.getBoundingClientRect())&&l(),$=!1}try{n=new IntersectionObserver(E,{...A,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,A)}n.observe(t)}return l(!0),c}function eG(t,e,n,a){a===void 0&&(a={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=a,f=Sj(t),k=i||c?[...f?Fd(f):[],...Fd(e)]:[];k.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const m=f&&h?hAe(f,n):null;let x=-1,b=null;l&&(b=new ResizeObserver(C=>{let[N]=C;N&&N.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(e)})),n()}),f&&!p&&b.observe(f),b.observe(e));let w,S=p?s1(t):null;p&&_();function _(){const C=s1(t);S&&!JU(S,C)&&n(),S=C,w=requestAnimationFrame(_)}return n(),()=>{var C;k.forEach(N=>{i&&N.removeEventListener("scroll",n),c&&N.removeEventListener("resize",n)}),m==null||m(),(C=b)==null||C.disconnect(),b=null,p&&cancelAnimationFrame(w)}}const pAe=GNe,fAe=ZNe,yAe=VNe,mAe=YNe,kAe=FNe,cB=BNe,vAe=WNe,gAe=(t,e,n)=>{const a=new Map,i={platform:uAe,...n},c={...i.platform,_c:a};return HNe(t,e,{...i,platform:c})};var iA=typeof document<"u"?v.useLayoutEffect:v.useEffect;function MA(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,a,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(a=n;a--!==0;)if(!MA(t[a],e[a]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(e,i[a]))return!1;for(a=n;a--!==0;){const c=i[a];if(!(c==="_owner"&&t.$$typeof)&&!MA(t[c],e[c]))return!1}return!0}return t!==t&&e!==e}function tG(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function sB(t,e){const n=tG(t);return Math.round(e*n)/n}function FR(t){const e=v.useRef(t);return iA(()=>{e.current=t}),e}function nG(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:a=[],platform:i,elements:{reference:c,floating:l}={},transform:h=!0,whileElementsMounted:p,open:f}=t,[k,m]=v.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=v.useState(a);MA(x,a)||b(a);const[w,S]=v.useState(null),[_,C]=v.useState(null),N=v.useCallback(R=>{R!==P.current&&(P.current=R,S(R))},[]),A=v.useCallback(R=>{R!==D.current&&(D.current=R,C(R))},[]),$=c||w,E=l||_,P=v.useRef(null),D=v.useRef(null),H=v.useRef(k),ie=p!=null,re=FR(p),le=FR(i),Q=FR(f),fe=v.useCallback(()=>{if(!P.current||!D.current)return;const R={placement:e,strategy:n,middleware:x};le.current&&(R.platform=le.current),gAe(P.current,D.current,R).then(U=>{const T={...U,isPositioned:Q.current!==!1};ke.current&&!MA(H.current,T)&&(H.current=T,gl.flushSync(()=>{m(T)}))})},[x,e,n,le,Q]);iA(()=>{f===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,m(R=>({...R,isPositioned:!1})))},[f]);const ke=v.useRef(!1);iA(()=>(ke.current=!0,()=>{ke.current=!1}),[]),iA(()=>{if($&&(P.current=$),E&&(D.current=E),$&&E){if(re.current)return re.current($,E,fe);fe()}},[$,E,fe,re,ie]);const ye=v.useMemo(()=>({reference:P,floating:D,setReference:N,setFloating:A}),[N,A]),j=v.useMemo(()=>({reference:$,floating:E}),[$,E]),B=v.useMemo(()=>{const R={position:n,left:0,top:0};if(!j.floating)return R;const U=sB(j.floating,k.x),T=sB(j.floating,k.y);return h?{...R,transform:"translate("+U+"px, "+T+"px)",...tG(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:T}},[n,h,j.floating,k.x,k.y]);return v.useMemo(()=>({...k,update:fe,refs:ye,elements:j,floatingStyles:B}),[k,fe,ye,j,B])}const MAe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:a,padding:i}=typeof t=="function"?t(n):t;return a&&e(a)?a.current!=null?cB({element:a.current,padding:i}).fn(n):{}:a?cB({element:a,padding:i}).fn(n):{}}}},aG=(t,e)=>({...pAe(t),options:[t,e]}),oG=(t,e)=>({...fAe(t),options:[t,e]}),rG=(t,e)=>({...vAe(t),options:[t,e]}),iG=(t,e)=>({...yAe(t),options:[t,e]}),cG=(t,e)=>({...mAe(t),options:[t,e]}),sG=(t,e)=>({...kAe(t),options:[t,e]}),lG=(t,e)=>({...MAe(t),options:[t,e]});var xAe="Arrow",dG=v.forwardRef((t,e)=>{const{children:n,width:a=10,height:i=5,...c}=t;return M.jsx(pn.svg,{...c,ref:e,width:a,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});dG.displayName=xAe;var bAe=dG,Lj="Popper",[uG,hG]=Ot(Lj),[wAe,pG]=uG(Lj),fG=t=>{const{__scopePopper:e,children:n}=t,[a,i]=v.useState(null);return M.jsx(wAe,{scope:e,anchor:a,onAnchorChange:i,children:n})};fG.displayName=Lj;var yG="PopperAnchor",mG=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:a,...i}=t,c=pG(yG,n),l=v.useRef(null),h=Ae(e,l);return v.useEffect(()=>{c.onAnchorChange((a==null?void 0:a.current)||l.current)}),a?null:M.jsx(pn.div,{...i,ref:h})});mG.displayName=yG;var Nj="PopperContent",[_Ae,SAe]=uG(Nj),kG=v.forwardRef((t,e)=>{var ee,ge,ve,Me,be,xe;const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:f=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...S}=t,_=pG(Nj,n),[C,N]=v.useState(null),A=Ae(e,Te=>N(Te)),[$,E]=v.useState(null),P=au($),D=(P==null?void 0:P.width)??0,H=(P==null?void 0:P.height)??0,ie=a+(c!=="center"?"-"+c:""),re=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},le=Array.isArray(f)?f:[f],Q=le.length>0,fe={padding:re,boundary:le.filter(LAe),altBoundary:Q},{refs:ke,floatingStyles:ye,placement:j,isPositioned:B,middlewareData:R}=nG({strategy:"fixed",placement:ie,whileElementsMounted:(...Te)=>eG(...Te,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[aG({mainAxis:i+H,alignmentAxis:l}),p&&oG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rG():void 0,...fe}),p&&iG({...fe}),cG({...fe,apply:({elements:Te,rects:Be,availableWidth:ft,availableHeight:nt})=>{const{width:Pe,height:$t}=Be.reference,at=Te.floating.style;at.setProperty("--radix-popper-available-width",`${ft}px`),at.setProperty("--radix-popper-available-height",`${nt}px`),at.setProperty("--radix-popper-anchor-width",`${Pe}px`),at.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),$&&lG({element:$,padding:h}),NAe({arrowWidth:D,arrowHeight:H}),x&&sG({strategy:"referenceHidden",...fe})]}),[U,T]=MG(j),z=It(w);bt(()=>{B&&(z==null||z())},[B,z]);const O=(ee=R.arrow)==null?void 0:ee.x,V=(ge=R.arrow)==null?void 0:ge.y,W=((ve=R.arrow)==null?void 0:ve.centerOffset)!==0,[ae,ce]=v.useState();return bt(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),M.jsx("div",{ref:ke.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:B?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Me=R.transformOrigin)==null?void 0:Me.x,(be=R.transformOrigin)==null?void 0:be.y].join(" "),...((xe=R.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:M.jsx(_Ae,{scope:n,placedSide:U,onArrowChange:E,arrowX:O,arrowY:V,shouldHideArrow:W,children:M.jsx(pn.div,{"data-side":U,"data-align":T,...S,ref:A,style:{...S.style,animation:B?void 0:"none"}})})})});kG.displayName=Nj;var vG="PopperArrow",CAe={top:"bottom",right:"left",bottom:"top",left:"right"},gG=v.forwardRef(function(e,n){const{__scopePopper:a,...i}=e,c=SAe(vG,a),l=CAe[c.placedSide];return M.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:M.jsx(bAe,{...i,ref:n,style:{...i.style,display:"block"}})})});gG.displayName=vG;function LAe(t){return t!==null}var NAe=t=>({name:"transformOrigin",options:t,fn(e){var _,C,N;const{placement:n,rects:a,middlewareData:i}=e,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:t.arrowWidth,p=l?0:t.arrowHeight,[f,k]=MG(n),m={start:"0%",center:"50%",end:"100%"}[k],x=(((C=i.arrow)==null?void 0:C.x)??0)+h/2,b=(((N=i.arrow)==null?void 0:N.y)??0)+p/2;let w="",S="";return f==="bottom"?(w=l?m:`${x}px`,S=`${-p}px`):f==="top"?(w=l?m:`${x}px`,S=`${a.floating.height+p}px`):f==="right"?(w=`${-p}px`,S=l?m:`${b}px`):f==="left"&&(w=`${a.floating.width+p}px`,S=l?m:`${b}px`),{data:{x:w,y:S}}}});function MG(t){const[e,n="center"]=t.split("-");return[e,n]}var xG=fG,AAe=mG,IAe=kG,$Ae=gG,EAe="Portal",bG=v.forwardRef((t,e)=>{var h;const{container:n,...a}=t,[i,c]=v.useState(!1);bt(()=>c(!0),[]);const l=n||i&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return l?OA.createPortal(M.jsx(pn.div,{...a,ref:e}),l):null});bG.displayName=EAe;var UR="rovingFocusGroup.onEntryFocus",RAe={bubbles:!1,cancelable:!0},lu="RovingFocusGroup",[xT,wG,TAe]=PU(lu),[jAe,_G]=Ot(lu,[TAe]),[DAe,OAe]=jAe(lu),SG=v.forwardRef((t,e)=>M.jsx(xT.Provider,{scope:t.__scopeRovingFocusGroup,children:M.jsx(xT.Slot,{scope:t.__scopeRovingFocusGroup,children:M.jsx(qAe,{...t,ref:e})})}));SG.displayName=lu;var qAe=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:k=!1,...m}=t,x=v.useRef(null),b=Ae(e,x),w=f1(c),[S,_]=on({prop:l,defaultProp:h??null,onChange:p,caller:lu}),[C,N]=v.useState(!1),A=It(f),$=wG(n),E=v.useRef(!1),[P,D]=v.useState(0);return v.useEffect(()=>{const H=x.current;if(H)return H.addEventListener(UR,A),()=>H.removeEventListener(UR,A)},[A]),M.jsx(DAe,{scope:n,orientation:a,dir:w,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(H=>_(H),[_]),onItemShiftTab:v.useCallback(()=>N(!0),[]),onFocusableItemAdd:v.useCallback(()=>D(H=>H+1),[]),onFocusableItemRemove:v.useCallback(()=>D(H=>H-1),[]),children:M.jsx(pn.div,{tabIndex:C||P===0?-1:0,"data-orientation":a,...m,ref:b,style:{outline:"none",...t.style},onMouseDown:ue(t.onMouseDown,()=>{E.current=!0}),onFocus:ue(t.onFocus,H=>{const ie=!E.current;if(H.target===H.currentTarget&&ie&&!C){const re=new CustomEvent(UR,RAe);if(H.currentTarget.dispatchEvent(re),!re.defaultPrevented){const le=$().filter(j=>j.focusable),Q=le.find(j=>j.active),fe=le.find(j=>j.id===S),ye=[Q,fe,...le].filter(Boolean).map(j=>j.ref.current);NG(ye,k)}}E.current=!1}),onBlur:ue(t.onBlur,()=>N(!1))})})}),CG="RovingFocusGroupItem",LG=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:c,children:l,...h}=t,p=ht(),f=c||p,k=OAe(CG,n),m=k.currentTabStopId===f,x=wG(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:S}=k;return v.useEffect(()=>{if(a)return b(),()=>w()},[a,b,w]),M.jsx(xT.ItemSlot,{scope:n,id:f,focusable:a,active:i,children:M.jsx(pn.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:e,onMouseDown:ue(t.onMouseDown,_=>{a?k.onItemFocus(f):_.preventDefault()}),onFocus:ue(t.onFocus,()=>k.onItemFocus(f)),onKeyDown:ue(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const C=HAe(_,k.orientation,k.dir);if(C!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let A=x().filter($=>$.focusable).map($=>$.ref.current);if(C==="last")A.reverse();else if(C==="prev"||C==="next"){C==="prev"&&A.reverse();const $=A.indexOf(_.currentTarget);A=k.loop?BAe(A,$+1):A.slice($+1)}setTimeout(()=>NG(A))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});LG.displayName=CG;var PAe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zAe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function HAe(t,e,n){const a=zAe(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return PAe[a]}function NG(t,e=!1){const n=document.activeElement;for(const a of t)if(a===n||(a.focus({preventScroll:e}),document.activeElement!==n))return}function BAe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var VAe=SG,FAe=LG,bT=["Enter"," "],UAe=["ArrowDown","PageUp","Home"],AG=["ArrowUp","PageDown","End"],GAe=[...UAe,...AG],ZAe={ltr:[...bT,"ArrowRight"],rtl:[...bT,"ArrowLeft"]},WAe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},du="Menu",[Ud,YAe,XAe]=PU(du),[y1,IG]=Ot(du,[XAe,hG,_G]),uu=hG(),$G=_G(),[EG,Zo]=y1(du),[KAe,hu]=y1(du),RG=t=>{const{__scopeMenu:e,open:n=!1,children:a,dir:i,onOpenChange:c,modal:l=!0}=t,h=uu(e),[p,f]=v.useState(null),k=v.useRef(!1),m=It(c),x=f1(i);return v.useEffect(()=>{const b=()=>{k.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>k.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),M.jsx(xG,{...h,children:M.jsx(EG,{scope:e,open:n,onOpenChange:m,content:p,onContentChange:f,children:M.jsx(KAe,{scope:e,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:a})})})};RG.displayName=du;var QAe="MenuAnchor",Aj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=uu(n);return M.jsx(AAe,{...i,...a,ref:e})});Aj.displayName=QAe;var Ij="MenuPortal",[JAe,TG]=y1(Ij,{forceMount:void 0}),jG=t=>{const{__scopeMenu:e,forceMount:n,children:a,container:i}=t,c=Zo(Ij,e);return M.jsx(JAe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(bG,{asChild:!0,container:i,children:a})})})};jG.displayName=Ij;var Kn="MenuContent",[eIe,$j]=y1(Kn),DG=v.forwardRef((t,e)=>{const n=TG(Kn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Zo(Kn,t.__scopeMenu),l=hu(Kn,t.__scopeMenu);return M.jsx(Ud.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Ud.Slot,{scope:t.__scopeMenu,children:l.modal?M.jsx(tIe,{...i,ref:e}):M.jsx(nIe,{...i,ref:e})})})})}),tIe=v.forwardRef((t,e)=>{const n=Zo(Kn,t.__scopeMenu),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return iu(c)},[]),M.jsx(Ej,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),nIe=v.forwardRef((t,e)=>{const n=Zo(Kn,t.__scopeMenu);return M.jsx(Ej,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aIe=mA("MenuContent.ScrollLock"),Ej=v.forwardRef((t,e)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,disableOutsideScroll:w,...S}=t,_=Zo(Kn,n),C=hu(Kn,n),N=uu(n),A=$G(n),$=YAe(n),[E,P]=v.useState(null),D=v.useRef(null),H=Ae(e,D,_.onContentChange),ie=v.useRef(0),re=v.useRef(""),le=v.useRef(0),Q=v.useRef(null),fe=v.useRef("right"),ke=v.useRef(0),ye=w?wl:v.Fragment,j=w?{as:aIe,allowPinchZoom:!0}:void 0,B=U=>{var ee,ge;const T=re.current+U,z=$().filter(ve=>!ve.disabled),O=document.activeElement,V=(ee=z.find(ve=>ve.ref.current===O))==null?void 0:ee.textValue,W=z.map(ve=>ve.textValue),ae=yIe(W,T,V),ce=(ge=z.find(ve=>ve.textValue===ae))==null?void 0:ge.ref.current;(function ve(Me){re.current=Me,window.clearTimeout(ie.current),Me!==""&&(ie.current=window.setTimeout(()=>ve(""),1e3))})(T),ce&&setTimeout(()=>ce.focus())};v.useEffect(()=>()=>window.clearTimeout(ie.current),[]),ru();const R=v.useCallback(U=>{var z,O;return fe.current===((z=Q.current)==null?void 0:z.side)&&kIe(U,(O=Q.current)==null?void 0:O.area)},[]);return M.jsx(eIe,{scope:n,searchRef:re,onItemEnter:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),onItemLeave:v.useCallback(U=>{var T;R(U)||((T=D.current)==null||T.focus(),P(null))},[R]),onTriggerLeave:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),pointerGraceTimerRef:le,onPointerGraceIntentChange:v.useCallback(U=>{Q.current=U},[]),children:M.jsx(ye,{...j,children:M.jsx(VU,{asChild:!0,trapped:i,onMountAutoFocus:ue(c,U=>{var T;U.preventDefault(),(T=D.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(HU,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,children:M.jsx(VAe,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:ue(p,U=>{C.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(IAe,{role:"menu","aria-orientation":"vertical","data-state":JG(_.open),"data-radix-menu-content":"",dir:C.dir,...N,...S,ref:H,style:{outline:"none",...S.style},onKeyDown:ue(S.onKeyDown,U=>{const z=U.target.closest("[data-radix-menu-content]")===U.currentTarget,O=U.ctrlKey||U.altKey||U.metaKey,V=U.key.length===1;z&&(U.key==="Tab"&&U.preventDefault(),!O&&V&&B(U.key));const W=D.current;if(U.target!==W||!GAe.includes(U.key))return;U.preventDefault();const ce=$().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);AG.includes(U.key)&&ce.reverse(),pIe(ce)}),onBlur:ue(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(ie.current),re.current="")}),onPointerMove:ue(t.onPointerMove,Gd(U=>{const T=U.target,z=ke.current!==U.clientX;if(U.currentTarget.contains(T)&&z){const O=U.clientX>ke.current?"right":"left";fe.current=O,ke.current=U.clientX}}))})})})})})})});DG.displayName=Kn;var oIe="MenuGroup",Rj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{role:"group",...a,ref:e})});Rj.displayName=oIe;var rIe="MenuLabel",OG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{...a,ref:e})});OG.displayName=rIe;var xA="MenuItem",lB="menu.itemSelect",YA=v.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:a,...i}=t,c=v.useRef(null),l=hu(xA,t.__scopeMenu),h=$j(xA,t.__scopeMenu),p=Ae(e,c),f=v.useRef(!1),k=()=>{const m=c.current;if(!n&&m){const x=new CustomEvent(lB,{bubbles:!0,cancelable:!0});m.addEventListener(lB,b=>a==null?void 0:a(b),{once:!0}),qU(m,x),x.defaultPrevented?f.current=!1:l.onClose()}};return M.jsx(qG,{...i,ref:p,disabled:n,onClick:ue(t.onClick,k),onPointerDown:m=>{var x;(x=t.onPointerDown)==null||x.call(t,m),f.current=!0},onPointerUp:ue(t.onPointerUp,m=>{var x;f.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:ue(t.onKeyDown,m=>{const x=h.searchRef.current!=="";n||x&&m.key===" "||bT.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});YA.displayName=xA;var qG=v.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:a=!1,textValue:i,...c}=t,l=$j(xA,n),h=$G(n),p=v.useRef(null),f=Ae(e,p),[k,m]=v.useState(!1),[x,b]=v.useState("");return v.useEffect(()=>{const w=p.current;w&&b((w.textContent??"").trim())},[c.children]),M.jsx(Ud.ItemSlot,{scope:n,disabled:a,textValue:i??x,children:M.jsx(FAe,{asChild:!0,...h,focusable:!a,children:M.jsx(pn.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:f,onPointerMove:ue(t.onPointerMove,Gd(w=>{a?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(t.onPointerLeave,Gd(w=>l.onItemLeave(w))),onFocus:ue(t.onFocus,()=>m(!0)),onBlur:ue(t.onBlur,()=>m(!1))})})})}),iIe="MenuCheckboxItem",PG=v.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:a,...i}=t;return M.jsx(FG,{scope:t.__scopeMenu,checked:n,children:M.jsx(YA,{role:"menuitemcheckbox","aria-checked":bA(n)?"mixed":n,...i,ref:e,"data-state":Dj(n),onSelect:ue(i.onSelect,()=>a==null?void 0:a(bA(n)?!0:!n),{checkForDefaultPrevented:!1})})})});PG.displayName=iIe;var zG="MenuRadioGroup",[cIe,sIe]=y1(zG,{value:void 0,onValueChange:()=>{}}),HG=v.forwardRef((t,e)=>{const{value:n,onValueChange:a,...i}=t,c=It(a);return M.jsx(cIe,{scope:t.__scopeMenu,value:n,onValueChange:c,children:M.jsx(Rj,{...i,ref:e})})});HG.displayName=zG;var BG="MenuRadioItem",VG=v.forwardRef((t,e)=>{const{value:n,...a}=t,i=sIe(BG,t.__scopeMenu),c=n===i.value;return M.jsx(FG,{scope:t.__scopeMenu,checked:c,children:M.jsx(YA,{role:"menuitemradio","aria-checked":c,...a,ref:e,"data-state":Dj(c),onSelect:ue(a.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});VG.displayName=BG;var Tj="MenuItemIndicator",[FG,lIe]=y1(Tj,{checked:!1}),UG=v.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:a,...i}=t,c=lIe(Tj,n);return M.jsx(Yt,{present:a||bA(c.checked)||c.checked===!0,children:M.jsx(pn.span,{...i,ref:e,"data-state":Dj(c.checked)})})});UG.displayName=Tj;var dIe="MenuSeparator",GG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...a,ref:e})});GG.displayName=dIe;var uIe="MenuArrow",ZG=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=uu(n);return M.jsx($Ae,{...i,...a,ref:e})});ZG.displayName=uIe;var jj="MenuSub",[hIe,WG]=y1(jj),YG=t=>{const{__scopeMenu:e,children:n,open:a=!1,onOpenChange:i}=t,c=Zo(jj,e),l=uu(e),[h,p]=v.useState(null),[f,k]=v.useState(null),m=It(i);return v.useEffect(()=>(c.open===!1&&m(!1),()=>m(!1)),[c.open,m]),M.jsx(xG,{...l,children:M.jsx(EG,{scope:e,open:a,onOpenChange:m,content:f,onContentChange:k,children:M.jsx(hIe,{scope:e,contentId:ht(),triggerId:ht(),trigger:h,onTriggerChange:p,children:n})})})};YG.displayName=jj;var Td="MenuSubTrigger",XG=v.forwardRef((t,e)=>{const n=Zo(Td,t.__scopeMenu),a=hu(Td,t.__scopeMenu),i=WG(Td,t.__scopeMenu),c=$j(Td,t.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=c,f={__scopeMenu:t.__scopeMenu},k=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>k,[k]),v.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),p(null)}},[h,p]),M.jsx(Aj,{asChild:!0,...f,children:M.jsx(qG,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":JG(n.open),...t,ref:ra(e,i.onTriggerChange),onClick:m=>{var x;(x=t.onClick)==null||x.call(t,m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(t.onPointerMove,Gd(m=>{c.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!n.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),k()},100))})),onPointerLeave:ue(t.onPointerLeave,Gd(m=>{var b,w;k();const x=(b=n.content)==null?void 0:b.getBoundingClientRect();if(x){const S=(w=n.content)==null?void 0:w.dataset.side,_=S==="right",C=_?-5:5,N=x[_?"left":"right"],A=x[_?"right":"left"];c.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:N,y:x.top},{x:A,y:x.top},{x:A,y:x.bottom},{x:N,y:x.bottom}],side:S}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(m),m.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:ue(t.onKeyDown,m=>{var b;const x=c.searchRef.current!=="";t.disabled||x&&m.key===" "||ZAe[a.dir].includes(m.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),m.preventDefault())})})})});XG.displayName=Td;var KG="MenuSubContent",QG=v.forwardRef((t,e)=>{const n=TG(Kn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Zo(Kn,t.__scopeMenu),l=hu(Kn,t.__scopeMenu),h=WG(KG,t.__scopeMenu),p=v.useRef(null),f=Ae(e,p);return M.jsx(Ud.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Ud.Slot,{scope:t.__scopeMenu,children:M.jsx(Ej,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=p.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:ue(t.onFocusOutside,k=>{k.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:ue(t.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:ue(t.onKeyDown,k=>{var b;const m=k.currentTarget.contains(k.target),x=WAe[l.dir].includes(k.key);m&&x&&(c.onOpenChange(!1),(b=h.trigger)==null||b.focus(),k.preventDefault())})})})})})});QG.displayName=KG;function JG(t){return t?"open":"closed"}function bA(t){return t==="indeterminate"}function Dj(t){return bA(t)?"indeterminate":t?"checked":"unchecked"}function pIe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function fIe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}function yIe(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=fIe(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function mIe(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function kIe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return mIe(n,e)}function Gd(t){return e=>e.pointerType==="mouse"?t(e):void 0}var vIe=RG,gIe=Aj,MIe=jG,xIe=DG,bIe=Rj,wIe=OG,_Ie=YA,SIe=PG,CIe=HG,LIe=VG,NIe=UG,AIe=GG,IIe=ZG,$Ie=YG,EIe=XG,RIe=QG,Oj="ContextMenu",[TIe,Tqe]=Ot(Oj,[IG]),rn=IG(),[jIe,eZ]=TIe(Oj),tZ=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:a,dir:i,modal:c=!0}=t,[l,h]=v.useState(!1),p=rn(e),f=It(a),k=v.useCallback(m=>{h(m),f(m)},[f]);return M.jsx(jIe,{scope:e,open:l,onOpenChange:k,modal:c,children:M.jsx(vIe,{...p,dir:i,open:l,onOpenChange:k,modal:c,children:n})})};tZ.displayName=Oj;var nZ="ContextMenuTrigger",aZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:a=!1,...i}=t,c=eZ(nZ,n),l=rn(n),h=v.useRef({x:0,y:0}),p=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),f=v.useRef(0),k=v.useCallback(()=>window.clearTimeout(f.current),[]),m=x=>{h.current={x:x.clientX,y:x.clientY},c.onOpenChange(!0)};return v.useEffect(()=>k,[k]),v.useEffect(()=>void(a&&k()),[a,k]),M.jsxs(M.Fragment,{children:[M.jsx(gIe,{...l,virtualRef:p}),M.jsx(pn.span,{"data-state":c.open?"open":"closed","data-disabled":a?"":void 0,...i,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:a?t.onContextMenu:ue(t.onContextMenu,x=>{k(),m(x),x.preventDefault()}),onPointerDown:a?t.onPointerDown:ue(t.onPointerDown,V2(x=>{k(),f.current=window.setTimeout(()=>m(x),700)})),onPointerMove:a?t.onPointerMove:ue(t.onPointerMove,V2(k)),onPointerCancel:a?t.onPointerCancel:ue(t.onPointerCancel,V2(k)),onPointerUp:a?t.onPointerUp:ue(t.onPointerUp,V2(k))})]})});aZ.displayName=nZ;var DIe="ContextMenuPortal",oZ=t=>{const{__scopeContextMenu:e,...n}=t,a=rn(e);return M.jsx(MIe,{...a,...n})};oZ.displayName=DIe;var rZ="ContextMenuContent",iZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=eZ(rZ,n),c=rn(n),l=v.useRef(!1);return M.jsx(xIe,{...c,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var p;(p=t.onCloseAutoFocus)==null||p.call(t,h),!h.defaultPrevented&&l.current&&h.preventDefault(),l.current=!1},onInteractOutside:h=>{var p;(p=t.onInteractOutside)==null||p.call(t,h),!h.defaultPrevented&&!i.modal&&(l.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iZ.displayName=rZ;var OIe="ContextMenuGroup",cZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(bIe,{...i,...a,ref:e})});cZ.displayName=OIe;var qIe="ContextMenuLabel",sZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(wIe,{...i,...a,ref:e})});sZ.displayName=qIe;var PIe="ContextMenuItem",lZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(_Ie,{...i,...a,ref:e})});lZ.displayName=PIe;var zIe="ContextMenuCheckboxItem",dZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(SIe,{...i,...a,ref:e})});dZ.displayName=zIe;var HIe="ContextMenuRadioGroup",uZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(CIe,{...i,...a,ref:e})});uZ.displayName=HIe;var BIe="ContextMenuRadioItem",hZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(LIe,{...i,...a,ref:e})});hZ.displayName=BIe;var VIe="ContextMenuItemIndicator",pZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(NIe,{...i,...a,ref:e})});pZ.displayName=VIe;var FIe="ContextMenuSeparator",fZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(AIe,{...i,...a,ref:e})});fZ.displayName=FIe;var UIe="ContextMenuArrow",GIe=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(IIe,{...i,...a,ref:e})});GIe.displayName=UIe;var yZ="ContextMenuSub",mZ=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:a,open:i,defaultOpen:c}=t,l=rn(e),[h,p]=on({prop:i,defaultProp:c??!1,onChange:a,caller:yZ});return M.jsx($Ie,{...l,open:h,onOpenChange:p,children:n})};mZ.displayName=yZ;var ZIe="ContextMenuSubTrigger",kZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(EIe,{...i,...a,ref:e})});kZ.displayName=ZIe;var WIe="ContextMenuSubContent",vZ=v.forwardRef((t,e)=>{const{__scopeContextMenu:n,...a}=t,i=rn(n);return M.jsx(RIe,{...i,...a,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vZ.displayName=WIe;function V2(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var YIe=tZ,XIe=aZ,gZ=oZ,KIe=iZ,QIe=cZ,JIe=sZ,e$e=lZ,t$e=dZ,n$e=uZ,a$e=hZ,MZ=pZ,o$e=fZ,r$e=mZ,i$e=kZ,c$e=vZ;function s$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YIe,{"data-slot":"context-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function l$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(XIe,{"data-slot":"context-menu-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function d$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(QIe,{"data-slot":"context-menu-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function u$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(gZ,{"data-slot":"context-menu-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function h$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(r$e,{"data-slot":"context-menu-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function p$e(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(n$e,{"data-slot":"context-menu-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function f$e(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(i$e,{"data-slot":"context-menu-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function y$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(c$e,{"data-slot":"context-menu-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function m$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(gZ,{children:M.jsx(KIe,{"data-slot":"context-menu-content",className:i,...a})}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function k$e(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(e$e,{"data-slot":"context-menu-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function v$e(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(MZ,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(t$e,{"data-slot":"context-menu-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function g$e(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(MZ,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(a$e,{"data-slot":"context-menu-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function M$e(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(JIe,{"data-slot":"context-menu-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function x$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(o$e,{"data-slot":"context-menu-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function b$e(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"context-menu-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const Uo=v.createContext({activeIndex:0,setActiveIndex:()=>{},totalDialogs:0,setTotalDialogs:()=>{},isOpen:!1,setIsOpen:()=>{},clickable:!1,shouldAnimate:!1,setShouldAnimate:()=>{},closeDialog:()=>{}}),xZ=v.forwardRef((t,e)=>{const n=Z.c(36);let a,i,c,l,h,p;n[0]!==t?({children:a,className:i,open:h,onOpenChange:c,clickable:p,...l}=t,n[0]=t,n[1]=a,n[2]=i,n[3]=c,n[4]=l,n[5]=h,n[6]=p):(a=n[1],i=n[2],c=n[3],l=n[4],h=n[5],p=n[6]);const f=h===void 0?!1:h,k=p===void 0?!1:p,[m,x]=v.useState(0),[b,w]=v.useState(f),[S,_]=v.useState(!1),[C,N]=v.useState(0);let A;n[7]!==m?(A=Q=>{Q===m&&(m>0?x(R$e):w(!1))},n[7]=m,n[8]=A):A=n[8];const $=A;let E;n[9]!==m||n[10]!==$||n[11]!==b||n[12]!==C?(E=()=>({open:()=>{w(!0)},close:()=>{w(!1),x(0)},next:()=>{x(m+1)},prev:()=>{m>0&&x(m-1)},goTo:Q=>{Q>=0&&Q<C&&x(Q)},closeCurrent:()=>$(m),isOpen:b,activeIndex:m,totalDialogs:C}),n[9]=m,n[10]=$,n[11]=b,n[12]=C,n[13]=E):E=n[13];let P;n[14]!==m||n[15]!==b||n[16]!==C?(P=[m,C,b],n[14]=m,n[15]=b,n[16]=C,n[17]=P):P=n[17],v.useImperativeHandle(e,E,P);let D,H;n[18]!==b||n[19]!==c?(D=()=>{const Q=document.documentElement;return b?(Q.style.overflow="hidden",_(!0)):Q.style.overflow="",c==null||c(b),()=>{Q.style.overflow=""}},H=[b,c],n[18]=b,n[19]=c,n[20]=D,n[21]=H):(D=n[20],H=n[21]),v.useEffect(D,H);let ie;n[22]!==m||n[23]!==k||n[24]!==$||n[25]!==b||n[26]!==S||n[27]!==C?(ie={activeIndex:m,setActiveIndex:x,totalDialogs:C,setTotalDialogs:N,isOpen:b,setIsOpen:w,clickable:k,shouldAnimate:S,setShouldAnimate:_,closeDialog:$},n[22]=m,n[23]=k,n[24]=$,n[25]=b,n[26]=S,n[27]=C,n[28]=ie):ie=n[28];let re;n[29]!==a||n[30]!==i||n[31]!==l?(re=M.jsx("div",{className:i,...l,children:a}),n[29]=a,n[30]=i,n[31]=l,n[32]=re):re=n[32];let le;return n[33]!==ie||n[34]!==re?(le=M.jsx(Uo.Provider,{value:ie,children:re}),n[33]=ie,n[34]=re,n[35]=le):le=n[35],le});xZ.displayName="DialogStack";const w$e=t=>{const e=Z.c(28);let n,a,i,c,l;e[0]!==t?({children:a,className:i,onClick:c,asChild:n,...l}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=v.useContext(Uo);if(!h)throw new Error("DialogStackTrigger must be used within a DialogStack");let p;e[6]!==h||e[7]!==c?(p=x=>{h.setIsOpen(!0),c==null||c(x)},e[6]=h,e[7]=c,e[8]=p):p=e[8];const f=p;if(n&&v.isValidElement(a)){let x;if(e[9]!==a||e[10]!==i||e[11]!==f||e[12]!==l){let b;e[14]!==a.props.className||e[15]!==i?(b=oe(i,a.props.className),e[14]=a.props.className,e[15]=i,e[16]=b):b=e[16];let w;e[17]!==f||e[18]!==l||e[19]!==b?(w={onClick:f,className:b,...l},e[17]=f,e[18]=l,e[19]=b,e[20]=w):w=e[20],x=v.cloneElement(a,w),e[9]=a,e[10]=i,e[11]=f,e[12]=l,e[13]=x}else x=e[13];return x}let k;e[21]!==i?(k=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm","ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","bg-primary text-primary-foreground hover:bg-primary/90","h-10 px-4 py-2",i),e[21]=i,e[22]=k):k=e[22];let m;return e[23]!==a||e[24]!==f||e[25]!==l||e[26]!==k?(m=M.jsx("button",{onClick:f,className:k,...l,children:a}),e[23]=a,e[24]=f,e[25]=l,e[26]=k,e[27]=m):m=e[27],m},_$e=t=>{const e=Z.c(11);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const i=v.useContext(Uo);if(!i)throw new Error("DialogStackOverlay must be used within a DialogStack");if(!i.isOpen)return null;let c;e[3]!==n?(c=oe("fixed inset-0 z-[1001] bg-black/80 backdrop-blur-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 slide-in-from-right-1/2 data-[state=open]:fade-in-0",n),e[3]=n,e[4]=c):c=e[4];let l;e[5]!==i?(l=()=>{i.activeIndex===0?i.setIsOpen(!1):i.setActiveIndex(i.activeIndex-1)},e[5]=i,e[6]=l):l=e[6];let h;return e[7]!==a||e[8]!==c||e[9]!==l?(h=M.jsx("div",{className:c,onClick:l,...a}),e[7]=a,e[8]=c,e[9]=l,e[10]=h):h=e[10],h},S$e=t=>{const e=Z.c(20);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=v.useContext(Uo);let l;e[4]!==n?(l=v.Children.count(n),e[4]=n,e[5]=l):l=e[5];const[h,p]=v.useState(l);if(!c)throw new Error("DialogStackBody must be used within a DialogStack");if(!c.isOpen)return null;let f;e[6]!==c||e[7]!==h?(f={...c,totalDialogs:h,setTotalDialogs:p},e[6]=c,e[7]=h,e[8]=f):f=e[8];let k;e[9]!==a?(k=oe("pointer-events-none fixed z-[1002] w-full max-w-full md:max-w-[67%] right-0 top-0 md:top-[1vh]",a),e[9]=a,e[10]=k):k=e[10];let m;e[11]!==n?(m=v.Children.map(n,T$e),e[11]=n,e[12]=m):m=e[12];let x;e[13]!==i||e[14]!==k||e[15]!==m?(x=M.jsx(UCe,{children:M.jsx("div",{className:k,...i,children:m})}),e[13]=i,e[14]=k,e[15]=m,e[16]=x):x=e[16];let b;return e[17]!==f||e[18]!==x?(b=M.jsx(Uo.Provider,{value:f,children:x}),e[17]=f,e[18]=x,e[19]=b):b=e[19],b},C$e=({children:t,className:e,index:n=0,offset:a=20,...i})=>{const c=v.useContext(Uo);if(!c)throw new Error("DialogStackContent must be used within a DialogStack");if(!c.isOpen)return null;const l=()=>{c.closeDialog(n)},h=m=>{m.stopPropagation(),c.clickable&&c.activeIndex>n&&c.setActiveIndex(n??0)},p=n-c.activeIndex,f=p<0?`-${Math.abs(p)*a}px`:"0",k=n===0&&c.activeIndex===0&&c.shouldAnimate;return v.useEffect(()=>{if(k){const m=setTimeout(()=>{c.setShouldAnimate(!1)},200);return()=>clearTimeout(m)}},[k]),M.jsxs("div",{onClick:h,className:oe("h-[100vh] md:h-[98vh] w-full md:rounded-l-md border bg-background p-6 shadow-lg md:transition-all duration-200",k&&"animate-in slide-in-from-right-1/2",p<0&&"brightness-75 blur-[2px]",e),style:{top:0,marginLeft:`${f}`,marginTop:`${window.innerWidth>768?Math.abs(p)*10:0}px`,width:`calc(100% + ${Math.abs(p)*a}px)`,zIndex:50-Math.abs(c.activeIndex-(n??0)),position:p?"absolute":"relative",opacity:p>0?0:1,pointerEvents:p>0?"none":"auto",cursor:c.clickable&&c.activeIndex>n?"pointer":"default"},...i,children:[c.activeIndex===n&&M.jsx(XT,{asChild:!0,variant:"ghost",className:"absolute z-[1005] top-4 right-4 p-1 size-8",onClick:l,"aria-label":"Close",children:M.jsx(a1,{})}),M.jsx("div",{className:oe("h-full w-full transition-all duration-200",c.activeIndex!==n&&"pointer-events-none select-none"),children:t})]})},L$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("font-semibold text-lg leading-none tracking-tight",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("h2",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},N$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("text-muted-foreground text-sm",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("p",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},A$e=t=>{const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col space-y-1.5 text-center sm:text-left",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c},I$e=t=>{const e=Z.c(10);let n,a,i;e[0]!==t?({children:n,className:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("flex items-center justify-end space-x-2 pt-4",a),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==n||e[7]!==i||e[8]!==c?(l=M.jsx("div",{className:c,...i,children:n}),e[6]=n,e[7]=i,e[8]=c,e[9]=l):l=e[9],l},$$e=t=>{const e=Z.c(27);let n,a,i,c;e[0]!==t?({children:a,className:i,asChild:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=v.useContext(Uo);if(!l)throw new Error("DialogStackNext must be used within a DialogStack");let h;e[5]!==l?(h=()=>{l.activeIndex<l.totalDialogs-1&&l.setActiveIndex(l.activeIndex+1)},e[5]=l,e[6]=h):h=e[6];const p=h;if(n&&v.isValidElement(a)){let b;if(e[7]!==a||e[8]!==i||e[9]!==p||e[10]!==c){let w;e[12]!==a.props.className||e[13]!==i?(w=oe(i,a.props.className),e[12]=a.props.className,e[13]=i,e[14]=w):w=e[14];let S;e[15]!==p||e[16]!==c||e[17]!==w?(S={onClick:p,className:w,...c},e[15]=p,e[16]=c,e[17]=w,e[18]=S):S=e[18],b=v.cloneElement(a,S),e[7]=a,e[8]=i,e[9]=p,e[10]=c,e[11]=b}else b=e[11];return b}let f;e[19]!==i?(f=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",i),e[19]=i,e[20]=f):f=e[20];const k=l.activeIndex>=l.totalDialogs-1,m=a||"Next";let x;return e[21]!==p||e[22]!==c||e[23]!==f||e[24]!==k||e[25]!==m?(x=M.jsx("button",{type:"button",onClick:p,className:f,disabled:k,...c,children:m}),e[21]=p,e[22]=c,e[23]=f,e[24]=k,e[25]=m,e[26]=x):x=e[26],x},E$e=t=>{const e=Z.c(27);let n,a,i,c;e[0]!==t?({children:a,className:i,asChild:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=v.useContext(Uo);if(!l)throw new Error("DialogStackPrevious must be used within a DialogStack");let h;e[5]!==l?(h=()=>{l.activeIndex>0&&l.setActiveIndex(l.activeIndex-1)},e[5]=l,e[6]=h):h=e[6];const p=h;if(n&&v.isValidElement(a)){let b;if(e[7]!==a||e[8]!==i||e[9]!==p||e[10]!==c){let w;e[12]!==a.props.className||e[13]!==i?(w=oe(i,a.props.className),e[12]=a.props.className,e[13]=i,e[14]=w):w=e[14];let S;e[15]!==p||e[16]!==c||e[17]!==w?(S={onClick:p,className:w,...c},e[15]=p,e[16]=c,e[17]=w,e[18]=S):S=e[18],b=v.cloneElement(a,S),e[7]=a,e[8]=i,e[9]=p,e[10]=c,e[11]=b}else b=e[11];return b}let f;e[19]!==i?(f=oe("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",i),e[19]=i,e[20]=f):f=e[20];const k=l.activeIndex<=0,m=a||"Previous";let x;return e[21]!==p||e[22]!==c||e[23]!==f||e[24]!==k||e[25]!==m?(x=M.jsx("button",{type:"button",onClick:p,className:f,disabled:k,...c,children:m}),e[21]=p,e[22]=c,e[23]=f,e[24]=k,e[25]=m,e[26]=x):x=e[26],x};function R$e(t){return t-1}function T$e(t,e){return v.isValidElement(t)?v.cloneElement(t,{index:e}):t}function pu(t){const e=t+"CollectionProvider",[n,a]=Ot(e),[i,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:_,children:C}=S,N=me.useRef(null),A=me.useRef(new Map).current;return M.jsx(i,{scope:_,itemMap:A,collectionRef:N,children:C})};l.displayName=e;const h=t+"CollectionSlot",p=zo(h),f=me.forwardRef((S,_)=>{const{scope:C,children:N}=S,A=c(h,C),$=Ae(_,A.collectionRef);return M.jsx(p,{ref:$,children:N})});f.displayName=h;const k=t+"CollectionItemSlot",m="data-radix-collection-item",x=zo(k),b=me.forwardRef((S,_)=>{const{scope:C,children:N,...A}=S,$=me.useRef(null),E=Ae(_,$),P=c(k,C);return me.useEffect(()=>(P.itemMap.set($,{ref:$,...A}),()=>void P.itemMap.delete($))),M.jsx(x,{[m]:"",ref:E,children:N})});b.displayName=k;function w(S){const _=c(t+"CollectionConsumer",S);return me.useCallback(()=>{const N=_.collectionRef.current;if(!N)return[];const A=Array.from(N.querySelectorAll(`[${m}]`));return Array.from(_.itemMap.values()).sort((P,D)=>A.indexOf(P.ref.current)-A.indexOf(D.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:l,Slot:f,ItemSlot:b},w,a]}var j$e="Arrow",bZ=v.forwardRef((t,e)=>{const{children:n,width:a=10,height:i=5,...c}=t;return M.jsx(Ce.svg,{...c,ref:e,width:a,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});bZ.displayName=j$e;var D$e=bZ,qj="Popper",[wZ,Wo]=Ot(qj),[O$e,_Z]=wZ(qj),SZ=t=>{const{__scopePopper:e,children:n}=t,[a,i]=v.useState(null);return M.jsx(O$e,{scope:e,anchor:a,onAnchorChange:i,children:n})};SZ.displayName=qj;var CZ="PopperAnchor",LZ=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:a,...i}=t,c=_Z(CZ,n),l=v.useRef(null),h=Ae(e,l);return v.useEffect(()=>{c.onAnchorChange((a==null?void 0:a.current)||l.current)}),a?null:M.jsx(Ce.div,{...i,ref:h})});LZ.displayName=CZ;var Pj="PopperContent",[q$e,P$e]=wZ(Pj),NZ=v.forwardRef((t,e)=>{var ee,ge,ve,Me,be,xe;const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:f=[],collisionPadding:k=0,sticky:m="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...S}=t,_=_Z(Pj,n),[C,N]=v.useState(null),A=Ae(e,Te=>N(Te)),[$,E]=v.useState(null),P=au($),D=(P==null?void 0:P.width)??0,H=(P==null?void 0:P.height)??0,ie=a+(c!=="center"?"-"+c:""),re=typeof k=="number"?k:{top:0,right:0,bottom:0,left:0,...k},le=Array.isArray(f)?f:[f],Q=le.length>0,fe={padding:re,boundary:le.filter(H$e),altBoundary:Q},{refs:ke,floatingStyles:ye,placement:j,isPositioned:B,middlewareData:R}=nG({strategy:"fixed",placement:ie,whileElementsMounted:(...Te)=>eG(...Te,{animationFrame:b==="always"}),elements:{reference:_.anchor},middleware:[aG({mainAxis:i+H,alignmentAxis:l}),p&&oG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?rG():void 0,...fe}),p&&iG({...fe}),cG({...fe,apply:({elements:Te,rects:Be,availableWidth:ft,availableHeight:nt})=>{const{width:Pe,height:$t}=Be.reference,at=Te.floating.style;at.setProperty("--radix-popper-available-width",`${ft}px`),at.setProperty("--radix-popper-available-height",`${nt}px`),at.setProperty("--radix-popper-anchor-width",`${Pe}px`),at.setProperty("--radix-popper-anchor-height",`${$t}px`)}}),$&&lG({element:$,padding:h}),B$e({arrowWidth:D,arrowHeight:H}),x&&sG({strategy:"referenceHidden",...fe})]}),[U,T]=$Z(j),z=It(w);bt(()=>{B&&(z==null||z())},[B,z]);const O=(ee=R.arrow)==null?void 0:ee.x,V=(ge=R.arrow)==null?void 0:ge.y,W=((ve=R.arrow)==null?void 0:ve.centerOffset)!==0,[ae,ce]=v.useState();return bt(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),M.jsx("div",{ref:ke.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:B?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Me=R.transformOrigin)==null?void 0:Me.x,(be=R.transformOrigin)==null?void 0:be.y].join(" "),...((xe=R.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:M.jsx(q$e,{scope:n,placedSide:U,onArrowChange:E,arrowX:O,arrowY:V,shouldHideArrow:W,children:M.jsx(Ce.div,{"data-side":U,"data-align":T,...S,ref:A,style:{...S.style,animation:B?void 0:"none"}})})})});NZ.displayName=Pj;var AZ="PopperArrow",z$e={top:"bottom",right:"left",bottom:"top",left:"right"},IZ=v.forwardRef(function(e,n){const{__scopePopper:a,...i}=e,c=P$e(AZ,a),l=z$e[c.placedSide];return M.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:M.jsx(D$e,{...i,ref:n,style:{...i.style,display:"block"}})})});IZ.displayName=AZ;function H$e(t){return t!==null}var B$e=t=>({name:"transformOrigin",options:t,fn(e){var _,C,N;const{placement:n,rects:a,middlewareData:i}=e,l=((_=i.arrow)==null?void 0:_.centerOffset)!==0,h=l?0:t.arrowWidth,p=l?0:t.arrowHeight,[f,k]=$Z(n),m={start:"0%",center:"50%",end:"100%"}[k],x=(((C=i.arrow)==null?void 0:C.x)??0)+h/2,b=(((N=i.arrow)==null?void 0:N.y)??0)+p/2;let w="",S="";return f==="bottom"?(w=l?m:`${x}px`,S=`${-p}px`):f==="top"?(w=l?m:`${x}px`,S=`${a.floating.height+p}px`):f==="right"?(w=`${-p}px`,S=l?m:`${b}px`):f==="left"&&(w=`${a.floating.width+p}px`,S=l?m:`${b}px`),{data:{x:w,y:S}}}});function $Z(t){const[e,n="center"]=t.split("-");return[e,n]}var fu=SZ,yu=LZ,XA=NZ,KA=IZ,GR="rovingFocusGroup.onEntryFocus",V$e={bubbles:!1,cancelable:!0},mu="RovingFocusGroup",[wT,EZ,F$e]=pu(mu),[U$e,QA]=Ot(mu,[F$e]),[G$e,Z$e]=U$e(mu),RZ=v.forwardRef((t,e)=>M.jsx(wT.Provider,{scope:t.__scopeRovingFocusGroup,children:M.jsx(wT.Slot,{scope:t.__scopeRovingFocusGroup,children:M.jsx(W$e,{...t,ref:e})})}));RZ.displayName=mu;var W$e=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:k=!1,...m}=t,x=v.useRef(null),b=Ae(e,x),w=f1(c),[S,_]=on({prop:l,defaultProp:h??null,onChange:p,caller:mu}),[C,N]=v.useState(!1),A=It(f),$=EZ(n),E=v.useRef(!1),[P,D]=v.useState(0);return v.useEffect(()=>{const H=x.current;if(H)return H.addEventListener(GR,A),()=>H.removeEventListener(GR,A)},[A]),M.jsx(G$e,{scope:n,orientation:a,dir:w,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(H=>_(H),[_]),onItemShiftTab:v.useCallback(()=>N(!0),[]),onFocusableItemAdd:v.useCallback(()=>D(H=>H+1),[]),onFocusableItemRemove:v.useCallback(()=>D(H=>H-1),[]),children:M.jsx(Ce.div,{tabIndex:C||P===0?-1:0,"data-orientation":a,...m,ref:b,style:{outline:"none",...t.style},onMouseDown:ue(t.onMouseDown,()=>{E.current=!0}),onFocus:ue(t.onFocus,H=>{const ie=!E.current;if(H.target===H.currentTarget&&ie&&!C){const re=new CustomEvent(GR,V$e);if(H.currentTarget.dispatchEvent(re),!re.defaultPrevented){const le=$().filter(j=>j.focusable),Q=le.find(j=>j.active),fe=le.find(j=>j.id===S),ye=[Q,fe,...le].filter(Boolean).map(j=>j.ref.current);DZ(ye,k)}}E.current=!1}),onBlur:ue(t.onBlur,()=>N(!1))})})}),TZ="RovingFocusGroupItem",jZ=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:c,children:l,...h}=t,p=ht(),f=c||p,k=Z$e(TZ,n),m=k.currentTabStopId===f,x=EZ(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:S}=k;return v.useEffect(()=>{if(a)return b(),()=>w()},[a,b,w]),M.jsx(wT.ItemSlot,{scope:n,id:f,focusable:a,active:i,children:M.jsx(Ce.span,{tabIndex:m?0:-1,"data-orientation":k.orientation,...h,ref:e,onMouseDown:ue(t.onMouseDown,_=>{a?k.onItemFocus(f):_.preventDefault()}),onFocus:ue(t.onFocus,()=>k.onItemFocus(f)),onKeyDown:ue(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){k.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const C=K$e(_,k.orientation,k.dir);if(C!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let A=x().filter($=>$.focusable).map($=>$.ref.current);if(C==="last")A.reverse();else if(C==="prev"||C==="next"){C==="prev"&&A.reverse();const $=A.indexOf(_.currentTarget);A=k.loop?Q$e(A,$+1):A.slice($+1)}setTimeout(()=>DZ(A))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});jZ.displayName=TZ;var Y$e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function X$e(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function K$e(t,e,n){const a=X$e(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Y$e[a]}function DZ(t,e=!1){const n=document.activeElement;for(const a of t)if(a===n||(a.focus({preventScroll:e}),document.activeElement!==n))return}function Q$e(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var OZ=RZ,qZ=jZ,_T=["Enter"," "],J$e=["ArrowDown","PageUp","Home"],PZ=["ArrowUp","PageDown","End"],eEe=[...J$e,...PZ],tEe={ltr:[..._T,"ArrowRight"],rtl:[..._T,"ArrowLeft"]},nEe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ku="Menu",[Zd,aEe,oEe]=pu(ku),[m1,zj]=Ot(ku,[oEe,Wo,QA]),vu=Wo(),zZ=QA(),[HZ,Yo]=m1(ku),[rEe,gu]=m1(ku),BZ=t=>{const{__scopeMenu:e,open:n=!1,children:a,dir:i,onOpenChange:c,modal:l=!0}=t,h=vu(e),[p,f]=v.useState(null),k=v.useRef(!1),m=It(c),x=f1(i);return v.useEffect(()=>{const b=()=>{k.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>k.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),M.jsx(fu,{...h,children:M.jsx(HZ,{scope:e,open:n,onOpenChange:m,content:p,onContentChange:f,children:M.jsx(rEe,{scope:e,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:k,dir:x,modal:l,children:a})})})};BZ.displayName=ku;var iEe="MenuAnchor",Hj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=vu(n);return M.jsx(yu,{...i,...a,ref:e})});Hj.displayName=iEe;var Bj="MenuPortal",[cEe,VZ]=m1(Bj,{forceMount:void 0}),FZ=t=>{const{__scopeMenu:e,forceMount:n,children:a,container:i}=t,c=Yo(Bj,e);return M.jsx(cEe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};FZ.displayName=Bj;var Qn="MenuContent",[sEe,Vj]=m1(Qn),UZ=v.forwardRef((t,e)=>{const n=VZ(Qn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Yo(Qn,t.__scopeMenu),l=gu(Qn,t.__scopeMenu);return M.jsx(Zd.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Zd.Slot,{scope:t.__scopeMenu,children:l.modal?M.jsx(lEe,{...i,ref:e}):M.jsx(dEe,{...i,ref:e})})})})}),lEe=v.forwardRef((t,e)=>{const n=Yo(Qn,t.__scopeMenu),a=v.useRef(null),i=Ae(e,a);return v.useEffect(()=>{const c=a.current;if(c)return iu(c)},[]),M.jsx(Fj,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ue(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dEe=v.forwardRef((t,e)=>{const n=Yo(Qn,t.__scopeMenu);return M.jsx(Fj,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),uEe=zo("MenuContent.ScrollLock"),Fj=v.forwardRef((t,e)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:h,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,disableOutsideScroll:w,...S}=t,_=Yo(Qn,n),C=gu(Qn,n),N=vu(n),A=zZ(n),$=aEe(n),[E,P]=v.useState(null),D=v.useRef(null),H=Ae(e,D,_.onContentChange),ie=v.useRef(0),re=v.useRef(""),le=v.useRef(0),Q=v.useRef(null),fe=v.useRef("right"),ke=v.useRef(0),ye=w?wl:v.Fragment,j=w?{as:uEe,allowPinchZoom:!0}:void 0,B=U=>{var ee,ge;const T=re.current+U,z=$().filter(ve=>!ve.disabled),O=document.activeElement,V=(ee=z.find(ve=>ve.ref.current===O))==null?void 0:ee.textValue,W=z.map(ve=>ve.textValue),ae=wEe(W,T,V),ce=(ge=z.find(ve=>ve.textValue===ae))==null?void 0:ge.ref.current;(function ve(Me){re.current=Me,window.clearTimeout(ie.current),Me!==""&&(ie.current=window.setTimeout(()=>ve(""),1e3))})(T),ce&&setTimeout(()=>ce.focus())};v.useEffect(()=>()=>window.clearTimeout(ie.current),[]),ru();const R=v.useCallback(U=>{var z,O;return fe.current===((z=Q.current)==null?void 0:z.side)&&SEe(U,(O=Q.current)==null?void 0:O.area)},[]);return M.jsx(sEe,{scope:n,searchRef:re,onItemEnter:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),onItemLeave:v.useCallback(U=>{var T;R(U)||((T=D.current)==null||T.focus(),P(null))},[R]),onTriggerLeave:v.useCallback(U=>{R(U)&&U.preventDefault()},[R]),pointerGraceTimerRef:le,onPointerGraceIntentChange:v.useCallback(U=>{Q.current=U},[]),children:M.jsx(ye,{...j,children:M.jsx(ou,{asChild:!0,trapped:i,onMountAutoFocus:ue(c,U=>{var T;U.preventDefault(),(T=D.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:f,onPointerDownOutside:k,onFocusOutside:m,onInteractOutside:x,onDismiss:b,children:M.jsx(OZ,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:P,onEntryFocus:ue(p,U=>{C.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(XA,{role:"menu","aria-orientation":"vertical","data-state":sW(_.open),"data-radix-menu-content":"",dir:C.dir,...N,...S,ref:H,style:{outline:"none",...S.style},onKeyDown:ue(S.onKeyDown,U=>{const z=U.target.closest("[data-radix-menu-content]")===U.currentTarget,O=U.ctrlKey||U.altKey||U.metaKey,V=U.key.length===1;z&&(U.key==="Tab"&&U.preventDefault(),!O&&V&&B(U.key));const W=D.current;if(U.target!==W||!eEe.includes(U.key))return;U.preventDefault();const ce=$().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);PZ.includes(U.key)&&ce.reverse(),xEe(ce)}),onBlur:ue(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(ie.current),re.current="")}),onPointerMove:ue(t.onPointerMove,Wd(U=>{const T=U.target,z=ke.current!==U.clientX;if(U.currentTarget.contains(T)&&z){const O=U.clientX>ke.current?"right":"left";fe.current=O,ke.current=U.clientX}}))})})})})})})});UZ.displayName=Qn;var hEe="MenuGroup",Uj=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{role:"group",...a,ref:e})});Uj.displayName=hEe;var pEe="MenuLabel",GZ=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{...a,ref:e})});GZ.displayName=pEe;var wA="MenuItem",dB="menu.itemSelect",JA=v.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:a,...i}=t,c=v.useRef(null),l=gu(wA,t.__scopeMenu),h=Vj(wA,t.__scopeMenu),p=Ae(e,c),f=v.useRef(!1),k=()=>{const m=c.current;if(!n&&m){const x=new CustomEvent(dB,{bubbles:!0,cancelable:!0});m.addEventListener(dB,b=>a==null?void 0:a(b),{once:!0}),XV(m,x),x.defaultPrevented?f.current=!1:l.onClose()}};return M.jsx(ZZ,{...i,ref:p,disabled:n,onClick:ue(t.onClick,k),onPointerDown:m=>{var x;(x=t.onPointerDown)==null||x.call(t,m),f.current=!0},onPointerUp:ue(t.onPointerUp,m=>{var x;f.current||(x=m.currentTarget)==null||x.click()}),onKeyDown:ue(t.onKeyDown,m=>{const x=h.searchRef.current!=="";n||x&&m.key===" "||_T.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});JA.displayName=wA;var ZZ=v.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:a=!1,textValue:i,...c}=t,l=Vj(wA,n),h=zZ(n),p=v.useRef(null),f=Ae(e,p),[k,m]=v.useState(!1),[x,b]=v.useState("");return v.useEffect(()=>{const w=p.current;w&&b((w.textContent??"").trim())},[c.children]),M.jsx(Zd.ItemSlot,{scope:n,disabled:a,textValue:i??x,children:M.jsx(qZ,{asChild:!0,...h,focusable:!a,children:M.jsx(Ce.div,{role:"menuitem","data-highlighted":k?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:f,onPointerMove:ue(t.onPointerMove,Wd(w=>{a?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ue(t.onPointerLeave,Wd(w=>l.onItemLeave(w))),onFocus:ue(t.onFocus,()=>m(!0)),onBlur:ue(t.onBlur,()=>m(!1))})})})}),fEe="MenuCheckboxItem",WZ=v.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:a,...i}=t;return M.jsx(JZ,{scope:t.__scopeMenu,checked:n,children:M.jsx(JA,{role:"menuitemcheckbox","aria-checked":_A(n)?"mixed":n,...i,ref:e,"data-state":Wj(n),onSelect:ue(i.onSelect,()=>a==null?void 0:a(_A(n)?!0:!n),{checkForDefaultPrevented:!1})})})});WZ.displayName=fEe;var YZ="MenuRadioGroup",[yEe,mEe]=m1(YZ,{value:void 0,onValueChange:()=>{}}),XZ=v.forwardRef((t,e)=>{const{value:n,onValueChange:a,...i}=t,c=It(a);return M.jsx(yEe,{scope:t.__scopeMenu,value:n,onValueChange:c,children:M.jsx(Uj,{...i,ref:e})})});XZ.displayName=YZ;var KZ="MenuRadioItem",QZ=v.forwardRef((t,e)=>{const{value:n,...a}=t,i=mEe(KZ,t.__scopeMenu),c=n===i.value;return M.jsx(JZ,{scope:t.__scopeMenu,checked:c,children:M.jsx(JA,{role:"menuitemradio","aria-checked":c,...a,ref:e,"data-state":Wj(c),onSelect:ue(a.onSelect,()=>{var l;return(l=i.onValueChange)==null?void 0:l.call(i,n)},{checkForDefaultPrevented:!1})})})});QZ.displayName=KZ;var Gj="MenuItemIndicator",[JZ,kEe]=m1(Gj,{checked:!1}),eW=v.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:a,...i}=t,c=kEe(Gj,n);return M.jsx(Yt,{present:a||_A(c.checked)||c.checked===!0,children:M.jsx(Ce.span,{...i,ref:e,"data-state":Wj(c.checked)})})});eW.displayName=Gj;var vEe="MenuSeparator",tW=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t;return M.jsx(Ce.div,{role:"separator","aria-orientation":"horizontal",...a,ref:e})});tW.displayName=vEe;var gEe="MenuArrow",nW=v.forwardRef((t,e)=>{const{__scopeMenu:n,...a}=t,i=vu(n);return M.jsx(KA,{...i,...a,ref:e})});nW.displayName=gEe;var Zj="MenuSub",[MEe,aW]=m1(Zj),oW=t=>{const{__scopeMenu:e,children:n,open:a=!1,onOpenChange:i}=t,c=Yo(Zj,e),l=vu(e),[h,p]=v.useState(null),[f,k]=v.useState(null),m=It(i);return v.useEffect(()=>(c.open===!1&&m(!1),()=>m(!1)),[c.open,m]),M.jsx(fu,{...l,children:M.jsx(HZ,{scope:e,open:a,onOpenChange:m,content:f,onContentChange:k,children:M.jsx(MEe,{scope:e,contentId:ht(),triggerId:ht(),trigger:h,onTriggerChange:p,children:n})})})};oW.displayName=Zj;var jd="MenuSubTrigger",rW=v.forwardRef((t,e)=>{const n=Yo(jd,t.__scopeMenu),a=gu(jd,t.__scopeMenu),i=aW(jd,t.__scopeMenu),c=Vj(jd,t.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:p}=c,f={__scopeMenu:t.__scopeMenu},k=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>k,[k]),v.useEffect(()=>{const m=h.current;return()=>{window.clearTimeout(m),p(null)}},[h,p]),M.jsx(Hj,{asChild:!0,...f,children:M.jsx(ZZ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":sW(n.open),...t,ref:ra(e,i.onTriggerChange),onClick:m=>{var x;(x=t.onClick)==null||x.call(t,m),!(t.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ue(t.onPointerMove,Wd(m=>{c.onItemEnter(m),!m.defaultPrevented&&!t.disabled&&!n.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),k()},100))})),onPointerLeave:ue(t.onPointerLeave,Wd(m=>{var b,w;k();const x=(b=n.content)==null?void 0:b.getBoundingClientRect();if(x){const S=(w=n.content)==null?void 0:w.dataset.side,_=S==="right",C=_?-5:5,N=x[_?"left":"right"],A=x[_?"right":"left"];c.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:N,y:x.top},{x:A,y:x.top},{x:A,y:x.bottom},{x:N,y:x.bottom}],side:S}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(m),m.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:ue(t.onKeyDown,m=>{var b;const x=c.searchRef.current!=="";t.disabled||x&&m.key===" "||tEe[a.dir].includes(m.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),m.preventDefault())})})})});rW.displayName=jd;var iW="MenuSubContent",cW=v.forwardRef((t,e)=>{const n=VZ(Qn,t.__scopeMenu),{forceMount:a=n.forceMount,...i}=t,c=Yo(Qn,t.__scopeMenu),l=gu(Qn,t.__scopeMenu),h=aW(iW,t.__scopeMenu),p=v.useRef(null),f=Ae(e,p);return M.jsx(Zd.Provider,{scope:t.__scopeMenu,children:M.jsx(Yt,{present:a||c.open,children:M.jsx(Zd.Slot,{scope:t.__scopeMenu,children:M.jsx(Fj,{id:h.contentId,"aria-labelledby":h.triggerId,...i,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:k=>{var m;l.isUsingKeyboardRef.current&&((m=p.current)==null||m.focus()),k.preventDefault()},onCloseAutoFocus:k=>k.preventDefault(),onFocusOutside:ue(t.onFocusOutside,k=>{k.target!==h.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:ue(t.onEscapeKeyDown,k=>{l.onClose(),k.preventDefault()}),onKeyDown:ue(t.onKeyDown,k=>{var b;const m=k.currentTarget.contains(k.target),x=nEe[l.dir].includes(k.key);m&&x&&(c.onOpenChange(!1),(b=h.trigger)==null||b.focus(),k.preventDefault())})})})})})});cW.displayName=iW;function sW(t){return t?"open":"closed"}function _A(t){return t==="indeterminate"}function Wj(t){return _A(t)?"indeterminate":t?"checked":"unchecked"}function xEe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function bEe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}function wEe(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=bEe(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function _Ee(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function SEe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return _Ee(n,e)}function Wd(t){return e=>e.pointerType==="mouse"?t(e):void 0}var lW=BZ,dW=Hj,uW=FZ,hW=UZ,pW=Uj,fW=GZ,yW=JA,mW=WZ,kW=XZ,vW=QZ,gW=eW,MW=tW,xW=nW,bW=oW,wW=rW,_W=cW,eI="DropdownMenu",[CEe,jqe]=Ot(eI,[zj]),cn=zj(),[LEe,SW]=CEe(eI),CW=t=>{const{__scopeDropdownMenu:e,children:n,dir:a,open:i,defaultOpen:c,onOpenChange:l,modal:h=!0}=t,p=cn(e),f=v.useRef(null),[k,m]=on({prop:i,defaultProp:c??!1,onChange:l,caller:eI});return M.jsx(LEe,{scope:e,triggerId:ht(),triggerRef:f,contentId:ht(),open:k,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(x=>!x),[m]),modal:h,children:M.jsx(lW,{...p,open:k,onOpenChange:m,dir:a,modal:h,children:n})})};CW.displayName=eI;var LW="DropdownMenuTrigger",NW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...i}=t,c=SW(LW,n),l=cn(n);return M.jsx(dW,{asChild:!0,...l,children:M.jsx(Ce.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:ra(e,c.triggerRef),onPointerDown:ue(t.onPointerDown,h=>{!a&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:ue(t.onKeyDown,h=>{a||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});NW.displayName=LW;var NEe="DropdownMenuPortal",AW=t=>{const{__scopeDropdownMenu:e,...n}=t,a=cn(e);return M.jsx(uW,{...a,...n})};AW.displayName=NEe;var IW="DropdownMenuContent",$W=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=SW(IW,n),c=cn(n),l=v.useRef(!1);return M.jsx(hW,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...a,ref:e,onCloseAutoFocus:ue(t.onCloseAutoFocus,h=>{var p;l.current||(p=i.triggerRef.current)==null||p.focus(),l.current=!1,h.preventDefault()}),onInteractOutside:ue(t.onInteractOutside,h=>{const p=h.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,k=p.button===2||f;(!i.modal||k)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$W.displayName=IW;var AEe="DropdownMenuGroup",EW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(pW,{...i,...a,ref:e})});EW.displayName=AEe;var IEe="DropdownMenuLabel",RW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(fW,{...i,...a,ref:e})});RW.displayName=IEe;var $Ee="DropdownMenuItem",TW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(yW,{...i,...a,ref:e})});TW.displayName=$Ee;var EEe="DropdownMenuCheckboxItem",jW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(mW,{...i,...a,ref:e})});jW.displayName=EEe;var REe="DropdownMenuRadioGroup",DW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(kW,{...i,...a,ref:e})});DW.displayName=REe;var TEe="DropdownMenuRadioItem",OW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(vW,{...i,...a,ref:e})});OW.displayName=TEe;var jEe="DropdownMenuItemIndicator",qW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(gW,{...i,...a,ref:e})});qW.displayName=jEe;var DEe="DropdownMenuSeparator",PW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(MW,{...i,...a,ref:e})});PW.displayName=DEe;var OEe="DropdownMenuArrow",qEe=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(xW,{...i,...a,ref:e})});qEe.displayName=OEe;var PEe=t=>{const{__scopeDropdownMenu:e,children:n,open:a,onOpenChange:i,defaultOpen:c}=t,l=cn(e),[h,p]=on({prop:a,defaultProp:c??!1,onChange:i,caller:"DropdownMenuSub"});return M.jsx(bW,{...l,open:h,onOpenChange:p,children:n})},zEe="DropdownMenuSubTrigger",zW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(wW,{...i,...a,ref:e})});zW.displayName=zEe;var HEe="DropdownMenuSubContent",HW=v.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...a}=t,i=cn(n);return M.jsx(_W,{...i,...a,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});HW.displayName=HEe;var BEe=CW,VEe=NW,BW=AW,FEe=$W,UEe=EW,GEe=RW,ZEe=TW,WEe=jW,YEe=DW,XEe=OW,VW=qW,KEe=PW,QEe=PEe,JEe=zW,eRe=HW;function tRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BEe,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function nRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BW,{"data-slot":"dropdown-menu-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function aRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(VEe,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function oRe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,sideOffset:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=i===void 0?4:i;let l;e[4]!==n?(l=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[4]=n,e[5]=l):l=e[5];let h;return e[6]!==a||e[7]!==c||e[8]!==l?(h=M.jsx(BW,{children:M.jsx(FEe,{"data-slot":"dropdown-menu-content",sideOffset:c,className:l,...a})}),e[6]=a,e[7]=c,e[8]=l,e[9]=h):h=e[9],h}function rRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(UEe,{"data-slot":"dropdown-menu-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function iRe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(ZEe,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function cRe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(VW,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(WEe,{"data-slot":"dropdown-menu-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function sRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YEe,{"data-slot":"dropdown-menu-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function lRe(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(VW,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(XEe,{"data-slot":"dropdown-menu-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function dRe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(GEe,{"data-slot":"dropdown-menu-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function uRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(KEe,{"data-slot":"dropdown-menu-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function hRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function pRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(QEe,{"data-slot":"dropdown-menu-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function fRe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto size-4"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(JEe,{"data-slot":"dropdown-menu-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function yRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(eRe,{"data-slot":"dropdown-menu-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function FW(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,type:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:[&::-webkit-calendar-picker-indicator]:invert",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==c||e[8]!==i?(l=M.jsx("input",{type:i,"data-slot":"input",className:c,...a}),e[6]=a,e[7]=c,e[8]=i,e[9]=l):l=e[9],l}var mRe="Label",UW=v.forwardRef((t,e)=>M.jsx(Ce.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));UW.displayName=mRe;var kRe=UW;function vRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kRe,{"data-slot":"label",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}var Mu="Menubar",[ST,gRe,MRe]=pu(Mu),[GW,Dqe]=Ot(Mu,[MRe,QA]),sn=zj(),ZW=QA(),[xRe,Yj]=GW(Mu),WW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,value:a,onValueChange:i,defaultValue:c,loop:l=!0,dir:h,...p}=t,f=f1(h),k=ZW(n),[m,x]=on({prop:a,onChange:i,defaultProp:c??"",caller:Mu}),[b,w]=v.useState(null);return M.jsx(xRe,{scope:n,value:m,onMenuOpen:v.useCallback(S=>{x(S),w(S)},[x]),onMenuClose:v.useCallback(()=>x(""),[x]),onMenuToggle:v.useCallback(S=>{x(_=>_?"":S),w(S)},[x]),dir:f,loop:l,children:M.jsx(ST.Provider,{scope:n,children:M.jsx(ST.Slot,{scope:n,children:M.jsx(OZ,{asChild:!0,...k,orientation:"horizontal",loop:l,dir:f,currentTabStopId:b,onCurrentTabStopIdChange:w,children:M.jsx(Ce.div,{role:"menubar",...p,ref:e})})})})})});WW.displayName=Mu;var Xj="MenubarMenu",[bRe,YW]=GW(Xj),XW=t=>{const{__scopeMenubar:e,value:n,...a}=t,i=ht(),c=n||i||"LEGACY_REACT_AUTO_VALUE",l=Yj(Xj,e),h=sn(e),p=v.useRef(null),f=v.useRef(!1),k=l.value===c;return v.useEffect(()=>{k||(f.current=!1)},[k]),M.jsx(bRe,{scope:e,value:c,triggerId:ht(),triggerRef:p,contentId:ht(),wasKeyboardTriggerOpenRef:f,children:M.jsx(lW,{...h,open:k,onOpenChange:m=>{m||l.onMenuClose()},modal:!1,dir:l.dir,...a})})};XW.displayName=Xj;var CT="MenubarTrigger",KW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:a=!1,...i}=t,c=ZW(n),l=sn(n),h=Yj(CT,n),p=YW(CT,n),f=v.useRef(null),k=Ae(e,f,p.triggerRef),[m,x]=v.useState(!1),b=h.value===p.value;return M.jsx(ST.ItemSlot,{scope:n,value:p.value,disabled:a,children:M.jsx(qZ,{asChild:!0,...c,focusable:!a,tabStopId:p.value,children:M.jsx(dW,{asChild:!0,...l,children:M.jsx(Ce.button,{type:"button",role:"menuitem",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?p.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":b?"open":"closed","data-disabled":a?"":void 0,disabled:a,...i,ref:k,onPointerDown:ue(t.onPointerDown,w=>{!a&&w.button===0&&w.ctrlKey===!1&&(h.onMenuOpen(p.value),b||w.preventDefault())}),onPointerEnter:ue(t.onPointerEnter,()=>{var S;!!h.value&&!b&&(h.onMenuOpen(p.value),(S=f.current)==null||S.focus())}),onKeyDown:ue(t.onKeyDown,w=>{a||(["Enter"," "].includes(w.key)&&h.onMenuToggle(p.value),w.key==="ArrowDown"&&h.onMenuOpen(p.value),["Enter"," ","ArrowDown"].includes(w.key)&&(p.wasKeyboardTriggerOpenRef.current=!0,w.preventDefault()))}),onFocus:ue(t.onFocus,()=>x(!0)),onBlur:ue(t.onBlur,()=>x(!1))})})})})});KW.displayName=CT;var wRe="MenubarPortal",QW=t=>{const{__scopeMenubar:e,...n}=t,a=sn(e);return M.jsx(uW,{...a,...n})};QW.displayName=wRe;var LT="MenubarContent",JW=v.forwardRef((t,e)=>{const{__scopeMenubar:n,align:a="start",...i}=t,c=sn(n),l=Yj(LT,n),h=YW(LT,n),p=gRe(n),f=v.useRef(!1);return M.jsx(hW,{id:h.contentId,"aria-labelledby":h.triggerId,"data-radix-menubar-content":"",...c,...i,ref:e,align:a,onCloseAutoFocus:ue(t.onCloseAutoFocus,k=>{var x;!!!l.value&&!f.current&&((x=h.triggerRef.current)==null||x.focus()),f.current=!1,k.preventDefault()}),onFocusOutside:ue(t.onFocusOutside,k=>{const m=k.target;p().some(b=>{var w;return(w=b.ref.current)==null?void 0:w.contains(m)})&&k.preventDefault()}),onInteractOutside:ue(t.onInteractOutside,()=>{f.current=!0}),onEntryFocus:k=>{h.wasKeyboardTriggerOpenRef.current||k.preventDefault()},onKeyDown:ue(t.onKeyDown,k=>{if(["ArrowRight","ArrowLeft"].includes(k.key)){const m=k.target,x=m.hasAttribute("data-radix-menubar-subtrigger"),b=m.closest("[data-radix-menubar-content]")!==k.currentTarget,S=(l.dir==="rtl"?"ArrowRight":"ArrowLeft")===k.key;if(!S&&x||b&&S)return;let N=p().filter(E=>!E.disabled).map(E=>E.value);S&&N.reverse();const A=N.indexOf(h.value);N=l.loop?DRe(N,A+1):N.slice(A+1);const[$]=N;$&&l.onMenuOpen($)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});JW.displayName=LT;var _Re="MenubarGroup",eY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(pW,{...i,...a,ref:e})});eY.displayName=_Re;var SRe="MenubarLabel",tY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(fW,{...i,...a,ref:e})});tY.displayName=SRe;var CRe="MenubarItem",nY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(yW,{...i,...a,ref:e})});nY.displayName=CRe;var LRe="MenubarCheckboxItem",aY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(mW,{...i,...a,ref:e})});aY.displayName=LRe;var NRe="MenubarRadioGroup",oY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(kW,{...i,...a,ref:e})});oY.displayName=NRe;var ARe="MenubarRadioItem",rY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(vW,{...i,...a,ref:e})});rY.displayName=ARe;var IRe="MenubarItemIndicator",iY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(gW,{...i,...a,ref:e})});iY.displayName=IRe;var $Re="MenubarSeparator",cY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(MW,{...i,...a,ref:e})});cY.displayName=$Re;var ERe="MenubarArrow",RRe=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(xW,{...i,...a,ref:e})});RRe.displayName=ERe;var sY="MenubarSub",lY=t=>{const{__scopeMenubar:e,children:n,open:a,onOpenChange:i,defaultOpen:c}=t,l=sn(e),[h,p]=on({prop:a,defaultProp:c??!1,onChange:i,caller:sY});return M.jsx(bW,{...l,open:h,onOpenChange:p,children:n})};lY.displayName=sY;var TRe="MenubarSubTrigger",dY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(wW,{"data-radix-menubar-subtrigger":"",...i,...a,ref:e})});dY.displayName=TRe;var jRe="MenubarSubContent",uY=v.forwardRef((t,e)=>{const{__scopeMenubar:n,...a}=t,i=sn(n);return M.jsx(_W,{...i,"data-radix-menubar-content":"",...a,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});uY.displayName=jRe;function DRe(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var ORe=WW,qRe=XW,PRe=KW,zRe=QW,HRe=JW,BRe=eY,VRe=tY,FRe=nY,URe=aY,GRe=oY,ZRe=rY,hY=iY,WRe=cY,YRe=lY,XRe=dY,KRe=uY;function QRe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(ORe,{"data-slot":"menubar",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function JRe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(qRe,{"data-slot":"menubar-menu",...n}),e[2]=n,e[3]=a):a=e[3],a}function eTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(BRe,{"data-slot":"menubar-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function pY(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(zRe,{"data-slot":"menubar-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function tTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(GRe,{"data-slot":"menubar-radio-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function nTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(PRe,{"data-slot":"menubar-trigger",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aTe(t){const e=Z.c(14);let n,a,i,c,l;e[0]!==t?({className:n,align:i,alignOffset:c,sideOffset:l,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=i===void 0?"start":i,p=c===void 0?-4:c,f=l===void 0?8:l;let k;e[6]!==n?(k=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",n),e[6]=n,e[7]=k):k=e[7];let m;return e[8]!==h||e[9]!==p||e[10]!==a||e[11]!==f||e[12]!==k?(m=M.jsx(pY,{children:M.jsx(HRe,{"data-slot":"menubar-content",align:h,alignOffset:p,sideOffset:f,className:k,...a})}),e[8]=h,e[9]=p,e[10]=a,e[11]=f,e[12]=k,e[13]=m):m=e[13],m}function oTe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,inset:a,variant:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==n?(h=oe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=h):h=e[6];let p;return e[7]!==a||e[8]!==i||e[9]!==h||e[10]!==l?(p=M.jsx(FRe,{"data-slot":"menubar-item","data-inset":a,"data-variant":l,className:h,...i}),e[7]=a,e[8]=i,e[9]=h,e[10]=l,e[11]=p):p=e[11],p}function rTe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:i,children:a,checked:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==i?(l=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(hY,{children:M.jsx(no,{className:"size-4"})})}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==l?(p=M.jsxs(URe,{"data-slot":"menubar-checkbox-item",className:l,checked:n,...c,children:[h,a]}),e[8]=n,e[9]=a,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function iTe(t){const e=Z.c(11);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:M.jsx(hY,{children:M.jsx(n1,{className:"size-2 fill-current"})})}),e[6]=l):l=e[6];let h;return e[7]!==n||e[8]!==i||e[9]!==c?(h=M.jsxs(ZRe,{"data-slot":"menubar-radio-item",className:c,...i,children:[l,n]}),e[7]=n,e[8]=i,e[9]=c,e[10]=h):h=e[10],h}function cTe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,inset:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==n?(c=oe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),e[4]=n,e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i||e[8]!==c?(l=M.jsx(VRe,{"data-slot":"menubar-label","data-inset":a,className:c,...i}),e[6]=a,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function sTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(WRe,{"data-slot":"menubar-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground ml-auto text-xs tracking-widest",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("span",{"data-slot":"menubar-shortcut",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(YRe,{"data-slot":"menubar-sub",...n}),e[2]=n,e[3]=a):a=e[3],a}function uTe(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,inset:i,children:n,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);let l;e[5]!==a?(l=oe("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",a),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(Na,{className:"ml-auto h-4 w-4"}),e[7]=h):h=e[7];let p;return e[8]!==n||e[9]!==i||e[10]!==c||e[11]!==l?(p=M.jsxs(XRe,{"data-slot":"menubar-sub-trigger","data-inset":i,className:l,...c,children:[n,h]}),e[8]=n,e[9]=i,e[10]=c,e[11]=l,e[12]=p):p=e[12],p}function hTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(KRe,{"data-slot":"menubar-sub-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function pTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("mx-auto flex w-full justify-center",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function fTe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-row items-center gap-1",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"pagination-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function yTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx("li",{"data-slot":"pagination-item",...n}),e[2]=n,e[3]=a):a=e[3],a}function Kj(t){const e=Z.c(14);let n,a,i,c;e[0]!==t?({className:n,isActive:a,size:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"icon":c,h=a?"page":void 0,p=a?"outline":"ghost";let f;e[5]!==n||e[6]!==l||e[7]!==p?(f=oe(hA({variant:p,size:l}),n),e[5]=n,e[6]=l,e[7]=p,e[8]=f):f=e[8];let k;return e[9]!==a||e[10]!==i||e[11]!==h||e[12]!==f?(k=M.jsx("a",{"aria-current":h,"data-slot":"pagination-link","data-active":a,className:f,...i}),e[9]=a,e[10]=i,e[11]=h,e[12]=f,e[13]=k):k=e[13],k}function mTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("gap-1 px-2.5 sm:pl-2.5",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(sl,{}),l=M.jsx("span",{className:"hidden sm:block",children:"Previous"}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs(Kj,{"aria-label":"Go to previous page",size:"default",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}function kTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("gap-1 px-2.5 sm:pr-2.5",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx("span",{className:"hidden sm:block",children:"Next"}),l=M.jsx(Na,{}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs(Kj,{"aria-label":"Go to next page",size:"default",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}function vTe(t){const e=Z.c(10);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex size-9 items-center justify-center",n),e[3]=n,e[4]=i):i=e[4];let c,l;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(to,{className:"size-4"}),l=M.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=c,e[6]=l):(c=e[5],l=e[6]);let h;return e[7]!==a||e[8]!==i?(h=M.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:i,...a,children:[c,l]}),e[7]=a,e[8]=i,e[9]=h):h=e[9],h}var tI="Popover",[fY,Oqe]=Ot(tI,[Wo]),xu=Wo(),[gTe,Xo]=fY(tI),yY=t=>{const{__scopePopover:e,children:n,open:a,defaultOpen:i,onOpenChange:c,modal:l=!1}=t,h=xu(e),p=v.useRef(null),[f,k]=v.useState(!1),[m,x]=on({prop:a,defaultProp:i??!1,onChange:c,caller:tI});return M.jsx(fu,{...h,children:M.jsx(gTe,{scope:e,contentId:ht(),triggerRef:p,open:m,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(b=>!b),[x]),hasCustomAnchor:f,onCustomAnchorAdd:v.useCallback(()=>k(!0),[]),onCustomAnchorRemove:v.useCallback(()=>k(!1),[]),modal:l,children:n})})};yY.displayName=tI;var mY="PopoverAnchor",kY=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(mY,n),c=xu(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:h}=i;return v.useEffect(()=>(l(),()=>h()),[l,h]),M.jsx(yu,{...c,...a,ref:e})});kY.displayName=mY;var vY="PopoverTrigger",gY=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(vY,n),c=xu(n),l=Ae(e,i.triggerRef),h=M.jsx(Ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_Y(i.open),...a,ref:l,onClick:ue(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?h:M.jsx(yu,{asChild:!0,...c,children:h})});gY.displayName=vY;var Qj="PopoverPortal",[MTe,xTe]=fY(Qj,{forceMount:void 0}),MY=t=>{const{__scopePopover:e,forceMount:n,children:a,container:i}=t,c=Xo(Qj,e);return M.jsx(MTe,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};MY.displayName=Qj;var fl="PopoverContent",xY=v.forwardRef((t,e)=>{const n=xTe(fl,t.__scopePopover),{forceMount:a=n.forceMount,...i}=t,c=Xo(fl,t.__scopePopover);return M.jsx(Yt,{present:a||c.open,children:c.modal?M.jsx(wTe,{...i,ref:e}):M.jsx(_Te,{...i,ref:e})})});xY.displayName=fl;var bTe=zo("PopoverContent.RemoveScroll"),wTe=v.forwardRef((t,e)=>{const n=Xo(fl,t.__scopePopover),a=v.useRef(null),i=Ae(e,a),c=v.useRef(!1);return v.useEffect(()=>{const l=a.current;if(l)return iu(l)},[]),M.jsx(wl,{as:bTe,allowPinchZoom:!0,children:M.jsx(bY,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(t.onCloseAutoFocus,l=>{var h;l.preventDefault(),c.current||(h=n.triggerRef.current)==null||h.focus()}),onPointerDownOutside:ue(t.onPointerDownOutside,l=>{const h=l.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,f=h.button===2||p;c.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:ue(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),_Te=v.forwardRef((t,e)=>{const n=Xo(fl,t.__scopePopover),a=v.useRef(!1),i=v.useRef(!1);return M.jsx(bY,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var l,h;(l=t.onCloseAutoFocus)==null||l.call(t,c),c.defaultPrevented||(a.current||(h=n.triggerRef.current)==null||h.focus(),c.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:c=>{var p,f;(p=t.onInteractOutside)==null||p.call(t,c),c.defaultPrevented||(a.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=c.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),bY=v.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:k,...m}=t,x=Xo(fl,n),b=xu(n);return ru(),M.jsx(ou,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:c,children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:k,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:f,onDismiss:()=>x.onOpenChange(!1),children:M.jsx(XA,{"data-state":_Y(x.open),role:"dialog",id:x.contentId,...b,...m,ref:e,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wY="PopoverClose",STe=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=Xo(wY,n);return M.jsx(Ce.button,{type:"button",...a,ref:e,onClick:ue(t.onClick,()=>i.onOpenChange(!1))})});STe.displayName=wY;var CTe="PopoverArrow",LTe=v.forwardRef((t,e)=>{const{__scopePopover:n,...a}=t,i=xu(n);return M.jsx(KA,{...i,...a,ref:e})});LTe.displayName=CTe;function _Y(t){return t?"open":"closed"}var NTe=yY,ATe=kY,ITe=gY,$Te=MY,ETe=xY;function RTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(NTe,{"data-slot":"popover",...n}),e[2]=n,e[3]=a):a=e[3],a}function TTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(ITe,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function jTe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,align:i,sideOffset:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"center":i,h=c===void 0?4:c;let p;e[5]!==n?(p=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),e[5]=n,e[6]=p):p=e[6];let f;return e[7]!==l||e[8]!==a||e[9]!==h||e[10]!==p?(f=M.jsx($Te,{children:M.jsx(ETe,{"data-slot":"popover-content",align:l,sideOffset:h,className:p,...a})}),e[7]=l,e[8]=a,e[9]=h,e[10]=p,e[11]=f):f=e[11],f}function DTe(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(ATe,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=a):a=e[3],a}function SA(t,[e,n]){return Math.min(n,Math.max(e,t))}var SY=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),OTe="VisuallyHidden",CY=v.forwardRef((t,e)=>M.jsx(Ce.span,{...t,ref:e,style:{...SY,...t.style}}));CY.displayName=OTe;var qTe=CY,PTe=[" ","Enter","ArrowUp","ArrowDown"],zTe=[" ","Enter"],l1="Select",[nI,aI,HTe]=pu(l1),[Cl,qqe]=Ot(l1,[HTe,Wo]),oI=Wo(),[BTe,Ko]=Cl(l1),[VTe,FTe]=Cl(l1),LY=t=>{const{__scopeSelect:e,children:n,open:a,defaultOpen:i,onOpenChange:c,value:l,defaultValue:h,onValueChange:p,dir:f,name:k,autoComplete:m,disabled:x,required:b,form:w}=t,S=oI(e),[_,C]=v.useState(null),[N,A]=v.useState(null),[$,E]=v.useState(!1),P=f1(f),[D,H]=on({prop:a,defaultProp:i??!1,onChange:c,caller:l1}),[ie,re]=on({prop:l,defaultProp:h,onChange:p,caller:l1}),le=v.useRef(null),Q=_?w||!!_.closest("form"):!0,[fe,ke]=v.useState(new Set),ye=Array.from(fe).map(j=>j.props.value).join(";");return M.jsx(fu,{...S,children:M.jsxs(BTe,{required:b,scope:e,trigger:_,onTriggerChange:C,valueNode:N,onValueNodeChange:A,valueNodeHasChildren:$,onValueNodeHasChildrenChange:E,contentId:ht(),value:ie,onValueChange:re,open:D,onOpenChange:H,dir:P,triggerPointerDownPosRef:le,disabled:x,children:[M.jsx(nI.Provider,{scope:e,children:M.jsx(VTe,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(j=>{ke(B=>new Set(B).add(j))},[]),onNativeOptionRemove:v.useCallback(j=>{ke(B=>{const R=new Set(B);return R.delete(j),R})},[]),children:n})}),Q?M.jsxs(QY,{"aria-hidden":!0,required:b,tabIndex:-1,name:k,autoComplete:m,value:ie,onChange:j=>re(j.target.value),disabled:x,form:w,children:[ie===void 0?M.jsx("option",{value:""}):null,Array.from(fe)]},ye):null]})})};LY.displayName=l1;var NY="SelectTrigger",AY=v.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:a=!1,...i}=t,c=oI(n),l=Ko(NY,n),h=l.disabled||a,p=Ae(e,l.onTriggerChange),f=aI(n),k=v.useRef("touch"),[m,x,b]=eX(S=>{const _=f().filter(A=>!A.disabled),C=_.find(A=>A.value===l.value),N=tX(_,S,C);N!==void 0&&l.onValueChange(N.value)}),w=S=>{h||(l.onOpenChange(!0),b()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return M.jsx(yu,{asChild:!0,...c,children:M.jsx(Ce.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":JY(l.value)?"":void 0,...i,ref:p,onClick:ue(i.onClick,S=>{S.currentTarget.focus(),k.current!=="mouse"&&w(S)}),onPointerDown:ue(i.onPointerDown,S=>{k.current=S.pointerType;const _=S.target;_.hasPointerCapture(S.pointerId)&&_.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:ue(i.onKeyDown,S=>{const _=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&x(S.key),!(_&&S.key===" ")&&PTe.includes(S.key)&&(w(),S.preventDefault())})})})});AY.displayName=NY;var IY="SelectValue",$Y=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:a,style:i,children:c,placeholder:l="",...h}=t,p=Ko(IY,n),{onValueNodeHasChildrenChange:f}=p,k=c!==void 0,m=Ae(e,p.onValueNodeChange);return bt(()=>{f(k)},[f,k]),M.jsx(Ce.span,{...h,ref:m,style:{pointerEvents:"none"},children:JY(p.value)?M.jsx(M.Fragment,{children:l}):c})});$Y.displayName=IY;var UTe="SelectIcon",EY=v.forwardRef((t,e)=>{const{__scopeSelect:n,children:a,...i}=t;return M.jsx(Ce.span,{"aria-hidden":!0,...i,ref:e,children:a||"▼"})});EY.displayName=UTe;var GTe="SelectPortal",RY=t=>M.jsx(h1,{asChild:!0,...t});RY.displayName=GTe;var d1="SelectContent",TY=v.forwardRef((t,e)=>{const n=Ko(d1,t.__scopeSelect),[a,i]=v.useState();if(bt(()=>{i(new DocumentFragment)},[]),!n.open){const c=a;return c?gl.createPortal(M.jsx(jY,{scope:t.__scopeSelect,children:M.jsx(nI.Slot,{scope:t.__scopeSelect,children:M.jsx("div",{children:t.children})})}),c):null}return M.jsx(DY,{...t,ref:e})});TY.displayName=d1;var aa=10,[jY,Qo]=Cl(d1),ZTe="SelectContentImpl",WTe=zo("SelectContent.RemoveScroll"),DY=v.forwardRef((t,e)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:l,side:h,sideOffset:p,align:f,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:_,...C}=t,N=Ko(d1,n),[A,$]=v.useState(null),[E,P]=v.useState(null),D=Ae(e,ee=>$(ee)),[H,ie]=v.useState(null),[re,le]=v.useState(null),Q=aI(n),[fe,ke]=v.useState(!1),ye=v.useRef(!1);v.useEffect(()=>{if(A)return iu(A)},[A]),ru();const j=v.useCallback(ee=>{const[ge,...ve]=Q().map(xe=>xe.ref.current),[Me]=ve.slice(-1),be=document.activeElement;for(const xe of ee)if(xe===be||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ge&&E&&(E.scrollTop=0),xe===Me&&E&&(E.scrollTop=E.scrollHeight),xe==null||xe.focus(),document.activeElement!==be))return},[Q,E]),B=v.useCallback(()=>j([H,A]),[j,H,A]);v.useEffect(()=>{fe&&B()},[fe,B]);const{onOpenChange:R,triggerPointerDownPosRef:U}=N;v.useEffect(()=>{if(A){let ee={x:0,y:0};const ge=Me=>{var be,xe;ee={x:Math.abs(Math.round(Me.pageX)-(((be=U.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((xe=U.current)==null?void 0:xe.y)??0))}},ve=Me=>{ee.x<=10&&ee.y<=10?Me.preventDefault():A.contains(Me.target)||R(!1),document.removeEventListener("pointermove",ge),U.current=null};return U.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",ve,{capture:!0})}}},[A,R,U]),v.useEffect(()=>{const ee=()=>R(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[R]);const[T,z]=eX(ee=>{const ge=Q().filter(be=>!be.disabled),ve=ge.find(be=>be.ref.current===document.activeElement),Me=tX(ge,ee,ve);Me&&setTimeout(()=>Me.ref.current.focus())}),O=v.useCallback((ee,ge,ve)=>{const Me=!ye.current&&!ve;(N.value!==void 0&&N.value===ge||Me)&&(ie(ee),Me&&(ye.current=!0))},[N.value]),V=v.useCallback(()=>A==null?void 0:A.focus(),[A]),W=v.useCallback((ee,ge,ve)=>{const Me=!ye.current&&!ve;(N.value!==void 0&&N.value===ge||Me)&&le(ee)},[N.value]),ae=a==="popper"?NT:OY,ce=ae===NT?{side:h,sideOffset:p,align:f,alignOffset:k,arrowPadding:m,collisionBoundary:x,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:_}:{};return M.jsx(jY,{scope:n,content:A,viewport:E,onViewportChange:P,itemRefCallback:O,selectedItem:H,onItemLeave:V,itemTextRefCallback:W,focusSelectedItem:B,selectedItemText:re,position:a,isPositioned:fe,searchRef:T,children:M.jsx(wl,{as:WTe,allowPinchZoom:!0,children:M.jsx(ou,{asChild:!0,trapped:N.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:ue(i,ee=>{var ge;(ge=N.trigger)==null||ge.focus({preventScroll:!0}),ee.preventDefault()}),children:M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:M.jsx(ae,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:ee=>ee.preventDefault(),...C,...ce,onPlaced:()=>ke(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:ue(C.onKeyDown,ee=>{const ge=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ge&&ee.key.length===1&&z(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Me=Q().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const be=ee.target,xe=Me.indexOf(be);Me=Me.slice(xe+1)}setTimeout(()=>j(Me)),ee.preventDefault()}})})})})})})});DY.displayName=ZTe;var YTe="SelectItemAlignedPosition",OY=v.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:a,...i}=t,c=Ko(d1,n),l=Qo(d1,n),[h,p]=v.useState(null),[f,k]=v.useState(null),m=Ae(e,D=>k(D)),x=aI(n),b=v.useRef(!1),w=v.useRef(!0),{viewport:S,selectedItem:_,selectedItemText:C,focusSelectedItem:N}=l,A=v.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&f&&S&&_&&C){const D=c.trigger.getBoundingClientRect(),H=f.getBoundingClientRect(),ie=c.valueNode.getBoundingClientRect(),re=C.getBoundingClientRect();if(c.dir!=="rtl"){const be=re.left-H.left,xe=ie.left-be,Te=D.left-xe,Be=D.width+Te,ft=Math.max(Be,H.width),nt=window.innerWidth-aa,Pe=SA(xe,[aa,Math.max(aa,nt-ft)]);h.style.minWidth=Be+"px",h.style.left=Pe+"px"}else{const be=H.right-re.right,xe=window.innerWidth-ie.right-be,Te=window.innerWidth-D.right-xe,Be=D.width+Te,ft=Math.max(Be,H.width),nt=window.innerWidth-aa,Pe=SA(xe,[aa,Math.max(aa,nt-ft)]);h.style.minWidth=Be+"px",h.style.right=Pe+"px"}const le=x(),Q=window.innerHeight-aa*2,fe=S.scrollHeight,ke=window.getComputedStyle(f),ye=parseInt(ke.borderTopWidth,10),j=parseInt(ke.paddingTop,10),B=parseInt(ke.borderBottomWidth,10),R=parseInt(ke.paddingBottom,10),U=ye+j+fe+R+B,T=Math.min(_.offsetHeight*5,U),z=window.getComputedStyle(S),O=parseInt(z.paddingTop,10),V=parseInt(z.paddingBottom,10),W=D.top+D.height/2-aa,ae=Q-W,ce=_.offsetHeight/2,ee=_.offsetTop+ce,ge=ye+j+ee,ve=U-ge;if(ge<=W){const be=le.length>0&&_===le[le.length-1].ref.current;h.style.bottom="0px";const xe=f.clientHeight-S.offsetTop-S.offsetHeight,Te=Math.max(ae,ce+(be?V:0)+xe+B),Be=ge+Te;h.style.height=Be+"px"}else{const be=le.length>0&&_===le[0].ref.current;h.style.top="0px";const Te=Math.max(W,ye+S.offsetTop+(be?O:0)+ce)+ve;h.style.height=Te+"px",S.scrollTop=ge-W+S.offsetTop}h.style.margin=`${aa}px 0`,h.style.minHeight=T+"px",h.style.maxHeight=Q+"px",a==null||a(),requestAnimationFrame(()=>b.current=!0)}},[x,c.trigger,c.valueNode,h,f,S,_,C,c.dir,a]);bt(()=>A(),[A]);const[$,E]=v.useState();bt(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);const P=v.useCallback(D=>{D&&w.current===!0&&(A(),N==null||N(),w.current=!1)},[A,N]);return M.jsx(KTe,{scope:n,contentWrapper:h,shouldExpandOnScrollRef:b,onScrollButtonChange:P,children:M.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:$},children:M.jsx(Ce.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});OY.displayName=YTe;var XTe="SelectPopperPosition",NT=v.forwardRef((t,e)=>{const{__scopeSelect:n,align:a="start",collisionPadding:i=aa,...c}=t,l=oI(n);return M.jsx(XA,{...l,...c,ref:e,align:a,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});NT.displayName=XTe;var[KTe,Jj]=Cl(d1,{}),AT="SelectViewport",qY=v.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:a,...i}=t,c=Qo(AT,n),l=Jj(AT,n),h=Ae(e,c.onViewportChange),p=v.useRef(0);return M.jsxs(M.Fragment,{children:[M.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),M.jsx(nI.Slot,{scope:n,children:M.jsx(Ce.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ue(i.onScroll,f=>{const k=f.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&m){const b=Math.abs(p.current-k.scrollTop);if(b>0){const w=window.innerHeight-aa*2,S=parseFloat(m.style.minHeight),_=parseFloat(m.style.height),C=Math.max(S,_);if(C<w){const N=C+b,A=Math.min(w,N),$=N-A;m.style.height=A+"px",m.style.bottom==="0px"&&(k.scrollTop=$>0?$:0,m.style.justifyContent="flex-end")}}}p.current=k.scrollTop})})})]})});qY.displayName=AT;var PY="SelectGroup",[QTe,JTe]=Cl(PY),zY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=ht();return M.jsx(QTe,{scope:n,id:i,children:M.jsx(Ce.div,{role:"group","aria-labelledby":i,...a,ref:e})})});zY.displayName=PY;var HY="SelectLabel",BY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=JTe(HY,n);return M.jsx(Ce.div,{id:i.id,...a,ref:e})});BY.displayName=HY;var CA="SelectItem",[eje,VY]=Cl(CA),FY=v.forwardRef((t,e)=>{const{__scopeSelect:n,value:a,disabled:i=!1,textValue:c,...l}=t,h=Ko(CA,n),p=Qo(CA,n),f=h.value===a,[k,m]=v.useState(c??""),[x,b]=v.useState(!1),w=Ae(e,N=>{var A;return(A=p.itemRefCallback)==null?void 0:A.call(p,N,a,i)}),S=ht(),_=v.useRef("touch"),C=()=>{i||(h.onValueChange(a),h.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return M.jsx(eje,{scope:n,value:a,disabled:i,textId:S,isSelected:f,onItemTextChange:v.useCallback(N=>{m(A=>A||((N==null?void 0:N.textContent)??"").trim())},[]),children:M.jsx(nI.ItemSlot,{scope:n,value:a,disabled:i,textValue:k,children:M.jsx(Ce.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:ue(l.onFocus,()=>b(!0)),onBlur:ue(l.onBlur,()=>b(!1)),onClick:ue(l.onClick,()=>{_.current!=="mouse"&&C()}),onPointerUp:ue(l.onPointerUp,()=>{_.current==="mouse"&&C()}),onPointerDown:ue(l.onPointerDown,N=>{_.current=N.pointerType}),onPointerMove:ue(l.onPointerMove,N=>{var A;_.current=N.pointerType,i?(A=p.onItemLeave)==null||A.call(p):_.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(l.onPointerLeave,N=>{var A;N.currentTarget===document.activeElement&&((A=p.onItemLeave)==null||A.call(p))}),onKeyDown:ue(l.onKeyDown,N=>{var $;(($=p.searchRef)==null?void 0:$.current)!==""&&N.key===" "||(zTe.includes(N.key)&&C(),N.key===" "&&N.preventDefault())})})})})});FY.displayName=CA;var Dd="SelectItemText",UY=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:a,style:i,...c}=t,l=Ko(Dd,n),h=Qo(Dd,n),p=VY(Dd,n),f=FTe(Dd,n),[k,m]=v.useState(null),x=Ae(e,C=>m(C),p.onItemTextChange,C=>{var N;return(N=h.itemTextRefCallback)==null?void 0:N.call(h,C,p.value,p.disabled)}),b=k==null?void 0:k.textContent,w=v.useMemo(()=>M.jsx("option",{value:p.value,disabled:p.disabled,children:b},p.value),[p.disabled,p.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:_}=f;return bt(()=>(S(w),()=>_(w)),[S,_,w]),M.jsxs(M.Fragment,{children:[M.jsx(Ce.span,{id:p.textId,...c,ref:x}),p.isSelected&&l.valueNode&&!l.valueNodeHasChildren?gl.createPortal(c.children,l.valueNode):null]})});UY.displayName=Dd;var GY="SelectItemIndicator",ZY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t;return VY(GY,n).isSelected?M.jsx(Ce.span,{"aria-hidden":!0,...a,ref:e}):null});ZY.displayName=GY;var IT="SelectScrollUpButton",WY=v.forwardRef((t,e)=>{const n=Qo(IT,t.__scopeSelect),a=Jj(IT,t.__scopeSelect),[i,c]=v.useState(!1),l=Ae(e,a.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let h=function(){const f=p.scrollTop>0;c(f)};const p=n.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?M.jsx(XY,{...t,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=n;h&&p&&(h.scrollTop=h.scrollTop-p.offsetHeight)}}):null});WY.displayName=IT;var $T="SelectScrollDownButton",YY=v.forwardRef((t,e)=>{const n=Qo($T,t.__scopeSelect),a=Jj($T,t.__scopeSelect),[i,c]=v.useState(!1),l=Ae(e,a.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let h=function(){const f=p.scrollHeight-p.clientHeight,k=Math.ceil(p.scrollTop)<f;c(k)};const p=n.viewport;return h(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[n.viewport,n.isPositioned]),i?M.jsx(XY,{...t,ref:l,onAutoScroll:()=>{const{viewport:h,selectedItem:p}=n;h&&p&&(h.scrollTop=h.scrollTop+p.offsetHeight)}}):null});YY.displayName=$T;var XY=v.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:a,...i}=t,c=Qo("SelectScrollButton",n),l=v.useRef(null),h=aI(n),p=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>p(),[p]),bt(()=>{var k;const f=h().find(m=>m.ref.current===document.activeElement);(k=f==null?void 0:f.ref.current)==null||k.scrollIntoView({block:"nearest"})},[h]),M.jsx(Ce.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:ue(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(a,50))}),onPointerMove:ue(i.onPointerMove,()=>{var f;(f=c.onItemLeave)==null||f.call(c),l.current===null&&(l.current=window.setInterval(a,50))}),onPointerLeave:ue(i.onPointerLeave,()=>{p()})})}),tje="SelectSeparator",KY=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t;return M.jsx(Ce.div,{"aria-hidden":!0,...a,ref:e})});KY.displayName=tje;var ET="SelectArrow",nje=v.forwardRef((t,e)=>{const{__scopeSelect:n,...a}=t,i=oI(n),c=Ko(ET,n),l=Qo(ET,n);return c.open&&l.position==="popper"?M.jsx(KA,{...i,...a,ref:e}):null});nje.displayName=ET;var aje="SelectBubbleInput",QY=v.forwardRef(({__scopeSelect:t,value:e,...n},a)=>{const i=v.useRef(null),c=Ae(a,i),l=PA(e);return v.useEffect(()=>{const h=i.current;if(!h)return;const p=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(p,"value").set;if(l!==e&&k){const m=new Event("change",{bubbles:!0});k.call(h,e),h.dispatchEvent(m)}},[l,e]),M.jsx(Ce.select,{...n,style:{...SY,...n.style},ref:c,defaultValue:e})});QY.displayName=aje;function JY(t){return t===""||t===void 0}function eX(t){const e=It(t),n=v.useRef(""),a=v.useRef(0),i=v.useCallback(l=>{const h=n.current+l;e(h),function p(f){n.current=f,window.clearTimeout(a.current),f!==""&&(a.current=window.setTimeout(()=>p(""),1e3))}(h)},[e]),c=v.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,i,c]}function tX(t,e,n){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let l=oje(t,Math.max(c,0));i.length===1&&(l=l.filter(f=>f!==n));const p=l.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return p!==n?p:void 0}function oje(t,e){return t.map((n,a)=>t[(e+a)%t.length])}var rje=LY,ije=AY,cje=$Y,sje=EY,lje=RY,dje=TY,uje=qY,hje=zY,pje=BY,fje=FY,yje=UY,mje=ZY,kje=WY,vje=YY,gje=KY;function Mje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(rje,{"data-slot":"select",...n}),e[2]=n,e[3]=a):a=e[3],a}function xje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(hje,{"data-slot":"select-group",...n}),e[2]=n,e[3]=a):a=e[3],a}function bje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(cje,{"data-slot":"select-value",...n}),e[2]=n,e[3]=a):a=e[3],a}function wje(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,size:c,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"default":c;let h;e[5]!==a?(h=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[2px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(sje,{asChild:!0,children:M.jsx(cl,{className:"size-4 opacity-50"})}),e[7]=p):p=e[7];let f;return e[8]!==n||e[9]!==i||e[10]!==l||e[11]!==h?(f=M.jsxs(ije,{"data-slot":"select-trigger","data-size":l,className:h,...i,children:[n,p]}),e[8]=n,e[9]=i,e[10]=l,e[11]=h,e[12]=f):f=e[12],f}function _je(t){const e=Z.c(20);let n,a,i,c;e[0]!==t?({className:a,children:n,position:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"popper":c,h=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let p;e[5]!==a||e[6]!==h?(p=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",h,a),e[5]=a,e[6]=h,e[7]=p):p=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=M.jsx(nX,{}),e[8]=f):f=e[8];const k=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let m;e[9]!==k?(m=oe("p-1",k),e[9]=k,e[10]=m):m=e[10];let x;e[11]!==n||e[12]!==m?(x=M.jsx(uje,{className:m,children:n}),e[11]=n,e[12]=m,e[13]=x):x=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=M.jsx(aX,{}),e[14]=b):b=e[14];let w;return e[15]!==l||e[16]!==i||e[17]!==p||e[18]!==x?(w=M.jsx(lje,{children:M.jsxs(dje,{"data-slot":"select-content",className:p,position:l,...i,children:[f,x,b]})}),e[15]=l,e[16]=i,e[17]=p,e[18]=x,e[19]=w):w=e[19],w}function Sje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground px-2 py-1.5 text-xs",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(pje,{"data-slot":"select-label",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Cje(t){const e=Z.c(13);let n,a,i;e[0]!==t?({className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==a?(c=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",a),e[4]=a,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=M.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:M.jsx(mje,{children:M.jsx(no,{className:"size-4"})})}),e[6]=l):l=e[6];let h;e[7]!==n?(h=M.jsx(yje,{children:n}),e[7]=n,e[8]=h):h=e[8];let p;return e[9]!==i||e[10]!==c||e[11]!==h?(p=M.jsxs(fje,{"data-slot":"select-item",className:c,...i,children:[l,h]}),e[9]=i,e[10]=c,e[11]=h,e[12]=p):p=e[12],p}function Lje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-border pointer-events-none -mx-1 my-1 h-px",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(gje,{"data-slot":"select-separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function nX(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex cursor-default items-center justify-center py-1",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(Pd,{className:"size-4"}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(kje,{"data-slot":"select-scroll-up-button",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}function aX(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex cursor-default items-center justify-center py-1",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(cl,{className:"size-4"}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(vje,{"data-slot":"select-scroll-down-button",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}var Nje="Separator",uB="horizontal",Aje=["horizontal","vertical"],oX=v.forwardRef((t,e)=>{const{decorative:n,orientation:a=uB,...i}=t,c=Ije(a)?a:uB,h=n?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return M.jsx(Ce.div,{"data-orientation":c,...h,...i,ref:e})});oX.displayName=Nje;function Ije(t){return Aje.includes(t)}var $je=oX;function rX(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,orientation:i,decorative:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?"horizontal":i,h=c===void 0?!0:c;let p;e[5]!==n?(p=oe("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=p):p=e[6];let f;return e[7]!==h||e[8]!==l||e[9]!==a||e[10]!==p?(f=M.jsx($je,{"data-slot":"separator-root",decorative:h,orientation:l,className:p,...a}),e[7]=h,e[8]=l,e[9]=a,e[10]=p,e[11]=f):f=e[11],f}function iX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(yj,{"data-slot":"sheet",...n}),e[2]=n,e[3]=a):a=e[3],a}function Eje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(MU,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function Rje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(FA,{"data-slot":"sheet-close",...n}),e[2]=n,e[3]=a):a=e[3],a}function Tje(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(mj,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=a):a=e[3],a}function jje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1002] bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(kj,{"data-slot":"sheet-overlay",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function cX(t){const e=Z.c(17);let n,a,i,c;e[0]!==t?({className:a,children:n,side:c,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?"right":c;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=M.jsx(jje,{}),e[5]=h):h=e[5];const p=l==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",f=l==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",k=l==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",m=l==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[6]!==a||e[7]!==p||e[8]!==f||e[9]!==k||e[10]!==m?(x=oe("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",p,f,k,m,a),e[6]=a,e[7]=p,e[8]=f,e[9]=k,e[10]=m,e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=M.jsxs(FA,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[M.jsx(a1,{className:"size-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=b):b=e[12];let w;return e[13]!==n||e[14]!==i||e[15]!==x?(w=M.jsxs(Tje,{children:[h,M.jsxs(vj,{"data-slot":"sheet-content",className:x,...i,children:[n,b]})]}),e[13]=n,e[14]=i,e[15]=x,e[16]=w):w=e[16],w}function sX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sheet-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Dje(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("mt-auto flex flex-col gap-2 p-4",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sheet-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function lX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(xU,{"data-slot":"sheet-title",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function dX(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(bU,{"data-slot":"sheet-description",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const ZR=768;function Oje(){const t=Z.c(2),[e,n]=v.useState(void 0);let a,i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const c=window.matchMedia(`(max-width: ${ZR-1}px)`),l=()=>{n(window.innerWidth<ZR)};return c.addEventListener("change",l),n(window.innerWidth<ZR),()=>c.removeEventListener("change",l)},i=[],t[0]=a,t[1]=i):(a=t[0],i=t[1]),v.useEffect(a,i),!!e}function RT(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"skeleton",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}var[rI,Pqe]=Ot("Tooltip",[Wo]),iI=Wo(),uX="TooltipProvider",qje=700,TT="tooltip.open",[Pje,eD]=rI(uX),hX=t=>{const{__scopeTooltip:e,delayDuration:n=qje,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:c}=t,l=v.useRef(!0),h=v.useRef(!1),p=v.useRef(0);return v.useEffect(()=>{const f=p.current;return()=>window.clearTimeout(f)},[]),M.jsx(Pje,{scope:e,isOpenDelayedRef:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(p.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:h,onPointerInTransitChange:v.useCallback(f=>{h.current=f},[]),disableHoverableContent:i,children:c})};hX.displayName=uX;var Yd="Tooltip",[zje,bu]=rI(Yd),pX=t=>{const{__scopeTooltip:e,children:n,open:a,defaultOpen:i,onOpenChange:c,disableHoverableContent:l,delayDuration:h}=t,p=eD(Yd,t.__scopeTooltip),f=iI(e),[k,m]=v.useState(null),x=ht(),b=v.useRef(0),w=l??p.disableHoverableContent,S=h??p.delayDuration,_=v.useRef(!1),[C,N]=on({prop:a,defaultProp:i??!1,onChange:D=>{D?(p.onOpen(),document.dispatchEvent(new CustomEvent(TT))):p.onClose(),c==null||c(D)},caller:Yd}),A=v.useMemo(()=>C?_.current?"delayed-open":"instant-open":"closed",[C]),$=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_.current=!1,N(!0)},[N]),E=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,N(!1)},[N]),P=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{_.current=!0,N(!0),b.current=0},S)},[S,N]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),M.jsx(fu,{...f,children:M.jsx(zje,{scope:e,contentId:x,open:C,stateAttribute:A,trigger:k,onTriggerChange:m,onTriggerEnter:v.useCallback(()=>{p.isOpenDelayedRef.current?P():$()},[p.isOpenDelayedRef,P,$]),onTriggerLeave:v.useCallback(()=>{w?E():(window.clearTimeout(b.current),b.current=0)},[E,w]),onOpen:$,onClose:E,disableHoverableContent:w,children:n})})};pX.displayName=Yd;var jT="TooltipTrigger",fX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...a}=t,i=bu(jT,n),c=eD(jT,n),l=iI(n),h=v.useRef(null),p=Ae(e,h,i.onTriggerChange),f=v.useRef(!1),k=v.useRef(!1),m=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),M.jsx(yu,{asChild:!0,...l,children:M.jsx(Ce.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:p,onPointerMove:ue(t.onPointerMove,x=>{x.pointerType!=="touch"&&!k.current&&!c.isPointerInTransitRef.current&&(i.onTriggerEnter(),k.current=!0)}),onPointerLeave:ue(t.onPointerLeave,()=>{i.onTriggerLeave(),k.current=!1}),onPointerDown:ue(t.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:ue(t.onFocus,()=>{f.current||i.onOpen()}),onBlur:ue(t.onBlur,i.onClose),onClick:ue(t.onClick,i.onClose)})})});fX.displayName=jT;var tD="TooltipPortal",[Hje,Bje]=rI(tD,{forceMount:void 0}),yX=t=>{const{__scopeTooltip:e,forceMount:n,children:a,container:i}=t,c=bu(tD,e);return M.jsx(Hje,{scope:e,forceMount:n,children:M.jsx(Yt,{present:n||c.open,children:M.jsx(h1,{asChild:!0,container:i,children:a})})})};yX.displayName=tD;var yl="TooltipContent",mX=v.forwardRef((t,e)=>{const n=Bje(yl,t.__scopeTooltip),{forceMount:a=n.forceMount,side:i="top",...c}=t,l=bu(yl,t.__scopeTooltip);return M.jsx(Yt,{present:a||l.open,children:l.disableHoverableContent?M.jsx(kX,{side:i,...c,ref:e}):M.jsx(Vje,{side:i,...c,ref:e})})}),Vje=v.forwardRef((t,e)=>{const n=bu(yl,t.__scopeTooltip),a=eD(yl,t.__scopeTooltip),i=v.useRef(null),c=Ae(e,i),[l,h]=v.useState(null),{trigger:p,onClose:f}=n,k=i.current,{onPointerInTransitChange:m}=a,x=v.useCallback(()=>{h(null),m(!1)},[m]),b=v.useCallback((w,S)=>{const _=w.currentTarget,C={x:w.clientX,y:w.clientY},N=Zje(C,_.getBoundingClientRect()),A=Wje(C,N),$=Yje(S.getBoundingClientRect()),E=Kje([...A,...$]);h(E),m(!0)},[m]);return v.useEffect(()=>()=>x(),[x]),v.useEffect(()=>{if(p&&k){const w=_=>b(_,k),S=_=>b(_,p);return p.addEventListener("pointerleave",w),k.addEventListener("pointerleave",S),()=>{p.removeEventListener("pointerleave",w),k.removeEventListener("pointerleave",S)}}},[p,k,b,x]),v.useEffect(()=>{if(l){const w=S=>{const _=S.target,C={x:S.clientX,y:S.clientY},N=(p==null?void 0:p.contains(_))||(k==null?void 0:k.contains(_)),A=!Xje(C,l);N?x():A&&(x(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[p,k,l,f,x]),M.jsx(kX,{...t,ref:c})}),[Fje,Uje]=rI(Yd,{isInside:!1}),Gje=Wne("TooltipContent"),kX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,children:a,"aria-label":i,onEscapeKeyDown:c,onPointerDownOutside:l,...h}=t,p=bu(yl,n),f=iI(n),{onClose:k}=p;return v.useEffect(()=>(document.addEventListener(TT,k),()=>document.removeEventListener(TT,k)),[k]),v.useEffect(()=>{if(p.trigger){const m=x=>{const b=x.target;b!=null&&b.contains(p.trigger)&&k()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[p.trigger,k]),M.jsx(bl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:k,children:M.jsxs(XA,{"data-state":p.stateAttribute,...f,...h,ref:e,style:{...h.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:[M.jsx(Gje,{children:a}),M.jsx(Fje,{scope:n,isInside:!0,children:M.jsx(qTe,{id:p.contentId,role:"tooltip",children:i||a})})]})})});mX.displayName=yl;var vX="TooltipArrow",gX=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...a}=t,i=iI(n);return Uje(vX,n).isInside?null:M.jsx(KA,{...i,...a,ref:e})});gX.displayName=vX;function Zje(t,e){const n=Math.abs(e.top-t.y),a=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),c=Math.abs(e.left-t.x);switch(Math.min(n,a,i,c)){case c:return"left";case i:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function Wje(t,e,n=5){const a=[];switch(e){case"top":a.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":a.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":a.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":a.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return a}function Yje(t){const{top:e,right:n,bottom:a,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:a},{x:i,y:a}]}function Xje(t,e){const{x:n,y:a}=t;let i=!1;for(let c=0,l=e.length-1;c<e.length;l=c++){const h=e[c],p=e[l],f=h.x,k=h.y,m=p.x,x=p.y;k>a!=x>a&&n<(m-f)*(a-k)/(x-k)+f&&(i=!i)}return i}function Kje(t){const e=t.slice();return e.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),Qje(e)}function Qje(t){if(t.length<=1)return t.slice();const e=[];for(let a=0;a<t.length;a++){const i=t[a];for(;e.length>=2;){const c=e[e.length-1],l=e[e.length-2];if((c.x-l.x)*(i.y-l.y)>=(c.y-l.y)*(i.x-l.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let a=t.length-1;a>=0;a--){const i=t[a];for(;n.length>=2;){const c=n[n.length-1],l=n[n.length-2];if((c.x-l.x)*(i.y-l.y)>=(c.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Jje=hX,eDe=pX,tDe=fX,nDe=yX,aDe=mX,oDe=gX;function nD(t){const e=Z.c(6);let n,a;e[0]!==t?({delayDuration:a,...n}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const i=a===void 0?0:a;let c;return e[3]!==i||e[4]!==n?(c=M.jsx(Jje,{"data-slot":"tooltip-provider",delayDuration:i,...n}),e[3]=i,e[4]=n,e[5]=c):c=e[5],c}function MX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(nD,{children:M.jsx(eDe,{"data-slot":"tooltip",...n})}),e[2]=n,e[3]=a):a=e[3],a}function xX(t){const e=Z.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=M.jsx(tDe,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=a):a=e[3],a}function bX(t){const e=Z.c(13);let n,a,i,c;e[0]!==t?({className:a,sideOffset:c,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=c===void 0?0:c;let h;e[5]!==a?(h=oe("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",a),e[5]=a,e[6]=h):h=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(oDe,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=p):p=e[7];let f;return e[8]!==n||e[9]!==i||e[10]!==l||e[11]!==h?(f=M.jsx(nDe,{children:M.jsxs(aDe,{"data-slot":"tooltip-content",sideOffset:l,className:h,...i,children:[n,p]})}),e[8]=n,e[9]=i,e[10]=l,e[11]=h,e[12]=f):f=e[12],f}const rDe="sidebar_state",iDe=60*60*24*7,cDe="16rem",sDe="18rem",lDe="3rem",dDe="b",wX=v.createContext(null);function wu(){const t=v.useContext(wX);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function uDe({defaultOpen:t=!0,open:e,onOpenChange:n,className:a,style:i,children:c,...l}){const h=Oje(),[p,f]=v.useState(!1),[k,m]=v.useState(t),x=e??k,b=v.useCallback(C=>{const N=typeof C=="function"?C(x):C;n?n(N):m(N),document.cookie=`${rDe}=${N}; path=/; max-age=${iDe}`},[n,x]),w=v.useCallback(()=>h?f(C=>!C):b(C=>!C),[h,b,f]);v.useEffect(()=>{const C=N=>{N.key===dDe&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),w())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[w]);const S=x?"expanded":"collapsed",_=v.useMemo(()=>({state:S,open:x,setOpen:b,isMobile:h,openMobile:p,setOpenMobile:f,toggleSidebar:w}),[S,x,b,h,p,f,w]);return M.jsx(wX.Provider,{value:_,children:M.jsx(nD,{delayDuration:0,children:M.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":cDe,"--sidebar-width-icon":lDe,...i},className:oe("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...l,children:c})})})}function hDe(t){const e=Z.c(46);let n,a,i,c,l,h;e[0]!==t?({side:c,variant:l,collapsible:h,className:a,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6]);const p=c===void 0?"left":c,f=l===void 0?"sidebar":l,k=h===void 0?"offcanvas":h,{isMobile:m,state:x,openMobile:b,setOpenMobile:w}=wu();if(k==="none"){let ie;e[7]!==a?(ie=oe("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=ie):ie=e[8];let re;return e[9]!==n||e[10]!==i||e[11]!==ie?(re=M.jsx("div",{"data-slot":"sidebar",className:ie,...i,children:n}),e[9]=n,e[10]=i,e[11]=ie,e[12]=re):re=e[12],re}if(m){let ie;e[13]===Symbol.for("react.memo_cache_sentinel")?(ie={"--sidebar-width":sDe},e[13]=ie):ie=e[13];let re;e[14]===Symbol.for("react.memo_cache_sentinel")?(re=M.jsxs(sX,{className:"sr-only",children:[M.jsx(lX,{children:"Sidebar"}),M.jsx(dX,{children:"Displays the mobile sidebar."})]}),e[14]=re):re=e[14];let le;e[15]!==n?(le=M.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=le):le=e[16];let Q;e[17]!==p||e[18]!==le?(Q=M.jsxs(cX,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:ie,side:p,children:[re,le]}),e[17]=p,e[18]=le,e[19]=Q):Q=e[19];let fe;return e[20]!==b||e[21]!==i||e[22]!==w||e[23]!==Q?(fe=M.jsx(iX,{open:b,onOpenChange:w,...i,children:Q}),e[20]=b,e[21]=i,e[22]=w,e[23]=Q,e[24]=fe):fe=e[24],fe}const S=x==="collapsed"?k:"",_=f==="floating"||f==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[25]!==_?(C=oe("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",_),e[25]=_,e[26]=C):C=e[26];let N;e[27]!==C?(N=M.jsx("div",{"data-slot":"sidebar-gap",className:C}),e[27]=C,e[28]=N):N=e[28];const A=p==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",$=f==="floating"||f==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let E;e[29]!==a||e[30]!==A||e[31]!==$?(E=oe("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",A,$,a),e[29]=a,e[30]=A,e[31]=$,e[32]=E):E=e[32];let P;e[33]!==n?(P=M.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=P):P=e[34];let D;e[35]!==i||e[36]!==E||e[37]!==P?(D=M.jsx("div",{"data-slot":"sidebar-container",className:E,...i,children:P}),e[35]=i,e[36]=E,e[37]=P,e[38]=D):D=e[38];let H;return e[39]!==p||e[40]!==x||e[41]!==D||e[42]!==S||e[43]!==N||e[44]!==f?(H=M.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":x,"data-collapsible":S,"data-variant":f,"data-side":p,"data-slot":"sidebar",children:[N,D]}),e[39]=p,e[40]=x,e[41]=D,e[42]=S,e[43]=N,e[44]=f,e[45]=H):H=e[45],H}function pDe(t){const e=Z.c(15);let n,a,i;e[0]!==t?({className:n,onClick:a,...i}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const{toggleSidebar:c}=wu();let l;e[4]!==n?(l=oe("size-7",n),e[4]=n,e[5]=l):l=e[5];let h;e[6]!==a||e[7]!==c?(h=m=>{a==null||a(m),c()},e[6]=a,e[7]=c,e[8]=h):h=e[8];let p,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=M.jsx(Do,{}),f=M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=f):(p=e[9],f=e[10]);let k;return e[11]!==i||e[12]!==l||e[13]!==h?(k=M.jsxs(XT,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:l,onClick:h,...i,children:[p,f]}),e[11]=i,e[12]=l,e[13]=h,e[14]=k):k=e[14],k}function fDe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);const{toggleSidebar:i}=wu();let c;e[3]!==n?(c=oe("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",n),e[3]=n,e[4]=c):c=e[4];let l;return e[5]!==a||e[6]!==c||e[7]!==i?(l=M.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:c,...a}),e[5]=a,e[6]=c,e[7]=i,e[8]=l):l=e[8],l}function yDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("main",{"data-slot":"sidebar-inset",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function mDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-background h-8 w-full shadow-none",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(FW,{"data-slot":"sidebar-input","data-sidebar":"input",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function kDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function vDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function gDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-sidebar-border mx-2 w-auto",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx(rX,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function MDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function xDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function bDe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,asChild:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const l=(i===void 0?!1:i)?Go:"div";let h;e[4]!==n?(h=oe("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",n),e[4]=n,e[5]=h):h=e[5];let p;return e[6]!==l||e[7]!==a||e[8]!==h?(p=M.jsx(l,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:h,...a}),e[6]=l,e[7]=a,e[8]=h,e[9]=p):p=e[9],p}function wDe(t){const e=Z.c(10);let n,a,i;e[0]!==t?({className:n,asChild:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const l=(i===void 0?!1:i)?Go:"button";let h;e[4]!==n?(h=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",n),e[4]=n,e[5]=h):h=e[5];let p;return e[6]!==l||e[7]!==a||e[8]!==h?(p=M.jsx(l,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:h,...a}),e[6]=l,e[7]=a,e[8]=h,e[9]=p):p=e[9],p}function _De(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("w-full text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function SDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function CDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("group/menu-item relative",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}const LDe=YT("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function NDe(t){const e=Z.c(28);let n,a,i,c,l,h,p;e[0]!==t?({asChild:i,isActive:c,variant:l,size:h,tooltip:p,className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h,e[7]=p):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6],p=e[7]);const f=i===void 0?!1:i,k=c===void 0?!1:c,m=l===void 0?"default":l,x=h===void 0?"default":h,b=f?Go:"button",{isMobile:w,state:S}=wu();let _;e[8]!==n||e[9]!==x||e[10]!==m?(_=oe(LDe({variant:m,size:x}),n),e[8]=n,e[9]=x,e[10]=m,e[11]=_):_=e[11];let C;e[12]!==b||e[13]!==k||e[14]!==a||e[15]!==x||e[16]!==_?(C=M.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":x,"data-active":k,className:_,...a}),e[12]=b,e[13]=k,e[14]=a,e[15]=x,e[16]=_,e[17]=C):C=e[17];const N=C;if(!p)return N;if(typeof p=="string"){let D;e[18]!==p?(D={children:p},e[18]=p,e[19]=D):D=e[19],p=D}let A;e[20]!==N?(A=M.jsx(xX,{asChild:!0,children:N}),e[20]=N,e[21]=A):A=e[21];const $=S!=="collapsed"||w;let E;e[22]!==$||e[23]!==p?(E=M.jsx(bX,{side:"right",align:"center",hidden:$,...p}),e[22]=$,e[23]=p,e[24]=E):E=e[24];let P;return e[25]!==A||e[26]!==E?(P=M.jsxs(MX,{children:[A,E]}),e[25]=A,e[26]=E,e[27]=P):P=e[27],P}function ADe(t){const e=Z.c(12);let n,a,i,c;e[0]!==t?({className:n,asChild:i,showOnHover:c,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c):(n=e[1],a=e[2],i=e[3],c=e[4]);const l=i===void 0?!1:i,h=c===void 0?!1:c,p=l?Go:"button",f=h&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0";let k;e[5]!==n||e[6]!==f?(k=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",f,n),e[5]=n,e[6]=f,e[7]=k):k=e[7];let m;return e[8]!==p||e[9]!==a||e[10]!==k?(m=M.jsx(p,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:k,...a}),e[8]=p,e[9]=a,e[10]=k,e[11]=m):m=e[11],m}function IDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function $De(t){const e=Z.c(14);let n,a,i;e[0]!==t?({className:n,showIcon:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);const c=i===void 0?!1:i;let l;l=`${Math.floor(Math.random()*40)+50}%`;const h=l;let p;e[4]!==n?(p=oe("flex h-8 items-center gap-2 rounded-md px-2",n),e[4]=n,e[5]=p):p=e[5];let f;e[6]!==c?(f=c&&M.jsx(RT,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),e[6]=c,e[7]=f):f=e[7];let k;e[8]===Symbol.for("react.memo_cache_sentinel")?(k={"--skeleton-width":h},e[8]=k):k=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=M.jsx(RT,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:k}),e[9]=m):m=e[9];let x;return e[10]!==a||e[11]!==p||e[12]!==f?(x=M.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:p,...a,children:[f,m]}),e[10]=a,e[11]=p,e[12]=f,e[13]=x):x=e[13],x}function EDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function RDe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("group/menu-sub-item relative",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function TDe(t){const e=Z.c(16);let n,a,i,c,l;e[0]!==t?({asChild:i,size:c,isActive:l,className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5]);const h=i===void 0?!1:i,p=c===void 0?"md":c,f=l===void 0?!1:l,k=h?Go:"a",m=p==="sm"&&"text-xs",x=p==="md"&&"text-sm";let b;e[6]!==n||e[7]!==m||e[8]!==x?(b=oe("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",m,x,"group-data-[collapsible=icon]:hidden",n),e[6]=n,e[7]=m,e[8]=x,e[9]=b):b=e[9];let w;return e[10]!==k||e[11]!==f||e[12]!==a||e[13]!==p||e[14]!==b?(w=M.jsx(k,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":p,"data-active":f,className:b,...a}),e[10]=k,e[11]=f,e[12]=a,e[13]=p,e[14]=b,e[15]=w):w=e[15],w}var _X=["PageUp","PageDown"],SX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],CX={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ll="Slider",[DT,jDe,DDe]=pu(Ll),[LX,zqe]=Ot(Ll,[DDe]),[ODe,cI]=LX(Ll),NX=v.forwardRef((t,e)=>{const{name:n,min:a=0,max:i=100,step:c=1,orientation:l="horizontal",disabled:h=!1,minStepsBetweenThumbs:p=0,defaultValue:f=[a],value:k,onValueChange:m=()=>{},onValueCommit:x=()=>{},inverted:b=!1,form:w,...S}=t,_=v.useRef(new Set),C=v.useRef(0),A=l==="horizontal"?qDe:PDe,[$=[],E]=on({prop:k,defaultProp:f,onChange:le=>{var fe;(fe=[..._.current][C.current])==null||fe.focus(),m(le)}}),P=v.useRef($);function D(le){const Q=FDe($,le);re(le,Q)}function H(le){re(le,C.current)}function ie(){const le=P.current[C.current];$[C.current]!==le&&x($)}function re(le,Q,{commit:fe}={commit:!1}){const ke=WDe(c),ye=YDe(Math.round((le-a)/c)*c+a,ke),j=SA(ye,[a,i]);E((B=[])=>{const R=BDe(B,j,Q);if(ZDe(R,p*c)){C.current=R.indexOf(j);const U=String(R)!==String(B);return U&&fe&&x(R),U?R:B}else return B})}return M.jsx(ODe,{scope:t.__scopeSlider,name:n,disabled:h,min:a,max:i,valueIndexToChangeRef:C,thumbs:_.current,values:$,orientation:l,form:w,children:M.jsx(DT.Provider,{scope:t.__scopeSlider,children:M.jsx(DT.Slot,{scope:t.__scopeSlider,children:M.jsx(A,{"aria-disabled":h,"data-disabled":h?"":void 0,...S,ref:e,onPointerDown:ue(S.onPointerDown,()=>{h||(P.current=$)}),min:a,max:i,inverted:b,onSlideStart:h?void 0:D,onSlideMove:h?void 0:H,onSlideEnd:h?void 0:ie,onHomeKeyDown:()=>!h&&re(a,0,{commit:!0}),onEndKeyDown:()=>!h&&re(i,$.length-1,{commit:!0}),onStepKeyDown:({event:le,direction:Q})=>{if(!h){const ye=_X.includes(le.key)||le.shiftKey&&SX.includes(le.key)?10:1,j=C.current,B=$[j],R=c*ye*Q;re(B+R,j,{commit:!0})}}})})})})});NX.displayName=Ll;var[AX,IX]=LX(Ll,{startEdge:"left",endEdge:"right",size:"width",direction:1}),qDe=v.forwardRef((t,e)=>{const{min:n,max:a,dir:i,inverted:c,onSlideStart:l,onSlideMove:h,onSlideEnd:p,onStepKeyDown:f,...k}=t,[m,x]=v.useState(null),b=Ae(e,A=>x(A)),w=v.useRef(void 0),S=f1(i),_=S==="ltr",C=_&&!c||!_&&c;function N(A){const $=w.current||m.getBoundingClientRect(),E=[0,$.width],D=aD(E,C?[n,a]:[a,n]);return w.current=$,D(A-$.left)}return M.jsx(AX,{scope:t.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:M.jsx($X,{dir:S,"data-orientation":"horizontal",...k,ref:b,style:{...k.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:A=>{const $=N(A.clientX);l==null||l($)},onSlideMove:A=>{const $=N(A.clientX);h==null||h($)},onSlideEnd:()=>{w.current=void 0,p==null||p()},onStepKeyDown:A=>{const E=CX[C?"from-left":"from-right"].includes(A.key);f==null||f({event:A,direction:E?-1:1})}})})}),PDe=v.forwardRef((t,e)=>{const{min:n,max:a,inverted:i,onSlideStart:c,onSlideMove:l,onSlideEnd:h,onStepKeyDown:p,...f}=t,k=v.useRef(null),m=Ae(e,k),x=v.useRef(void 0),b=!i;function w(S){const _=x.current||k.current.getBoundingClientRect(),C=[0,_.height],A=aD(C,b?[a,n]:[n,a]);return x.current=_,A(S-_.top)}return M.jsx(AX,{scope:t.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:M.jsx($X,{"data-orientation":"vertical",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const _=w(S.clientY);c==null||c(_)},onSlideMove:S=>{const _=w(S.clientY);l==null||l(_)},onSlideEnd:()=>{x.current=void 0,h==null||h()},onStepKeyDown:S=>{const C=CX[b?"from-bottom":"from-top"].includes(S.key);p==null||p({event:S,direction:C?-1:1})}})})}),$X=v.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:a,onSlideMove:i,onSlideEnd:c,onHomeKeyDown:l,onEndKeyDown:h,onStepKeyDown:p,...f}=t,k=cI(Ll,n);return M.jsx(Ce.span,{...f,ref:e,onKeyDown:ue(t.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(h(m),m.preventDefault()):_X.concat(SX).includes(m.key)&&(p(m),m.preventDefault())}),onPointerDown:ue(t.onPointerDown,m=>{const x=m.target;x.setPointerCapture(m.pointerId),m.preventDefault(),k.thumbs.has(x)?x.focus():a(m)}),onPointerMove:ue(t.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:ue(t.onPointerUp,m=>{const x=m.target;x.hasPointerCapture(m.pointerId)&&(x.releasePointerCapture(m.pointerId),c(m))})})}),EX="SliderTrack",RX=v.forwardRef((t,e)=>{const{__scopeSlider:n,...a}=t,i=cI(EX,n);return M.jsx(Ce.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...a,ref:e})});RX.displayName=EX;var OT="SliderRange",TX=v.forwardRef((t,e)=>{const{__scopeSlider:n,...a}=t,i=cI(OT,n),c=IX(OT,n),l=v.useRef(null),h=Ae(e,l),p=i.values.length,f=i.values.map(x=>OX(x,i.min,i.max)),k=p>1?Math.min(...f):0,m=100-Math.max(...f);return M.jsx(Ce.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...a,ref:h,style:{...t.style,[c.startEdge]:k+"%",[c.endEdge]:m+"%"}})});TX.displayName=OT;var qT="SliderThumb",jX=v.forwardRef((t,e)=>{const n=jDe(t.__scopeSlider),[a,i]=v.useState(null),c=Ae(e,h=>i(h)),l=v.useMemo(()=>a?n().findIndex(h=>h.ref.current===a):-1,[n,a]);return M.jsx(zDe,{...t,ref:c,index:l})}),zDe=v.forwardRef((t,e)=>{const{__scopeSlider:n,index:a,name:i,...c}=t,l=cI(qT,n),h=IX(qT,n),[p,f]=v.useState(null),k=Ae(e,N=>f(N)),m=p?l.form||!!p.closest("form"):!0,x=au(p),b=l.values[a],w=b===void 0?0:OX(b,l.min,l.max),S=VDe(a,l.values.length),_=x==null?void 0:x[h.size],C=_?UDe(_,w,h.direction):0;return v.useEffect(()=>{if(p)return l.thumbs.add(p),()=>{l.thumbs.delete(p)}},[p,l.thumbs]),M.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[h.startEdge]:`calc(${w}% + ${C}px)`},children:[M.jsx(DT.ItemSlot,{scope:t.__scopeSlider,children:M.jsx(Ce.span,{role:"slider","aria-label":t["aria-label"]||S,"aria-valuemin":l.min,"aria-valuenow":b,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...c,ref:k,style:b===void 0?{display:"none"}:t.style,onFocus:ue(t.onFocus,()=>{l.valueIndexToChangeRef.current=a})})}),m&&M.jsx(DX,{name:i??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:b},a)]})});jX.displayName=qT;var HDe="RadioBubbleInput",DX=v.forwardRef(({__scopeSlider:t,value:e,...n},a)=>{const i=v.useRef(null),c=Ae(i,a),l=PA(e);return v.useEffect(()=>{const h=i.current;if(!h)return;const p=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(p,"value").set;if(l!==e&&k){const m=new Event("input",{bubbles:!0});k.call(h,e),h.dispatchEvent(m)}},[l,e]),M.jsx(Ce.input,{style:{display:"none"},...n,ref:c,defaultValue:e})});DX.displayName=HDe;function BDe(t=[],e,n){const a=[...t];return a[n]=e,a.sort((i,c)=>i-c)}function OX(t,e,n){const c=100/(n-e)*(t-e);return SA(c,[0,100])}function VDe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function FDe(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),a=Math.min(...n);return n.indexOf(a)}function UDe(t,e,n){const a=t/2,c=aD([0,50],[0,a]);return(a-c(e)*n)*n}function GDe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function ZDe(t,e){if(e>0){const n=GDe(t);return Math.min(...n)>=e}return!0}function aD(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const a=(e[1]-e[0])/(t[1]-t[0]);return e[0]+a*(n-t[0])}}function WDe(t){return(String(t).split(".")[1]||"").length}function YDe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var XDe=NX,KDe=RX,QDe=TX,JDe=jX;function eOe(t){const e=Z.c(28);let n,a,i,c,l,h,p;e[0]!==t?({className:n,defaultValue:a,value:p,min:l,max:h,id:i,...c}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i,e[4]=c,e[5]=l,e[6]=h,e[7]=p):(n=e[1],a=e[2],i=e[3],c=e[4],l=e[5],h=e[6],p=e[7]);const f=l===void 0?0:l,k=h===void 0?100:h;let m,x;e[8]!==a||e[9]!==k||e[10]!==f||e[11]!==p?(x=Array.isArray(p)?p:Array.isArray(a)?a:[f,k],e[8]=a,e[9]=k,e[10]=f,e[11]=p,e[12]=x):x=e[12],m=x;const b=m;let w;e[13]!==n?(w=oe("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",n),e[13]=n,e[14]=w):w=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=oe("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),e[15]=S):S=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=M.jsx(KDe,{"data-slot":"slider-track",className:S,children:M.jsx(QDe,{"data-slot":"slider-range",className:oe("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),e[16]=_):_=e[16];let C;e[17]!==b.length?(C=Array.from({length:b.length},tOe),e[17]=b.length,e[18]=C):C=e[18];let N;return e[19]!==a||e[20]!==i||e[21]!==k||e[22]!==f||e[23]!==c||e[24]!==w||e[25]!==C||e[26]!==p?(N=M.jsxs(XDe,{"data-slot":"slider",defaultValue:a,value:p,min:f,max:k,id:i,className:w,...c,children:[_,C]}),e[19]=a,e[20]=i,e[21]=k,e[22]=f,e[23]=c,e[24]=w,e[25]=C,e[26]=p,e[27]=N):N=e[27],N}function tOe(t,e){return M.jsx(JDe,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},e)}var nOe=(t,e,n,a,i,c,l,h)=>{let p=document.documentElement,f=["light","dark"];function k(b){(Array.isArray(t)?t:[t]).forEach(w=>{let S=w==="class",_=S&&c?i.map(C=>c[C]||C):i;S?(p.classList.remove(..._),p.classList.add(c&&c[b]?c[b]:b)):p.setAttribute(w,b)}),m(b)}function m(b){h&&f.includes(b)&&(p.style.colorScheme=b)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)k(a);else try{let b=localStorage.getItem(e)||n,w=l&&b==="system"?x():b;k(w)}catch{}},aOe=v.createContext(void 0),oOe={setTheme:t=>{},themes:[]},rOe=()=>{var t;return(t=v.useContext(aOe))!=null?t:oOe};v.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:a,enableColorScheme:i,defaultTheme:c,value:l,themes:h,nonce:p,scriptProps:f})=>{let k=JSON.stringify([n,e,c,t,h,l,a,i]).slice(1,-1);return v.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${nOe.toString()})(${k})`}})});function iOe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const cOe=t=>{switch(t){case"success":return dOe;case"info":return hOe;case"warning":return uOe;case"error":return pOe;default:return null}},sOe=Array(12).fill(0),lOe=({visible:t,className:e})=>me.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},me.createElement("div",{className:"sonner-spinner"},sOe.map((n,a)=>me.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),dOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),uOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},me.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fOe=me.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},me.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),me.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yOe=()=>{const[t,e]=me.useState(document.hidden);return me.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let PT=1;class mOe{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:a,...i}=e,c=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:PT++,l=this.toasts.find(p=>p.id===c),h=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),l?this.toasts=this.toasts.map(p=>p.id===c?(this.publish({...p,...e,id:c,title:a}),{...p,...e,id:c,dismissible:h,title:a}):p):this.addToast({title:a,...i,dismissible:h,id:c}),c},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let c=a!==void 0,l;const h=i.then(async f=>{if(l=["resolve",f],me.isValidElement(f))c=!1,this.create({id:a,type:"default",message:f});else if(vOe(f)&&!f.ok){c=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,x=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:x,...w})}else if(f instanceof Error){c=!1;const m=typeof n.error=="function"?await n.error(f):n.error,x=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:x,...w})}else if(n.success!==void 0){c=!1;const m=typeof n.success=="function"?await n.success(f):n.success,x=typeof n.description=="function"?await n.description(f):n.description,w=typeof m=="object"&&!me.isValidElement(m)?m:{message:m};this.create({id:a,type:"success",description:x,...w})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){c=!1;const k=typeof n.error=="function"?await n.error(f):n.error,m=typeof n.description=="function"?await n.description(f):n.description,b=typeof k=="object"&&!me.isValidElement(k)?k:{message:k};this.create({id:a,type:"error",description:m,...b})}}).finally(()=>{c&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),p=()=>new Promise((f,k)=>h.then(()=>l[0]==="reject"?k(l[1]):f(l[1])).catch(k));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(e,n)=>{const a=(n==null?void 0:n.id)||PT++;return this.create({jsx:e(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vn=new mOe,kOe=(t,e)=>{const n=(e==null?void 0:e.id)||PT++;return vn.addToast({title:t,...e,id:n}),n},vOe=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",gOe=kOe,MOe=()=>vn.toasts,xOe=()=>vn.getActiveToasts(),Hqe=Object.assign(gOe,{success:vn.success,info:vn.info,warning:vn.warning,error:vn.error,custom:vn.custom,message:vn.message,promise:vn.promise,dismiss:vn.dismiss,loading:vn.loading},{getHistory:MOe,getToasts:xOe});iOe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function F2(t){return t.label!==void 0}const bOe=3,wOe="24px",_Oe="16px",hB=4e3,SOe=356,COe=14,LOe=45,NOe=200;function wa(...t){return t.filter(Boolean).join(" ")}function AOe(t){const[e,n]=t.split("-"),a=[];return e&&a.push(e),n&&a.push(n),a}const IOe=t=>{var e,n,a,i,c,l,h,p,f;const{invert:k,toast:m,unstyled:x,interacting:b,setHeights:w,visibleToasts:S,heights:_,index:C,toasts:N,expanded:A,removeToast:$,defaultRichColors:E,closeButton:P,style:D,cancelButtonStyle:H,actionButtonStyle:ie,className:re="",descriptionClassName:le="",duration:Q,position:fe,gap:ke,expandByDefault:ye,classNames:j,icons:B,closeButtonAriaLabel:R="Close toast"}=t,[U,T]=me.useState(null),[z,O]=me.useState(null),[V,W]=me.useState(!1),[ae,ce]=me.useState(!1),[ee,ge]=me.useState(!1),[ve,Me]=me.useState(!1),[be,xe]=me.useState(!1),[Te,Be]=me.useState(0),[ft,nt]=me.useState(0),Pe=me.useRef(m.duration||Q||hB),$t=me.useRef(null),at=me.useRef(null),wn=C===0,Bt=C+1<=S,wt=m.type,en=m.dismissible!==!1,pa=m.className||"",Nl=m.descriptionClassName||"",qn=me.useMemo(()=>_.findIndex(Le=>Le.toastId===m.id)||0,[_,m.id]),Vt=me.useMemo(()=>{var Le;return(Le=m.closeButton)!=null?Le:P},[m.closeButton,P]),_n=me.useMemo(()=>m.duration||Q||hB,[m.duration,Q]),Mt=me.useRef(0),Pn=me.useRef(0),Jo=me.useRef(0),fa=me.useRef(null),[ro,ya]=fe.split("-"),ln=me.useMemo(()=>_.reduce((Le,tt,yt)=>yt>=qn?Le:Le+tt.height,0),[_,qn]),K=yOe(),te=m.invert||k,Ue=wt==="loading";Pn.current=me.useMemo(()=>qn*ke+ln,[qn,ln]),me.useEffect(()=>{Pe.current=_n},[_n]),me.useEffect(()=>{W(!0)},[]),me.useEffect(()=>{const Le=at.current;if(Le){const tt=Le.getBoundingClientRect().height;return nt(tt),w(yt=>[{toastId:m.id,height:tt,position:m.position},...yt]),()=>w(yt=>yt.filter(mt=>mt.toastId!==m.id))}},[w,m.id]),me.useLayoutEffect(()=>{if(!V)return;const Le=at.current,tt=Le.style.height;Le.style.height="auto";const yt=Le.getBoundingClientRect().height;Le.style.height=tt,nt(yt),w(mt=>mt.find(_t=>_t.toastId===m.id)?mt.map(_t=>_t.toastId===m.id?{..._t,height:yt}:_t):[{toastId:m.id,height:yt,position:m.position},...mt])},[V,m.title,m.description,w,m.id]);const Ve=me.useCallback(()=>{ce(!0),Be(Pn.current),w(Le=>Le.filter(tt=>tt.toastId!==m.id)),setTimeout(()=>{$(m)},NOe)},[m,$,w,Pn]);me.useEffect(()=>{if(m.promise&&wt==="loading"||m.duration===1/0||m.type==="loading")return;let Le;return A||b||K?(()=>{if(Jo.current<Mt.current){const mt=new Date().getTime()-Mt.current;Pe.current=Pe.current-mt}Jo.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(Mt.current=new Date().getTime(),Le=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Ve()},Pe.current))})(),()=>clearTimeout(Le)},[A,b,m,wt,K,Ve]),me.useEffect(()=>{m.delete&&Ve()},[Ve,m.delete]);function et(){var Le;if(B!=null&&B.loading){var tt;return me.createElement("div",{className:wa(j==null?void 0:j.loader,m==null||(tt=m.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":wt==="loading"},B.loading)}return me.createElement(lOe,{className:wa(j==null?void 0:j.loader,m==null||(Le=m.classNames)==null?void 0:Le.loader),visible:wt==="loading"})}const je=m.icon||(B==null?void 0:B[wt])||cOe(wt);var Xt,zn;return me.createElement("li",{tabIndex:0,ref:at,className:wa(re,pa,j==null?void 0:j.toast,m==null||(e=m.classNames)==null?void 0:e.toast,j==null?void 0:j.default,j==null?void 0:j[wt],m==null||(n=m.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(Xt=m.richColors)!=null?Xt:E,"data-styled":!(m.jsx||m.unstyled||x),"data-mounted":V,"data-promise":!!m.promise,"data-swiped":be,"data-removed":ae,"data-visible":Bt,"data-y-position":ro,"data-x-position":ya,"data-index":C,"data-front":wn,"data-swiping":ee,"data-dismissible":en,"data-type":wt,"data-invert":te,"data-swipe-out":ve,"data-swipe-direction":z,"data-expanded":!!(A||ye&&V),style:{"--index":C,"--toasts-before":C,"--z-index":N.length-C,"--offset":`${ae?Te:Pn.current}px`,"--initial-height":ye?"auto":`${ft}px`,...D,...m.style},onDragEnd:()=>{ge(!1),T(null),fa.current=null},onPointerDown:Le=>{Ue||!en||($t.current=new Date,Be(Pn.current),Le.target.setPointerCapture(Le.pointerId),Le.target.tagName!=="BUTTON"&&(ge(!0),fa.current={x:Le.clientX,y:Le.clientY}))},onPointerUp:()=>{var Le,tt,yt;if(ve||!en)return;fa.current=null;const mt=Number(((Le=at.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qt=Number(((tt=at.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_t=new Date().getTime()-((yt=$t.current)==null?void 0:yt.getTime()),kt=U==="x"?mt:qt,vt=Math.abs(kt)/_t;if(Math.abs(kt)>=LOe||vt>.11){Be(Pn.current),m.onDismiss==null||m.onDismiss.call(m,m),O(U==="x"?mt>0?"right":"left":qt>0?"down":"up"),Ve(),Me(!0);return}else{var Xe,St;(Xe=at.current)==null||Xe.style.setProperty("--swipe-amount-x","0px"),(St=at.current)==null||St.style.setProperty("--swipe-amount-y","0px")}xe(!1),ge(!1),T(null)},onPointerMove:Le=>{var tt,yt,mt;if(!fa.current||!en||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const _t=Le.clientY-fa.current.y,kt=Le.clientX-fa.current.x;var vt;const Xe=(vt=t.swipeDirections)!=null?vt:AOe(fe);!U&&(Math.abs(kt)>1||Math.abs(_t)>1)&&T(Math.abs(kt)>Math.abs(_t)?"x":"y");let St={x:0,y:0};const Jn=Sn=>1/(1.5+Math.abs(Sn)/20);if(U==="y"){if(Xe.includes("top")||Xe.includes("bottom"))if(Xe.includes("top")&&_t<0||Xe.includes("bottom")&&_t>0)St.y=_t;else{const Sn=_t*Jn(_t);St.y=Math.abs(Sn)<Math.abs(_t)?Sn:_t}}else if(U==="x"&&(Xe.includes("left")||Xe.includes("right")))if(Xe.includes("left")&&kt<0||Xe.includes("right")&&kt>0)St.x=kt;else{const Sn=kt*Jn(kt);St.x=Math.abs(Sn)<Math.abs(kt)?Sn:kt}(Math.abs(St.x)>0||Math.abs(St.y)>0)&&xe(!0),(yt=at.current)==null||yt.style.setProperty("--swipe-amount-x",`${St.x}px`),(mt=at.current)==null||mt.style.setProperty("--swipe-amount-y",`${St.y}px`)}},Vt&&!m.jsx&&wt!=="loading"?me.createElement("button",{"aria-label":R,"data-disabled":Ue,"data-close-button":!0,onClick:Ue||!en?()=>{}:()=>{Ve(),m.onDismiss==null||m.onDismiss.call(m,m)},className:wa(j==null?void 0:j.closeButton,m==null||(a=m.classNames)==null?void 0:a.closeButton)},(zn=B==null?void 0:B.close)!=null?zn:fOe):null,(wt||m.icon||m.promise)&&m.icon!==null&&((B==null?void 0:B[wt])!==null||m.icon)?me.createElement("div",{"data-icon":"",className:wa(j==null?void 0:j.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||et():null,m.type!=="loading"?je:null):null,me.createElement("div",{"data-content":"",className:wa(j==null?void 0:j.content,m==null||(c=m.classNames)==null?void 0:c.content)},me.createElement("div",{"data-title":"",className:wa(j==null?void 0:j.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?me.createElement("div",{"data-description":"",className:wa(le,Nl,j==null?void 0:j.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),me.isValidElement(m.cancel)?m.cancel:m.cancel&&F2(m.cancel)?me.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||H,onClick:Le=>{F2(m.cancel)&&en&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Le),Ve())},className:wa(j==null?void 0:j.cancelButton,m==null||(p=m.classNames)==null?void 0:p.cancelButton)},m.cancel.label):null,me.isValidElement(m.action)?m.action:m.action&&F2(m.action)?me.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||ie,onClick:Le=>{F2(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Le),!Le.defaultPrevented&&Ve())},className:wa(j==null?void 0:j.actionButton,m==null||(f=m.classNames)==null?void 0:f.actionButton)},m.action.label):null)};function pB(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function $Oe(t,e){const n={};return[t,e].forEach((a,i)=>{const c=i===1,l=c?"--mobile-offset":"--offset",h=c?_Oe:wOe;function p(f){["top","right","bottom","left"].forEach(k=>{n[`${l}-${k}`]=typeof f=="number"?`${f}px`:f})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(f=>{a[f]===void 0?n[`${l}-${f}`]=h:n[`${l}-${f}`]=typeof a[f]=="number"?`${a[f]}px`:a[f]}):p(h)}),n}const EOe=me.forwardRef(function(e,n){const{invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:l,closeButton:h,className:p,offset:f,mobileOffset:k,theme:m="light",richColors:x,duration:b,style:w,visibleToasts:S=bOe,toastOptions:_,dir:C=pB(),gap:N=COe,icons:A,containerAriaLabel:$="Notifications"}=e,[E,P]=me.useState([]),D=me.useMemo(()=>Array.from(new Set([i].concat(E.filter(z=>z.position).map(z=>z.position)))),[E,i]),[H,ie]=me.useState([]),[re,le]=me.useState(!1),[Q,fe]=me.useState(!1),[ke,ye]=me.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=me.useRef(null),B=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=me.useRef(null),U=me.useRef(!1),T=me.useCallback(z=>{P(O=>{var V;return(V=O.find(W=>W.id===z.id))!=null&&V.delete||vn.dismiss(z.id),O.filter(({id:W})=>W!==z.id)})},[]);return me.useEffect(()=>vn.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{P(O=>O.map(V=>V.id===z.id?{...V,delete:!0}:V))});return}setTimeout(()=>{OA.flushSync(()=>{P(O=>{const V=O.findIndex(W=>W.id===z.id);return V!==-1?[...O.slice(0,V),{...O[V],...z},...O.slice(V+1)]:[z,...O]})})})}),[E]),me.useEffect(()=>{if(m!=="system"){ye(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ye("dark"):ye("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:O})=>{ye(O?"dark":"light")})}catch{z.addListener(({matches:V})=>{try{ye(V?"dark":"light")}catch(W){console.error(W)}})}},[m]),me.useEffect(()=>{E.length<=1&&le(!1)},[E]),me.useEffect(()=>{const z=O=>{var V;if(c.every(ce=>O[ce]||O.code===ce)){var ae;le(!0),(ae=j.current)==null||ae.focus()}O.code==="Escape"&&(document.activeElement===j.current||(V=j.current)!=null&&V.contains(document.activeElement))&&le(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[c]),me.useEffect(()=>{if(j.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,U.current=!1)}},[j.current]),me.createElement("section",{ref:n,"aria-label":`${$} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((z,O)=>{var V;const[W,ae]=z.split("-");return E.length?me.createElement("ol",{key:z,dir:C==="auto"?pB():C,tabIndex:-1,ref:j,className:p,"data-sonner-toaster":!0,"data-sonner-theme":ke,"data-y-position":W,"data-lifted":re&&E.length>1&&!l,"data-x-position":ae,style:{"--front-toast-height":`${((V=H[0])==null?void 0:V.height)||0}px`,"--width":`${SOe}px`,"--gap":`${N}px`,...w,...$Oe(f,k)},onBlur:ce=>{U.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(U.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||U.current||(U.current=!0,R.current=ce.relatedTarget)},onMouseEnter:()=>le(!0),onMouseMove:()=>le(!0),onMouseLeave:()=>{Q||le(!1)},onDragEnd:()=>le(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||fe(!0)},onPointerUp:()=>fe(!1)},E.filter(ce=>!ce.position&&O===0||ce.position===z).map((ce,ee)=>{var ge,ve;return me.createElement(IOe,{key:ce.id,icons:A,index:ee,toast:ce,defaultRichColors:x,duration:(ge=_==null?void 0:_.duration)!=null?ge:b,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:a,visibleToasts:S,closeButton:(ve=_==null?void 0:_.closeButton)!=null?ve:h,interacting:Q,position:z,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:T,toasts:E.filter(Me=>Me.position==ce.position),heights:H.filter(Me=>Me.position==ce.position),setHeights:ie,expandByDefault:l,gap:N,expanded:re,swipeDirections:e.swipeDirections})})):null}))}),ROe=t=>{const e=Z.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{theme:a}=rOe(),c=a===void 0?"system":a;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},e[2]=l):l=e[2];let h;return e[3]!==n||e[4]!==c?(h=M.jsx(EOe,{theme:c,className:"toaster group",style:l,...n}),e[3]=n,e[4]=c,e[5]=h):h=e[5],h};function TOe(t){const e=jOe(t),n=v.forwardRef((a,i)=>{const{children:c,...l}=a,h=v.Children.toArray(c),p=h.find(OOe);if(p){const f=p.props.children,k=h.map(m=>m===p?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:m);return M.jsx(e,{...l,ref:i,children:v.isValidElement(f)?v.cloneElement(f,void 0,k):null})}return M.jsx(e,{...l,ref:i,children:c})});return n.displayName=`${t}.Slot`,n}function jOe(t){const e=v.forwardRef((n,a)=>{const{children:i,...c}=n,l=v.isValidElement(i)?POe(i):void 0,h=Ae(l,a);if(v.isValidElement(i)){const p=qOe(c,i.props);return i.type!==v.Fragment&&(p.ref=h),v.cloneElement(i,p)}return v.Children.count(i)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var DOe=Symbol("radix.slottable");function OOe(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===DOe}function qOe(t,e){const n={...e};for(const a in e){const i=t[a],c=e[a];/^on[A-Z]/.test(a)?i&&c?n[a]=(...h)=>{const p=c(...h);return i(...h),p}:i&&(n[a]=i):a==="style"?n[a]={...i,...c}:a==="className"&&(n[a]=[i,c].filter(Boolean).join(" "))}return{...t,...n}}function POe(t){var a,i;let e=(a=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:a.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var zOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qX=zOe.reduce((t,e)=>{const n=TOe(`Primitive.${e}`),a=v.forwardRef((i,c)=>{const{asChild:l,...h}=i,p=l?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(p,{...h,ref:c})});return a.displayName=`Primitive.${e}`,{...t,[e]:a}},{}),sI="Switch",[HOe,Bqe]=Ot(sI),[BOe,VOe]=HOe(sI),PX=v.forwardRef((t,e)=>{const{__scopeSwitch:n,name:a,checked:i,defaultChecked:c,required:l,disabled:h,value:p="on",onCheckedChange:f,form:k,...m}=t,[x,b]=v.useState(null),w=Ae(e,A=>b(A)),S=v.useRef(!1),_=x?k||!!x.closest("form"):!0,[C,N]=on({prop:i,defaultProp:c??!1,onChange:f,caller:sI});return M.jsxs(BOe,{scope:n,checked:C,disabled:h,children:[M.jsx(qX.button,{type:"button",role:"switch","aria-checked":C,"aria-required":l,"data-state":VX(C),"data-disabled":h?"":void 0,disabled:h,value:p,...m,ref:w,onClick:ue(t.onClick,A=>{N($=>!$),_&&(S.current=A.isPropagationStopped(),S.current||A.stopPropagation())})}),_&&M.jsx(BX,{control:x,bubbles:!S.current,name:a,value:p,checked:C,required:l,disabled:h,form:k,style:{transform:"translateX(-100%)"}})]})});PX.displayName=sI;var zX="SwitchThumb",HX=v.forwardRef((t,e)=>{const{__scopeSwitch:n,...a}=t,i=VOe(zX,n);return M.jsx(qX.span,{"data-state":VX(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:e})});HX.displayName=zX;var FOe="SwitchBubbleInput",BX=v.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:a=!0,...i},c)=>{const l=v.useRef(null),h=Ae(l,c),p=PA(n),f=au(e);return v.useEffect(()=>{const k=l.current;if(!k)return;const m=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(m,"checked").set;if(p!==n&&b){const w=new Event("click",{bubbles:a});b.call(k,n),k.dispatchEvent(w)}},[p,n,a]),M.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:h,style:{...i.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});BX.displayName=FOe;function VX(t){return t?"checked":"unchecked"}var UOe=PX,GOe=HX;function ZOe(t){const e=Z.c(9);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=i):i=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=M.jsx(GOe,{"data-slot":"switch-thumb",className:oe("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=c):c=e[5];let l;return e[6]!==a||e[7]!==i?(l=M.jsx(UOe,{"data-slot":"switch",className:i,...a,children:c}),e[6]=a,e[7]=i,e[8]=l):l=e[8],l}function WOe(t){const e=Z.c(14);let n,a,i;e[0]!==t?({className:n,wrapperHeight:i,...a}=t,e[0]=t,e[1]=n,e[2]=a,e[3]=i):(n=e[1],a=e[2],i=e[3]);let c;e[4]!==i?(c=oe("relative w-full overflow-x-auto",i),e[4]=i,e[5]=c):c=e[5];let l;e[6]!==n?(l=oe("w-full caption-bottom text-sm",n),e[6]=n,e[7]=l):l=e[7];let h;e[8]!==a||e[9]!==l?(h=M.jsx("table",{"data-slot":"table",className:l,...a}),e[8]=a,e[9]=l,e[10]=h):h=e[10];let p;return e[11]!==c||e[12]!==h?(p=M.jsx("div",{"data-slot":"table-container",className:c,children:h}),e[11]=c,e[12]=h,e[13]=p):p=e[13],p}function YOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("[&_tr]:border-b",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("thead",{"data-slot":"table-header",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function XOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("[&_tr:last-child]:border-0",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tbody",{"data-slot":"table-body",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function KOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tfoot",{"data-slot":"table-footer",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function QOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("tr",{"data-slot":"table-row",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function JOe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("th",{"data-slot":"table-head",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function eqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("td",{"data-slot":"table-cell",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function tqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("text-muted-foreground mt-4 text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("caption",{"data-slot":"table-caption",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function nqe(t){const e=Z.c(8);let n,a;e[0]!==t?({className:n,...a}=t,e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let i;e[3]!==n?(i=oe("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),e[3]=n,e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==i?(c=M.jsx("textarea",{"data-slot":"textarea",className:i,...a}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function aqe(){window.UIComponents??(window.UIComponents={}),Object.assign(window.UIComponents,{Avatar:Fae,AvatarImage:Uae,AvatarFallback:Gae,Badge:Wae,Breadcrumb:X9e,BreadcrumbList:K9e,BreadcrumbItem:Q9e,BreadcrumbLink:J9e,BreadcrumbPage:ewe,BreadcrumbSeparator:twe,BreadcrumbEllipsis:nwe,Button:XT,Calendar:VSe,Card:GSe,CardHeader:ZSe,CardFooter:QSe,CardTitle:WSe,CardAction:XSe,CardDescription:YSe,CardContent:KSe,Checkbox:uCe,Collapsible:vCe,CollapsibleTrigger:gCe,CollapsibleContent:MCe,Command:OU,CommandDialog:oNe,CommandInput:rNe,CommandList:iNe,CommandEmpty:cNe,CommandGroup:sNe,CommandItem:dNe,CommandShortcut:uNe,CommandSeparator:lNe,ContextMenu:s$e,ContextMenuTrigger:l$e,ContextMenuContent:m$e,ContextMenuItem:k$e,ContextMenuCheckboxItem:v$e,ContextMenuRadioItem:g$e,ContextMenuLabel:M$e,ContextMenuSeparator:x$e,ContextMenuShortcut:b$e,ContextMenuGroup:d$e,ContextMenuPortal:u$e,ContextMenuSub:h$e,ContextMenuSubContent:y$e,ContextMenuSubTrigger:f$e,ContextMenuRadioGroup:p$e,Dialog:IU,DialogClose:nNe,DialogContent:RU,DialogDescription:DU,DialogFooter:aNe,DialogHeader:TU,DialogOverlay:EU,DialogPortal:$U,DialogTitle:jU,DialogTrigger:tNe,DialogStack:xZ,DialogStackTrigger:w$e,DialogStackOverlay:_$e,DialogStackBody:S$e,DialogStackContent:C$e,DialogStackTitle:L$e,DialogStackDescription:N$e,DialogStackHeader:A$e,DialogStackFooter:I$e,DialogStackNext:$$e,DialogStackPrevious:E$e,DropdownMenu:tRe,DropdownMenuPortal:nRe,DropdownMenuTrigger:aRe,DropdownMenuContent:oRe,DropdownMenuGroup:rRe,DropdownMenuLabel:dRe,DropdownMenuItem:iRe,DropdownMenuCheckboxItem:cRe,DropdownMenuRadioGroup:sRe,DropdownMenuRadioItem:lRe,DropdownMenuSeparator:uRe,DropdownMenuShortcut:hRe,DropdownMenuSub:pRe,DropdownMenuSubTrigger:fRe,DropdownMenuSubContent:yRe,Input:FW,Label:vRe,Menubar:QRe,MenubarPortal:pY,MenubarMenu:JRe,MenubarTrigger:nTe,MenubarContent:aTe,MenubarGroup:eTe,MenubarSeparator:sTe,MenubarLabel:cTe,MenubarItem:oTe,MenubarShortcut:lTe,MenubarCheckboxItem:rTe,MenubarRadioGroup:tTe,MenubarRadioItem:iTe,MenubarSub:dTe,MenubarSubTrigger:uTe,MenubarSubContent:hTe,Pagination:pTe,PaginationContent:fTe,PaginationLink:Kj,PaginationItem:yTe,PaginationPrevious:mTe,PaginationNext:kTe,PaginationEllipsis:vTe,Popover:RTe,PopoverTrigger:TTe,PopoverContent:jTe,PopoverAnchor:DTe,Select:Mje,SelectContent:_je,SelectGroup:xje,SelectItem:Cje,SelectLabel:Sje,SelectScrollDownButton:aX,SelectScrollUpButton:nX,SelectSeparator:Lje,SelectTrigger:wje,SelectValue:bje,Separator:rX,Sheet:iX,SheetTrigger:Eje,SheetClose:Rje,SheetContent:cX,SheetHeader:sX,SheetFooter:Dje,SheetTitle:lX,SheetDescription:dX,Sidebar:hDe,SidebarContent:MDe,SidebarFooter:vDe,SidebarGroup:xDe,SidebarGroupAction:wDe,SidebarGroupContent:_De,SidebarGroupLabel:bDe,SidebarHeader:kDe,SidebarInput:mDe,SidebarInset:yDe,SidebarMenu:SDe,SidebarMenuAction:ADe,SidebarMenuBadge:IDe,SidebarMenuButton:NDe,SidebarMenuItem:CDe,SidebarMenuSkeleton:$De,SidebarMenuSub:EDe,SidebarMenuSubButton:TDe,SidebarMenuSubItem:RDe,SidebarProvider:uDe,SidebarRail:fDe,SidebarSeparator:gDe,SidebarTrigger:pDe,useSidebar:wu,Skeleton:RT,Slider:eOe,Toaster:ROe,Switch:ZOe,Table:WOe,TableHeader:YOe,TableBody:XOe,TableFooter:KOe,TableHead:JOe,TableRow:QOe,TableCell:eqe,TableCaption:tqe,Textarea:nqe,Tooltip:MX,TooltipTrigger:xX,TooltipContent:bX,TooltipProvider:nD})}const{createInertiaApp:oqe}=ZV;window.React=me;window.ReactDOM=OA;window.InertiajsReact=ZV;window.LucideReact=Y9e;aqe();async function rqe(t,e){for(const n of Array.isArray(t)?t:[t]){const a=e[n];if(!(typeof a>"u"))return typeof a=="function"?a():a}throw new Error(`Page not found: ${t}`)}oqe({title:t=>`${t}`,resolve:t=>rqe(`./pages/${t}.tsx`,Object.assign({"./pages/add-group.tsx":()=>Rn(()=>import("./add-group-Br44s2D6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),"./pages/add-user.tsx":()=>Rn(()=>import("./add-user-DWcH0s9-.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17]),import.meta.url),"./pages/add.tsx":()=>Rn(()=>import("./add-DOaZgoTz.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,19,20,21,22,23,24,17]),import.meta.url),"./pages/catalog.tsx":()=>Rn(()=>import("./catalog-DVyrGTNR.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,26,27,19,20,21,22,23,24,17,28,29]),import.meta.url),"./pages/dashboard.tsx":()=>Rn(()=>import("./dashboard-Dy3pk9t7.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,8,9,10,11,12,13,31]),import.meta.url),"./pages/form.tsx":()=>Rn(()=>import("./form-BXfnz6h5.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,13,33,24,19,20,21,22,23,17]),import.meta.url),"./pages/home.tsx":()=>Rn(()=>import("./home-BD4MWmm9.js"),[],import.meta.url),"./pages/init-user.tsx":()=>Rn(()=>import("./init-user-DgCD4ZN1.js"),__vite__mapDeps([34,17,12]),import.meta.url),"./pages/list.tsx":()=>Rn(()=>import("./list-C-27EH39.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,36,27,37]),import.meta.url),"./pages/login.tsx":()=>Rn(()=>import("./login-jzvVXgAV.js"),__vite__mapDeps([38,13,17,12]),import.meta.url),"./pages/module.tsx":()=>Rn(()=>import("./module-Ceq6vuwa.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url),"./pages/register.tsx":()=>Rn(()=>import("./register-C6acWsLe.js"),__vite__mapDeps([40,17,12]),import.meta.url),"./pages/welcome.tsx":()=>Rn(()=>import("./welcome-Dk7GoS5R.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)})),setup({el:t,App:e,props:n}){Bne.createRoot(t).render(M.jsx(e,{...n}))},progress:{color:"#0f4898"}});export{Ene as $,s$e as A,XT as B,Na as C,_$e as D,l$e as E,m$e as F,k$e as G,Qd as H,FW as I,tJ as J,WV as K,sc as L,GSe as M,ZSe as N,WSe as O,Wb as P,QSe as Q,nD as R,wje as S,ROe as T,MX as U,xX as V,bX as W,ZOe as X,w$e as Y,L$e as Z,$ne as _,vRe as a,nTe as a$,Rn as a0,Rne as a1,JL as a2,yDe as a3,zP as a4,OA as a5,S7 as a6,c6 as a7,j9 as a8,no as a9,tNe as aA,Eh as aB,fh as aC,vh as aD,bh as aE,Ki as aF,tx as aG,E6 as aH,uDe as aI,pDe as aJ,mm as aK,aTe as aL,FF as aM,EDe as aN,kDe as aO,SDe as aP,CDe as aQ,MDe as aR,dTe as aS,uTe as aT,hTe as aU,oTe as aV,HF as aW,gCe as aX,NDe as aY,RDe as aZ,TDe as a_,lL as aa,gl as ab,qs as ac,a1 as ad,ra as ae,Ot as af,Ae as ag,ht as ah,ue as ai,f1 as aj,on as ak,It as al,Yt as am,oe as an,TU as ao,jU as ap,nNe as aq,aNe as ar,RU as as,IU as at,JOe as au,YOe as av,QOe as aw,eqe as ax,XOe as ay,WOe as az,bje as b,QRe as b0,JRe as b1,xDe as b2,vDe as b3,hDe as b4,X9e as b5,K9e as b6,Q9e as b7,ewe as b8,J9e as b9,Si as bA,YT as bB,rX as bC,cl as bD,Ks as bE,rNe as bF,cNe as bG,dNe as bH,sNe as bI,lNe as bJ,iNe as bK,OU as bL,Ch as bM,zd as bN,ws as bO,B9 as bP,C5 as bQ,Kj as bR,yTe as bS,mTe as bT,kTe as bU,pTe as bV,fTe as bW,twe as ba,u1 as bb,Ly as bc,TTe as bd,VSe as be,jTe as bf,RTe as bg,nqe as bh,eOe as bi,vCe as bj,MCe as bk,bDe as bl,_De as bm,wu as bn,Oje as bo,tRe as bp,HS as bq,zM as br,VS as bs,Uae as bt,Gae as bu,Fae as bv,dRe as bw,uRe as bx,J8 as by,iRe as bz,Z as c,uCe as d,me as e,Cje as f,fB as g,At as h,_je as i,M as j,Mje as k,C$e as l,S$e as m,xZ as n,RT as o,GV as p,BV as q,v as r,yb as s,Hqe as t,ip as u,CW as v,aRe as w,$r as x,oRe as y,rRe as z};