@khaos-systems/helm 0.1.13 → 0.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.
@@ -0,0 +1,46 @@
1
+ "use strict";const T=require("react"),Lr=require("react-dom");function Fr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Fr(T),Bt=Fr(Lr);var Ct={exports:{}},tt={};var ir;function Vi(){if(ir)return tt;ir=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return tt.Fragment=t,tt.jsx=n,tt.jsxs=n,tt}var nt={};var cr;function Ui(){return cr||(cr=1,process.env.NODE_ENV!=="production"&&(function(){function e(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===I?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case g:return"Fragment";case y:return"Profiler";case w:return"StrictMode";case _:return"Suspense";case R:return"SuspenseList";case D:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case h:return"Portal";case C:return S.displayName||"Context";case b:return(S._context.displayName||"Context")+".Consumer";case M:var F=S.render;return S=S.displayName,S||(S=F.displayName||F.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case E:return F=S.displayName||null,F!==null?F:e(S.type)||"Memo";case A:F=S._payload,S=S._init;try{return e(S(F))}catch{}}return null}function t(S){return""+S}function n(S){try{t(S);var F=!1}catch{F=!0}if(F){F=console;var U=F.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return U.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),t(S)}}function r(S){if(S===g)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===A)return"<...>";try{var F=e(S);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function o(){var S=N.A;return S===null?null:S.getOwner()}function s(){return Error("react-stack-top-frame")}function i(S){if(L.call(S,"key")){var F=Object.getOwnPropertyDescriptor(S,"key").get;if(F&&F.isReactWarning)return!1}return S.key!==void 0}function c(S,F){function U(){$||($=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}U.isReactWarning=!0,Object.defineProperty(S,"key",{get:U,configurable:!0})}function u(){var S=e(this.type);return W[S]||(W[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function p(S,F,U,H,re,Q){var P=U.ref;return S={$$typeof:x,type:S,key:F,props:U,_owner:H},(P!==void 0?P:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:u}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function f(S,F,U,H,re,Q){var P=F.children;if(P!==void 0)if(H)if(B(P)){for(H=0;H<P.length;H++)d(P[H]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(P);if(L.call(F,"key")){P=e(S);var K=Object.keys(F).filter(function(z){return z!=="key"});H=0<K.length?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}",X[P+H]||(K=0<K.length?"{"+K.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,H,P,K,P),X[P+H]=!0)}if(P=null,U!==void 0&&(n(U),P=""+U),i(F)&&(n(F.key),P=""+F.key),"key"in F){U={};for(var J in F)J!=="key"&&(U[J]=F[J])}else U=F;return P&&c(U,typeof S=="function"?S.displayName||S.name||"Unknown":S),p(S,P,U,o(),re,Q)}function d(S){m(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===A&&(S._payload.status==="fulfilled"?m(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function m(S){return typeof S=="object"&&S!==null&&S.$$typeof===x}var v=T,x=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),C=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),N=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,B=Array.isArray,G=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(S){return S()}};var $,W={},k=v.react_stack_bottom_frame.bind(v,s)(),O=G(r(s)),X={};nt.Fragment=g,nt.jsx=function(S,F,U){var H=1e4>N.recentlyCreatedOwnerStacks++;return f(S,F,U,!1,H?Error("react-stack-top-frame"):k,H?G(r(S)):O)},nt.jsxs=function(S,F,U){var H=1e4>N.recentlyCreatedOwnerStacks++;return f(S,F,U,!0,H?Error("react-stack-top-frame"):k,H?G(r(S)):O)}})()),nt}var ar;function Hi(){return ar||(ar=1,process.env.NODE_ENV==="production"?Ct.exports=Vi():Ct.exports=Ui()),Ct.exports}var a=Hi();const $r=T.forwardRef(({children:e,type:t="button",size:n="medium",variant:r="default",kind:o="default",selected:s=!1,className:i,...c},u)=>{const p={medium:"mt-layout-input-medium w-fit",large:"mt-layout-input-large w-fit"},f={medium:"w-[24px] h-[24px] p-1 flex items-center justify-center",large:"w-[32px] h-[32px] p-1 flex items-center justify-center"},d={default:"mt-surface-input-default",accent:"mt-surface-input-accent",ghost:"mt-surface-input-ghost"},m="flex items-center gap-2 rounded transition-all duration-150",v=o==="icon"?f[n]:p[n];return a.jsx("button",{ref:u,type:t,"data-selected":s?"true":void 0,className:`${m} ${v} ${d[r]} ${i||""}`,...c,children:e})});$r.displayName="MtButton";const Xe=$r;const Br=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ki=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Gi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const lr=e=>{const t=Gi(e);return t.charAt(0).toUpperCase()+t.slice(1)};var zi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Yi=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Xi=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...c},u)=>T.createElement("svg",{ref:u,...zi,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Br("lucide",o),...!s&&!Yi(c)&&{"aria-hidden":"true"},...c},[...i.map(([p,f])=>T.createElement(p,f)),...Array.isArray(s)?s:[s]]));const oe=(e,t)=>{const n=T.forwardRef(({className:r,...o},s)=>T.createElement(Xi,{ref:s,iconNode:t,className:Br(`lucide-${Ki(lr(e))}`,`lucide-${e}`,r),...o}));return n.displayName=lr(e),n};const qi=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Zi=oe("arrow-down",qi);const Ji=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Wr=oe("arrow-up-down",Ji);const Qi=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ec=oe("arrow-up",Qi);const tc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vr=oe("check",tc);const nc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ur=oe("chevron-down",nc);const rc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Hr=oe("chevron-right",rc);const oc=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],sc=oe("ellipsis",oc);const ic=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],rt=oe("list-filter",ic);const cc=[["path",{d:"M5 12h14",key:"1ays0h"}]],ac=oe("minus",cc);const lc=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],bn=oe("plus",lc);const uc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],dc=oe("search",uc);const fc=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sn=oe("trash-2",fc);const pc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hc=oe("x",pc);function mc({label:e,checked:t,invalid:n=!1,description:r,intermediate:o=!1,disabled:s,onChange:i,className:c,...u}){const p=o?a.jsx(ac,{className:"h-3 w-3"}):a.jsx(Vr,{className:"h-3 w-3"});return a.jsxs("label",{className:`inline-flex items-start gap-2.5 ${s?"cursor-not-allowed":"cursor-pointer"} ${c||""}`,children:[a.jsxs("span",{className:"relative inline-flex h-6 w-6 items-center justify-center rounded-md","aria-hidden":!0,children:[a.jsx("input",{...u,type:"checkbox",checked:t,disabled:s,onChange:i,className:"absolute inset-0 m-0 h-full w-full cursor-inherit opacity-0"}),a.jsx("span",{className:`pointer-events-none inline-flex h-[14px] w-[14px] items-center justify-center rounded-[3px] text-[10px] transition-colors ${n?"border border-red-500 bg-red-500/15 text-status-danger":t||o?"mt-surface-input-accent border border-input-accent-background-default text-white":"mt-surface-input-default text-transparent"} ${s?"opacity-45":""}`,children:(t||o)&&p})]}),(e||r)&&a.jsxs("span",{className:"flex min-w-0 flex-col",children:[e&&a.jsx("span",{className:`text-sm leading-5 ${s?"":"text-text-primary"}`,children:e}),r?a.jsx("span",{className:"text-xs text-text-muted",children:r}):null]})]})}function ur(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wt(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ur(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ur(e[o],null)}}}}function Y(...e){return l.useCallback(Wt(...e),e)}function Le(e){const t=vc(e),n=l.forwardRef((r,o)=>{const{children:s,...i}=r,c=l.Children.toArray(s),u=c.find(xc);if(u){const p=u.props.children,f=c.map(d=>d===u?l.Children.count(p)>1?l.Children.only(null):l.isValidElement(p)?p.props.children:null:d);return a.jsx(t,{...i,ref:o,children:l.isValidElement(p)?l.cloneElement(p,void 0,f):null})}return a.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vc(e){const t=l.forwardRef((n,r)=>{const{children:o,...s}=n;if(l.isValidElement(o)){const i=yc(o),c=wc(s,o.props);return o.type!==l.Fragment&&(c.ref=r?Wt(r,i):i),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kr=Symbol("radix.slottable");function gc(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kr,t}function xc(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kr}function wc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const u=s(...c);return o(...c),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function yc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Cc.reduce((e,t)=>{const n=Le(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gr(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}var zr=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"}),bc="VisuallyHidden",Yr=l.forwardRef((e,t)=>a.jsx(V.span,{...e,ref:t,style:{...zr,...e.style}}));Yr.displayName=bc;var Sc=Yr;function Ec(e,t){const n=l.createContext(t),r=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return a.jsx(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function be(e,t=[]){let n=[];function r(s,i){const c=l.createContext(i),u=n.length;n=[...n,i];const p=d=>{const{scope:m,children:v,...x}=d,h=m?.[e]?.[u]||c,g=l.useMemo(()=>x,Object.values(x));return a.jsx(h.Provider,{value:g,children:v})};p.displayName=s+"Provider";function f(d,m){const v=m?.[e]?.[u]||c,x=l.useContext(v);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[p,f]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(c){const u=c?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Rc(o,...t)]}function Rc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((c,{useScope:u,scopeName:p})=>{const d=u(s)[`__scope${p}`];return{...c,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Fn(e){const t=e+"CollectionProvider",[n,r]=be(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:w}=h,y=T.useRef(null),b=T.useRef(new Map).current;return a.jsx(o,{scope:g,itemMap:b,collectionRef:y,children:w})};i.displayName=t;const c=e+"CollectionSlot",u=Le(c),p=T.forwardRef((h,g)=>{const{scope:w,children:y}=h,b=s(c,w),C=Y(g,b.collectionRef);return a.jsx(u,{ref:C,children:y})});p.displayName=c;const f=e+"CollectionItemSlot",d="data-radix-collection-item",m=Le(f),v=T.forwardRef((h,g)=>{const{scope:w,children:y,...b}=h,C=T.useRef(null),M=Y(g,C),_=s(f,w);return T.useEffect(()=>(_.itemMap.set(C,{ref:C,...b}),()=>{_.itemMap.delete(C)})),a.jsx(m,{[d]:"",ref:M,children:y})});v.displayName=f;function x(h){const g=s(e+"CollectionConsumer",h);return T.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((_,R)=>b.indexOf(_.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:p,ItemSlot:v},x,r]}function j(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var ee=globalThis?.document?l.useLayoutEffect:()=>{},Mc=l[" useInsertionEffect ".trim().toString()]||ee;function Fe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Pc({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const d=f.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,r])}const p=l.useCallback(f=>{if(c){const d=_c(f)?f(e):f;d!==e&&i.current?.(d)}else s(f)},[c,e,s,i]);return[u,p]}function Pc({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return Mc(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function _c(e){return typeof e=="function"}function Nc(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ne=e=>{const{present:t,children:n}=e,r=Ac(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=Y(r.ref,Oc(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};Ne.displayName="Presence";function Ac(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=Nc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const p=bt(r.current);s.current=c==="mounted"?p:"none"},[c]),ee(()=>{const p=r.current,f=o.current;if(f!==e){const m=s.current,v=bt(p);e?u("MOUNT"):v==="none"||p?.display==="none"?u("UNMOUNT"):u(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ee(()=>{if(t){let p;const f=t.ownerDocument.defaultView??window,d=v=>{const h=bt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&h&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",p=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=bt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}function bt(e){return e?.animationName||"none"}function Oc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jc=l[" useId ".trim().toString()]||(()=>{}),Tc=0;function ve(e){const[t,n]=l.useState(jc());return ee(()=>{n(r=>r??String(Tc++))},[e]),t?`radix-${t}`:""}var Ic=l.createContext(void 0);function $n(e){const t=l.useContext(Ic);return e||t||"ltr"}function le(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function kc(e,t=globalThis?.document){const n=le(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Dc="DismissableLayer",En="dismissableLayer.update",Lc="dismissableLayer.pointerDownOutside",Fc="dismissableLayer.focusOutside",dr,Xr=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,p=l.useContext(Xr),[f,d]=l.useState(null),m=f?.ownerDocument??globalThis?.document,[,v]=l.useState({}),x=Y(t,R=>d(R)),h=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(g),y=f?h.indexOf(f):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,C=y>=w,M=Wc(R=>{const E=R.target,A=[...p.branches].some(D=>D.contains(E));!C||A||(o?.(R),i?.(R),R.defaultPrevented||c?.())},m),_=Vc(R=>{const E=R.target;[...p.branches].some(D=>D.contains(E))||(s?.(R),i?.(R),R.defaultPrevented||c?.())},m);return kc(R=>{y===p.layers.size-1&&(r?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},m),l.useEffect(()=>{if(f)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dr=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(f)),p.layers.add(f),fr(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=dr)}},[f,m,n,p]),l.useEffect(()=>()=>{f&&(p.layers.delete(f),p.layersWithOutsidePointerEventsDisabled.delete(f),fr())},[f,p]),l.useEffect(()=>{const R=()=>v({});return document.addEventListener(En,R),()=>document.removeEventListener(En,R)},[]),a.jsx(V.div,{...u,ref:x,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:j(e.onFocusCapture,_.onFocusCapture),onBlurCapture:j(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:j(e.onPointerDownCapture,M.onPointerDownCapture)})});lt.displayName=Dc;var $c="DismissableLayerBranch",Bc=l.forwardRef((e,t)=>{const n=l.useContext(Xr),r=l.useRef(null),o=Y(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(V.div,{...e,ref:o})});Bc.displayName=$c;function Wc(e,t=globalThis?.document){const n=le(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let u=function(){qr(Lc,n,p,{discrete:!0})};const p={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vc(e,t=globalThis?.document){const n=le(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&qr(Fc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fr(){const e=new CustomEvent(En);document.dispatchEvent(e)}function qr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Gr(o,s):o.dispatchEvent(s)}var ln="focusScope.autoFocusOnMount",un="focusScope.autoFocusOnUnmount",pr={bubbles:!1,cancelable:!0},Uc="FocusScope",ut=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),p=le(o),f=le(s),d=l.useRef(null),m=Y(t,h=>u(h)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let h=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?d.current=C:Ee(d.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Ee(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const M of b)M.removedNodes.length>0&&Ee(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const y=new MutationObserver(w);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),y.disconnect()}}},[r,c,v.paused]),l.useEffect(()=>{if(c){mr.add(v);const h=document.activeElement;if(!c.contains(h)){const w=new CustomEvent(ln,pr);c.addEventListener(ln,p),c.dispatchEvent(w),w.defaultPrevented||(Hc(Xc(Zr(c)),{select:!0}),document.activeElement===h&&Ee(c))}return()=>{c.removeEventListener(ln,p),setTimeout(()=>{const w=new CustomEvent(un,pr);c.addEventListener(un,f),c.dispatchEvent(w),w.defaultPrevented||Ee(h??document.body,{select:!0}),c.removeEventListener(un,f),mr.remove(v)},0)}}},[c,p,f,v]);const x=l.useCallback(h=>{if(!n&&!r||v.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(g&&w){const y=h.currentTarget,[b,C]=Kc(y);b&&C?!h.shiftKey&&w===C?(h.preventDefault(),n&&Ee(b,{select:!0})):h.shiftKey&&w===b&&(h.preventDefault(),n&&Ee(C,{select:!0})):w===y&&h.preventDefault()}},[n,r,v.paused]);return a.jsx(V.div,{tabIndex:-1,...i,ref:m,onKeyDown:x})});ut.displayName=Uc;function Hc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ee(r,{select:t}),document.activeElement!==n)return}function Kc(e){const t=Zr(e),n=hr(t,e),r=hr(t.reverse(),e);return[n,r]}function Zr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hr(e,t){for(const n of e)if(!Gc(n,{upTo:t}))return n}function Gc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zc(e){return e instanceof HTMLInputElement&&"select"in e}function Ee(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zc(e)&&t&&e.select()}}var mr=Yc();function Yc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vr(e,t),e.unshift(t)},remove(t){e=vr(e,t),e[0]?.resume()}}}function vr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xc(e){return e.filter(t=>t.tagName!=="A")}var qc="Portal",dt=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);ee(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?Lr.createPortal(a.jsx(V.div,{...r,ref:t}),i):null});dt.displayName=qc;var dn=0;function Vt(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gr()),document.body.insertAdjacentElement("beforeend",e[1]??gr()),dn++,()=>{dn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),dn--}},[])}function gr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pe=function(){return pe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function Jr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Zc(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Nt="right-scroll-bar-position",At="width-before-scroll-bar",Jc="with-scroll-bars-hidden",Qc="--removed-body-scroll-bar-size";function fn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ea(e,t){var n=T.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ta=typeof window<"u"?l.useLayoutEffect:l.useEffect,xr=new WeakMap;function na(e,t){var n=ea(null,function(r){return e.forEach(function(o){return fn(o,r)})});return ta(function(){var r=xr.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(c){s.has(c)||fn(c,null)}),s.forEach(function(c){o.has(c)||fn(c,i)})}xr.set(n,e)},[e]),n}function ra(e){return e}function oa(e,t){t===void 0&&(t=ra);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(s),i=n}var u=function(){var f=i;i=[],f.forEach(s)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(f){i.push(f),p()},filter:function(f){return i=i.filter(f),n}}}};return o}function sa(e){e===void 0&&(e={});var t=oa(null);return t.options=pe({async:!0,ssr:!1},e),t}var Qr=function(e){var t=e.sideCar,n=Jr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,pe({},n))};Qr.isSideCarExport=!0;function ia(e,t){return e.useMedium(t),Qr}var eo=sa(),pn=function(){},Ut=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:pn,onWheelCapture:pn,onTouchMoveCapture:pn}),o=r[0],s=r[1],i=e.forwardProps,c=e.children,u=e.className,p=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,b=e.gapMode,C=Jr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=m,_=na([n,t]),R=pe(pe({},C),o);return l.createElement(l.Fragment,null,f&&l.createElement(M,{sideCar:eo,removeScrollBar:p,shards:d,noRelative:v,noIsolation:x,inert:h,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?l.cloneElement(l.Children.only(c),pe(pe({},R),{ref:_})):l.createElement(y,pe({},R,{className:u,ref:_}),c))});Ut.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ut.classNames={fullWidth:At,zeroRight:Nt};var ca=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aa(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ca();return t&&e.setAttribute("nonce",t),e}function la(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ua(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var da=function(){var e=0,t=null;return{add:function(n){e==0&&(t=aa())&&(la(t,n),ua(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fa=function(){var e=da();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},to=function(){var e=fa(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pa={left:0,top:0,right:0,gap:0},hn=function(e){return parseInt(e||"",10)||0},ha=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[hn(n),hn(r),hn(o)]},ma=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pa;var t=ha(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},va=to(),ze="data-scroll-locked",ga=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
7
+ .`.concat(Jc,` {
8
+ overflow: hidden `).concat(r,`;
9
+ padding-right: `).concat(c,"px ").concat(r,`;
10
+ }
11
+ body[`).concat(ze,`] {
12
+ overflow: hidden `).concat(r,`;
13
+ overscroll-behavior: contain;
14
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15
+ padding-left: `.concat(o,`px;
16
+ padding-top: `).concat(s,`px;
17
+ padding-right: `).concat(i,`px;
18
+ margin-left:0;
19
+ margin-top:0;
20
+ margin-right: `).concat(c,"px ").concat(r,`;
21
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
22
+ }
23
+
24
+ .`).concat(Nt,` {
25
+ right: `).concat(c,"px ").concat(r,`;
26
+ }
27
+
28
+ .`).concat(At,` {
29
+ margin-right: `).concat(c,"px ").concat(r,`;
30
+ }
31
+
32
+ .`).concat(Nt," .").concat(Nt,` {
33
+ right: 0 `).concat(r,`;
34
+ }
35
+
36
+ .`).concat(At," .").concat(At,` {
37
+ margin-right: 0 `).concat(r,`;
38
+ }
39
+
40
+ body[`).concat(ze,`] {
41
+ `).concat(Qc,": ").concat(c,`px;
42
+ }
43
+ `)},wr=function(){var e=parseInt(document.body.getAttribute(ze)||"0",10);return isFinite(e)?e:0},xa=function(){l.useEffect(function(){return document.body.setAttribute(ze,(wr()+1).toString()),function(){var e=wr()-1;e<=0?document.body.removeAttribute(ze):document.body.setAttribute(ze,e.toString())}},[])},wa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;xa();var s=l.useMemo(function(){return ma(o)},[o]);return l.createElement(va,{styles:ga(s,!t,o,n?"":"!important")})},Rn=!1;if(typeof window<"u")try{var St=Object.defineProperty({},"passive",{get:function(){return Rn=!0,!0}});window.addEventListener("test",St,St),window.removeEventListener("test",St,St)}catch{Rn=!1}var He=Rn?{passive:!1}:!1,ya=function(e){return e.tagName==="TEXTAREA"},no=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ya(e)&&n[t]==="visible")},Ca=function(e){return no(e,"overflowY")},ba=function(e){return no(e,"overflowX")},yr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ro(e,r);if(o){var s=oo(e,r),i=s[1],c=s[2];if(i>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sa=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ea=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ro=function(e,t){return e==="v"?Ca(t):ba(t)},oo=function(e,t){return e==="v"?Sa(t):Ea(t)},Ra=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ma=function(e,t,n,r,o){var s=Ra(e,window.getComputedStyle(t).direction),i=s*r,c=n.target,u=t.contains(c),p=!1,f=i>0,d=0,m=0;do{if(!c)break;var v=oo(e,c),x=v[0],h=v[1],g=v[2],w=h-g-s*x;(x||w)&&ro(e,c)&&(d+=w,m+=x);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(d)<1||!f&&Math.abs(m)<1)&&(p=!0),p},Et=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cr=function(e){return[e.deltaX,e.deltaY]},br=function(e){return e&&"current"in e?e.current:e},Pa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_a=function(e){return`
44
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
45
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
46
+ `)},Na=0,Ke=[];function Aa(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(Na++)[0],s=l.useState(to)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Zc([e.lockRef.current],(e.shards||[]).map(br),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var w=Et(h),y=n.current,b="deltaX"in h?h.deltaX:y[0]-w[0],C="deltaY"in h?h.deltaY:y[1]-w[1],M,_=h.target,R=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in h&&R==="h"&&_.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,D=A?A===_||A.contains(_):!1;if(D)return!1;var I=yr(R,_);if(!I)return!0;if(I?M=R:(M=R==="v"?"h":"v",I=yr(R,_)),!I)return!1;if(!r.current&&"changedTouches"in h&&(b||C)&&(r.current=M),!M)return!0;var N=r.current||M;return Ma(N,g,h,N==="h"?b:C)},[]),u=l.useCallback(function(h){var g=h;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var w="deltaY"in g?Cr(g):Et(g),y=t.current.filter(function(M){return M.name===g.type&&(M.target===g.target||g.target===M.shadowParent)&&Pa(M.delta,w)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(i.current.shards||[]).map(br).filter(Boolean).filter(function(M){return M.contains(g.target)}),C=b.length>0?c(g,b[0]):!i.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),p=l.useCallback(function(h,g,w,y){var b={name:h,delta:g,target:w,should:y,shadowParent:Oa(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),f=l.useCallback(function(h){n.current=Et(h),r.current=void 0},[]),d=l.useCallback(function(h){p(h.type,Cr(h),h.target,c(h,e.lockRef.current))},[]),m=l.useCallback(function(h){p(h.type,Et(h),h.target,c(h,e.lockRef.current))},[]);l.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",u,He),document.addEventListener("touchmove",u,He),document.addEventListener("touchstart",f,He),function(){Ke=Ke.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,He),document.removeEventListener("touchmove",u,He),document.removeEventListener("touchstart",f,He)}},[]);var v=e.removeScrollBar,x=e.inert;return l.createElement(l.Fragment,null,x?l.createElement(s,{styles:_a(o)}):null,v?l.createElement(wa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Oa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ja=ia(eo,Aa);var ft=l.forwardRef(function(e,t){return l.createElement(Ut,pe({},e,{ref:t,sideCar:ja}))});ft.classNames=Ut.classNames;var Ta=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,Rt=new WeakMap,Mt={},mn=0,so=function(e){return e&&(e.host||so(e.parentNode))},Ia=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=so(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ka=function(e,t,n,r){var o=Ia(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var s=Mt[n],i=[],c=new Set,u=new Set(o),p=function(d){!d||c.has(d)||(c.add(d),p(d.parentNode))};o.forEach(p);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(m){if(c.has(m))f(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",h=(Ge.get(m)||0)+1,g=(s.get(m)||0)+1;Ge.set(m,h),s.set(m,g),i.push(m),h===1&&x&&Rt.set(m,!0),g===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return f(t),c.clear(),mn++,function(){i.forEach(function(d){var m=Ge.get(d)-1,v=s.get(d)-1;Ge.set(d,m),s.set(d,v),m||(Rt.has(d)||d.removeAttribute(r),Rt.delete(d)),v||d.removeAttribute(n)}),mn--,mn||(Ge=new WeakMap,Ge=new WeakMap,Rt=new WeakMap,Mt={})}},Ht=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ta(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ka(r,o,n,"aria-hidden")):function(){return null}};function Da(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function La(e){const[t,n]=l.useState(void 0);return ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,p=Array.isArray(u)?u[0]:u;i=p.inlineSize,c=p.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Fa=["top","right","bottom","left"],Pe=Math.min,se=Math.max,jt=Math.round,Pt=Math.floor,me=e=>({x:e,y:e}),$a={left:"right",right:"left",bottom:"top",top:"bottom"};function Mn(e,t,n){return se(e,Pe(t,n))}function ye(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function Bn(e){return e==="x"?"y":"x"}function Wn(e){return e==="y"?"height":"width"}function he(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vn(e){return Bn(he(e))}function Ba(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Vn(e),s=Wn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Tt(i)),[i,Tt(i)]}function Wa(e){const t=Tt(e);return[Pn(e),t,Pn(t)]}function Pn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sr=["left","right"],Er=["right","left"],Va=["top","bottom"],Ua=["bottom","top"];function Ha(e,t,n){switch(e){case"top":case"bottom":return n?t?Er:Sr:t?Sr:Er;case"left":case"right":return t?Va:Ua;default:return[]}}function Ka(e,t,n,r){const o=Je(e);let s=Ha(Ce(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Pn)))),s}function Tt(e){const t=Ce(e);return $a[t]+e.slice(t.length)}function Ga(e){return{top:0,right:0,bottom:0,left:0,...e}}function io(e){return typeof e!="number"?Ga(e):{top:e,right:e,bottom:e,left:e}}function It(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Rr(e,t,n){let{reference:r,floating:o}=e;const s=he(t),i=Vn(t),c=Wn(i),u=Ce(t),p=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[c]/2-o[c]/2;let v;switch(u){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Je(t)){case"start":v[i]-=m*(n&&p?-1:1);break;case"end":v[i]+=m*(n&&p?-1:1);break}return v}async function za(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=ye(t,e),x=io(v),g=c[m?d==="floating"?"reference":"floating":d],w=It(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:p,rootBoundary:f,strategy:u})),y=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},M=It(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:u}):y);return{top:(w.top-M.top+x.top)/C.y,bottom:(M.bottom-w.bottom+x.bottom)/C.y,left:(w.left-M.left+x.left)/C.x,right:(M.right-w.right+x.right)/C.x}}const Ya=50,Xa=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:za},u=await(i.isRTL==null?void 0:i.isRTL(t));let p=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Rr(p,r,u),m=r,v=0;const x={};for(let h=0;h<s.length;h++){const g=s[h];if(!g)continue;const{name:w,fn:y}=g,{x:b,y:C,data:M,reset:_}=await y({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:x,rects:p,platform:c,elements:{reference:e,floating:t}});f=b??f,d=C??d,x[w]={...x[w],...M},_&&v<Ya&&(v++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(p=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:f,y:d}=Rr(p,m,u)),h=-1)}return{x:f,y:d,placement:m,strategy:o,middlewareData:x}},qa=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:p,padding:f=0}=ye(e,t)||{};if(p==null)return{};const d=io(f),m={x:n,y:r},v=Vn(o),x=Wn(v),h=await i.getDimensions(p),g=v==="y",w=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[x]+s.reference[v]-m[v]-s.floating[x],M=m[v]-s.reference[v],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(p));let R=_?_[b]:0;(!R||!await(i.isElement==null?void 0:i.isElement(_)))&&(R=c.floating[b]||s.floating[x]);const E=C/2-M/2,A=R/2-h[x]/2-1,D=Pe(d[w],A),I=Pe(d[y],A),N=D,L=R-h[x]-I,B=R/2-h[x]/2+E,G=Mn(N,B,L),$=!u.arrow&&Je(o)!=null&&B!==G&&s.reference[x]/2-(B<N?D:I)-h[x]/2<0,W=$?B<N?B-N:B-L:0;return{[v]:m[v]+W,data:{[v]:G,centerOffset:B-G-W,...$&&{alignmentOffset:W}},reset:$}}}),Za=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:p}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=ye(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Ce(o),y=he(c),b=Ce(c)===c,C=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=m||(b||!h?[Tt(c)]:Wa(c)),_=x!=="none";!m&&_&&M.push(...Ka(c,h,x,C));const R=[c,...M],E=await u.detectOverflow(t,g),A=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&A.push(E[w]),d){const B=Ba(o,i,C);A.push(E[B[0]],E[B[1]])}if(D=[...D,{placement:o,overflows:A}],!A.every(B=>B<=0)){var I,N;const B=(((I=s.flip)==null?void 0:I.index)||0)+1,G=R[B];if(G&&(!(d==="alignment"?y!==he(G):!1)||D.every(k=>he(k.placement)===y?k.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:G}};let $=(N=D.filter(W=>W.overflows[0]<=0).sort((W,k)=>W.overflows[1]-k.overflows[1])[0])==null?void 0:N.placement;if(!$)switch(v){case"bestFit":{var L;const W=(L=D.filter(k=>{if(_){const O=he(k.placement);return O===y||O==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(O=>O>0).reduce((O,X)=>O+X,0)]).sort((k,O)=>k[1]-O[1])[0])==null?void 0:L[0];W&&($=W);break}case"initialPlacement":$=c;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Mr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pr(e){return Fa.some(t=>e[t]>=0)}const Ja=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=ye(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),c=Mr(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Pr(c)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),c=Mr(i,n.floating);return{data:{escapedOffsets:c,escaped:Pr(c)}}}default:return{}}}}},co=new Set(["left","top"]);async function Qa(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ce(n),c=Je(n),u=he(n)==="y",p=co.has(i)?-1:1,f=s&&u?-1:1,d=ye(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),u?{x:v*f,y:m*p}:{x:m*p,y:v*f}}const el=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await Qa(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},tl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:w=>{let{x:y,y:b}=w;return{x:y,y:b}}},...p}=ye(e,t),f={x:n,y:r},d=await s.detectOverflow(t,p),m=he(Ce(o)),v=Bn(m);let x=f[v],h=f[m];if(i){const w=v==="y"?"top":"left",y=v==="y"?"bottom":"right",b=x+d[w],C=x-d[y];x=Mn(b,x,C)}if(c){const w=m==="y"?"top":"left",y=m==="y"?"bottom":"right",b=h+d[w],C=h-d[y];h=Mn(b,h,C)}const g=u.fn({...t,[v]:x,[m]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[v]:i,[m]:c}}}}}},nl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:p=!0}=ye(e,t),f={x:n,y:r},d=he(o),m=Bn(d);let v=f[m],x=f[d];const h=ye(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const b=m==="y"?"height":"width",C=s.reference[m]-s.floating[b]+g.mainAxis,M=s.reference[m]+s.reference[b]-g.mainAxis;v<C?v=C:v>M&&(v=M)}if(p){var w,y;const b=m==="y"?"width":"height",C=co.has(Ce(o)),M=s.reference[d]-s.floating[b]+(C&&((w=i.offset)==null?void 0:w[d])||0)+(C?0:g.crossAxis),_=s.reference[d]+s.reference[b]+(C?0:((y=i.offset)==null?void 0:y[d])||0)-(C?g.crossAxis:0);x<M?x=M:x>_&&(x=_)}return{[m]:v,[d]:x}}}},rl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...p}=ye(e,t),f=await i.detectOverflow(t,p),d=Ce(o),m=Je(o),v=he(o)==="y",{width:x,height:h}=s.floating;let g,w;d==="top"||d==="bottom"?(g=d,w=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,g=m==="end"?"top":"bottom");const y=h-f.top-f.bottom,b=x-f.left-f.right,C=Pe(h-f[g],y),M=Pe(x-f[w],b),_=!t.middlewareData.shift;let R=C,E=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=y),_&&!m){const D=se(f.left,0),I=se(f.right,0),N=se(f.top,0),L=se(f.bottom,0);v?E=x-2*(D!==0||I!==0?D+I:se(f.left,f.right)):R=h-2*(N!==0||L!==0?N+L:se(f.top,f.bottom))}await u({...t,availableWidth:E,availableHeight:R});const A=await i.getDimensions(c.floating);return x!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function Qe(e){return ao(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ge(e){var t;return(t=(ao(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ao(e){return Kt()?e instanceof Node||e instanceof ie(e).Node:!1}function de(e){return Kt()?e instanceof Element||e instanceof ie(e).Element:!1}function Se(e){return Kt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function _r(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function pt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ol(e){return/^(table|td|th)$/.test(Qe(e))}function Gt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const sl=/transform|translate|scale|rotate|perspective|filter/,il=/paint|layout|strict|content/,ke=e=>!!e&&e!=="none";let vn;function Un(e){const t=de(e)?fe(e):e;return ke(t.transform)||ke(t.translate)||ke(t.scale)||ke(t.rotate)||ke(t.perspective)||!Hn()&&(ke(t.backdropFilter)||ke(t.filter))||sl.test(t.willChange||"")||il.test(t.contain||"")}function cl(e){let t=_e(e);for(;Se(t)&&!qe(t);){if(Un(t))return t;if(Gt(t))return null;t=_e(t)}return null}function Hn(){return vn==null&&(vn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vn}function qe(e){return/^(html|body|#document)$/.test(Qe(e))}function fe(e){return ie(e).getComputedStyle(e)}function zt(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(Qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_r(e)&&e.host||ge(e);return _r(t)?t.host:t}function lo(e){const t=_e(e);return qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Se(t)&&pt(t)?t:lo(t)}function it(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lo(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(s){const c=_n(i);return t.concat(i,i.visualViewport||[],pt(o)?o:[],c&&n?it(c):[])}else return t.concat(o,it(o,[],n))}function _n(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uo(e){const t=fe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Se(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=jt(n)!==s||jt(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function Kn(e){return de(e)?e:e.contextElement}function Ye(e){const t=Kn(e);if(!Se(t))return me(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=uo(t);let i=(s?jt(n.width):n.width)/r,c=(s?jt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const al=me(0);function fo(e){const t=ie(e);return!Hn()||!t.visualViewport?al:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ll(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function $e(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Kn(e);let i=me(1);t&&(r?de(r)&&(i=Ye(r)):i=Ye(e));const c=ll(s,n,r)?fo(s):me(0);let u=(o.left+c.x)/i.x,p=(o.top+c.y)/i.y,f=o.width/i.x,d=o.height/i.y;if(s){const m=ie(s),v=r&&de(r)?ie(r):r;let x=m,h=_n(x);for(;h&&r&&v!==x;){const g=Ye(h),w=h.getBoundingClientRect(),y=fe(h),b=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,C=w.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;u*=g.x,p*=g.y,f*=g.x,d*=g.y,u+=b,p+=C,x=ie(h),h=_n(x)}}return It({width:f,height:d,x:u,y:p})}function Yt(e,t){const n=zt(e).scrollLeft;return t?t.left+n:$e(ge(e)).left+n}function po(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ul(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ge(r),c=t?Gt(t.floating):!1;if(r===i||c&&s)return n;let u={scrollLeft:0,scrollTop:0},p=me(1);const f=me(0),d=Se(r);if((d||!d&&!s)&&((Qe(r)!=="body"||pt(i))&&(u=zt(r)),d)){const v=$e(r);p=Ye(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=i&&!d&&!s?po(i,u):me(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+f.x+m.x,y:n.y*p.y-u.scrollTop*p.y+f.y+m.y}}function dl(e){return Array.from(e.getClientRects())}function fl(e){const t=ge(e),n=zt(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Yt(e);const c=-n.scrollTop;return fe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}const Nr=25;function pl(e,t){const n=ie(e),r=ge(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const f=Hn();(!f||f&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const p=Yt(r);if(p<=0){const f=r.ownerDocument,d=f.body,m=getComputedStyle(d),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-d.clientWidth-v);x<=Nr&&(s-=x)}else p<=Nr&&(s+=p);return{width:s,height:i,x:c,y:u}}function hl(e,t){const n=$e(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Se(e)?Ye(e):me(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,p=r*s.y;return{width:i,height:c,x:u,y:p}}function Ar(e,t,n){let r;if(t==="viewport")r=pl(e,n);else if(t==="document")r=fl(ge(e));else if(de(t))r=hl(t,n);else{const o=fo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return It(r)}function ho(e,t){const n=_e(e);return n===t||!de(n)||qe(n)?!1:fe(n).position==="fixed"||ho(n,t)}function ml(e,t){const n=t.get(e);if(n)return n;let r=it(e,[],!1).filter(c=>de(c)&&Qe(c)!=="body"),o=null;const s=fe(e).position==="fixed";let i=s?_e(e):e;for(;de(i)&&!qe(i);){const c=fe(i),u=Un(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||pt(i)&&!u&&ho(e,i))?r=r.filter(f=>f!==i):o=c,i=_e(i)}return t.set(e,r),r}function vl(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Gt(t)?[]:ml(t,this._c):[].concat(n),r],c=Ar(t,i[0],o);let u=c.top,p=c.right,f=c.bottom,d=c.left;for(let m=1;m<i.length;m++){const v=Ar(t,i[m],o);u=se(v.top,u),p=Pe(v.right,p),f=Pe(v.bottom,f),d=se(v.left,d)}return{width:p-d,height:f-u,x:d,y:u}}function gl(e){const{width:t,height:n}=uo(e);return{width:t,height:n}}function xl(e,t,n){const r=Se(t),o=ge(t),s=n==="fixed",i=$e(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=me(0);function p(){u.x=Yt(o)}if(r||!r&&!s)if((Qe(t)!=="body"||pt(o))&&(c=zt(t)),r){const v=$e(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&p();s&&!r&&o&&p();const f=o&&!r&&!s?po(o,c):me(0),d=i.left+c.scrollLeft-u.x-f.x,m=i.top+c.scrollTop-u.y-f.y;return{x:d,y:m,width:i.width,height:i.height}}function gn(e){return fe(e).position==="static"}function Or(e,t){if(!Se(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ge(e)===n&&(n=n.ownerDocument.body),n}function mo(e,t){const n=ie(e);if(Gt(e))return n;if(!Se(e)){let o=_e(e);for(;o&&!qe(o);){if(de(o)&&!gn(o))return o;o=_e(o)}return n}let r=Or(e,t);for(;r&&ol(r)&&gn(r);)r=Or(r,t);return r&&qe(r)&&gn(r)&&!Un(r)?n:r||cl(e)||n}const wl=async function(e){const t=this.getOffsetParent||mo,n=this.getDimensions,r=await n(e.floating);return{reference:xl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yl(e){return fe(e).direction==="rtl"}const Cl={convertOffsetParentRelativeRectToViewportRelativeRect:ul,getDocumentElement:ge,getClippingRect:vl,getOffsetParent:mo,getElementRects:wl,getClientRects:dl,getDimensions:gl,getScale:Ye,isElement:de,isRTL:yl};function vo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bl(e,t){let n=null,r;const o=ge(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const p=e.getBoundingClientRect(),{left:f,top:d,width:m,height:v}=p;if(c||t(),!m||!v)return;const x=Pt(d),h=Pt(o.clientWidth-(f+m)),g=Pt(o.clientHeight-(d+v)),w=Pt(f),b={rootMargin:-x+"px "+-h+"px "+-g+"px "+-w+"px",threshold:se(0,Pe(1,u))||1};let C=!0;function M(_){const R=_[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!vo(p,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(M,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,b)}n.observe(e)}return i(!0),s}function Sl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=Kn(e),f=o||s?[...p?it(p):[],...t?it(t):[]]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=p&&c?bl(p,n):null;let m=-1,v=null;i&&(v=new ResizeObserver(w=>{let[y]=w;y&&y.target===p&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),p&&!u&&v.observe(p),t&&v.observe(t));let x,h=u?$e(e):null;u&&g();function g(){const w=$e(e);h&&!vo(h,w)&&n(),h=w,x=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d?.(),(w=v)==null||w.disconnect(),v=null,u&&cancelAnimationFrame(x)}}const El=el,Rl=tl,Ml=Za,Pl=rl,_l=Ja,jr=qa,Nl=nl,Al=(e,t,n)=>{const r=new Map,o={platform:Cl,...n},s={...o.platform,_c:r};return Xa(e,t,{...o,platform:s})};var Ol=typeof document<"u",jl=function(){},Ot=Ol?T.useLayoutEffect:jl;function kt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!kt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function go(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tr(e,t){const n=go(e);return Math.round(t*n)/n}function xn(e){const t=l.useRef(e);return Ot(()=>{t.current=e}),t}function Tl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:p}=e,[f,d]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(r);kt(m,r)||v(r);const[x,h]=l.useState(null),[g,w]=l.useState(null),y=l.useCallback(k=>{k!==_.current&&(_.current=k,h(k))},[]),b=l.useCallback(k=>{k!==R.current&&(R.current=k,w(k))},[]),C=s||x,M=i||g,_=l.useRef(null),R=l.useRef(null),E=l.useRef(f),A=u!=null,D=xn(u),I=xn(o),N=xn(p),L=l.useCallback(()=>{if(!_.current||!R.current)return;const k={placement:t,strategy:n,middleware:m};I.current&&(k.platform=I.current),Al(_.current,R.current,k).then(O=>{const X={...O,isPositioned:N.current!==!1};B.current&&!kt(E.current,X)&&(E.current=X,Bt.flushSync(()=>{d(X)}))})},[m,t,n,I,N]);Ot(()=>{p===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[p]);const B=l.useRef(!1);Ot(()=>(B.current=!0,()=>{B.current=!1}),[]),Ot(()=>{if(C&&(_.current=C),M&&(R.current=M),C&&M){if(D.current)return D.current(C,M,L);L()}},[C,M,L,D,A]);const G=l.useMemo(()=>({reference:_,floating:R,setReference:y,setFloating:b}),[y,b]),$=l.useMemo(()=>({reference:C,floating:M}),[C,M]),W=l.useMemo(()=>{const k={position:n,left:0,top:0};if(!$.floating)return k;const O=Tr($.floating,f.x),X=Tr($.floating,f.y);return c?{...k,transform:"translate("+O+"px, "+X+"px)",...go($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:X}},[n,c,$.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:L,refs:G,elements:$,floatingStyles:W}),[f,L,G,$,W])}const Il=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jr({element:r.current,padding:o}).fn(n):{}:r?jr({element:r,padding:o}).fn(n):{}}}},kl=(e,t)=>{const n=El(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dl=(e,t)=>{const n=Rl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ll=(e,t)=>({fn:Nl(e).fn,options:[e,t]}),Fl=(e,t)=>{const n=Ml(e);return{name:n.name,fn:n.fn,options:[e,t]}},$l=(e,t)=>{const n=Pl(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bl=(e,t)=>{const n=_l(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wl=(e,t)=>{const n=Il(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Vl="Arrow",xo=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return a.jsx(V.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});xo.displayName=Vl;var Ul=xo,Gn="Popper",[wo,Ve]=be(Gn),[Hl,yo]=wo(Gn),Co=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return a.jsx(Hl,{scope:t,anchor:r,onAnchorChange:o,children:n})};Co.displayName=Gn;var bo="PopperAnchor",So=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=yo(bo,n),i=l.useRef(null),c=Y(t,i),u=l.useRef(null);return l.useEffect(()=>{const p=u.current;u.current=r?.current||i.current,p!==u.current&&s.onAnchorChange(u.current)}),r?null:a.jsx(V.div,{...o,ref:c})});So.displayName=bo;var zn="PopperContent",[Kl,Gl]=wo(zn),Eo=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...h}=e,g=yo(zn,n),[w,y]=l.useState(null),b=Y(t,P=>y(P)),[C,M]=l.useState(null),_=La(C),R=_?.width??0,E=_?.height??0,A=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(p)?p:[p],N=I.length>0,L={padding:D,boundary:I.filter(Yl),altBoundary:N},{refs:B,floatingStyles:G,placement:$,isPositioned:W,middlewareData:k}=Tl({strategy:"fixed",placement:A,whileElementsMounted:(...P)=>Sl(...P,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[kl({mainAxis:o+E,alignmentAxis:i}),u&&Dl({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Ll():void 0,...L}),u&&Fl({...L}),$l({...L,apply:({elements:P,rects:K,availableWidth:J,availableHeight:z})=>{const{width:q,height:Z}=K.reference,ce=P.floating.style;ce.setProperty("--radix-popper-available-width",`${J}px`),ce.setProperty("--radix-popper-available-height",`${z}px`),ce.setProperty("--radix-popper-anchor-width",`${q}px`),ce.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),C&&Wl({element:C,padding:c}),Xl({arrowWidth:R,arrowHeight:E}),m&&Bl({strategy:"referenceHidden",...L})]}),[O,X]=Po($),S=le(x);ee(()=>{W&&S?.()},[W,S]);const F=k.arrow?.x,U=k.arrow?.y,H=k.arrow?.centerOffset!==0,[re,Q]=l.useState();return ee(()=>{w&&Q(window.getComputedStyle(w).zIndex)},[w]),a.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[k.transformOrigin?.x,k.transformOrigin?.y].join(" "),...k.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Kl,{scope:n,placedSide:O,onArrowChange:M,arrowX:F,arrowY:U,shouldHideArrow:H,children:a.jsx(V.div,{"data-side":O,"data-align":X,...h,ref:b,style:{...h.style,animation:W?void 0:"none"}})})})});Eo.displayName=zn;var Ro="PopperArrow",zl={top:"bottom",right:"left",bottom:"top",left:"right"},Mo=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Gl(Ro,r),i=zl[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(Ul,{...o,ref:n,style:{...o.style,display:"block"}})})});Mo.displayName=Ro;function Yl(e){return e!==null}var Xl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[p,f]=Po(n),d={start:"0%",center:"50%",end:"100%"}[f],m=(o.arrow?.x??0)+c/2,v=(o.arrow?.y??0)+u/2;let x="",h="";return p==="bottom"?(x=i?d:`${m}px`,h=`${-u}px`):p==="top"?(x=i?d:`${m}px`,h=`${r.floating.height+u}px`):p==="right"?(x=`${-u}px`,h=i?d:`${v}px`):p==="left"&&(x=`${r.floating.width+u}px`,h=i?d:`${v}px`),{data:{x,y:h}}}});function Po(e){const[t,n="center"]=e.split("-");return[t,n]}var ht=Co,mt=So,Xt=Eo,qt=Mo,wn="rovingFocusGroup.onEntryFocus",ql={bubbles:!1,cancelable:!0},vt="RovingFocusGroup",[Nn,_o,Zl]=Fn(vt),[Jl,No]=be(vt,[Zl]),[Ql,eu]=Jl(vt),Ao=l.forwardRef((e,t)=>a.jsx(Nn.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Nn.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(tu,{...e,ref:t})})}));Ao.displayName=vt;var tu=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:f=!1,...d}=e,m=l.useRef(null),v=Y(t,m),x=$n(s),[h,g]=Fe({prop:i,defaultProp:c??null,onChange:u,caller:vt}),[w,y]=l.useState(!1),b=le(p),C=_o(n),M=l.useRef(!1),[_,R]=l.useState(0);return l.useEffect(()=>{const E=m.current;if(E)return E.addEventListener(wn,b),()=>E.removeEventListener(wn,b)},[b]),a.jsx(Ql,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:h,onItemFocus:l.useCallback(E=>g(E),[g]),onItemShiftTab:l.useCallback(()=>y(!0),[]),onFocusableItemAdd:l.useCallback(()=>R(E=>E+1),[]),onFocusableItemRemove:l.useCallback(()=>R(E=>E-1),[]),children:a.jsx(V.div,{tabIndex:w||_===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{M.current=!0}),onFocus:j(e.onFocus,E=>{const A=!M.current;if(E.target===E.currentTarget&&A&&!w){const D=new CustomEvent(wn,ql);if(E.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=C().filter($=>$.focusable),N=I.find($=>$.active),L=I.find($=>$.id===h),G=[N,L,...I].filter(Boolean).map($=>$.ref.current);To(G,f)}}M.current=!1}),onBlur:j(e.onBlur,()=>y(!1))})})}),Oo="RovingFocusGroupItem",jo=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...c}=e,u=ve(),p=s||u,f=eu(Oo,n),d=f.currentTabStopId===p,m=_o(n),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:h}=f;return l.useEffect(()=>{if(r)return v(),()=>x()},[r,v,x]),a.jsx(Nn.ItemSlot,{scope:n,id:p,focusable:r,active:o,children:a.jsx(V.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:j(e.onMouseDown,g=>{r?f.onItemFocus(p):g.preventDefault()}),onFocus:j(e.onFocus,()=>f.onItemFocus(p)),onKeyDown:j(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=ou(g,f.orientation,f.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=m().filter(C=>C.focusable).map(C=>C.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=f.loop?su(b,C+1):b.slice(C+1)}setTimeout(()=>To(b))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:h!=null}):i})})});jo.displayName=Oo;var nu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ru(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ou(e,t,n){const r=ru(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nu[r]}function To(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function su(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var iu=Ao,cu=jo,An=["Enter"," "],au=["ArrowDown","PageUp","Home"],Io=["ArrowUp","PageDown","End"],lu=[...au,...Io],uu={ltr:[...An,"ArrowRight"],rtl:[...An,"ArrowLeft"]},du={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gt="Menu",[ct,fu,pu]=Fn(gt),[Ue,Zt]=be(gt,[pu,Ve,No]),xt=Ve(),ko=No(),[Do,Ae]=Ue(gt),[hu,wt]=Ue(gt),Lo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,c=xt(t),[u,p]=l.useState(null),f=l.useRef(!1),d=le(s),m=$n(o);return l.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.jsx(ht,{...c,children:a.jsx(Do,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:p,children:a.jsx(hu,{scope:t,onClose:l.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:m,modal:i,children:r})})})};Lo.displayName=gt;var mu="MenuAnchor",Yn=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=xt(n);return a.jsx(mt,{...o,...r,ref:t})});Yn.displayName=mu;var Xn="MenuPortal",[vu,Fo]=Ue(Xn,{forceMount:void 0}),$o=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ae(Xn,t);return a.jsx(vu,{scope:t,forceMount:n,children:a.jsx(Ne,{present:n||s.open,children:a.jsx(dt,{asChild:!0,container:o,children:r})})})};$o.displayName=Xn;var ae="MenuContent",[gu,qn]=Ue(ae),Bo=l.forwardRef((e,t)=>{const n=Fo(ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ae(ae,e.__scopeMenu),i=wt(ae,e.__scopeMenu);return a.jsx(ct.Provider,{scope:e.__scopeMenu,children:a.jsx(Ne,{present:r||s.open,children:a.jsx(ct.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(xu,{...o,ref:t}):a.jsx(wu,{...o,ref:t})})})})}),xu=l.forwardRef((e,t)=>{const n=Ae(ae,e.__scopeMenu),r=l.useRef(null),o=Y(t,r);return l.useEffect(()=>{const s=r.current;if(s)return Ht(s)},[]),a.jsx(Zn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wu=l.forwardRef((e,t)=>{const n=Ae(ae,e.__scopeMenu);return a.jsx(Zn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),yu=Le("MenuContent.ScrollLock"),Zn=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:x,...h}=e,g=Ae(ae,n),w=wt(ae,n),y=xt(n),b=ko(n),C=fu(n),[M,_]=l.useState(null),R=l.useRef(null),E=Y(t,R,g.onContentChange),A=l.useRef(0),D=l.useRef(""),I=l.useRef(0),N=l.useRef(null),L=l.useRef("right"),B=l.useRef(0),G=x?ft:l.Fragment,$=x?{as:yu,allowPinchZoom:!0}:void 0,W=O=>{const X=D.current+O,S=C().filter(P=>!P.disabled),F=document.activeElement,U=S.find(P=>P.ref.current===F)?.textValue,H=S.map(P=>P.textValue),re=ju(H,X,U),Q=S.find(P=>P.textValue===re)?.ref.current;(function P(K){D.current=K,window.clearTimeout(A.current),K!==""&&(A.current=window.setTimeout(()=>P(""),1e3))})(X),Q&&setTimeout(()=>Q.focus())};l.useEffect(()=>()=>window.clearTimeout(A.current),[]),Vt();const k=l.useCallback(O=>L.current===N.current?.side&&Iu(O,N.current?.area),[]);return a.jsx(gu,{scope:n,searchRef:D,onItemEnter:l.useCallback(O=>{k(O)&&O.preventDefault()},[k]),onItemLeave:l.useCallback(O=>{k(O)||(R.current?.focus(),_(null))},[k]),onTriggerLeave:l.useCallback(O=>{k(O)&&O.preventDefault()},[k]),pointerGraceTimerRef:I,onPointerGraceIntentChange:l.useCallback(O=>{N.current=O},[]),children:a.jsx(G,{...$,children:a.jsx(ut,{asChild:!0,trapped:o,onMountAutoFocus:j(s,O=>{O.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(lt,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:a.jsx(iu,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:_,onEntryFocus:j(u,O=>{w.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Xt,{role:"menu","aria-orientation":"vertical","data-state":rs(g.open),"data-radix-menu-content":"",dir:w.dir,...y,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:j(h.onKeyDown,O=>{const S=O.target.closest("[data-radix-menu-content]")===O.currentTarget,F=O.ctrlKey||O.altKey||O.metaKey,U=O.key.length===1;S&&(O.key==="Tab"&&O.preventDefault(),!F&&U&&W(O.key));const H=R.current;if(O.target!==H||!lu.includes(O.key))return;O.preventDefault();const Q=C().filter(P=>!P.disabled).map(P=>P.ref.current);Io.includes(O.key)&&Q.reverse(),Au(Q)}),onBlur:j(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(A.current),D.current="")}),onPointerMove:j(e.onPointerMove,at(O=>{const X=O.target,S=B.current!==O.clientX;if(O.currentTarget.contains(X)&&S){const F=O.clientX>B.current?"right":"left";L.current=F,B.current=O.clientX}}))})})})})})})});Bo.displayName=ae;var Cu="MenuGroup",Jn=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(V.div,{role:"group",...r,ref:t})});Jn.displayName=Cu;var bu="MenuLabel",Wo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(V.div,{...r,ref:t})});Wo.displayName=bu;var Dt="MenuItem",Ir="menu.itemSelect",Jt=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=l.useRef(null),i=wt(Dt,e.__scopeMenu),c=qn(Dt,e.__scopeMenu),u=Y(t,s),p=l.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(Ir,{bubbles:!0,cancelable:!0});d.addEventListener(Ir,v=>r?.(v),{once:!0}),Gr(d,m),m.defaultPrevented?p.current=!1:i.onClose()}};return a.jsx(Vo,{...o,ref:u,disabled:n,onClick:j(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),p.current=!0},onPointerUp:j(e.onPointerUp,d=>{p.current||d.currentTarget?.click()}),onKeyDown:j(e.onKeyDown,d=>{const m=c.searchRef.current!=="";n||m&&d.key===" "||An.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Jt.displayName=Dt;var Vo=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=qn(Dt,n),c=ko(n),u=l.useRef(null),p=Y(t,u),[f,d]=l.useState(!1),[m,v]=l.useState("");return l.useEffect(()=>{const x=u.current;x&&v((x.textContent??"").trim())},[s.children]),a.jsx(ct.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:a.jsx(cu,{asChild:!0,...c,focusable:!r,children:a.jsx(V.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:j(e.onPointerMove,at(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,at(x=>i.onItemLeave(x))),onFocus:j(e.onFocus,()=>d(!0)),onBlur:j(e.onBlur,()=>d(!1))})})})}),Su="MenuCheckboxItem",Uo=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(Yo,{scope:e.__scopeMenu,checked:n,children:a.jsx(Jt,{role:"menuitemcheckbox","aria-checked":Lt(n)?"mixed":n,...o,ref:t,"data-state":tr(n),onSelect:j(o.onSelect,()=>r?.(Lt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Uo.displayName=Su;var Ho="MenuRadioGroup",[Eu,Ru]=Ue(Ho,{value:void 0,onValueChange:()=>{}}),Ko=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=le(r);return a.jsx(Eu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(Jn,{...o,ref:t})})});Ko.displayName=Ho;var Go="MenuRadioItem",zo=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Ru(Go,e.__scopeMenu),s=n===o.value;return a.jsx(Yo,{scope:e.__scopeMenu,checked:s,children:a.jsx(Jt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":tr(s),onSelect:j(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});zo.displayName=Go;var Qn="MenuItemIndicator",[Yo,Mu]=Ue(Qn,{checked:!1}),Xo=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Mu(Qn,n);return a.jsx(Ne,{present:r||Lt(s.checked)||s.checked===!0,children:a.jsx(V.span,{...o,ref:t,"data-state":tr(s.checked)})})});Xo.displayName=Qn;var Pu="MenuSeparator",qo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});qo.displayName=Pu;var _u="MenuArrow",Zo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=xt(n);return a.jsx(qt,{...o,...r,ref:t})});Zo.displayName=_u;var er="MenuSub",[Nu,Jo]=Ue(er),Qo=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ae(er,t),i=xt(t),[c,u]=l.useState(null),[p,f]=l.useState(null),d=le(o);return l.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),a.jsx(ht,{...i,children:a.jsx(Do,{scope:t,open:r,onOpenChange:d,content:p,onContentChange:f,children:a.jsx(Nu,{scope:t,contentId:ve(),triggerId:ve(),trigger:c,onTriggerChange:u,children:n})})})};Qo.displayName=er;var ot="MenuSubTrigger",es=l.forwardRef((e,t)=>{const n=Ae(ot,e.__scopeMenu),r=wt(ot,e.__scopeMenu),o=Jo(ot,e.__scopeMenu),s=qn(ot,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,p={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),u(null)}},[c,u]),a.jsx(Yn,{asChild:!0,...p,children:a.jsx(Vo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":rs(n.open),...e,ref:Wt(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:j(e.onPointerMove,at(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:j(e.onPointerLeave,at(d=>{f();const m=n.content?.getBoundingClientRect();if(m){const v=n.content?.dataset.side,x=v==="right",h=x?-5:5,g=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:g,y:m.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,d=>{const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||uu[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});es.displayName=ot;var ts="MenuSubContent",ns=l.forwardRef((e,t)=>{const n=Fo(ae,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ae(ae,e.__scopeMenu),i=wt(ae,e.__scopeMenu),c=Jo(ts,e.__scopeMenu),u=l.useRef(null),p=Y(t,u);return a.jsx(ct.Provider,{scope:e.__scopeMenu,children:a.jsx(Ne,{present:r||s.open,children:a.jsx(ct.Slot,{scope:e.__scopeMenu,children:a.jsx(Zn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:p,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:j(e.onFocusOutside,f=>{f.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:j(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),m=du[i.dir].includes(f.key);d&&m&&(s.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});ns.displayName=ts;function rs(e){return e?"open":"closed"}function Lt(e){return e==="indeterminate"}function tr(e){return Lt(e)?"indeterminate":e?"checked":"unchecked"}function Au(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ou(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ju(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Ou(e,Math.max(s,0));o.length===1&&(i=i.filter(p=>p!==n));const u=i.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Tu(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s],u=t[i],p=c.x,f=c.y,d=u.x,m=u.y;f>r!=m>r&&n<(d-p)*(r-f)/(m-f)+p&&(o=!o)}return o}function Iu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Tu(n,t)}function at(e){return t=>t.pointerType==="mouse"?e(t):void 0}var os=Lo,ss=Yn,is=$o,cs=Bo,as=Jn,ls=Wo,us=Jt,ds=Uo,fs=Ko,ps=zo,hs=Xo,ms=qo,vs=Zo,ku=Qo,gs=es,xs=ns,nr="ContextMenu",[Du]=be(nr,[Zt]),te=Zt(),[Lu,ws]=Du(nr),ys=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[i,c]=l.useState(!1),u=te(t),p=le(r),f=l.useCallback(d=>{c(d),p(d)},[p]);return a.jsx(Lu,{scope:t,open:i,onOpenChange:f,modal:s,children:a.jsx(os,{...u,dir:o,open:i,onOpenChange:f,modal:s,children:n})})};ys.displayName=nr;var Cs="ContextMenuTrigger",bs=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=ws(Cs,n),i=te(n),c=l.useRef({x:0,y:0}),u=l.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),p=l.useRef(0),f=l.useCallback(()=>window.clearTimeout(p.current),[]),d=m=>{c.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return l.useEffect(()=>f,[f]),l.useEffect(()=>{r&&f()},[r,f]),a.jsxs(a.Fragment,{children:[a.jsx(ss,{...i,virtualRef:u}),a.jsx(V.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,m=>{f(),d(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,_t(m=>{f(),p.current=window.setTimeout(()=>d(m),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,_t(f)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,_t(f)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,_t(f))})]})});bs.displayName=Cs;var Fu="ContextMenuPortal",Ss=e=>{const{__scopeContextMenu:t,...n}=e,r=te(t);return a.jsx(is,{...r,...n})};Ss.displayName=Fu;var Es="ContextMenuContent",Rs=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ws(Es,n),s=te(n),i=l.useRef(!1);return a.jsx(cs,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&i.current&&c.preventDefault(),i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...e.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)"}})});Rs.displayName=Es;var $u="ContextMenuGroup",Bu=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(as,{...o,...r,ref:t})});Bu.displayName=$u;var Wu="ContextMenuLabel",Vu=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(ls,{...o,...r,ref:t})});Vu.displayName=Wu;var Uu="ContextMenuItem",Ms=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(us,{...o,...r,ref:t})});Ms.displayName=Uu;var Hu="ContextMenuCheckboxItem",Ku=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(ds,{...o,...r,ref:t})});Ku.displayName=Hu;var Gu="ContextMenuRadioGroup",zu=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(fs,{...o,...r,ref:t})});zu.displayName=Gu;var Yu="ContextMenuRadioItem",Xu=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(ps,{...o,...r,ref:t})});Xu.displayName=Yu;var qu="ContextMenuItemIndicator",Zu=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(hs,{...o,...r,ref:t})});Zu.displayName=qu;var Ju="ContextMenuSeparator",Ps=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(ms,{...o,...r,ref:t})});Ps.displayName=Ju;var Qu="ContextMenuArrow",ed=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(vs,{...o,...r,ref:t})});ed.displayName=Qu;var _s="ContextMenuSub",Ns=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,i=te(t),[c,u]=Fe({prop:o,defaultProp:s??!1,onChange:r,caller:_s});return a.jsx(ku,{...i,open:c,onOpenChange:u,children:n})};Ns.displayName=_s;var td="ContextMenuSubTrigger",As=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(gs,{...o,...r,ref:t})});As.displayName=td;var nd="ContextMenuSubContent",Os=l.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=te(n);return a.jsx(xs,{...o,...r,ref:t,style:{...e.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)"}})});Os.displayName=nd;function _t(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var rd=ys,od=bs,js=Ss,sd=Rs,id=Ms,Ts=Ps,cd=Ns,ad=As,ld=Os,Qt="DropdownMenu",[ud]=be(Qt,[Zt]),ne=Zt(),[dd,Is]=ud(Qt),ks=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,u=ne(t),p=l.useRef(null),[f,d]=Fe({prop:o,defaultProp:s??!1,onChange:i,caller:Qt});return a.jsx(dd,{scope:t,triggerId:ve(),triggerRef:p,contentId:ve(),open:f,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(m=>!m),[d]),modal:c,children:a.jsx(os,{...u,open:f,onOpenChange:d,dir:r,modal:c,children:n})})};ks.displayName=Qt;var Ds="DropdownMenuTrigger",Ls=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Is(Ds,n),i=ne(n);return a.jsx(ss,{asChild:!0,...i,children:a.jsx(V.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Wt(t,s.triggerRef),onPointerDown:j(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:j(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ls.displayName=Ds;var fd="DropdownMenuPortal",Fs=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ne(t);return a.jsx(is,{...r,...n})};Fs.displayName=fd;var $s="DropdownMenuContent",Bs=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Is($s,n),s=ne(n),i=l.useRef(!1);return a.jsx(cs,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:j(e.onInteractOutside,c=>{const u=c.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0,f=u.button===2||p;(!o.modal||f)&&(i.current=!0)}),style:{...e.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)"}})});Bs.displayName=$s;var pd="DropdownMenuGroup",hd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(as,{...o,...r,ref:t})});hd.displayName=pd;var md="DropdownMenuLabel",vd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(ls,{...o,...r,ref:t})});vd.displayName=md;var gd="DropdownMenuItem",Ws=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(us,{...o,...r,ref:t})});Ws.displayName=gd;var xd="DropdownMenuCheckboxItem",wd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(ds,{...o,...r,ref:t})});wd.displayName=xd;var yd="DropdownMenuRadioGroup",Cd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(fs,{...o,...r,ref:t})});Cd.displayName=yd;var bd="DropdownMenuRadioItem",Sd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(ps,{...o,...r,ref:t})});Sd.displayName=bd;var Ed="DropdownMenuItemIndicator",Rd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(hs,{...o,...r,ref:t})});Rd.displayName=Ed;var Md="DropdownMenuSeparator",Pd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(ms,{...o,...r,ref:t})});Pd.displayName=Md;var _d="DropdownMenuArrow",Nd=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(vs,{...o,...r,ref:t})});Nd.displayName=_d;var Ad="DropdownMenuSubTrigger",Od=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(gs,{...o,...r,ref:t})});Od.displayName=Ad;var jd="DropdownMenuSubContent",Td=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ne(n);return a.jsx(xs,{...o,...r,ref:t,style:{...e.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)"}})});Td.displayName=jd;var Id=ks,kd=Ls,Dd=Fs,Ld=Bs,Fd=Ws;function kr(e,[t,n]){return Math.min(n,Math.max(t,e))}var en="Popover",[Vs]=be(en,[Ve]),yt=Ve(),[$d,Oe]=Vs(en),Us=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,c=yt(t),u=l.useRef(null),[p,f]=l.useState(!1),[d,m]=Fe({prop:r,defaultProp:o??!1,onChange:s,caller:en});return a.jsx(ht,{...c,children:a.jsx($d,{scope:t,contentId:ve(),triggerRef:u,open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(v=>!v),[m]),hasCustomAnchor:p,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:i,children:n})})};Us.displayName=en;var Hs="PopoverAnchor",Bd=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(Hs,n),s=yt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return l.useEffect(()=>(i(),()=>c()),[i,c]),a.jsx(mt,{...s,...r,ref:t})});Bd.displayName=Hs;var Ks="PopoverTrigger",Gs=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(Ks,n),s=yt(n),i=Y(t,o.triggerRef),c=a.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Js(o.open),...r,ref:i,onClick:j(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:a.jsx(mt,{asChild:!0,...s,children:c})});Gs.displayName=Ks;var rr="PopoverPortal",[Wd,Vd]=Vs(rr,{forceMount:void 0}),zs=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Oe(rr,t);return a.jsx(Wd,{scope:t,forceMount:n,children:a.jsx(Ne,{present:n||s.open,children:a.jsx(dt,{asChild:!0,container:o,children:r})})})};zs.displayName=rr;var Ze="PopoverContent",Ys=l.forwardRef((e,t)=>{const n=Vd(Ze,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Oe(Ze,e.__scopePopover);return a.jsx(Ne,{present:r||s.open,children:s.modal?a.jsx(Hd,{...o,ref:t}):a.jsx(Kd,{...o,ref:t})})});Ys.displayName=Ze;var Ud=Le("PopoverContent.RemoveScroll"),Hd=l.forwardRef((e,t)=>{const n=Oe(Ze,e.__scopePopover),r=l.useRef(null),o=Y(t,r),s=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return Ht(i)},[]),a.jsx(ft,{as:Ud,allowPinchZoom:!0,children:a.jsx(Xs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,p=c.button===2||u;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kd=l.forwardRef((e,t)=>{const n=Oe(Ze,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return a.jsx(Xs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Xs=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,...d}=e,m=Oe(Ze,n),v=yt(n);return Vt(),a.jsx(ut,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(lt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>m.onOpenChange(!1),children:a.jsx(Xt,{"data-state":Js(m.open),role:"dialog",id:m.contentId,...v,...d,ref:t,style:{...d.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)"}})})})}),qs="PopoverClose",Gd=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(qs,n);return a.jsx(V.button,{type:"button",...r,ref:t,onClick:j(e.onClick,()=>o.onOpenChange(!1))})});Gd.displayName=qs;var zd="PopoverArrow",Zs=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=yt(n);return a.jsx(qt,{...o,...r,ref:t})});Zs.displayName=zd;function Js(e){return e?"open":"closed"}var Qs=Us,ei=Gs,ti=zs,ni=Ys,Yd=Zs,Xd=[" ","Enter","ArrowUp","ArrowDown"],qd=[" ","Enter"],Be="Select",[tn,nn,Zd]=Fn(Be),[et]=be(Be,[Zd,Ve]),rn=Ve(),[Jd,je]=et(Be),[Qd,ef]=et(Be),ri=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:c,onValueChange:u,dir:p,name:f,autoComplete:d,disabled:m,required:v,form:x}=e,h=rn(t),[g,w]=l.useState(null),[y,b]=l.useState(null),[C,M]=l.useState(!1),_=$n(p),[R,E]=Fe({prop:r,defaultProp:o??!1,onChange:s,caller:Be}),[A,D]=Fe({prop:i,defaultProp:c,onChange:u,caller:Be}),I=l.useRef(null),N=g?x||!!g.closest("form"):!0,[L,B]=l.useState(new Set),G=Array.from(L).map($=>$.props.value).join(";");return a.jsx(ht,{...h,children:a.jsxs(Jd,{required:v,scope:t,trigger:g,onTriggerChange:w,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:M,contentId:ve(),value:A,onValueChange:D,open:R,onOpenChange:E,dir:_,triggerPointerDownPosRef:I,disabled:m,children:[a.jsx(tn.Provider,{scope:t,children:a.jsx(Qd,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback($=>{B(W=>new Set(W).add($))},[]),onNativeOptionRemove:l.useCallback($=>{B(W=>{const k=new Set(W);return k.delete($),k})},[]),children:n})}),N?a.jsxs(Ri,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:d,value:A,onChange:$=>D($.target.value),disabled:m,form:x,children:[A===void 0?a.jsx("option",{value:""}):null,Array.from(L)]},G):null]})})};ri.displayName=Be;var oi="SelectTrigger",si=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=rn(n),i=je(oi,n),c=i.disabled||r,u=Y(t,i.onTriggerChange),p=nn(n),f=l.useRef("touch"),[d,m,v]=Pi(h=>{const g=p().filter(b=>!b.disabled),w=g.find(b=>b.value===i.value),y=_i(g,h,w);y!==void 0&&i.onValueChange(y.value)}),x=h=>{c||(i.onOpenChange(!0),v()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return a.jsx(mt,{asChild:!0,...s,children:a.jsx(V.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Mi(i.value)?"":void 0,...o,ref:u,onClick:j(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&x(h)}),onPointerDown:j(o.onPointerDown,h=>{f.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:j(o.onKeyDown,h=>{const g=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(g&&h.key===" ")&&Xd.includes(h.key)&&(x(),h.preventDefault())})})})});si.displayName=oi;var ii="SelectValue",ci=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...c}=e,u=je(ii,n),{onValueNodeHasChildrenChange:p}=u,f=s!==void 0,d=Y(t,u.onValueNodeChange);return ee(()=>{p(f)},[p,f]),a.jsx(V.span,{...c,ref:d,style:{pointerEvents:"none"},children:Mi(u.value)?a.jsx(a.Fragment,{children:i}):s})});ci.displayName=ii;var tf="SelectIcon",nf=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return a.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nf.displayName=tf;var rf="SelectPortal",ai=e=>a.jsx(dt,{asChild:!0,...e});ai.displayName=rf;var We="SelectContent",li=l.forwardRef((e,t)=>{const n=je(We,e.__scopeSelect),[r,o]=l.useState();if(ee(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Bt.createPortal(a.jsx(ui,{scope:e.__scopeSelect,children:a.jsx(tn.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(di,{...e,ref:t})});li.displayName=We;var ue=10,[ui,Te]=et(We),of="SelectContentImpl",sf=Le("SelectContent.RemoveScroll"),di=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:c,sideOffset:u,align:p,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:h,avoidCollisions:g,...w}=e,y=je(We,n),[b,C]=l.useState(null),[M,_]=l.useState(null),R=Y(t,P=>C(P)),[E,A]=l.useState(null),[D,I]=l.useState(null),N=nn(n),[L,B]=l.useState(!1),G=l.useRef(!1);l.useEffect(()=>{if(b)return Ht(b)},[b]),Vt();const $=l.useCallback(P=>{const[K,...J]=N().map(Z=>Z.ref.current),[z]=J.slice(-1),q=document.activeElement;for(const Z of P)if(Z===q||(Z?.scrollIntoView({block:"nearest"}),Z===K&&M&&(M.scrollTop=0),Z===z&&M&&(M.scrollTop=M.scrollHeight),Z?.focus(),document.activeElement!==q))return},[N,M]),W=l.useCallback(()=>$([E,b]),[$,E,b]);l.useEffect(()=>{L&&W()},[L,W]);const{onOpenChange:k,triggerPointerDownPosRef:O}=y;l.useEffect(()=>{if(b){let P={x:0,y:0};const K=z=>{P={x:Math.abs(Math.round(z.pageX)-(O.current?.x??0)),y:Math.abs(Math.round(z.pageY)-(O.current?.y??0))}},J=z=>{P.x<=10&&P.y<=10?z.preventDefault():b.contains(z.target)||k(!1),document.removeEventListener("pointermove",K),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J,{capture:!0})}}},[b,k,O]),l.useEffect(()=>{const P=()=>k(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[k]);const[X,S]=Pi(P=>{const K=N().filter(q=>!q.disabled),J=K.find(q=>q.ref.current===document.activeElement),z=_i(K,P,J);z&&setTimeout(()=>z.ref.current.focus())}),F=l.useCallback((P,K,J)=>{const z=!G.current&&!J;(y.value!==void 0&&y.value===K||z)&&(A(P),z&&(G.current=!0))},[y.value]),U=l.useCallback(()=>b?.focus(),[b]),H=l.useCallback((P,K,J)=>{const z=!G.current&&!J;(y.value!==void 0&&y.value===K||z)&&I(P)},[y.value]),re=r==="popper"?On:fi,Q=re===On?{side:c,sideOffset:u,align:p,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:h,avoidCollisions:g}:{};return a.jsx(ui,{scope:n,content:b,viewport:M,onViewportChange:_,itemRefCallback:F,selectedItem:E,onItemLeave:U,itemTextRefCallback:H,focusSelectedItem:W,selectedItemText:D,position:r,isPositioned:L,searchRef:X,children:a.jsx(ft,{as:sf,allowPinchZoom:!0,children:a.jsx(ut,{asChild:!0,trapped:y.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:j(o,P=>{y.trigger?.focus({preventScroll:!0}),P.preventDefault()}),children:a.jsx(lt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:a.jsx(re,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:P=>P.preventDefault(),...w,...Q,onPlaced:()=>B(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:j(w.onKeyDown,P=>{const K=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!K&&P.key.length===1&&S(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let z=N().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(P.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const q=P.target,Z=z.indexOf(q);z=z.slice(Z+1)}setTimeout(()=>$(z)),P.preventDefault()}})})})})})})});di.displayName=of;var cf="SelectItemAlignedPosition",fi=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=je(We,n),i=Te(We,n),[c,u]=l.useState(null),[p,f]=l.useState(null),d=Y(t,R=>f(R)),m=nn(n),v=l.useRef(!1),x=l.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:w,focusSelectedItem:y}=i,b=l.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&p&&h&&g&&w){const R=s.trigger.getBoundingClientRect(),E=p.getBoundingClientRect(),A=s.valueNode.getBoundingClientRect(),D=w.getBoundingClientRect();if(s.dir!=="rtl"){const q=D.left-E.left,Z=A.left-q,ce=R.left-Z,Ie=R.width+ce,sn=Math.max(Ie,E.width),cn=window.innerWidth-ue,an=kr(Z,[ue,Math.max(ue,cn-sn)]);c.style.minWidth=Ie+"px",c.style.left=an+"px"}else{const q=E.right-D.right,Z=window.innerWidth-A.right-q,ce=window.innerWidth-R.right-Z,Ie=R.width+ce,sn=Math.max(Ie,E.width),cn=window.innerWidth-ue,an=kr(Z,[ue,Math.max(ue,cn-sn)]);c.style.minWidth=Ie+"px",c.style.right=an+"px"}const I=m(),N=window.innerHeight-ue*2,L=h.scrollHeight,B=window.getComputedStyle(p),G=parseInt(B.borderTopWidth,10),$=parseInt(B.paddingTop,10),W=parseInt(B.borderBottomWidth,10),k=parseInt(B.paddingBottom,10),O=G+$+L+k+W,X=Math.min(g.offsetHeight*5,O),S=window.getComputedStyle(h),F=parseInt(S.paddingTop,10),U=parseInt(S.paddingBottom,10),H=R.top+R.height/2-ue,re=N-H,Q=g.offsetHeight/2,P=g.offsetTop+Q,K=G+$+P,J=O-K;if(K<=H){const q=I.length>0&&g===I[I.length-1].ref.current;c.style.bottom="0px";const Z=p.clientHeight-h.offsetTop-h.offsetHeight,ce=Math.max(re,Q+(q?U:0)+Z+W),Ie=K+ce;c.style.height=Ie+"px"}else{const q=I.length>0&&g===I[0].ref.current;c.style.top="0px";const ce=Math.max(H,G+h.offsetTop+(q?F:0)+Q)+J;c.style.height=ce+"px",h.scrollTop=K-H+h.offsetTop}c.style.margin=`${ue}px 0`,c.style.minHeight=X+"px",c.style.maxHeight=N+"px",r?.(),requestAnimationFrame(()=>v.current=!0)}},[m,s.trigger,s.valueNode,c,p,h,g,w,s.dir,r]);ee(()=>b(),[b]);const[C,M]=l.useState();ee(()=>{p&&M(window.getComputedStyle(p).zIndex)},[p]);const _=l.useCallback(R=>{R&&x.current===!0&&(b(),y?.(),x.current=!1)},[b,y]);return a.jsx(lf,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:_,children:a.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:a.jsx(V.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fi.displayName=cf;var af="SelectPopperPosition",On=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ue,...s}=e,i=rn(n);return a.jsx(Xt,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});On.displayName=af;var[lf,or]=et(We,{}),jn="SelectViewport",pi=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Te(jn,n),i=or(jn,n),c=Y(t,s.onViewportChange),u=l.useRef(0);return a.jsxs(a.Fragment,{children:[a.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:r}),a.jsx(tn.Slot,{scope:n,children:a.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:j(o.onScroll,p=>{const f=p.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=i;if(m?.current&&d){const v=Math.abs(u.current-f.scrollTop);if(v>0){const x=window.innerHeight-ue*2,h=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),w=Math.max(h,g);if(w<x){const y=w+v,b=Math.min(x,y),C=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});pi.displayName=jn;var hi="SelectGroup",[uf,df]=et(hi),mi=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ve();return a.jsx(uf,{scope:n,id:o,children:a.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});mi.displayName=hi;var vi="SelectLabel",ff=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=df(vi,n);return a.jsx(V.div,{id:o.id,...r,ref:t})});ff.displayName=vi;var Ft="SelectItem",[pf,gi]=et(Ft),xi=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,c=je(Ft,n),u=Te(Ft,n),p=c.value===r,[f,d]=l.useState(s??""),[m,v]=l.useState(!1),x=Y(t,y=>u.itemRefCallback?.(y,r,o)),h=ve(),g=l.useRef("touch"),w=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")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 a.jsx(pf,{scope:n,value:r,disabled:o,textId:h,isSelected:p,onItemTextChange:l.useCallback(y=>{d(b=>b||(y?.textContent??"").trim())},[]),children:a.jsx(tn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:a.jsx(V.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":p&&m,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:j(i.onFocus,()=>v(!0)),onBlur:j(i.onBlur,()=>v(!1)),onClick:j(i.onClick,()=>{g.current!=="mouse"&&w()}),onPointerUp:j(i.onPointerUp,()=>{g.current==="mouse"&&w()}),onPointerDown:j(i.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:j(i.onPointerMove,y=>{g.current=y.pointerType,o?u.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:j(i.onKeyDown,y=>{u.searchRef?.current!==""&&y.key===" "||(qd.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});xi.displayName=Ft;var st="SelectItemText",wi=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=je(st,n),c=Te(st,n),u=gi(st,n),p=ef(st,n),[f,d]=l.useState(null),m=Y(t,w=>d(w),u.onItemTextChange,w=>c.itemTextRefCallback?.(w,u.value,u.disabled)),v=f?.textContent,x=l.useMemo(()=>a.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=p;return ee(()=>(h(x),()=>g(x)),[h,g,x]),a.jsxs(a.Fragment,{children:[a.jsx(V.span,{id:u.textId,...s,ref:m}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Bt.createPortal(s.children,i.valueNode):null]})});wi.displayName=st;var yi="SelectItemIndicator",Ci=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gi(yi,n).isSelected?a.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});Ci.displayName=yi;var Tn="SelectScrollUpButton",bi=l.forwardRef((e,t)=>{const n=Te(Tn,e.__scopeSelect),r=or(Tn,e.__scopeSelect),[o,s]=l.useState(!1),i=Y(t,r.onScrollButtonChange);return ee(()=>{if(n.viewport&&n.isPositioned){let c=function(){const p=u.scrollTop>0;s(p)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(Ei,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});bi.displayName=Tn;var In="SelectScrollDownButton",Si=l.forwardRef((e,t)=>{const n=Te(In,e.__scopeSelect),r=or(In,e.__scopeSelect),[o,s]=l.useState(!1),i=Y(t,r.onScrollButtonChange);return ee(()=>{if(n.viewport&&n.isPositioned){let c=function(){const p=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<p;s(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?a.jsx(Ei,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Si.displayName=In;var Ei=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Te("SelectScrollButton",n),i=l.useRef(null),c=nn(n),u=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>u(),[u]),ee(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),a.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:j(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:j(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:j(o.onPointerLeave,()=>{u()})})}),hf="SelectSeparator",mf=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});mf.displayName=hf;var kn="SelectArrow",vf=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=rn(n),s=je(kn,n),i=Te(kn,n);return s.open&&i.position==="popper"?a.jsx(qt,{...o,...r,ref:t}):null});vf.displayName=kn;var gf="SelectBubbleInput",Ri=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=Y(r,o),i=Da(t);return l.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const d=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(d)}},[i,t]),a.jsx(V.select,{...n,style:{...zr,...n.style},ref:s,defaultValue:t})});Ri.displayName=gf;function Mi(e){return e===""||e===void 0}function Pi(e){const t=le(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const c=n.current+i;t(c),(function u(p){n.current=p,window.clearTimeout(r.current),p!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function _i(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=xf(e,Math.max(s,0));o.length===1&&(i=i.filter(p=>p!==n));const u=i.find(p=>p.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function xf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wf=ri,yf=si,Cf=ci,bf=ai,Sf=li,Ef=pi,Rf=mi,Mf=xi,Pf=wi,_f=Ci,Nf=bi,Af=Si;function Ni(e){return e.map((t,n)=>t.separator?a.jsx(Ts,{className:"my-1 h-px bg-border-default"},`separator-${n}`):t.items?.length?a.jsxs(cd,{children:[a.jsxs(ad,{disabled:t.disabled,className:"flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm text-text-default outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 data-highlighted:bg-surface-hover",children:[a.jsx("span",{children:t.label}),a.jsx(Hr,{className:"h-3.5 w-3.5 opacity-70"})]}),a.jsx(js,{children:a.jsx(ld,{sideOffset:6,alignOffset:-4,className:"z-50 min-w-44 rounded-lg border border-border-default bg-surface-base p-1.5 shadow-2xl",children:Ni(t.items)})})]},`sub-${n}`):a.jsxs(id,{disabled:t.disabled,onSelect:t.onSelect,className:"flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm text-text-default outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 data-highlighted:bg-surface-hover",children:[a.jsx("span",{children:t.label}),t.shortcut?a.jsx("span",{className:"ml-6 text-xs text-text-muted",children:t.shortcut}):null]},`item-${n}`))}function Ai({open:e,x:t,y:n,items:r,onOpenChange:o,onClose:s,renderMenuItems:i,renderHeader:c,className:u}){const p=T.useRef(null),f=T.useRef(!1),d=T.useCallback(v=>{o?.(v),v||s?.()},[s,o]),m=T.useMemo(()=>i?i():Ni(r??[]),[r,i]);return T.useEffect(()=>{if(!e){f.current=!1;return}if(f.current||!p.current)return;const v=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,button:2,clientX:t,clientY:n});p.current.dispatchEvent(v),f.current=!0},[e,t,n]),e?a.jsxs(rd,{onOpenChange:d,children:[a.jsx(od,{asChild:!0,children:a.jsx("span",{ref:p,"aria-hidden":!0,className:"fixed h-0 w-0",style:{left:t,top:n}})}),a.jsx(js,{children:a.jsxs(sd,{onCloseAutoFocus:v=>v.preventDefault(),className:`z-50 min-w-48 rounded-lg border border-border-default bg-surface-base p-1.5 shadow-2xl ${u??""}`,children:[c?a.jsx("div",{className:"px-2.5 py-1.5 text-xs text-text-muted",children:c()}):null,c?a.jsx(Ts,{className:"my-1 h-px bg-border-default"}):null,m]})})]}):null}function Of(e){if(e.clientX||e.clientY)return{x:e.clientX,y:e.clientY};const n=e.currentTarget.getBoundingClientRect();return{x:n.left+n.width/2,y:n.top+n.height/2}}function jf({children:e,getContextMenuItems:t,renderMenuItems:n,renderHeader:r}){const[o,s]=T.useState(!1),[i,c]=T.useState({x:0,y:0}),u=T.useCallback(p=>{p.preventDefault(),c(Of(p)),s(!0)},[]);return a.jsxs(a.Fragment,{children:[e({openMenu:u}),a.jsx(Ai,{open:o,x:i.x,y:i.y,onOpenChange:s,onClose:()=>s(!1),items:t?.(),renderMenuItems:n,renderHeader:r})]})}function Oi({children:e}){return e}function Tf({children:e,className:t,...n}){return a.jsx(Fd,{className:`mt-surface-input-ghost data-highlighted:bg-surface-popover flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 ${t||""}`,...n,children:e})}const If=({title:e,children:t,className:n,kind:r="default",size:o="medium",variant:s="default",showCaret:i=!0})=>{const c=o==="large"?"[&_svg]:h-5 [&_svg]:w-5":"[&_svg]:h-4 [&_svg]:w-4",u=o==="large"?"h-4 w-4":"h-3.5 w-3.5";let p=null;const f=[];return T.Children.forEach(t,d=>{if(T.isValidElement(d)&&d.type===Oi){p=d.props.children;return}f.push(d)}),a.jsxs(Id,{children:[a.jsx(kd,{asChild:!0,children:p||a.jsxs(Xe,{kind:r,size:o,variant:s,className:r==="icon"?`${c} ${n||""}`:n,children:[a.jsx("span",{className:"leading-none inline-flex items-center justify-center",children:e||"Dropdown"}),r!=="icon"&&i&&a.jsx("span",{className:"inline-flex items-center justify-center",children:a.jsx(Ur,{className:`${u} opacity-70`,"aria-hidden":"true"})})]})}),a.jsx(Dd,{children:a.jsx(Ld,{sideOffset:5,side:"bottom",className:"mt-surface-menu z-50 min-w-48 rounded-lg border p-1.5 shadow-2xl",children:f})})]})},on=If;on.Trigger=Oi;const Dn=T.forwardRef(({size:e,variant:t,className:n,...r},o)=>{const s=e||"medium",i={medium:"mt-layout-input-medium",large:"mt-layout-input-large"},c=t||"default",u={default:"mt-surface-input-default",ghost:"mt-surface-input-ghost"};return a.jsx("input",{...r,ref:o,className:`w-fit border rounded outline-none ${i[s]} ${u[c]} ${n||""}`})}),ji=["shift","alt","meta","mod","ctrl","control"],kf={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function Me(e){return(kf[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Ti(e){return ji.includes(e)}function yn(e,t=","){return e.toLowerCase().split(t)}function Cn(e,t="+",n=">",r=!1,o,s){let i=[],c=!1;e=e.trim(),e.includes(n)?(c=!0,i=e.toLocaleLowerCase().split(n).map(f=>Me(f))):i=e.toLocaleLowerCase().split(t).map(f=>Me(f));const u={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),shift:i.includes("shift"),meta:i.includes("meta"),mod:i.includes("mod"),useKey:r},p=i.filter(f=>!ji.includes(f));return{...u,keys:p,description:o,isSequence:c,hotkey:e,metadata:s}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Ii([Me(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&ki([Me(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{xe.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{xe.clear()},0)}));const xe=new Set;function sr(e){return Array.isArray(e)}function Df(e,t=","){return(sr(e)?e:e.split(t)).every(n=>xe.has(n.trim().toLowerCase()))}function Ii(e){const t=Array.isArray(e)?e:[e];xe.has("meta")&&xe.forEach(n=>{Ti(n)||xe.delete(n.toLowerCase())}),t.forEach(n=>{xe.add(n.toLowerCase())})}function ki(e){const t=Array.isArray(e)?e:[e];e==="meta"?xe.clear():t.forEach(n=>{xe.delete(n.toLowerCase())})}function Lf(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Ff(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}const $f=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Bf(e){return Di(e,$f)}function Di(e,t=!1){const{target:n,composed:r}=e;let o,s;return Wf(n)&&r?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,s=e.composedPath()[0]&&e.composedPath()[0].role):(o=n&&n.tagName,s=n&&n.role),sr(t)?!!(o&&t&&t.some(i=>i.toLowerCase()===o.toLowerCase()||i===s)):!!(o&&t&&t)}function Wf(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Vf(e,t){return e.length===0&&t?!1:t?e.some(n=>t.includes(n))||e.includes("*"):!0}const Uf=(e,t,n=!1)=>{const{alt:r,meta:o,mod:s,shift:i,ctrl:c,keys:u,useKey:p}=t,{code:f,key:d,ctrlKey:m,metaKey:v,shiftKey:x,altKey:h}=e,g=Me(f);if(p&&u?.length===1&&u.includes(d.toLowerCase()))return!0;if(!u?.includes(g)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(g))return!1;if(!n){if(r!==h&&g!=="alt"||i!==x&&g!=="shift")return!1;if(s){if(!v&&!m)return!1}else if(o!==v&&g!=="meta"&&g!=="os"||c!==m&&g!=="ctrl"&&g!=="control")return!1}return u&&u.length===1&&u.includes(g)?!0:u&&u.length>0?u.includes(g)?Df(u):!1:!u||u.length===0},Hf=T.createContext(void 0),Kf=()=>T.useContext(Hf);function Li(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Li(e[r],t[r]),!0):e===t}const Gf=T.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),zf=()=>T.useContext(Gf);function Yf(e){const t=T.useRef(void 0);return Li(t.current,e)||(t.current=e),t.current}const Dr=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Xf=typeof window<"u"?T.useLayoutEffect:T.useEffect;function qf(e,t,n,r){const o=T.useRef(null),s=T.useRef(!1),i=Array.isArray(n)?Array.isArray(r)?void 0:r:n,c=sr(e)?e.join(i?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,p=T.useCallback(t,u??[]),f=T.useRef(p);u?f.current=p:f.current=t;const d=Yf(i),{activeScopes:m}=zf(),v=Kf();return Xf(()=>{if(d?.enabled===!1||!Vf(m,d?.scopes))return;let x=[],h;const g=(C,M=!1)=>{if(!(Bf(C)&&!Di(C,d?.enableOnFormTags))){if(o.current!==null){const _=o.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==o.current&&!o.current.contains(_.activeElement)){Dr(C);return}}C.target?.isContentEditable&&!d?.enableOnContentEditable||yn(c,d?.delimiter).forEach(_=>{if(_.includes(d?.splitKey??"+")&&_.includes(d?.sequenceSplitKey??">")){console.warn(`Hotkey ${_} contains both ${d?.splitKey??"+"} and ${d?.sequenceSplitKey??">"} which is not supported.`);return}const R=Cn(_,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata);if(R.isSequence){h=setTimeout(()=>{x=[]},d?.sequenceTimeoutMs??1e3);const E=R.useKey?C.key:Me(C.code);if(Ti(E.toLowerCase()))return;x.push(E);const A=R.keys?.[x.length-1];if(E!==A){x=[],h&&clearTimeout(h);return}x.length===R.keys?.length&&(f.current(C,R),h&&clearTimeout(h),x=[])}else if(Uf(C,R,d?.ignoreModifiers)||R.keys?.includes("*")){if(d?.ignoreEventWhen?.(C)||M&&s.current)return;if(Lf(C,R,d?.preventDefault),!Ff(C,R,d?.enabled)){Dr(C);return}f.current(C,R),M||(s.current=!0)}})}},w=C=>{C.code!==void 0&&(Ii(Me(C.code)),(d?.keydown===void 0&&d?.keyup!==!0||d?.keydown)&&g(C))},y=C=>{C.code!==void 0&&(ki(Me(C.code)),s.current=!1,d?.keyup&&g(C,!0))},b=o.current||i?.document||document;return b.addEventListener("keyup",y,i?.eventListenerOptions),b.addEventListener("keydown",w,i?.eventListenerOptions),v&&yn(c,d?.delimiter).forEach(C=>{v.addHotkey(Cn(C,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),()=>{b.removeEventListener("keyup",y,i?.eventListenerOptions),b.removeEventListener("keydown",w,i?.eventListenerOptions),v&&yn(c,d?.delimiter).forEach(C=>{v.removeHotkey(Cn(C,d?.splitKey,d?.sequenceSplitKey,d?.useKey,d?.description,d?.metadata))}),x=[],h&&clearTimeout(h)}},[c,d,m]),o}function Fi({children:e}){return e}function $i(e,t){T.Children.forEach(e,n=>{if(T.isValidElement(n)){if(n.type===Fi){t.triggerOverride=n.props.children;return}if(n.type===T.Fragment){$i(n.props.children,t);return}t.selectItems.push(n)}})}const we=T.forwardRef(({children:e,className:t,icon:n,shortcut:r="",...o},s)=>a.jsxs(Mf,{className:`mt-surface-input-ghost focus:ring-0 focus:ring-offset-0 data-highlighted:bg-surface-popover data-[state=checked]:bg-surface-popover flex min-w-44 cursor-pointer items-center justify-between rounded-md px-2.5 py-1.5 text-sm outline-none transition-colors data-disabled:cursor-not-allowed data-disabled:opacity-40 ${t||""}`,...o,ref:s,children:[a.jsxs("span",{className:"flex items-center",children:[n?a.jsx("span",{className:"mr-2",children:n}):null,a.jsx(Pf,{children:e})]}),a.jsxs("span",{className:"ml-6 flex items-center gap-2 text-xs text-text-muted",children:[r?a.jsx("span",{children:r}):null,a.jsx(_f,{children:a.jsx(Vr,{className:"h-4 w-4 text-text-muted"})})]})]})),Zf=({children:e,className:t,placeholder:n,kind:r="default",size:o="medium",options:s,variant:i="default",value:c,onValueChange:u,showCaret:p=!0,...f})=>{const d=c!==void 0&&u!==void 0,[m,v]=T.useState(c??""),x=d?c:m,[h,g]=T.useState(!1),[w,y]=T.useState(!1),b=o==="large"?"[&_svg]:h-5 [&_svg]:w-5":"[&_svg]:h-4 [&_svg]:w-4",C=o==="large"?"h-4 w-4":"h-3.5 w-3.5",{triggerOverride:M,selectItems:_}=T.useMemo(()=>{const E={triggerOverride:null,selectItems:[]};return e&&$i(e,E),!e&&s&&(E.selectItems=s.map(A=>a.jsx(we,{value:A.value,icon:A.icon,disabled:A.disabled,children:A.label},A.value))),E},[e,s]),R=_.find(E=>T.isValidElement(E)&&E.props.value===x);return T.useEffect(()=>{!d&&c!==void 0&&c!==m&&v(c)},[d,c,m]),qf("1,2,3,4,5,6,7,8,9",E=>{const A=Number(E.key)-1,D=_[A];D&&(d||v(D.props.value),u?.(D.props.value),g(!1))},{enabled:h||w,enableOnFormTags:!0,document:window.document}),a.jsxs(wf,{value:x,onValueChange:E=>{d||v(E),u?.(E)},open:h,onOpenChange:g,...f,children:[a.jsx(yf,{asChild:!0,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),children:M||a.jsxs(Xe,{kind:r,size:o,variant:i,className:r==="icon"?`${b} ${t||""}`:t,children:[a.jsx("span",{className:"leading-none inline-flex items-center justify-center",children:r==="icon"?a.jsx("span",{className:`inline-flex h-full w-full items-center justify-center leading-none ${b}`,children:R?.props.icon??n}):a.jsx(Cf,{placeholder:n})}),r!=="icon"&&p&&a.jsx("span",{className:"inline-flex items-center justify-center",children:a.jsx(Ur,{className:`${C} opacity-70`,"aria-hidden":"true"})})]})}),a.jsx(bf,{children:a.jsxs(Sf,{sideOffset:5,position:"popper",align:"center",className:"mt-surface-menu z-50 min-w-48 rounded-lg border p-1.5 shadow-2xl",children:[a.jsx(Nf,{}),a.jsx(Ef,{children:a.jsx(Rf,{className:"flex flex-col gap-0.5",children:_.map((E,A)=>T.cloneElement(E,{shortcut:(A+1).toString()}))})}),a.jsx(Af,{})]})})]})},Re=Zf;Re.Trigger=Fi;const $t=(e,t)=>{const n=e[0]?.value??"",r=t[0]?.value??"";return{type:"rule",field:n,operator:r,value:null}},Jf=(e,t)=>({type:"group",conjunction:"AND",children:[$t(e,t)]}),De=(e,t,n)=>{if(t.length===0)return n(e);const[r,...o]=t,s=e.children[r];if(!s)return e;let i=s;return o.length===0?i=n(s):s.type==="group"&&(i=De(s,o,n)),i===s?e:{...e,children:e.children.map((c,u)=>u===r?i:c)}},Ln=(e,t)=>{if(t.length===0)return e;const[n,...r]=t;if(r.length===0)return{...e,children:e.children.filter((i,c)=>c!==n)};const o=e.children[n];if(!o||o.type!=="group")return e;const s=Ln(o,r);return{...e,children:e.children.map((i,c)=>c===n?s:i)}},Qf=(e,t,n)=>e.children.length>0?e:{...e,children:[$t(t,n)]};function ep({title:e="Filter",value:t,onChange:n,fields:r,operators:o,advanced:s,onAdvancedChange:i,kind:c="default",size:u="medium",variant:p="default",showCaret:f=!0}){const[d,m]=T.useState(!1),v=s??d,x=i??m,h=T.useMemo(()=>{const E=new Map;return o.forEach(A=>E.set(A.value,A)),E},[o]),g=T.useMemo(()=>{const E=new Map;return r.forEach(A=>E.set(A.value,A)),E},[r]),w=E=>n(Qf(E,r,o)),y=()=>{const E=t.children[0];return E&&E.type==="rule"?E:$t(r,o)},b=()=>{const E=y(),D=h.get(E.operator)?.requiresValue??!0,I=g.get(E.field)?.icon;return a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:I||a.jsx(rt,{className:"h-4 w-4"})}),a.jsx(Re,{value:E.field,onValueChange:N=>{const L={...E,field:N};w({...t,conjunction:"AND",children:[L]})},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(N=>a.jsx(we,{value:N.value,icon:N.icon,children:N.label},N.value))}),a.jsx(Re,{value:E.operator,onValueChange:N=>{const L={...E,operator:N,value:null};w({...t,conjunction:"AND",children:[L]})},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:o.map(N=>a.jsx(we,{value:N.value,children:N.label},N.value))}),D?a.jsx(Dn,{className:"flex-1 w-full text-xs",placeholder:"Value",value:E.value??"",onChange:N=>{const L={...E,value:N.target.value};w({...t,conjunction:"AND",children:[L]})},variant:"ghost"}):a.jsx("span",{className:"text-xs",children:"No value"})]})},C=(E,A)=>{const I=h.get(E.operator)?.requiresValue??!0;return a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[a.jsx(Re,{value:E.field,onValueChange:N=>{w(De(t,A,L=>({...L,field:N})))},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(N=>a.jsx(we,{value:N.value,icon:N.icon,children:N.label},N.value))}),a.jsx(Re,{value:E.operator,onValueChange:N=>{w(De(t,A,L=>({...L,operator:N,value:null})))},variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:o.map(N=>a.jsx(we,{value:N.value,children:N.label},N.value))}),I?a.jsx(Dn,{className:"flex-1 w-full text-xs",placeholder:"Value",value:E.value??"",onChange:N=>{w(De(t,A,L=>({...L,value:N.target.value})))},variant:"ghost"}):a.jsx("span",{className:"text-xs text-text-muted",children:"No value"}),a.jsx("button",{type:"button",className:"text-text-muted hover:text-text-default",onClick:()=>w(Ln(t,A)),"aria-label":"Delete rule",children:a.jsx(Sn,{className:"h-4 w-4"})})]})},M=(E,A,D=!1)=>a.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-border-default bg-surface-subtle p-2",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[a.jsx("span",{className:"uppercase tracking-wide",children:D?"Where":"Group"}),a.jsx("button",{type:"button",className:"rounded-md border border-border-default bg-surface-subtle px-2 py-1 text-xs text-text-primary",onClick:()=>{w(De(t,A,I=>({...I,conjunction:I.conjunction==="AND"?"OR":"AND"})))},children:E.conjunction}),!D&&a.jsx("button",{type:"button",className:"ml-auto text-text-muted hover:text-text-default",onClick:()=>w(Ln(t,A)),"aria-label":"Delete group",children:a.jsx(Sn,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"flex flex-col gap-2",children:E.children.map((I,N)=>{const L=[...A,N];return I.type==="group"?a.jsx("div",{children:M(I,L)},`group-${N}`):a.jsx("div",{children:C(I,L)},`rule-${N}`)})}),a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx(Xe,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:()=>{w(De(t,A,I=>({...I,children:[...I.children,$t(r,o)]})))},children:a.jsx(bn,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-text-primary",children:"Add rule"}),a.jsx(Xe,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:()=>{w(De(t,A,I=>({...I,children:[...I.children,Jf(r,o)]})))},children:a.jsx(bn,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-text-primary",children:"Add group"})]})]}),_=g.get(y().field)?.icon,R=v?a.jsx(rt,{className:"h-4 w-4"}):_||a.jsx(rt,{className:"h-4 w-4"});return a.jsx(on,{title:c==="icon"?a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-primary",children:R}):a.jsxs("span",{className:"inline-flex items-center gap-2",children:[a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-primary",children:R}),a.jsx("span",{children:e})]}),kind:c,size:u,variant:p,showCaret:f,children:a.jsxs("div",{className:"w-130 max-w-[80vw] p-2 text-text-primary",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[a.jsxs("span",{className:"flex items-center gap-2 text-xs uppercase tracking-wide text-text-muted",children:[v&&a.jsx(rt,{className:"h-3.5 w-3.5"}),v?"Advanced":"Simple"," filter"]}),a.jsx("button",{type:"button",className:"text-text-muted hover:text-text-default",onClick:()=>x(!v),"aria-label":"Toggle filter type",children:a.jsx(sc,{className:"h-4 w-4"})})]}),v?M(t,[],!0):b()]})})}function tp(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{"clip-path":"url(#clip0_129_4601)",children:[a.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),a.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"#7F7F7F",style:{fill:"#7F7F7F",fillOpacity:1}}),a.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"#7F7F7F",style:{fill:"#7F7F7F",fillOpacity:1}})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_129_4601",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function np(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{"clip-path":"url(#clip0_25_3437)",children:[a.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),a.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),a.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"#808080",style:{fill:"#808080",fillOpacity:1}})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3437",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function rp(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{"clip-path":"url(#clip0_25_3441)",children:[a.jsx("rect",{y:"7",width:"3.5",height:"6.41667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),a.jsx("rect",{x:"5.25",y:"3.5",width:"3.5",height:"9.91667",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}}),a.jsx("rect",{x:"10.5",y:"0.583252",width:"3.5",height:"12.8333",rx:"1",fill:"white",style:{fill:"white",fillOpacity:1}})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3441",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function op(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("g",{"clip-path":"url(#clip0_25_3445)",children:a.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"white",style:{stroke:"white",strokeOpacity:1},"stroke-width":"2","stroke-dasharray":"6 6"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3445",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function sp(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("g",{"clip-path":"url(#clip0_25_3447)",children:a.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"white",style:{stroke:"white",strokeOpacity:1},"stroke-width":"2"})}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3447",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function ip(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{"clip-path":"url(#clip0_25_3452)",children:[a.jsx("circle",{cx:"7",cy:"7",r:"6",stroke:"#F0BF00",style:{stroke:"#F0BF00",strokeOpacity:1},"stroke-width":"2"}),a.jsx("path",{d:"M7 10.5C8.933 10.5 10.5 8.933 10.5 7C10.5 5.067 8.933 3.5 7 3.5V10.5Z",fill:"#F0BF00",style:{fill:"#F0BF00",fillOpacity:1}})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3452",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function cp(){return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsxs("g",{"clip-path":"url(#clip0_25_3458)",children:[a.jsx("circle",{cx:"7",cy:"7",r:"7",fill:"#16A34A",style:{fill:"#16A34A",fillOpacity:1}}),a.jsx("path",{d:"M3.5 7.40872L5.42979 9.26765C5.46807 9.30452 5.52852 9.30501 5.56738 9.26874L10.5 4.66675",stroke:"#1F2023",style:{stroke:"#1F2023",strokeOpacity:1},"stroke-width":"2","stroke-linecap":"round"})]}),a.jsx("defs",{children:a.jsx("clipPath",{id:"clip0_25_3458",children:a.jsx("rect",{width:"14",height:"14",fill:"white",style:{fill:"white",fillOpacity:1}})})})]})}function Bi({children:e}){return e}const ap=({children:e,content:t,open:n,onOpenChange:r,side:o="bottom",align:s="start",sideOffset:i=6,className:c})=>{let u=null;const p=[];T.Children.forEach(e,d=>{if(T.isValidElement(d)&&d.type===Bi){u=d.props.children;return}p.push(d)});const f=u??(T.isValidElement(p[0])?p[0]:null);return f?a.jsxs(Qs,{open:n,onOpenChange:r,children:[a.jsx(ei,{asChild:!0,children:f}),a.jsx(ti,{children:a.jsx(ni,{side:o,align:s,sideOffset:i,className:`bg-surface-subtle border border-border-default rounded-lg p-2 shadow-2xl backdrop-blur-md z-50 ${c||""}`,children:t})})]}):a.jsx(a.Fragment,{})},Wi=ap;Wi.Trigger=Bi;const lp=e=>({property:e[0]?.value??"",direction:"asc"});function up({title:e="Sort",value:t,onChange:n,fields:r,kind:o="default",size:s="medium",variant:i="default",showCaret:c=!0}){const u=(m,v)=>{n(t.map((x,h)=>h===m?{...x,...v}:x))},p=m=>{n(t.filter((v,x)=>x!==m))},f=()=>{n([...t,lp(r)])},d=()=>t.length===1?t[0].direction==="desc"?a.jsx(Zi,{className:"h-4 w-4"}):a.jsx(ec,{className:"h-4 w-4"}):a.jsx(Wr,{className:"h-4 w-4"});return a.jsx(on,{title:o==="icon"?a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-muted",children:d()}):a.jsxs("span",{className:"inline-flex items-center gap-2",children:[a.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-text-muted",children:d()}),a.jsx("span",{children:e})]}),kind:o,size:s,variant:i,showCaret:c,children:a.jsxs("div",{className:"w-105 max-w-[80vw] p-2 text-text-muted",children:[a.jsxs("div",{className:"flex flex-col gap-2",children:[t.length===0&&a.jsx("div",{className:"text-xs text-text-muted",children:"No sorting rules."}),t.map((m,v)=>a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border-default bg-surface-subtle px-2 py-1.5",children:[a.jsx(Re,{value:m.property,onValueChange:x=>u(v,{property:x}),variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:r.map(x=>a.jsx(we,{value:x.value,children:x.label},x.value))}),a.jsxs(Re,{value:m.direction,onValueChange:x=>u(v,{direction:x}),variant:"ghost",size:"medium",showCaret:!1,className:"text-xs",children:[a.jsx(we,{value:"asc",children:"Ascending"}),a.jsx(we,{value:"desc",children:"Descending"})]}),a.jsx("button",{type:"button",className:"ml-auto text-text-muted hover:text-text-default",onClick:()=>p(v),"aria-label":"Delete sort rule",children:a.jsx(Sn,{className:"h-4 w-4"})})]},`${m.property}-${v}`))]}),a.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",children:[a.jsx(Xe,{kind:"icon",variant:"ghost",className:"text-text-muted",onClick:f,children:a.jsx(bn,{className:"h-4 w-4"})}),a.jsx("span",{className:"text-text-muted",children:"Add sort"})]})]})})}function dp({children:e,gap:t=0,row:n=!1,align:r,justify:o="start",className:s=""}){const c={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"}[r??(n?"center":"stretch")],u={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch",baseline:"justify-baseline",normal:"justify-normal"}[o];return a.jsx("div",{className:`flex flex-1 ${c} ${u} ${n?"flex-row":"flex-col"} ${s}`,style:{gap:`${t*.25}rem`},children:e})}const fp={xs:"h-[18px] w-[18px] text-[9px]",sm:"h-6 w-6 text-[10px]",md:"h-8 w-8 text-xs",lg:"h-10 w-10 text-sm"};function pp(e){const t=e?.trim();if(!t)return"?";const n=t.split(/\s+/).filter(Boolean);return n.length===1?n[0].slice(0,2).toUpperCase():`${n[0][0]??""}${n[n.length-1][0]??""}`.toUpperCase()}function hp({src:e,alt:t,name:n,initials:r,size:o="sm",className:s,...i}){const[c,u]=T.useState(null),p=T.useMemo(()=>pp(r??n??t),[t,r,n]),f=["inline-flex rounded-full shrink-0 select-none items-center justify-center overflow-hidden bg-surface-popover text-white",fp[o],s].filter(Boolean).join(" ");return a.jsx("div",{className:f,title:t??n,...i,children:e&&c!==e?a.jsx("img",{src:e,alt:t??n??"Avatar",className:"h-full w-full object-cover",onError:()=>u(e)}):a.jsx("span",{"aria-hidden":"true",className:"font-medium leading-none",children:p})})}exports.Anchor=mt;exports.Arrow=qt;exports.Arrow2=Yd;exports.ArrowUpDown=Wr;exports.ChevronRight=Hr;exports.Content=Xt;exports.Content2=ni;exports.DismissableLayer=lt;exports.FocusScope=ut;exports.ListFilter=rt;exports.MtAvatar=hp;exports.MtBacklogIcon=op;exports.MtButton=Xe;exports.MtCheckIcon=cp;exports.MtCheckbox=mc;exports.MtContextMenu=Ai;exports.MtDropdown=on;exports.MtDropdownItem=Tf;exports.MtFilterDropdown=ep;exports.MtHighIcon=rp;exports.MtInProgressIcon=ip;exports.MtInput=Dn;exports.MtLowIcon=tp;exports.MtMediumIcon=np;exports.MtOpenIcon=sp;exports.MtPopover=Wi;exports.MtSelect=Re;exports.MtSelectItem=we;exports.MtSortDropdown=up;exports.MtStack=dp;exports.Portal=dt;exports.Portal$1=ti;exports.Presence=Ne;exports.Primitive=V;exports.ReactRemoveScroll=ft;exports.Root=Sc;exports.Root2=ht;exports.Root2$1=Qs;exports.Search=dc;exports.Trigger=ei;exports.WithContextMenu=jf;exports.X=hc;exports.composeEventHandlers=j;exports.createContext2=Ec;exports.createContextScope=be;exports.createLucideIcon=oe;exports.createPopperScope=Ve;exports.createSlot=Le;exports.createSlottable=gc;exports.hideOthers=Ht;exports.jsxRuntimeExports=a;exports.useComposedRefs=Y;exports.useControllableState=Fe;exports.useFocusGuards=Vt;exports.useId=ve;