figma-kit 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),i=require("react"),Je=require("react-dom");function pa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=pa(i),fo=pa(Je);function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function zl(e,t){const n=m.createContext(t);function o(a){const{children:c,...s}=a,l=m.useMemo(()=>s,Object.values(s));return v.jsx(n.Provider,{value:l,children:c})}function r(a){const c=m.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function he(e,t=[]){let n=[];function o(a,c){const s=m.createContext(c),l=n.length;n=[...n,c];function u(f){const{scope:h,children:g,...b}=f,p=(h==null?void 0:h[e][l])||s,$=m.useMemo(()=>b,Object.values(b));return v.jsx(p.Provider,{value:$,children:g})}function d(f,h){const g=(h==null?void 0:h[e][l])||s,b=m.useContext(g);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(c=>m.createContext(c));return function(s){const l=(s==null?void 0:s[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,Wl(r,...t)]}function Wl(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const c=o.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Hl(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ma(...e){return t=>e.forEach(n=>Hl(n,t))}function ee(...e){return m.useCallback(ma(...e),e)}var je=m.forwardRef((e,t)=>{const{children:n,...o}=e,r=m.Children.toArray(n),a=r.find(Gl);if(a){const c=a.props.children,s=r.map(l=>l===a?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:l);return v.jsx(Kn,{...o,ref:t,children:m.isValidElement(c)?m.cloneElement(c,void 0,s):null})}return v.jsx(Kn,{...o,ref:t,children:n})});je.displayName="Slot";var Kn=m.forwardRef((e,t)=>{const{children:n,...o}=e;if(m.isValidElement(n)){const r=Kl(n);return m.cloneElement(n,{...Ul(o,n.props),ref:t?ma(t,r):r})}return m.Children.count(n)>1?m.Children.only(null):null});Kn.displayName="SlotClone";var va=({children:e})=>v.jsx(v.Fragment,{children:e});function Gl(e){return m.isValidElement(e)&&e.type===va}function Ul(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{a(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Kl(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ha(e){const t=e+"CollectionProvider",[n,o]=he(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=g=>{const{scope:b,children:p}=g,$=i.useRef(null),x=i.useRef(new Map).current;return v.jsx(r,{scope:b,itemMap:x,collectionRef:$,children:p})};c.displayName=t;const s=e+"CollectionSlot",l=i.forwardRef((g,b)=>{const{scope:p,children:$}=g,x=a(s,p),w=ee(b,x.collectionRef);return v.jsx(je,{ref:w,children:$})});l.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((g,b)=>{const{scope:p,children:$,...x}=g,w=i.useRef(null),C=ee(b,w),y=a(u,p);return i.useEffect(()=>(y.itemMap.set(w,{ref:w,...x}),()=>void y.itemMap.delete(w))),v.jsx(je,{[d]:"",ref:C,children:$})});f.displayName=u;function h(g){const b=a(e+"CollectionConsumer",g);return i.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const x=Array.from($.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((y,E)=>x.indexOf(y.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:l,ItemSlot:f},h,o]}var Le=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},Yl=m.useId||(()=>{}),Xl=0;function qe(e){const[t,n]=m.useState(Yl());return Le(()=>{e||n(o=>o??String(Xl++))},[e]),e||(t?`radix-${t}`:"")}var ql=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],W=ql.reduce((e,t)=>{const n=m.forwardRef((o,r)=>{const{asChild:a,...c}=o,s=a?je:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(s,{...c,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zl(e,t){e&&fo.flushSync(()=>e.dispatchEvent(t))}function Re(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Ee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Ql({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o,s=Re(n),l=m.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else r(u)},[a,e,r,s]);return[c,l]}function Ql({defaultProp:e,onChange:t}){const n=m.useState(e),[o]=n,r=m.useRef(o),a=Re(t);return m.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}var Jl=m.createContext(void 0);function Ot(e){const t=m.useContext(Jl);return e||t||"ltr"}var Nn="rovingFocusGroup.onEntryFocus",eu={bubbles:!1,cancelable:!0},un="RovingFocusGroup",[Yn,ga,tu]=ha(un),[nu,gt]=he(un,[tu]),[ou,ru]=nu(un),ba=m.forwardRef((e,t)=>v.jsx(Yn.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(Yn.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(au,{...e,ref:t})})}));ba.displayName=un;var au=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=m.useRef(null),g=ee(t,h),b=Ot(a),[p=null,$]=Ee({prop:c,defaultProp:s,onChange:l}),[x,w]=m.useState(!1),C=Re(u),y=ga(n),E=m.useRef(!1),[_,S]=m.useState(0);return m.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(Nn,C),()=>P.removeEventListener(Nn,C)},[C]),v.jsx(ou,{scope:n,orientation:o,dir:b,loop:r,currentTabStopId:p,onItemFocus:m.useCallback(P=>$(P),[$]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:m.useCallback(()=>S(P=>P-1),[]),children:v.jsx(W.div,{tabIndex:x||_===0?-1:0,"data-orientation":o,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{E.current=!0}),onFocus:z(e.onFocus,P=>{const O=!E.current;if(P.target===P.currentTarget&&O&&!x){const A=new CustomEvent(Nn,eu);if(P.currentTarget.dispatchEvent(A),!A.defaultPrevented){const D=y().filter(B=>B.focusable),k=D.find(B=>B.active),V=D.find(B=>B.id===p),I=[k,V,...D].filter(Boolean).map(B=>B.ref.current);wa(I,d)}}E.current=!1}),onBlur:z(e.onBlur,()=>w(!1))})})}),$a="RovingFocusGroupItem",xa=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...c}=e,s=qe(),l=a||s,u=ru($a,n),d=u.currentTabStopId===l,f=ga(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=u;return m.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),v.jsx(Yn.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:v.jsx(W.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:z(e.onMouseDown,b=>{o?u.onItemFocus(l):b.preventDefault()}),onFocus:z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:z(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=iu(b,u.orientation,u.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(p==="last")x.reverse();else if(p==="prev"||p==="next"){p==="prev"&&x.reverse();const w=x.indexOf(b.currentTarget);x=u.loop?lu(x,w+1):x.slice(w+1)}setTimeout(()=>wa(x))}})})})});xa.displayName=$a;var cu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function su(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function iu(e,t,n){const o=su(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return cu[o]}function wa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function lu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var po=ba,mo=xa;function uu(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var Ae=e=>{const{present:t,children:n}=e,o=du(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=ee(o.ref,fu(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};Ae.displayName="Presence";function du(e){const[t,n]=m.useState(),o=m.useRef({}),r=m.useRef(e),a=m.useRef("none"),c=e?"mounted":"unmounted",[s,l]=uu(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Vt(o.current);a.current=s==="mounted"?u:"none"},[s]),Le(()=>{const u=o.current,d=r.current;if(d!==e){const h=a.current,g=Vt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Le(()=>{if(t){const u=f=>{const g=Vt(o.current).includes(f.animationName);f.target===t&&g&&fo.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=Vt(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Vt(e){return(e==null?void 0:e.animationName)||"none"}function fu(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vo="Tabs",[pu,Yx]=he(vo,[gt]),Ca=gt(),[mu,ho]=pu(vo),ya=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:c="horizontal",dir:s,activationMode:l="automatic",...u}=e,d=Ot(s),[f,h]=Ee({prop:o,onChange:r,defaultProp:a});return v.jsx(mu,{scope:n,baseId:qe(),value:f,onValueChange:h,orientation:c,dir:d,activationMode:l,children:v.jsx(W.div,{dir:d,"data-orientation":c,...u,ref:t})})});ya.displayName=vo;var Ea="TabsList",Sa=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=ho(Ea,n),c=Ca(n);return v.jsx(po,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:o,children:v.jsx(W.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});Sa.displayName=Ea;var Ra="TabsTrigger",Pa=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,c=ho(Ra,n),s=Ca(n),l=Aa(c.baseId,o),u=Na(c.baseId,o),d=o===c.value;return v.jsx(mo,{asChild:!0,...s,focusable:!r,active:d,children:v.jsx(W.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:z(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?c.onValueChange(o):f.preventDefault()}),onKeyDown:z(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&c.onValueChange(o)}),onFocus:z(e.onFocus,()=>{const f=c.activationMode!=="manual";!d&&!r&&f&&c.onValueChange(o)})})})});Pa.displayName=Ra;var _a="TabsContent",Ta=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:a,...c}=e,s=ho(_a,n),l=Aa(s.baseId,o),u=Na(s.baseId,o),d=o===s.value,f=m.useRef(d);return m.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),v.jsx(Ae,{present:r||d,children:({present:h})=>v.jsx(W.div,{"data-state":d?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&a})})});Ta.displayName=_a;function Aa(e,t){return`${e}-trigger-${t}`}function Na(e,t){return`${e}-content-${t}`}var vu=ya,hu=Sa,gu=Pa,bu=Ta;function Ma(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ma(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function $u(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Ma(e))&&(o&&(o+=" "),o+=t);return o}const br=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,T=$u,ze=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return T(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,c=Object.keys(r).map(u=>{const d=n==null?void 0:n[u],f=a==null?void 0:a[u];if(d===null)return null;const h=br(d)||br(f);return r[u][h]}),s=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:f,className:h,...g}=d;return Object.entries(g).every(b=>{let[p,$]=b;return Array.isArray($)?$.includes({...a,...s}[p]):{...a,...s}[p]===$})?[...u,f,h]:u},[]);return T(e,c,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),i=require("react"),et=require("react-dom");function xa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=xa(i),mo=xa(et);function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function od(e,t){const n=m.createContext(t);function o(a){const{children:s,...c}=a,l=m.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:l,children:s})}function r(a){const s=m.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function he(e,t=[]){let n=[];function o(a,s){const c=m.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:h,children:g,...b}=f,p=(h==null?void 0:h[e][l])||c,x=m.useMemo(()=>b,Object.values(b));return v.jsx(p.Provider,{value:x,children:g})}function d(f,h){const g=(h==null?void 0:h[e][l])||c,b=m.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(s=>m.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,rd(r,...t)]}function rd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...c,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function ad(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $a(...e){return t=>e.forEach(n=>ad(n,t))}function ee(...e){return m.useCallback($a(...e),e)}var Le=m.forwardRef((e,t)=>{const{children:n,...o}=e,r=m.Children.toArray(n),a=r.find(sd);if(a){const s=a.props.children,c=r.map(l=>l===a?m.Children.count(s)>1?m.Children.only(null):m.isValidElement(s)?s.props.children:null:l);return v.jsx(Xn,{...o,ref:t,children:m.isValidElement(s)?m.cloneElement(s,void 0,c):null})}return v.jsx(Xn,{...o,ref:t,children:n})});Le.displayName="Slot";var Xn=m.forwardRef((e,t)=>{const{children:n,...o}=e;if(m.isValidElement(n)){const r=id(n);return m.cloneElement(n,{...cd(o,n.props),ref:t?$a(t,r):r})}return m.Children.count(n)>1?m.Children.only(null):null});Xn.displayName="SlotClone";var wa=({children:e})=>v.jsx(v.Fragment,{children:e});function sd(e){return m.isValidElement(e)&&e.type===wa}function cd(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{a(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function id(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ya(e){const t=e+"CollectionProvider",[n,o]=he(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:p}=g,x=i.useRef(null),$=i.useRef(new Map).current;return v.jsx(r,{scope:b,itemMap:$,collectionRef:x,children:p})};s.displayName=t;const c=e+"CollectionSlot",l=i.forwardRef((g,b)=>{const{scope:p,children:x}=g,$=a(c,p),w=ee(b,$.collectionRef);return v.jsx(Le,{ref:w,children:x})});l.displayName=c;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((g,b)=>{const{scope:p,children:x,...$}=g,w=i.useRef(null),y=ee(b,w),C=a(u,p);return i.useEffect(()=>(C.itemMap.set(w,{ref:w,...$}),()=>void C.itemMap.delete(w))),v.jsx(Le,{[d]:"",ref:y,children:x})});f.displayName=u;function h(g){const b=a(e+"CollectionConsumer",g);return i.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const $=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,E)=>$.indexOf(C.ref.current)-$.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},h,o]}var je=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},ld=m.useId||(()=>{}),ud=0;function Ze(e){const[t,n]=m.useState(ld());return je(()=>{e||n(o=>o??String(ud++))},[e]),e||(t?`radix-${t}`:"")}var dd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],W=dd.reduce((e,t)=>{const n=m.forwardRef((o,r)=>{const{asChild:a,...s}=o,c=a?Le:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fd(e,t){e&&mo.flushSync(()=>e.dispatchEvent(t))}function Re(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Ee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=pd({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=Re(n),l=m.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function pd({defaultProp:e,onChange:t}){const n=m.useState(e),[o]=n,r=m.useRef(o),a=Re(t);return m.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}var md=m.createContext(void 0);function It(e){const t=m.useContext(md);return e||t||"ltr"}var In="rovingFocusGroup.onEntryFocus",vd={bubbles:!1,cancelable:!0},un="RovingFocusGroup",[qn,Ca,hd]=ya(un),[gd,gt]=he(un,[hd]),[bd,xd]=gd(un),Ea=m.forwardRef((e,t)=>v.jsx(qn.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(qn.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx($d,{...e,ref:t})})}));Ea.displayName=un;var $d=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=m.useRef(null),g=ee(t,h),b=It(a),[p=null,x]=Ee({prop:s,defaultProp:c,onChange:l}),[$,w]=m.useState(!1),y=Re(u),C=Ca(n),E=m.useRef(!1),[_,S]=m.useState(0);return m.useEffect(()=>{const P=h.current;if(P)return P.addEventListener(In,y),()=>P.removeEventListener(In,y)},[y]),v.jsx(bd,{scope:n,orientation:o,dir:b,loop:r,currentTabStopId:p,onItemFocus:m.useCallback(P=>x(P),[x]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:m.useCallback(()=>S(P=>P-1),[]),children:v.jsx(W.div,{tabIndex:$||_===0?-1:0,"data-orientation":o,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{E.current=!0}),onFocus:z(e.onFocus,P=>{const I=!E.current;if(P.target===P.currentTarget&&I&&!$){const N=new CustomEvent(In,vd);if(P.currentTarget.dispatchEvent(N),!N.defaultPrevented){const D=C().filter(B=>B.focusable),k=D.find(B=>B.active),V=D.find(B=>B.id===p),O=[k,V,...D].filter(Boolean).map(B=>B.ref.current);Pa(O,d)}}E.current=!1}),onBlur:z(e.onBlur,()=>w(!1))})})}),Sa="RovingFocusGroupItem",Ra=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...s}=e,c=Ze(),l=a||c,u=xd(Sa,n),d=u.currentTabStopId===l,f=Ca(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=u;return m.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),v.jsx(qn.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:v.jsx(W.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:z(e.onMouseDown,b=>{o?u.onItemFocus(l):b.preventDefault()}),onFocus:z(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:z(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=Cd(b,u.orientation,u.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let $=f().filter(w=>w.focusable).map(w=>w.ref.current);if(p==="last")$.reverse();else if(p==="prev"||p==="next"){p==="prev"&&$.reverse();const w=$.indexOf(b.currentTarget);$=u.loop?Ed($,w+1):$.slice(w+1)}setTimeout(()=>Pa($))}})})})});Ra.displayName=Sa;var wd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Cd(e,t,n){const o=yd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return wd[o]}function Pa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Ed(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var vo=Ea,ho=Ra;function Sd(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var Ne=e=>{const{present:t,children:n}=e,o=Rd(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=ee(o.ref,Pd(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};Ne.displayName="Presence";function Rd(e){const[t,n]=m.useState(),o=m.useRef({}),r=m.useRef(e),a=m.useRef("none"),s=e?"mounted":"unmounted",[c,l]=Sd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Vt(o.current);a.current=c==="mounted"?u:"none"},[c]),je(()=>{const u=o.current,d=r.current;if(d!==e){const h=a.current,g=Vt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),je(()=>{if(t){const u=f=>{const g=Vt(o.current).includes(f.animationName);f.target===t&&g&&mo.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=Vt(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:m.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Vt(e){return(e==null?void 0:e.animationName)||"none"}function Pd(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var go="Tabs",[_d,Y$]=he(go,[gt]),_a=gt(),[Td,bo]=_d(go),Ta=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:a,orientation:s="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=It(c),[f,h]=Ee({prop:o,onChange:r,defaultProp:a});return v.jsx(Td,{scope:n,baseId:Ze(),value:f,onValueChange:h,orientation:s,dir:d,activationMode:l,children:v.jsx(W.div,{dir:d,"data-orientation":s,...u,ref:t})})});Ta.displayName=go;var Na="TabsList",Ma=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,a=bo(Na,n),s=_a(n);return v.jsx(vo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:v.jsx(W.div,{role:"tablist","aria-orientation":a.orientation,...r,ref:t})})});Ma.displayName=Na;var Aa="TabsTrigger",Ia=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...a}=e,s=bo(Aa,n),c=_a(n),l=ka(s.baseId,o),u=La(s.baseId,o),d=o===s.value;return v.jsx(ho,{asChild:!0,...c,focusable:!r,active:d,children:v.jsx(W.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...a,ref:t,onMouseDown:z(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?s.onValueChange(o):f.preventDefault()}),onKeyDown:z(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(o)}),onFocus:z(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!r&&f&&s.onValueChange(o)})})})});Ia.displayName=Aa;var Oa="TabsContent",Da=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:a,...s}=e,c=bo(Oa,n),l=ka(c.baseId,o),u=La(c.baseId,o),d=o===c.value,f=m.useRef(d);return m.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),v.jsx(Ne,{present:r||d,children:({present:h})=>v.jsx(W.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&a})})});Da.displayName=Oa;function ka(e,t){return`${e}-trigger-${t}`}function La(e,t){return`${e}-content-${t}`}var Nd=Ta,Md=Ma,Ad=Ia,Id=Da;function ja(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ja(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Od(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=ja(e))&&(o&&(o+=" "),o+=t);return o}const Er=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,T=Od,ze=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return T(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,s=Object.keys(r).map(u=>{const d=n==null?void 0:n[u],f=a==null?void 0:a[u];if(d===null)return null;const h=Er(d)||Er(f);return r[u][h]}),c=n&&Object.entries(n).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,d)=>{let{class:f,className:h,...g}=d;return Object.entries(g).every(b=>{let[p,x]=b;return Array.isArray(x)?x.includes({...a,...c}[p]):{...a,...c}[p]===x})?[...u,f,h]:u},[]);return T(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
2
2
  * @license
3
3
  * MIT License
4
4
  * Copyright (c) 2022 WorkOS
5
5
  * https://github.com/radix-ui/primitives/blob/main/LICENSE
6
- * */function xu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Oa(...e){return t=>e.forEach(n=>xu(n,t))}function dn(...e){return m.useCallback(Oa(...e),e)}const wu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(vu,{ref:t,className:T(n,"fp-TabsRoot"),...o})}),Cu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(hu,{ref:t,className:T(n,"fp-TabsList"),...o})}),yu=i.forwardRef((e,t)=>{const{className:n,...o}=e,r=Eu(),a=Oa(t,r);return v.jsx(gu,{ref:a,className:T(n,"fp-TabsTrigger"),...o})});function Eu(){return i.useCallback(e=>{e!==null&&(e.style.width=e.getBoundingClientRect().width+"px")},[])}const Su=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(bu,{ref:t,className:T(n,"fp-TabsContent"),...o})}),Ru=Object.freeze(Object.defineProperty({__proto__:null,Content:Su,List:Cu,Root:wu,Trigger:yu},Symbol.toStringTag,{value:"Module"}));var Pu="Toggle",Ia=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o=!1,onPressedChange:r,...a}=e,[c=!1,s]=Ee({prop:n,onChange:r,defaultProp:o});return v.jsx(W.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:z(e.onClick,()=>{e.disabled||s(!c)})})});Ia.displayName=Pu;var bt="ToggleGroup",[Da,Xx]=he(bt,[gt]),ka=gt(),go=i.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return v.jsx(_u,{...r,ref:t})}if(n==="multiple"){const r=o;return v.jsx(Tu,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${bt}\``)});go.displayName=bt;var[ja,La]=Da(bt),_u=i.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[c,s]=Ee({prop:n,defaultProp:o,onChange:r});return v.jsx(ja,{scope:e.__scopeToggleGroup,type:"single",value:c?[c]:[],onItemActivate:s,onItemDeactivate:i.useCallback(()=>s(""),[s]),children:v.jsx(Fa,{...a,ref:t})})}),Tu=i.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[c=[],s]=Ee({prop:n,defaultProp:o,onChange:r}),l=i.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=i.useCallback(d=>s((f=[])=>f.filter(h=>h!==d)),[s]);return v.jsx(ja,{scope:e.__scopeToggleGroup,type:"multiple",value:c,onItemActivate:l,onItemDeactivate:u,children:v.jsx(Fa,{...a,ref:t})})});go.displayName=bt;var[Au,Nu]=Da(bt),Fa=i.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:a,dir:c,loop:s=!0,...l}=e,u=ka(n),d=Ot(c),f={role:"group",dir:d,...l};return v.jsx(Au,{scope:n,rovingFocus:r,disabled:o,children:r?v.jsx(po,{asChild:!0,...u,orientation:a,dir:d,loop:s,children:v.jsx(W.div,{...f,ref:t})}):v.jsx(W.div,{...f,ref:t})})}),tn="ToggleGroupItem",Ba=i.forwardRef((e,t)=>{const n=La(tn,e.__scopeToggleGroup),o=Nu(tn,e.__scopeToggleGroup),r=ka(e.__scopeToggleGroup),a=n.value.includes(e.value),c=o.disabled||e.disabled,s={...e,pressed:a,disabled:c},l=i.useRef(null);return o.rovingFocus?v.jsx(mo,{asChild:!0,...r,focusable:!c,active:a,ref:l,children:v.jsx($r,{...s,ref:t})}):v.jsx($r,{...s,ref:t})});Ba.displayName=tn;var $r=i.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,a=La(tn,n),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?c:void 0;return v.jsx(Ia,{...s,...r,ref:t,onPressedChange:l=>{l?a.onItemActivate(o):a.onItemDeactivate(o)}})}),Mu=go,Ou=Ba;const fn=ze("fp-Text",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium",large:"fp-size-large"},weight:{default:"fp-weight-default",strong:"fp-weight-strong"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end"},block:{true:"fp-block"}}}),et=i.forwardRef((e,t)=>{const{asChild:n,className:o,size:r,weight:a,align:c,block:s,...l}=e,u=n?je:"span";return v.jsx(u,{ref:t,className:fn({className:o,size:r,weight:a,align:c,block:s}),...l})}),bo=i.forwardRef((e,t)=>{const{className:n,size:o,weight:r,align:a,block:c,...s}=e;return v.jsx("label",{ref:t,className:fn({className:n,size:o,weight:r,align:a,block:c}),...s})}),Iu=i.forwardRef((e,t)=>{const{className:n,size:o,weight:r,align:a,block:c,...s}=e;return v.jsx("p",{ref:t,className:fn({className:n,size:o,weight:r,align:a,block:c}),...s})}),Du=i.forwardRef((e,t)=>{const{asChild:n,className:o,size:r,weight:a,align:c,block:s,...l}=e,u=n?je:"a";return v.jsx(u,{ref:t,className:T(fn({className:o,size:r,weight:a,align:c,block:s}),"fp-Link"),...l})});/**
6
+ * */function Dd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Fa(...e){return t=>e.forEach(n=>Dd(n,t))}function dn(...e){return m.useCallback(Fa(...e),e)}const Ba=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Nd,{ref:t,className:T(n,"fp-TabsRoot"),...o})}),Va=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Md,{ref:t,className:T(n,"fp-TabsList"),...o})}),za=i.forwardRef((e,t)=>{const{className:n,...o}=e,r=kd(),a=Fa(t,r);return v.jsx(Ad,{ref:a,className:T(n,"fp-TabsTrigger"),...o})});function kd(){return i.useCallback(e=>{e!==null&&(e.style.width=e.getBoundingClientRect().width+"px")},[])}const Wa=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Id,{ref:t,className:T(n,"fp-TabsContent"),...o})});Ba.displayName="Tabs.Root";Va.displayName="Tabs.List";za.displayName="Tabs.Trigger";Wa.displayName="Tabs.Content";const Ld=Object.freeze(Object.defineProperty({__proto__:null,Content:Wa,List:Va,Root:Ba,Trigger:za},Symbol.toStringTag,{value:"Module"}));var jd="Toggle",Ha=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:o=!1,onPressedChange:r,...a}=e,[s=!1,c]=Ee({prop:n,onChange:r,defaultProp:o});return v.jsx(W.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:z(e.onClick,()=>{e.disabled||c(!s)})})});Ha.displayName=jd;var bt="ToggleGroup",[Ga,X$]=he(bt,[gt]),Ua=gt(),xo=i.forwardRef((e,t)=>{const{type:n,...o}=e;if(n==="single"){const r=o;return v.jsx(Fd,{...r,ref:t})}if(n==="multiple"){const r=o;return v.jsx(Bd,{...r,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${bt}\``)});xo.displayName=bt;var[Ka,Ya]=Ga(bt),Fd=i.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[s,c]=Ee({prop:n,defaultProp:o,onChange:r});return v.jsx(Ka,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:c,onItemDeactivate:i.useCallback(()=>c(""),[c]),children:v.jsx(Xa,{...a,ref:t})})}),Bd=i.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...a}=e,[s=[],c]=Ee({prop:n,defaultProp:o,onChange:r}),l=i.useCallback(d=>c((f=[])=>[...f,d]),[c]),u=i.useCallback(d=>c((f=[])=>f.filter(h=>h!==d)),[c]);return v.jsx(Ka,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:l,onItemDeactivate:u,children:v.jsx(Xa,{...a,ref:t})})});xo.displayName=bt;var[Vd,zd]=Ga(bt),Xa=i.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:o=!1,rovingFocus:r=!0,orientation:a,dir:s,loop:c=!0,...l}=e,u=Ua(n),d=It(s),f={role:"group",dir:d,...l};return v.jsx(Vd,{scope:n,rovingFocus:r,disabled:o,children:r?v.jsx(vo,{asChild:!0,...u,orientation:a,dir:d,loop:c,children:v.jsx(W.div,{...f,ref:t})}):v.jsx(W.div,{...f,ref:t})})}),tn="ToggleGroupItem",qa=i.forwardRef((e,t)=>{const n=Ya(tn,e.__scopeToggleGroup),o=zd(tn,e.__scopeToggleGroup),r=Ua(e.__scopeToggleGroup),a=n.value.includes(e.value),s=o.disabled||e.disabled,c={...e,pressed:a,disabled:s},l=i.useRef(null);return o.rovingFocus?v.jsx(ho,{asChild:!0,...r,focusable:!s,active:a,ref:l,children:v.jsx(Sr,{...c,ref:t})}):v.jsx(Sr,{...c,ref:t})});qa.displayName=tn;var Sr=i.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:o,...r}=e,a=Ya(tn,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=a.type==="single"?s:void 0;return v.jsx(Ha,{...c,...r,ref:t,onPressedChange:l=>{l?a.onItemActivate(o):a.onItemDeactivate(o)}})}),Wd=xo,Hd=qa;const fn=ze("fp-Text",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium",large:"fp-size-large"},weight:{default:"fp-weight-default",strong:"fp-weight-strong"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end"},block:{true:"fp-block"}}}),We=i.forwardRef((e,t)=>{const{asChild:n,className:o,size:r,weight:a,align:s,block:c,...l}=e,u=n?Le:"span";return v.jsx(u,{ref:t,className:fn({className:o,size:r,weight:a,align:s,block:c}),...l})});We.displayName="Text";const pn=i.forwardRef((e,t)=>{const{className:n,size:o,weight:r,align:a,block:s,...c}=e;return v.jsx("label",{ref:t,className:fn({className:n,size:o,weight:r,align:a,block:s}),...c})});pn.displayName="Label";const Za=i.forwardRef((e,t)=>{const{className:n,size:o,weight:r,align:a,block:s,...c}=e;return v.jsx("p",{ref:t,className:fn({className:n,size:o,weight:r,align:a,block:s}),...c})});Za.displayName="Paragraph";const Qa=i.forwardRef((e,t)=>{const{asChild:n,className:o,size:r,weight:a,align:s,block:c,...l}=e,u=n?Le:"a";return v.jsx(u,{ref:t,className:T(fn({className:o,size:r,weight:a,align:s,block:c}),"fp-Link"),...l})});Qa.displayName="Link";/**
7
7
  * @license
8
8
  * MIT License
9
9
  * Copyright (c) 2022 WorkOS
10
10
  * https://github.com/radix-ui/primitives/blob/main/LICENSE
11
- * */function Va(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function ku({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=ju({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o,s=Va(n),l=m.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else r(u)},[a,e,r,s]);return[c,l]}function ju({defaultProp:e,onChange:t}){const n=m.useState(e),[o]=n,r=m.useRef(o),a=Va(t);return m.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}const Lu=i.forwardRef((e,t)=>{const{className:n,fullWidth:o,value:r,defaultValue:a,onValueChange:c,...s}=e,[l,u]=ku({prop:r,defaultProp:a,onChange:c});return v.jsx(Mu,{ref:t,className:T(n,"fp-SegmentedControlRoot",{"fp-full-width":o}),...s,type:"single",value:l,onValueChange:d=>{d&&u(d)}})}),Fu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ou,{ref:t,className:T(n,"fp-SegmentedControlItem"),...o})}),Bu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(et,{ref:t,className:T(n,"fp-SegmentedControlText"),...o})}),Vu=Object.freeze(Object.defineProperty({__proto__:null,Item:Fu,Root:Lu,Text:Bu},Symbol.toStringTag,{value:"Module"}));function $o(e){const[t,n]=m.useState(void 0);return Le(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let c,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,s=u.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function za(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xo="Radio",[zu,Wa]=he(xo),[Wu,Hu]=zu(xo),Ha=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:a,disabled:c,value:s="on",onCheck:l,...u}=e,[d,f]=m.useState(null),h=ee(t,p=>f(p)),g=m.useRef(!1),b=d?!!d.closest("form"):!0;return v.jsxs(Wu,{scope:n,checked:r,disabled:c,children:[v.jsx(W.button,{type:"button",role:"radio","aria-checked":r,"data-state":Ka(r),"data-disabled":c?"":void 0,disabled:c,value:s,...u,ref:h,onClick:z(e.onClick,p=>{r||l==null||l(),b&&(g.current=p.isPropagationStopped(),g.current||p.stopPropagation())})}),b&&v.jsx(Gu,{control:d,bubbles:!g.current,name:o,value:s,checked:r,required:a,disabled:c,style:{transform:"translateX(-100%)"}})]})});Ha.displayName=xo;var Ga="RadioIndicator",Ua=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,a=Hu(Ga,n);return v.jsx(Ae,{present:o||a.checked,children:v.jsx(W.span,{"data-state":Ka(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});Ua.displayName=Ga;var Gu=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=m.useRef(null),c=za(n),s=$o(t);return m.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==n&&f){const h=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(h)}},[c,n,o]),v.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ka(e){return e?"checked":"unchecked"}var Uu=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wo="RadioGroup",[Ku,qx]=he(wo,[gt,Wa]),Ya=gt(),Xa=Wa(),[Yu,Xu]=Ku(wo),qa=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:a,required:c=!1,disabled:s=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...h}=e,g=Ya(n),b=Ot(u),[p,$]=Ee({prop:a,defaultProp:r,onChange:f});return v.jsx(Yu,{scope:n,name:o,required:c,disabled:s,value:p,onValueChange:$,children:v.jsx(po,{asChild:!0,...g,orientation:l,dir:b,loop:d,children:v.jsx(W.div,{role:"radiogroup","aria-required":c,"aria-orientation":l,"data-disabled":s?"":void 0,dir:b,...h,ref:t})})})});qa.displayName=wo;var Za="RadioGroupItem",Qa=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,a=Xu(Za,n),c=a.disabled||o,s=Ya(n),l=Xa(n),u=m.useRef(null),d=ee(t,u),f=a.value===r.value,h=m.useRef(!1);return m.useEffect(()=>{const g=p=>{Uu.includes(p.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),v.jsx(mo,{asChild:!0,...s,focusable:!c,active:f,children:v.jsx(Ha,{disabled:c,required:a.required,checked:f,...l,...r,name:a.name,ref:d,onCheck:()=>a.onValueChange(r.value),onKeyDown:z(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:z(r.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});Qa.displayName=Za;var qu="RadioGroupIndicator",Zu=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Xa(n);return v.jsx(Ua,{...r,...o,ref:t})});Zu.displayName=qu;var Qu=qa,Ju=Qa;function Co(e,t){const n=i.createContext(t);function o(a){const{children:c,...s}=a,l=i.useMemo(()=>s,Object.values(s));return v.jsx(n.Provider,{value:l,children:c})}function r(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}const[ed,td]=Co("RadioGroup"),nd=i.forwardRef((e,t)=>{const{orientation:n="horizontal",disabled:o,className:r,...a}=e;return v.jsx(ed,{orientation:n,disabled:o,children:v.jsx(Qu,{ref:t,orientation:n,disabled:o,className:T(r,"fp-RadioGroupRoot"),...a})})}),od=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ju,{ref:t,className:T(n,"fp-RadioGroupItem"),...o})}),rd=i.forwardRef((e,t)=>{const{orientation:n,disabled:o}=td("Label"),{className:r,...a}=e;return v.jsx(bo,{ref:t,className:T(r,"fp-RadioGroupLabel"),"data-orientation":n,"data-disabled":o?"":void 0,...a})}),ad=Object.freeze(Object.defineProperty({__proto__:null,Item:od,Label:rd,Root:nd},Symbol.toStringTag,{value:"Module"})),cd="6",sd="0 0 24 24",id=ze("fp-Icon",{variants:{size:{1:"fp-size-1",2:"fp-size-2","2_5":"fp-size-2_5",3:"fp-size-3","3_5":"fp-size-3_5",4:"fp-size-4",5:"fp-size-5",6:"fp-size-6",7:"fp-size-7",8:"fp-size-8",9:"fp-size-9",10:"fp-size-10"}},defaultVariants:{size:cd}});function We(e){const{path:t,viewBox:n=sd,displayName:o}=e,r=i.forwardRef((a,c)=>{const{size:s,className:l,...u}=a;return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",ref:c,viewBox:n,className:id({className:l,size:s}),fill:"none",...u,children:t})});return r.displayName=o||"Icon",r}const Ja=We({displayName:"Close",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",strokeLinejoin:"round",d:"M17 7 7 17M7 7l10 10"})}),yo=We({displayName:"ChevronRight",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M11.121 14.121L13.243 12L11.12 9.879"})}),ld=We({displayName:"ChevronUp",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M14.121 12.879L12 10.757L9.87903 12.88"})}),ec=We({displayName:"ChevronDown",path:v.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M9.87897 11.121L12 13.243L14.121 11.12"})})}),pn=We({displayName:"Checkmark",viewBox:"0 0 16 16",path:v.jsx("path",{fill:"var(--color-icon)",fillRule:"evenodd",clipRule:"evenodd",d:"M11.777 4.08399C11.8873 4.1575 11.9639 4.27178 11.99 4.40172C12.016 4.53167 11.9894 4.66665 11.916 4.77699L7.91602 10.777C7.87506 10.8387 7.82091 10.8905 7.75748 10.9287C7.69405 10.9669 7.62294 10.9905 7.54926 10.9979C7.47559 11.0053 7.40119 10.9962 7.33146 10.9713C7.26172 10.9464 7.19839 10.9063 7.14602 10.854L4.14602 7.85399C4.09953 7.80751 4.06266 7.75232 4.0375 7.69158C4.01234 7.63084 3.99939 7.56574 3.99939 7.49999C3.99939 7.43425 4.01234 7.36915 4.0375 7.30841C4.06266 7.24767 4.09953 7.19248 4.14602 7.14599C4.19251 7.09951 4.2477 7.06263 4.30844 7.03747C4.36918 7.01231 4.43428 6.99936 4.50002 6.99936C4.56577 6.99936 4.63087 7.01231 4.6916 7.03747C4.75234 7.06263 4.80753 7.09951 4.85402 7.14599L7.42202 9.71599L11.084 4.22299C11.1575 4.11271 11.2718 4.03612 11.4018 4.01006C11.5317 3.98399 11.6667 4.01059 11.777 4.08399Z"})}),tc=We({displayName:"Circle",viewBox:"0 0 16 16",path:v.jsx("circle",{fill:"var(--color-icon)",cx:"8",cy:"8",r:"3"})}),ud=We({displayName:"CheckmarkIndeterminate",viewBox:"0 0 16 16",path:v.jsx("path",{fill:"var(--color-icon)",d:"M4 8a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z"})}),[dd,Eo]=Co("Checkbox"),fd=i.forwardRef((e,t)=>{const{className:n,id:o,...r}=e,a=i.useId(),c=o??a;return v.jsx(dd,{id:c,children:v.jsx("div",{ref:t,className:T(n,"fp-CheckboxRoot"),...r})})}),pd=i.forwardRef((e,t)=>{const{className:n,indeterminate:o,...r}=e,{id:a}=Eo("Input"),c=gd(o),s=dn(t,c);return v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:s,className:T(n,"fp-CheckboxInput"),id:a,"aria-labelledby":`checkbox-label-${a}`,"aria-describedby":`checkbox-description-${a}`,...r,type:"checkbox"}),v.jsx(md,{})]})}),md=()=>v.jsxs("span",{className:"fp-CheckboxIndicator","aria-hidden":"true",children:[v.jsx(pn,{className:"fp-CheckboxCheckmark",size:"4"}),v.jsx(ud,{className:"fp-CheckboxIndeterminate",size:"4"})]}),vd=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=Eo("Input");return v.jsx(bo,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxLabel"),htmlFor:r,id:`checkbox-label-${r}`,...o})}),hd=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=Eo("Description");return v.jsx(et,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxDescription"),id:`checkbox-description-${r}`,...o})});function gd(e){return i.useCallback(t=>{t&&(t.indeterminate=!!e)},[e])}const bd=Object.freeze(Object.defineProperty({__proto__:null,Description:hd,Input:pd,Label:vd,Root:fd},Symbol.toStringTag,{value:"Module"}));function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(null,arguments)}function xr(e,[t,n]){return Math.min(n,Math.max(t,e))}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ne(e,t=[]){let n=[];function o(a,c){const s=i.createContext(c),l=n.length;n=[...n,c];function u(f){const{scope:h,children:g,...b}=f,p=(h==null?void 0:h[e][l])||s,$=i.useMemo(()=>b,Object.values(b));return i.createElement(p.Provider,{value:$},g)}function d(f,h){const g=(h==null?void 0:h[e][l])||s,b=i.useContext(g);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(c=>i.createContext(c));return function(s){const l=(s==null?void 0:s[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,$d(r,...t)]}function $d(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const c=o.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function xd(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>xd(n,t))}function J(...e){return i.useCallback(mn(...e),e)}const ft=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),a=r.find(wd);if(a){const c=a.props.children,s=r.map(l=>l===a?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:l);return i.createElement(Xn,R({},o,{ref:t}),i.isValidElement(c)?i.cloneElement(c,void 0,s):null)}return i.createElement(Xn,R({},o,{ref:t}),n)});ft.displayName="Slot";const Xn=i.forwardRef((e,t)=>{const{children:n,...o}=e;return i.isValidElement(n)?i.cloneElement(n,{...Cd(o,n.props),ref:t?mn(t,n.ref):n.ref}):i.Children.count(n)>1?i.Children.only(null):null});Xn.displayName="SlotClone";const nc=({children:e})=>i.createElement(i.Fragment,null,e);function wd(e){return i.isValidElement(e)&&e.type===nc}function Cd(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{a(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function So(e){const t=e+"CollectionProvider",[n,o]=Ne(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=g=>{const{scope:b,children:p}=g,$=i.useRef(null),x=i.useRef(new Map).current;return i.createElement(r,{scope:b,itemMap:x,collectionRef:$},p)},s=e+"CollectionSlot",l=i.forwardRef((g,b)=>{const{scope:p,children:$}=g,x=a(s,p),w=J(b,x.collectionRef);return i.createElement(ft,{ref:w},$)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((g,b)=>{const{scope:p,children:$,...x}=g,w=i.useRef(null),C=J(b,w),y=a(u,p);return i.useEffect(()=>(y.itemMap.set(w,{ref:w,...x}),()=>void y.itemMap.delete(w))),i.createElement(ft,{[d]:"",ref:C},$)});function h(g){const b=a(e+"CollectionConsumer",g);return i.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const x=Array.from($.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((y,E)=>x.indexOf(y.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:l,ItemSlot:f},h,o]}const yd=i.createContext(void 0);function Ro(e){const t=i.useContext(yd);return e||t||"ltr"}const Ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q=Ed.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:a,...c}=o,s=a?ft:t;return i.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),i.createElement(s,R({},c,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oc(e,t){e&&Je.flushSync(()=>e.dispatchEvent(t))}function fe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Sd(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const qn="dismissableLayer.update",Rd="dismissableLayer.pointerDownOutside",Pd="dismissableLayer.focusOutside";let wr;const _d=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Po=i.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:s,onDismiss:l,...u}=e,d=i.useContext(_d),[f,h]=i.useState(null),g=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=i.useState({}),p=J(t,P=>h(P)),$=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=$.indexOf(x),C=f?$.indexOf(f):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,E=C>=w,_=Td(P=>{const O=P.target,A=[...d.branches].some(D=>D.contains(O));!E||A||(a==null||a(P),s==null||s(P),P.defaultPrevented||l==null||l())},g),S=Ad(P=>{const O=P.target;[...d.branches].some(D=>D.contains(O))||(c==null||c(P),s==null||s(P),P.defaultPrevented||l==null||l())},g);return Sd(P=>{C===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},g),i.useEffect(()=>{if(f)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(wr=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Cr(),()=>{o&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=wr)}},[f,g,o,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Cr())},[f,d]),i.useEffect(()=>{const P=()=>b({});return document.addEventListener(qn,P),()=>document.removeEventListener(qn,P)},[]),i.createElement(q.div,R({},u,{ref:p,style:{pointerEvents:y?E?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,S.onFocusCapture),onBlurCapture:M(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,_.onPointerDownCapture)}))});function Td(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let u=function(){rc(Rd,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ad(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e),o=i.useRef(!1);return i.useEffect(()=>{const r=a=>{a.target&&!o.current&&rc(Pd,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Cr(){const e=new CustomEvent(qn);document.dispatchEvent(e)}function rc(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?oc(r,a):r.dispatchEvent(a)}let Mn=0;function ac(){i.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:yr()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:yr()),Mn++,()=>{Mn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Mn--}},[])}function yr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const On="focusScope.autoFocusOnMount",In="focusScope.autoFocusOnUnmount",Er={bubbles:!1,cancelable:!0},cc=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...c}=e,[s,l]=i.useState(null),u=fe(r),d=fe(a),f=i.useRef(null),h=J(t,p=>l(p)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let p=function(C){if(g.paused||!s)return;const y=C.target;s.contains(y)?f.current=y:De(f.current,{select:!0})},$=function(C){if(g.paused||!s)return;const y=C.relatedTarget;y!==null&&(s.contains(y)||De(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&De(s)};document.addEventListener("focusin",p),document.addEventListener("focusout",$);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",$),w.disconnect()}}},[o,s,g.paused]),i.useEffect(()=>{if(s){Rr.add(g);const p=document.activeElement;if(!s.contains(p)){const x=new CustomEvent(On,Er);s.addEventListener(On,u),s.dispatchEvent(x),x.defaultPrevented||(Nd(kd(sc(s)),{select:!0}),document.activeElement===p&&De(s))}return()=>{s.removeEventListener(On,u),setTimeout(()=>{const x=new CustomEvent(In,Er);s.addEventListener(In,d),s.dispatchEvent(x),x.defaultPrevented||De(p??document.body,{select:!0}),s.removeEventListener(In,d),Rr.remove(g)},0)}}},[s,u,d,g]);const b=i.useCallback(p=>{if(!n&&!o||g.paused)return;const $=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if($&&x){const w=p.currentTarget,[C,y]=Md(w);C&&y?!p.shiftKey&&x===y?(p.preventDefault(),n&&De(C,{select:!0})):p.shiftKey&&x===C&&(p.preventDefault(),n&&De(y,{select:!0})):x===w&&p.preventDefault()}},[n,o,g.paused]);return i.createElement(q.div,R({tabIndex:-1},c,{ref:h,onKeyDown:b}))});function Nd(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(De(o,{select:t}),document.activeElement!==n)return}function Md(e){const t=sc(e),n=Sr(t,e),o=Sr(t.reverse(),e);return[n,o]}function sc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sr(e,t){for(const n of e)if(!Od(n,{upTo:t}))return n}function Od(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 Id(e){return e instanceof HTMLInputElement&&"select"in e}function De(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Id(e)&&t&&e.select()}}const Rr=Dd();function Dd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Pr(e,t),e.unshift(t)},remove(t){var n;e=Pr(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Pr(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function kd(e){return e.filter(t=>t.tagName!=="A")}const pe=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},jd=m.useId||(()=>{});let Ld=0;function Pe(e){const[t,n]=m.useState(jd());return pe(()=>{n(o=>o??String(Ld++))},[e]),t?`radix-${t}`:""}const Fd=["top","right","bottom","left"],we=Math.min,me=Math.max,nn=Math.round,zt=Math.floor,Fe=e=>({x:e,y:e}),Bd={left:"right",right:"left",bottom:"top",top:"bottom"},Vd={start:"end",end:"start"};function Zn(e,t,n){return me(e,we(t,n))}function _e(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function _o(e){return e==="x"?"y":"x"}function To(e){return e==="y"?"height":"width"}function xt(e){return["top","bottom"].includes(Te(e))?"y":"x"}function Ao(e){return _o(xt(e))}function zd(e,t,n){n===void 0&&(n=!1);const o=$t(e),r=Ao(e),a=To(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(c=on(c)),[c,on(c)]}function Wd(e){const t=on(e);return[Qn(e),t,Qn(t)]}function Qn(e){return e.replace(/start|end/g,t=>Vd[t])}function Hd(e,t,n){const o=["left","right"],r=["right","left"],a=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?a:c;default:return[]}}function Gd(e,t,n,o){const r=$t(e);let a=Hd(Te(e),n==="start",o);return r&&(a=a.map(c=>c+"-"+r),t&&(a=a.concat(a.map(Qn)))),a}function on(e){return e.replace(/left|right|bottom|top/g,t=>Bd[t])}function Ud(e){return{top:0,right:0,bottom:0,left:0,...e}}function ic(e){return typeof e!="number"?Ud(e):{top:e,right:e,bottom:e,left:e}}function rn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function _r(e,t,n){let{reference:o,floating:r}=e;const a=xt(t),c=Ao(t),s=To(c),l=Te(t),u=a==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[s]/2-r[s]/2;let g;switch(l){case"top":g={x:d,y:o.y-r.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:f};break;case"left":g={x:o.x-r.width,y:f};break;default:g={x:o.x,y:o.y}}switch($t(t)){case"start":g[c]-=h*(n&&u?-1:1);break;case"end":g[c]+=h*(n&&u?-1:1);break}return g}const Kd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:c}=n,s=a.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=_r(u,o,l),h=o,g={},b=0;for(let p=0;p<s.length;p++){const{name:$,fn:x}=s[p],{x:w,y:C,data:y,reset:E}=await x({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:u,platform:c,elements:{reference:e,floating:t}});d=w??d,f=C??f,g={...g,[$]:{...g[$],...y}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:f}=_r(u,h,l)),p=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:g}};async function _t(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:c,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:g=0}=_e(t,e),b=ic(g),$=s[h?f==="floating"?"reference":"floating":f],x=rn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement($)))==null||n?$:$.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=rn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:l}):w);return{top:(x.top-E.top+b.top)/y.y,bottom:(E.bottom-x.bottom+b.bottom)/y.y,left:(x.left-E.left+b.left)/y.x,right:(E.right-x.right+b.right)/y.x}}const Yd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:c,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=_e(e,t)||{};if(u==null)return{};const f=ic(d),h={x:n,y:o},g=Ao(r),b=To(g),p=await c.getDimensions(u),$=g==="y",x=$?"top":"left",w=$?"bottom":"right",C=$?"clientHeight":"clientWidth",y=a.reference[b]+a.reference[g]-h[g]-a.floating[b],E=h[g]-a.reference[g],_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let S=_?_[C]:0;(!S||!await(c.isElement==null?void 0:c.isElement(_)))&&(S=s.floating[C]||a.floating[b]);const P=y/2-E/2,O=S/2-p[b]/2-1,A=we(f[x],O),D=we(f[w],O),k=A,V=S-p[b]-D,F=S/2-p[b]/2+P,I=Zn(k,F,V),B=!l.arrow&&$t(r)!=null&&F!==I&&a.reference[b]/2-(F<k?A:D)-p[b]/2<0,L=B?F<k?F-k:F-V:0;return{[g]:h[g]+L,data:{[g]:I,centerOffset:F-I-L,...B&&{alignmentOffset:L}},reset:B}}}),Xd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:c,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...$}=_e(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Te(r),w=Te(s)===s,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=h||(w||!p?[on(s)]:Wd(s));!h&&b!=="none"&&y.push(...Gd(s,p,b,C));const E=[s,...y],_=await _t(t,$),S=[];let P=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&S.push(_[x]),f){const k=zd(r,c,C);S.push(_[k[0]],_[k[1]])}if(P=[...P,{placement:r,overflows:S}],!S.every(k=>k<=0)){var O,A;const k=(((O=a.flip)==null?void 0:O.index)||0)+1,V=E[k];if(V)return{data:{index:k,overflows:P},reset:{placement:V}};let F=(A=P.filter(I=>I.overflows[0]<=0).sort((I,B)=>I.overflows[1]-B.overflows[1])[0])==null?void 0:A.placement;if(!F)switch(g){case"bestFit":{var D;const I=(D=P.map(B=>[B.placement,B.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((B,L)=>B[1]-L[1])[0])==null?void 0:D[0];I&&(F=I);break}case"initialPlacement":F=s;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Tr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ar(e){return Fd.some(t=>e[t]>=0)}const qd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=_e(e,t);switch(o){case"referenceHidden":{const a=await _t(t,{...r,elementContext:"reference"}),c=Tr(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ar(c)}}}case"escaped":{const a=await _t(t,{...r,altBoundary:!0}),c=Tr(a,n.floating);return{data:{escapedOffsets:c,escaped:Ar(c)}}}default:return{}}}}};async function Zd(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=Te(n),s=$t(n),l=xt(n)==="y",u=["left","top"].includes(c)?-1:1,d=a&&l?-1:1,f=_e(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(g=s==="end"?b*-1:b),l?{x:g*d,y:h*u}:{x:h*u,y:g*d}}const Qd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:c,middlewareData:s}=t,l=await Zd(t,e);return c===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:c}}}}},Jd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:c=!1,limiter:s={fn:$=>{let{x,y:w}=$;return{x,y:w}}},...l}=_e(e,t),u={x:n,y:o},d=await _t(t,l),f=xt(Te(r)),h=_o(f);let g=u[h],b=u[f];if(a){const $=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=g+d[$],C=g-d[x];g=Zn(w,g,C)}if(c){const $=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=b+d[$],C=b-d[x];b=Zn(w,b,C)}const p=s.fn({...t,[h]:g,[f]:b});return{...p,data:{x:p.x-n,y:p.y-o}}}}},ef=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:c}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=_e(e,t),d={x:n,y:o},f=xt(r),h=_o(f);let g=d[h],b=d[f];const p=_e(s,t),$=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=h==="y"?"height":"width",y=a.reference[h]-a.floating[C]+$.mainAxis,E=a.reference[h]+a.reference[C]-$.mainAxis;g<y?g=y:g>E&&(g=E)}if(u){var x,w;const C=h==="y"?"width":"height",y=["top","left"].includes(Te(r)),E=a.reference[f]-a.floating[C]+(y&&((x=c.offset)==null?void 0:x[f])||0)+(y?0:$.crossAxis),_=a.reference[f]+a.reference[C]+(y?0:((w=c.offset)==null?void 0:w[f])||0)-(y?$.crossAxis:0);b<E?b=E:b>_&&(b=_)}return{[h]:g,[f]:b}}}},tf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:a}=t,{apply:c=()=>{},...s}=_e(e,t),l=await _t(t,s),u=Te(n),d=$t(n),f=xt(n)==="y",{width:h,height:g}=o.floating;let b,p;u==="top"||u==="bottom"?(b=u,p=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,b=d==="end"?"top":"bottom");const $=g-l.top-l.bottom,x=h-l.left-l.right,w=we(g-l[b],$),C=we(h-l[p],x),y=!t.middlewareData.shift;let E=w,_=C;if(f?_=d||y?we(C,x):x:E=d||y?we(w,$):$,y&&!d){const P=me(l.left,0),O=me(l.right,0),A=me(l.top,0),D=me(l.bottom,0);f?_=h-2*(P!==0||O!==0?P+O:me(l.left,l.right)):E=g-2*(A!==0||D!==0?A+D:me(l.top,l.bottom))}await c({...t,availableWidth:_,availableHeight:E});const S=await r.getDimensions(a.floating);return h!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}};function wt(e){return lc(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(lc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lc(e){return e instanceof Node||e instanceof ve(e).Node}function Ce(e){return e instanceof Element||e instanceof ve(e).Element}function ye(e){return e instanceof HTMLElement||e instanceof ve(e).HTMLElement}function Nr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}function It(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=$e(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function nf(e){return["table","td","th"].includes(wt(e))}function No(e){const t=Mo(),n=$e(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function of(e){let t=Be(e);for(;ye(t)&&!pt(t);){if(No(t))return t;t=Be(t)}return null}function Mo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(e){return["html","body","#document"].includes(wt(e))}function $e(e){return ve(e).getComputedStyle(e)}function vn(e){return Ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Be(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nr(e)&&e.host||Me(e);return Nr(t)?t.host:t}function uc(e){const t=Be(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&It(t)?t:uc(t)}function Tt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=uc(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),c=ve(r);return a?t.concat(c,c.visualViewport||[],It(r)?r:[],c.frameElement&&n?Tt(c.frameElement):[]):t.concat(r,Tt(r,[],n))}function dc(e){const t=$e(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ye(e),a=r?e.offsetWidth:n,c=r?e.offsetHeight:o,s=nn(n)!==a||nn(o)!==c;return s&&(n=a,o=c),{width:n,height:o,$:s}}function Oo(e){return Ce(e)?e:e.contextElement}function lt(e){const t=Oo(e);if(!ye(t))return Fe(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=dc(t);let c=(a?nn(n.width):n.width)/o,s=(a?nn(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!s||!Number.isFinite(s))&&(s=1),{x:c,y:s}}const rf=Fe(0);function fc(e){const t=ve(e);return!Mo()||!t.visualViewport?rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function af(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function Ze(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=Oo(e);let c=Fe(1);t&&(o?Ce(o)&&(c=lt(o)):c=lt(e));const s=af(a,n,o)?fc(a):Fe(0);let l=(r.left+s.x)/c.x,u=(r.top+s.y)/c.y,d=r.width/c.x,f=r.height/c.y;if(a){const h=ve(a),g=o&&Ce(o)?ve(o):o;let b=h,p=b.frameElement;for(;p&&o&&g!==b;){const $=lt(p),x=p.getBoundingClientRect(),w=$e(p),C=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*$.x,y=x.top+(p.clientTop+parseFloat(w.paddingTop))*$.y;l*=$.x,u*=$.y,d*=$.x,f*=$.y,l+=C,u+=y,b=ve(p),p=b.frameElement}}return rn({width:d,height:f,x:l,y:u})}const cf=[":popover-open",":modal"];function Io(e){return cf.some(t=>{try{return e.matches(t)}catch{return!1}})}function sf(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",c=Me(o),s=t?Io(t.floating):!1;if(o===c||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=Fe(1);const d=Fe(0),f=ye(o);if((f||!f&&!a)&&((wt(o)!=="body"||It(c))&&(l=vn(o)),ye(o))){const h=Ze(o);u=lt(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function lf(e){return Array.from(e.getClientRects())}function pc(e){return Ze(Me(e)).left+vn(e).scrollLeft}function uf(e){const t=Me(e),n=vn(e),o=e.ownerDocument.body,r=me(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=me(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+pc(e);const s=-n.scrollTop;return $e(o).direction==="rtl"&&(c+=me(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:c,y:s}}function df(e,t){const n=ve(e),o=Me(e),r=n.visualViewport;let a=o.clientWidth,c=o.clientHeight,s=0,l=0;if(r){a=r.width,c=r.height;const u=Mo();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:a,height:c,x:s,y:l}}function ff(e,t){const n=Ze(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=ye(e)?lt(e):Fe(1),c=e.clientWidth*a.x,s=e.clientHeight*a.y,l=r*a.x,u=o*a.y;return{width:c,height:s,x:l,y:u}}function Mr(e,t,n){let o;if(t==="viewport")o=df(e,n);else if(t==="document")o=uf(Me(e));else if(Ce(t))o=ff(t,n);else{const r=fc(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return rn(o)}function mc(e,t){const n=Be(e);return n===t||!Ce(n)||pt(n)?!1:$e(n).position==="fixed"||mc(n,t)}function pf(e,t){const n=t.get(e);if(n)return n;let o=Tt(e,[],!1).filter(s=>Ce(s)&&wt(s)!=="body"),r=null;const a=$e(e).position==="fixed";let c=a?Be(e):e;for(;Ce(c)&&!pt(c);){const s=$e(c),l=No(c);!l&&s.position==="fixed"&&(r=null),(a?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||It(c)&&!l&&mc(e,c))?o=o.filter(d=>d!==c):r=s,c=Be(c)}return t.set(e,o),o}function mf(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?Io(t)?[]:pf(t,this._c):[].concat(n),o],s=c[0],l=c.reduce((u,d)=>{const f=Mr(t,d,r);return u.top=me(f.top,u.top),u.right=we(f.right,u.right),u.bottom=we(f.bottom,u.bottom),u.left=me(f.left,u.left),u},Mr(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vf(e){const{width:t,height:n}=dc(e);return{width:t,height:n}}function hf(e,t,n){const o=ye(t),r=Me(t),a=n==="fixed",c=Ze(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Fe(0);if(o||!o&&!a)if((wt(t)!=="body"||It(r))&&(s=vn(t)),o){const f=Ze(t,!0,a,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else r&&(l.x=pc(r));const u=c.left+s.scrollLeft-l.x,d=c.top+s.scrollTop-l.y;return{x:u,y:d,width:c.width,height:c.height}}function Dn(e){return $e(e).position==="static"}function Or(e,t){return!ye(e)||$e(e).position==="fixed"?null:t?t(e):e.offsetParent}function vc(e,t){const n=ve(e);if(Io(e))return n;if(!ye(e)){let r=Be(e);for(;r&&!pt(r);){if(Ce(r)&&!Dn(r))return r;r=Be(r)}return n}let o=Or(e,t);for(;o&&nf(o)&&Dn(o);)o=Or(o,t);return o&&pt(o)&&Dn(o)&&!No(o)?n:o||of(e)||n}const gf=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,o=await n(e.floating);return{reference:hf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bf(e){return $e(e).direction==="rtl"}const $f={convertOffsetParentRelativeRectToViewportRelativeRect:sf,getDocumentElement:Me,getClippingRect:mf,getOffsetParent:vc,getElementRects:gf,getClientRects:lf,getDimensions:vf,getScale:lt,isElement:Ce,isRTL:bf};function xf(e,t){let n=null,o;const r=Me(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function c(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const g=zt(d),b=zt(r.clientWidth-(u+f)),p=zt(r.clientHeight-(d+h)),$=zt(u),w={rootMargin:-g+"px "+-b+"px "+-p+"px "+-$+"px",threshold:me(0,we(1,l))||1};let C=!0;function y(E){const _=E[0].intersectionRatio;if(_!==l){if(!C)return c();_?c(!1,_):o=setTimeout(()=>{c(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(y,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,w)}n.observe(e)}return c(!0),a}function hc(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Oo(e),d=r||a?[...u?Tt(u):[],...Tt(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const f=u&&s?xf(u,n):null;let h=-1,g=null;c&&(g=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let b,p=l?Ze(e):null;l&&$();function $(){const x=Ze(e);p&&(x.x!==p.x||x.y!==p.y||x.width!==p.width||x.height!==p.height)&&n(),p=x,b=requestAnimationFrame($)}return n(),()=>{var x;d.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f==null||f(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const wf=Qd,Cf=Jd,yf=Xd,Ef=tf,Sf=qd,Ir=Yd,Rf=ef,Pf=(e,t,n)=>{const o=new Map,r={platform:$f,...n},a={...r.platform,_c:o};return Kd(e,t,{...r,platform:a})};var en=typeof document<"u"?i.useLayoutEffect:i.useEffect;function an(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!an(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!an(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function gc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dr(e,t){const n=gc(e);return Math.round(t*n)/n}function kr(e){const t=m.useRef(e);return en(()=>{t.current=e}),t}function bc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:c}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=m.useState(o);an(h,o)||g(o);const[b,p]=m.useState(null),[$,x]=m.useState(null),w=m.useCallback(L=>{L!==_.current&&(_.current=L,p(L))},[]),C=m.useCallback(L=>{L!==S.current&&(S.current=L,x(L))},[]),y=a||b,E=c||$,_=m.useRef(null),S=m.useRef(null),P=m.useRef(d),O=l!=null,A=kr(l),D=kr(r),k=m.useCallback(()=>{if(!_.current||!S.current)return;const L={placement:t,strategy:n,middleware:h};D.current&&(L.platform=D.current),Pf(_.current,S.current,L).then(H=>{const N={...H,isPositioned:!0};V.current&&!an(P.current,N)&&(P.current=N,fo.flushSync(()=>{f(N)}))})},[h,t,n,D]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[u]);const V=m.useRef(!1);en(()=>(V.current=!0,()=>{V.current=!1}),[]),en(()=>{if(y&&(_.current=y),E&&(S.current=E),y&&E){if(A.current)return A.current(y,E,k);k()}},[y,E,k,A,O]);const F=m.useMemo(()=>({reference:_,floating:S,setReference:w,setFloating:C}),[w,C]),I=m.useMemo(()=>({reference:y,floating:E}),[y,E]),B=m.useMemo(()=>{const L={position:n,left:0,top:0};if(!I.floating)return L;const H=Dr(I.floating,d.x),N=Dr(I.floating,d.y);return s?{...L,transform:"translate("+H+"px, "+N+"px)",...gc(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:N}},[n,s,I.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:k,refs:F,elements:I,floatingStyles:B}),[d,k,F,I,B])}const _f=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Ir({element:o.current,padding:r}).fn(n):{}:o?Ir({element:o,padding:r}).fn(n):{}}}},$c=(e,t)=>({...wf(e),options:[e,t]}),xc=(e,t)=>({...Cf(e),options:[e,t]}),wc=(e,t)=>({...Rf(e),options:[e,t]}),Cc=(e,t)=>({...yf(e),options:[e,t]}),yc=(e,t)=>({...Ef(e),options:[e,t]}),Ec=(e,t)=>({...Sf(e),options:[e,t]}),Sc=(e,t)=>({..._f(e),options:[e,t]}),Tf=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return i.createElement(q.svg,R({},a,{ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:i.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Af=Tf;function Rc(e){const[t,n]=i.useState(void 0);return pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let c,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,s=u.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Pc="Popper",[_c,Ct]=Ne(Pc),[Nf,Tc]=_c(Pc),Mf=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return i.createElement(Nf,{scope:t,anchor:o,onAnchorChange:r},n)},Of="PopperAnchor",If=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Tc(Of,n),c=i.useRef(null),s=J(t,c);return i.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:i.createElement(q.div,R({},r,{ref:s}))}),Ac="PopperContent",[Df,kf]=_c(Ac),jf=i.forwardRef((e,t)=>{var n,o,r,a,c,s,l,u;const{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:g="center",alignOffset:b=0,arrowPadding:p=0,avoidCollisions:$=!0,collisionBoundary:x=[],collisionPadding:w=0,sticky:C="partial",hideWhenDetached:y=!1,updatePositionStrategy:E="optimized",onPlaced:_,...S}=e,P=Tc(Ac,d),[O,A]=i.useState(null),D=J(t,ge=>A(ge)),[k,V]=i.useState(null),F=Rc(k),I=(n=F==null?void 0:F.width)!==null&&n!==void 0?n:0,B=(o=F==null?void 0:F.height)!==null&&o!==void 0?o:0,L=f+(g!=="center"?"-"+g:""),H=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},N=Array.isArray(x)?x:[x],Z=N.length>0,Q={padding:H,boundary:N.filter(Vf),altBoundary:Z},{refs:ce,floatingStyles:le,placement:ue,isPositioned:de,middlewareData:te}=bc({strategy:"fixed",placement:L,whileElementsMounted:(...ge)=>hc(...ge,{animationFrame:E==="always"}),elements:{reference:P.anchor},middleware:[$c({mainAxis:h+B,alignmentAxis:b}),$&&xc({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?wc():void 0,...Q}),$&&Cc({...Q}),yc({...Q,apply:({elements:ge,rects:Ie,availableWidth:Ye,availableHeight:An})=>{const{width:ot,height:Vl}=Ie.reference,Bt=ge.floating.style;Bt.setProperty("--radix-popper-available-width",`${Ye}px`),Bt.setProperty("--radix-popper-available-height",`${An}px`),Bt.setProperty("--radix-popper-anchor-width",`${ot}px`),Bt.setProperty("--radix-popper-anchor-height",`${Vl}px`)}}),k&&Sc({element:k,padding:p}),zf({arrowWidth:I,arrowHeight:B}),y&&Ec({strategy:"referenceHidden",...Q})]}),[j,G]=Nc(ue),U=fe(_);pe(()=>{de&&(U==null||U())},[de,U]);const K=(r=te.arrow)===null||r===void 0?void 0:r.x,Y=(a=te.arrow)===null||a===void 0?void 0:a.y,X=((c=te.arrow)===null||c===void 0?void 0:c.centerOffset)!==0,[ne,oe]=i.useState();return pe(()=>{O&&oe(window.getComputedStyle(O).zIndex)},[O]),i.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:de?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(s=te.transformOrigin)===null||s===void 0?void 0:s.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},i.createElement(Df,{scope:d,placedSide:j,onArrowChange:V,arrowX:K,arrowY:Y,shouldHideArrow:X},i.createElement(q.div,R({"data-side":j,"data-align":G},S,{ref:D,style:{...S.style,animation:de?void 0:"none",opacity:(u=te.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Lf="PopperArrow",Ff={top:"bottom",right:"left",bottom:"top",left:"right"},Bf=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=kf(Lf,o),c=Ff[a.placedSide];return i.createElement("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},i.createElement(Af,R({},r,{ref:n,style:{...r.style,display:"block"}})))});function Vf(e){return e!==null}const zf=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,a,c;const{placement:s,rects:l,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[b,p]=Nc(s),$={start:"0%",center:"50%",end:"100%"}[p],x=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+h/2,w=((a=(c=u.arrow)===null||c===void 0?void 0:c.y)!==null&&a!==void 0?a:0)+g/2;let C="",y="";return b==="bottom"?(C=f?$:`${x}px`,y=`${-g}px`):b==="top"?(C=f?$:`${x}px`,y=`${l.floating.height+g}px`):b==="right"?(C=`${-g}px`,y=f?$:`${w}px`):b==="left"&&(C=`${l.floating.width+g}px`,y=f?$:`${w}px`),{data:{x:C,y}}}});function Nc(e){const[t,n="center"]=e.split("-");return[t,n]}const hn=Mf,Do=If,ko=jf,jo=Bf,Lo=i.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?Je.createPortal(i.createElement(q.div,R({},r,{ref:t})),o):null});function Ve({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Wf({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o,s=fe(n),l=i.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else r(u)},[a,e,r,s]);return[c,l]}function Wf({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),a=fe(t);return i.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}function Mc(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const Oc=i.forwardRef((e,t)=>i.createElement(q.span,R({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Hf=Oc;var Gf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rt=new WeakMap,Wt=new WeakMap,Ht={},kn=0,Ic=function(e){return e&&(e.host||Ic(e.parentNode))},Uf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Ic(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Kf=function(e,t,n,o){var r=Uf(t,Array.isArray(e)?e:[e]);Ht[n]||(Ht[n]=new WeakMap);var a=Ht[n],c=[],s=new Set,l=new Set(r),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",p=(rt.get(h)||0)+1,$=(a.get(h)||0)+1;rt.set(h,p),a.set(h,$),c.push(h),p===1&&b&&Wt.set(h,!0),$===1&&h.setAttribute(n,"true"),b||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),s.clear(),kn++,function(){c.forEach(function(f){var h=rt.get(f)-1,g=a.get(f)-1;rt.set(f,h),a.set(f,g),h||(Wt.has(f)||f.removeAttribute(o),Wt.delete(f)),g||f.removeAttribute(n)}),kn--,kn||(rt=new WeakMap,rt=new WeakMap,Wt=new WeakMap,Ht={})}},gn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Gf(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),Kf(o,r,n,"aria-hidden")):function(){return null}},re=function(){return re=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},re.apply(this,arguments)};function Fo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Dc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var St="right-scroll-bar-position",Rt="width-before-scroll-bar",Yf="with-scroll-bars-hidden",Xf="--removed-body-scroll-bar-size";function jn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function qf(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Zf=typeof window<"u"?m.useLayoutEffect:m.useEffect,jr=new WeakMap;function kc(e,t){var n=qf(null,function(o){return e.forEach(function(r){return jn(r,o)})});return Zf(function(){var o=jr.get(n);if(o){var r=new Set(o),a=new Set(e),c=n.current;r.forEach(function(s){a.has(s)||jn(s,null)}),a.forEach(function(s){r.has(s)||jn(s,c)})}jr.set(n,e)},[e]),n}function Qf(e){return e}function Jf(e,t){t===void 0&&(t=Qf);var n=[],o=!1,r={read:function(){if(o)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(a){var c=t(a,o);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(o=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var l=function(){var d=c;c=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){c.push(d),u()},filter:function(d){return c=c.filter(d),n}}}};return r}function jc(e){e===void 0&&(e={});var t=Jf(null);return t.options=re({async:!0,ssr:!1},e),t}var Lc=function(e){var t=e.sideCar,n=Fo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,re({},n))};Lc.isSideCarExport=!0;function Fc(e,t){return e.useMedium(t),Lc}var Bc=jc(),Ln=function(){},bn=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:Ln,onWheelCapture:Ln,onTouchMoveCapture:Ln}),r=o[0],a=o[1],c=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,$=e.as,x=$===void 0?"div":$,w=Fo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),C=h,y=kc([n,t]),E=re(re({},w),r);return m.createElement(m.Fragment,null,d&&m.createElement(C,{sideCar:Bc,removeScrollBar:u,shards:f,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:n}),c?m.cloneElement(m.Children.only(s),re(re({},E),{ref:y})):m.createElement(x,re({},E,{className:l,ref:y}),s))});bn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bn.classNames={fullWidth:Rt,zeroRight:St};var ep=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ep();return t&&e.setAttribute("nonce",t),e}function np(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function op(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tp())&&(np(t,n),op(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ap=function(){var e=rp();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bo=function(){var e=ap(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},cp={left:0,top:0,right:0,gap:0},Fn=function(e){return parseInt(e||"",10)||0},sp=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Fn(n),Fn(o),Fn(r)]},ip=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cp;var t=sp(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},lp=Bo(),ut="data-scroll-locked",up=function(e,t,n,o){var r=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
12
- .`.concat(Yf,` {
11
+ * */function Ja(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Gd({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Ud({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=Ja(n),l=m.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function Ud({defaultProp:e,onChange:t}){const n=m.useState(e),[o]=n,r=m.useRef(o),a=Ja(t);return m.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}const es=i.forwardRef((e,t)=>{const{className:n,fullWidth:o,value:r,defaultValue:a,onValueChange:s,...c}=e,[l,u]=Gd({prop:r,defaultProp:a,onChange:s});return v.jsx(Wd,{ref:t,className:T(n,"fp-SegmentedControlRoot",{"fp-full-width":o}),...c,type:"single",value:l,onValueChange:d=>{d&&u(d)}})}),ts=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Hd,{ref:t,className:T(n,"fp-SegmentedControlItem"),...o})}),ns=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(We,{ref:t,className:T(n,"fp-SegmentedControlText"),...o})});es.displayName="SegmentedControl.Root";ts.displayName="SegmentedControl.Item";ns.displayName="SegmentedControl.Text";const Kd=Object.freeze(Object.defineProperty({__proto__:null,Item:ts,Root:es,Text:ns},Symbol.toStringTag,{value:"Module"}));function $o(e){const[t,n]=m.useState(void 0);return je(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,c;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,c=u.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function os(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wo="Radio",[Yd,rs]=he(wo),[Xd,qd]=Yd(wo),as=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:a,disabled:s,value:c="on",onCheck:l,...u}=e,[d,f]=m.useState(null),h=ee(t,p=>f(p)),g=m.useRef(!1),b=d?!!d.closest("form"):!0;return v.jsxs(Xd,{scope:n,checked:r,disabled:s,children:[v.jsx(W.button,{type:"button",role:"radio","aria-checked":r,"data-state":is(r),"data-disabled":s?"":void 0,disabled:s,value:c,...u,ref:h,onClick:z(e.onClick,p=>{r||l==null||l(),b&&(g.current=p.isPropagationStopped(),g.current||p.stopPropagation())})}),b&&v.jsx(Zd,{control:d,bubbles:!g.current,name:o,value:c,checked:r,required:a,disabled:s,style:{transform:"translateX(-100%)"}})]})});as.displayName=wo;var ss="RadioIndicator",cs=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,a=qd(ss,n);return v.jsx(Ne,{present:o||a.checked,children:v.jsx(W.span,{"data-state":is(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})})});cs.displayName=ss;var Zd=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=m.useRef(null),s=os(n),c=$o(t);return m.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(h)}},[s,n,o]),v.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:a,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function is(e){return e?"checked":"unchecked"}var Qd=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yo="RadioGroup",[Jd,q$]=he(yo,[gt,rs]),ls=gt(),us=rs(),[ef,tf]=Jd(yo),ds=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:a,required:s=!1,disabled:c=!1,orientation:l,dir:u,loop:d=!0,onValueChange:f,...h}=e,g=ls(n),b=It(u),[p,x]=Ee({prop:a,defaultProp:r,onChange:f});return v.jsx(ef,{scope:n,name:o,required:s,disabled:c,value:p,onValueChange:x,children:v.jsx(vo,{asChild:!0,...g,orientation:l,dir:b,loop:d,children:v.jsx(W.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":c?"":void 0,dir:b,...h,ref:t})})})});ds.displayName=yo;var fs="RadioGroupItem",ps=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,a=tf(fs,n),s=a.disabled||o,c=ls(n),l=us(n),u=m.useRef(null),d=ee(t,u),f=a.value===r.value,h=m.useRef(!1);return m.useEffect(()=>{const g=p=>{Qd.includes(p.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),v.jsx(ho,{asChild:!0,...c,focusable:!s,active:f,children:v.jsx(as,{disabled:s,required:a.required,checked:f,...l,...r,name:a.name,ref:d,onCheck:()=>a.onValueChange(r.value),onKeyDown:z(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:z(r.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});ps.displayName=fs;var nf="RadioGroupIndicator",of=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=us(n);return v.jsx(cs,{...r,...o,ref:t})});of.displayName=nf;var rf=ds,af=ps;function Co(e,t){const n=i.createContext(t);function o(a){const{children:s,...c}=a,l=i.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:l,children:s})}function r(a){const s=i.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}const[sf,cf]=Co("RadioGroup"),ms=i.forwardRef((e,t)=>{const{orientation:n="horizontal",disabled:o,className:r,...a}=e;return v.jsx(sf,{orientation:n,disabled:o,children:v.jsx(rf,{ref:t,orientation:n,disabled:o,className:T(r,"fp-RadioGroupRoot"),...a})})}),vs=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(af,{ref:t,className:T(n,"fp-RadioGroupItem"),...o})}),hs=i.forwardRef((e,t)=>{const{orientation:n,disabled:o}=cf("Label"),{className:r,...a}=e;return v.jsx(pn,{ref:t,className:T(r,"fp-RadioGroupLabel"),"data-orientation":n,"data-disabled":o?"":void 0,...a})});ms.displayName="RadioGroup.Root";vs.displayName="RadioGroup.Item";hs.displayName="RadioGroup.Label";const lf=Object.freeze(Object.defineProperty({__proto__:null,Item:vs,Label:hs,Root:ms},Symbol.toStringTag,{value:"Module"})),uf="6",df="0 0 24 24",ff=ze("fp-Icon",{variants:{size:{1:"fp-size-1",2:"fp-size-2","2_5":"fp-size-2_5",3:"fp-size-3","3_5":"fp-size-3_5",4:"fp-size-4",5:"fp-size-5",6:"fp-size-6",7:"fp-size-7",8:"fp-size-8",9:"fp-size-9",10:"fp-size-10"}},defaultVariants:{size:uf}});function He(e){const{path:t,viewBox:n=df,displayName:o}=e,r=i.forwardRef((a,s)=>{const{size:c,className:l,...u}=a;return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",ref:s,viewBox:n,className:ff({className:l,size:c}),fill:"none",...u,children:t})});return r.displayName=o||"Icon",r}const gs=He({displayName:"Close",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",strokeLinejoin:"round",d:"M17 7 7 17M7 7l10 10"})}),Eo=He({displayName:"ChevronRight",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M11.121 14.121L13.243 12L11.12 9.879"})}),pf=He({displayName:"ChevronUp",path:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M14.121 12.879L12 10.757L9.87903 12.88"})}),bs=He({displayName:"ChevronDown",path:v.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{stroke:"var(--color-icon)",strokeLinecap:"round",d:"M9.87897 11.121L12 13.243L14.121 11.12"})})}),mn=He({displayName:"Checkmark",viewBox:"0 0 16 16",path:v.jsx("path",{fill:"var(--color-icon)",fillRule:"evenodd",clipRule:"evenodd",d:"M11.777 4.08399C11.8873 4.1575 11.9639 4.27178 11.99 4.40172C12.016 4.53167 11.9894 4.66665 11.916 4.77699L7.91602 10.777C7.87506 10.8387 7.82091 10.8905 7.75748 10.9287C7.69405 10.9669 7.62294 10.9905 7.54926 10.9979C7.47559 11.0053 7.40119 10.9962 7.33146 10.9713C7.26172 10.9464 7.19839 10.9063 7.14602 10.854L4.14602 7.85399C4.09953 7.80751 4.06266 7.75232 4.0375 7.69158C4.01234 7.63084 3.99939 7.56574 3.99939 7.49999C3.99939 7.43425 4.01234 7.36915 4.0375 7.30841C4.06266 7.24767 4.09953 7.19248 4.14602 7.14599C4.19251 7.09951 4.2477 7.06263 4.30844 7.03747C4.36918 7.01231 4.43428 6.99936 4.50002 6.99936C4.56577 6.99936 4.63087 7.01231 4.6916 7.03747C4.75234 7.06263 4.80753 7.09951 4.85402 7.14599L7.42202 9.71599L11.084 4.22299C11.1575 4.11271 11.2718 4.03612 11.4018 4.01006C11.5317 3.98399 11.6667 4.01059 11.777 4.08399Z"})}),xs=He({displayName:"Circle",viewBox:"0 0 16 16",path:v.jsx("circle",{fill:"var(--color-icon)",cx:"8",cy:"8",r:"3"})}),mf=He({displayName:"CheckmarkIndeterminate",viewBox:"0 0 16 16",path:v.jsx("path",{fill:"var(--color-icon)",d:"M4 8a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z"})}),[vf,So]=Co("Checkbox"),$s=i.forwardRef((e,t)=>{const{className:n,id:o,...r}=e,a=i.useId(),s=o??a;return v.jsx(vf,{id:s,children:v.jsx("div",{ref:t,className:T(n,"fp-CheckboxRoot"),...r})})}),ws=i.forwardRef((e,t)=>{const{className:n,indeterminate:o,...r}=e,{id:a}=So("Input"),s=hf(o),c=dn(t,s);return v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:c,className:T(n,"fp-CheckboxInput"),id:a,"aria-labelledby":`checkbox-label-${a}`,"aria-describedby":`checkbox-description-${a}`,...r,type:"checkbox"}),v.jsx(ys,{})]})}),ys=()=>v.jsxs("span",{className:"fp-CheckboxIndicator","aria-hidden":"true",children:[v.jsx(mn,{className:"fp-CheckboxCheckmark",size:"4"}),v.jsx(mf,{className:"fp-CheckboxIndeterminate",size:"4"})]}),Cs=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=So("Input");return v.jsx(pn,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxLabel"),htmlFor:r,id:`checkbox-label-${r}`,...o})}),Es=i.forwardRef((e,t)=>{const{className:n,...o}=e,{id:r}=So("Description");return v.jsx(We,{"aria-hidden":"true",ref:t,className:T(n,"fp-CheckboxDescription"),id:`checkbox-description-${r}`,...o})});function hf(e){return i.useCallback(t=>{t&&(t.indeterminate=!!e)},[e])}$s.displayName="Checkbox.Root";ws.displayName="Checkbox.Input";ys.displayName="Checkbox.Indicator";Cs.displayName="Checkbox.Label";Es.displayName="Checkbox.Description";const gf=Object.freeze(Object.defineProperty({__proto__:null,Description:Es,Input:ws,Label:Cs,Root:$s},Symbol.toStringTag,{value:"Module"}));function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(null,arguments)}function Rr(e,[t,n]){return Math.min(n,Math.max(t,e))}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Me(e,t=[]){let n=[];function o(a,s){const c=i.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:h,children:g,...b}=f,p=(h==null?void 0:h[e][l])||c,x=i.useMemo(()=>b,Object.values(b));return i.createElement(p.Provider,{value:x},g)}function d(f,h){const g=(h==null?void 0:h[e][l])||c,b=i.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const r=()=>{const a=n.map(s=>i.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,bf(r,...t)]}function bf(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function xf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function vn(...e){return t=>e.forEach(n=>xf(n,t))}function J(...e){return i.useCallback(vn(...e),e)}const ft=i.forwardRef((e,t)=>{const{children:n,...o}=e,r=i.Children.toArray(n),a=r.find($f);if(a){const s=a.props.children,c=r.map(l=>l===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:l);return i.createElement(Zn,R({},o,{ref:t}),i.isValidElement(s)?i.cloneElement(s,void 0,c):null)}return i.createElement(Zn,R({},o,{ref:t}),n)});ft.displayName="Slot";const Zn=i.forwardRef((e,t)=>{const{children:n,...o}=e;return i.isValidElement(n)?i.cloneElement(n,{...wf(o,n.props),ref:t?vn(t,n.ref):n.ref}):i.Children.count(n)>1?i.Children.only(null):null});Zn.displayName="SlotClone";const Ss=({children:e})=>i.createElement(i.Fragment,null,e);function $f(e){return i.isValidElement(e)&&e.type===Ss}function wf(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{a(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Ro(e){const t=e+"CollectionProvider",[n,o]=Me(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:b,children:p}=g,x=i.useRef(null),$=i.useRef(new Map).current;return i.createElement(r,{scope:b,itemMap:$,collectionRef:x},p)},c=e+"CollectionSlot",l=i.forwardRef((g,b)=>{const{scope:p,children:x}=g,$=a(c,p),w=J(b,$.collectionRef);return i.createElement(ft,{ref:w},x)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=i.forwardRef((g,b)=>{const{scope:p,children:x,...$}=g,w=i.useRef(null),y=J(b,w),C=a(u,p);return i.useEffect(()=>(C.itemMap.set(w,{ref:w,...$}),()=>void C.itemMap.delete(w))),i.createElement(ft,{[d]:"",ref:y},x)});function h(g){const b=a(e+"CollectionConsumer",g);return i.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const $=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,E)=>$.indexOf(C.ref.current)-$.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},h,o]}const yf=i.createContext(void 0);function Po(e){const t=i.useContext(yf);return e||t||"ltr"}const Cf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],q=Cf.reduce((e,t)=>{const n=i.forwardRef((o,r)=>{const{asChild:a,...s}=o,c=a?ft:t;return i.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),i.createElement(c,R({},s,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Rs(e,t){e&&et.flushSync(()=>e.dispatchEvent(t))}function fe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Ef(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const Qn="dismissableLayer.update",Sf="dismissableLayer.pointerDownOutside",Rf="dismissableLayer.focusOutside";let Pr;const Pf=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_o=i.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=i.useContext(Pf),[f,h]=i.useState(null),g=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=i.useState({}),p=J(t,P=>h(P)),x=Array.from(d.layers),[$]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf($),y=f?x.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,E=y>=w,_=_f(P=>{const I=P.target,N=[...d.branches].some(D=>D.contains(I));!E||N||(a==null||a(P),c==null||c(P),P.defaultPrevented||l==null||l())},g),S=Tf(P=>{const I=P.target;[...d.branches].some(D=>D.contains(I))||(s==null||s(P),c==null||c(P),P.defaultPrevented||l==null||l())},g);return Ef(P=>{y===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},g),i.useEffect(()=>{if(f)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Pr=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),_r(),()=>{o&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Pr)}},[f,g,o,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),_r())},[f,d]),i.useEffect(()=>{const P=()=>b({});return document.addEventListener(Qn,P),()=>document.removeEventListener(Qn,P)},[]),i.createElement(q.div,R({},u,{ref:p,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,S.onFocusCapture),onBlurCapture:A(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,_.onPointerDownCapture)}))});function _f(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Ps(Sf,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Tf(e,t=globalThis==null?void 0:globalThis.document){const n=fe(e),o=i.useRef(!1);return i.useEffect(()=>{const r=a=>{a.target&&!o.current&&Ps(Rf,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function _r(){const e=new CustomEvent(Qn);document.dispatchEvent(e)}function Ps(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Rs(r,a):r.dispatchEvent(a)}let On=0;function _s(){i.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Tr()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Tr()),On++,()=>{On===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),On--}},[])}function Tr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Dn="focusScope.autoFocusOnMount",kn="focusScope.autoFocusOnUnmount",Nr={bubbles:!1,cancelable:!0},Ts=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[c,l]=i.useState(null),u=fe(r),d=fe(a),f=i.useRef(null),h=J(t,p=>l(p)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let p=function(y){if(g.paused||!c)return;const C=y.target;c.contains(C)?f.current=C:De(f.current,{select:!0})},x=function(y){if(g.paused||!c)return;const C=y.relatedTarget;C!==null&&(c.contains(C)||De(f.current,{select:!0}))},$=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&De(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const w=new MutationObserver($);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,g.paused]),i.useEffect(()=>{if(c){Ar.add(g);const p=document.activeElement;if(!c.contains(p)){const $=new CustomEvent(Dn,Nr);c.addEventListener(Dn,u),c.dispatchEvent($),$.defaultPrevented||(Nf(Df(Ns(c)),{select:!0}),document.activeElement===p&&De(c))}return()=>{c.removeEventListener(Dn,u),setTimeout(()=>{const $=new CustomEvent(kn,Nr);c.addEventListener(kn,d),c.dispatchEvent($),$.defaultPrevented||De(p??document.body,{select:!0}),c.removeEventListener(kn,d),Ar.remove(g)},0)}}},[c,u,d,g]);const b=i.useCallback(p=>{if(!n&&!o||g.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,$=document.activeElement;if(x&&$){const w=p.currentTarget,[y,C]=Mf(w);y&&C?!p.shiftKey&&$===C?(p.preventDefault(),n&&De(y,{select:!0})):p.shiftKey&&$===y&&(p.preventDefault(),n&&De(C,{select:!0})):$===w&&p.preventDefault()}},[n,o,g.paused]);return i.createElement(q.div,R({tabIndex:-1},s,{ref:h,onKeyDown:b}))});function Nf(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(De(o,{select:t}),document.activeElement!==n)return}function Mf(e){const t=Ns(e),n=Mr(t,e),o=Mr(t.reverse(),e);return[n,o]}function Ns(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mr(e,t){for(const n of e)if(!Af(n,{upTo:t}))return n}function Af(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 If(e){return e instanceof HTMLInputElement&&"select"in e}function De(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&If(e)&&t&&e.select()}}const Ar=Of();function Of(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ir(e,t),e.unshift(t)},remove(t){var n;e=Ir(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Ir(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Df(e){return e.filter(t=>t.tagName!=="A")}const pe=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},kf=m.useId||(()=>{});let Lf=0;function Pe(e){const[t,n]=m.useState(kf());return pe(()=>{n(o=>o??String(Lf++))},[e]),t?`radix-${t}`:""}const jf=["top","right","bottom","left"],we=Math.min,me=Math.max,nn=Math.round,zt=Math.floor,Fe=e=>({x:e,y:e}),Ff={left:"right",right:"left",bottom:"top",top:"bottom"},Bf={start:"end",end:"start"};function Jn(e,t,n){return me(e,we(t,n))}function _e(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function xt(e){return e.split("-")[1]}function To(e){return e==="x"?"y":"x"}function No(e){return e==="y"?"height":"width"}function $t(e){return["top","bottom"].includes(Te(e))?"y":"x"}function Mo(e){return To($t(e))}function Vf(e,t,n){n===void 0&&(n=!1);const o=xt(e),r=Mo(e),a=No(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=on(s)),[s,on(s)]}function zf(e){const t=on(e);return[eo(e),t,eo(t)]}function eo(e){return e.replace(/start|end/g,t=>Bf[t])}function Wf(e,t,n){const o=["left","right"],r=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?a:s;default:return[]}}function Hf(e,t,n,o){const r=xt(e);let a=Wf(Te(e),n==="start",o);return r&&(a=a.map(s=>s+"-"+r),t&&(a=a.concat(a.map(eo)))),a}function on(e){return e.replace(/left|right|bottom|top/g,t=>Ff[t])}function Gf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ms(e){return typeof e!="number"?Gf(e):{top:e,right:e,bottom:e,left:e}}function rn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Or(e,t,n){let{reference:o,floating:r}=e;const a=$t(t),s=Mo(t),c=No(s),l=Te(t),u=a==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let g;switch(l){case"top":g={x:d,y:o.y-r.height};break;case"bottom":g={x:d,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:f};break;case"left":g={x:o.x-r.width,y:f};break;default:g={x:o.x,y:o.y}}switch(xt(t)){case"start":g[s]-=h*(n&&u?-1:1);break;case"end":g[s]+=h*(n&&u?-1:1);break}return g}const Uf=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,c=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Or(u,o,l),h=o,g={},b=0;for(let p=0;p<c.length;p++){const{name:x,fn:$}=c[p],{x:w,y,data:C,reset:E}=await $({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});d=w??d,f=y??f,g={...g,[x]:{...g[x],...C}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:f}=Or(u,h,l)),p=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:g}};async function _t(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:s,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:g=0}=_e(t,e),b=Ms(g),x=c[h?f==="floating"?"reference":"floating":f],$=rn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),w=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},E=rn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:y,strategy:l}):w);return{top:($.top-E.top+b.top)/C.y,bottom:(E.bottom-$.bottom+b.bottom)/C.y,left:($.left-E.left+b.left)/C.x,right:(E.right-$.right+b.right)/C.x}}const Kf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=_e(e,t)||{};if(u==null)return{};const f=Ms(d),h={x:n,y:o},g=Mo(r),b=No(g),p=await s.getDimensions(u),x=g==="y",$=x?"top":"left",w=x?"bottom":"right",y=x?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-h[g]-a.floating[b],E=h[g]-a.reference[g],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let S=_?_[y]:0;(!S||!await(s.isElement==null?void 0:s.isElement(_)))&&(S=c.floating[y]||a.floating[b]);const P=C/2-E/2,I=S/2-p[b]/2-1,N=we(f[$],I),D=we(f[w],I),k=N,V=S-p[b]-D,F=S/2-p[b]/2+P,O=Jn(k,F,V),B=!l.arrow&&xt(r)!=null&&F!==O&&a.reference[b]/2-(F<k?N:D)-p[b]/2<0,j=B?F<k?F-k:F-V:0;return{[g]:h[g]+j,data:{[g]:O,centerOffset:F-O-j,...B&&{alignmentOffset:j}},reset:B}}}),Yf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:s,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...x}=_e(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const $=Te(r),w=Te(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=h||(w||!p?[on(c)]:zf(c));!h&&b!=="none"&&C.push(...Hf(c,p,b,y));const E=[c,...C],_=await _t(t,x),S=[];let P=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&S.push(_[$]),f){const k=Vf(r,s,y);S.push(_[k[0]],_[k[1]])}if(P=[...P,{placement:r,overflows:S}],!S.every(k=>k<=0)){var I,N;const k=(((I=a.flip)==null?void 0:I.index)||0)+1,V=E[k];if(V)return{data:{index:k,overflows:P},reset:{placement:V}};let F=(N=P.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:N.placement;if(!F)switch(g){case"bestFit":{var D;const O=(D=P.map(B=>[B.placement,B.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((B,j)=>B[1]-j[1])[0])==null?void 0:D[0];O&&(F=O);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Dr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kr(e){return jf.some(t=>e[t]>=0)}const Xf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=_e(e,t);switch(o){case"referenceHidden":{const a=await _t(t,{...r,elementContext:"reference"}),s=Dr(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:kr(s)}}}case"escaped":{const a=await _t(t,{...r,altBoundary:!0}),s=Dr(a,n.floating);return{data:{escapedOffsets:s,escaped:kr(s)}}}default:return{}}}}};async function qf(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Te(n),c=xt(n),l=$t(n)==="y",u=["left","top"].includes(s)?-1:1,d=a&&l?-1:1,f=_e(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof b=="number"&&(g=c==="end"?b*-1:b),l?{x:g*d,y:h*u}:{x:h*u,y:g*d}}const Zf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:s,middlewareData:c}=t,l=await qf(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:s}}}}},Qf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:x=>{let{x:$,y:w}=x;return{x:$,y:w}}},...l}=_e(e,t),u={x:n,y:o},d=await _t(t,l),f=$t(Te(r)),h=To(f);let g=u[h],b=u[f];if(a){const x=h==="y"?"top":"left",$=h==="y"?"bottom":"right",w=g+d[x],y=g-d[$];g=Jn(w,g,y)}if(s){const x=f==="y"?"top":"left",$=f==="y"?"bottom":"right",w=b+d[x],y=b-d[$];b=Jn(w,b,y)}const p=c.fn({...t,[h]:g,[f]:b});return{...p,data:{x:p.x-n,y:p.y-o}}}}},Jf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:s}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=_e(e,t),d={x:n,y:o},f=$t(r),h=To(f);let g=d[h],b=d[f];const p=_e(c,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const y=h==="y"?"height":"width",C=a.reference[h]-a.floating[y]+x.mainAxis,E=a.reference[h]+a.reference[y]-x.mainAxis;g<C?g=C:g>E&&(g=E)}if(u){var $,w;const y=h==="y"?"width":"height",C=["top","left"].includes(Te(r)),E=a.reference[f]-a.floating[y]+(C&&(($=s.offset)==null?void 0:$[f])||0)+(C?0:x.crossAxis),_=a.reference[f]+a.reference[y]+(C?0:((w=s.offset)==null?void 0:w[f])||0)-(C?x.crossAxis:0);b<E?b=E:b>_&&(b=_)}return{[h]:g,[f]:b}}}},ep=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:a}=t,{apply:s=()=>{},...c}=_e(e,t),l=await _t(t,c),u=Te(n),d=xt(n),f=$t(n)==="y",{width:h,height:g}=o.floating;let b,p;u==="top"||u==="bottom"?(b=u,p=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,b=d==="end"?"top":"bottom");const x=g-l.top-l.bottom,$=h-l.left-l.right,w=we(g-l[b],x),y=we(h-l[p],$),C=!t.middlewareData.shift;let E=w,_=y;if(f?_=d||C?we(y,$):$:E=d||C?we(w,x):x,C&&!d){const P=me(l.left,0),I=me(l.right,0),N=me(l.top,0),D=me(l.bottom,0);f?_=h-2*(P!==0||I!==0?P+I:me(l.left,l.right)):E=g-2*(N!==0||D!==0?N+D:me(l.top,l.bottom))}await s({...t,availableWidth:_,availableHeight:E});const S=await r.getDimensions(a.floating);return h!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}};function wt(e){return As(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ae(e){var t;return(t=(As(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function As(e){return e instanceof Node||e instanceof ve(e).Node}function ye(e){return e instanceof Element||e instanceof ve(e).Element}function Ce(e){return e instanceof HTMLElement||e instanceof ve(e).HTMLElement}function Lr(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}function Ot(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function tp(e){return["table","td","th"].includes(wt(e))}function Ao(e){const t=Io(),n=xe(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function np(e){let t=Be(e);for(;Ce(t)&&!pt(t);){if(Ao(t))return t;t=Be(t)}return null}function Io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(e){return["html","body","#document"].includes(wt(e))}function xe(e){return ve(e).getComputedStyle(e)}function hn(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Be(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lr(e)&&e.host||Ae(e);return Lr(t)?t.host:t}function Is(e){const t=Be(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ce(t)&&Ot(t)?t:Is(t)}function Tt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Is(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),s=ve(r);return a?t.concat(s,s.visualViewport||[],Ot(r)?r:[],s.frameElement&&n?Tt(s.frameElement):[]):t.concat(r,Tt(r,[],n))}function Os(e){const t=xe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ce(e),a=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=nn(n)!==a||nn(o)!==s;return c&&(n=a,o=s),{width:n,height:o,$:c}}function Oo(e){return ye(e)?e:e.contextElement}function lt(e){const t=Oo(e);if(!Ce(t))return Fe(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=Os(t);let s=(a?nn(n.width):n.width)/o,c=(a?nn(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const op=Fe(0);function Ds(e){const t=ve(e);return!Io()||!t.visualViewport?op:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function Qe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=Oo(e);let s=Fe(1);t&&(o?ye(o)&&(s=lt(o)):s=lt(e));const c=rp(a,n,o)?Ds(a):Fe(0);let l=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,d=r.width/s.x,f=r.height/s.y;if(a){const h=ve(a),g=o&&ye(o)?ve(o):o;let b=h,p=b.frameElement;for(;p&&o&&g!==b;){const x=lt(p),$=p.getBoundingClientRect(),w=xe(p),y=$.left+(p.clientLeft+parseFloat(w.paddingLeft))*x.x,C=$.top+(p.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,u*=x.y,d*=x.x,f*=x.y,l+=y,u+=C,b=ve(p),p=b.frameElement}}return rn({width:d,height:f,x:l,y:u})}const ap=[":popover-open",":modal"];function Do(e){return ap.some(t=>{try{return e.matches(t)}catch{return!1}})}function sp(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",s=Ae(o),c=t?Do(t.floating):!1;if(o===s||c&&a)return n;let l={scrollLeft:0,scrollTop:0},u=Fe(1);const d=Fe(0),f=Ce(o);if((f||!f&&!a)&&((wt(o)!=="body"||Ot(s))&&(l=hn(o)),Ce(o))){const h=Qe(o);u=lt(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function cp(e){return Array.from(e.getClientRects())}function ks(e){return Qe(Ae(e)).left+hn(e).scrollLeft}function ip(e){const t=Ae(e),n=hn(e),o=e.ownerDocument.body,r=me(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=me(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ks(e);const c=-n.scrollTop;return xe(o).direction==="rtl"&&(s+=me(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:s,y:c}}function lp(e,t){const n=ve(e),o=Ae(e),r=n.visualViewport;let a=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){a=r.width,s=r.height;const u=Io();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:a,height:s,x:c,y:l}}function up(e,t){const n=Qe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Ce(e)?lt(e):Fe(1),s=e.clientWidth*a.x,c=e.clientHeight*a.y,l=r*a.x,u=o*a.y;return{width:s,height:c,x:l,y:u}}function jr(e,t,n){let o;if(t==="viewport")o=lp(e,n);else if(t==="document")o=ip(Ae(e));else if(ye(t))o=up(t,n);else{const r=Ds(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return rn(o)}function Ls(e,t){const n=Be(e);return n===t||!ye(n)||pt(n)?!1:xe(n).position==="fixed"||Ls(n,t)}function dp(e,t){const n=t.get(e);if(n)return n;let o=Tt(e,[],!1).filter(c=>ye(c)&&wt(c)!=="body"),r=null;const a=xe(e).position==="fixed";let s=a?Be(e):e;for(;ye(s)&&!pt(s);){const c=xe(s),l=Ao(s);!l&&c.position==="fixed"&&(r=null),(a?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ot(s)&&!l&&Ls(e,s))?o=o.filter(d=>d!==s):r=c,s=Be(s)}return t.set(e,o),o}function fp(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Do(t)?[]:dp(t,this._c):[].concat(n),o],c=s[0],l=s.reduce((u,d)=>{const f=jr(t,d,r);return u.top=me(f.top,u.top),u.right=we(f.right,u.right),u.bottom=we(f.bottom,u.bottom),u.left=me(f.left,u.left),u},jr(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pp(e){const{width:t,height:n}=Os(e);return{width:t,height:n}}function mp(e,t,n){const o=Ce(t),r=Ae(t),a=n==="fixed",s=Qe(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const l=Fe(0);if(o||!o&&!a)if((wt(t)!=="body"||Ot(r))&&(c=hn(t)),o){const f=Qe(t,!0,a,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else r&&(l.x=ks(r));const u=s.left+c.scrollLeft-l.x,d=s.top+c.scrollTop-l.y;return{x:u,y:d,width:s.width,height:s.height}}function Ln(e){return xe(e).position==="static"}function Fr(e,t){return!Ce(e)||xe(e).position==="fixed"?null:t?t(e):e.offsetParent}function js(e,t){const n=ve(e);if(Do(e))return n;if(!Ce(e)){let r=Be(e);for(;r&&!pt(r);){if(ye(r)&&!Ln(r))return r;r=Be(r)}return n}let o=Fr(e,t);for(;o&&tp(o)&&Ln(o);)o=Fr(o,t);return o&&pt(o)&&Ln(o)&&!Ao(o)?n:o||np(e)||n}const vp=async function(e){const t=this.getOffsetParent||js,n=this.getDimensions,o=await n(e.floating);return{reference:mp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function hp(e){return xe(e).direction==="rtl"}const gp={convertOffsetParentRelativeRectToViewportRelativeRect:sp,getDocumentElement:Ae,getClippingRect:fp,getOffsetParent:js,getElementRects:vp,getClientRects:cp,getDimensions:pp,getScale:lt,isElement:ye,isRTL:hp};function bp(e,t){let n=null,o;const r=Ae(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),a();const{left:u,top:d,width:f,height:h}=e.getBoundingClientRect();if(c||t(),!f||!h)return;const g=zt(d),b=zt(r.clientWidth-(u+f)),p=zt(r.clientHeight-(d+h)),x=zt(u),w={rootMargin:-g+"px "+-b+"px "+-p+"px "+-x+"px",threshold:me(0,we(1,l))||1};let y=!0;function C(E){const _=E[0].intersectionRatio;if(_!==l){if(!y)return s();_?s(!1,_):o=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),a}function Fs(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Oo(e),d=r||a?[...u?Tt(u):[],...Tt(t)]:[];d.forEach($=>{r&&$.addEventListener("scroll",n,{passive:!0}),a&&$.addEventListener("resize",n)});const f=u&&c?bp(u,n):null;let h=-1,g=null;s&&(g=new ResizeObserver($=>{let[w]=$;w&&w.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let b,p=l?Qe(e):null;l&&x();function x(){const $=Qe(e);p&&($.x!==p.x||$.y!==p.y||$.width!==p.width||$.height!==p.height)&&n(),p=$,b=requestAnimationFrame(x)}return n(),()=>{var $;d.forEach(w=>{r&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f==null||f(),($=g)==null||$.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const xp=Zf,$p=Qf,wp=Yf,yp=ep,Cp=Xf,Br=Kf,Ep=Jf,Sp=(e,t,n)=>{const o=new Map,r={platform:gp,...n},a={...r.platform,_c:o};return Uf(e,t,{...r,platform:a})};var en=typeof document<"u"?i.useLayoutEffect:i.useEffect;function an(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!an(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!an(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Bs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vr(e,t){const n=Bs(e);return Math.round(t*n)/n}function zr(e){const t=m.useRef(e);return en(()=>{t.current=e}),t}function Vs(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=m.useState(o);an(h,o)||g(o);const[b,p]=m.useState(null),[x,$]=m.useState(null),w=m.useCallback(j=>{j!==_.current&&(_.current=j,p(j))},[]),y=m.useCallback(j=>{j!==S.current&&(S.current=j,$(j))},[]),C=a||b,E=s||x,_=m.useRef(null),S=m.useRef(null),P=m.useRef(d),I=l!=null,N=zr(l),D=zr(r),k=m.useCallback(()=>{if(!_.current||!S.current)return;const j={placement:t,strategy:n,middleware:h};D.current&&(j.platform=D.current),Sp(_.current,S.current,j).then(H=>{const M={...H,isPositioned:!0};V.current&&!an(P.current,M)&&(P.current=M,mo.flushSync(()=>{f(M)}))})},[h,t,n,D]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const V=m.useRef(!1);en(()=>(V.current=!0,()=>{V.current=!1}),[]),en(()=>{if(C&&(_.current=C),E&&(S.current=E),C&&E){if(N.current)return N.current(C,E,k);k()}},[C,E,k,N,I]);const F=m.useMemo(()=>({reference:_,floating:S,setReference:w,setFloating:y}),[w,y]),O=m.useMemo(()=>({reference:C,floating:E}),[C,E]),B=m.useMemo(()=>{const j={position:n,left:0,top:0};if(!O.floating)return j;const H=Vr(O.floating,d.x),M=Vr(O.floating,d.y);return c?{...j,transform:"translate("+H+"px, "+M+"px)",...Bs(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:M}},[n,c,O.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:k,refs:F,elements:O,floatingStyles:B}),[d,k,F,O,B])}const Rp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Br({element:o.current,padding:r}).fn(n):{}:o?Br({element:o,padding:r}).fn(n):{}}}},zs=(e,t)=>({...xp(e),options:[e,t]}),Ws=(e,t)=>({...$p(e),options:[e,t]}),Hs=(e,t)=>({...Ep(e),options:[e,t]}),Gs=(e,t)=>({...wp(e),options:[e,t]}),Us=(e,t)=>({...yp(e),options:[e,t]}),Ks=(e,t)=>({...Cp(e),options:[e,t]}),Ys=(e,t)=>({...Rp(e),options:[e,t]}),Pp=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return i.createElement(q.svg,R({},a,{ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:i.createElement("polygon",{points:"0,0 30,0 15,10"}))}),_p=Pp;function Xs(e){const[t,n]=i.useState(void 0);return pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let s,c;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,c=u.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const qs="Popper",[Zs,yt]=Me(qs),[Tp,Qs]=Zs(qs),Np=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return i.createElement(Tp,{scope:t,anchor:o,onAnchorChange:r},n)},Mp="PopperAnchor",Ap=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Qs(Mp,n),s=i.useRef(null),c=J(t,s);return i.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:i.createElement(q.div,R({},r,{ref:c}))}),Js="PopperContent",[Ip,Op]=Zs(Js),Dp=i.forwardRef((e,t)=>{var n,o,r,a,s,c,l,u;const{__scopePopper:d,side:f="bottom",sideOffset:h=0,align:g="center",alignOffset:b=0,arrowPadding:p=0,avoidCollisions:x=!0,collisionBoundary:$=[],collisionPadding:w=0,sticky:y="partial",hideWhenDetached:C=!1,updatePositionStrategy:E="optimized",onPlaced:_,...S}=e,P=Qs(Js,d),[I,N]=i.useState(null),D=J(t,ge=>N(ge)),[k,V]=i.useState(null),F=Xs(k),O=(n=F==null?void 0:F.width)!==null&&n!==void 0?n:0,B=(o=F==null?void 0:F.height)!==null&&o!==void 0?o:0,j=f+(g!=="center"?"-"+g:""),H=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},M=Array.isArray($)?$:[$],Z=M.length>0,Q={padding:H,boundary:M.filter(Fp),altBoundary:Z},{refs:se,floatingStyles:le,placement:ue,isPositioned:de,middlewareData:te}=Vs({strategy:"fixed",placement:j,whileElementsMounted:(...ge)=>Fs(...ge,{animationFrame:E==="always"}),elements:{reference:P.anchor},middleware:[zs({mainAxis:h+B,alignmentAxis:b}),x&&Ws({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?Hs():void 0,...Q}),x&&Gs({...Q}),Us({...Q,apply:({elements:ge,rects:Oe,availableWidth:Xe,availableHeight:An})=>{const{width:ot,height:nd}=Oe.reference,Bt=ge.floating.style;Bt.setProperty("--radix-popper-available-width",`${Xe}px`),Bt.setProperty("--radix-popper-available-height",`${An}px`),Bt.setProperty("--radix-popper-anchor-width",`${ot}px`),Bt.setProperty("--radix-popper-anchor-height",`${nd}px`)}}),k&&Ys({element:k,padding:p}),Bp({arrowWidth:O,arrowHeight:B}),C&&Ks({strategy:"referenceHidden",...Q})]}),[L,G]=ec(ue),U=fe(_);pe(()=>{de&&(U==null||U())},[de,U]);const K=(r=te.arrow)===null||r===void 0?void 0:r.x,Y=(a=te.arrow)===null||a===void 0?void 0:a.y,X=((s=te.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[ne,oe]=i.useState();return pe(()=>{I&&oe(window.getComputedStyle(I).zIndex)},[I]),i.createElement("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:de?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(c=te.transformOrigin)===null||c===void 0?void 0:c.x,(l=te.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},i.createElement(Ip,{scope:d,placedSide:L,onArrowChange:V,arrowX:K,arrowY:Y,shouldHideArrow:X},i.createElement(q.div,R({"data-side":L,"data-align":G},S,{ref:D,style:{...S.style,animation:de?void 0:"none",opacity:(u=te.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),kp="PopperArrow",Lp={top:"bottom",right:"left",bottom:"top",left:"right"},jp=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=Op(kp,o),s=Lp[a.placedSide];return i.createElement("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0}},i.createElement(_p,R({},r,{ref:n,style:{...r.style,display:"block"}})))});function Fp(e){return e!==null}const Bp=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,a,s;const{placement:c,rects:l,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=f?0:e.arrowWidth,g=f?0:e.arrowHeight,[b,p]=ec(c),x={start:"0%",center:"50%",end:"100%"}[p],$=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+h/2,w=((a=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)+g/2;let y="",C="";return b==="bottom"?(y=f?x:`${$}px`,C=`${-g}px`):b==="top"?(y=f?x:`${$}px`,C=`${l.floating.height+g}px`):b==="right"?(y=`${-g}px`,C=f?x:`${w}px`):b==="left"&&(y=`${l.floating.width+g}px`,C=f?x:`${w}px`),{data:{x:y,y:C}}}});function ec(e){const[t,n="center"]=e.split("-");return[t,n]}const gn=Np,ko=Ap,Lo=Dp,jo=jp,Fo=i.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?et.createPortal(i.createElement(q.div,R({},r,{ref:t})),o):null});function Ve({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Vp({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:o,c=fe(n),l=i.useCallback(u=>{if(a){const f=typeof u=="function"?u(e):u;f!==e&&c(f)}else r(u)},[a,e,r,c]);return[s,l]}function Vp({defaultProp:e,onChange:t}){const n=i.useState(e),[o]=n,r=i.useRef(o),a=fe(t);return i.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),n}function tc(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const nc=i.forwardRef((e,t)=>i.createElement(q.span,R({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),zp=nc;var Wp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rt=new WeakMap,Wt=new WeakMap,Ht={},jn=0,oc=function(e){return e&&(e.host||oc(e.parentNode))},Hp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=oc(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Gp=function(e,t,n,o){var r=Hp(t,Array.isArray(e)?e:[e]);Ht[n]||(Ht[n]=new WeakMap);var a=Ht[n],s=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var g=h.getAttribute(o),b=g!==null&&g!=="false",p=(rt.get(h)||0)+1,x=(a.get(h)||0)+1;rt.set(h,p),a.set(h,x),s.push(h),p===1&&b&&Wt.set(h,!0),x===1&&h.setAttribute(n,"true"),b||h.setAttribute(o,"true")}catch($){console.error("aria-hidden: cannot operate on ",h,$)}})};return d(t),c.clear(),jn++,function(){s.forEach(function(f){var h=rt.get(f)-1,g=a.get(f)-1;rt.set(f,h),a.set(f,g),h||(Wt.has(f)||f.removeAttribute(o),Wt.delete(f)),g||f.removeAttribute(n)}),jn--,jn||(rt=new WeakMap,rt=new WeakMap,Wt=new WeakMap,Ht={})}},bn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Wp(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),Gp(o,r,n,"aria-hidden")):function(){return null}},re=function(){return re=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},re.apply(this,arguments)};function Bo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function rc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var St="right-scroll-bar-position",Rt="width-before-scroll-bar",Up="with-scroll-bars-hidden",Kp="--removed-body-scroll-bar-size";function Fn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yp(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Xp=typeof window<"u"?m.useLayoutEffect:m.useEffect,Wr=new WeakMap;function ac(e,t){var n=Yp(null,function(o){return e.forEach(function(r){return Fn(r,o)})});return Xp(function(){var o=Wr.get(n);if(o){var r=new Set(o),a=new Set(e),s=n.current;r.forEach(function(c){a.has(c)||Fn(c,null)}),a.forEach(function(c){r.has(c)||Fn(c,s)})}Wr.set(n,e)},[e]),n}function qp(e){return e}function Zp(e,t){t===void 0&&(t=qp);var n=[],o=!1,r={read:function(){if(o)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(a){var s=t(a,o);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(a){for(o=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(a),s=n}var l=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return r}function sc(e){e===void 0&&(e={});var t=Zp(null);return t.options=re({async:!0,ssr:!1},e),t}var cc=function(e){var t=e.sideCar,n=Bo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,re({},n))};cc.isSideCarExport=!0;function ic(e,t){return e.useMedium(t),cc}var lc=sc(),Bn=function(){},xn=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:Bn,onWheelCapture:Bn,onTouchMoveCapture:Bn}),r=o[0],a=o[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,x=e.as,$=x===void 0?"div":x,w=Bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=h,C=ac([n,t]),E=re(re({},w),r);return m.createElement(m.Fragment,null,d&&m.createElement(y,{sideCar:lc,removeScrollBar:u,shards:f,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:n}),s?m.cloneElement(m.Children.only(c),re(re({},E),{ref:C})):m.createElement($,re({},E,{className:l,ref:C}),c))});xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xn.classNames={fullWidth:Rt,zeroRight:St};var Qp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qp();return t&&e.setAttribute("nonce",t),e}function em(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Jp())&&(em(t,n),tm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},om=function(){var e=nm();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vo=function(){var e=om(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},rm={left:0,top:0,right:0,gap:0},Vn=function(e){return parseInt(e||"",10)||0},am=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Vn(n),Vn(o),Vn(r)]},sm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rm;var t=am(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},cm=Vo(),ut="data-scroll-locked",im=function(e,t,n,o){var r=e.left,a=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
12
+ .`.concat(Up,` {
13
13
  overflow: hidden `).concat(o,`;
14
- padding-right: `).concat(s,"px ").concat(o,`;
14
+ padding-right: `).concat(c,"px ").concat(o,`;
15
15
  }
16
16
  body[`).concat(ut,`] {
17
17
  overflow: hidden `).concat(o,`;
@@ -19,19 +19,19 @@
19
19
  `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
20
20
  padding-left: `.concat(r,`px;
21
21
  padding-top: `).concat(a,`px;
22
- padding-right: `).concat(c,`px;
22
+ padding-right: `).concat(s,`px;
23
23
  margin-left:0;
24
24
  margin-top:0;
25
- margin-right: `).concat(s,"px ").concat(o,`;
26
- `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
25
+ margin-right: `).concat(c,"px ").concat(o,`;
26
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
27
27
  }
28
28
 
29
29
  .`).concat(St,` {
30
- right: `).concat(s,"px ").concat(o,`;
30
+ right: `).concat(c,"px ").concat(o,`;
31
31
  }
32
32
 
33
33
  .`).concat(Rt,` {
34
- margin-right: `).concat(s,"px ").concat(o,`;
34
+ margin-right: `).concat(c,"px ").concat(o,`;
35
35
  }
36
36
 
37
37
  .`).concat(St," .").concat(St,` {
@@ -43,22 +43,22 @@
43
43
  }
44
44
 
45
45
  body[`).concat(ut,`] {
46
- `).concat(Xf,": ").concat(s,`px;
46
+ `).concat(Kp,": ").concat(c,`px;
47
47
  }
48
- `)},Lr=function(){var e=parseInt(document.body.getAttribute(ut)||"0",10);return isFinite(e)?e:0},dp=function(){m.useEffect(function(){return document.body.setAttribute(ut,(Lr()+1).toString()),function(){var e=Lr()-1;e<=0?document.body.removeAttribute(ut):document.body.setAttribute(ut,e.toString())}},[])},Vc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;dp();var a=m.useMemo(function(){return ip(r)},[r]);return m.createElement(lp,{styles:up(a,!t,r,n?"":"!important")})},Jn=!1;if(typeof window<"u")try{var Gt=Object.defineProperty({},"passive",{get:function(){return Jn=!0,!0}});window.addEventListener("test",Gt,Gt),window.removeEventListener("test",Gt,Gt)}catch{Jn=!1}var at=Jn?{passive:!1}:!1,fp=function(e){return e.tagName==="TEXTAREA"},zc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fp(e)&&n[t]==="visible")},pp=function(e){return zc(e,"overflowY")},mp=function(e){return zc(e,"overflowX")},Fr=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Wc(e,n);if(o){var r=Hc(e,n),a=r[1],c=r[2];if(a>c)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},vp=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},hp=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Wc=function(e,t){return e==="v"?pp(t):mp(t)},Hc=function(e,t){return e==="v"?vp(t):hp(t)},gp=function(e,t){return e==="h"&&t==="rtl"?-1:1},bp=function(e,t,n,o,r){var a=gp(e,window.getComputedStyle(t).direction),c=a*o,s=n.target,l=t.contains(s),u=!1,d=c>0,f=0,h=0;do{var g=Hc(e,s),b=g[0],p=g[1],$=g[2],x=p-$-a*b;(b||x)&&Wc(e,s)&&(f+=x,h+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(f===0||!r)||!d&&(h===0||!r))&&(u=!0),u},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Br=function(e){return[e.deltaX,e.deltaY]},Vr=function(e){return e&&"current"in e?e.current:e},$p=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xp=function(e){return`
48
+ `)},Hr=function(){var e=parseInt(document.body.getAttribute(ut)||"0",10);return isFinite(e)?e:0},lm=function(){m.useEffect(function(){return document.body.setAttribute(ut,(Hr()+1).toString()),function(){var e=Hr()-1;e<=0?document.body.removeAttribute(ut):document.body.setAttribute(ut,e.toString())}},[])},uc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;lm();var a=m.useMemo(function(){return sm(r)},[r]);return m.createElement(cm,{styles:im(a,!t,r,n?"":"!important")})},to=!1;if(typeof window<"u")try{var Gt=Object.defineProperty({},"passive",{get:function(){return to=!0,!0}});window.addEventListener("test",Gt,Gt),window.removeEventListener("test",Gt,Gt)}catch{to=!1}var at=to?{passive:!1}:!1,um=function(e){return e.tagName==="TEXTAREA"},dc=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!um(e)&&n[t]==="visible")},dm=function(e){return dc(e,"overflowY")},fm=function(e){return dc(e,"overflowX")},Gr=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=fc(e,n);if(o){var r=pc(e,n),a=r[1],s=r[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},pm=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},mm=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},fc=function(e,t){return e==="v"?dm(t):fm(t)},pc=function(e,t){return e==="v"?pm(t):mm(t)},vm=function(e,t){return e==="h"&&t==="rtl"?-1:1},hm=function(e,t,n,o,r){var a=vm(e,window.getComputedStyle(t).direction),s=a*o,c=n.target,l=t.contains(c),u=!1,d=s>0,f=0,h=0;do{var g=pc(e,c),b=g[0],p=g[1],x=g[2],$=p-x-a*b;(b||$)&&fc(e,c)&&(f+=$,h+=b),c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&(f===0||!r)||!d&&(h===0||!r))&&(u=!0),u},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ur=function(e){return[e.deltaX,e.deltaY]},Kr=function(e){return e&&"current"in e?e.current:e},gm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bm=function(e){return`
49
49
  .block-interactivity-`.concat(e,` {pointer-events: none;}
50
50
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
51
- `)},wp=0,ct=[];function Cp(e){var t=m.useRef([]),n=m.useRef([0,0]),o=m.useRef(),r=m.useState(wp++)[0],a=m.useState(function(){return Bo()})[0],c=m.useRef(e);m.useEffect(function(){c.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Dc([e.lockRef.current],(e.shards||[]).map(Vr),!0).filter(Boolean);return p.forEach(function($){return $.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function($){return $.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(p,$){if("touches"in p&&p.touches.length===2)return!c.current.allowPinchZoom;var x=Ut(p),w=n.current,C="deltaX"in p?p.deltaX:w[0]-x[0],y="deltaY"in p?p.deltaY:w[1]-x[1],E,_=p.target,S=Math.abs(C)>Math.abs(y)?"h":"v";if("touches"in p&&S==="h"&&_.type==="range")return!1;var P=Fr(S,_);if(!P)return!0;if(P?E=S:(E=S==="v"?"h":"v",P=Fr(S,_)),!P)return!1;if(!o.current&&"changedTouches"in p&&(C||y)&&(o.current=E),!E)return!0;var O=o.current||E;return bp(O,$,p,O==="h"?C:y,!0)},[]),l=m.useCallback(function(p){var $=p;if(!(!ct.length||ct[ct.length-1]!==a)){var x="deltaY"in $?Br($):Ut($),w=t.current.filter(function(E){return E.name===$.type&&E.target===$.target&&$p(E.delta,x)})[0];if(w&&w.should){$.cancelable&&$.preventDefault();return}if(!w){var C=(c.current.shards||[]).map(Vr).filter(Boolean).filter(function(E){return E.contains($.target)}),y=C.length>0?s($,C[0]):!c.current.noIsolation;y&&$.cancelable&&$.preventDefault()}}},[]),u=m.useCallback(function(p,$,x,w){var C={name:p,delta:$,target:x,should:w};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(y){return y!==C})},1)},[]),d=m.useCallback(function(p){n.current=Ut(p),o.current=void 0},[]),f=m.useCallback(function(p){u(p.type,Br(p),p.target,s(p,e.lockRef.current))},[]),h=m.useCallback(function(p){u(p.type,Ut(p),p.target,s(p,e.lockRef.current))},[]);m.useEffect(function(){return ct.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,at),document.addEventListener("touchmove",l,at),document.addEventListener("touchstart",d,at),function(){ct=ct.filter(function(p){return p!==a}),document.removeEventListener("wheel",l,at),document.removeEventListener("touchmove",l,at),document.removeEventListener("touchstart",d,at)}},[]);var g=e.removeScrollBar,b=e.inert;return m.createElement(m.Fragment,null,b?m.createElement(a,{styles:xp(r)}):null,g?m.createElement(Vc,{gapMode:"margin"}):null)}const yp=Fc(Bc,Cp);var Vo=m.forwardRef(function(e,t){return m.createElement(bn,re({},e,{ref:t,sideCar:yp}))});Vo.classNames=bn.classNames;const Ep=[" ","Enter","ArrowUp","ArrowDown"],Sp=[" ","Enter"],$n="Select",[xn,wn,Rp]=So($n),[yt,Zx]=Ne($n,[Rp,Ct]),Cn=Ct(),[Pp,He]=yt($n),[_p,Tp]=yt($n),Ap=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:c,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:g}=e,b=Cn(t),[p,$]=i.useState(null),[x,w]=i.useState(null),[C,y]=i.useState(!1),E=Ro(u),[_=!1,S]=Ve({prop:o,defaultProp:r,onChange:a}),[P,O]=Ve({prop:c,defaultProp:s,onChange:l}),A=i.useRef(null),D=p?!!p.closest("form"):!0,[k,V]=i.useState(new Set),F=Array.from(k).map(I=>I.props.value).join(";");return i.createElement(hn,b,i.createElement(Pp,{required:g,scope:t,trigger:p,onTriggerChange:$,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:C,onValueNodeHasChildrenChange:y,contentId:Pe(),value:P,onValueChange:O,open:_,onOpenChange:S,dir:E,triggerPointerDownPosRef:A,disabled:h},i.createElement(xn.Provider,{scope:t},i.createElement(_p,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(I=>{V(B=>new Set(B).add(I))},[]),onNativeOptionRemove:i.useCallback(I=>{V(B=>{const L=new Set(B);return L.delete(I),L})},[])},n)),D?i.createElement(Xc,{key:F,"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:I=>O(I.target.value),disabled:h},P===void 0?i.createElement("option",{value:""}):null,Array.from(k)):null))},Np="SelectTrigger",Mp=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=Cn(n),c=He(Np,n),s=c.disabled||o,l=J(t,c.onTriggerChange),u=wn(n),[d,f,h]=qc(b=>{const p=u().filter(w=>!w.disabled),$=p.find(w=>w.value===c.value),x=Zc(p,b,$);x!==void 0&&c.onValueChange(x.value)}),g=()=>{s||(c.onOpenChange(!0),h())};return i.createElement(Do,R({asChild:!0},a),i.createElement(q.button,R({type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Yc(c.value)?"":void 0},r,{ref:l,onClick:M(r.onClick,b=>{b.currentTarget.focus()}),onPointerDown:M(r.onPointerDown,b=>{const p=b.target;p.hasPointerCapture(b.pointerId)&&p.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(g(),c.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:M(r.onKeyDown,b=>{const p=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(p&&b.key===" ")&&Ep.includes(b.key)&&(g(),b.preventDefault())})})))}),Op="SelectValue",Ip=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:c="",...s}=e,l=He(Op,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=J(t,l.onValueNodeChange);return pe(()=>{u(d)},[u,d]),i.createElement(q.span,R({},s,{ref:f,style:{pointerEvents:"none"}}),Yc(l.value)?i.createElement(i.Fragment,null,c):a)}),Dp=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return i.createElement(q.span,R({"aria-hidden":!0},r,{ref:t}),o||"▼")}),kp=e=>i.createElement(Lo,R({asChild:!0},e)),mt="SelectContent",jp=i.forwardRef((e,t)=>{const n=He(mt,e.__scopeSelect),[o,r]=i.useState();if(pe(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?Je.createPortal(i.createElement(Gc,{scope:e.__scopeSelect},i.createElement(xn.Slot,{scope:e.__scopeSelect},i.createElement("div",null,e.children))),a):null}return i.createElement(Lp,R({},e,{ref:t}))}),Se=10,[Gc,Ge]=yt(mt),Lp=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:c,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:$,...x}=e,w=He(mt,n),[C,y]=i.useState(null),[E,_]=i.useState(null),S=J(t,j=>y(j)),[P,O]=i.useState(null),[A,D]=i.useState(null),k=wn(n),[V,F]=i.useState(!1),I=i.useRef(!1);i.useEffect(()=>{if(C)return gn(C)},[C]),ac();const B=i.useCallback(j=>{const[G,...U]=k().map(X=>X.ref.current),[K]=U.slice(-1),Y=document.activeElement;for(const X of j)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===G&&E&&(E.scrollTop=0),X===K&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[k,E]),L=i.useCallback(()=>B([P,C]),[B,P,C]);i.useEffect(()=>{V&&L()},[V,L]);const{onOpenChange:H,triggerPointerDownPosRef:N}=w;i.useEffect(()=>{if(C){let j={x:0,y:0};const G=K=>{var Y,X,ne,oe;j={x:Math.abs(Math.round(K.pageX)-((Y=(X=N.current)===null||X===void 0?void 0:X.x)!==null&&Y!==void 0?Y:0)),y:Math.abs(Math.round(K.pageY)-((ne=(oe=N.current)===null||oe===void 0?void 0:oe.y)!==null&&ne!==void 0?ne:0))}},U=K=>{j.x<=10&&j.y<=10?K.preventDefault():C.contains(K.target)||H(!1),document.removeEventListener("pointermove",G),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",U,{capture:!0})}}},[C,H,N]),i.useEffect(()=>{const j=()=>H(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[H]);const[Z,Q]=qc(j=>{const G=k().filter(Y=>!Y.disabled),U=G.find(Y=>Y.ref.current===document.activeElement),K=Zc(G,j,U);K&&setTimeout(()=>K.ref.current.focus())}),ce=i.useCallback((j,G,U)=>{const K=!I.current&&!U;(w.value!==void 0&&w.value===G||K)&&(O(j),K&&(I.current=!0))},[w.value]),le=i.useCallback(()=>C==null?void 0:C.focus(),[C]),ue=i.useCallback((j,G,U)=>{const K=!I.current&&!U;(w.value!==void 0&&w.value===G||K)&&D(j)},[w.value]),de=o==="popper"?zr:Fp,te=de===zr?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:$}:{};return i.createElement(Gc,{scope:n,content:C,viewport:E,onViewportChange:_,itemRefCallback:ce,selectedItem:P,onItemLeave:le,itemTextRefCallback:ue,focusSelectedItem:L,selectedItemText:A,position:o,isPositioned:V,searchRef:Z},i.createElement(Vo,{as:ft,allowPinchZoom:!0},i.createElement(cc,{asChild:!0,trapped:w.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:M(r,j=>{var G;(G=w.trigger)===null||G===void 0||G.focus({preventScroll:!0}),j.preventDefault()})},i.createElement(Po,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},i.createElement(de,R({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:j=>j.preventDefault()},x,te,{onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:M(x.onKeyDown,j=>{const G=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!G&&j.key.length===1&&Q(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let K=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(j.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const Y=j.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>B(K)),j.preventDefault()}})}))))))}),Fp=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=He(mt,n),c=Ge(mt,n),[s,l]=i.useState(null),[u,d]=i.useState(null),f=J(t,S=>d(S)),h=wn(n),g=i.useRef(!1),b=i.useRef(!0),{viewport:p,selectedItem:$,selectedItemText:x,focusSelectedItem:w}=c,C=i.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&p&&$&&x){const S=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),O=a.valueNode.getBoundingClientRect(),A=x.getBoundingClientRect();if(a.dir!=="rtl"){const Y=A.left-P.left,X=O.left-Y,ne=S.left-X,oe=S.width+ne,ge=Math.max(oe,P.width),Ie=window.innerWidth-Se,Ye=xr(X,[Se,Ie-ge]);s.style.minWidth=oe+"px",s.style.left=Ye+"px"}else{const Y=P.right-A.right,X=window.innerWidth-O.right-Y,ne=window.innerWidth-S.right-X,oe=S.width+ne,ge=Math.max(oe,P.width),Ie=window.innerWidth-Se,Ye=xr(X,[Se,Ie-ge]);s.style.minWidth=oe+"px",s.style.right=Ye+"px"}const D=h(),k=window.innerHeight-Se*2,V=p.scrollHeight,F=window.getComputedStyle(u),I=parseInt(F.borderTopWidth,10),B=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),H=parseInt(F.paddingBottom,10),N=I+B+V+H+L,Z=Math.min($.offsetHeight*5,N),Q=window.getComputedStyle(p),ce=parseInt(Q.paddingTop,10),le=parseInt(Q.paddingBottom,10),ue=S.top+S.height/2-Se,de=k-ue,te=$.offsetHeight/2,j=$.offsetTop+te,G=I+B+j,U=N-G;if(G<=ue){const Y=$===D[D.length-1].ref.current;s.style.bottom="0px";const X=u.clientHeight-p.offsetTop-p.offsetHeight,ne=Math.max(de,te+(Y?le:0)+X+L),oe=G+ne;s.style.height=oe+"px"}else{const Y=$===D[0].ref.current;s.style.top="0px";const ne=Math.max(ue,I+p.offsetTop+(Y?ce:0)+te)+U;s.style.height=ne+"px",p.scrollTop=G-ue+p.offsetTop}s.style.margin=`${Se}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=k+"px",o==null||o(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,s,u,p,$,x,a.dir,o]);pe(()=>C(),[C]);const[y,E]=i.useState();pe(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const _=i.useCallback(S=>{S&&b.current===!0&&(C(),w==null||w(),b.current=!1)},[C,w]);return i.createElement(Bp,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:_},i.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y}},i.createElement(q.div,R({},r,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}}))))}),zr=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Se,...a}=e,c=Cn(n);return i.createElement(ko,R({},c,a,{ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...a.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)"}}))}),[Bp,zo]=yt(mt,{}),Wr="SelectViewport",Vp=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ge(Wr,n),a=zo(Wr,n),c=J(t,r.onViewportChange),s=i.useRef(0);return i.createElement(i.Fragment,null,i.createElement("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}"}}),i.createElement(xn.Slot,{scope:n},i.createElement(q.div,R({"data-radix-select-viewport":"",role:"presentation"},o,{ref:c,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:M(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const h=Math.abs(s.current-u.scrollTop);if(h>0){const g=window.innerHeight-Se*2,b=parseFloat(d.style.minHeight),p=parseFloat(d.style.height),$=Math.max(b,p);if($<g){const x=$+h,w=Math.min(g,x),C=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),zp="SelectGroup",[Wp,Hp]=yt(zp),Gp=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Pe();return i.createElement(Wp,{scope:n,id:r},i.createElement(q.div,R({role:"group","aria-labelledby":r},o,{ref:t})))}),Up="SelectLabel",Kp=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Hp(Up,n);return i.createElement(q.div,R({id:r.id},o,{ref:t}))}),eo="SelectItem",[Yp,Uc]=yt(eo),Xp=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...c}=e,s=He(eo,n),l=Ge(eo,n),u=s.value===o,[d,f]=i.useState(a??""),[h,g]=i.useState(!1),b=J(t,x=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,x,o,r)}),p=Pe(),$=()=>{r||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")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 i.createElement(Yp,{scope:n,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:i.useCallback(x=>{f(w=>{var C;return w||((C=x==null?void 0:x.textContent)!==null&&C!==void 0?C:"").trim()})},[])},i.createElement(xn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d},i.createElement(q.div,R({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1},c,{ref:b,onFocus:M(c.onFocus,()=>g(!0)),onBlur:M(c.onBlur,()=>g(!1)),onPointerUp:M(c.onPointerUp,$),onPointerMove:M(c.onPointerMove,x=>{if(r){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:M(c.onPointerLeave,x=>{if(x.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:M(c.onKeyDown,x=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&x.key===" "||(Sp.includes(x.key)&&$(),x.key===" "&&x.preventDefault())})}))))}),Kt="SelectItemText",qp=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,c=He(Kt,n),s=Ge(Kt,n),l=Uc(Kt,n),u=Tp(Kt,n),[d,f]=i.useState(null),h=J(t,x=>f(x),l.onItemTextChange,x=>{var w;return(w=s.itemTextRefCallback)===null||w===void 0?void 0:w.call(s,x,l.value,l.disabled)}),g=d==null?void 0:d.textContent,b=i.useMemo(()=>i.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},g),[l.disabled,l.value,g]),{onNativeOptionAdd:p,onNativeOptionRemove:$}=u;return pe(()=>(p(b),()=>$(b)),[p,$,b]),i.createElement(i.Fragment,null,i.createElement(q.span,R({id:l.textId},a,{ref:h})),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?Je.createPortal(a.children,c.valueNode):null)}),Zp="SelectItemIndicator",Qp=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Uc(Zp,n).isSelected?i.createElement(q.span,R({"aria-hidden":!0},o,{ref:t})):null}),Hr="SelectScrollUpButton",Jp=i.forwardRef((e,t)=>{const n=Ge(Hr,e.__scopeSelect),o=zo(Hr,e.__scopeSelect),[r,a]=i.useState(!1),c=J(t,o.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=s.scrollTop>0;a(u)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(Kc,R({},e,{ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}})):null}),Gr="SelectScrollDownButton",em=i.forwardRef((e,t)=>{const n=Ge(Gr,e.__scopeSelect),o=zo(Gr,e.__scopeSelect),[r,a]=i.useState(!1),c=J(t,o.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=s.scrollHeight-s.clientHeight,d=Math.ceil(s.scrollTop)<u;a(d)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(Kc,R({},e,{ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}})):null}),Kc=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Ge("SelectScrollButton",n),c=i.useRef(null),s=wn(n),l=i.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),pe(()=>{var u;const d=s().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),i.createElement(q.div,R({"aria-hidden":!0},r,{ref:t,style:{flexShrink:0,...r.style},onPointerDown:M(r.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(o,50))}),onPointerMove:M(r.onPointerMove,()=>{var u;(u=a.onItemLeave)===null||u===void 0||u.call(a),c.current===null&&(c.current=window.setInterval(o,50))}),onPointerLeave:M(r.onPointerLeave,()=>{l()})}))}),tm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return i.createElement(q.div,R({"aria-hidden":!0},o,{ref:t}))}),Ur="SelectArrow",nm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Cn(n),a=He(Ur,n),c=Ge(Ur,n);return a.open&&c.position==="popper"?i.createElement(jo,R({},r,o,{ref:t})):null});function Yc(e){return e===""||e===void 0}const Xc=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),a=J(t,r),c=Mc(n);return i.useEffect(()=>{const s=r.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[c,n]),i.createElement(Oc,{asChild:!0},i.createElement("select",R({},o,{ref:a,defaultValue:n})))});Xc.displayName="BubbleSelect";function qc(e){const t=fe(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(c=>{const s=n.current+c;t(s),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function Zc(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let c=om(e,Math.max(a,0));r.length===1&&(c=c.filter(u=>u!==n));const l=c.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function om(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const rm=Ap,am=Mp,cm=Ip,sm=Dp,im=kp,lm=jp,um=Vp,dm=Gp,fm=Kp,pm=Xp,mm=qp,vm=Qp,hm=Jp,gm=em,bm=tm,$m=nm,xm=rm,wm=$m,Cm=i.forwardRef((e,t)=>{const{placeholder:n,className:o,...r}=e;return v.jsxs(am,{ref:t,...r,className:T(o,"fp-SelectTrigger"),children:[v.jsx(cm,{placeholder:n}),v.jsx(sm,{className:"fp-SelectTriggerIcon",children:v.jsx(ec,{})})]})}),ym=i.forwardRef((e,t)=>{const{children:n,portal:o=!1,className:r,...a}=e,c=o?im:i.Fragment;return v.jsx(c,{children:v.jsxs(lm,{ref:t,...a,className:T(r,"fp-MenuContent"),children:[v.jsx(hm,{className:"fp-SelectScrollUpButton",children:v.jsx(ld,{})}),v.jsx(um,{children:n}),v.jsx(gm,{className:"fp-SelectScrollDownButton",children:v.jsx(ec,{})})]})})}),Em=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(pm,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx(vm,{className:"fp-MenuItemIndicator",children:v.jsx(pn,{size:"4"})}),v.jsx(mm,{children:n})]})}),Sm=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(bm,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),Rm=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(fm,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Pm=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(dm,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),_m=Object.freeze(Object.defineProperty({__proto__:null,Arrow:wm,Content:ym,Group:Pm,Item:Em,Label:Rm,Root:xm,Separator:Sm,Trigger:Cm},Symbol.toStringTag,{value:"Module"}));function Tm(e,t){return i.useReducer((n,o)=>{const r=t[n][o];return r??n},e)}const tt=e=>{const{present:t,children:n}=e,o=Am(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),a=J(o.ref,r.ref);return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:a}):null};tt.displayName="Presence";function Am(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,l]=Tm(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Yt(o.current);a.current=s==="mounted"?u:"none"},[s]),pe(()=>{const u=o.current,d=r.current;if(d!==e){const h=a.current,g=Yt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),pe(()=>{if(t){const u=f=>{const g=Yt(o.current).includes(f.animationName);f.target===t&&g&&Je.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=Yt(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Yt(e){return(e==null?void 0:e.animationName)||"none"}const Bn="rovingFocusGroup.onEntryFocus",Nm={bubbles:!1,cancelable:!0},Wo="RovingFocusGroup",[to,Qc,Mm]=So(Wo),[Om,Jc]=Ne(Wo,[Mm]),[Im,Dm]=Om(Wo),km=i.forwardRef((e,t)=>i.createElement(to.Provider,{scope:e.__scopeRovingFocusGroup},i.createElement(to.Slot,{scope:e.__scopeRovingFocusGroup},i.createElement(jm,R({},e,{ref:t}))))),jm=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,f=i.useRef(null),h=J(t,f),g=Ro(a),[b=null,p]=Ve({prop:c,defaultProp:s,onChange:l}),[$,x]=i.useState(!1),w=fe(u),C=Qc(n),y=i.useRef(!1),[E,_]=i.useState(0);return i.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(Bn,w),()=>S.removeEventListener(Bn,w)},[w]),i.createElement(Im,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:b,onItemFocus:i.useCallback(S=>p(S),[p]),onItemShiftTab:i.useCallback(()=>x(!0),[]),onFocusableItemAdd:i.useCallback(()=>_(S=>S+1),[]),onFocusableItemRemove:i.useCallback(()=>_(S=>S-1),[])},i.createElement(q.div,R({tabIndex:$||E===0?-1:0,"data-orientation":o},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{y.current=!0}),onFocus:M(e.onFocus,S=>{const P=!y.current;if(S.target===S.currentTarget&&P&&!$){const O=new CustomEvent(Bn,Nm);if(S.currentTarget.dispatchEvent(O),!O.defaultPrevented){const A=C().filter(I=>I.focusable),D=A.find(I=>I.active),k=A.find(I=>I.id===b),F=[D,k,...A].filter(Boolean).map(I=>I.ref.current);es(F)}}y.current=!1}),onBlur:M(e.onBlur,()=>x(!1))})))}),Lm="RovingFocusGroupItem",Fm=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...c}=e,s=Pe(),l=a||s,u=Dm(Lm,n),d=u.currentTabStopId===l,f=Qc(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=u;return i.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),i.createElement(to.ItemSlot,{scope:n,id:l,focusable:o,active:r},i.createElement(q.span,R({tabIndex:d?0:-1,"data-orientation":u.orientation},c,{ref:t,onMouseDown:M(e.onMouseDown,b=>{o?u.onItemFocus(l):b.preventDefault()}),onFocus:M(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:M(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=zm(b,u.orientation,u.dir);if(p!==void 0){b.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(p==="last")x.reverse();else if(p==="prev"||p==="next"){p==="prev"&&x.reverse();const w=x.indexOf(b.currentTarget);x=u.loop?Wm(x,w+1):x.slice(w+1)}setTimeout(()=>es(x))}})})))}),Bm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zm(e,t,n){const o=Vm(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Bm[o]}function es(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Wm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const Hm=km,Gm=Fm,no=["Enter"," "],Um=["ArrowDown","PageUp","Home"],ts=["ArrowUp","PageDown","End"],Km=[...Um,...ts],Ym={ltr:[...no,"ArrowRight"],rtl:[...no,"ArrowLeft"]},Xm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yn="Menu",[At,qm,Zm]=So(yn),[nt,En]=Ne(yn,[Zm,Ct,Jc]),Dt=Ct(),ns=Jc(),[os,Ue]=nt(yn),[Qm,kt]=nt(yn),Jm=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:c=!0}=e,s=Dt(t),[l,u]=i.useState(null),d=i.useRef(!1),f=fe(a),h=Ro(r);return i.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.createElement(hn,s,i.createElement(os,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u},i.createElement(Qm,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:c},o)))},rs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Dt(n);return i.createElement(Do,R({},r,o,{ref:t}))}),as="MenuPortal",[ev,cs]=nt(as,{forceMount:void 0}),tv=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ue(as,t);return i.createElement(ev,{scope:t,forceMount:n},i.createElement(tt,{present:n||a.open},i.createElement(Lo,{asChild:!0,container:r},o)))},be="MenuContent",[nv,Ho]=nt(be),ov=i.forwardRef((e,t)=>{const n=cs(be,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ue(be,e.__scopeMenu),c=kt(be,e.__scopeMenu);return i.createElement(At.Provider,{scope:e.__scopeMenu},i.createElement(tt,{present:o||a.open},i.createElement(At.Slot,{scope:e.__scopeMenu},c.modal?i.createElement(rv,R({},r,{ref:t})):i.createElement(av,R({},r,{ref:t})))))}),rv=i.forwardRef((e,t)=>{const n=Ue(be,e.__scopeMenu),o=i.useRef(null),r=J(t,o);return i.useEffect(()=>{const a=o.current;if(a)return gn(a)},[]),i.createElement(Go,R({},e,{ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),av=i.forwardRef((e,t)=>{const n=Ue(be,e.__scopeMenu);return i.createElement(Go,R({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Go=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:b,...p}=e,$=Ue(be,n),x=kt(be,n),w=Dt(n),C=ns(n),y=qm(n),[E,_]=i.useState(null),S=i.useRef(null),P=J(t,S,$.onContentChange),O=i.useRef(0),A=i.useRef(""),D=i.useRef(0),k=i.useRef(null),V=i.useRef("right"),F=i.useRef(0),I=b?Vo:i.Fragment,B=b?{as:ft,allowPinchZoom:!0}:void 0,L=N=>{var Z,Q;const ce=A.current+N,le=y().filter(U=>!U.disabled),ue=document.activeElement,de=(Z=le.find(U=>U.ref.current===ue))===null||Z===void 0?void 0:Z.textValue,te=le.map(U=>U.textValue),j=Sv(te,ce,de),G=(Q=le.find(U=>U.textValue===j))===null||Q===void 0?void 0:Q.ref.current;(function U(K){A.current=K,window.clearTimeout(O.current),K!==""&&(O.current=window.setTimeout(()=>U(""),1e3))})(ce),G&&setTimeout(()=>G.focus())};i.useEffect(()=>()=>window.clearTimeout(O.current),[]),ac();const H=i.useCallback(N=>{var Z,Q;return V.current===((Z=k.current)===null||Z===void 0?void 0:Z.side)&&Pv(N,(Q=k.current)===null||Q===void 0?void 0:Q.area)},[]);return i.createElement(nv,{scope:n,searchRef:A,onItemEnter:i.useCallback(N=>{H(N)&&N.preventDefault()},[H]),onItemLeave:i.useCallback(N=>{var Z;H(N)||((Z=S.current)===null||Z===void 0||Z.focus(),_(null))},[H]),onTriggerLeave:i.useCallback(N=>{H(N)&&N.preventDefault()},[H]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(N=>{k.current=N},[])},i.createElement(I,B,i.createElement(cc,{asChild:!0,trapped:r,onMountAutoFocus:M(a,N=>{var Z;N.preventDefault(),(Z=S.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:c},i.createElement(Po,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g},i.createElement(Hm,R({asChild:!0},C,{dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:_,onEntryFocus:M(l,N=>{x.isUsingKeyboardRef.current||N.preventDefault()})}),i.createElement(ko,R({role:"menu","aria-orientation":"vertical","data-state":ps($.open),"data-radix-menu-content":"",dir:x.dir},w,p,{ref:P,style:{outline:"none",...p.style},onKeyDown:M(p.onKeyDown,N=>{const Q=N.target.closest("[data-radix-menu-content]")===N.currentTarget,ce=N.ctrlKey||N.altKey||N.metaKey,le=N.key.length===1;Q&&(N.key==="Tab"&&N.preventDefault(),!ce&&le&&L(N.key));const ue=S.current;if(N.target!==ue||!Km.includes(N.key))return;N.preventDefault();const te=y().filter(j=>!j.disabled).map(j=>j.ref.current);ts.includes(N.key)&&te.reverse(),yv(te)}),onBlur:M(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(O.current),A.current="")}),onPointerMove:M(e.onPointerMove,Nt(N=>{const Z=N.target,Q=F.current!==N.clientX;if(N.currentTarget.contains(Z)&&Q){const ce=N.clientX>F.current?"right":"left";V.current=ce,F.current=N.clientX}}))})))))))}),ss=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"group"},o,{ref:t}))}),cv=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({},o,{ref:t}))}),oo="MenuItem",Kr="menu.itemSelect",Uo=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=i.useRef(null),c=kt(oo,e.__scopeMenu),s=Ho(oo,e.__scopeMenu),l=J(t,a),u=i.useRef(!1),d=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(Kr,{bubbles:!0,cancelable:!0});f.addEventListener(Kr,g=>o==null?void 0:o(g),{once:!0}),oc(f,h),h.defaultPrevented?u.current=!1:c.onClose()}};return i.createElement(is,R({},r,{ref:l,disabled:n,onClick:M(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),u.current=!0},onPointerUp:M(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:M(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||no.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),is=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,c=Ho(oo,n),s=ns(n),l=i.useRef(null),u=J(t,l),[d,f]=i.useState(!1),[h,g]=i.useState("");return i.useEffect(()=>{const b=l.current;if(b){var p;g(((p=b.textContent)!==null&&p!==void 0?p:"").trim())}},[a.children]),i.createElement(At.ItemSlot,{scope:n,disabled:o,textValue:r??h},i.createElement(Gm,R({asChild:!0},s,{focusable:!o}),i.createElement(q.div,R({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:u,onPointerMove:M(e.onPointerMove,Nt(b=>{o?c.onItemLeave(b):(c.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:M(e.onPointerLeave,Nt(b=>c.onItemLeave(b))),onFocus:M(e.onFocus,()=>f(!0)),onBlur:M(e.onBlur,()=>f(!1))}))))}),sv=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return i.createElement(us,{scope:e.__scopeMenu,checked:n},i.createElement(Uo,R({role:"menuitemcheckbox","aria-checked":cn(n)?"mixed":n},r,{ref:t,"data-state":Ko(n),onSelect:M(r.onSelect,()=>o==null?void 0:o(cn(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),iv="MenuRadioGroup",[lv,uv]=nt(iv,{value:void 0,onValueChange:()=>{}}),dv=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=fe(o);return i.createElement(lv,{scope:e.__scopeMenu,value:n,onValueChange:a},i.createElement(ss,R({},r,{ref:t})))}),fv="MenuRadioItem",pv=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=uv(fv,e.__scopeMenu),a=n===r.value;return i.createElement(us,{scope:e.__scopeMenu,checked:a},i.createElement(Uo,R({role:"menuitemradio","aria-checked":a},o,{ref:t,"data-state":Ko(a),onSelect:M(o.onSelect,()=>{var c;return(c=r.onValueChange)===null||c===void 0?void 0:c.call(r,n)},{checkForDefaultPrevented:!1})})))}),ls="MenuItemIndicator",[us,mv]=nt(ls,{checked:!1}),vv=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=mv(ls,n);return i.createElement(tt,{present:o||cn(a.checked)||a.checked===!0},i.createElement(q.span,R({},r,{ref:t,"data-state":Ko(a.checked)})))}),hv=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"separator","aria-orientation":"horizontal"},o,{ref:t}))}),gv=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Dt(n);return i.createElement(jo,R({},r,o,{ref:t}))}),ds="MenuSub",[bv,fs]=nt(ds),$v=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,a=Ue(ds,t),c=Dt(t),[s,l]=i.useState(null),[u,d]=i.useState(null),f=fe(r);return i.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),i.createElement(hn,c,i.createElement(os,{scope:t,open:o,onOpenChange:f,content:u,onContentChange:d},i.createElement(bv,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:s,onTriggerChange:l},n)))},Xt="MenuSubTrigger",xv=i.forwardRef((e,t)=>{const n=Ue(Xt,e.__scopeMenu),o=kt(Xt,e.__scopeMenu),r=fs(Xt,e.__scopeMenu),a=Ho(Xt,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),i.createElement(rs,R({asChild:!0},u),i.createElement(is,R({id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ps(n.open)},e,{ref:mn(t,r.onTriggerChange),onClick:f=>{var h;(h=e.onClick)===null||h===void 0||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,Nt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(a.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:M(e.onPointerLeave,Nt(f=>{var h;d();const g=(h=n.content)===null||h===void 0?void 0:h.getBoundingClientRect();if(g){var b;const p=(b=n.content)===null||b===void 0?void 0:b.dataset.side,$=p==="right",x=$?-5:5,w=g[$?"left":"right"],C=g[$?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:w,y:g.top},{x:C,y:g.top},{x:C,y:g.bottom},{x:w,y:g.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,f=>{const h=a.searchRef.current!=="";if(!(e.disabled||h&&f.key===" ")&&Ym[o.dir].includes(f.key)){var g;n.onOpenChange(!0),(g=n.content)===null||g===void 0||g.focus(),f.preventDefault()}})})))}),wv="MenuSubContent",Cv=i.forwardRef((e,t)=>{const n=cs(be,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ue(be,e.__scopeMenu),c=kt(be,e.__scopeMenu),s=fs(wv,e.__scopeMenu),l=i.useRef(null),u=J(t,l);return i.createElement(At.Provider,{scope:e.__scopeMenu},i.createElement(tt,{present:o||a.open},i.createElement(At.Slot,{scope:e.__scopeMenu},i.createElement(Go,R({id:s.contentId,"aria-labelledby":s.triggerId},r,{ref:u,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;c.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:M(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,d=>{c.onClose(),d.preventDefault()}),onKeyDown:M(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Xm[c.dir].includes(d.key);if(f&&h){var g;a.onOpenChange(!1),(g=s.trigger)===null||g===void 0||g.focus(),d.preventDefault()}})})))))});function ps(e){return e?"open":"closed"}function cn(e){return e==="indeterminate"}function Ko(e){return cn(e)?"indeterminate":e?"checked":"unchecked"}function yv(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ev(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Sv(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let c=Ev(e,Math.max(a,0));r.length===1&&(c=c.filter(u=>u!==n));const l=c.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Rv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const s=t[a].x,l=t[a].y,u=t[c].x,d=t[c].y;l>o!=d>o&&n<(u-s)*(o-l)/(d-l)+s&&(r=!r)}return r}function Pv(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Rv(n,t)}function Nt(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ms=Jm,vs=rs,hs=tv,gs=ov,bs=ss,$s=cv,xs=Uo,ws=sv,Cs=dv,ys=pv,Es=vv,Ss=hv,_v=gv,Rs=$v,Ps=xv,_s=Cv,Ts="DropdownMenu",[Tv,Qx]=Ne(Ts,[En]),ae=En(),[Av,As]=Tv(Ts),Nv=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:c,modal:s=!0}=e,l=ae(t),u=i.useRef(null),[d=!1,f]=Ve({prop:r,defaultProp:a,onChange:c});return i.createElement(Av,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:s},i.createElement(ms,R({},l,{open:d,onOpenChange:f,dir:o,modal:s}),n))},Mv="DropdownMenuTrigger",Ov=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=As(Mv,n),c=ae(n);return i.createElement(vs,R({asChild:!0},c),i.createElement(q.button,R({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o},r,{ref:mn(t,a.triggerRef),onPointerDown:M(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:M(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),Iv=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ae(t);return i.createElement(hs,R({},o,n))},Dv="DropdownMenuContent",kv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=As(Dv,n),a=ae(n),c=i.useRef(!1);return i.createElement(gs,R({id:r.contentId,"aria-labelledby":r.triggerId},a,o,{ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,s=>{var l;c.current||(l=r.triggerRef.current)===null||l===void 0||l.focus(),c.current=!1,s.preventDefault()}),onInteractOutside:M(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(c.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)"}}))}),jv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(bs,R({},r,o,{ref:t}))}),Lv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement($s,R({},r,o,{ref:t}))}),Fv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(xs,R({},r,o,{ref:t}))}),Bv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(ws,R({},r,o,{ref:t}))}),Vv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Cs,R({},r,o,{ref:t}))}),zv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(ys,R({},r,o,{ref:t}))}),Wv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Es,R({},r,o,{ref:t}))}),Hv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Ss,R({},r,o,{ref:t}))}),Gv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(_v,R({},r,o,{ref:t}))}),Uv=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:a}=e,c=ae(t),[s=!1,l]=Ve({prop:o,defaultProp:a,onChange:r});return i.createElement(Rs,R({},c,{open:s,onOpenChange:l}),n)},Kv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Ps,R({},r,o,{ref:t}))}),Yv=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(_s,R({},r,o,{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)"}}))}),Xv=Nv,qv=Ov,Ns=Iv,Zv=kv,Qv=jv,Jv=Lv,eh=Fv,th=Bv,nh=Vv,oh=zv,Ms=Wv,rh=Hv,ah=Gv,ch=Uv,sh=Kv,ih=Yv,lh=Xv,uh=qv,dh=ch,fh=nh,ph=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(Ns,{children:v.jsxs(Zv,{ref:t,...r,className:T(o,"fp-MenuContent"),children:[n,v.jsx(ah,{})]})})}),mh=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(eh,{ref:t,...o,className:T(n,"fp-MenuItem")})}),vh=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(rh,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),hh=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Jv,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),gh=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Qv,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),bh=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(sh,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,v.jsx(yo,{className:"fp-MenuSubtriggerCaret"})]})}),$h=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ns,{children:v.jsx(ih,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),xh=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(th,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx(Ms,{className:"fp-MenuItemIndicator",children:v.jsx(pn,{size:"4"})}),n]})}),wh=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(oh,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[v.jsx(Ms,{className:"fp-MenuItemIndicator",children:v.jsx(tc,{size:"4"})}),n]})}),Ch=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:xh,Content:ph,Group:gh,Item:mh,Label:hh,RadioGroup:fh,RadioItem:wh,Root:lh,Separator:vh,Sub:dh,SubContent:$h,SubTrigger:bh,Trigger:uh},Symbol.toStringTag,{value:"Module"})),Os="ContextMenu",[yh,Jx]=Ne(Os,[En]),ie=En(),[Eh,Is]=yh(Os),Sh=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,dir:r,modal:a=!0}=e,[c,s]=i.useState(!1),l=ie(t),u=fe(o),d=i.useCallback(f=>{s(f),u(f)},[u]);return i.createElement(Eh,{scope:t,open:c,onOpenChange:d,modal:a},i.createElement(ms,R({},l,{dir:r,open:c,onOpenChange:d,modal:a}),n))},Rh="ContextMenuTrigger",Ph=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:o=!1,...r}=e,a=Is(Rh,n),c=ie(n),s=i.useRef({x:0,y:0}),l=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),u=i.useRef(0),d=i.useCallback(()=>window.clearTimeout(u.current),[]),f=h=>{s.current={x:h.clientX,y:h.clientY},a.onOpenChange(!0)};return i.useEffect(()=>d,[d]),i.useEffect(()=>void(o&&d()),[o,d]),i.createElement(i.Fragment,null,i.createElement(vs,R({},c,{virtualRef:l})),i.createElement(q.span,R({"data-state":a.open?"open":"closed","data-disabled":o?"":void 0},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:M(e.onContextMenu,h=>{d(),f(h),h.preventDefault()}),onPointerDown:o?e.onPointerDown:M(e.onPointerDown,qt(h=>{d(),u.current=window.setTimeout(()=>f(h),700)})),onPointerMove:o?e.onPointerMove:M(e.onPointerMove,qt(d)),onPointerCancel:o?e.onPointerCancel:M(e.onPointerCancel,qt(d)),onPointerUp:o?e.onPointerUp:M(e.onPointerUp,qt(d))})))}),_h=e=>{const{__scopeContextMenu:t,...n}=e,o=ie(t);return i.createElement(hs,R({},o,n))},Th="ContextMenuContent",Ah=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=Is(Th,n),a=ie(n),c=i.useRef(!1);return i.createElement(gs,R({},a,o,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&c.current&&s.preventDefault(),c.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!r.modal&&(c.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)"}}))}),Nh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(bs,R({},r,o,{ref:t}))}),Mh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement($s,R({},r,o,{ref:t}))}),Oh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(xs,R({},r,o,{ref:t}))}),Ih=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(ws,R({},r,o,{ref:t}))}),Dh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Cs,R({},r,o,{ref:t}))}),kh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(ys,R({},r,o,{ref:t}))}),jh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Es,R({},r,o,{ref:t}))}),Lh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Ss,R({},r,o,{ref:t}))}),Fh=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,open:r,defaultOpen:a}=e,c=ie(t),[s,l]=Ve({prop:r,defaultProp:a,onChange:o});return i.createElement(Rs,R({},c,{open:s,onOpenChange:l}),n)},Bh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Ps,R({},r,o,{ref:t}))}),Vh=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(_s,R({},r,o,{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)"}}))});function qt(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const zh=Sh,Wh=Ph,Ds=_h,Hh=Ah,Gh=Nh,Uh=Mh,Kh=Oh,Yh=Ih,Xh=Dh,qh=kh,ks=jh,Zh=Lh,Qh=Fh,Jh=Bh,eg=Vh,tg=zh,ng=Wh,og=Qh,rg=Xh,ag=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(Ds,{children:v.jsx(Hh,{ref:t,...r,className:T(o,"fp-MenuContent"),children:n})})}),cg=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Kh,{ref:t,...o,className:T(n,"fp-MenuItem")})}),sg=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Zh,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),ig=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Uh,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),lg=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Gh,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),ug=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Jh,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,v.jsx(yo,{className:"fp-MenuSubtriggerCaret"})]})}),dg=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ds,{children:v.jsx(eg,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),fg=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Yh,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx(ks,{className:"fp-MenuItemIndicator",children:v.jsx(pn,{size:"4"})}),n]})}),pg=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(qh,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[v.jsx(ks,{className:"fp-MenuItemIndicator",children:v.jsx(tc,{size:"4"})}),n]})}),mg=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:fg,Content:ag,Group:lg,Item:cg,Label:ig,RadioGroup:rg,RadioItem:pg,Root:tg,Separator:sg,Sub:og,SubContent:dg,SubTrigger:ug,Trigger:ng},Symbol.toStringTag,{value:"Module"}));function vg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var hg="DismissableLayer",ro="dismissableLayer.update",gg="dismissableLayer.pointerDownOutside",bg="dismissableLayer.focusOutside",Yr,js=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yo=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...l}=e,u=m.useContext(js),[d,f]=m.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=m.useState({}),b=ee(t,S=>f(S)),p=Array.from(u.layers),[$]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf($),w=d?p.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,y=w>=x,E=wg(S=>{const P=S.target,O=[...u.branches].some(A=>A.contains(P));!y||O||(r==null||r(S),c==null||c(S),S.defaultPrevented||s==null||s())},h),_=Cg(S=>{const P=S.target;[...u.branches].some(A=>A.contains(P))||(a==null||a(S),c==null||c(S),S.defaultPrevented||s==null||s())},h);return vg(S=>{w===u.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},h),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xr(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yr)}},[d,h,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xr())},[d,u]),m.useEffect(()=>{const S=()=>g({});return document.addEventListener(ro,S),()=>document.removeEventListener(ro,S)},[]),v.jsx(W.div,{...l,ref:b,style:{pointerEvents:C?y?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,_.onFocusCapture),onBlurCapture:z(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,E.onPointerDownCapture)})});Yo.displayName=hg;var $g="DismissableLayerBranch",xg=m.forwardRef((e,t)=>{const n=m.useContext(js),o=m.useRef(null),r=ee(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),v.jsx(W.div,{...e,ref:r})});xg.displayName=$g;function wg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let l=function(){Ls(gg,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Cg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&Ls(bg,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Xr(){const e=new CustomEvent(ro);document.dispatchEvent(e)}function Ls(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zl(r,a):r.dispatchEvent(a)}var Vn=0;function Fs(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qr()),document.body.insertAdjacentElement("beforeend",e[1]??qr()),Vn++,()=>{Vn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vn--}},[])}function qr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var zn="focusScope.autoFocusOnMount",Wn="focusScope.autoFocusOnUnmount",Zr={bubbles:!1,cancelable:!0},yg="FocusScope",Xo=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...c}=e,[s,l]=m.useState(null),u=Re(r),d=Re(a),f=m.useRef(null),h=ee(t,p=>l(p)),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let p=function(C){if(g.paused||!s)return;const y=C.target;s.contains(y)?f.current=y:ke(f.current,{select:!0})},$=function(C){if(g.paused||!s)return;const y=C.relatedTarget;y!==null&&(s.contains(y)||ke(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&ke(s)};document.addEventListener("focusin",p),document.addEventListener("focusout",$);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",$),w.disconnect()}}},[o,s,g.paused]),m.useEffect(()=>{if(s){Jr.add(g);const p=document.activeElement;if(!s.contains(p)){const x=new CustomEvent(zn,Zr);s.addEventListener(zn,u),s.dispatchEvent(x),x.defaultPrevented||(Eg(Tg(Bs(s)),{select:!0}),document.activeElement===p&&ke(s))}return()=>{s.removeEventListener(zn,u),setTimeout(()=>{const x=new CustomEvent(Wn,Zr);s.addEventListener(Wn,d),s.dispatchEvent(x),x.defaultPrevented||ke(p??document.body,{select:!0}),s.removeEventListener(Wn,d),Jr.remove(g)},0)}}},[s,u,d,g]);const b=m.useCallback(p=>{if(!n&&!o||g.paused)return;const $=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if($&&x){const w=p.currentTarget,[C,y]=Sg(w);C&&y?!p.shiftKey&&x===y?(p.preventDefault(),n&&ke(C,{select:!0})):p.shiftKey&&x===C&&(p.preventDefault(),n&&ke(y,{select:!0})):x===w&&p.preventDefault()}},[n,o,g.paused]);return v.jsx(W.div,{tabIndex:-1,...c,ref:h,onKeyDown:b})});Xo.displayName=yg;function Eg(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ke(o,{select:t}),document.activeElement!==n)return}function Sg(e){const t=Bs(e),n=Qr(t,e),o=Qr(t.reverse(),e);return[n,o]}function Bs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qr(e,t){for(const n of e)if(!Rg(n,{upTo:t}))return n}function Rg(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 Pg(e){return e instanceof HTMLInputElement&&"select"in e}function ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pg(e)&&t&&e.select()}}var Jr=_g();function _g(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ea(e,t),e.unshift(t)},remove(t){var n;e=ea(e,t),(n=e[0])==null||n.resume()}}}function ea(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Tg(e){return e.filter(t=>t.tagName!=="A")}var Ag="Arrow",Vs=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return v.jsx(W.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vs.displayName=Ag;var Ng=Vs,qo="Popper",[zs,Ws]=he(qo),[Mg,Hs]=zs(qo),Gs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return v.jsx(Mg,{scope:t,anchor:o,onAnchorChange:r,children:n})};Gs.displayName=qo;var Us="PopperAnchor",Ks=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Hs(Us,n),c=m.useRef(null),s=ee(t,c);return m.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||c.current)}),o?null:v.jsx(W.div,{...r,ref:s})});Ks.displayName=Us;var Zo="PopperContent",[Og,Ig]=zs(Zo),Ys=m.forwardRef((e,t)=>{var j,G,U,K,Y,X;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,$=Hs(Zo,n),[x,w]=m.useState(null),C=ee(t,ne=>w(ne)),[y,E]=m.useState(null),_=$o(y),S=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,O=o+(a!=="center"?"-"+a:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],k=D.length>0,V={padding:A,boundary:D.filter(kg),altBoundary:k},{refs:F,floatingStyles:I,placement:B,isPositioned:L,middlewareData:H}=bc({strategy:"fixed",placement:O,whileElementsMounted:(...ne)=>hc(...ne,{animationFrame:g==="always"}),elements:{reference:$.anchor},middleware:[$c({mainAxis:r+P,alignmentAxis:c}),l&&xc({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?wc():void 0,...V}),l&&Cc({...V}),yc({...V,apply:({elements:ne,rects:oe,availableWidth:ge,availableHeight:Ie})=>{const{width:Ye,height:An}=oe.reference,ot=ne.floating.style;ot.setProperty("--radix-popper-available-width",`${ge}px`),ot.setProperty("--radix-popper-available-height",`${Ie}px`),ot.setProperty("--radix-popper-anchor-width",`${Ye}px`),ot.setProperty("--radix-popper-anchor-height",`${An}px`)}}),y&&Sc({element:y,padding:s}),jg({arrowWidth:S,arrowHeight:P}),h&&Ec({strategy:"referenceHidden",...V})]}),[N,Z]=Zs(B),Q=Re(b);Le(()=>{L&&(Q==null||Q())},[L,Q]);const ce=(j=H.arrow)==null?void 0:j.x,le=(G=H.arrow)==null?void 0:G.y,ue=((U=H.arrow)==null?void 0:U.centerOffset)!==0,[de,te]=m.useState();return Le(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:L?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(K=H.transformOrigin)==null?void 0:K.x,(Y=H.transformOrigin)==null?void 0:Y.y].join(" "),...((X=H.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Og,{scope:n,placedSide:N,onArrowChange:E,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:v.jsx(W.div,{"data-side":N,"data-align":Z,...p,ref:C,style:{...p.style,animation:L?void 0:"none"}})})})});Ys.displayName=Zo;var Xs="PopperArrow",Dg={top:"bottom",right:"left",bottom:"top",left:"right"},qs=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=Ig(Xs,o),c=Dg[a.placedSide];return v.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:v.jsx(Ng,{...r,ref:n,style:{...r.style,display:"block"}})})});qs.displayName=Xs;function kg(e){return e!==null}var jg=e=>({name:"transformOrigin",options:e,fn(t){var $,x,w;const{placement:n,rects:o,middlewareData:r}=t,c=(($=r.arrow)==null?void 0:$.centerOffset)!==0,s=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[u,d]=Zs(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((x=r.arrow)==null?void 0:x.x)??0)+s/2,g=(((w=r.arrow)==null?void 0:w.y)??0)+l/2;let b="",p="";return u==="bottom"?(b=c?f:`${h}px`,p=`${-l}px`):u==="top"?(b=c?f:`${h}px`,p=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,p=c?f:`${g}px`):u==="left"&&(b=`${o.floating.width+l}px`,p=c?f:`${g}px`),{data:{x:b,y:p}}}});function Zs(e){const[t,n="center"]=e.split("-");return[t,n]}var Lg=Gs,Qs=Ks,Fg=Ys,Bg=qs,Vg="Portal",Qo=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,a]=m.useState(!1);Le(()=>a(!0),[]);const c=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Je.createPortal(v.jsx(W.div,{...o,ref:t}),c):null});Qo.displayName=Vg;var Js=jc(),Hn=function(){},Sn=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:Hn,onWheelCapture:Hn,onTouchMoveCapture:Hn}),r=o[0],a=o[1],c=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,$=e.as,x=$===void 0?"div":$,w=e.gapMode,C=Fo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),y=h,E=kc([n,t]),_=re(re({},C),r);return m.createElement(m.Fragment,null,d&&m.createElement(y,{sideCar:Js,removeScrollBar:u,shards:f,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:n,gapMode:w}),c?m.cloneElement(m.Children.only(s),re(re({},_),{ref:E})):m.createElement(x,re({},_,{className:l,ref:E}),s))});Sn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sn.classNames={fullWidth:Rt,zeroRight:St};var ao=!1;if(typeof window<"u")try{var Zt=Object.defineProperty({},"passive",{get:function(){return ao=!0,!0}});window.addEventListener("test",Zt,Zt),window.removeEventListener("test",Zt,Zt)}catch{ao=!1}var st=ao?{passive:!1}:!1,zg=function(e){return e.tagName==="TEXTAREA"},ei=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!zg(e)&&n[t]==="visible")},Wg=function(e){return ei(e,"overflowY")},Hg=function(e){return ei(e,"overflowX")},ta=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=ti(e,o);if(r){var a=ni(e,o),c=a[1],s=a[2];if(c>s)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Gg=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Ug=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},ti=function(e,t){return e==="v"?Wg(t):Hg(t)},ni=function(e,t){return e==="v"?Gg(t):Ug(t)},Kg=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yg=function(e,t,n,o,r){var a=Kg(e,window.getComputedStyle(t).direction),c=a*o,s=n.target,l=t.contains(s),u=!1,d=c>0,f=0,h=0;do{var g=ni(e,s),b=g[0],p=g[1],$=g[2],x=p-$-a*b;(b||x)&&ti(e,s)&&(f+=x,h+=b),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!r)||!d&&(Math.abs(h)<1||!r))&&(u=!0),u},Qt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},na=function(e){return[e.deltaX,e.deltaY]},oa=function(e){return e&&"current"in e?e.current:e},Xg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qg=function(e){return`
51
+ `)},xm=0,st=[];function $m(e){var t=m.useRef([]),n=m.useRef([0,0]),o=m.useRef(),r=m.useState(xm++)[0],a=m.useState(function(){return Vo()})[0],s=m.useRef(e);m.useEffect(function(){s.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=rc([e.lockRef.current],(e.shards||[]).map(Kr),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=m.useCallback(function(p,x){if("touches"in p&&p.touches.length===2)return!s.current.allowPinchZoom;var $=Ut(p),w=n.current,y="deltaX"in p?p.deltaX:w[0]-$[0],C="deltaY"in p?p.deltaY:w[1]-$[1],E,_=p.target,S=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in p&&S==="h"&&_.type==="range")return!1;var P=Gr(S,_);if(!P)return!0;if(P?E=S:(E=S==="v"?"h":"v",P=Gr(S,_)),!P)return!1;if(!o.current&&"changedTouches"in p&&(y||C)&&(o.current=E),!E)return!0;var I=o.current||E;return hm(I,x,p,I==="h"?y:C,!0)},[]),l=m.useCallback(function(p){var x=p;if(!(!st.length||st[st.length-1]!==a)){var $="deltaY"in x?Ur(x):Ut(x),w=t.current.filter(function(E){return E.name===x.type&&E.target===x.target&&gm(E.delta,$)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var y=(s.current.shards||[]).map(Kr).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=y.length>0?c(x,y[0]):!s.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=m.useCallback(function(p,x,$,w){var y={name:p,delta:x,target:$,should:w};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),d=m.useCallback(function(p){n.current=Ut(p),o.current=void 0},[]),f=m.useCallback(function(p){u(p.type,Ur(p),p.target,c(p,e.lockRef.current))},[]),h=m.useCallback(function(p){u(p.type,Ut(p),p.target,c(p,e.lockRef.current))},[]);m.useEffect(function(){return st.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,at),document.addEventListener("touchmove",l,at),document.addEventListener("touchstart",d,at),function(){st=st.filter(function(p){return p!==a}),document.removeEventListener("wheel",l,at),document.removeEventListener("touchmove",l,at),document.removeEventListener("touchstart",d,at)}},[]);var g=e.removeScrollBar,b=e.inert;return m.createElement(m.Fragment,null,b?m.createElement(a,{styles:bm(r)}):null,g?m.createElement(uc,{gapMode:"margin"}):null)}const wm=ic(lc,$m);var zo=m.forwardRef(function(e,t){return m.createElement(xn,re({},e,{ref:t,sideCar:wm}))});zo.classNames=xn.classNames;const ym=[" ","Enter","ArrowUp","ArrowDown"],Cm=[" ","Enter"],$n="Select",[wn,yn,Em]=Ro($n),[Ct,Z$]=Me($n,[Em,yt]),Cn=yt(),[Sm,Ge]=Ct($n),[Rm,Pm]=Ct($n),_m=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:g}=e,b=Cn(t),[p,x]=i.useState(null),[$,w]=i.useState(null),[y,C]=i.useState(!1),E=Po(u),[_=!1,S]=Ve({prop:o,defaultProp:r,onChange:a}),[P,I]=Ve({prop:s,defaultProp:c,onChange:l}),N=i.useRef(null),D=p?!!p.closest("form"):!0,[k,V]=i.useState(new Set),F=Array.from(k).map(O=>O.props.value).join(";");return i.createElement(gn,b,i.createElement(Sm,{required:g,scope:t,trigger:p,onTriggerChange:x,valueNode:$,onValueNodeChange:w,valueNodeHasChildren:y,onValueNodeHasChildrenChange:C,contentId:Pe(),value:P,onValueChange:I,open:_,onOpenChange:S,dir:E,triggerPointerDownPosRef:N,disabled:h},i.createElement(wn.Provider,{scope:t},i.createElement(Rm,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(O=>{V(B=>new Set(B).add(O))},[]),onNativeOptionRemove:i.useCallback(O=>{V(B=>{const j=new Set(B);return j.delete(O),j})},[])},n)),D?i.createElement(bc,{key:F,"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:O=>I(O.target.value),disabled:h},P===void 0?i.createElement("option",{value:""}):null,Array.from(k)):null))},Tm="SelectTrigger",Nm=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=Cn(n),s=Ge(Tm,n),c=s.disabled||o,l=J(t,s.onTriggerChange),u=yn(n),[d,f,h]=xc(b=>{const p=u().filter(w=>!w.disabled),x=p.find(w=>w.value===s.value),$=$c(p,b,x);$!==void 0&&s.onValueChange($.value)}),g=()=>{c||(s.onOpenChange(!0),h())};return i.createElement(ko,R({asChild:!0},a),i.createElement(q.button,R({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":gc(s.value)?"":void 0},r,{ref:l,onClick:A(r.onClick,b=>{b.currentTarget.focus()}),onPointerDown:A(r.onPointerDown,b=>{const p=b.target;p.hasPointerCapture(b.pointerId)&&p.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(g(),s.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:A(r.onKeyDown,b=>{const p=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(p&&b.key===" ")&&ym.includes(b.key)&&(g(),b.preventDefault())})})))}),Mm="SelectValue",Am=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:s="",...c}=e,l=Ge(Mm,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=J(t,l.onValueNodeChange);return pe(()=>{u(d)},[u,d]),i.createElement(q.span,R({},c,{ref:f,style:{pointerEvents:"none"}}),gc(l.value)?i.createElement(i.Fragment,null,s):a)}),Im=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return i.createElement(q.span,R({"aria-hidden":!0},r,{ref:t}),o||"▼")}),Om=e=>i.createElement(Fo,R({asChild:!0},e)),mt="SelectContent",Dm=i.forwardRef((e,t)=>{const n=Ge(mt,e.__scopeSelect),[o,r]=i.useState();if(pe(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?et.createPortal(i.createElement(mc,{scope:e.__scopeSelect},i.createElement(wn.Slot,{scope:e.__scopeSelect},i.createElement("div",null,e.children))),a):null}return i.createElement(km,R({},e,{ref:t}))}),Se=10,[mc,Ue]=Ct(mt),km=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:x,...$}=e,w=Ge(mt,n),[y,C]=i.useState(null),[E,_]=i.useState(null),S=J(t,L=>C(L)),[P,I]=i.useState(null),[N,D]=i.useState(null),k=yn(n),[V,F]=i.useState(!1),O=i.useRef(!1);i.useEffect(()=>{if(y)return bn(y)},[y]),_s();const B=i.useCallback(L=>{const[G,...U]=k().map(X=>X.ref.current),[K]=U.slice(-1),Y=document.activeElement;for(const X of L)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===G&&E&&(E.scrollTop=0),X===K&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[k,E]),j=i.useCallback(()=>B([P,y]),[B,P,y]);i.useEffect(()=>{V&&j()},[V,j]);const{onOpenChange:H,triggerPointerDownPosRef:M}=w;i.useEffect(()=>{if(y){let L={x:0,y:0};const G=K=>{var Y,X,ne,oe;L={x:Math.abs(Math.round(K.pageX)-((Y=(X=M.current)===null||X===void 0?void 0:X.x)!==null&&Y!==void 0?Y:0)),y:Math.abs(Math.round(K.pageY)-((ne=(oe=M.current)===null||oe===void 0?void 0:oe.y)!==null&&ne!==void 0?ne:0))}},U=K=>{L.x<=10&&L.y<=10?K.preventDefault():y.contains(K.target)||H(!1),document.removeEventListener("pointermove",G),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",U,{capture:!0})}}},[y,H,M]),i.useEffect(()=>{const L=()=>H(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[H]);const[Z,Q]=xc(L=>{const G=k().filter(Y=>!Y.disabled),U=G.find(Y=>Y.ref.current===document.activeElement),K=$c(G,L,U);K&&setTimeout(()=>K.ref.current.focus())}),se=i.useCallback((L,G,U)=>{const K=!O.current&&!U;(w.value!==void 0&&w.value===G||K)&&(I(L),K&&(O.current=!0))},[w.value]),le=i.useCallback(()=>y==null?void 0:y.focus(),[y]),ue=i.useCallback((L,G,U)=>{const K=!O.current&&!U;(w.value!==void 0&&w.value===G||K)&&D(L)},[w.value]),de=o==="popper"?Yr:Lm,te=de===Yr?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:x}:{};return i.createElement(mc,{scope:n,content:y,viewport:E,onViewportChange:_,itemRefCallback:se,selectedItem:P,onItemLeave:le,itemTextRefCallback:ue,focusSelectedItem:j,selectedItemText:N,position:o,isPositioned:V,searchRef:Z},i.createElement(zo,{as:ft,allowPinchZoom:!0},i.createElement(Ts,{asChild:!0,trapped:w.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:A(r,L=>{var G;(G=w.trigger)===null||G===void 0||G.focus({preventScroll:!0}),L.preventDefault()})},i.createElement(_o,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>w.onOpenChange(!1)},i.createElement(de,R({role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:L=>L.preventDefault()},$,te,{onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...$.style},onKeyDown:A($.onKeyDown,L=>{const G=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!G&&L.key.length===1&&Q(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let K=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(L.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const Y=L.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>B(K)),L.preventDefault()}})}))))))}),Lm=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Ge(mt,n),s=Ue(mt,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=J(t,S=>d(S)),h=yn(n),g=i.useRef(!1),b=i.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:$,focusSelectedItem:w}=s,y=i.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&u&&p&&x&&$){const S=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),N=$.getBoundingClientRect();if(a.dir!=="rtl"){const Y=N.left-P.left,X=I.left-Y,ne=S.left-X,oe=S.width+ne,ge=Math.max(oe,P.width),Oe=window.innerWidth-Se,Xe=Rr(X,[Se,Oe-ge]);c.style.minWidth=oe+"px",c.style.left=Xe+"px"}else{const Y=P.right-N.right,X=window.innerWidth-I.right-Y,ne=window.innerWidth-S.right-X,oe=S.width+ne,ge=Math.max(oe,P.width),Oe=window.innerWidth-Se,Xe=Rr(X,[Se,Oe-ge]);c.style.minWidth=oe+"px",c.style.right=Xe+"px"}const D=h(),k=window.innerHeight-Se*2,V=p.scrollHeight,F=window.getComputedStyle(u),O=parseInt(F.borderTopWidth,10),B=parseInt(F.paddingTop,10),j=parseInt(F.borderBottomWidth,10),H=parseInt(F.paddingBottom,10),M=O+B+V+H+j,Z=Math.min(x.offsetHeight*5,M),Q=window.getComputedStyle(p),se=parseInt(Q.paddingTop,10),le=parseInt(Q.paddingBottom,10),ue=S.top+S.height/2-Se,de=k-ue,te=x.offsetHeight/2,L=x.offsetTop+te,G=O+B+L,U=M-G;if(G<=ue){const Y=x===D[D.length-1].ref.current;c.style.bottom="0px";const X=u.clientHeight-p.offsetTop-p.offsetHeight,ne=Math.max(de,te+(Y?le:0)+X+j),oe=G+ne;c.style.height=oe+"px"}else{const Y=x===D[0].ref.current;c.style.top="0px";const ne=Math.max(ue,O+p.offsetTop+(Y?se:0)+te)+U;c.style.height=ne+"px",p.scrollTop=G-ue+p.offsetTop}c.style.margin=`${Se}px 0`,c.style.minHeight=Z+"px",c.style.maxHeight=k+"px",o==null||o(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,u,p,x,$,a.dir,o]);pe(()=>y(),[y]);const[C,E]=i.useState();pe(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const _=i.useCallback(S=>{S&&b.current===!0&&(y(),w==null||w(),b.current=!1)},[y,w]);return i.createElement(jm,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:_},i.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},i.createElement(q.div,R({},r,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}}))))}),Yr=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Se,...a}=e,s=Cn(n);return i.createElement(Lo,R({},s,a,{ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...a.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)"}}))}),[jm,Wo]=Ct(mt,{}),Xr="SelectViewport",Fm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ue(Xr,n),a=Wo(Xr,n),s=J(t,r.onViewportChange),c=i.useRef(0);return i.createElement(i.Fragment,null,i.createElement("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}"}}),i.createElement(wn.Slot,{scope:n},i.createElement(q.div,R({"data-radix-select-viewport":"",role:"presentation"},o,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:A(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const h=Math.abs(c.current-u.scrollTop);if(h>0){const g=window.innerHeight-Se*2,b=parseFloat(d.style.minHeight),p=parseFloat(d.style.height),x=Math.max(b,p);if(x<g){const $=x+h,w=Math.min(g,$),y=$-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=y>0?y:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})}))))}),Bm="SelectGroup",[Vm,zm]=Ct(Bm),Wm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Pe();return i.createElement(Vm,{scope:n,id:r},i.createElement(q.div,R({role:"group","aria-labelledby":r},o,{ref:t})))}),Hm="SelectLabel",Gm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=zm(Hm,n);return i.createElement(q.div,R({id:r.id},o,{ref:t}))}),no="SelectItem",[Um,vc]=Ct(no),Km=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...s}=e,c=Ge(no,n),l=Ue(no,n),u=c.value===o,[d,f]=i.useState(a??""),[h,g]=i.useState(!1),b=J(t,$=>{var w;return(w=l.itemRefCallback)===null||w===void 0?void 0:w.call(l,$,o,r)}),p=Pe(),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")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 i.createElement(Um,{scope:n,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:i.useCallback($=>{f(w=>{var y;return w||((y=$==null?void 0:$.textContent)!==null&&y!==void 0?y:"").trim()})},[])},i.createElement(wn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d},i.createElement(q.div,R({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1},s,{ref:b,onFocus:A(s.onFocus,()=>g(!0)),onBlur:A(s.onBlur,()=>g(!1)),onPointerUp:A(s.onPointerUp,x),onPointerMove:A(s.onPointerMove,$=>{if(r){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}else $.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(s.onPointerLeave,$=>{if($.currentTarget===document.activeElement){var w;(w=l.onItemLeave)===null||w===void 0||w.call(l)}}),onKeyDown:A(s.onKeyDown,$=>{var w;((w=l.searchRef)===null||w===void 0?void 0:w.current)!==""&&$.key===" "||(Cm.includes($.key)&&x(),$.key===" "&&$.preventDefault())})}))))}),Kt="SelectItemText",Ym=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,s=Ge(Kt,n),c=Ue(Kt,n),l=vc(Kt,n),u=Pm(Kt,n),[d,f]=i.useState(null),h=J(t,$=>f($),l.onItemTextChange,$=>{var w;return(w=c.itemTextRefCallback)===null||w===void 0?void 0:w.call(c,$,l.value,l.disabled)}),g=d==null?void 0:d.textContent,b=i.useMemo(()=>i.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},g),[l.disabled,l.value,g]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=u;return pe(()=>(p(b),()=>x(b)),[p,x,b]),i.createElement(i.Fragment,null,i.createElement(q.span,R({id:l.textId},a,{ref:h})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?et.createPortal(a.children,s.valueNode):null)}),Xm="SelectItemIndicator",qm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return vc(Xm,n).isSelected?i.createElement(q.span,R({"aria-hidden":!0},o,{ref:t})):null}),qr="SelectScrollUpButton",Zm=i.forwardRef((e,t)=>{const n=Ue(qr,e.__scopeSelect),o=Wo(qr,e.__scopeSelect),[r,a]=i.useState(!1),s=J(t,o.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(hc,R({},e,{ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}})):null}),Zr="SelectScrollDownButton",Qm=i.forwardRef((e,t)=>{const n=Ue(Zr,e.__scopeSelect),o=Wo(Zr,e.__scopeSelect),[r,a]=i.useState(!1),s=J(t,o.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),r?i.createElement(hc,R({},e,{ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}})):null}),hc=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Ue("SelectScrollButton",n),s=i.useRef(null),c=yn(n),l=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),pe(()=>{var u;const d=c().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[c]),i.createElement(q.div,R({"aria-hidden":!0},r,{ref:t,style:{flexShrink:0,...r.style},onPointerDown:A(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:A(r.onPointerMove,()=>{var u;(u=a.onItemLeave)===null||u===void 0||u.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:A(r.onPointerLeave,()=>{l()})}))}),Jm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return i.createElement(q.div,R({"aria-hidden":!0},o,{ref:t}))}),Qr="SelectArrow",ev=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Cn(n),a=Ge(Qr,n),s=Ue(Qr,n);return a.open&&s.position==="popper"?i.createElement(jo,R({},r,o,{ref:t})):null});function gc(e){return e===""||e===void 0}const bc=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=i.useRef(null),a=J(t,r),s=tc(n);return i.useEffect(()=>{const c=r.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(c,n),c.dispatchEvent(f)}},[s,n]),i.createElement(nc,{asChild:!0},i.createElement("select",R({},o,{ref:a,defaultValue:n})))});bc.displayName="BubbleSelect";function xc(e){const t=fe(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(s=>{const c=n.current+s;t(c),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(c)},[t]),a=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function $c(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=tv(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function tv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const nv=_m,ov=Nm,rv=Am,av=Im,sv=Om,cv=Dm,iv=Fm,lv=Wm,uv=Gm,dv=Km,fv=Ym,pv=qm,mv=Zm,vv=Qm,hv=Jm,gv=ev,bv=nv,xv=gv,wc=i.forwardRef((e,t)=>{const{placeholder:n,className:o,...r}=e;return v.jsxs(ov,{ref:t,...r,className:T(o,"fp-SelectTrigger"),children:[v.jsx(rv,{placeholder:n}),v.jsx(av,{className:"fp-SelectTriggerIcon",children:v.jsx(bs,{})})]})}),yc=i.forwardRef((e,t)=>{const{children:n,portal:o=!1,className:r,...a}=e,s=o?sv:i.Fragment;return v.jsx(s,{children:v.jsxs(cv,{ref:t,...a,className:T(r,"fp-MenuContent"),children:[v.jsx(mv,{className:"fp-SelectScrollUpButton",children:v.jsx(pf,{})}),v.jsx(iv,{children:n}),v.jsx(vv,{className:"fp-SelectScrollDownButton",children:v.jsx(bs,{})})]})})}),Cc=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(dv,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx(pv,{className:"fp-MenuItemIndicator",children:v.jsx(mn,{size:"4"})}),v.jsx(fv,{children:n})]})}),Ec=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(hv,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),Sc=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(uv,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Rc=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(lv,{ref:t,className:T(n,"fp-MenuGroup"),...o})});wc.displayName="Select.Trigger";yc.displayName="Select.Content";Cc.displayName="Select.Item";Ec.displayName="Select.Separator";Rc.displayName="Select.Group";Sc.displayName="Select.Label";const $v=Object.freeze(Object.defineProperty({__proto__:null,Arrow:xv,Content:yc,Group:Rc,Item:Cc,Label:Sc,Root:bv,Separator:Ec,Trigger:wc},Symbol.toStringTag,{value:"Module"}));function wv(e,t){return i.useReducer((n,o)=>{const r=t[n][o];return r??n},e)}const tt=e=>{const{present:t,children:n}=e,o=yv(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),a=J(o.ref,r.ref);return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:a}):null};tt.displayName="Presence";function yv(e){const[t,n]=i.useState(),o=i.useRef({}),r=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[c,l]=wv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Yt(o.current);a.current=c==="mounted"?u:"none"},[c]),pe(()=>{const u=o.current,d=r.current;if(d!==e){const h=a.current,g=Yt(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),pe(()=>{if(t){const u=f=>{const g=Yt(o.current).includes(f.animationName);f.target===t&&g&&et.flushSync(()=>l("ANIMATION_END"))},d=f=>{f.target===t&&(a.current=Yt(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Yt(e){return(e==null?void 0:e.animationName)||"none"}const zn="rovingFocusGroup.onEntryFocus",Cv={bubbles:!1,cancelable:!0},Ho="RovingFocusGroup",[oo,Pc,Ev]=Ro(Ho),[Sv,_c]=Me(Ho,[Ev]),[Rv,Pv]=Sv(Ho),_v=i.forwardRef((e,t)=>i.createElement(oo.Provider,{scope:e.__scopeRovingFocusGroup},i.createElement(oo.Slot,{scope:e.__scopeRovingFocusGroup},i.createElement(Tv,R({},e,{ref:t}))))),Tv=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,f=i.useRef(null),h=J(t,f),g=Po(a),[b=null,p]=Ve({prop:s,defaultProp:c,onChange:l}),[x,$]=i.useState(!1),w=fe(u),y=Pc(n),C=i.useRef(!1),[E,_]=i.useState(0);return i.useEffect(()=>{const S=f.current;if(S)return S.addEventListener(zn,w),()=>S.removeEventListener(zn,w)},[w]),i.createElement(Rv,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:b,onItemFocus:i.useCallback(S=>p(S),[p]),onItemShiftTab:i.useCallback(()=>$(!0),[]),onFocusableItemAdd:i.useCallback(()=>_(S=>S+1),[]),onFocusableItemRemove:i.useCallback(()=>_(S=>S-1),[])},i.createElement(q.div,R({tabIndex:x||E===0?-1:0,"data-orientation":o},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,S=>{const P=!C.current;if(S.target===S.currentTarget&&P&&!x){const I=new CustomEvent(zn,Cv);if(S.currentTarget.dispatchEvent(I),!I.defaultPrevented){const N=y().filter(O=>O.focusable),D=N.find(O=>O.active),k=N.find(O=>O.id===b),F=[D,k,...N].filter(Boolean).map(O=>O.ref.current);Tc(F)}}C.current=!1}),onBlur:A(e.onBlur,()=>$(!1))})))}),Nv="RovingFocusGroupItem",Mv=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,...s}=e,c=Pe(),l=a||c,u=Pv(Nv,n),d=u.currentTabStopId===l,f=Pc(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=u;return i.useEffect(()=>{if(o)return h(),()=>g()},[o,h,g]),i.createElement(oo.ItemSlot,{scope:n,id:l,focusable:o,active:r},i.createElement(q.span,R({tabIndex:d?0:-1,"data-orientation":u.orientation},s,{ref:t,onMouseDown:A(e.onMouseDown,b=>{o?u.onItemFocus(l):b.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:A(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=Ov(b,u.orientation,u.dir);if(p!==void 0){b.preventDefault();let $=f().filter(w=>w.focusable).map(w=>w.ref.current);if(p==="last")$.reverse();else if(p==="prev"||p==="next"){p==="prev"&&$.reverse();const w=$.indexOf(b.currentTarget);$=u.loop?Dv($,w+1):$.slice(w+1)}setTimeout(()=>Tc($))}})})))}),Av={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Iv(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ov(e,t,n){const o=Iv(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Av[o]}function Tc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Dv(e,t){return e.map((n,o)=>e[(t+o)%e.length])}const kv=_v,Lv=Mv,ro=["Enter"," "],jv=["ArrowDown","PageUp","Home"],Nc=["ArrowUp","PageDown","End"],Fv=[...jv,...Nc],Bv={ltr:[...ro,"ArrowRight"],rtl:[...ro,"ArrowLeft"]},Vv={ltr:["ArrowLeft"],rtl:["ArrowRight"]},En="Menu",[Nt,zv,Wv]=Ro(En),[nt,Sn]=Me(En,[Wv,yt,_c]),Dt=yt(),Mc=_c(),[Ac,Ke]=nt(En),[Hv,kt]=nt(En),Gv=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:s=!0}=e,c=Dt(t),[l,u]=i.useState(null),d=i.useRef(!1),f=fe(a),h=Po(r);return i.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),i.createElement(gn,c,i.createElement(Ac,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u},i.createElement(Hv,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:s},o)))},Ic=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Dt(n);return i.createElement(ko,R({},r,o,{ref:t}))}),Oc="MenuPortal",[Uv,Dc]=nt(Oc,{forceMount:void 0}),Kv=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ke(Oc,t);return i.createElement(Uv,{scope:t,forceMount:n},i.createElement(tt,{present:n||a.open},i.createElement(Fo,{asChild:!0,container:r},o)))},be="MenuContent",[Yv,Go]=nt(be),Xv=i.forwardRef((e,t)=>{const n=Dc(be,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ke(be,e.__scopeMenu),s=kt(be,e.__scopeMenu);return i.createElement(Nt.Provider,{scope:e.__scopeMenu},i.createElement(tt,{present:o||a.open},i.createElement(Nt.Slot,{scope:e.__scopeMenu},s.modal?i.createElement(qv,R({},r,{ref:t})):i.createElement(Zv,R({},r,{ref:t})))))}),qv=i.forwardRef((e,t)=>{const n=Ke(be,e.__scopeMenu),o=i.useRef(null),r=J(t,o);return i.useEffect(()=>{const a=o.current;if(a)return bn(a)},[]),i.createElement(Uo,R({},e,{ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Zv=i.forwardRef((e,t)=>{const n=Ke(be,e.__scopeMenu);return i.createElement(Uo,R({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),Uo=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:b,...p}=e,x=Ke(be,n),$=kt(be,n),w=Dt(n),y=Mc(n),C=zv(n),[E,_]=i.useState(null),S=i.useRef(null),P=J(t,S,x.onContentChange),I=i.useRef(0),N=i.useRef(""),D=i.useRef(0),k=i.useRef(null),V=i.useRef("right"),F=i.useRef(0),O=b?zo:i.Fragment,B=b?{as:ft,allowPinchZoom:!0}:void 0,j=M=>{var Z,Q;const se=N.current+M,le=C().filter(U=>!U.disabled),ue=document.activeElement,de=(Z=le.find(U=>U.ref.current===ue))===null||Z===void 0?void 0:Z.textValue,te=le.map(U=>U.textValue),L=gh(te,se,de),G=(Q=le.find(U=>U.textValue===L))===null||Q===void 0?void 0:Q.ref.current;(function U(K){N.current=K,window.clearTimeout(I.current),K!==""&&(I.current=window.setTimeout(()=>U(""),1e3))})(se),G&&setTimeout(()=>G.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),_s();const H=i.useCallback(M=>{var Z,Q;return V.current===((Z=k.current)===null||Z===void 0?void 0:Z.side)&&xh(M,(Q=k.current)===null||Q===void 0?void 0:Q.area)},[]);return i.createElement(Yv,{scope:n,searchRef:N,onItemEnter:i.useCallback(M=>{H(M)&&M.preventDefault()},[H]),onItemLeave:i.useCallback(M=>{var Z;H(M)||((Z=S.current)===null||Z===void 0||Z.focus(),_(null))},[H]),onTriggerLeave:i.useCallback(M=>{H(M)&&M.preventDefault()},[H]),pointerGraceTimerRef:D,onPointerGraceIntentChange:i.useCallback(M=>{k.current=M},[])},i.createElement(O,B,i.createElement(Ts,{asChild:!0,trapped:r,onMountAutoFocus:A(a,M=>{var Z;M.preventDefault(),(Z=S.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:s},i.createElement(_o,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g},i.createElement(kv,R({asChild:!0},y,{dir:$.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:_,onEntryFocus:A(l,M=>{$.isUsingKeyboardRef.current||M.preventDefault()})}),i.createElement(Lo,R({role:"menu","aria-orientation":"vertical","data-state":zc(x.open),"data-radix-menu-content":"",dir:$.dir},w,p,{ref:P,style:{outline:"none",...p.style},onKeyDown:A(p.onKeyDown,M=>{const Q=M.target.closest("[data-radix-menu-content]")===M.currentTarget,se=M.ctrlKey||M.altKey||M.metaKey,le=M.key.length===1;Q&&(M.key==="Tab"&&M.preventDefault(),!se&&le&&j(M.key));const ue=S.current;if(M.target!==ue||!Fv.includes(M.key))return;M.preventDefault();const te=C().filter(L=>!L.disabled).map(L=>L.ref.current);Nc.includes(M.key)&&te.reverse(),vh(te)}),onBlur:A(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(I.current),N.current="")}),onPointerMove:A(e.onPointerMove,Mt(M=>{const Z=M.target,Q=F.current!==M.clientX;if(M.currentTarget.contains(Z)&&Q){const se=M.clientX>F.current?"right":"left";V.current=se,F.current=M.clientX}}))})))))))}),kc=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"group"},o,{ref:t}))}),Qv=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({},o,{ref:t}))}),ao="MenuItem",Jr="menu.itemSelect",Ko=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=i.useRef(null),s=kt(ao,e.__scopeMenu),c=Go(ao,e.__scopeMenu),l=J(t,a),u=i.useRef(!1),d=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(Jr,{bubbles:!0,cancelable:!0});f.addEventListener(Jr,g=>o==null?void 0:o(g),{once:!0}),Rs(f,h),h.defaultPrevented?u.current=!1:s.onClose()}};return i.createElement(Lc,R({},r,{ref:l,disabled:n,onClick:A(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),u.current=!0},onPointerUp:A(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:A(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||ro.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Lc=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,s=Go(ao,n),c=Mc(n),l=i.useRef(null),u=J(t,l),[d,f]=i.useState(!1),[h,g]=i.useState("");return i.useEffect(()=>{const b=l.current;if(b){var p;g(((p=b.textContent)!==null&&p!==void 0?p:"").trim())}},[a.children]),i.createElement(Nt.ItemSlot,{scope:n,disabled:o,textValue:r??h},i.createElement(Lv,R({asChild:!0},c,{focusable:!o}),i.createElement(q.div,R({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},a,{ref:u,onPointerMove:A(e.onPointerMove,Mt(b=>{o?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:A(e.onPointerLeave,Mt(b=>s.onItemLeave(b))),onFocus:A(e.onFocus,()=>f(!0)),onBlur:A(e.onBlur,()=>f(!1))}))))}),Jv=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return i.createElement(Fc,{scope:e.__scopeMenu,checked:n},i.createElement(Ko,R({role:"menuitemcheckbox","aria-checked":sn(n)?"mixed":n},r,{ref:t,"data-state":Yo(n),onSelect:A(r.onSelect,()=>o==null?void 0:o(sn(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),eh="MenuRadioGroup",[th,nh]=nt(eh,{value:void 0,onValueChange:()=>{}}),oh=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=fe(o);return i.createElement(th,{scope:e.__scopeMenu,value:n,onValueChange:a},i.createElement(kc,R({},r,{ref:t})))}),rh="MenuRadioItem",ah=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=nh(rh,e.__scopeMenu),a=n===r.value;return i.createElement(Fc,{scope:e.__scopeMenu,checked:a},i.createElement(Ko,R({role:"menuitemradio","aria-checked":a},o,{ref:t,"data-state":Yo(a),onSelect:A(o.onSelect,()=>{var s;return(s=r.onValueChange)===null||s===void 0?void 0:s.call(r,n)},{checkForDefaultPrevented:!1})})))}),jc="MenuItemIndicator",[Fc,sh]=nt(jc,{checked:!1}),ch=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=sh(jc,n);return i.createElement(tt,{present:o||sn(a.checked)||a.checked===!0},i.createElement(q.span,R({},r,{ref:t,"data-state":Yo(a.checked)})))}),ih=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return i.createElement(q.div,R({role:"separator","aria-orientation":"horizontal"},o,{ref:t}))}),lh=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Dt(n);return i.createElement(jo,R({},r,o,{ref:t}))}),Bc="MenuSub",[uh,Vc]=nt(Bc),dh=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,a=Ke(Bc,t),s=Dt(t),[c,l]=i.useState(null),[u,d]=i.useState(null),f=fe(r);return i.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),i.createElement(gn,s,i.createElement(Ac,{scope:t,open:o,onOpenChange:f,content:u,onContentChange:d},i.createElement(uh,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:c,onTriggerChange:l},n)))},Xt="MenuSubTrigger",fh=i.forwardRef((e,t)=>{const n=Ke(Xt,e.__scopeMenu),o=kt(Xt,e.__scopeMenu),r=Vc(Xt,e.__scopeMenu),a=Go(Xt,e.__scopeMenu),s=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),i.createElement(Ic,R({asChild:!0},u),i.createElement(Lc,R({id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":zc(n.open)},e,{ref:vn(t,r.onTriggerChange),onClick:f=>{var h;(h=e.onClick)===null||h===void 0||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Mt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:A(e.onPointerLeave,Mt(f=>{var h;d();const g=(h=n.content)===null||h===void 0?void 0:h.getBoundingClientRect();if(g){var b;const p=(b=n.content)===null||b===void 0?void 0:b.dataset.side,x=p==="right",$=x?-5:5,w=g[x?"left":"right"],y=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+$,y:f.clientY},{x:w,y:g.top},{x:y,y:g.top},{x:y,y:g.bottom},{x:w,y:g.bottom}],side:p}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,f=>{const h=a.searchRef.current!=="";if(!(e.disabled||h&&f.key===" ")&&Bv[o.dir].includes(f.key)){var g;n.onOpenChange(!0),(g=n.content)===null||g===void 0||g.focus(),f.preventDefault()}})})))}),ph="MenuSubContent",mh=i.forwardRef((e,t)=>{const n=Dc(be,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ke(be,e.__scopeMenu),s=kt(be,e.__scopeMenu),c=Vc(ph,e.__scopeMenu),l=i.useRef(null),u=J(t,l);return i.createElement(Nt.Provider,{scope:e.__scopeMenu},i.createElement(tt,{present:o||a.open},i.createElement(Nt.Slot,{scope:e.__scopeMenu},i.createElement(Uo,R({id:c.contentId,"aria-labelledby":c.triggerId},r,{ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;s.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:A(e.onFocusOutside,d=>{d.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:A(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Vv[s.dir].includes(d.key);if(f&&h){var g;a.onOpenChange(!1),(g=c.trigger)===null||g===void 0||g.focus(),d.preventDefault()}})})))))});function zc(e){return e?"open":"closed"}function sn(e){return e==="indeterminate"}function Yo(e){return sn(e)?"indeterminate":e?"checked":"unchecked"}function vh(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function hh(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function gh(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=hh(e,Math.max(a,0));r.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function bh(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const c=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>o!=d>o&&n<(u-c)*(o-l)/(d-l)+c&&(r=!r)}return r}function xh(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bh(n,t)}function Mt(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Wc=Gv,Hc=Ic,Gc=Kv,Uc=Xv,Kc=kc,Yc=Qv,Xc=Ko,qc=Jv,Zc=oh,Qc=ah,Jc=ch,ei=ih,$h=lh,ti=dh,ni=fh,oi=mh,ri="DropdownMenu",[wh,Q$]=Me(ri,[Sn]),ae=Sn(),[yh,ai]=wh(ri),Ch=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=ae(t),u=i.useRef(null),[d=!1,f]=Ve({prop:r,defaultProp:a,onChange:s});return i.createElement(yh,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c},i.createElement(Wc,R({},l,{open:d,onOpenChange:f,dir:o,modal:c}),n))},Eh="DropdownMenuTrigger",Sh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=ai(Eh,n),s=ae(n);return i.createElement(Hc,R({asChild:!0},s),i.createElement(q.button,R({type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o},r,{ref:vn(t,a.triggerRef),onPointerDown:A(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:A(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})))}),Rh=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ae(t);return i.createElement(Gc,R({},o,n))},Ph="DropdownMenuContent",_h=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ai(Ph,n),a=ae(n),s=i.useRef(!1);return i.createElement(Uc,R({id:r.contentId,"aria-labelledby":r.triggerId},a,o,{ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,c=>{var l;s.current||(l=r.triggerRef.current)===null||l===void 0||l.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:A(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(s.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)"}}))}),Th=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Kc,R({},r,o,{ref:t}))}),Nh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Yc,R({},r,o,{ref:t}))}),Mh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Xc,R({},r,o,{ref:t}))}),Ah=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(qc,R({},r,o,{ref:t}))}),Ih=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Zc,R({},r,o,{ref:t}))}),Oh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Qc,R({},r,o,{ref:t}))}),Dh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(Jc,R({},r,o,{ref:t}))}),kh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(ei,R({},r,o,{ref:t}))}),Lh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement($h,R({},r,o,{ref:t}))}),jh=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:a}=e,s=ae(t),[c=!1,l]=Ve({prop:o,defaultProp:a,onChange:r});return i.createElement(ti,R({},s,{open:c,onOpenChange:l}),n)},Fh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(ni,R({},r,o,{ref:t}))}),Bh=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ae(n);return i.createElement(oi,R({},r,o,{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)"}}))}),Vh=Ch,zh=Sh,si=Rh,Wh=_h,Hh=Th,Gh=Nh,Uh=Mh,Kh=Ah,Yh=Ih,Xh=Oh,ci=Dh,qh=kh,Zh=Lh,Qh=jh,Jh=Fh,eg=Bh,tg=Vh,ng=zh,og=Qh,rg=Yh,ii=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(si,{children:v.jsxs(Wh,{ref:t,...r,className:T(o,"fp-MenuContent"),children:[n,v.jsx(Zh,{})]})})}),li=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Uh,{ref:t,...o,className:T(n,"fp-MenuItem")})}),ui=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(qh,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),di=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Gh,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),fi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Hh,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),pi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Jh,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,v.jsx(Eo,{className:"fp-MenuSubtriggerCaret"})]})}),mi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(si,{children:v.jsx(eg,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),vi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Kh,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx(ci,{className:"fp-MenuItemIndicator",children:v.jsx(mn,{size:"4"})}),n]})}),hi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Xh,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[v.jsx(ci,{className:"fp-MenuItemIndicator",children:v.jsx(xs,{size:"4"})}),n]})});ii.displayName="DropdownMenu.Content";li.displayName="DropdownMenu.Item";ui.displayName="DropdownMenu.Separator";fi.displayName="DropdownMenu.Group";di.displayName="DropdownMenu.Label";pi.displayName="DropdownMenu.SubTrigger";mi.displayName="DropdownMenu.SubContent";vi.displayName="DropdownMenu.CheckboxItem";hi.displayName="DropdownMenu.RadioItem";const ag=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:vi,Content:ii,Group:fi,Item:li,Label:di,RadioGroup:rg,RadioItem:hi,Root:tg,Separator:ui,Sub:og,SubContent:mi,SubTrigger:pi,Trigger:ng},Symbol.toStringTag,{value:"Module"})),gi="ContextMenu",[sg,J$]=Me(gi,[Sn]),ie=Sn(),[cg,bi]=sg(gi),ig=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,dir:r,modal:a=!0}=e,[s,c]=i.useState(!1),l=ie(t),u=fe(o),d=i.useCallback(f=>{c(f),u(f)},[u]);return i.createElement(cg,{scope:t,open:s,onOpenChange:d,modal:a},i.createElement(Wc,R({},l,{dir:r,open:s,onOpenChange:d,modal:a}),n))},lg="ContextMenuTrigger",ug=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:o=!1,...r}=e,a=bi(lg,n),s=ie(n),c=i.useRef({x:0,y:0}),l=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),u=i.useRef(0),d=i.useCallback(()=>window.clearTimeout(u.current),[]),f=h=>{c.current={x:h.clientX,y:h.clientY},a.onOpenChange(!0)};return i.useEffect(()=>d,[d]),i.useEffect(()=>void(o&&d()),[o,d]),i.createElement(i.Fragment,null,i.createElement(Hc,R({},s,{virtualRef:l})),i.createElement(q.span,R({"data-state":a.open?"open":"closed","data-disabled":o?"":void 0},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:o?e.onContextMenu:A(e.onContextMenu,h=>{d(),f(h),h.preventDefault()}),onPointerDown:o?e.onPointerDown:A(e.onPointerDown,qt(h=>{d(),u.current=window.setTimeout(()=>f(h),700)})),onPointerMove:o?e.onPointerMove:A(e.onPointerMove,qt(d)),onPointerCancel:o?e.onPointerCancel:A(e.onPointerCancel,qt(d)),onPointerUp:o?e.onPointerUp:A(e.onPointerUp,qt(d))})))}),dg=e=>{const{__scopeContextMenu:t,...n}=e,o=ie(t);return i.createElement(Gc,R({},o,n))},fg="ContextMenuContent",pg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=bi(fg,n),a=ie(n),s=i.useRef(!1);return i.createElement(Uc,R({},a,o,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,c),!c.defaultPrevented&&s.current&&c.preventDefault(),s.current=!1},onInteractOutside:c=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,c),!c.defaultPrevented&&!r.modal&&(s.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)"}}))}),mg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Kc,R({},r,o,{ref:t}))}),vg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Yc,R({},r,o,{ref:t}))}),hg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Xc,R({},r,o,{ref:t}))}),gg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(qc,R({},r,o,{ref:t}))}),bg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Zc,R({},r,o,{ref:t}))}),xg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Qc,R({},r,o,{ref:t}))}),$g=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(Jc,R({},r,o,{ref:t}))}),wg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(ei,R({},r,o,{ref:t}))}),yg=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:o,open:r,defaultOpen:a}=e,s=ie(t),[c,l]=Ve({prop:r,defaultProp:a,onChange:o});return i.createElement(ti,R({},s,{open:c,onOpenChange:l}),n)},Cg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(ni,R({},r,o,{ref:t}))}),Eg=i.forwardRef((e,t)=>{const{__scopeContextMenu:n,...o}=e,r=ie(n);return i.createElement(oi,R({},r,o,{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)"}}))});function qt(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const Sg=ig,Rg=ug,xi=dg,Pg=pg,_g=mg,Tg=vg,Ng=hg,Mg=gg,Ag=bg,Ig=xg,$i=$g,Og=wg,Dg=yg,kg=Cg,Lg=Eg,jg=Sg,Fg=Rg,Bg=Dg,Vg=Ag,wi=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(xi,{children:v.jsx(Pg,{ref:t,...r,className:T(o,"fp-MenuContent"),children:n})})}),yi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ng,{ref:t,...o,className:T(n,"fp-MenuItem")})}),Ci=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Og,{ref:t,className:T(n,"fp-MenuSeparator"),...o})}),Ei=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Tg,{ref:t,className:T(n,"fp-MenuLabel"),...o})}),Si=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(_g,{ref:t,className:T(n,"fp-MenuGroup"),...o})}),Ri=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(kg,{ref:t,...r,className:T(o,"fp-MenuItem"),children:[n,v.jsx(Eo,{className:"fp-MenuSubtriggerCaret"})]})}),Pi=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(xi,{children:v.jsx(Lg,{ref:t,...o,className:T(n,"fp-MenuContent"),sideOffset:12})})}),_i=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Mg,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuCheckboxItem"),children:[v.jsx($i,{className:"fp-MenuItemIndicator",children:v.jsx(mn,{size:"4"})}),n]})}),Ti=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsxs(Ig,{ref:t,...r,className:T(o,"fp-MenuItem fp-MenuRadioItem"),children:[v.jsx($i,{className:"fp-MenuItemIndicator",children:v.jsx(xs,{size:"4"})}),n]})});wi.displayName="ContextMenu.Content";yi.displayName="ContextMenu.Item";Ci.displayName="ContextMenu.Separator";Ei.displayName="ContextMenu.Label";Si.displayName="ContextMenu.Group";Ri.displayName="ContextMenu.SubTrigger";Pi.displayName="ContextMenu.SubContent";_i.displayName="ContextMenu.CheckboxItem";Ti.displayName="ContextMenu.RadioItem";const zg=Object.freeze(Object.defineProperty({__proto__:null,CheckboxItem:_i,Content:wi,Group:Si,Item:yi,Label:Ei,RadioGroup:Vg,RadioItem:Ti,Root:jg,Separator:Ci,Sub:Bg,SubContent:Pi,SubTrigger:Ri,Trigger:Fg},Symbol.toStringTag,{value:"Module"}));function Wg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Hg="DismissableLayer",so="dismissableLayer.update",Gg="dismissableLayer.pointerDownOutside",Ug="dismissableLayer.focusOutside",ea,Ni=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xo=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=m.useContext(Ni),[d,f]=m.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=m.useState({}),b=ee(t,S=>f(S)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),$=p.indexOf(x),w=d?p.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,C=w>=$,E=Xg(S=>{const P=S.target,I=[...u.branches].some(N=>N.contains(P));!C||I||(r==null||r(S),s==null||s(S),S.defaultPrevented||c==null||c())},h),_=qg(S=>{const P=S.target;[...u.branches].some(N=>N.contains(P))||(a==null||a(S),s==null||s(S),S.defaultPrevented||c==null||c())},h);return Wg(S=>{w===u.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},h),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ea=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ta(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ea)}},[d,h,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ta())},[d,u]),m.useEffect(()=>{const S=()=>g({});return document.addEventListener(so,S),()=>document.removeEventListener(so,S)},[]),v.jsx(W.div,{...l,ref:b,style:{pointerEvents:y?C?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,_.onFocusCapture),onBlurCapture:z(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,E.onPointerDownCapture)})});Xo.displayName=Hg;var Kg="DismissableLayerBranch",Yg=m.forwardRef((e,t)=>{const n=m.useContext(Ni),o=m.useRef(null),r=ee(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),v.jsx(W.div,{...e,ref:r})});Yg.displayName=Kg;function Xg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let l=function(){Mi(Gg,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function qg(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&Mi(Ug,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ta(){const e=new CustomEvent(so);document.dispatchEvent(e)}function Mi(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?fd(r,a):r.dispatchEvent(a)}var Wn=0;function Ai(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??na()),document.body.insertAdjacentElement("beforeend",e[1]??na()),Wn++,()=>{Wn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Wn--}},[])}function na(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Hn="focusScope.autoFocusOnMount",Gn="focusScope.autoFocusOnUnmount",oa={bubbles:!1,cancelable:!0},Zg="FocusScope",qo=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[c,l]=m.useState(null),u=Re(r),d=Re(a),f=m.useRef(null),h=ee(t,p=>l(p)),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let p=function(y){if(g.paused||!c)return;const C=y.target;c.contains(C)?f.current=C:ke(f.current,{select:!0})},x=function(y){if(g.paused||!c)return;const C=y.relatedTarget;C!==null&&(c.contains(C)||ke(f.current,{select:!0}))},$=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&ke(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const w=new MutationObserver($);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),w.disconnect()}}},[o,c,g.paused]),m.useEffect(()=>{if(c){aa.add(g);const p=document.activeElement;if(!c.contains(p)){const $=new CustomEvent(Hn,oa);c.addEventListener(Hn,u),c.dispatchEvent($),$.defaultPrevented||(Qg(ob(Ii(c)),{select:!0}),document.activeElement===p&&ke(c))}return()=>{c.removeEventListener(Hn,u),setTimeout(()=>{const $=new CustomEvent(Gn,oa);c.addEventListener(Gn,d),c.dispatchEvent($),$.defaultPrevented||ke(p??document.body,{select:!0}),c.removeEventListener(Gn,d),aa.remove(g)},0)}}},[c,u,d,g]);const b=m.useCallback(p=>{if(!n&&!o||g.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,$=document.activeElement;if(x&&$){const w=p.currentTarget,[y,C]=Jg(w);y&&C?!p.shiftKey&&$===C?(p.preventDefault(),n&&ke(y,{select:!0})):p.shiftKey&&$===y&&(p.preventDefault(),n&&ke(C,{select:!0})):$===w&&p.preventDefault()}},[n,o,g.paused]);return v.jsx(W.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});qo.displayName=Zg;function Qg(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ke(o,{select:t}),document.activeElement!==n)return}function Jg(e){const t=Ii(e),n=ra(t,e),o=ra(t.reverse(),e);return[n,o]}function Ii(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ra(e,t){for(const n of e)if(!eb(n,{upTo:t}))return n}function eb(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 tb(e){return e instanceof HTMLInputElement&&"select"in e}function ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tb(e)&&t&&e.select()}}var aa=nb();function nb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sa(e,t),e.unshift(t)},remove(t){var n;e=sa(e,t),(n=e[0])==null||n.resume()}}}function sa(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ob(e){return e.filter(t=>t.tagName!=="A")}var rb="Arrow",Oi=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return v.jsx(W.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oi.displayName=rb;var ab=Oi,Zo="Popper",[Di,ki]=he(Zo),[sb,Li]=Di(Zo),ji=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return v.jsx(sb,{scope:t,anchor:o,onAnchorChange:r,children:n})};ji.displayName=Zo;var Fi="PopperAnchor",Bi=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Li(Fi,n),s=m.useRef(null),c=ee(t,s);return m.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:v.jsx(W.div,{...r,ref:c})});Bi.displayName=Fi;var Qo="PopperContent",[cb,ib]=Di(Qo),Vi=m.forwardRef((e,t)=>{var L,G,U,K,Y,X;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,x=Li(Qo,n),[$,w]=m.useState(null),y=ee(t,ne=>w(ne)),[C,E]=m.useState(null),_=$o(C),S=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,I=o+(a!=="center"?"-"+a:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],k=D.length>0,V={padding:N,boundary:D.filter(ub),altBoundary:k},{refs:F,floatingStyles:O,placement:B,isPositioned:j,middlewareData:H}=Vs({strategy:"fixed",placement:I,whileElementsMounted:(...ne)=>Fs(...ne,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[zs({mainAxis:r+P,alignmentAxis:s}),l&&Ws({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Hs():void 0,...V}),l&&Gs({...V}),Us({...V,apply:({elements:ne,rects:oe,availableWidth:ge,availableHeight:Oe})=>{const{width:Xe,height:An}=oe.reference,ot=ne.floating.style;ot.setProperty("--radix-popper-available-width",`${ge}px`),ot.setProperty("--radix-popper-available-height",`${Oe}px`),ot.setProperty("--radix-popper-anchor-width",`${Xe}px`),ot.setProperty("--radix-popper-anchor-height",`${An}px`)}}),C&&Ys({element:C,padding:c}),db({arrowWidth:S,arrowHeight:P}),h&&Ks({strategy:"referenceHidden",...V})]}),[M,Z]=Hi(B),Q=Re(b);je(()=>{j&&(Q==null||Q())},[j,Q]);const se=(L=H.arrow)==null?void 0:L.x,le=(G=H.arrow)==null?void 0:G.y,ue=((U=H.arrow)==null?void 0:U.centerOffset)!==0,[de,te]=m.useState();return je(()=>{$&&te(window.getComputedStyle($).zIndex)},[$]),v.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:j?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(K=H.transformOrigin)==null?void 0:K.x,(Y=H.transformOrigin)==null?void 0:Y.y].join(" "),...((X=H.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(cb,{scope:n,placedSide:M,onArrowChange:E,arrowX:se,arrowY:le,shouldHideArrow:ue,children:v.jsx(W.div,{"data-side":M,"data-align":Z,...p,ref:y,style:{...p.style,animation:j?void 0:"none"}})})})});Vi.displayName=Qo;var zi="PopperArrow",lb={top:"bottom",right:"left",bottom:"top",left:"right"},Wi=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=ib(zi,o),s=lb[a.placedSide];return v.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:v.jsx(ab,{...r,ref:n,style:{...r.style,display:"block"}})})});Wi.displayName=zi;function ub(e){return e!==null}var db=e=>({name:"transformOrigin",options:e,fn(t){var x,$,w;const{placement:n,rects:o,middlewareData:r}=t,s=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,d]=Hi(n),f={start:"0%",center:"50%",end:"100%"}[d],h=((($=r.arrow)==null?void 0:$.x)??0)+c/2,g=(((w=r.arrow)==null?void 0:w.y)??0)+l/2;let b="",p="";return u==="bottom"?(b=s?f:`${h}px`,p=`${-l}px`):u==="top"?(b=s?f:`${h}px`,p=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,p=s?f:`${g}px`):u==="left"&&(b=`${o.floating.width+l}px`,p=s?f:`${g}px`),{data:{x:b,y:p}}}});function Hi(e){const[t,n="center"]=e.split("-");return[t,n]}var fb=ji,Gi=Bi,pb=Vi,mb=Wi,vb="Portal",Jo=m.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,a]=m.useState(!1);je(()=>a(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?et.createPortal(v.jsx(W.div,{...o,ref:t}),s):null});Jo.displayName=vb;var Ui=sc(),Un=function(){},Rn=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:Un,onWheelCapture:Un,onTouchMoveCapture:Un}),r=o[0],a=o[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,x=e.as,$=x===void 0?"div":x,w=e.gapMode,y=Bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,E=ac([n,t]),_=re(re({},y),r);return m.createElement(m.Fragment,null,d&&m.createElement(C,{sideCar:Ui,removeScrollBar:u,shards:f,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:n,gapMode:w}),s?m.cloneElement(m.Children.only(c),re(re({},_),{ref:E})):m.createElement($,re({},_,{className:l,ref:E}),c))});Rn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rn.classNames={fullWidth:Rt,zeroRight:St};var co=!1;if(typeof window<"u")try{var Zt=Object.defineProperty({},"passive",{get:function(){return co=!0,!0}});window.addEventListener("test",Zt,Zt),window.removeEventListener("test",Zt,Zt)}catch{co=!1}var ct=co?{passive:!1}:!1,hb=function(e){return e.tagName==="TEXTAREA"},Ki=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hb(e)&&n[t]==="visible")},gb=function(e){return Ki(e,"overflowY")},bb=function(e){return Ki(e,"overflowX")},ca=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Yi(e,o);if(r){var a=Xi(e,o),s=a[1],c=a[2];if(s>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},xb=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},$b=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Yi=function(e,t){return e==="v"?gb(t):bb(t)},Xi=function(e,t){return e==="v"?xb(t):$b(t)},wb=function(e,t){return e==="h"&&t==="rtl"?-1:1},yb=function(e,t,n,o,r){var a=wb(e,window.getComputedStyle(t).direction),s=a*o,c=n.target,l=t.contains(c),u=!1,d=s>0,f=0,h=0;do{var g=Xi(e,c),b=g[0],p=g[1],x=g[2],$=p-x-a*b;(b||$)&&Yi(e,c)&&(f+=$,h+=b),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&(Math.abs(f)<1||!r)||!d&&(Math.abs(h)<1||!r))&&(u=!0),u},Qt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ia=function(e){return[e.deltaX,e.deltaY]},la=function(e){return e&&"current"in e?e.current:e},Cb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Eb=function(e){return`
52
52
  .block-interactivity-`.concat(e,` {pointer-events: none;}
53
53
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
54
- `)},Zg=0,it=[];function Qg(e){var t=m.useRef([]),n=m.useRef([0,0]),o=m.useRef(),r=m.useState(Zg++)[0],a=m.useState(Bo)[0],c=m.useRef(e);m.useEffect(function(){c.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Dc([e.lockRef.current],(e.shards||[]).map(oa),!0).filter(Boolean);return p.forEach(function($){return $.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function($){return $.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(p,$){if("touches"in p&&p.touches.length===2)return!c.current.allowPinchZoom;var x=Qt(p),w=n.current,C="deltaX"in p?p.deltaX:w[0]-x[0],y="deltaY"in p?p.deltaY:w[1]-x[1],E,_=p.target,S=Math.abs(C)>Math.abs(y)?"h":"v";if("touches"in p&&S==="h"&&_.type==="range")return!1;var P=ta(S,_);if(!P)return!0;if(P?E=S:(E=S==="v"?"h":"v",P=ta(S,_)),!P)return!1;if(!o.current&&"changedTouches"in p&&(C||y)&&(o.current=E),!E)return!0;var O=o.current||E;return Yg(O,$,p,O==="h"?C:y,!0)},[]),l=m.useCallback(function(p){var $=p;if(!(!it.length||it[it.length-1]!==a)){var x="deltaY"in $?na($):Qt($),w=t.current.filter(function(E){return E.name===$.type&&(E.target===$.target||$.target===E.shadowParent)&&Xg(E.delta,x)})[0];if(w&&w.should){$.cancelable&&$.preventDefault();return}if(!w){var C=(c.current.shards||[]).map(oa).filter(Boolean).filter(function(E){return E.contains($.target)}),y=C.length>0?s($,C[0]):!c.current.noIsolation;y&&$.cancelable&&$.preventDefault()}}},[]),u=m.useCallback(function(p,$,x,w){var C={name:p,delta:$,target:x,should:w,shadowParent:Jg(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(y){return y!==C})},1)},[]),d=m.useCallback(function(p){n.current=Qt(p),o.current=void 0},[]),f=m.useCallback(function(p){u(p.type,na(p),p.target,s(p,e.lockRef.current))},[]),h=m.useCallback(function(p){u(p.type,Qt(p),p.target,s(p,e.lockRef.current))},[]);m.useEffect(function(){return it.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,st),document.addEventListener("touchmove",l,st),document.addEventListener("touchstart",d,st),function(){it=it.filter(function(p){return p!==a}),document.removeEventListener("wheel",l,st),document.removeEventListener("touchmove",l,st),document.removeEventListener("touchstart",d,st)}},[]);var g=e.removeScrollBar,b=e.inert;return m.createElement(m.Fragment,null,b?m.createElement(a,{styles:qg(r)}):null,g?m.createElement(Vc,{gapMode:e.gapMode}):null)}function Jg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eb=Fc(Js,Qg);var Jo=m.forwardRef(function(e,t){return m.createElement(Sn,re({},e,{ref:t,sideCar:eb}))});Jo.classNames=Sn.classNames;var er="Popover",[oi,ew]=he(er,[Ws]),jt=Ws(),[tb,Ke]=oi(er),ri=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:c=!1}=e,s=jt(t),l=m.useRef(null),[u,d]=m.useState(!1),[f=!1,h]=Ee({prop:o,defaultProp:r,onChange:a});return v.jsx(Lg,{...s,children:v.jsx(tb,{scope:t,contentId:qe(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:m.useCallback(()=>d(!0),[]),onCustomAnchorRemove:m.useCallback(()=>d(!1),[]),modal:c,children:n})})};ri.displayName=er;var ai="PopoverAnchor",ci=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ke(ai,n),a=jt(n),{onCustomAnchorAdd:c,onCustomAnchorRemove:s}=r;return m.useEffect(()=>(c(),()=>s()),[c,s]),v.jsx(Qs,{...a,...o,ref:t})});ci.displayName=ai;var si="PopoverTrigger",ii=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ke(si,n),a=jt(n),c=ee(t,r.triggerRef),s=v.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":mi(r.open),...o,ref:c,onClick:z(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?s:v.jsx(Qs,{asChild:!0,...a,children:s})});ii.displayName=si;var tr="PopoverPortal",[nb,ob]=oi(tr,{forceMount:void 0}),li=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ke(tr,t);return v.jsx(nb,{scope:t,forceMount:n,children:v.jsx(Ae,{present:n||a.open,children:v.jsx(Qo,{asChild:!0,container:r,children:o})})})};li.displayName=tr;var vt="PopoverContent",ui=m.forwardRef((e,t)=>{const n=ob(vt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ke(vt,e.__scopePopover);return v.jsx(Ae,{present:o||a.open,children:a.modal?v.jsx(rb,{...r,ref:t}):v.jsx(ab,{...r,ref:t})})});ui.displayName=vt;var rb=m.forwardRef((e,t)=>{const n=Ke(vt,e.__scopePopover),o=m.useRef(null),r=ee(t,o),a=m.useRef(!1);return m.useEffect(()=>{const c=o.current;if(c)return gn(c)},[]),v.jsx(Jo,{as:je,allowPinchZoom:!0,children:v.jsx(di,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,c=>{var s;c.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,c=>{const s=c.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ab=m.forwardRef((e,t)=>{const n=Ke(vt,e.__scopePopover),o=m.useRef(!1),r=m.useRef(!1);return v.jsx(di,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,s;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(o.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),di=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ke(vt,n),g=jt(n);return Fs(),v.jsx(Xo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:v.jsx(Yo,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:v.jsx(Fg,{"data-state":mi(h.open),role:"dialog",id:h.contentId,...g,...f,ref:t,style:{...f.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)"}})})})}),fi="PopoverClose",pi=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ke(fi,n);return v.jsx(W.button,{type:"button",...o,ref:t,onClick:z(e.onClick,()=>r.onOpenChange(!1))})});pi.displayName=fi;var cb="PopoverArrow",sb=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=jt(n);return v.jsx(Bg,{...r,...o,ref:t})});sb.displayName=cb;function mi(e){return e?"open":"closed"}var ib=ri,lb=ci,ub=ii,db=li,fb=ui,pb=pi;const[Rn,mb]=Ne("Tooltip",[Ct]),Pn=Ct(),vb="TooltipProvider",hb=700,co="tooltip.open",[gb,nr]=Rn(vb),vi=e=>{const{__scopeTooltip:t,delayDuration:n=hb,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,[c,s]=i.useState(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),i.createElement(gb,{scope:t,isOpenDelayed:c,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(d=>{l.current=d},[]),disableHoverableContent:r},a)},or="Tooltip",[bb,Lt]=Rn(or),hi=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:c,delayDuration:s}=e,l=nr(or,e.__scopeTooltip),u=Pn(t),[d,f]=i.useState(null),h=Pe(),g=i.useRef(0),b=c??l.disableHoverableContent,p=s??l.delayDuration,$=i.useRef(!1),[x=!1,w]=Ve({prop:o,defaultProp:r,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(co))):l.onClose(),a==null||a(S)}}),C=i.useMemo(()=>x?$.current?"delayed-open":"instant-open":"closed",[x]),y=i.useCallback(()=>{window.clearTimeout(g.current),$.current=!1,w(!0)},[w]),E=i.useCallback(()=>{window.clearTimeout(g.current),w(!1)},[w]),_=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{$.current=!0,w(!0)},p)},[p,w]);return i.useEffect(()=>()=>window.clearTimeout(g.current),[]),i.createElement(hn,u,i.createElement(bb,{scope:t,contentId:h,open:x,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?_():y()},[l.isOpenDelayed,_,y]),onTriggerLeave:i.useCallback(()=>{b?E():window.clearTimeout(g.current)},[E,b]),onOpen:y,onClose:E,disableHoverableContent:b},n))},ra="TooltipTrigger",gi=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Lt(ra,n),a=nr(ra,n),c=Pn(n),s=i.useRef(null),l=J(t,s,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),i.createElement(Do,R({asChild:!0},c),i.createElement(q.button,R({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},o,{ref:l,onPointerMove:M(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:M(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:M(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:M(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:M(e.onBlur,r.onClose),onClick:M(e.onClick,r.onClose)})))}),bi="TooltipPortal",[$b,xb]=Rn(bi,{forceMount:void 0}),$i=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=Lt(bi,t);return i.createElement($b,{scope:t,forceMount:n},i.createElement(tt,{present:n||a.open},i.createElement(Lo,{asChild:!0,container:r},o)))},Mt="TooltipContent",xi=i.forwardRef((e,t)=>{const n=xb(Mt,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,c=Lt(Mt,e.__scopeTooltip);return i.createElement(tt,{present:o||c.open},c.disableHoverableContent?i.createElement(wi,R({side:r},a,{ref:t})):i.createElement(wb,R({side:r},a,{ref:t})))}),wb=i.forwardRef((e,t)=>{const n=Lt(Mt,e.__scopeTooltip),o=nr(Mt,e.__scopeTooltip),r=i.useRef(null),a=J(t,r),[c,s]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{s(null),f(!1)},[f]),g=i.useCallback((b,p)=>{const $=b.currentTarget,x={x:b.clientX,y:b.clientY},w=Sb(x,$.getBoundingClientRect()),C=Rb(x,w),y=Pb(p.getBoundingClientRect()),E=Tb([...C,...y]);s(E),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const b=$=>g($,d),p=$=>g($,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",p)}}},[l,d,g,h]),i.useEffect(()=>{if(c){const b=p=>{const $=p.target,x={x:p.clientX,y:p.clientY},w=(l==null?void 0:l.contains($))||(d==null?void 0:d.contains($)),C=!_b(x,c);w?h():C&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,c,u,h]),i.createElement(wi,R({},e,{ref:a}))}),[Cb,yb]=Rn(or,{isInside:!1}),wi=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:c,...s}=e,l=Lt(Mt,n),u=Pn(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(co,d),()=>document.removeEventListener(co,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),i.createElement(Po,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:d},i.createElement(ko,R({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),i.createElement(nc,null,o),i.createElement(Cb,{scope:n,isInside:!0},i.createElement(Hf,{id:l.contentId,role:"tooltip"},r||o))))}),Eb="TooltipArrow",Ci=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Pn(n);return yb(Eb,n).isInside?null:i.createElement(jo,R({},r,o,{ref:t}))});function Sb(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Rb(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Pb(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function _b(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,c=t.length-1;a<t.length;c=a++){const s=t[a].x,l=t[a].y,u=t[c].x,d=t[c].y;l>o!=d>o&&n<(u-s)*(o-l)/(d-l)+s&&(r=!r)}return r}function Tb(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Ab(t)}function Ab(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],c=t[t.length-2];if((a.x-c.x)*(r.y-c.y)>=(a.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],c=n[n.length-2];if((a.x-c.x)*(r.y-c.y)>=(a.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const Nb=vi,yi=hi,Ei=gi,Si=$i,Ri=xi,Pi=Ci,Mb=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Pi,Content:Ri,Portal:Si,Provider:Nb,Root:yi,Tooltip:hi,TooltipArrow:Ci,TooltipContent:xi,TooltipPortal:$i,TooltipProvider:vi,TooltipTrigger:gi,Trigger:Ei,createTooltipScope:mb},Symbol.toStringTag,{value:"Module"})),{TooltipProvider:Ob}=Mb,Ib=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Ri,{ref:t,className:T(n,"fp-tooltip"),...o})}),Db=e=>{const{className:t,...n}=e;return v.jsx(Pi,{className:T(t,"fp-tooltip-arrow"),...n})},_i=i.forwardRef((e,t)=>{const{defaultOpen:n,open:o,onOpenChange:r,delayDuration:a,disableHoverableContent:c,container:s,forceMount:l,children:u,content:d,...f}=e,h={open:o,defaultOpen:n,onOpenChange:r,delayDuration:a,disableHoverableContent:c};return v.jsxs(yi,{...h,children:[v.jsx(Ei,{asChild:!0,children:u}),v.jsx(Si,{forceMount:l,container:s,children:v.jsxs(Ib,{ref:t,...f,children:[d,v.jsx(Db,{})]})})]})}),kb=ze("fp-IconButton",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium"},activeAppearance:{subtle:"fp-active-appearance-subtle",solid:"fp-active-appearance-solid"}},defaultVariants:{size:"small",activeAppearance:"subtle"}}),rr=i.forwardRef((e,t)=>{const{className:n,size:o,activeAppearance:r,"aria-label":a,tooltipContent:c,disableTooltip:s,...l}=e,u=v.jsx("button",{ref:t,className:kb({className:n,size:o,activeAppearance:r}),"aria-label":a,...l});return s?u:v.jsx(_i,{content:c??a,children:u})}),Ti=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx("header",{ref:t,className:T(o,"fp-DialogBaseHeader"),...r,children:n})}),Ai=i.forwardRef((e,t)=>{const{className:n,size:o,...r}=e;return v.jsx("div",{ref:t,className:jb({className:n,size:o}),...r})}),Ni=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx("div",{ref:t,className:T(n,"fp-DialogBaseControls"),...o})}),jb=ze("fp-DialogBaseSection",{variants:{size:{base:"fp-DialogBaseSection-base",small:"fp-DialogBaseSection-small"}},defaultVariants:{size:"base"}}),Lb=ib,Fb=lb,Bb=db,Vb=i.forwardRef((e,t)=>v.jsx(ub,{ref:t,...e,asChild:!0})),zb=i.forwardRef((e,t)=>{const{className:n,style:o,width:r,height:a,maxWidth:c,maxHeight:s,...l}=e;return v.jsx(fb,{ref:t,className:T(n,"fp-DialogBaseContent"),style:{...o,width:r,height:a,maxWidth:c,maxHeight:s},...l})}),Wb=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(et,{ref:t,className:T(n,"fp-DialogBaseTitle"),weight:"strong",...o})}),Hb=i.forwardRef((e,t)=>{const{children:n,...o}=e;return v.jsx(pb,{ref:t,asChild:!0,...o,children:n||v.jsx(rr,{"aria-label":"Close",disableTooltip:!0,children:v.jsx(Ja,{})})})}),Gb=Object.freeze(Object.defineProperty({__proto__:null,Anchor:Fb,Close:Hb,Content:zb,Controls:Ni,Header:Ti,Portal:Bb,Root:Lb,Section:Ai,Title:Wb,Trigger:Vb},Symbol.toStringTag,{value:"Module"}));var ar="Dialog",[Mi,Oi]=he(ar),[Ub,xe]=Mi(ar),Ii=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:c=!0}=e,s=m.useRef(null),l=m.useRef(null),[u=!1,d]=Ee({prop:o,defaultProp:r,onChange:a});return v.jsx(Ub,{scope:t,triggerRef:s,contentRef:l,contentId:qe(),titleId:qe(),descriptionId:qe(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(f=>!f),[d]),modal:c,children:n})};Ii.displayName=ar;var Di="DialogTrigger",ki=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=xe(Di,n),a=ee(t,r.triggerRef);return v.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ir(r.open),...o,ref:a,onClick:z(e.onClick,r.onOpenToggle)})});ki.displayName=Di;var cr="DialogPortal",[Kb,ji]=Mi(cr,{forceMount:void 0}),Li=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=xe(cr,t);return v.jsx(Kb,{scope:t,forceMount:n,children:m.Children.map(o,c=>v.jsx(Ae,{present:n||a.open,children:v.jsx(Qo,{asChild:!0,container:r,children:c})}))})};Li.displayName=cr;var sn="DialogOverlay",Fi=m.forwardRef((e,t)=>{const n=ji(sn,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=xe(sn,e.__scopeDialog);return a.modal?v.jsx(Ae,{present:o||a.open,children:v.jsx(Yb,{...r,ref:t})}):null});Fi.displayName=sn;var Yb=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=xe(sn,n);return v.jsx(Jo,{as:je,allowPinchZoom:!0,shards:[r.contentRef],children:v.jsx(W.div,{"data-state":ir(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Qe="DialogContent",Bi=m.forwardRef((e,t)=>{const n=ji(Qe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=xe(Qe,e.__scopeDialog);return v.jsx(Ae,{present:o||a.open,children:a.modal?v.jsx(Xb,{...r,ref:t}):v.jsx(qb,{...r,ref:t})})});Bi.displayName=Qe;var Xb=m.forwardRef((e,t)=>{const n=xe(Qe,e.__scopeDialog),o=m.useRef(null),r=ee(t,n.contentRef,o);return m.useEffect(()=>{const a=o.current;if(a)return gn(a)},[]),v.jsx(Vi,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&a.preventDefault()}),onFocusOutside:z(e.onFocusOutside,a=>a.preventDefault())})}),qb=m.forwardRef((e,t)=>{const n=xe(Qe,e.__scopeDialog),o=m.useRef(!1),r=m.useRef(!1);return v.jsx(Vi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,s;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(o.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Vi=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...c}=e,s=xe(Qe,n),l=m.useRef(null),u=ee(t,l);return Fs(),v.jsxs(v.Fragment,{children:[v.jsx(Xo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:v.jsx(Yo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ir(s.open),...c,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(Qb,{titleId:s.titleId}),v.jsx(e0,{contentRef:l,descriptionId:s.descriptionId})]})]})}),sr="DialogTitle",zi=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=xe(sr,n);return v.jsx(W.h2,{id:r.titleId,...o,ref:t})});zi.displayName=sr;var Wi="DialogDescription",Hi=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=xe(Wi,n);return v.jsx(W.p,{id:r.descriptionId,...o,ref:t})});Hi.displayName=Wi;var Gi="DialogClose",Ui=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=xe(Gi,n);return v.jsx(W.button,{type:"button",...o,ref:t,onClick:z(e.onClick,()=>r.onOpenChange(!1))})});Ui.displayName=Gi;function ir(e){return e?"open":"closed"}var Ki="DialogTitleWarning",[Zb,Yi]=zl(Ki,{contentName:Qe,titleName:sr,docsSlug:"dialog"}),Qb=({titleId:e})=>{const t=Yi(Ki),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
54
+ `)},Sb=0,it=[];function Rb(e){var t=m.useRef([]),n=m.useRef([0,0]),o=m.useRef(),r=m.useState(Sb++)[0],a=m.useState(Vo)[0],s=m.useRef(e);m.useEffect(function(){s.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=rc([e.lockRef.current],(e.shards||[]).map(la),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=m.useCallback(function(p,x){if("touches"in p&&p.touches.length===2)return!s.current.allowPinchZoom;var $=Qt(p),w=n.current,y="deltaX"in p?p.deltaX:w[0]-$[0],C="deltaY"in p?p.deltaY:w[1]-$[1],E,_=p.target,S=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in p&&S==="h"&&_.type==="range")return!1;var P=ca(S,_);if(!P)return!0;if(P?E=S:(E=S==="v"?"h":"v",P=ca(S,_)),!P)return!1;if(!o.current&&"changedTouches"in p&&(y||C)&&(o.current=E),!E)return!0;var I=o.current||E;return yb(I,x,p,I==="h"?y:C,!0)},[]),l=m.useCallback(function(p){var x=p;if(!(!it.length||it[it.length-1]!==a)){var $="deltaY"in x?ia(x):Qt(x),w=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&Cb(E.delta,$)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var y=(s.current.shards||[]).map(la).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=y.length>0?c(x,y[0]):!s.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),u=m.useCallback(function(p,x,$,w){var y={name:p,delta:x,target:$,should:w,shadowParent:Pb($)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),d=m.useCallback(function(p){n.current=Qt(p),o.current=void 0},[]),f=m.useCallback(function(p){u(p.type,ia(p),p.target,c(p,e.lockRef.current))},[]),h=m.useCallback(function(p){u(p.type,Qt(p),p.target,c(p,e.lockRef.current))},[]);m.useEffect(function(){return it.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ct),document.addEventListener("touchmove",l,ct),document.addEventListener("touchstart",d,ct),function(){it=it.filter(function(p){return p!==a}),document.removeEventListener("wheel",l,ct),document.removeEventListener("touchmove",l,ct),document.removeEventListener("touchstart",d,ct)}},[]);var g=e.removeScrollBar,b=e.inert;return m.createElement(m.Fragment,null,b?m.createElement(a,{styles:Eb(r)}):null,g?m.createElement(uc,{gapMode:e.gapMode}):null)}function Pb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _b=ic(Ui,Rb);var er=m.forwardRef(function(e,t){return m.createElement(Rn,re({},e,{ref:t,sideCar:_b}))});er.classNames=Rn.classNames;var tr="Popover",[qi,ew]=he(tr,[ki]),Lt=ki(),[Tb,Ye]=qi(tr),Zi=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:s=!1}=e,c=Lt(t),l=m.useRef(null),[u,d]=m.useState(!1),[f=!1,h]=Ee({prop:o,defaultProp:r,onChange:a});return v.jsx(fb,{...c,children:v.jsx(Tb,{scope:t,contentId:Ze(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:m.useCallback(()=>d(!0),[]),onCustomAnchorRemove:m.useCallback(()=>d(!1),[]),modal:s,children:n})})};Zi.displayName=tr;var Qi="PopoverAnchor",Ji=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ye(Qi,n),a=Lt(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=r;return m.useEffect(()=>(s(),()=>c()),[s,c]),v.jsx(Gi,{...a,...o,ref:t})});Ji.displayName=Qi;var el="PopoverTrigger",tl=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ye(el,n),a=Lt(n),s=ee(t,r.triggerRef),c=v.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":cl(r.open),...o,ref:s,onClick:z(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:v.jsx(Gi,{asChild:!0,...a,children:c})});tl.displayName=el;var nr="PopoverPortal",[Nb,Mb]=qi(nr,{forceMount:void 0}),nl=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ye(nr,t);return v.jsx(Nb,{scope:t,forceMount:n,children:v.jsx(Ne,{present:n||a.open,children:v.jsx(Jo,{asChild:!0,container:r,children:o})})})};nl.displayName=nr;var vt="PopoverContent",ol=m.forwardRef((e,t)=>{const n=Mb(vt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ye(vt,e.__scopePopover);return v.jsx(Ne,{present:o||a.open,children:a.modal?v.jsx(Ab,{...r,ref:t}):v.jsx(Ib,{...r,ref:t})})});ol.displayName=vt;var Ab=m.forwardRef((e,t)=>{const n=Ye(vt,e.__scopePopover),o=m.useRef(null),r=ee(t,o),a=m.useRef(!1);return m.useEffect(()=>{const s=o.current;if(s)return bn(s)},[]),v.jsx(er,{as:Le,allowPinchZoom:!0,children:v.jsx(rl,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),a.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Ib=m.forwardRef((e,t)=>{const n=Ye(vt,e.__scopePopover),o=m.useRef(!1),r=m.useRef(!1);return v.jsx(rl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),rl=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Ye(vt,n),g=Lt(n);return Ai(),v.jsx(qo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:v.jsx(Xo,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:v.jsx(pb,{"data-state":cl(h.open),role:"dialog",id:h.contentId,...g,...f,ref:t,style:{...f.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)"}})})})}),al="PopoverClose",sl=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ye(al,n);return v.jsx(W.button,{type:"button",...o,ref:t,onClick:z(e.onClick,()=>r.onOpenChange(!1))})});sl.displayName=al;var Ob="PopoverArrow",Db=m.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Lt(n);return v.jsx(mb,{...r,...o,ref:t})});Db.displayName=Ob;function cl(e){return e?"open":"closed"}var kb=Zi,Lb=Ji,jb=tl,Fb=nl,Bb=ol,Vb=sl;const[Pn,zb]=Me("Tooltip",[yt]),_n=yt(),Wb="TooltipProvider",Hb=700,io="tooltip.open",[Gb,or]=Pn(Wb),il=e=>{const{__scopeTooltip:t,delayDuration:n=Hb,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,[s,c]=i.useState(!0),l=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),i.createElement(Gb,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),c(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:i.useCallback(d=>{l.current=d},[]),disableHoverableContent:r},a)},rr="Tooltip",[Ub,jt]=Pn(rr),ll=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=or(rr,e.__scopeTooltip),u=_n(t),[d,f]=i.useState(null),h=Pe(),g=i.useRef(0),b=s??l.disableHoverableContent,p=c??l.delayDuration,x=i.useRef(!1),[$=!1,w]=Ve({prop:o,defaultProp:r,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(io))):l.onClose(),a==null||a(S)}}),y=i.useMemo(()=>$?x.current?"delayed-open":"instant-open":"closed",[$]),C=i.useCallback(()=>{window.clearTimeout(g.current),x.current=!1,w(!0)},[w]),E=i.useCallback(()=>{window.clearTimeout(g.current),w(!1)},[w]),_=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,w(!0)},p)},[p,w]);return i.useEffect(()=>()=>window.clearTimeout(g.current),[]),i.createElement(gn,u,i.createElement(Ub,{scope:t,contentId:h,open:$,stateAttribute:y,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayed?_():C()},[l.isOpenDelayed,_,C]),onTriggerLeave:i.useCallback(()=>{b?E():window.clearTimeout(g.current)},[E,b]),onOpen:C,onClose:E,disableHoverableContent:b},n))},ua="TooltipTrigger",ul=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=jt(ua,n),a=or(ua,n),s=_n(n),c=i.useRef(null),l=J(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),i.createElement(ko,R({asChild:!0},s),i.createElement(q.button,R({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},o,{ref:l,onPointerMove:A(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:A(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:A(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:A(e.onBlur,r.onClose),onClick:A(e.onClick,r.onClose)})))}),dl="TooltipPortal",[Kb,Yb]=Pn(dl,{forceMount:void 0}),fl=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=jt(dl,t);return i.createElement(Kb,{scope:t,forceMount:n},i.createElement(tt,{present:n||a.open},i.createElement(Fo,{asChild:!0,container:r},o)))},At="TooltipContent",pl=i.forwardRef((e,t)=>{const n=Yb(At,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,s=jt(At,e.__scopeTooltip);return i.createElement(tt,{present:o||s.open},s.disableHoverableContent?i.createElement(ml,R({side:r},a,{ref:t})):i.createElement(Xb,R({side:r},a,{ref:t})))}),Xb=i.forwardRef((e,t)=>{const n=jt(At,e.__scopeTooltip),o=or(At,e.__scopeTooltip),r=i.useRef(null),a=J(t,r),[s,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),g=i.useCallback((b,p)=>{const x=b.currentTarget,$={x:b.clientX,y:b.clientY},w=Jb($,x.getBoundingClientRect()),y=e0($,w),C=t0(p.getBoundingClientRect()),E=o0([...y,...C]);c(E),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const b=x=>g(x,d),p=x=>g(x,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",p)}}},[l,d,g,h]),i.useEffect(()=>{if(s){const b=p=>{const x=p.target,$={x:p.clientX,y:p.clientY},w=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),y=!n0($,s);w?h():y&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,s,u,h]),i.createElement(ml,R({},e,{ref:a}))}),[qb,Zb]=Pn(rr,{isInside:!1}),ml=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:s,...c}=e,l=jt(At,n),u=_n(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(io,d),()=>document.removeEventListener(io,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{const g=h.target;g!=null&&g.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),i.createElement(_o,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d},i.createElement(Lo,R({"data-state":l.stateAttribute},u,c,{ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),i.createElement(Ss,null,o),i.createElement(qb,{scope:n,isInside:!0},i.createElement(zp,{id:l.contentId,role:"tooltip"},r||o))))}),Qb="TooltipArrow",vl=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=_n(n);return Zb(Qb,n).isInside?null:i.createElement(jo,R({},r,o,{ref:t}))});function Jb(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function e0(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function t0(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function n0(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const c=t[a].x,l=t[a].y,u=t[s].x,d=t[s].y;l>o!=d>o&&n<(u-c)*(o-l)/(d-l)+c&&(r=!r)}return r}function o0(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),r0(t)}function r0(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(r.y-s.y)>=(a.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const a0=il,hl=ll,gl=ul,bl=fl,xl=pl,$l=vl,s0=Object.freeze(Object.defineProperty({__proto__:null,Arrow:$l,Content:xl,Portal:bl,Provider:a0,Root:hl,Tooltip:ll,TooltipArrow:vl,TooltipContent:pl,TooltipPortal:fl,TooltipProvider:il,TooltipTrigger:ul,Trigger:gl,createTooltipScope:zb},Symbol.toStringTag,{value:"Module"})),{TooltipProvider:c0}=s0,i0=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(xl,{ref:t,className:T(n,"fp-tooltip"),...o})}),l0=e=>{const{className:t,...n}=e;return v.jsx($l,{className:T(t,"fp-tooltip-arrow"),...n})},ar=i.forwardRef((e,t)=>{const{defaultOpen:n,open:o,onOpenChange:r,delayDuration:a,disableHoverableContent:s,container:c,forceMount:l,children:u,content:d,...f}=e,h={open:o,defaultOpen:n,onOpenChange:r,delayDuration:a,disableHoverableContent:s};return v.jsxs(hl,{...h,children:[v.jsx(gl,{asChild:!0,children:u}),v.jsx(bl,{forceMount:l,container:c,children:v.jsxs(i0,{ref:t,...f,children:[d,v.jsx(l0,{})]})})]})});ar.displayName="Tooltip";const u0=ze("fp-IconButton",{variants:{size:{small:"fp-size-small",medium:"fp-size-medium"},activeAppearance:{subtle:"fp-active-appearance-subtle",solid:"fp-active-appearance-solid"}},defaultVariants:{size:"small",activeAppearance:"subtle"}}),Tn=i.forwardRef((e,t)=>{const{className:n,size:o,activeAppearance:r,"aria-label":a,tooltipContent:s,disableTooltip:c,...l}=e,u=v.jsx("button",{ref:t,className:u0({className:n,size:o,activeAppearance:r}),"aria-label":a,...l});return c?u:v.jsx(ar,{content:s??a,children:u})});Tn.displayName="IconButton";const sr=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx("header",{ref:t,className:T(o,"fp-DialogBaseHeader"),...r,children:n})}),cr=i.forwardRef((e,t)=>{const{className:n,size:o,...r}=e;return v.jsx("div",{ref:t,className:d0({className:n,size:o}),...r})}),ir=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx("div",{ref:t,className:T(n,"fp-DialogBaseControls"),...o})}),d0=ze("fp-DialogBaseSection",{variants:{size:{base:"fp-DialogBaseSection-base",small:"fp-DialogBaseSection-small"}},defaultVariants:{size:"base"}});sr.displayName="Dialog.Header";cr.displayName="Dialog.Section";ir.displayName="Dialog.Controls";const f0=kb,p0=Lb,m0=Fb,wl=i.forwardRef((e,t)=>v.jsx(jb,{ref:t,...e,asChild:!0})),yl=i.forwardRef((e,t)=>{const{className:n,style:o,width:r,height:a,maxWidth:s,maxHeight:c,...l}=e;return v.jsx(Bb,{ref:t,className:T(n,"fp-DialogBaseContent"),style:{...o,width:r,height:a,maxWidth:s,maxHeight:c},...l})}),Cl=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(We,{ref:t,className:T(n,"fp-DialogBaseTitle"),weight:"strong",...o})}),El=i.forwardRef((e,t)=>{const{children:n,...o}=e;return v.jsx(Vb,{ref:t,asChild:!0,...o,children:n||v.jsx(Tn,{"aria-label":"Close",disableTooltip:!0,children:v.jsx(gs,{})})})});wl.displayName="Popover.Trigger";yl.displayName="Popover.Content";Cl.displayName="Popover.Title";El.displayName="Popover.Close";const v0=Object.freeze(Object.defineProperty({__proto__:null,Anchor:p0,Close:El,Content:yl,Controls:ir,Header:sr,Portal:m0,Root:f0,Section:cr,Title:Cl,Trigger:wl},Symbol.toStringTag,{value:"Module"}));var lr="Dialog",[Sl,Rl]=he(lr),[h0,$e]=Sl(lr),Pl=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:s=!0}=e,c=m.useRef(null),l=m.useRef(null),[u=!1,d]=Ee({prop:o,defaultProp:r,onChange:a});return v.jsx(h0,{scope:t,triggerRef:c,contentRef:l,contentId:Ze(),titleId:Ze(),descriptionId:Ze(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};Pl.displayName=lr;var _l="DialogTrigger",Tl=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=$e(_l,n),a=ee(t,r.triggerRef);return v.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":fr(r.open),...o,ref:a,onClick:z(e.onClick,r.onOpenToggle)})});Tl.displayName=_l;var ur="DialogPortal",[g0,Nl]=Sl(ur,{forceMount:void 0}),Ml=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=$e(ur,t);return v.jsx(g0,{scope:t,forceMount:n,children:m.Children.map(o,s=>v.jsx(Ne,{present:n||a.open,children:v.jsx(Jo,{asChild:!0,container:r,children:s})}))})};Ml.displayName=ur;var cn="DialogOverlay",Al=m.forwardRef((e,t)=>{const n=Nl(cn,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=$e(cn,e.__scopeDialog);return a.modal?v.jsx(Ne,{present:o||a.open,children:v.jsx(b0,{...r,ref:t})}):null});Al.displayName=cn;var b0=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=$e(cn,n);return v.jsx(er,{as:Le,allowPinchZoom:!0,shards:[r.contentRef],children:v.jsx(W.div,{"data-state":fr(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Je="DialogContent",Il=m.forwardRef((e,t)=>{const n=Nl(Je,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=$e(Je,e.__scopeDialog);return v.jsx(Ne,{present:o||a.open,children:a.modal?v.jsx(x0,{...r,ref:t}):v.jsx($0,{...r,ref:t})})});Il.displayName=Je;var x0=m.forwardRef((e,t)=>{const n=$e(Je,e.__scopeDialog),o=m.useRef(null),r=ee(t,n.contentRef,o);return m.useEffect(()=>{const a=o.current;if(a)return bn(a)},[]),v.jsx(Ol,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:z(e.onFocusOutside,a=>a.preventDefault())})}),$0=m.forwardRef((e,t)=>{const n=$e(Je,e.__scopeDialog),o=m.useRef(!1),r=m.useRef(!1);return v.jsx(Ol,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(o.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Ol=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...s}=e,c=$e(Je,n),l=m.useRef(null),u=ee(t,l);return Ai(),v.jsxs(v.Fragment,{children:[v.jsx(qo,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:v.jsx(Xo,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":fr(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(y0,{titleId:c.titleId}),v.jsx(E0,{contentRef:l,descriptionId:c.descriptionId})]})]})}),dr="DialogTitle",Dl=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=$e(dr,n);return v.jsx(W.h2,{id:r.titleId,...o,ref:t})});Dl.displayName=dr;var kl="DialogDescription",Ll=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=$e(kl,n);return v.jsx(W.p,{id:r.descriptionId,...o,ref:t})});Ll.displayName=kl;var jl="DialogClose",Fl=m.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=$e(jl,n);return v.jsx(W.button,{type:"button",...o,ref:t,onClick:z(e.onClick,()=>r.onOpenChange(!1))})});Fl.displayName=jl;function fr(e){return e?"open":"closed"}var Bl="DialogTitleWarning",[w0,Vl]=od(Bl,{contentName:Je,titleName:dr,docsSlug:"dialog"}),y0=({titleId:e})=>{const t=Vl(Bl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
55
55
 
56
56
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
57
57
 
58
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Jb="DialogDescriptionWarning",e0=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yi(Jb).contentName}}.`;return m.useEffect(()=>{var a;const r=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Xi=Ii,qi=ki,Zi=Li,Qi=Fi,Ji=Bi,el=zi,t0=Hi,lr=Ui;const n0=Xi,o0=Zi,r0=i.forwardRef((e,t)=>v.jsx(qi,{ref:t,...e,asChild:!0})),a0=ze(["fp-DialogBaseContent","fp-DialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3",fullscreen:"fp-size-fullscreen"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),c0=i.forwardRef((e,t)=>{const{children:n,className:o,size:r,placement:a,style:c,width:s,height:l,maxWidth:u,maxHeight:d,...f}=e;return v.jsx(Ji,{ref:t,className:a0({className:o,size:r,placement:a}),"aria-describedby":void 0,style:{...c,width:s,height:l,maxWidth:u,maxHeight:d},...f,children:n})}),s0=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Qi,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),i0=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(el,{ref:t,className:T(o,"fp-DialogBaseTitle"),...r,asChild:!0,children:v.jsx(et,{weight:"strong",children:n})})}),l0=i.forwardRef((e,t)=>{const{children:n,...o}=e;return v.jsx(lr,{ref:t,asChild:!0,...o,children:n||v.jsx(rr,{"aria-label":"Close",disableTooltip:!0,children:v.jsx(Ja,{})})})}),u0=Object.freeze(Object.defineProperty({__proto__:null,Close:l0,Content:c0,Controls:Ni,Header:Ti,Overlay:s0,Portal:o0,Root:n0,Section:Ai,Title:i0,Trigger:r0},Symbol.toStringTag,{value:"Module"}));var tl="AlertDialog",[d0,tw]=he(tl,[Oi]),Oe=Oi(),nl=e=>{const{__scopeAlertDialog:t,...n}=e,o=Oe(t);return v.jsx(Xi,{...o,...n,modal:!0})};nl.displayName=tl;var f0="AlertDialogTrigger",ol=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Oe(n);return v.jsx(qi,{...r,...o,ref:t})});ol.displayName=f0;var p0="AlertDialogPortal",rl=e=>{const{__scopeAlertDialog:t,...n}=e,o=Oe(t);return v.jsx(Zi,{...o,...n})};rl.displayName=p0;var m0="AlertDialogOverlay",al=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Oe(n);return v.jsx(Qi,{...r,...o,ref:t})});al.displayName=m0;var dt="AlertDialogContent",[v0,h0]=d0(dt),cl=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,a=Oe(n),c=m.useRef(null),s=ee(t,c),l=m.useRef(null);return v.jsx(Zb,{contentName:dt,titleName:sl,docsSlug:"alert-dialog",children:v.jsx(v0,{scope:n,cancelRef:l,children:v.jsxs(Ji,{role:"alertdialog",...a,...r,ref:s,onOpenAutoFocus:z(r.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[v.jsx(va,{children:o}),v.jsx(b0,{contentRef:c})]})})})});cl.displayName=dt;var sl="AlertDialogTitle",il=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Oe(n);return v.jsx(el,{...r,...o,ref:t})});il.displayName=sl;var ll="AlertDialogDescription",ul=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Oe(n);return v.jsx(t0,{...r,...o,ref:t})});ul.displayName=ll;var g0="AlertDialogAction",dl=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Oe(n);return v.jsx(lr,{...r,...o,ref:t})});dl.displayName=g0;var fl="AlertDialogCancel",pl=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=h0(fl,n),a=Oe(n),c=ee(t,r);return v.jsx(lr,{...a,...o,ref:c})});pl.displayName=fl;var b0=({contentRef:e})=>{const t=`\`${dt}\` requires a description for the component to be accessible for screen reader users.
58
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},C0="DialogDescriptionWarning",E0=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vl(C0).contentName}}.`;return m.useEffect(()=>{var a;const r=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},zl=Pl,Wl=Tl,Hl=Ml,Gl=Al,Ul=Il,Kl=Dl,S0=Ll,pr=Fl;const R0=zl,P0=Hl,Yl=i.forwardRef((e,t)=>v.jsx(Wl,{ref:t,...e,asChild:!0})),_0=ze(["fp-DialogBaseContent","fp-DialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3",fullscreen:"fp-size-fullscreen"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),Xl=i.forwardRef((e,t)=>{const{children:n,className:o,size:r,placement:a,style:s,width:c,height:l,maxWidth:u,maxHeight:d,...f}=e;return v.jsx(Ul,{ref:t,className:_0({className:o,size:r,placement:a}),"aria-describedby":void 0,style:{...s,width:c,height:l,maxWidth:u,maxHeight:d},...f,children:n})}),ql=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Gl,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),Zl=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(Kl,{ref:t,className:T(o,"fp-DialogBaseTitle"),...r,asChild:!0,children:v.jsx(We,{weight:"strong",children:n})})}),Ql=i.forwardRef((e,t)=>{const{children:n,...o}=e;return v.jsx(pr,{ref:t,asChild:!0,...o,children:n||v.jsx(Tn,{"aria-label":"Close",disableTooltip:!0,children:v.jsx(gs,{})})})});Yl.displayName="Dialog.Trigger";Xl.displayName="Dialog.Content";ql.displayName="Dialog.Overlay";Zl.displayName="Dialog.Title";Ql.displayName="Dialog.Close";const T0=Object.freeze(Object.defineProperty({__proto__:null,Close:Ql,Content:Xl,Controls:ir,Header:sr,Overlay:ql,Portal:P0,Root:R0,Section:cr,Title:Zl,Trigger:Yl},Symbol.toStringTag,{value:"Module"}));var Jl="AlertDialog",[N0,tw]=he(Jl,[Rl]),Ie=Rl(),eu=e=>{const{__scopeAlertDialog:t,...n}=e,o=Ie(t);return v.jsx(zl,{...o,...n,modal:!0})};eu.displayName=Jl;var M0="AlertDialogTrigger",tu=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return v.jsx(Wl,{...r,...o,ref:t})});tu.displayName=M0;var A0="AlertDialogPortal",nu=e=>{const{__scopeAlertDialog:t,...n}=e,o=Ie(t);return v.jsx(Hl,{...o,...n})};nu.displayName=A0;var I0="AlertDialogOverlay",ou=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return v.jsx(Gl,{...r,...o,ref:t})});ou.displayName=I0;var dt="AlertDialogContent",[O0,D0]=N0(dt),ru=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,a=Ie(n),s=m.useRef(null),c=ee(t,s),l=m.useRef(null);return v.jsx(w0,{contentName:dt,titleName:au,docsSlug:"alert-dialog",children:v.jsx(O0,{scope:n,cancelRef:l,children:v.jsxs(Ul,{role:"alertdialog",...a,...r,ref:c,onOpenAutoFocus:z(r.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[v.jsx(wa,{children:o}),v.jsx(L0,{contentRef:s})]})})})});ru.displayName=dt;var au="AlertDialogTitle",su=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return v.jsx(Kl,{...r,...o,ref:t})});su.displayName=au;var cu="AlertDialogDescription",iu=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return v.jsx(S0,{...r,...o,ref:t})});iu.displayName=cu;var k0="AlertDialogAction",lu=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Ie(n);return v.jsx(pr,{...r,...o,ref:t})});lu.displayName=k0;var uu="AlertDialogCancel",du=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=D0(uu,n),a=Ie(n),s=ee(t,r);return v.jsx(pr,{...a,...o,ref:s})});du.displayName=uu;var L0=({contentRef:e})=>{const t=`\`${dt}\` requires a description for the component to be accessible for screen reader users.
59
59
 
60
- You can add a description to the \`${dt}\` by passing a \`${ll}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
60
+ You can add a description to the \`${dt}\` by passing a \`${cu}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
61
61
 
62
62
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${dt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
63
63
 
64
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$0=nl,x0=ol,w0=rl,C0=al,y0=cl,E0=dl,S0=pl,R0=il,P0=ul;const _0=$0,T0=w0,A0=i.forwardRef((e,t)=>v.jsx(x0,{ref:t,...e,asChild:!0})),N0=ze(["fp-DialogBaseContent","fp-AlertDialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),M0=i.forwardRef((e,t)=>{const{className:n,size:o,placement:r,style:a,width:c,height:s,maxWidth:l,maxHeight:u,...d}=e;return v.jsx(y0,{ref:t,className:N0({className:n,size:o,placement:r}),style:{...a,width:c,height:s,maxWidth:l,maxHeight:u},...d})}),O0=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(C0,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),I0=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(R0,{ref:t,className:T(o,"fp-AlertDialogTitle"),...r,asChild:!0,children:v.jsx(et,{weight:"strong",children:n})})}),D0=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(P0,{ref:t,className:T(o,"fp-AlertDialogDescription"),...r,asChild:!0,children:v.jsx(et,{children:n})})}),k0=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx("div",{ref:t,className:T(n,"fp-AlertDialogActions"),...o})}),j0=i.forwardRef((e,t)=>v.jsx(S0,{ref:t,asChild:!0,...e})),L0=i.forwardRef((e,t)=>v.jsx(E0,{ref:t,asChild:!0,...e})),F0=Object.freeze(Object.defineProperty({__proto__:null,Action:L0,Actions:k0,Cancel:j0,Content:M0,Description:D0,Overlay:O0,Portal:T0,Root:_0,Title:I0,Trigger:A0},Symbol.toStringTag,{value:"Module"})),[ml,ur]=Co("ValueFieldProvider",null),B0=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e,a=ur("Root");return v.jsx(ml,{disabled:o,children:v.jsx("label",{ref:t,className:T(n,"fp-ValueFieldRoot"),"data-disabled":o||a!=null&&a.disabled?"":void 0,...r})})}),V0=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e;return v.jsx(ml,{disabled:o,children:v.jsx("div",{ref:t,className:T(n,"fp-ValueFieldMulti"),"data-disabled":o?"":void 0,...r})})}),z0=i.forwardRef((e,t)=>{const{className:n,...o}=e,r=ur("Root");return v.jsx("span",{ref:t,className:T(n,"fp-ValueFieldLabel"),"data-disabled":r!=null&&r.disabled?"":void 0,...o})});function W0(e,t,n){let o=r=>e(r,...t);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:t})}function dr(e,t,n){let o=e.length-t.length;if(o===0)return e(...t);if(o===1)return W0(e,t,n);throw new Error("Wrong number of arguments")}var H0={done:!1,hasNext:!1};function so(e,...t){let n=e,o=t.map(a=>"lazy"in a?G0(a):void 0),r=0;for(;r<t.length;){if(o[r]===void 0||!U0(n)){let l=t[r];n=l(n),r+=1;continue}let a=[];for(let l=r;l<t.length;l++){let u=o[l];if(u===void 0||(a.push(u),u.isSingle))break}let c=[];for(let l of n)if(vl(l,c,a))break;let{isSingle:s}=a.at(-1);n=s?c[0]:c,r+=a.length}return n}function vl(e,t,n){if(n.length===0)return t.push(e),!1;let o=e,r=H0,a=!1;for(let[c,s]of n.entries()){let{index:l,items:u}=s;if(u.push(o),r=s(o,l,u),s.index+=1,r.hasNext){if(r.hasMany??!1){for(let d of r.next)if(vl(d,t,n.slice(c+1)))return!0;return!1}o=r.next}if(!r.hasNext)break;r.done&&(a=!0)}return r.hasNext&&t.push(o),!!a}function G0(e){let{lazy:t,lazyArgs:n}=e,o=t(...n);return Object.assign(o,{isSingle:t.single??!1,index:0,items:[]})}function U0(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function K0(e){return(t,n)=>{if(n===0)return e(t);if(!Number.isInteger(n))throw new TypeError(`precision must be an integer: ${n}`);if(n>15||n<-15)throw new RangeError("precision must be between -15 and 15");if(Number.isNaN(t)||!Number.isFinite(t))return e(t);let o=10**n;return e(t*o)/o}}function aa(...e){return dr(K0(Math.round),e)}function ca(...e){return dr(Ft,e)}function Ft(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return Y0(e,t);if(e instanceof Map)return X0(e,t);if(e instanceof Set)return q0(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[n,o]of Object.entries(e))if(!(n in t)||!Ft(o,t[n]))return!1;return!0}function Y0(e,t){if(e.length!==t.length)return!1;for(let[n,o]of e.entries())if(!Ft(o,t[n]))return!1;return!0}function X0(e,t){if(e.size!==t.size)return!1;for(let[n,o]of e.entries())if(!t.has(n)||!Ft(o,t.get(n)))return!1;return!0}function q0(e,t){if(e.size!==t.size)return!1;let n=[...t];for(let o of e){let r=!1;for(let[a,c]of n.entries())if(Ft(o,c)){r=!0,n.splice(a,1);break}if(!r)return!1}return!0}function Pt(...e){return dr(Z0,e)}var Z0=(e,{min:t,max:n})=>t!==void 0&&e<t?t:n!==void 0&&e>n?n:e;function Gn(e){return e>47&&e<58}function Q0(e){return e===32||e===9||e===160}class fr{constructor(t,n,o){o==null&&typeof t=="string"&&(o=t.length),this.string=t,this.pos=this.start=n||0,this.end=o||0}eof(){return this.pos>=this.end}limit(t,n){return new fr(this.string,t,n)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(t){const n=this.peek(),o=typeof t=="function"?t(n):n===t;return o&&this.next(),o}eatWhile(t){const n=this.pos;for(;!this.eof()&&this.eat(t););return this.pos!==n}backUp(t){this.pos-=t||1}current(){return this.substring(this.start,this.pos)}substring(t,n){return this.string.slice(t,n)}error(t,n=this.pos){return new J0(`${t} at ${n+1}`,n,this.string)}}class J0 extends Error{constructor(t,n,o){super(t),this.pos=n,this.string=o}}const e$=_n("null",0);function t$(e){const t=typeof e=="string"?new fr(e):e;let n,o=0,r=21;const a=[];for(;!t.eof();)t.eatWhile(Q0),t.start=t.pos,n$(t)?(r&1||Xe("Unexpected number",t),a.push(r$(t.current())),r=10):l$(t.peek())?(n=t.next(),s$(n)&&r&16?(hl(n)&&a.push(a$(n,o)),r=21):(r&2||Xe("Unexpected operator",t),a.push(c$(n,o)),r=21)):t.eat(40)?(r&4||Xe('Unexpected "("',t),o+=10,r=53):t.eat(41)?(o-=10,r&32?a.push(e$):r&8||Xe('Unexpected ")"',t),r=14):Xe("Unknown character",t);(o<0||o>=10)&&Xe('Unmatched "()"',t);const c=o$(a);return c===null&&Xe("Parity",t),c}function n$(e){const t=e.pos;return e.eat(46)&&e.eatWhile(Gn)||e.eatWhile(Gn)&&(!e.eat(46)||e.eatWhile(Gn))?!0:(e.pos=t,!1)}function o$(e){const t=[],n=[];let o=0;for(let r=0;r<e.length;r++){const a=e[r];if(a.type==="num")n.push(a);else{for(o+=a.type==="op1"?1:2;t.length&&a.priority<=t[t.length-1].priority;)n.push(t.pop());t.push(a)}}return o+1===n.length+t.length?n.concat(t.reverse()):null}function r$(e,t){return _n("num",parseFloat(e),t)}function a$(e,t=0){return e===45&&(t+=2),_n("op1",e,t)}function c$(e,t=0){return e===42?t+=1:(e===47||e===92)&&(t+=2),_n("op2",e,t)}function Xe(e,t){throw t&&(e+=` at column ${t.pos} of expression`),new Error(e)}function s$(e){return i$(e)||hl(e)}function i$(e){return e===43}function hl(e){return e===45}function l$(e){return e===43||e===45||e===42||e===47||e===92}function _n(e,t,n=0){return{type:e,value:t,priority:n}}const u$={45:e=>-e},d$={43:(e,t)=>e+t,45:(e,t)=>e-t,42:(e,t)=>e*t,47:(e,t)=>e/t,92:(e,t)=>Math.floor(e/t)};function f$(e){if(Array.isArray(e)||(e=t$(e)),!e||!e.length)return null;const t=[];let n,o,r;for(let a=0,c=e.length;a<c;a++){const s=e[a];if(s.type==="num")t.push(s.value);else if(s.type==="op2")o=t.pop(),n=t.pop(),r=d$[s.value],t.push(r(n,o));else if(s.type==="op1")n=t.pop(),r=u$[s.value],t.push(r(n));else throw new Error("Invalid expression")}if(t.length>1)throw new Error("Invalid Expression (parity)");return t[0]}function ht(e,t){const[n,o]=e,[r,a]=t;return function(c){return n===o||r===a?r:(c-n)/(o-n)*(a-r)+r}}var sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function p$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln=sa&&sa.__assign||function(){return ln=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ln.apply(this,arguments)};function m$(e,t,n){if(t==="className")e.className=[e.className,n].join(" ").trim();else if(t==="style")e.style=ln(ln({},e.style),n);else if(typeof n=="function"){var o=e[t];e[t]=o?function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];o.apply(void 0,r),n.apply(void 0,r)}:n}else{if(n===void 0||typeof n!="object"&&n===e[t])return;if(!(t in e))e[t]=n;else throw new Error("Didn’t know how to merge prop '".concat(t,"'. ")+"Only 'className', 'style', and event handlers are supported")}}var v$=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1?t[0]:t.reduce(function(o,r){for(var a in r)m$(o,a,r[a]);return o},{})};const gl=p$(v$);function h$(){const[e,t]=i.useState(!0),n=i.useCallback(()=>{t(!0)},[]),o=i.useCallback(()=>{t(!1)},[]),r=i.useCallback(a=>{e&&a.currentTarget.selectionStart===a.currentTarget.selectionEnd&&(a.currentTarget.select(),t(!1))},[e]);return{onMouseLeave:o,onMouseUp:r,onFocus:n}}const bl=i.forwardRef((e,t)=>{const{type:n="text",className:o,selectOnClick:r=!1,...a}=e,c=i.useRef(null),s=dn(c,t),{onMouseLeave:l,onMouseUp:u,onFocus:d}=h$(),f=r?gl({onMouseLeave:l,onMouseUp:u,onFocus:d},a):a;return v.jsx("input",{ref:s,type:n,className:T(o,"fp-Input"),...f})}),g$=1,b$=10,$l=e=>{const{className:t,inputRef:n,value:o,onChange:r,smallNudge:a=g$,bigNudge:c=b$,formatter:s,disabled:l,...u}=e,d=i.useRef(null),f=dn(n,d),[h,g]=i.useState(null),b=h??s.format(o),p=ur("ValueField"),$=E=>{const _=s.parse(E,o);if(E.length===0||!_.valid||_.value===o)return x();g(null),r(_.value)},x=()=>{g(null)},w=E=>{g(E.currentTarget.value)},C=E=>{const _=E.currentTarget;if(E.key==="Enter"&&(E.preventDefault(),_.blur()),E.key==="Escape"&&(E.preventDefault(),x(),requestAnimationFrame(()=>{_.blur()})),E.key==="ArrowUp"||E.key==="ArrowDown"){if(!s.incrementBy)return;E.preventDefault();const S=s.parse(_.value,o),P=S.valid?S.value:o,O=E.shiftKey?c:a,A=E.key==="ArrowUp"?O:-O,D=s.getIncrementTargets?s.getIncrementTargets(_):null,k=s.incrementBy(P,A,D);$(s.format(k)),requestAnimationFrame(()=>{if(D&&s.getIncrementSelection){const[V,F]=s.getIncrementSelection(D);_.setSelectionRange(V,F)}else _.select()})}},y=E=>{$(E.currentTarget.value)};return v.jsx(bl,{ref:f,dir:"auto",autoComplete:"off",spellCheck:"false",selectOnClick:!0,className:T(t,"fp-ValueFieldBase"),value:b,onChange:w,disabled:l||(p==null?void 0:p.disabled),...gl(u,{onBlur:y,onKeyDown:C})})},$$=15,x$=i.forwardRef((e,t)=>{const{value:n,onChange:o,min:r,max:a,targetRange:c,precision:s,suffix:l,allowedUnits:u,...d}=e,f=i.useMemo(()=>w$({min:r,max:a,precision:s,targetRange:c,suffix:l,allowedUnits:u}),[r,a,s,c,l,u]);return v.jsx($l,{inputRef:t,value:n,onChange:o,formatter:f,...d})});function w$(e={}){const{min:t,max:n,targetRange:o,precision:r=$$,suffix:a,allowedUnits:c=[]}=e,{toDisplayValue:s,fromDisplayValue:l}=C$({min:t,max:n,targetRange:o});return{parse:(u,d)=>{try{return{valid:!0,value:so(u,f=>E$({expression:f,displayValue:s(d),suffix:a,allowedUnits:c}),aa(r),l,Pt({min:t,max:n}))}}catch{return{valid:!1}}},format:u=>so(u,Pt({min:t,max:n}),s,aa(r),d=>y$(d,a)),incrementBy(u,d){return u+l(d)}}}function C$(e){const{min:t,max:n,targetRange:o}=e;if(!o)return{toDisplayValue:r=>r,fromDisplayValue:r=>r};if(typeof t!="number"||typeof n!="number")throw Error("'targetRange' requires specifying 'min' and 'max'.");if(t===n)throw Error("'min' and 'max' cannot be equal.");return{toDisplayValue:ht([t,n],o),fromDisplayValue:ht(o,[t,n])}}function y$(e,t){return Number.isNaN(e)?"":t?`${e}${t}`:`${e}`}function E$(e){const{displayValue:t,expression:n,suffix:o="",allowedUnits:r=[]}=e,a="(\\d*\\.?\\d+)",c=`(?:${[...r,o].join("|")})*`,s=n.replace(new RegExp(`${a}${c}`,"gi"),(u,d)=>d).replace(new RegExp(`${c}${a}`,"gi"),(u,d)=>d).replace(new RegExp(`${a}%`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`%${a}`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`${a}x`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp(`x${a}`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp("(?<!\\d)x(?!\\d)","gi"),`${t}`).trim(),l=f$(s);if(l===null)throw new Error("Invalid expression.");return l}const S$=i.forwardRef((e,t)=>{const{value:n,onChange:o,ignoreAlpha:r=!1,...a}=e,c=i.useMemo(()=>R$({ignoreAlpha:r}),[r]);return v.jsx($l,{inputRef:t,value:n,onChange:o,formatter:c,...a})});function R$(e){const{ignoreAlpha:t}=e;return{parse(n,o){try{return{value:so(n,P$,r=>_$(r,o),T$,r=>t?{...r,a:1}:r),valid:!0}}catch{return{valid:!1}}},format(n){return(Math.round(n.r*255).toString(16).padStart(2,"0")+Math.round(n.g*255).toString(16).padStart(2,"0")+Math.round(n.b*255).toString(16).padStart(2,"0")).toUpperCase()},incrementBy(n,o,r){return r??(r={r:!0,g:!0,b:!0}),{r:r.r?Pt(Math.round(n.r*255)+o,{min:0,max:255})/255:n.r,g:r.g?Pt(Math.round(n.g*255)+o,{min:0,max:255})/255:n.g,b:r.b?Pt(Math.round(n.b*255)+o,{min:0,max:255})/255:n.b,a:n.a}},getIncrementTargets(n){const o=n.selectionStart,r=n.selectionEnd;return o===null||r===null?null:{r:o<2||o===2&&r===2,g:o<4&&r>=3||o===4&&r===4,b:r>=5}},getIncrementSelection(n){let o,r;return n?(n.r?o=0:n.g?o=2:o=4,n.b?r=6:n.g?r=4:r=2,[o,r]):[0,6]}}}function P$(e){var n;const t=/[0-9a-f]+/gi;return((n=e.match(t))==null?void 0:n[0])??""}function _$(e,t){if(!/^[0-9a-f]{1,8}$/i.test(e))throw new Error("Invalid hex substring");switch(e.length){case 1:return e.repeat(6)+Jt(t.a);case 2:return e.repeat(3)+Jt(t.a);case 3:return e.split("").map(n=>n.repeat(2)).join("")+Jt(t.a);case 4:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e[3].repeat(2);case 5:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e.slice(-2);case 6:return e+Jt(t.a);case 7:return e.slice(0,6)+e[6].repeat(2);case 8:return e;default:throw new Error("Invalid hex substring")}}function T$(e){return{r:parseInt(e.substring(0,2),16)/255,g:parseInt(e.substring(2,4),16)/255,b:parseInt(e.substring(4,6),16)/255,a:parseInt(e.substring(6,8),16)/255}}function Jt(e){return Math.round(e*255).toString(16)}const A$=Object.freeze(Object.defineProperty({__proto__:null,Hex:S$,Label:z0,Multi:V0,Numeric:x$,Root:B0},Symbol.toStringTag,{value:"Module"}));var pr="Collapsible",[N$,nw]=he(pr),[M$,mr]=N$(pr),xl=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:a,onOpenChange:c,...s}=e,[l=!1,u]=Ee({prop:o,defaultProp:r,onChange:c});return v.jsx(M$,{scope:n,disabled:a,contentId:qe(),open:l,onOpenToggle:m.useCallback(()=>u(d=>!d),[u]),children:v.jsx(W.div,{"data-state":hr(l),"data-disabled":a?"":void 0,...s,ref:t})})});xl.displayName=pr;var wl="CollapsibleTrigger",Cl=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=mr(wl,n);return v.jsx(W.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":hr(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:z(e.onClick,r.onOpenToggle)})});Cl.displayName=wl;var vr="CollapsibleContent",yl=m.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=mr(vr,e.__scopeCollapsible);return v.jsx(Ae,{present:n||r.open,children:({present:a})=>v.jsx(O$,{...o,ref:t,present:a})})});yl.displayName=vr;var O$=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...a}=e,c=mr(vr,n),[s,l]=m.useState(o),u=m.useRef(null),d=ee(t,u),f=m.useRef(0),h=f.current,g=m.useRef(0),b=g.current,p=c.open||s,$=m.useRef(p),x=m.useRef();return m.useEffect(()=>{const w=requestAnimationFrame(()=>$.current=!1);return()=>cancelAnimationFrame(w)},[]),Le(()=>{const w=u.current;if(w){x.current=x.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,g.current=C.width,$.current||(w.style.transitionDuration=x.current.transitionDuration,w.style.animationName=x.current.animationName),l(o)}},[c.open,o]),v.jsx(W.div,{"data-state":hr(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!p,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:p&&r})});function hr(e){return e?"open":"closed"}var I$=xl,D$=Cl,k$=yl;const j$=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(I$,{ref:t,className:T(n,"fp-CollapsibleRoot"),...o})}),L$=i.forwardRef((e,t)=>{const{className:n,children:o,...r}=e;return v.jsxs(D$,{ref:t,className:T(n,"fp-CollapsibleTrigger"),...r,children:[v.jsx(yo,{viewBox:"4 4 16 16",size:"4",className:"fp-CollapsibleIndicator"}),o]})}),F$=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(k$,{ref:t,className:T(n,"fp-CollapsibleContent"),...o})}),B$=Object.freeze(Object.defineProperty({__proto__:null,Content:F$,Root:j$,Trigger:L$},Symbol.toStringTag,{value:"Module"})),Un={0:"fp-gap-0",px:"fp-gap-px","0_5":"fp-gap-0_5",1:"fp-gap-1","1_5":"fp-gap-1_5",2:"fp-gap-2","2_5":"fp-gap-2_5",3:"fp-gap-3","3_5":"fp-gap-3_5",4:"fp-gap-4",5:"fp-gap-5",6:"fp-gap-6",7:"fp-gap-7",8:"fp-gap-8",9:"fp-gap-9",10:"fp-gap-10",11:"fp-gap-11",12:"fp-gap-12",13:"fp-gap-13",14:"fp-gap-14",15:"fp-gap-15",16:"fp-gap-16"},V$=ze("fp-Flex",{variants:{direction:{row:"fp-direction-row",column:"fp-direction-column",rowReverse:"fp-direction-row-reverse",columnReverse:"fp-direction-column-reverse"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end",baseline:"fp-align-baseline",stretch:"fp-align-stretch"},justify:{start:"fp-justify-start",center:"fp-justify-center",end:"fp-justify-end",between:"fp-justify-between"},wrap:{nowrap:"fp-wrap-nowrap",wrap:"fp-wrap-wrap",wrapReverse:"fp-wrap-wrap-reverse"},gap:Un,columnGap:Un,rowGap:Un},defaultVariants:{direction:"row"}}),z$=i.forwardRef((e,t)=>{const{className:n,direction:o,align:r,justify:a,wrap:c,gap:s,columnGap:l,rowGap:u,...d}=e;return v.jsx("div",{ref:t,className:V$({className:n,direction:o,align:r,justify:a,wrap:c,gap:s,columnGap:l,rowGap:u}),...d})}),W$=ze("fp-Button",{variants:{variant:{primary:"fp-variant-primary",secondary:"fp-variant-secondary",inverse:"fp-variant-inverse",destructive:"fp-variant-destructive",success:"fp-variant-success",text:"fp-variant-text"},size:{small:"fp-size-small",medium:"fp-size-medium"},fullWidth:{true:"fp-full-width"}},defaultVariants:{variant:"secondary",size:"small"}}),H$=i.forwardRef((e,t)=>{const{className:n,variant:o,size:r,fullWidth:a,...c}=e;return v.jsx("button",{ref:t,className:W$({className:n,variant:o,size:r,fullWidth:a}),...c})});function G$(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}var U$=i.useLayoutEffect,K$=function(t){var n=m.useRef(t);return U$(function(){n.current=t}),n},ia=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Y$=function(t,n){var o=i.useRef();return i.useCallback(function(r){t.current=r,o.current&&ia(o.current,null),o.current=n,n&&ia(n,r)},[n])},la={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},X$=function(t){Object.keys(la).forEach(function(n){t.style.setProperty(n,la[n],"important")})},ua=X$,se=null,da=function(t,n){var o=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?o+n.borderSize:o-n.paddingSize};function q$(e,t,n,o){n===void 0&&(n=1),o===void 0&&(o=1/0),se||(se=document.createElement("textarea"),se.setAttribute("tabindex","-1"),se.setAttribute("aria-hidden","true"),ua(se)),se.parentNode===null&&document.body.appendChild(se);var r=e.paddingSize,a=e.borderSize,c=e.sizingStyle,s=c.boxSizing;Object.keys(c).forEach(function(h){var g=h;se.style[g]=c[g]}),ua(se),se.value=t;var l=da(se,e);se.value=t,l=da(se,e),se.value="x";var u=se.scrollHeight-r,d=u*n;s==="border-box"&&(d=d+r+a),l=Math.max(d,l);var f=u*o;return s==="border-box"&&(f=f+r+a),l=Math.min(f,l),[l,u]}var fa=function(){},Z$=function(t,n){return t.reduce(function(o,r){return o[r]=n[r],o},{})},Q$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],J$=!!document.documentElement.currentStyle,ex=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var o=Z$(Q$,n),r=o.boxSizing;if(r==="")return null;J$&&r==="border-box"&&(o.width=parseFloat(o.width)+parseFloat(o.borderRightWidth)+parseFloat(o.borderLeftWidth)+parseFloat(o.paddingRight)+parseFloat(o.paddingLeft)+"px");var a=parseFloat(o.paddingBottom)+parseFloat(o.paddingTop),c=parseFloat(o.borderBottomWidth)+parseFloat(o.borderTopWidth);return{sizingStyle:o,paddingSize:a,borderSize:c}},tx=ex;function El(e,t,n){var o=K$(n);m.useLayoutEffect(function(){var r=function(c){return o.current(c)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var nx=function(t){El(window,"resize",t)},ox=function(t){El(document.fonts,"loadingdone",t)},rx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ax=function(t,n){var o=t.cacheMeasurements,r=t.maxRows,a=t.minRows,c=t.onChange,s=c===void 0?fa:c,l=t.onHeightChange,u=l===void 0?fa:l,d=G$(t,rx),f=d.value!==void 0,h=m.useRef(null),g=Y$(h,n),b=m.useRef(0),p=m.useRef(),$=function(){var C=h.current,y=o&&p.current?p.current:tx(C);if(y){p.current=y;var E=q$(y,C.value||C.placeholder||"x",a,r),_=E[0],S=E[1];b.current!==_&&(b.current=_,C.style.setProperty("height",_+"px","important"),u(_,{rowHeight:S}))}},x=function(C){f||$(),s(C)};return m.useLayoutEffect($),nx($),ox($),m.createElement("textarea",R({},d,{onChange:x,ref:g}))},cx=m.forwardRef(ax);const sx=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(cx,{className:T(n,"fp-textarea"),ref:t,...o})});function Sl(e,[t,n]){return Math.min(n,Math.max(t,e))}var Rl=["PageUp","PageDown"],Pl=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_l={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Et="Slider",[io,ix,lx]=ha(Et),[Tl,ow]=he(Et,[lx]),[ux,Tn]=Tl(Et),Al=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:c="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:g=!1,...b}=e,p=m.useRef(new Set),$=m.useRef(0),w=c==="horizontal"?dx:fx,[C=[],y]=Ee({prop:d,defaultProp:u,onChange:A=>{var k;(k=[...p.current][$.current])==null||k.focus(),f(A)}}),E=m.useRef(C);function _(A){const D=bx(C,A);O(A,D)}function S(A){O(A,$.current)}function P(){const A=E.current[$.current];C[$.current]!==A&&h(C)}function O(A,D,{commit:k}={commit:!1}){const V=Cx(a),F=yx(Math.round((A-o)/a)*a+o,V),I=Sl(F,[o,r]);y((B=[])=>{const L=hx(B,I,D);if(wx(L,l*a)){$.current=L.indexOf(I);const H=String(L)!==String(B);return H&&k&&h(L),H?L:B}else return B})}return v.jsx(ux,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:$,thumbs:p.current,values:C,orientation:c,children:v.jsx(io.Provider,{scope:e.__scopeSlider,children:v.jsx(io.Slot,{scope:e.__scopeSlider,children:v.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...b,ref:t,onPointerDown:z(b.onPointerDown,()=>{s||(E.current=C)}),min:o,max:r,inverted:g,onSlideStart:s?void 0:_,onSlideMove:s?void 0:S,onSlideEnd:s?void 0:P,onHomeKeyDown:()=>!s&&O(o,0,{commit:!0}),onEndKeyDown:()=>!s&&O(r,C.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:D})=>{if(!s){const F=Rl.includes(A.key)||A.shiftKey&&Pl.includes(A.key)?10:1,I=$.current,B=C[I],L=a*F*D;O(B+L,I,{commit:!0})}}})})})})});Al.displayName=Et;var[Nl,Ml]=Tl(Et,{startEdge:"left",endEdge:"right",size:"width",direction:1}),dx=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:c,onSlideMove:s,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,h]=m.useState(null),g=ee(t,C=>h(C)),b=m.useRef(),p=Ot(r),$=p==="ltr",x=$&&!a||!$&&a;function w(C){const y=b.current||f.getBoundingClientRect(),E=[0,y.width],S=gr(E,x?[n,o]:[o,n]);return b.current=y,S(C-y.left)}return v.jsx(Nl,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:v.jsx(Ol,{dir:p,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:C=>{const y=w(C.clientX);c==null||c(y)},onSlideMove:C=>{const y=w(C.clientX);s==null||s(y)},onSlideEnd:()=>{b.current=void 0,l==null||l()},onStepKeyDown:C=>{const E=_l[x?"from-left":"from-right"].includes(C.key);u==null||u({event:C,direction:E?-1:1})}})})}),fx=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:c,onSlideEnd:s,onStepKeyDown:l,...u}=e,d=m.useRef(null),f=ee(t,d),h=m.useRef(),g=!r;function b(p){const $=h.current||d.current.getBoundingClientRect(),x=[0,$.height],C=gr(x,g?[o,n]:[n,o]);return h.current=$,C(p-$.top)}return v.jsx(Nl,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:v.jsx(Ol,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const $=b(p.clientY);a==null||a($)},onSlideMove:p=>{const $=b(p.clientY);c==null||c($)},onSlideEnd:()=>{h.current=void 0,s==null||s()},onStepKeyDown:p=>{const x=_l[g?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:x?-1:1})}})})}),Ol=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:c,onEndKeyDown:s,onStepKeyDown:l,...u}=e,d=Tn(Et,n);return v.jsx(W.span,{...u,ref:t,onKeyDown:z(e.onKeyDown,f=>{f.key==="Home"?(c(f),f.preventDefault()):f.key==="End"?(s(f),f.preventDefault()):Rl.concat(Pl).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:z(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():o(f)}),onPointerMove:z(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&r(f)}),onPointerUp:z(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),a(f))})})}),Il="SliderTrack",Dl=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Tn(Il,n);return v.jsx(W.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});Dl.displayName=Il;var lo="SliderRange",px=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Tn(lo,n),a=Ml(lo,n),c=m.useRef(null),s=ee(t,c),l=r.values.length,u=r.values.map(h=>jl(h,r.min,r.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return v.jsx(W.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:s,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:f+"%"}})});px.displayName=lo;var uo="SliderThumb",kl=m.forwardRef((e,t)=>{const n=ix(e.__scopeSlider),[o,r]=m.useState(null),a=ee(t,s=>r(s)),c=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return v.jsx(mx,{...e,ref:a,index:c})}),mx=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,c=Tn(uo,n),s=Ml(uo,n),[l,u]=m.useState(null),d=ee(t,x=>u(x)),f=l?!!l.closest("form"):!0,h=$o(l),g=c.values[o],b=g===void 0?0:jl(g,c.min,c.max),p=gx(o,c.values.length),$=h==null?void 0:h[s.size];return $&&$x($,b,s.direction),m.useEffect(()=>{if(l)return c.thumbs.add(l),()=>{c.thumbs.delete(l)}},[l,c.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`${b}%`},children:[v.jsx(io.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(W.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":c.min,"aria-valuenow":g,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...a,ref:d,style:g===void 0?{display:"none"}:e.style,onFocus:z(e.onFocus,()=>{c.valueIndexToChangeRef.current=o})})}),f&&v.jsx(vx,{name:r??(c.name?c.name+(c.values.length>1?"[]":""):void 0),value:g},o)]})});kl.displayName=uo;var vx=e=>{const{value:t,...n}=e,o=m.useRef(null),r=za(t);return m.useEffect(()=>{const a=o.current,c=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(c,"value").set;if(r!==t&&l){const u=new Event("input",{bubbles:!0});l.call(a,t),a.dispatchEvent(u)}},[r,t]),v.jsx("input",{style:{display:"none"},...n,ref:o,defaultValue:t})};function hx(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function jl(e,t,n){const a=100/(n-t)*(e-t);return Sl(a,[0,100])}function gx(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function bx(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function $x(e,t,n){const o=e/2,a=gr([0,50],[0,o]);return(o-a(t)*n)*n}function xx(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function wx(e,t){if(t>0){const n=xx(e);return Math.min(...n)>=t}return!0}function gr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Cx(e){return(String(e).split(".")[1]||"").length}function yx(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Ex=Al,Sx=Dl,Rx=kl;const Px=2,_x=0,Tx=100,Ax="horizontal",Nx="ltr",Mx=i.forwardRef((e,t)=>{const{className:n,min:o=_x,max:r=Tx,defaultValue:a=[o],value:c,onValueChange:s,orientation:l=Ax,dir:u=Nx,inverted:d,disabled:f,range:h=!0,rangeAnchor:g,baseValue:b,hints:p,...$}=e,x=i.useRef(null),w=dn(x,t),{onPointerDown:C,focusVisible:y}=kx(x),[E,_]=i.useState(c??a),S=i.useRef(c),P=i.useRef(a);i.useEffect(()=>{ca(c,S.current)&&ca(a,P.current)||_(c??a)},[c,a]),i.useEffect(()=>{x.current&&x.current.style.setProperty("--radix-slider-thumb-transform",Dx(l,u,d))},[x,l,u,d]);const O=A=>{const D=A.map(k=>jx(k,p,o,r));s==null||s(D),_(D)};return v.jsxs(Ex,{tabIndex:-1,ref:w,className:T(n,"fp-SliderRoot"),value:E,onValueChange:O,onPointerDown:C,min:o,max:r,orientation:l,dir:u,inverted:d,disabled:f,...$,children:[v.jsx(Sx,{className:"fp-SliderTrack"}),h&&v.jsx(Ix,{dir:u,value:E,min:o,max:r,orientation:l,inverted:d,rangeAnchor:g,disabled:f}),p&&p.map(A=>v.jsx(Ox,{hint:A,baseValue:b,min:o,max:r,orientation:l,dir:u,inverted:d},A)),E.map((A,D)=>v.jsx(Rx,{className:T("fp-SliderThumb",{"fp-SliderThumb-focusVisible":y,"fp-SliderThumb-modified":A!==b})},D))]})}),Ox=e=>{const{baseValue:t,dir:n,inverted:o,max:r,min:a,orientation:c,hint:s}=e,{startEdge:l}=Ll(c,n,o),u=ht([a,r],[0,100])(s),d=4;return v.jsx(v.Fragment,{children:v.jsx("span",{className:T("fp-SliderHint",{"fp-SliderHint-baseValue":s===t}),"data-orientation":c,style:{[l]:`calc(${u}% - ${d/2}px)`}})})},Ix=e=>{const{min:t,max:n,value:o,rangeAnchor:r=t,orientation:a,dir:c,inverted:s,disabled:l}=e,u=o.length>1?Math.min(...o):Math.min(r,...o),d=o.length>1?Math.max(...o):Math.max(r,...o),f=ht([t,n],[0,100])(u),h=100-ht([t,n],[0,100])(d),g=Ll(a,c,s);return v.jsx("span",{className:"fp-SliderRange","data-orientation":a,"data-disabled":l?"":void 0,style:{[g.startEdge]:`${f}%`,[g.endEdge]:`${h}%`}})};function Ll(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:{startEdge:"bottom",endEdge:"top"},inverted:{startEdge:"top",endEdge:"bottom"}},horizontal:{normal:{startEdge:t==="ltr"?"left":"right",endEdge:t==="ltr"?"right":"left"},inverted:{startEdge:t==="ltr"?"right":"left",endEdge:t==="ltr"?"left":"right"}}}[e][o]}function Dx(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:"translateY(50%)",inverted:"translateY(-50%)"},horizontal:{normal:t==="ltr"?"translateX(-50%)":"translateX(50%)",inverted:t==="ltr"?"translateX(50%)":"translateX(-50%)"}}[e][o]}function kx(e){const[t,n]=i.useState(!1),o=()=>{var a;n(!1),window.removeEventListener("pointerup",o),(a=e.current)==null||a.focus()};return{onPointerDown:()=>{n(!0),window.addEventListener("pointerup",o)},focusVisible:!t}}function jx(e,t,n,o){const r=ht([0,100],[0,o-n])(Px),a=t==null?void 0:t.find(c=>Math.abs(c-e)<=r);return typeof a=="number"?a:e}const Fl="Switch",[Lx,rw]=Ne(Fl),[Fx,Bx]=Lx(Fl),Vx=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:a,required:c,disabled:s,value:l="on",onCheckedChange:u,...d}=e,[f,h]=i.useState(null),g=J(t,w=>h(w)),b=i.useRef(!1),p=f?!!f.closest("form"):!0,[$=!1,x]=Ve({prop:r,defaultProp:a,onChange:u});return i.createElement(Fx,{scope:n,checked:$,disabled:s},i.createElement(q.button,R({type:"button",role:"switch","aria-checked":$,"aria-required":c,"data-state":Bl($),"data-disabled":s?"":void 0,disabled:s,value:l},d,{ref:g,onClick:M(e.onClick,w=>{x(C=>!C),p&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),p&&i.createElement(Hx,{control:f,bubbles:!b.current,name:o,value:l,checked:$,required:c,disabled:s,style:{transform:"translateX(-100%)"}}))}),zx="SwitchThumb",Wx=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Bx(zx,n);return i.createElement(q.span,R({"data-state":Bl(r.checked),"data-disabled":r.disabled?"":void 0},o,{ref:t}))}),Hx=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=i.useRef(null),c=Mc(n),s=Rc(t);return i.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==n&&f){const h=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(h)}},[c,n,o]),i.createElement("input",R({type:"checkbox","aria-hidden":!0,defaultChecked:n},r,{tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Bl(e){return e?"checked":"unchecked"}const Gx=Vx,Ux=Wx,Kx=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Gx,{ref:t,className:T(n,"fp-switchRoot"),...o,children:v.jsx(Ux,{ref:t,className:T(n,"fp-switchThumb")})})});exports.AlertDialog=F0;exports.Button=H$;exports.Checkbox=bd;exports.Collapsible=B$;exports.ContextMenu=mg;exports.Dialog=u0;exports.DropdownMenu=Ch;exports.Flex=z$;exports.IconButton=rr;exports.Input=bl;exports.Label=bo;exports.Link=Du;exports.Paragraph=Iu;exports.Popover=Gb;exports.RadioGroup=ad;exports.SegmentedControl=Vu;exports.Select=_m;exports.Slider=Mx;exports.Switch=Kx;exports.Tabs=Ru;exports.Text=et;exports.Textarea=sx;exports.Tooltip=_i;exports.TooltipProvider=Ob;exports.ValueField=A$;exports.createIcon=We;
64
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},j0=eu,F0=tu,B0=nu,V0=ou,z0=ru,W0=lu,H0=du,G0=su,U0=iu;const K0=j0,Y0=B0,fu=i.forwardRef((e,t)=>v.jsx(F0,{ref:t,...e,asChild:!0})),X0=ze(["fp-DialogBaseContent","fp-AlertDialogContent"],{variants:{size:{1:"fp-size-1",2:"fp-size-2",3:"fp-size-3"},placement:{center:"fp-placement-center",top:"fp-placement-top"}},defaultVariants:{size:"2",placement:"top"}}),pu=i.forwardRef((e,t)=>{const{className:n,size:o,placement:r,style:a,width:s,height:c,maxWidth:l,maxHeight:u,...d}=e;return v.jsx(z0,{ref:t,className:X0({className:n,size:o,placement:r}),style:{...a,width:s,height:c,maxWidth:l,maxHeight:u},...d})}),mu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(V0,{ref:t,className:T(n,"fp-DialogBaseOverlay"),...o})}),vu=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(G0,{ref:t,className:T(o,"fp-AlertDialogTitle"),...r,asChild:!0,children:v.jsx(We,{weight:"strong",children:n})})}),hu=i.forwardRef((e,t)=>{const{children:n,className:o,...r}=e;return v.jsx(U0,{ref:t,className:T(o,"fp-AlertDialogDescription"),...r,asChild:!0,children:v.jsx(We,{children:n})})}),gu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx("div",{ref:t,className:T(n,"fp-AlertDialogActions"),...o})}),bu=i.forwardRef((e,t)=>v.jsx(H0,{ref:t,asChild:!0,...e})),xu=i.forwardRef((e,t)=>v.jsx(W0,{ref:t,asChild:!0,...e}));fu.displayName="AlertDialog.Trigger";pu.displayName="AlertDialog.Content";mu.displayName="AlertDialog.Overlay";vu.displayName="AlertDialog.Title";hu.displayName="AlertDialog.Description";gu.displayName="AlertDialog.Actions";bu.displayName="AlertDialog.Cancel";xu.displayName="AlertDialog.Action";const q0=Object.freeze(Object.defineProperty({__proto__:null,Action:xu,Actions:gu,Cancel:bu,Content:pu,Description:hu,Overlay:mu,Portal:Y0,Root:K0,Title:vu,Trigger:fu},Symbol.toStringTag,{value:"Module"})),[$u,mr]=Co("ValueFieldProvider",null),wu=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e,a=mr("Root");return v.jsx($u,{disabled:o,children:v.jsx("label",{ref:t,className:T(n,"fp-ValueFieldRoot"),"data-disabled":o||a!=null&&a.disabled?"":void 0,...r})})}),yu=i.forwardRef((e,t)=>{const{className:n,disabled:o,...r}=e;return v.jsx($u,{disabled:o,children:v.jsx("div",{ref:t,className:T(n,"fp-ValueFieldMulti"),"data-disabled":o?"":void 0,...r})})}),Cu=i.forwardRef((e,t)=>{const{className:n,...o}=e,r=mr("Root");return v.jsx("span",{ref:t,className:T(n,"fp-ValueFieldLabel"),"data-disabled":r!=null&&r.disabled?"":void 0,...o})});wu.displayName="ValueField.Root";Cu.displayName="ValueField.Label";yu.displayName="ValueField.Multi";function Z0(e,t,n){let o=r=>e(r,...t);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:t})}function vr(e,t,n){let o=e.length-t.length;if(o===0)return e(...t);if(o===1)return Z0(e,t,n);throw new Error("Wrong number of arguments")}var Q0={done:!1,hasNext:!1};function lo(e,...t){let n=e,o=t.map(a=>"lazy"in a?J0(a):void 0),r=0;for(;r<t.length;){if(o[r]===void 0||!ex(n)){let l=t[r];n=l(n),r+=1;continue}let a=[];for(let l=r;l<t.length;l++){let u=o[l];if(u===void 0||(a.push(u),u.isSingle))break}let s=[];for(let l of n)if(Eu(l,s,a))break;let{isSingle:c}=a.at(-1);n=c?s[0]:s,r+=a.length}return n}function Eu(e,t,n){if(n.length===0)return t.push(e),!1;let o=e,r=Q0,a=!1;for(let[s,c]of n.entries()){let{index:l,items:u}=c;if(u.push(o),r=c(o,l,u),c.index+=1,r.hasNext){if(r.hasMany??!1){for(let d of r.next)if(Eu(d,t,n.slice(s+1)))return!0;return!1}o=r.next}if(!r.hasNext)break;r.done&&(a=!0)}return r.hasNext&&t.push(o),!!a}function J0(e){let{lazy:t,lazyArgs:n}=e,o=t(...n);return Object.assign(o,{isSingle:t.single??!1,index:0,items:[]})}function ex(e){return typeof e=="string"||typeof e=="object"&&e!==null&&Symbol.iterator in e}function tx(e){return(t,n)=>{if(n===0)return e(t);if(!Number.isInteger(n))throw new TypeError(`precision must be an integer: ${n}`);if(n>15||n<-15)throw new RangeError("precision must be between -15 and 15");if(Number.isNaN(t)||!Number.isFinite(t))return e(t);let o=10**n;return e(t*o)/o}}function da(...e){return vr(tx(Math.round),e)}function fa(...e){return vr(Ft,e)}function Ft(e,t){if(e===t||Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;if(Array.isArray(e))return nx(e,t);if(e instanceof Map)return ox(e,t);if(e instanceof Set)return rx(e,t);if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let[n,o]of Object.entries(e))if(!(n in t)||!Ft(o,t[n]))return!1;return!0}function nx(e,t){if(e.length!==t.length)return!1;for(let[n,o]of e.entries())if(!Ft(o,t[n]))return!1;return!0}function ox(e,t){if(e.size!==t.size)return!1;for(let[n,o]of e.entries())if(!t.has(n)||!Ft(o,t.get(n)))return!1;return!0}function rx(e,t){if(e.size!==t.size)return!1;let n=[...t];for(let o of e){let r=!1;for(let[a,s]of n.entries())if(Ft(o,s)){r=!0,n.splice(a,1);break}if(!r)return!1}return!0}function Pt(...e){return vr(ax,e)}var ax=(e,{min:t,max:n})=>t!==void 0&&e<t?t:n!==void 0&&e>n?n:e;function Kn(e){return e>47&&e<58}function sx(e){return e===32||e===9||e===160}class hr{constructor(t,n,o){o==null&&typeof t=="string"&&(o=t.length),this.string=t,this.pos=this.start=n||0,this.end=o||0}eof(){return this.pos>=this.end}limit(t,n){return new hr(this.string,t,n)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(t){const n=this.peek(),o=typeof t=="function"?t(n):n===t;return o&&this.next(),o}eatWhile(t){const n=this.pos;for(;!this.eof()&&this.eat(t););return this.pos!==n}backUp(t){this.pos-=t||1}current(){return this.substring(this.start,this.pos)}substring(t,n){return this.string.slice(t,n)}error(t,n=this.pos){return new cx(`${t} at ${n+1}`,n,this.string)}}class cx extends Error{constructor(t,n,o){super(t),this.pos=n,this.string=o}}const ix=Nn("null",0);function lx(e){const t=typeof e=="string"?new hr(e):e;let n,o=0,r=21;const a=[];for(;!t.eof();)t.eatWhile(sx),t.start=t.pos,ux(t)?(r&1||qe("Unexpected number",t),a.push(fx(t.current())),r=10):gx(t.peek())?(n=t.next(),vx(n)&&r&16?(Su(n)&&a.push(px(n,o)),r=21):(r&2||qe("Unexpected operator",t),a.push(mx(n,o)),r=21)):t.eat(40)?(r&4||qe('Unexpected "("',t),o+=10,r=53):t.eat(41)?(o-=10,r&32?a.push(ix):r&8||qe('Unexpected ")"',t),r=14):qe("Unknown character",t);(o<0||o>=10)&&qe('Unmatched "()"',t);const s=dx(a);return s===null&&qe("Parity",t),s}function ux(e){const t=e.pos;return e.eat(46)&&e.eatWhile(Kn)||e.eatWhile(Kn)&&(!e.eat(46)||e.eatWhile(Kn))?!0:(e.pos=t,!1)}function dx(e){const t=[],n=[];let o=0;for(let r=0;r<e.length;r++){const a=e[r];if(a.type==="num")n.push(a);else{for(o+=a.type==="op1"?1:2;t.length&&a.priority<=t[t.length-1].priority;)n.push(t.pop());t.push(a)}}return o+1===n.length+t.length?n.concat(t.reverse()):null}function fx(e,t){return Nn("num",parseFloat(e),t)}function px(e,t=0){return e===45&&(t+=2),Nn("op1",e,t)}function mx(e,t=0){return e===42?t+=1:(e===47||e===92)&&(t+=2),Nn("op2",e,t)}function qe(e,t){throw t&&(e+=` at column ${t.pos} of expression`),new Error(e)}function vx(e){return hx(e)||Su(e)}function hx(e){return e===43}function Su(e){return e===45}function gx(e){return e===43||e===45||e===42||e===47||e===92}function Nn(e,t,n=0){return{type:e,value:t,priority:n}}const bx={45:e=>-e},xx={43:(e,t)=>e+t,45:(e,t)=>e-t,42:(e,t)=>e*t,47:(e,t)=>e/t,92:(e,t)=>Math.floor(e/t)};function $x(e){if(Array.isArray(e)||(e=lx(e)),!e||!e.length)return null;const t=[];let n,o,r;for(let a=0,s=e.length;a<s;a++){const c=e[a];if(c.type==="num")t.push(c.value);else if(c.type==="op2")o=t.pop(),n=t.pop(),r=xx[c.value],t.push(r(n,o));else if(c.type==="op1")n=t.pop(),r=bx[c.value],t.push(r(n));else throw new Error("Invalid expression")}if(t.length>1)throw new Error("Invalid Expression (parity)");return t[0]}function ht(e,t){const[n,o]=e,[r,a]=t;return function(s){return n===o||r===a?r:(s-n)/(o-n)*(a-r)+r}}var pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln=pa&&pa.__assign||function(){return ln=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ln.apply(this,arguments)};function yx(e,t,n){if(t==="className")e.className=[e.className,n].join(" ").trim();else if(t==="style")e.style=ln(ln({},e.style),n);else if(typeof n=="function"){var o=e[t];e[t]=o?function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];o.apply(void 0,r),n.apply(void 0,r)}:n}else{if(n===void 0||typeof n!="object"&&n===e[t])return;if(!(t in e))e[t]=n;else throw new Error("Didn’t know how to merge prop '".concat(t,"'. ")+"Only 'className', 'style', and event handlers are supported")}}var Cx=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1?t[0]:t.reduce(function(o,r){for(var a in r)yx(o,a,r[a]);return o},{})};const Ru=wx(Cx);function Ex(){const[e,t]=i.useState(!0),n=i.useCallback(()=>{t(!0)},[]),o=i.useCallback(()=>{t(!1)},[]),r=i.useCallback(a=>{e&&a.currentTarget.selectionStart===a.currentTarget.selectionEnd&&(a.currentTarget.select(),t(!1))},[e]);return{onMouseLeave:o,onMouseUp:r,onFocus:n}}const gr=i.forwardRef((e,t)=>{const{type:n="text",className:o,selectOnClick:r=!1,...a}=e,s=i.useRef(null),c=dn(s,t),{onMouseLeave:l,onMouseUp:u,onFocus:d}=Ex(),f=r?Ru({onMouseLeave:l,onMouseUp:u,onFocus:d},a):a;return v.jsx("input",{ref:c,type:n,className:T(o,"fp-Input"),...f})});gr.displayName="Input";const Sx=1,Rx=10,br=e=>{const{className:t,inputRef:n,value:o,onChange:r,smallNudge:a=Sx,bigNudge:s=Rx,formatter:c,disabled:l,...u}=e,d=i.useRef(null),f=dn(n,d),[h,g]=i.useState(null),b=h??c.format(o),p=mr("ValueField"),x=E=>{const _=c.parse(E,o);if(E.length===0||!_.valid||_.value===o)return $();g(null),r(_.value)},$=()=>{g(null)},w=E=>{g(E.currentTarget.value)},y=E=>{const _=E.currentTarget;if(E.key==="Enter"&&(E.preventDefault(),_.blur()),E.key==="Escape"&&(E.preventDefault(),$(),requestAnimationFrame(()=>{_.blur()})),E.key==="ArrowUp"||E.key==="ArrowDown"){if(!c.incrementBy)return;E.preventDefault();const S=c.parse(_.value,o),P=S.valid?S.value:o,I=E.shiftKey?s:a,N=E.key==="ArrowUp"?I:-I,D=c.getIncrementTargets?c.getIncrementTargets(_):null,k=c.incrementBy(P,N,D);x(c.format(k)),requestAnimationFrame(()=>{if(D&&c.getIncrementSelection){const[V,F]=c.getIncrementSelection(D);_.setSelectionRange(V,F)}else _.select()})}},C=E=>{x(E.currentTarget.value)};return v.jsx(gr,{ref:f,dir:"auto",autoComplete:"off",spellCheck:"false",selectOnClick:!0,className:T(t,"fp-ValueFieldBase"),value:b,onChange:w,disabled:l||(p==null?void 0:p.disabled),...Ru(u,{onBlur:C,onKeyDown:y})})};br.displayName="ValueField.Base";const Px=15,_x=i.forwardRef((e,t)=>{const{value:n,onChange:o,min:r,max:a,targetRange:s,precision:c,suffix:l,allowedUnits:u,...d}=e,f=i.useMemo(()=>Tx({min:r,max:a,precision:c,targetRange:s,suffix:l,allowedUnits:u}),[r,a,c,s,l,u]);return v.jsx(br,{inputRef:t,value:n,onChange:o,formatter:f,...d})});function Tx(e={}){const{min:t,max:n,targetRange:o,precision:r=Px,suffix:a,allowedUnits:s=[]}=e,{toDisplayValue:c,fromDisplayValue:l}=Nx({min:t,max:n,targetRange:o});return{parse:(u,d)=>{try{return{valid:!0,value:lo(u,f=>Ax({expression:f,displayValue:c(d),suffix:a,allowedUnits:s}),da(r),l,Pt({min:t,max:n}))}}catch{return{valid:!1}}},format:u=>lo(u,Pt({min:t,max:n}),c,da(r),d=>Mx(d,a)),incrementBy(u,d){return u+l(d)}}}function Nx(e){const{min:t,max:n,targetRange:o}=e;if(!o)return{toDisplayValue:r=>r,fromDisplayValue:r=>r};if(typeof t!="number"||typeof n!="number")throw Error("'targetRange' requires specifying 'min' and 'max'.");if(t===n)throw Error("'min' and 'max' cannot be equal.");return{toDisplayValue:ht([t,n],o),fromDisplayValue:ht(o,[t,n])}}function Mx(e,t){return Number.isNaN(e)?"":t?`${e}${t}`:`${e}`}function Ax(e){const{displayValue:t,expression:n,suffix:o="",allowedUnits:r=[]}=e,a="(\\d*\\.?\\d+)",s=`(?:${[...r,o].join("|")})*`,c=n.replace(new RegExp(`${a}${s}`,"gi"),(u,d)=>d).replace(new RegExp(`${s}${a}`,"gi"),(u,d)=>d).replace(new RegExp(`${a}%`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`%${a}`,"gi"),(u,d)=>`(${t}*${d}/100)`).replace(new RegExp(`${a}x`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp(`x${a}`,"gi"),(u,d)=>`(${t}*${d})`).replace(new RegExp("(?<!\\d)x(?!\\d)","gi"),`${t}`).trim(),l=$x(c);if(l===null)throw new Error("Invalid expression.");return l}const Ix=i.forwardRef((e,t)=>{const{value:n,onChange:o,ignoreAlpha:r=!1,...a}=e,s=i.useMemo(()=>Ox({ignoreAlpha:r}),[r]);return v.jsx(br,{inputRef:t,value:n,onChange:o,formatter:s,...a})});function Ox(e){const{ignoreAlpha:t}=e;return{parse(n,o){try{return{value:lo(n,Dx,r=>kx(r,o),Lx,r=>t?{...r,a:1}:r),valid:!0}}catch{return{valid:!1}}},format(n){return(Math.round(n.r*255).toString(16).padStart(2,"0")+Math.round(n.g*255).toString(16).padStart(2,"0")+Math.round(n.b*255).toString(16).padStart(2,"0")).toUpperCase()},incrementBy(n,o,r){return r??(r={r:!0,g:!0,b:!0}),{r:r.r?Pt(Math.round(n.r*255)+o,{min:0,max:255})/255:n.r,g:r.g?Pt(Math.round(n.g*255)+o,{min:0,max:255})/255:n.g,b:r.b?Pt(Math.round(n.b*255)+o,{min:0,max:255})/255:n.b,a:n.a}},getIncrementTargets(n){const o=n.selectionStart,r=n.selectionEnd;return o===null||r===null?null:{r:o<2||o===2&&r===2,g:o<4&&r>=3||o===4&&r===4,b:r>=5}},getIncrementSelection(n){let o,r;return n?(n.r?o=0:n.g?o=2:o=4,n.b?r=6:n.g?r=4:r=2,[o,r]):[0,6]}}}function Dx(e){var n;const t=/[0-9a-f]+/gi;return((n=e.match(t))==null?void 0:n[0])??""}function kx(e,t){if(!/^[0-9a-f]{1,8}$/i.test(e))throw new Error("Invalid hex substring");switch(e.length){case 1:return e.repeat(6)+Jt(t.a);case 2:return e.repeat(3)+Jt(t.a);case 3:return e.split("").map(n=>n.repeat(2)).join("")+Jt(t.a);case 4:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e[3].repeat(2);case 5:return e.slice(0,3).split("").map(n=>n.repeat(2)).join("")+e.slice(-2);case 6:return e+Jt(t.a);case 7:return e.slice(0,6)+e[6].repeat(2);case 8:return e;default:throw new Error("Invalid hex substring")}}function Lx(e){return{r:parseInt(e.substring(0,2),16)/255,g:parseInt(e.substring(2,4),16)/255,b:parseInt(e.substring(4,6),16)/255,a:parseInt(e.substring(6,8),16)/255}}function Jt(e){return Math.round(e*255).toString(16)}const jx=Object.freeze(Object.defineProperty({__proto__:null,Hex:Ix,Label:Cu,Multi:yu,Numeric:_x,Root:wu},Symbol.toStringTag,{value:"Module"}));var xr="Collapsible",[Fx,nw]=he(xr),[Bx,$r]=Fx(xr),Pu=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:a,onOpenChange:s,...c}=e,[l=!1,u]=Ee({prop:o,defaultProp:r,onChange:s});return v.jsx(Bx,{scope:n,disabled:a,contentId:Ze(),open:l,onOpenToggle:m.useCallback(()=>u(d=>!d),[u]),children:v.jsx(W.div,{"data-state":yr(l),"data-disabled":a?"":void 0,...c,ref:t})})});Pu.displayName=xr;var _u="CollapsibleTrigger",Tu=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=$r(_u,n);return v.jsx(W.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":yr(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:z(e.onClick,r.onOpenToggle)})});Tu.displayName=_u;var wr="CollapsibleContent",Nu=m.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=$r(wr,e.__scopeCollapsible);return v.jsx(Ne,{present:n||r.open,children:({present:a})=>v.jsx(Vx,{...o,ref:t,present:a})})});Nu.displayName=wr;var Vx=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...a}=e,s=$r(wr,n),[c,l]=m.useState(o),u=m.useRef(null),d=ee(t,u),f=m.useRef(0),h=f.current,g=m.useRef(0),b=g.current,p=s.open||c,x=m.useRef(p),$=m.useRef();return m.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),je(()=>{const w=u.current;if(w){$.current=$.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const y=w.getBoundingClientRect();f.current=y.height,g.current=y.width,x.current||(w.style.transitionDuration=$.current.transitionDuration,w.style.animationName=$.current.animationName),l(o)}},[s.open,o]),v.jsx(W.div,{"data-state":yr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!p,...a,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:p&&r})});function yr(e){return e?"open":"closed"}var zx=Pu,Wx=Tu,Hx=Nu;const Mu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(zx,{ref:t,className:T(n,"fp-CollapsibleRoot"),...o})}),Au=i.forwardRef((e,t)=>{const{className:n,children:o,...r}=e;return v.jsxs(Wx,{ref:t,className:T(n,"fp-CollapsibleTrigger"),...r,children:[v.jsx(Eo,{viewBox:"4 4 16 16",size:"4",className:"fp-CollapsibleIndicator"}),o]})}),Iu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(Hx,{ref:t,className:T(n,"fp-CollapsibleContent"),...o})});Mu.displayName="Collapsible.Root";Au.displayName="Collapsible.Trigger";Iu.displayName="Collapsible.Content";const Gx=Object.freeze(Object.defineProperty({__proto__:null,Content:Iu,Root:Mu,Trigger:Au},Symbol.toStringTag,{value:"Module"})),Yn={0:"fp-gap-0",px:"fp-gap-px","0_5":"fp-gap-0_5",1:"fp-gap-1","1_5":"fp-gap-1_5",2:"fp-gap-2","2_5":"fp-gap-2_5",3:"fp-gap-3","3_5":"fp-gap-3_5",4:"fp-gap-4",5:"fp-gap-5",6:"fp-gap-6",7:"fp-gap-7",8:"fp-gap-8",9:"fp-gap-9",10:"fp-gap-10",11:"fp-gap-11",12:"fp-gap-12",13:"fp-gap-13",14:"fp-gap-14",15:"fp-gap-15",16:"fp-gap-16"},Ux=ze("fp-Flex",{variants:{direction:{row:"fp-direction-row",column:"fp-direction-column",rowReverse:"fp-direction-row-reverse",columnReverse:"fp-direction-column-reverse"},align:{start:"fp-align-start",center:"fp-align-center",end:"fp-align-end",baseline:"fp-align-baseline",stretch:"fp-align-stretch"},justify:{start:"fp-justify-start",center:"fp-justify-center",end:"fp-justify-end",between:"fp-justify-between"},wrap:{nowrap:"fp-wrap-nowrap",wrap:"fp-wrap-wrap",wrapReverse:"fp-wrap-wrap-reverse"},gap:Yn,columnGap:Yn,rowGap:Yn},defaultVariants:{direction:"row"}}),Ou=i.forwardRef((e,t)=>{const{className:n,direction:o,align:r,justify:a,wrap:s,gap:c,columnGap:l,rowGap:u,...d}=e;return v.jsx("div",{ref:t,className:Ux({className:n,direction:o,align:r,justify:a,wrap:s,gap:c,columnGap:l,rowGap:u}),...d})});Ou.displayName="Flex";const Kx=ze("fp-Button",{variants:{variant:{primary:"fp-variant-primary",secondary:"fp-variant-secondary",inverse:"fp-variant-inverse",destructive:"fp-variant-destructive",success:"fp-variant-success",text:"fp-variant-text"},size:{small:"fp-size-small",medium:"fp-size-medium"},fullWidth:{true:"fp-full-width"}},defaultVariants:{variant:"secondary",size:"small"}}),Du=i.forwardRef((e,t)=>{const{className:n,variant:o,size:r,fullWidth:a,...s}=e;return v.jsx("button",{ref:t,className:Kx({className:n,variant:o,size:r,fullWidth:a}),...s})});Du.displayName="Button";function Yx(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}var Xx=i.useLayoutEffect,qx=function(t){var n=m.useRef(t);return Xx(function(){n.current=t}),n},ma=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Zx=function(t,n){var o=i.useRef();return i.useCallback(function(r){t.current=r,o.current&&ma(o.current,null),o.current=n,n&&ma(n,r)},[n])},va={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Qx=function(t){Object.keys(va).forEach(function(n){t.style.setProperty(n,va[n],"important")})},ha=Qx,ce=null,ga=function(t,n){var o=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?o+n.borderSize:o-n.paddingSize};function Jx(e,t,n,o){n===void 0&&(n=1),o===void 0&&(o=1/0),ce||(ce=document.createElement("textarea"),ce.setAttribute("tabindex","-1"),ce.setAttribute("aria-hidden","true"),ha(ce)),ce.parentNode===null&&document.body.appendChild(ce);var r=e.paddingSize,a=e.borderSize,s=e.sizingStyle,c=s.boxSizing;Object.keys(s).forEach(function(h){var g=h;ce.style[g]=s[g]}),ha(ce),ce.value=t;var l=ga(ce,e);ce.value=t,l=ga(ce,e),ce.value="x";var u=ce.scrollHeight-r,d=u*n;c==="border-box"&&(d=d+r+a),l=Math.max(d,l);var f=u*o;return c==="border-box"&&(f=f+r+a),l=Math.min(f,l),[l,u]}var ba=function(){},e$=function(t,n){return t.reduce(function(o,r){return o[r]=n[r],o},{})},t$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],n$=!!document.documentElement.currentStyle,o$=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var o=e$(t$,n),r=o.boxSizing;if(r==="")return null;n$&&r==="border-box"&&(o.width=parseFloat(o.width)+parseFloat(o.borderRightWidth)+parseFloat(o.borderLeftWidth)+parseFloat(o.paddingRight)+parseFloat(o.paddingLeft)+"px");var a=parseFloat(o.paddingBottom)+parseFloat(o.paddingTop),s=parseFloat(o.borderBottomWidth)+parseFloat(o.borderTopWidth);return{sizingStyle:o,paddingSize:a,borderSize:s}},r$=o$;function ku(e,t,n){var o=qx(n);m.useLayoutEffect(function(){var r=function(s){return o.current(s)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var a$=function(t){ku(window,"resize",t)},s$=function(t){ku(document.fonts,"loadingdone",t)},c$=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],i$=function(t,n){var o=t.cacheMeasurements,r=t.maxRows,a=t.minRows,s=t.onChange,c=s===void 0?ba:s,l=t.onHeightChange,u=l===void 0?ba:l,d=Yx(t,c$),f=d.value!==void 0,h=m.useRef(null),g=Zx(h,n),b=m.useRef(0),p=m.useRef(),x=function(){var y=h.current,C=o&&p.current?p.current:r$(y);if(C){p.current=C;var E=Jx(C,y.value||y.placeholder||"x",a,r),_=E[0],S=E[1];b.current!==_&&(b.current=_,y.style.setProperty("height",_+"px","important"),u(_,{rowHeight:S}))}},$=function(y){f||x(),c(y)};return m.useLayoutEffect(x),a$(x),s$(x),m.createElement("textarea",R({},d,{onChange:$,ref:g}))},l$=m.forwardRef(i$);const Lu=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(l$,{className:T(n,"fp-textarea"),ref:t,...o})});Lu.displayName="Textarea";function ju(e,[t,n]){return Math.min(n,Math.max(t,e))}var Fu=["PageUp","PageDown"],Bu=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Et="Slider",[uo,u$,d$]=ya(Et),[zu,ow]=he(Et,[d$]),[f$,Mn]=zu(Et),Wu=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:s="horizontal",disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:g=!1,...b}=e,p=m.useRef(new Set),x=m.useRef(0),w=s==="horizontal"?p$:m$,[y=[],C]=Ee({prop:d,defaultProp:u,onChange:N=>{var k;(k=[...p.current][x.current])==null||k.focus(),f(N)}}),E=m.useRef(y);function _(N){const D=$$(y,N);I(N,D)}function S(N){I(N,x.current)}function P(){const N=E.current[x.current];y[x.current]!==N&&h(y)}function I(N,D,{commit:k}={commit:!1}){const V=E$(a),F=S$(Math.round((N-o)/a)*a+o,V),O=ju(F,[o,r]);C((B=[])=>{const j=b$(B,O,D);if(C$(j,l*a)){x.current=j.indexOf(O);const H=String(j)!==String(B);return H&&k&&h(j),H?j:B}else return B})}return v.jsx(f$,{scope:e.__scopeSlider,name:n,disabled:c,min:o,max:r,valueIndexToChangeRef:x,thumbs:p.current,values:y,orientation:s,children:v.jsx(uo.Provider,{scope:e.__scopeSlider,children:v.jsx(uo.Slot,{scope:e.__scopeSlider,children:v.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:t,onPointerDown:z(b.onPointerDown,()=>{c||(E.current=y)}),min:o,max:r,inverted:g,onSlideStart:c?void 0:_,onSlideMove:c?void 0:S,onSlideEnd:c?void 0:P,onHomeKeyDown:()=>!c&&I(o,0,{commit:!0}),onEndKeyDown:()=>!c&&I(r,y.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:D})=>{if(!c){const F=Fu.includes(N.key)||N.shiftKey&&Bu.includes(N.key)?10:1,O=x.current,B=y[O],j=a*F*D;I(B+j,O,{commit:!0})}}})})})})});Wu.displayName=Et;var[Hu,Gu]=zu(Et,{startEdge:"left",endEdge:"right",size:"width",direction:1}),p$=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=e,[f,h]=m.useState(null),g=ee(t,y=>h(y)),b=m.useRef(),p=It(r),x=p==="ltr",$=x&&!a||!x&&a;function w(y){const C=b.current||f.getBoundingClientRect(),E=[0,C.width],S=Cr(E,$?[n,o]:[o,n]);return b.current=C,S(y-C.left)}return v.jsx(Hu,{scope:e.__scopeSlider,startEdge:$?"left":"right",endEdge:$?"right":"left",direction:$?1:-1,size:"width",children:v.jsx(Uu,{dir:p,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const C=w(y.clientX);s==null||s(C)},onSlideMove:y=>{const C=w(y.clientX);c==null||c(C)},onSlideEnd:()=>{b.current=void 0,l==null||l()},onStepKeyDown:y=>{const E=Vu[$?"from-left":"from-right"].includes(y.key);u==null||u({event:y,direction:E?-1:1})}})})}),m$=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,d=m.useRef(null),f=ee(t,d),h=m.useRef(),g=!r;function b(p){const x=h.current||d.current.getBoundingClientRect(),$=[0,x.height],y=Cr($,g?[o,n]:[n,o]);return h.current=x,y(p-x.top)}return v.jsx(Hu,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:v.jsx(Uu,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const x=b(p.clientY);a==null||a(x)},onSlideMove:p=>{const x=b(p.clientY);s==null||s(x)},onSlideEnd:()=>{h.current=void 0,c==null||c()},onStepKeyDown:p=>{const $=Vu[g?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:$?-1:1})}})})}),Uu=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:c,onStepKeyDown:l,...u}=e,d=Mn(Et,n);return v.jsx(W.span,{...u,ref:t,onKeyDown:z(e.onKeyDown,f=>{f.key==="Home"?(s(f),f.preventDefault()):f.key==="End"?(c(f),f.preventDefault()):Fu.concat(Bu).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:z(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():o(f)}),onPointerMove:z(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&r(f)}),onPointerUp:z(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),a(f))})})}),Ku="SliderTrack",Yu=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Mn(Ku,n);return v.jsx(W.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});Yu.displayName=Ku;var fo="SliderRange",v$=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=Mn(fo,n),a=Gu(fo,n),s=m.useRef(null),c=ee(t,s),l=r.values.length,u=r.values.map(h=>qu(h,r.min,r.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return v.jsx(W.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:c,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:f+"%"}})});v$.displayName=fo;var po="SliderThumb",Xu=m.forwardRef((e,t)=>{const n=u$(e.__scopeSlider),[o,r]=m.useState(null),a=ee(t,c=>r(c)),s=m.useMemo(()=>o?n().findIndex(c=>c.ref.current===o):-1,[n,o]);return v.jsx(h$,{...e,ref:a,index:s})}),h$=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,s=Mn(po,n),c=Gu(po,n),[l,u]=m.useState(null),d=ee(t,$=>u($)),f=l?!!l.closest("form"):!0,h=$o(l),g=s.values[o],b=g===void 0?0:qu(g,s.min,s.max),p=x$(o,s.values.length),x=h==null?void 0:h[c.size];return x&&w$(x,b,c.direction),m.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),v.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`${b}%`},children:[v.jsx(uo.ItemSlot,{scope:e.__scopeSlider,children:v.jsx(W.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":s.min,"aria-valuenow":g,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:g===void 0?{display:"none"}:e.style,onFocus:z(e.onFocus,()=>{s.valueIndexToChangeRef.current=o})})}),f&&v.jsx(g$,{name:r??(s.name?s.name+(s.values.length>1?"[]":""):void 0),value:g},o)]})});Xu.displayName=po;var g$=e=>{const{value:t,...n}=e,o=m.useRef(null),r=os(t);return m.useEffect(()=>{const a=o.current,s=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(s,"value").set;if(r!==t&&l){const u=new Event("input",{bubbles:!0});l.call(a,t),a.dispatchEvent(u)}},[r,t]),v.jsx("input",{style:{display:"none"},...n,ref:o,defaultValue:t})};function b$(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function qu(e,t,n){const a=100/(n-t)*(e-t);return ju(a,[0,100])}function x$(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $$(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function w$(e,t,n){const o=e/2,a=Cr([0,50],[0,o]);return(o-a(t)*n)*n}function y$(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function C$(e,t){if(t>0){const n=y$(e);return Math.min(...n)>=t}return!0}function Cr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function E$(e){return(String(e).split(".")[1]||"").length}function S$(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var R$=Wu,P$=Yu,_$=Xu;const T$=2,N$=0,M$=100,A$="horizontal",I$="ltr",Zu=i.forwardRef((e,t)=>{const{className:n,min:o=N$,max:r=M$,defaultValue:a=[o],value:s,onValueChange:c,orientation:l=A$,dir:u=I$,inverted:d,disabled:f,range:h=!0,rangeAnchor:g,baseValue:b,hints:p,...x}=e,$=i.useRef(null),w=dn($,t),{onPointerDown:y,focusVisible:C}=L$($),[E,_]=i.useState(s??a),S=i.useRef(s),P=i.useRef(a);i.useEffect(()=>{fa(s,S.current)&&fa(a,P.current)||_(s??a)},[s,a]),i.useEffect(()=>{$.current&&$.current.style.setProperty("--radix-slider-thumb-transform",k$(l,u,d))},[$,l,u,d]);const I=N=>{const D=N.map(k=>j$(k,p,o,r));c==null||c(D),_(D)};return v.jsxs(R$,{tabIndex:-1,ref:w,className:T(n,"fp-SliderRoot"),value:E,onValueChange:I,onPointerDown:y,min:o,max:r,orientation:l,dir:u,inverted:d,disabled:f,...x,children:[v.jsx(P$,{className:"fp-SliderTrack"}),h&&v.jsx(D$,{dir:u,value:E,min:o,max:r,orientation:l,inverted:d,rangeAnchor:g,disabled:f}),p&&p.map(N=>v.jsx(O$,{hint:N,baseValue:b,min:o,max:r,orientation:l,dir:u,inverted:d},N)),E.map((N,D)=>v.jsx(_$,{className:T("fp-SliderThumb",{"fp-SliderThumb-focusVisible":C,"fp-SliderThumb-modified":N!==b})},D))]})});Zu.displayName="Slider";const O$=e=>{const{baseValue:t,dir:n,inverted:o,max:r,min:a,orientation:s,hint:c}=e,{startEdge:l}=Qu(s,n,o),u=ht([a,r],[0,100])(c),d=4;return v.jsx(v.Fragment,{children:v.jsx("span",{className:T("fp-SliderHint",{"fp-SliderHint-baseValue":c===t}),"data-orientation":s,style:{[l]:`calc(${u}% - ${d/2}px)`}})})},D$=e=>{const{min:t,max:n,value:o,rangeAnchor:r=t,orientation:a,dir:s,inverted:c,disabled:l}=e,u=o.length>1?Math.min(...o):Math.min(r,...o),d=o.length>1?Math.max(...o):Math.max(r,...o),f=ht([t,n],[0,100])(u),h=100-ht([t,n],[0,100])(d),g=Qu(a,s,c);return v.jsx("span",{className:"fp-SliderRange","data-orientation":a,"data-disabled":l?"":void 0,style:{[g.startEdge]:`${f}%`,[g.endEdge]:`${h}%`}})};function Qu(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:{startEdge:"bottom",endEdge:"top"},inverted:{startEdge:"top",endEdge:"bottom"}},horizontal:{normal:{startEdge:t==="ltr"?"left":"right",endEdge:t==="ltr"?"right":"left"},inverted:{startEdge:t==="ltr"?"right":"left",endEdge:t==="ltr"?"left":"right"}}}[e][o]}function k$(e,t,n){const o=n?"inverted":"normal";return{vertical:{normal:"translateY(50%)",inverted:"translateY(-50%)"},horizontal:{normal:t==="ltr"?"translateX(-50%)":"translateX(50%)",inverted:t==="ltr"?"translateX(50%)":"translateX(-50%)"}}[e][o]}function L$(e){const[t,n]=i.useState(!1),o=()=>{var a;n(!1),window.removeEventListener("pointerup",o),(a=e.current)==null||a.focus()};return{onPointerDown:()=>{n(!0),window.addEventListener("pointerup",o)},focusVisible:!t}}function j$(e,t,n,o){const r=ht([0,100],[0,o-n])(T$),a=t==null?void 0:t.find(s=>Math.abs(s-e)<=r);return typeof a=="number"?a:e}const Ju="Switch",[F$,rw]=Me(Ju),[B$,V$]=F$(Ju),z$=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:a,required:s,disabled:c,value:l="on",onCheckedChange:u,...d}=e,[f,h]=i.useState(null),g=J(t,w=>h(w)),b=i.useRef(!1),p=f?!!f.closest("form"):!0,[x=!1,$]=Ve({prop:r,defaultProp:a,onChange:u});return i.createElement(B$,{scope:n,checked:x,disabled:c},i.createElement(q.button,R({type:"button",role:"switch","aria-checked":x,"aria-required":s,"data-state":ed(x),"data-disabled":c?"":void 0,disabled:c,value:l},d,{ref:g,onClick:A(e.onClick,w=>{$(y=>!y),p&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),p&&i.createElement(G$,{control:f,bubbles:!b.current,name:o,value:l,checked:x,required:s,disabled:c,style:{transform:"translateX(-100%)"}}))}),W$="SwitchThumb",H$=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=V$(W$,n);return i.createElement(q.span,R({"data-state":ed(r.checked),"data-disabled":r.disabled?"":void 0},o,{ref:t}))}),G$=e=>{const{control:t,checked:n,bubbles:o=!0,...r}=e,a=i.useRef(null),s=tc(n),c=Xs(t);return i.useEffect(()=>{const l=a.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:o});f.call(l,n),l.dispatchEvent(h)}},[s,n,o]),i.createElement("input",R({type:"checkbox","aria-hidden":!0,defaultChecked:n},r,{tabIndex:-1,ref:a,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ed(e){return e?"checked":"unchecked"}const U$=z$,K$=H$,td=i.forwardRef((e,t)=>{const{className:n,...o}=e;return v.jsx(U$,{ref:t,className:T(n,"fp-switchRoot"),...o,children:v.jsx(K$,{ref:t,className:T(n,"fp-switchThumb")})})});td.displayName="Switch";exports.AlertDialog=q0;exports.Button=Du;exports.Checkbox=gf;exports.Collapsible=Gx;exports.ContextMenu=zg;exports.Dialog=T0;exports.DropdownMenu=ag;exports.Flex=Ou;exports.IconButton=Tn;exports.Input=gr;exports.Label=pn;exports.Link=Qa;exports.Paragraph=Za;exports.Popover=v0;exports.RadioGroup=lf;exports.SegmentedControl=Kd;exports.Select=$v;exports.Slider=Zu;exports.Switch=td;exports.Tabs=Ld;exports.Text=We;exports.Textarea=Lu;exports.Tooltip=ar;exports.TooltipProvider=c0;exports.ValueField=jx;exports.createIcon=He;