rechtspilot-ui 1.1.28 → 1.1.30

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
@@ -38,7 +38,7 @@
38
38
  border-radius: 0 0 0.5rem 0.5rem;
39
39
  background-color: ${e=>e.$error?c.colors.sf.light.error:c.colors.sf.tertiary};
40
40
  margin: 0 0.625rem;
41
- `;function $r({error:e,children:t,...n}){return c.jsxRuntimeExports.jsx(du,{$error:!!e,...n,children:t})}const fu=I.styled.div`
41
+ `;function an({error:e,children:t,...n}){return c.jsxRuntimeExports.jsx(du,{$error:!!e,...n,children:t})}const fu=I.styled.div`
42
42
  height: 3.063rem;
43
43
  border-radius: 0.75rem;
44
44
  background: ${c.colors.sf.tertiary};
@@ -88,7 +88,7 @@
88
88
  transform: translateY(-5%);
89
89
  font-size: 0.75rem;
90
90
  cursor: pointer;
91
- `;function vu({label:e,value:t,onChange:n,error:r,helperText:o,time:s,...l}){const a=ee.useRef(null),d=ee.useId(),u=()=>{if(a.current)try{a.current.showPicker(),a.current.focus()}catch{a.current.focus()}};return c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsxs(fu,{$error:!!r,onClick:u,children:[c.jsxRuntimeExports.jsx(c.Calendar,{}),c.jsxRuntimeExports.jsxs(mu,{children:[c.jsxRuntimeExports.jsx(pu,{style:{cursor:"text",width:"fit-content"},ref:a,type:s?"datetime-local":"date",id:`${d}-${e}`,required:!0,onClick:p=>p.stopPropagation(),onChange:p=>n(p.target.value),value:t,...l}),c.jsxRuntimeExports.jsx(hu,{htmlFor:`${d}-${e}`,children:e})]})]}),(r||o)&&c.jsxRuntimeExports.jsx($r,{error:!!r,children:r||o})]})}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Is(...e){return t=>e.forEach(n=>xu(n,t))}function Ge(...e){return i.useCallback(Is(...e),e)}function gu(e,t){const n=i.createContext(t),r=s=>{const{children:l,...a}=s,d=i.useMemo(()=>a,Object.values(a));return c.jsxRuntimeExports.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=i.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ze(e,t=[]){let n=[];function r(s,l){const a=i.createContext(l),d=n.length;n=[...n,l];const u=m=>{var g;const{scope:v,children:x,...E}=m,f=((g=v==null?void 0:v[e])==null?void 0:g[d])||a,h=i.useMemo(()=>E,Object.values(E));return c.jsxRuntimeExports.jsx(f.Provider,{value:h,children:x})};u.displayName=s+"Provider";function p(m,v){var f;const x=((f=v==null?void 0:v[e])==null?void 0:f[d])||a,E=i.useContext(x);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,p]}const o=()=>{const s=n.map(l=>i.createContext(l));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,yu(o,...t)]}function yu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var se=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Eu=i.useId||(()=>{}),wu=0;function fe(e){const[t,n]=i.useState(Eu());return se(()=>{n(r=>r??String(wu++))},[e]),t?`radix-${t}`:""}function oe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=bu({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r,a=oe(n),d=i.useCallback(u=>{if(s){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[s,e,o,a]);return[l,d]}function bu({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=oe(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var an=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(Cu);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(rr,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(rr,{...r,ref:t,children:n})});an.displayName="Slot";var rr=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=ju(n);return i.cloneElement(n,{...Su(r,n.props),ref:t?Is(t,o):o})}return i.Children.count(n)>1?i.Children.only(null):null});rr.displayName="SlotClone";var Ru=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function Cu(e){return i.isValidElement(e)&&e.type===Ru}function Su(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ju(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ne=Pu.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?an:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Tu(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}function cn(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Au="DismissableLayer",or="dismissableLayer.update",Nu="dismissableLayer.pointerDownOutside",$u="dismissableLayer.focusOutside",No,Ms=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ks=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(Ms),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=Ge(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Iu(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Mu(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return cn(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(No=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),$o(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=No)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),$o())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(or,b),()=>document.removeEventListener(or,b)},[]),c.jsxRuntimeExports.jsx(Ne.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,C.onPointerDownCapture)})});ks.displayName=Au;var Ou="DismissableLayerBranch",Du=i.forwardRef((e,t)=>{const n=i.useContext(Ms),r=i.useRef(null),o=Ge(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Ne.div,{...e,ref:o})});Du.displayName=Ou;function Iu(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Ls(Nu,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mu(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ls($u,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $o(){const e=new CustomEvent(or);document.dispatchEvent(e)}function Ls(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tu(o,s):o.dispatchEvent(s)}var On="focusScope.autoFocusOnMount",Dn="focusScope.autoFocusOnUnmount",Oo={bubbles:!1,cancelable:!0},ku="FocusScope",_s=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=oe(o),p=oe(s),m=i.useRef(null),v=Ge(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:$e(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||$e(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&$e(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){Io.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(On,Oo);a.addEventListener(On,u),a.dispatchEvent(g),g.defaultPrevented||(Lu(Hu(Fs(a)),{select:!0}),document.activeElement===f&&$e(a))}return()=>{a.removeEventListener(On,u),setTimeout(()=>{const g=new CustomEvent(Dn,Oo);a.addEventListener(Dn,p),a.dispatchEvent(g),g.defaultPrevented||$e(f??document.body,{select:!0}),a.removeEventListener(Dn,p),Io.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=_u(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&$e(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&$e(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(Ne.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});_s.displayName=ku;function Lu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($e(r,{select:t}),document.activeElement!==n)return}function _u(e){const t=Fs(e),n=Do(t,e),r=Do(t.reverse(),e);return[n,r]}function Fs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Do(e,t){for(const n of e)if(!Fu(n,{upTo:t}))return n}function Fu(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 Wu(e){return e instanceof HTMLInputElement&&"select"in e}function $e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wu(e)&&t&&e.select()}}var Io=Bu();function Bu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mo(e,t),e.unshift(t)},remove(t){var n;e=Mo(e,t),(n=e[0])==null||n.resume()}}}function Mo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hu(e){return e.filter(t=>t.tagName!=="A")}var Vu="Portal",Ws=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);se(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(Ne.div,{...r,ref:t}),l):null});Ws.displayName=Vu;function Uu(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var ln=e=>{const{present:t,children:n}=e,r=zu(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=Ge(r.ref,Ku(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};ln.displayName="Presence";function zu(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Uu(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Ot(r.current);s.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Ot(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),se(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Ot(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Ot(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ot(e){return(e==null?void 0:e.animationName)||"none"}function Ku(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var In=0;function Bs(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ko()),document.body.insertAdjacentElement("beforeend",e[1]??ko()),In++,()=>{In===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),In--}},[])}function ko(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ne=function(){return ne=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ne.apply(this,arguments)};function Pt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Or(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var zt="right-scroll-bar-position",Kt="width-before-scroll-bar",Yu="with-scroll-bars-hidden",Xu="--removed-body-scroll-bar-size";function Mn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gu(e,t){var n=ee.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Zu=typeof window<"u"?i.useLayoutEffect:i.useEffect,Lo=new WeakMap;function qu(e,t){var n=Gu(null,function(r){return e.forEach(function(o){return Mn(o,r)})});return Zu(function(){var r=Lo.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(a){s.has(a)||Mn(a,null)}),s.forEach(function(a){o.has(a)||Mn(a,l)})}Lo.set(n,e)},[e]),n}function Qu(e){return e}function Ju(e,t){t===void 0&&(t=Qu);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(a){return a!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var a=n;n=[],a.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(p){l.push(p),u()},filter:function(p){return l=l.filter(p),n}}}};return o}function Hs(e){e===void 0&&(e={});var t=Ju(null);return t.options=ne({async:!0,ssr:!1},e),t}var Vs=function(e){var t=e.sideCar,n=Pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,ne({},n))};Vs.isSideCarExport=!0;function Us(e,t){return e.useMedium(t),Vs}var zs=Hs(),kn=function(){},un=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:kn,onWheelCapture:kn,onTouchMoveCapture:kn}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noIsolation,E=e.inert,f=e.allowPinchZoom,h=e.as,g=h===void 0?"div":h,y=e.gapMode,w=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,C=qu([n,t]),S=ne(ne({},w),o);return i.createElement(i.Fragment,null,p&&i.createElement(R,{sideCar:zs,removeScrollBar:u,shards:m,noIsolation:x,inert:E,setCallbacks:s,allowPinchZoom:!!f,lockRef:n,gapMode:y}),l?i.cloneElement(i.Children.only(a),ne(ne({},S),{ref:C})):i.createElement(g,ne({},S,{className:d,ref:C}),a))});un.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};un.classNames={fullWidth:Kt,zeroRight:zt};var Ks=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ed(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ks();return t&&e.setAttribute("nonce",t),e}function td(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ed())&&(td(t,n),nd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},od=function(){var e=rd();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Dr=function(){var e=od(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},sd={left:0,top:0,right:0,gap:0},Ln=function(e){return parseInt(e||"",10)||0},id=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ln(n),Ln(r),Ln(o)]},ad=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sd;var t=id(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cd=Dr(),it="data-scroll-locked",ld=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),`
91
+ `;function vu({label:e,value:t,onChange:n,error:r,helperText:o,time:s,...l}){const a=ee.useRef(null),d=ee.useId(),u=()=>{if(a.current)try{a.current.showPicker(),a.current.focus()}catch{a.current.focus()}};return c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsxs(fu,{$error:!!r,onClick:u,children:[c.jsxRuntimeExports.jsx(c.Calendar,{}),c.jsxRuntimeExports.jsxs(mu,{children:[c.jsxRuntimeExports.jsx(pu,{style:{cursor:"text",width:"fit-content"},ref:a,type:s?"datetime-local":"date",id:`${d}-${e}`,required:!0,onClick:p=>p.stopPropagation(),onChange:p=>n(p.target.value),value:t,...l}),c.jsxRuntimeExports.jsx(hu,{htmlFor:`${d}-${e}`,children:e})]})]}),(r||o)&&c.jsxRuntimeExports.jsx(an,{error:!!r,children:r||o})]})}function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Is(...e){return t=>e.forEach(n=>xu(n,t))}function Ge(...e){return i.useCallback(Is(...e),e)}function gu(e,t){const n=i.createContext(t),r=s=>{const{children:l,...a}=s,d=i.useMemo(()=>a,Object.values(a));return c.jsxRuntimeExports.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=i.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Ze(e,t=[]){let n=[];function r(s,l){const a=i.createContext(l),d=n.length;n=[...n,l];const u=m=>{var g;const{scope:v,children:x,...E}=m,f=((g=v==null?void 0:v[e])==null?void 0:g[d])||a,h=i.useMemo(()=>E,Object.values(E));return c.jsxRuntimeExports.jsx(f.Provider,{value:h,children:x})};u.displayName=s+"Provider";function p(m,v){var f;const x=((f=v==null?void 0:v[e])==null?void 0:f[d])||a,E=i.useContext(x);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,p]}const o=()=>{const s=n.map(l=>i.createContext(l));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,yu(o,...t)]}function yu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var se=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},Eu=i.useId||(()=>{}),wu=0;function fe(e){const[t,n]=i.useState(Eu());return se(()=>{n(r=>r??String(wu++))},[e]),t?`radix-${t}`:""}function oe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rt({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=bu({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r,a=oe(n),d=i.useCallback(u=>{if(s){const m=typeof u=="function"?u(e):u;m!==e&&a(m)}else o(u)},[s,e,o,a]);return[l,d]}function bu({defaultProp:e,onChange:t}){const n=i.useState(e),[r]=n,o=i.useRef(r),s=oe(t);return i.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var cn=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(Cu);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(or,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(or,{...r,ref:t,children:n})});cn.displayName="Slot";var or=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=ju(n);return i.cloneElement(n,{...Su(r,n.props),ref:t?Is(t,o):o})}return i.Children.count(n)>1?i.Children.only(null):null});or.displayName="SlotClone";var Ru=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function Cu(e){return i.isValidElement(e)&&e.type===Ru}function Su(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ju(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ne=Pu.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?cn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Tu(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}function ln(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Au="DismissableLayer",sr="dismissableLayer.update",Nu="dismissableLayer.pointerDownOutside",$u="dismissableLayer.focusOutside",No,ks=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ms=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(ks),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=Ge(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Iu(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=ku(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return ln(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(No=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),$o(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=No)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),$o())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(sr,b),()=>document.removeEventListener(sr,b)},[]),c.jsxRuntimeExports.jsx(Ne.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,C.onPointerDownCapture)})});Ms.displayName=Au;var Ou="DismissableLayerBranch",Du=i.forwardRef((e,t)=>{const n=i.useContext(ks),r=i.useRef(null),o=Ge(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Ne.div,{...e,ref:o})});Du.displayName=Ou;function Iu(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Ls(Nu,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ku(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Ls($u,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $o(){const e=new CustomEvent(sr);document.dispatchEvent(e)}function Ls(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tu(o,s):o.dispatchEvent(s)}var Dn="focusScope.autoFocusOnMount",In="focusScope.autoFocusOnUnmount",Oo={bubbles:!1,cancelable:!0},Mu="FocusScope",_s=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=oe(o),p=oe(s),m=i.useRef(null),v=Ge(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:$e(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||$e(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&$e(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){Io.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Dn,Oo);a.addEventListener(Dn,u),a.dispatchEvent(g),g.defaultPrevented||(Lu(Hu(Fs(a)),{select:!0}),document.activeElement===f&&$e(a))}return()=>{a.removeEventListener(Dn,u),setTimeout(()=>{const g=new CustomEvent(In,Oo);a.addEventListener(In,p),a.dispatchEvent(g),g.defaultPrevented||$e(f??document.body,{select:!0}),a.removeEventListener(In,p),Io.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=_u(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&$e(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&$e(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(Ne.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});_s.displayName=Mu;function Lu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($e(r,{select:t}),document.activeElement!==n)return}function _u(e){const t=Fs(e),n=Do(t,e),r=Do(t.reverse(),e);return[n,r]}function Fs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Do(e,t){for(const n of e)if(!Fu(n,{upTo:t}))return n}function Fu(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 Wu(e){return e instanceof HTMLInputElement&&"select"in e}function $e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wu(e)&&t&&e.select()}}var Io=Bu();function Bu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ko(e,t),e.unshift(t)},remove(t){var n;e=ko(e,t),(n=e[0])==null||n.resume()}}}function ko(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hu(e){return e.filter(t=>t.tagName!=="A")}var Vu="Portal",Ws=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);se(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(Ne.div,{...r,ref:t}),l):null});Ws.displayName=Vu;function Uu(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var un=e=>{const{present:t,children:n}=e,r=zu(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=Ge(r.ref,Ku(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};un.displayName="Presence";function zu(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Uu(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Ot(r.current);s.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Ot(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),se(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Ot(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Ot(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ot(e){return(e==null?void 0:e.animationName)||"none"}function Ku(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kn=0;function Bs(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),kn++,()=>{kn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kn--}},[])}function Mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ne=function(){return ne=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ne.apply(this,arguments)};function Pt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Or(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var zt="right-scroll-bar-position",Kt="width-before-scroll-bar",Yu="with-scroll-bars-hidden",Xu="--removed-body-scroll-bar-size";function Mn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gu(e,t){var n=ee.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Zu=typeof window<"u"?i.useLayoutEffect:i.useEffect,Lo=new WeakMap;function qu(e,t){var n=Gu(null,function(r){return e.forEach(function(o){return Mn(o,r)})});return Zu(function(){var r=Lo.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(a){s.has(a)||Mn(a,null)}),s.forEach(function(a){o.has(a)||Mn(a,l)})}Lo.set(n,e)},[e]),n}function Qu(e){return e}function Ju(e,t){t===void 0&&(t=Qu);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(a){return a!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var a=n;n=[],a.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(p){l.push(p),u()},filter:function(p){return l=l.filter(p),n}}}};return o}function Hs(e){e===void 0&&(e={});var t=Ju(null);return t.options=ne({async:!0,ssr:!1},e),t}var Vs=function(e){var t=e.sideCar,n=Pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,ne({},n))};Vs.isSideCarExport=!0;function Us(e,t){return e.useMedium(t),Vs}var zs=Hs(),Ln=function(){},dn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Ln,onWheelCapture:Ln,onTouchMoveCapture:Ln}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noIsolation,E=e.inert,f=e.allowPinchZoom,h=e.as,g=h===void 0?"div":h,y=e.gapMode,w=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,C=qu([n,t]),S=ne(ne({},w),o);return i.createElement(i.Fragment,null,p&&i.createElement(R,{sideCar:zs,removeScrollBar:u,shards:m,noIsolation:x,inert:E,setCallbacks:s,allowPinchZoom:!!f,lockRef:n,gapMode:y}),l?i.cloneElement(i.Children.only(a),ne(ne({},S),{ref:C})):i.createElement(g,ne({},S,{className:d,ref:C}),a))});dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dn.classNames={fullWidth:Kt,zeroRight:zt};var Ks=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ed(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ks();return t&&e.setAttribute("nonce",t),e}function td(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ed())&&(td(t,n),nd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},od=function(){var e=rd();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Dr=function(){var e=od(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},sd={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},id=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[_n(n),_n(r),_n(o)]},ad=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sd;var t=id(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cd=Dr(),it="data-scroll-locked",ld=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),`
92
92
  .`.concat(Yu,` {
93
93
  overflow: hidden `).concat(r,`;
94
94
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -125,22 +125,22 @@
125
125
  body[`).concat(it,`] {
126
126
  `).concat(Xu,": ").concat(a,`px;
127
127
  }
128
- `)},_o=function(){var e=parseInt(document.body.getAttribute(it)||"0",10);return isFinite(e)?e:0},ud=function(){i.useEffect(function(){return document.body.setAttribute(it,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},dd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ud();var s=i.useMemo(function(){return ad(o)},[o]);return i.createElement(cd,{styles:ld(s,!t,o,n?"":"!important")})},sr=!1;if(typeof window<"u")try{var Dt=Object.defineProperty({},"passive",{get:function(){return sr=!0,!0}});window.addEventListener("test",Dt,Dt),window.removeEventListener("test",Dt,Dt)}catch{sr=!1}var qe=sr?{passive:!1}:!1,fd=function(e){return e.tagName==="TEXTAREA"},Ys=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fd(e)&&n[t]==="visible")},pd=function(e){return Ys(e,"overflowY")},md=function(e){return Ys(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xs(e,r);if(o){var s=Gs(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xs=function(e,t){return e==="v"?pd(t):md(t)},Gs=function(e,t){return e==="v"?hd(t):vd(t)},xd=function(e,t){return e==="h"&&t==="rtl"?-1:1},gd=function(e,t,n,r,o){var s=xd(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{var x=Gs(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&Xs(e,a)&&(m+=g,v+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},It=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wo=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},yd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ed=function(e){return`
128
+ `)},_o=function(){var e=parseInt(document.body.getAttribute(it)||"0",10);return isFinite(e)?e:0},ud=function(){i.useEffect(function(){return document.body.setAttribute(it,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},dd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ud();var s=i.useMemo(function(){return ad(o)},[o]);return i.createElement(cd,{styles:ld(s,!t,o,n?"":"!important")})},ir=!1;if(typeof window<"u")try{var Dt=Object.defineProperty({},"passive",{get:function(){return ir=!0,!0}});window.addEventListener("test",Dt,Dt),window.removeEventListener("test",Dt,Dt)}catch{ir=!1}var qe=ir?{passive:!1}:!1,fd=function(e){return e.tagName==="TEXTAREA"},Ys=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fd(e)&&n[t]==="visible")},pd=function(e){return Ys(e,"overflowY")},md=function(e){return Ys(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xs(e,r);if(o){var s=Gs(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xs=function(e,t){return e==="v"?pd(t):md(t)},Gs=function(e,t){return e==="v"?hd(t):vd(t)},xd=function(e,t){return e==="h"&&t==="rtl"?-1:1},gd=function(e,t,n,r,o){var s=xd(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{var x=Gs(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&Xs(e,a)&&(m+=g,v+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},It=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wo=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},yd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ed=function(e){return`
129
129
  .block-interactivity-`.concat(e,` {pointer-events: none;}
130
130
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
131
- `)},wd=0,Qe=[];function bd(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(wd++)[0],s=i.useState(Dr)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=It(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=Fo(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=Fo(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return gd(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!Qe.length||Qe[Qe.length-1]!==s)){var g="deltaY"in h?Wo(h):It(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&yd(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(Bo).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Rd(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=It(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,Wo(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,It(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return Qe.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,qe),document.addEventListener("touchmove",d,qe),document.addEventListener("touchstart",p,qe),function(){Qe=Qe.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,qe),document.removeEventListener("touchmove",d,qe),document.removeEventListener("touchstart",p,qe)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:Ed(o)}):null,x?i.createElement(dd,{gapMode:e.gapMode}):null)}function Rd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Cd=Us(zs,bd);var Zs=i.forwardRef(function(e,t){return i.createElement(un,ne({},e,{ref:t,sideCar:Cd}))});Zs.classNames=un.classNames;var Sd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Je=new WeakMap,Mt=new WeakMap,kt={},_n=0,qs=function(e){return e&&(e.host||qs(e.parentNode))},jd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pd=function(e,t,n,r){var o=jd(t,Array.isArray(e)?e:[e]);kt[n]||(kt[n]=new WeakMap);var s=kt[n],l=[],a=new Set,d=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(a.has(v))p(v);else try{var x=v.getAttribute(r),E=x!==null&&x!=="false",f=(Je.get(v)||0)+1,h=(s.get(v)||0)+1;Je.set(v,f),s.set(v,h),l.push(v),f===1&&E&&Mt.set(v,!0),h===1&&v.setAttribute(n,"true"),E||v.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",v,g)}})};return p(t),a.clear(),_n++,function(){l.forEach(function(m){var v=Je.get(m)-1,x=s.get(m)-1;Je.set(m,v),s.set(m,x),v||(Mt.has(m)||m.removeAttribute(r),Mt.delete(m)),x||m.removeAttribute(n)}),_n--,_n||(Je=new WeakMap,Je=new WeakMap,Mt=new WeakMap,kt={})}},dn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Sd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Pd(r,o,n,"aria-hidden")):function(){return null}},Ir="Dialog",[Qs,$y]=Ze(Ir),[Td,ye]=Qs(Ir),Js=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,a=i.useRef(null),d=i.useRef(null),[u=!1,p]=Rt({prop:r,defaultProp:o,onChange:s});return c.jsxRuntimeExports.jsx(Td,{scope:t,triggerRef:a,contentRef:d,contentId:fe(),titleId:fe(),descriptionId:fe(),open:u,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};Js.displayName=Ir;var ei="DialogTrigger",Ad=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(ei,n),s=Ge(t,o.triggerRef);return c.jsxRuntimeExports.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Fr(o.open),...r,ref:s,onClick:Ie(e.onClick,o.onOpenToggle)})});Ad.displayName=ei;var Mr="DialogPortal",[Nd,ti]=Qs(Mr,{forceMount:void 0}),kr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ye(Mr,t);return c.jsxRuntimeExports.jsx(Nd,{scope:t,forceMount:n,children:i.Children.map(r,l=>c.jsxRuntimeExports.jsx(ln,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ws,{asChild:!0,container:o,children:l})}))})};kr.displayName=Mr;var qt="DialogOverlay",ni=i.forwardRef((e,t)=>{const n=ti(qt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(qt,e.__scopeDialog);return s.modal?c.jsxRuntimeExports.jsx(ln,{present:r||s.open,children:c.jsxRuntimeExports.jsx($d,{...o,ref:t})}):null});ni.displayName=qt;var $d=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(qt,n);return c.jsxRuntimeExports.jsx(Zs,{as:an,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsxRuntimeExports.jsx(Ne.div,{"data-state":Fr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ue="DialogContent",Lr=i.forwardRef((e,t)=>{const n=ti(Ue,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(Ue,e.__scopeDialog);return c.jsxRuntimeExports.jsx(ln,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Od,{...o,ref:t}):c.jsxRuntimeExports.jsx(Dd,{...o,ref:t})})});Lr.displayName=Ue;var Od=i.forwardRef((e,t)=>{const n=ye(Ue,e.__scopeDialog),r=i.useRef(null),o=Ge(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return dn(s)},[]),c.jsxRuntimeExports.jsx(ri,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&s.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault())})}),Dd=i.forwardRef((e,t)=>{const n=ye(Ue,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx(ri,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ri=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,a=ye(Ue,n),d=i.useRef(null),u=Ge(t,d);return Bs(),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(_s,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(ks,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Fr(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Id,{titleId:a.titleId}),c.jsxRuntimeExports.jsx(kd,{contentRef:d,descriptionId:a.descriptionId})]})]})}),_r="DialogTitle",oi=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(_r,n);return c.jsxRuntimeExports.jsx(Ne.h2,{id:o.titleId,...r,ref:t})});oi.displayName=_r;var si="DialogDescription",ii=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(si,n);return c.jsxRuntimeExports.jsx(Ne.p,{id:o.descriptionId,...r,ref:t})});ii.displayName=si;var ai="DialogClose",ci=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(ai,n);return c.jsxRuntimeExports.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});ci.displayName=ai;function Fr(e){return e?"open":"closed"}var li="DialogTitleWarning",[Oy,ui]=gu(li,{contentName:Ue,titleName:_r,docsSlug:"dialog"}),Id=({titleId:e})=>{const t=ui(li),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
131
+ `)},wd=0,Qe=[];function bd(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(wd++)[0],s=i.useState(Dr)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=It(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=Fo(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=Fo(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return gd(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!Qe.length||Qe[Qe.length-1]!==s)){var g="deltaY"in h?Wo(h):It(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&yd(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(Bo).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Rd(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=It(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,Wo(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,It(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return Qe.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,qe),document.addEventListener("touchmove",d,qe),document.addEventListener("touchstart",p,qe),function(){Qe=Qe.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,qe),document.removeEventListener("touchmove",d,qe),document.removeEventListener("touchstart",p,qe)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:Ed(o)}):null,x?i.createElement(dd,{gapMode:e.gapMode}):null)}function Rd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Cd=Us(zs,bd);var Zs=i.forwardRef(function(e,t){return i.createElement(dn,ne({},e,{ref:t,sideCar:Cd}))});Zs.classNames=dn.classNames;var Sd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Je=new WeakMap,kt=new WeakMap,Mt={},Fn=0,qs=function(e){return e&&(e.host||qs(e.parentNode))},jd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pd=function(e,t,n,r){var o=jd(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var s=Mt[n],l=[],a=new Set,d=new Set(o),u=function(m){!m||a.has(m)||(a.add(m),u(m.parentNode))};o.forEach(u);var p=function(m){!m||d.has(m)||Array.prototype.forEach.call(m.children,function(v){if(a.has(v))p(v);else try{var x=v.getAttribute(r),E=x!==null&&x!=="false",f=(Je.get(v)||0)+1,h=(s.get(v)||0)+1;Je.set(v,f),s.set(v,h),l.push(v),f===1&&E&&kt.set(v,!0),h===1&&v.setAttribute(n,"true"),E||v.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",v,g)}})};return p(t),a.clear(),Fn++,function(){l.forEach(function(m){var v=Je.get(m)-1,x=s.get(m)-1;Je.set(m,v),s.set(m,x),v||(kt.has(m)||m.removeAttribute(r),kt.delete(m)),x||m.removeAttribute(n)}),Fn--,Fn||(Je=new WeakMap,Je=new WeakMap,kt=new WeakMap,Mt={})}},fn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Sd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Pd(r,o,n,"aria-hidden")):function(){return null}},Ir="Dialog",[Qs,$y]=Ze(Ir),[Td,ye]=Qs(Ir),Js=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,a=i.useRef(null),d=i.useRef(null),[u=!1,p]=Rt({prop:r,defaultProp:o,onChange:s});return c.jsxRuntimeExports.jsx(Td,{scope:t,triggerRef:a,contentRef:d,contentId:fe(),titleId:fe(),descriptionId:fe(),open:u,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};Js.displayName=Ir;var ei="DialogTrigger",Ad=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(ei,n),s=Ge(t,o.triggerRef);return c.jsxRuntimeExports.jsx(Ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Fr(o.open),...r,ref:s,onClick:Ie(e.onClick,o.onOpenToggle)})});Ad.displayName=ei;var kr="DialogPortal",[Nd,ti]=Qs(kr,{forceMount:void 0}),Mr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ye(kr,t);return c.jsxRuntimeExports.jsx(Nd,{scope:t,forceMount:n,children:i.Children.map(r,l=>c.jsxRuntimeExports.jsx(un,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ws,{asChild:!0,container:o,children:l})}))})};Mr.displayName=kr;var qt="DialogOverlay",ni=i.forwardRef((e,t)=>{const n=ti(qt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(qt,e.__scopeDialog);return s.modal?c.jsxRuntimeExports.jsx(un,{present:r||s.open,children:c.jsxRuntimeExports.jsx($d,{...o,ref:t})}):null});ni.displayName=qt;var $d=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(qt,n);return c.jsxRuntimeExports.jsx(Zs,{as:cn,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsxRuntimeExports.jsx(Ne.div,{"data-state":Fr(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ue="DialogContent",Lr=i.forwardRef((e,t)=>{const n=ti(Ue,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(Ue,e.__scopeDialog);return c.jsxRuntimeExports.jsx(un,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Od,{...o,ref:t}):c.jsxRuntimeExports.jsx(Dd,{...o,ref:t})})});Lr.displayName=Ue;var Od=i.forwardRef((e,t)=>{const n=ye(Ue,e.__scopeDialog),r=i.useRef(null),o=Ge(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return fn(s)},[]),c.jsxRuntimeExports.jsx(ri,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&s.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,s=>s.preventDefault())})}),Dd=i.forwardRef((e,t)=>{const n=ye(Ue,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx(ri,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),ri=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,a=ye(Ue,n),d=i.useRef(null),u=Ge(t,d);return Bs(),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(_s,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(Ms,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Fr(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Id,{titleId:a.titleId}),c.jsxRuntimeExports.jsx(Md,{contentRef:d,descriptionId:a.descriptionId})]})]})}),_r="DialogTitle",oi=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(_r,n);return c.jsxRuntimeExports.jsx(Ne.h2,{id:o.titleId,...r,ref:t})});oi.displayName=_r;var si="DialogDescription",ii=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(si,n);return c.jsxRuntimeExports.jsx(Ne.p,{id:o.descriptionId,...r,ref:t})});ii.displayName=si;var ai="DialogClose",ci=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(ai,n);return c.jsxRuntimeExports.jsx(Ne.button,{type:"button",...r,ref:t,onClick:Ie(e.onClick,()=>o.onOpenChange(!1))})});ci.displayName=ai;function Fr(e){return e?"open":"closed"}var li="DialogTitleWarning",[Oy,ui]=gu(li,{contentName:Ue,titleName:_r,docsSlug:"dialog"}),Id=({titleId:e})=>{const t=ui(li),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
132
132
 
133
133
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
134
134
 
135
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Md="DialogDescriptionWarning",kd=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ui(Md).contentName}}.`;return i.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ld=Js,_d=kr,fn=ni,Wr=Lr,di=oi,fi=ii,Fd=ci;const Wd=Ld,Bd=_d,pi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fn,{ref:n,className:c.cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pi.displayName=fn.displayName;const Hd=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs(Bd,{children:[c.jsxRuntimeExports.jsx(pi,{}),c.jsxRuntimeExports.jsxs(Wr,{ref:r,translate:"no",className:c.cn("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,c.jsxRuntimeExports.jsxs(Fd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[c.jsxRuntimeExports.jsx(c.Close,{className:"h-4 w-4"}),c.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hd.displayName=Wr.displayName;const mi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(di,{ref:n,className:c.cn("text-lg font-semibold leading-none tracking-tight hidden",e),...t}));mi.displayName=di.displayName;const hi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fi,{ref:n,className:c.cn("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));hi.displayName=fi.displayName;function Vd({open:e,toggleDialog:t,children:n,...r}){return c.jsxRuntimeExports.jsx(Wd,{open:e,onOpenChange:t,...r,children:n})}const vi=ee.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fn,{ref:n,className:c.cn("fixed inset-0 z-50 bg-black/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));vi.displayName=fn.displayName;const Ud=I.styled(Wr)`
135
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},kd="DialogDescriptionWarning",Md=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ui(kd).contentName}}.`;return i.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ld=Js,_d=Mr,pn=ni,Wr=Lr,di=oi,fi=ii,Fd=ci;const Wd=Ld,Bd=_d,pi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(pn,{ref:n,className:c.cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));pi.displayName=pn.displayName;const Hd=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs(Bd,{children:[c.jsxRuntimeExports.jsx(pi,{}),c.jsxRuntimeExports.jsxs(Wr,{ref:r,translate:"no",className:c.cn("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,c.jsxRuntimeExports.jsxs(Fd,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[c.jsxRuntimeExports.jsx(c.Close,{className:"h-4 w-4"}),c.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Hd.displayName=Wr.displayName;const mi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(di,{ref:n,className:c.cn("text-lg font-semibold leading-none tracking-tight hidden",e),...t}));mi.displayName=di.displayName;const hi=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fi,{ref:n,className:c.cn("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));hi.displayName=fi.displayName;function Vd({open:e,toggleDialog:t,children:n,...r}){return c.jsxRuntimeExports.jsx(Wd,{open:e,onOpenChange:t,...r,children:n})}const vi=ee.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(pn,{ref:n,className:c.cn("fixed inset-0 z-50 bg-black/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));vi.displayName=pn.displayName;const Ud=I.styled(Wr)`
136
136
  width: ${({$width:e,$fullScreen:t})=>t?"100vw":e||"25.4rem"};
137
- height: ${({$height:e,$fullScreen:t})=>t?"100vh":e||"29.8rem"};
137
+ height: ${({$height:e,$fullScreen:t})=>t?"100dvh":e||"29.8rem"};
138
138
  border-radius: ${({$fullScreen:e})=>e?"0":"1.25rem"};
139
- background-color: ${c.colors.white};
139
+ background-color: ${({$background:e})=>e};
140
140
  overflow: hidden;
141
141
  display: flex;
142
142
  flex-direction: column;
143
- `,xi=ee.forwardRef(({width:e,height:t,fullScreen:n,children:r,...o},s)=>{const l=sn();return c.jsxRuntimeExports.jsxs(kr,{children:[c.jsxRuntimeExports.jsx(vi,{}),c.jsxRuntimeExports.jsxs(Ud,{$width:e,$height:t,$fullScreen:n!==void 0?n:l,ref:s,className:c.cn("fixed left-1/2 top-1/2 z-50 transform -translate-x-1/2 -translate-y-1/2"),"aria-describedby":void 0,...o,children:[c.jsxRuntimeExports.jsx(mi,{}),c.jsxRuntimeExports.jsx(hi,{}),r]})]})});xi.displayName=Lr.displayName;const zd=I.styled.div`
143
+ `,xi=ee.forwardRef(({width:e,height:t,background:n,fullScreen:r,children:o,...s},l)=>{const a=sn(),d=n||c.colors.white;return c.jsxRuntimeExports.jsxs(Mr,{children:[c.jsxRuntimeExports.jsx(vi,{}),c.jsxRuntimeExports.jsxs(Ud,{$width:e,$height:t,$fullScreen:r!==void 0?r:a,$background:d,ref:l,className:c.cn("fixed left-1/2 top-1/2 z-50 transform -translate-x-1/2 -translate-y-1/2"),"aria-describedby":void 0,...s,children:[c.jsxRuntimeExports.jsx(mi,{}),c.jsxRuntimeExports.jsx(hi,{}),o]})]})});xi.displayName=Lr.displayName;const zd=I.styled.div`
144
144
  width: 100%;
145
145
  height: 100%;
146
146
  padding: 0 2rem 2rem 2rem;
@@ -404,10 +404,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
404
404
  margin-bottom: 4mm;
405
405
  margin-top: 4mm;
406
406
  }
407
- `,Fn=I.styled.p`
407
+ `,Wn=I.styled.p`
408
408
  margin-bottom: 5.2916666667mm;
409
409
  margin-top: 5.2916666667mm;
410
- `;function wf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Date"})}function bf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Sehr geehrte Damen und Herren"})}function Rf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Mit freundlichen Grüßen"})}function Cf({address:e,children:t}){return!t&&!e?null:c.jsxRuntimeExports.jsx(ff,{children:t||e})}function Sf({address:e,children:t}){return c.jsxRuntimeExports.jsx(pf,{children:t||c.jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:e||""}})})}function jf({address:e,children:t}){return c.jsxRuntimeExports.jsx(mf,{children:t||c.jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:e||""}})})}function Pf({identificationFields:e=[],children:t}){return!t&&(!e||e.length===0)?null:c.jsxRuntimeExports.jsx(hf,{children:t||c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e.map((n,r)=>c.jsxRuntimeExports.jsxs(vf,{children:[n.label,c.jsxRuntimeExports.jsx("br",{}),c.jsxRuntimeExports.jsx("b",{children:n.value})]},r))})})}function Tf({date:e,children:t}){return!t&&!e?null:c.jsxRuntimeExports.jsx(xf,{children:t||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(wf,{}),": ",e]})})}function Af({letterSubject:e,letterText:t,userFullName:n,children:r}){return c.jsxRuntimeExports.jsx(gf,{children:r||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(yf,{children:e}),c.jsxRuntimeExports.jsxs(Fn,{children:[c.jsxRuntimeExports.jsx(bf,{}),","]}),c.jsxRuntimeExports.jsx(Ef,{children:c.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:(t==null?void 0:t.replace(/\n/g,"<br>"))||""}})}),c.jsxRuntimeExports.jsx(Fn,{children:c.jsxRuntimeExports.jsx(Rf,{})}),c.jsxRuntimeExports.jsx(Fn,{children:n})]})})}function Nf({senderAddressSlim:e,vendorAddress:t,senderAddress:n,identificationFields:r=[],date:o,letterSubject:s,letterText:l,userFullName:a,children:d,style:u}){return c.jsxRuntimeExports.jsx(uf,{style:u,children:c.jsxRuntimeExports.jsx(df,{children:d||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Cf,{address:e}),c.jsxRuntimeExports.jsx(Sf,{address:t}),c.jsxRuntimeExports.jsx(jf,{address:n}),c.jsxRuntimeExports.jsx(Pf,{identificationFields:r}),c.jsxRuntimeExports.jsx(Tf,{date:o}),c.jsxRuntimeExports.jsx(Af,{letterSubject:s,letterText:l,userFullName:a})]})})})}function Ho(e,[t,n]){return Math.min(n,Math.max(t,e))}function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Vo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Me(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Vo(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Vo(e[o],null)}}}}function q(...e){return i.useCallback(Me(...e),e)}var Ct=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(Of);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(ir,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(ir,{...r,ref:t,children:n})});Ct.displayName="Slot";var ir=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=If(n);return i.cloneElement(n,{...Df(r,n.props),ref:t?Me(t,o):o})}return i.Children.count(n)>1?i.Children.only(null):null});ir.displayName="SlotClone";var $f=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function Of(e){return i.isValidElement(e)&&e.type===$f}function Df(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function If(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function gi(e){const t=e+"CollectionProvider",[n,r]=Ze(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:E,children:f}=x,h=i.default.useRef(null),g=i.default.useRef(new Map).current;return c.jsxRuntimeExports.jsx(o,{scope:E,itemMap:g,collectionRef:h,children:f})};l.displayName=t;const a=e+"CollectionSlot",d=i.default.forwardRef((x,E)=>{const{scope:f,children:h}=x,g=s(a,f),y=q(E,g.collectionRef);return c.jsxRuntimeExports.jsx(Ct,{ref:y,children:h})});d.displayName=a;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=i.default.forwardRef((x,E)=>{const{scope:f,children:h,...g}=x,y=i.default.useRef(null),w=q(E,y),R=s(u,f);return i.default.useEffect(()=>(R.itemMap.set(y,{ref:y,...g}),()=>void R.itemMap.delete(y))),c.jsxRuntimeExports.jsx(Ct,{[p]:"",ref:w,children:h})});m.displayName=u;function v(x){const E=s(e+"CollectionConsumer",x);return i.default.useCallback(()=>{const h=E.collectionRef.current;if(!h)return[];const g=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((R,C)=>g.indexOf(R.ref.current)-g.indexOf(C.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:d,ItemSlot:m},v,r]}var Mf=i.createContext(void 0);function kf(e){const t=i.useContext(Mf);return e||t||"ltr"}var Lf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=Lf.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?Ct:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Br(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}var _f="DismissableLayer",ar="dismissableLayer.update",Ff="dismissableLayer.pointerDownOutside",Wf="dismissableLayer.focusOutside",Uo,yi=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ei=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(yi),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Vf(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Uf(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return cn(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Uo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),zo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Uo)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),zo())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(ar,b),()=>document.removeEventListener(ar,b)},[]),c.jsxRuntimeExports.jsx(Q.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Ei.displayName=_f;var Bf="DismissableLayerBranch",Hf=i.forwardRef((e,t)=>{const n=i.useContext(yi),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Q.div,{...e,ref:o})});Hf.displayName=Bf;function Vf(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){wi(Ff,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Uf(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&wi(Wf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zo(){const e=new CustomEvent(ar);document.dispatchEvent(e)}function wi(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var Wn="focusScope.autoFocusOnMount",Bn="focusScope.autoFocusOnUnmount",Ko={bubbles:!1,cancelable:!0},zf="FocusScope",bi=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=oe(o),p=oe(s),m=i.useRef(null),v=q(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:Oe(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||Oe(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Oe(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){Xo.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Wn,Ko);a.addEventListener(Wn,u),a.dispatchEvent(g),g.defaultPrevented||(Kf(qf(Ri(a)),{select:!0}),document.activeElement===f&&Oe(a))}return()=>{a.removeEventListener(Wn,u),setTimeout(()=>{const g=new CustomEvent(Bn,Ko);a.addEventListener(Bn,p),a.dispatchEvent(g),g.defaultPrevented||Oe(f??document.body,{select:!0}),a.removeEventListener(Bn,p),Xo.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=Yf(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&Oe(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&Oe(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(Q.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});bi.displayName=zf;function Kf(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oe(r,{select:t}),document.activeElement!==n)return}function Yf(e){const t=Ri(e),n=Yo(t,e),r=Yo(t.reverse(),e);return[n,r]}function Ri(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yo(e,t){for(const n of e)if(!Xf(n,{upTo:t}))return n}function Xf(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 Gf(e){return e instanceof HTMLInputElement&&"select"in e}function Oe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gf(e)&&t&&e.select()}}var Xo=Zf();function Zf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Go(e,t),e.unshift(t)},remove(t){var n;e=Go(e,t),(n=e[0])==null||n.resume()}}}function Go(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qf(e){return e.filter(t=>t.tagName!=="A")}const Qf=["top","right","bottom","left"],ke=Math.min,de=Math.max,Jt=Math.round,Lt=Math.floor,be=e=>({x:e,y:e}),Jf={left:"right",right:"left",bottom:"top",top:"bottom"},ep={start:"end",end:"start"};function cr(e,t,n){return de(e,ke(t,n))}function Te(e,t){return typeof e=="function"?e(t):e}function Ae(e){return e.split("-")[0]}function pt(e){return e.split("-")[1]}function Hr(e){return e==="x"?"y":"x"}function Vr(e){return e==="y"?"height":"width"}function Le(e){return["top","bottom"].includes(Ae(e))?"y":"x"}function Ur(e){return Hr(Le(e))}function tp(e,t,n){n===void 0&&(n=!1);const r=pt(e),o=Ur(e),s=Vr(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=en(l)),[l,en(l)]}function np(e){const t=en(e);return[lr(e),t,lr(t)]}function lr(e){return e.replace(/start|end/g,t=>ep[t])}function rp(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:l;default:return[]}}function op(e,t,n,r){const o=pt(e);let s=rp(Ae(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(lr)))),s}function en(e){return e.replace(/left|right|bottom|top/g,t=>Jf[t])}function sp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ci(e){return typeof e!="number"?sp(e):{top:e,right:e,bottom:e,left:e}}function tn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zo(e,t,n){let{reference:r,floating:o}=e;const s=Le(t),l=Ur(t),a=Vr(l),d=Ae(t),u=s==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let x;switch(d){case"top":x={x:p,y:r.y-o.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-o.width,y:m};break;default:x={x:r.x,y:r.y}}switch(pt(t)){case"start":x[l]-=v*(n&&u?-1:1);break;case"end":x[l]+=v*(n&&u?-1:1);break}return x}const ip=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=Zo(u,r,d),v=r,x={},E=0;for(let f=0;f<a.length;f++){const{name:h,fn:g}=a[f],{x:y,y:w,data:R,reset:C}=await g({x:p,y:m,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:u,platform:l,elements:{reference:e,floating:t}});p=y??p,m=w??m,x={...x,[h]:{...x[h],...R}},C&&E<=50&&(E++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(u=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:m}=Zo(u,v,d)),f=-1)}return{x:p,y:m,placement:v,strategy:o,middlewareData:x}};async function St(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:l,elements:a,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:v=!1,padding:x=0}=Te(t,e),E=Ci(x),h=a[v?m==="floating"?"reference":"floating":m],g=tn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:p,strategy:d})),y=m==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),R=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=tn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:d}):y);return{top:(g.top-C.top+E.top)/R.y,bottom:(C.bottom-g.bottom+E.bottom)/R.y,left:(g.left-C.left+E.left)/R.x,right:(C.right-g.right+E.right)/R.x}}const ap=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:l,elements:a,middlewareData:d}=t,{element:u,padding:p=0}=Te(e,t)||{};if(u==null)return{};const m=Ci(p),v={x:n,y:r},x=Ur(o),E=Vr(x),f=await l.getDimensions(u),h=x==="y",g=h?"top":"left",y=h?"bottom":"right",w=h?"clientHeight":"clientWidth",R=s.reference[E]+s.reference[x]-v[x]-s.floating[E],C=v[x]-s.reference[x],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=S?S[w]:0;(!b||!await(l.isElement==null?void 0:l.isElement(S)))&&(b=a.floating[w]||s.floating[E]);const j=R/2-C/2,N=b/2-f[E]/2-1,$=ke(m[g],N),_=ke(m[y],N),U=$,B=b-f[E]-_,T=b/2-f[E]/2+j,W=cr(U,T,B),k=!d.arrow&&pt(o)!=null&&T!==W&&s.reference[E]/2-(T<U?$:_)-f[E]/2<0,L=k?T<U?T-U:T-B:0;return{[x]:v[x]+L,data:{[x]:W,centerOffset:T-W-L,...k&&{alignmentOffset:L}},reset:k}}}),cp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:l,initialPlacement:a,platform:d,elements:u}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:f=!0,...h}=Te(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Ae(o),y=Le(a),w=Ae(a)===a,R=await(d.isRTL==null?void 0:d.isRTL(u.floating)),C=v||(w||!f?[en(a)]:np(a)),S=E!=="none";!v&&S&&C.push(...op(a,f,E,R));const b=[a,...C],j=await St(t,h),N=[];let $=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&N.push(j[g]),m){const T=tp(o,l,R);N.push(j[T[0]],j[T[1]])}if($=[...$,{placement:o,overflows:N}],!N.every(T=>T<=0)){var _,U;const T=(((_=s.flip)==null?void 0:_.index)||0)+1,W=b[T];if(W)return{data:{index:T,overflows:$},reset:{placement:W}};let k=(U=$.filter(L=>L.overflows[0]<=0).sort((L,O)=>L.overflows[1]-O.overflows[1])[0])==null?void 0:U.placement;if(!k)switch(x){case"bestFit":{var B;const L=(B=$.filter(O=>{if(S){const z=Le(O.placement);return z===y||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,re)=>z+re,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:B[0];L&&(k=L);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function qo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qo(e){return Qf.some(t=>e[t]>=0)}const lp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Te(e,t);switch(r){case"referenceHidden":{const s=await St(t,{...o,elementContext:"reference"}),l=qo(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Qo(l)}}}case"escaped":{const s=await St(t,{...o,altBoundary:!0}),l=qo(s,n.floating);return{data:{escapedOffsets:l,escaped:Qo(l)}}}default:return{}}}}};async function up(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Ae(n),a=pt(n),d=Le(n)==="y",u=["left","top"].includes(l)?-1:1,p=s&&d?-1:1,m=Te(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:E}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&typeof E=="number"&&(x=a==="end"?E*-1:E),d?{x:x*p,y:v*u}:{x:v*u,y:x*p}}const dp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:l,middlewareData:a}=t,d=await up(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},fp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:h=>{let{x:g,y}=h;return{x:g,y}}},...d}=Te(e,t),u={x:n,y:r},p=await St(t,d),m=Le(Ae(o)),v=Hr(m);let x=u[v],E=u[m];if(s){const h=v==="y"?"top":"left",g=v==="y"?"bottom":"right",y=x+p[h],w=x-p[g];x=cr(y,x,w)}if(l){const h=m==="y"?"top":"left",g=m==="y"?"bottom":"right",y=E+p[h],w=E-p[g];E=cr(y,E,w)}const f=a.fn({...t,[v]:x,[m]:E});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[v]:s,[m]:l}}}}}},pp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:l}=t,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=Te(e,t),p={x:n,y:r},m=Le(o),v=Hr(m);let x=p[v],E=p[m];const f=Te(a,t),h=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(d){const w=v==="y"?"height":"width",R=s.reference[v]-s.floating[w]+h.mainAxis,C=s.reference[v]+s.reference[w]-h.mainAxis;x<R?x=R:x>C&&(x=C)}if(u){var g,y;const w=v==="y"?"width":"height",R=["top","left"].includes(Ae(o)),C=s.reference[m]-s.floating[w]+(R&&((g=l.offset)==null?void 0:g[m])||0)+(R?0:h.crossAxis),S=s.reference[m]+s.reference[w]+(R?0:((y=l.offset)==null?void 0:y[m])||0)-(R?h.crossAxis:0);E<C?E=C:E>S&&(E=S)}return{[v]:x,[m]:E}}}},mp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:l,elements:a}=t,{apply:d=()=>{},...u}=Te(e,t),p=await St(t,u),m=Ae(o),v=pt(o),x=Le(o)==="y",{width:E,height:f}=s.floating;let h,g;m==="top"||m==="bottom"?(h=m,g=v===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=m,h=v==="end"?"top":"bottom");const y=f-p.top-p.bottom,w=E-p.left-p.right,R=ke(f-p[h],y),C=ke(E-p[g],w),S=!t.middlewareData.shift;let b=R,j=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=y),S&&!v){const $=de(p.left,0),_=de(p.right,0),U=de(p.top,0),B=de(p.bottom,0);x?j=E-2*($!==0||_!==0?$+_:de(p.left,p.right)):b=f-2*(U!==0||B!==0?U+B:de(p.top,p.bottom))}await d({...t,availableWidth:j,availableHeight:b});const N=await l.getDimensions(a.floating);return E!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function pn(){return typeof window<"u"}function mt(e){return Si(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Si(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Si(e){return pn()?e instanceof Node||e instanceof pe(e).Node:!1}function ve(e){return pn()?e instanceof Element||e instanceof pe(e).Element:!1}function Re(e){return pn()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function Jo(e){return!pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function Tt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function hp(e){return["table","td","th"].includes(mt(e))}function mn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zr(e){const t=Kr(),n=ve(e)?xe(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vp(e){let t=_e(e);for(;Re(t)&&!lt(t);){if(zr(t))return t;if(mn(t))return null;t=_e(t)}return null}function Kr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lt(e){return["html","body","#document"].includes(mt(e))}function xe(e){return pe(e).getComputedStyle(e)}function hn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(mt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jo(e)&&e.host||Ce(e);return Jo(t)?t.host:t}function ji(e){const t=_e(e);return lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Tt(t)?t:ji(t)}function jt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ji(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=pe(o);if(s){const a=ur(l);return t.concat(l,l.visualViewport||[],Tt(o)?o:[],a&&n?jt(a):[])}return t.concat(o,jt(o,[],n))}function ur(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pi(e){const t=xe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Re(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=Jt(n)!==s||Jt(r)!==l;return a&&(n=s,r=l),{width:n,height:r,$:a}}function Yr(e){return ve(e)?e:e.contextElement}function at(e){const t=Yr(e);if(!Re(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Pi(t);let l=(s?Jt(n.width):n.width)/r,a=(s?Jt(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const xp=be(0);function Ti(e){const t=pe(e);return!Kr()||!t.visualViewport?xp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Yr(e);let l=be(1);t&&(r?ve(r)&&(l=at(r)):l=at(e));const a=gp(s,n,r)?Ti(s):be(0);let d=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(s){const v=pe(s),x=r&&ve(r)?pe(r):r;let E=v,f=ur(E);for(;f&&r&&x!==E;){const h=at(f),g=f.getBoundingClientRect(),y=xe(f),w=g.left+(f.clientLeft+parseFloat(y.paddingLeft))*h.x,R=g.top+(f.clientTop+parseFloat(y.paddingTop))*h.y;d*=h.x,u*=h.y,p*=h.x,m*=h.y,d+=w,u+=R,E=pe(f),f=ur(E)}}return tn({width:p,height:m,x:d,y:u})}function Xr(e,t){const n=hn(e).scrollLeft;return t?t.left+n:ze(Ce(e)).left+n}function Ai(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Xr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function yp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=Ce(r),a=t?mn(t.floating):!1;if(r===l||a&&s)return n;let d={scrollLeft:0,scrollTop:0},u=be(1);const p=be(0),m=Re(r);if((m||!m&&!s)&&((mt(r)!=="body"||Tt(l))&&(d=hn(r)),Re(r))){const x=ze(r);u=at(r),p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}const v=l&&!m&&!s?Ai(l,d,!0):be(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+p.x+v.x,y:n.y*u.y-d.scrollTop*u.y+p.y+v.y}}function Ep(e){return Array.from(e.getClientRects())}function wp(e){const t=Ce(e),n=hn(e),r=e.ownerDocument.body,o=de(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=de(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Xr(e);const a=-n.scrollTop;return xe(r).direction==="rtl"&&(l+=de(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:a}}function bp(e,t){const n=pe(e),r=Ce(e),o=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,a=0,d=0;if(o){s=o.width,l=o.height;const u=Kr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}return{width:s,height:l,x:a,y:d}}function Rp(e,t){const n=ze(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Re(e)?at(e):be(1),l=e.clientWidth*s.x,a=e.clientHeight*s.y,d=o*s.x,u=r*s.y;return{width:l,height:a,x:d,y:u}}function es(e,t,n){let r;if(t==="viewport")r=bp(e,n);else if(t==="document")r=wp(Ce(e));else if(ve(t))r=Rp(t,n);else{const o=Ti(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return tn(r)}function Ni(e,t){const n=_e(e);return n===t||!ve(n)||lt(n)?!1:xe(n).position==="fixed"||Ni(n,t)}function Cp(e,t){const n=t.get(e);if(n)return n;let r=jt(e,[],!1).filter(a=>ve(a)&&mt(a)!=="body"),o=null;const s=xe(e).position==="fixed";let l=s?_e(e):e;for(;ve(l)&&!lt(l);){const a=xe(l),d=zr(l);!d&&a.position==="fixed"&&(o=null),(s?!d&&!o:!d&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Tt(l)&&!d&&Ni(e,l))?r=r.filter(p=>p!==l):o=a,l=_e(l)}return t.set(e,r),r}function Sp(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?mn(t)?[]:Cp(t,this._c):[].concat(n),r],a=l[0],d=l.reduce((u,p)=>{const m=es(t,p,o);return u.top=de(m.top,u.top),u.right=ke(m.right,u.right),u.bottom=ke(m.bottom,u.bottom),u.left=de(m.left,u.left),u},es(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jp(e){const{width:t,height:n}=Pi(e);return{width:t,height:n}}function Pp(e,t,n){const r=Re(t),o=Ce(t),s=n==="fixed",l=ze(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=be(0);if(r||!r&&!s)if((mt(t)!=="body"||Tt(o))&&(a=hn(t)),r){const v=ze(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else o&&(d.x=Xr(o));const u=o&&!r&&!s?Ai(o,a):be(0),p=l.left+a.scrollLeft-d.x-u.x,m=l.top+a.scrollTop-d.y-u.y;return{x:p,y:m,width:l.width,height:l.height}}function Hn(e){return xe(e).position==="static"}function ts(e,t){if(!Re(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function $i(e,t){const n=pe(e);if(mn(e))return n;if(!Re(e)){let o=_e(e);for(;o&&!lt(o);){if(ve(o)&&!Hn(o))return o;o=_e(o)}return n}let r=ts(e,t);for(;r&&hp(r)&&Hn(r);)r=ts(r,t);return r&&lt(r)&&Hn(r)&&!zr(r)?n:r||vp(e)||n}const Tp=async function(e){const t=this.getOffsetParent||$i,n=this.getDimensions,r=await n(e.floating);return{reference:Pp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ap(e){return xe(e).direction==="rtl"}const Np={convertOffsetParentRelativeRectToViewportRelativeRect:yp,getDocumentElement:Ce,getClippingRect:Sp,getOffsetParent:$i,getElementRects:Tp,getClientRects:Ep,getDimensions:jp,getScale:at,isElement:ve,isRTL:Ap};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $p(e,t){let n=null,r;const o=Ce(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:p,top:m,width:v,height:x}=u;if(a||t(),!v||!x)return;const E=Lt(m),f=Lt(o.clientWidth-(p+v)),h=Lt(o.clientHeight-(m+x)),g=Lt(p),w={rootMargin:-E+"px "+-f+"px "+-h+"px "+-g+"px",threshold:de(0,ke(1,d))||1};let R=!0;function C(S){const b=S[0].intersectionRatio;if(b!==d){if(!R)return l();b?l(!1,b):r=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!Oi(u,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return l(!0),s}function Gr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=Yr(e),p=o||s?[...u?jt(u):[],...jt(t)]:[];p.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const m=u&&a?$p(u,n):null;let v=-1,x=null;l&&(x=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(t)})),n()}),u&&!d&&x.observe(u),x.observe(t));let E,f=d?ze(e):null;d&&h();function h(){const g=ze(e);f&&!Oi(f,g)&&n(),f=g,E=requestAnimationFrame(h)}return n(),()=>{var g;p.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),m==null||m(),(g=x)==null||g.disconnect(),x=null,d&&cancelAnimationFrame(E)}}const Op=dp,Dp=fp,Ip=cp,Mp=mp,kp=lp,ns=ap,Lp=pp,_p=(e,t,n)=>{const r=new Map,o={platform:Np,...n},s={...o.platform,_c:r};return ip(e,t,{...o,platform:s})};var Yt=typeof document<"u"?ee.useLayoutEffect:ee.useEffect;function nn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!nn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Di(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rs(e,t){const n=Di(e);return Math.round(t*n)/n}function Vn(e){const t=i.useRef(e);return Yt(()=>{t.current=e}),t}function Zr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[p,m]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=i.useState(r);nn(v,r)||x(r);const[E,f]=i.useState(null),[h,g]=i.useState(null),y=i.useCallback(O=>{O!==S.current&&(S.current=O,f(O))},[]),w=i.useCallback(O=>{O!==b.current&&(b.current=O,g(O))},[]),R=s||E,C=l||h,S=i.useRef(null),b=i.useRef(null),j=i.useRef(p),N=d!=null,$=Vn(d),_=Vn(o),U=Vn(u),B=i.useCallback(()=>{if(!S.current||!b.current)return;const O={placement:t,strategy:n,middleware:v};_.current&&(O.platform=_.current),_p(S.current,b.current,O).then(z=>{const re={...z,isPositioned:U.current!==!1};T.current&&!nn(j.current,re)&&(j.current=re,ge.flushSync(()=>{m(re)}))})},[v,t,n,_,U]);Yt(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(O=>({...O,isPositioned:!1})))},[u]);const T=i.useRef(!1);Yt(()=>(T.current=!0,()=>{T.current=!1}),[]),Yt(()=>{if(R&&(S.current=R),C&&(b.current=C),R&&C){if($.current)return $.current(R,C,B);B()}},[R,C,B,$,N]);const W=i.useMemo(()=>({reference:S,floating:b,setReference:y,setFloating:w}),[y,w]),k=i.useMemo(()=>({reference:R,floating:C}),[R,C]),L=i.useMemo(()=>{const O={position:n,left:0,top:0};if(!k.floating)return O;const z=rs(k.floating,p.x),re=rs(k.floating,p.y);return a?{...O,transform:"translate("+z+"px, "+re+"px)",...Di(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:re}},[n,a,k.floating,p.x,p.y]);return i.useMemo(()=>({...p,update:B,refs:W,elements:k,floatingStyles:L}),[p,B,W,k,L])}const Fp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ns({element:r.current,padding:o}).fn(n):{}:r?ns({element:r,padding:o}).fn(n):{}}}},qr=(e,t)=>({...Op(e),options:[e,t]}),Qr=(e,t)=>({...Dp(e),options:[e,t]}),Jr=(e,t)=>({...Lp(e),options:[e,t]}),eo=(e,t)=>({...Ip(e),options:[e,t]}),to=(e,t)=>({...Mp(e),options:[e,t]}),no=(e,t)=>({...kp(e),options:[e,t]}),ro=(e,t)=>({...Fp(e),options:[e,t]});var Wp="Arrow",Ii=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ii.displayName=Wp;var Bp=Ii;function Mi(e){const[t,n]=i.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oo="Popper",[ki,Li]=Ze(oo),[Hp,_i]=ki(oo),Fi=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(Hp,{scope:t,anchor:r,onAnchorChange:o,children:n})};Fi.displayName=oo;var Wi="PopperAnchor",Bi=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=_i(Wi,n),l=i.useRef(null),a=q(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(Q.div,{...o,ref:a})});Bi.displayName=Wi;var so="PopperContent",[Vp,Up]=ki(so),Hi=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=_i(so,n),[g,y]=i.useState(null),w=q(t,J=>y(J)),[R,C]=i.useState(null),S=Mi(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Kp),altBoundary:U},{refs:T,floatingStyles:W,placement:k,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Yp({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=zi(k),te=oe(E);se(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,M=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return se(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(Vp,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:M,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(Q.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});Hi.displayName=so;var Vi="PopperArrow",zp={top:"bottom",right:"left",bottom:"top",left:"right"},Ui=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Up(Vi,r),l=zp[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Bp,{...o,ref:n,style:{...o.style,display:"block"}})})});Ui.displayName=Vi;function Kp(e){return e!==null}var Yp=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=zi(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function zi(e){const[t,n="center"]=e.split("-");return[t,n]}var Xp=Fi,Gp=Bi,Zp=Hi,qp=Ui,Qp="Portal",io=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);se(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t}),l):null});io.displayName=Qp;function Jp(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])}var em="VisuallyHidden",vn=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(Q.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));vn.displayName=em;var Et="right-scroll-bar-position",wt="width-before-scroll-bar",tm="with-scroll-bars-hidden",nm="--removed-body-scroll-bar-size";function Un(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rm(e,t){var n=ee.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var om=typeof window<"u"?i.useLayoutEffect:i.useEffect,os=new WeakMap;function Ki(e,t){var n=rm(null,function(r){return e.forEach(function(o){return Un(o,r)})});return om(function(){var r=os.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(a){s.has(a)||Un(a,null)}),s.forEach(function(a){o.has(a)||Un(a,l)})}os.set(n,e)},[e]),n}var Yi=Hs(),zn=function(){},xn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:zn,onWheelCapture:zn,onTouchMoveCapture:zn}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noIsolation,E=e.inert,f=e.allowPinchZoom,h=e.as,g=h===void 0?"div":h,y=e.gapMode,w=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,C=Ki([n,t]),S=ne(ne({},w),o);return i.createElement(i.Fragment,null,p&&i.createElement(R,{sideCar:Yi,removeScrollBar:u,shards:m,noIsolation:x,inert:E,setCallbacks:s,allowPinchZoom:!!f,lockRef:n,gapMode:y}),l?i.cloneElement(i.Children.only(a),ne(ne({},S),{ref:C})):i.createElement(g,ne({},S,{className:d,ref:C}),a))});xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xn.classNames={fullWidth:wt,zeroRight:Et};function sm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ks();return t&&e.setAttribute("nonce",t),e}function im(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function am(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sm())&&(im(t,n),am(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lm=function(){var e=cm();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xi=function(){var e=lm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},um={left:0,top:0,right:0,gap:0},Kn=function(e){return parseInt(e||"",10)||0},dm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Kn(n),Kn(r),Kn(o)]},fm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return um;var t=dm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pm=Xi(),ct="data-scroll-locked",mm=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),`
410
+ `;function wf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Date"})}function bf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Sehr geehrte Damen und Herren"})}function Rf({children:e}){return c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e||"Mit freundlichen Grüßen"})}function Cf({address:e,children:t}){return!t&&!e?null:c.jsxRuntimeExports.jsx(ff,{children:t||e})}function Sf({address:e,children:t}){return c.jsxRuntimeExports.jsx(pf,{children:t||c.jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:e||""}})})}function jf({address:e,children:t}){return c.jsxRuntimeExports.jsx(mf,{children:t||c.jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:e||""}})})}function Pf({identificationFields:e=[],children:t}){return!t&&(!e||e.length===0)?null:c.jsxRuntimeExports.jsx(hf,{children:t||c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e.map((n,r)=>c.jsxRuntimeExports.jsxs(vf,{children:[n.label,c.jsxRuntimeExports.jsx("br",{}),c.jsxRuntimeExports.jsx("b",{children:n.value})]},r))})})}function Tf({date:e,children:t}){return!t&&!e?null:c.jsxRuntimeExports.jsx(xf,{children:t||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(wf,{}),": ",e]})})}function Af({letterSubject:e,letterText:t,userFullName:n,children:r}){return c.jsxRuntimeExports.jsx(gf,{children:r||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(yf,{children:e}),c.jsxRuntimeExports.jsxs(Wn,{children:[c.jsxRuntimeExports.jsx(bf,{}),","]}),c.jsxRuntimeExports.jsx(Ef,{children:c.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:(t==null?void 0:t.replace(/\n/g,"<br>"))||""}})}),c.jsxRuntimeExports.jsx(Wn,{children:c.jsxRuntimeExports.jsx(Rf,{})}),c.jsxRuntimeExports.jsx(Wn,{children:n})]})})}function Nf({senderAddressSlim:e,vendorAddress:t,senderAddress:n,identificationFields:r=[],date:o,letterSubject:s,letterText:l,userFullName:a,children:d,style:u}){return c.jsxRuntimeExports.jsx(uf,{style:u,children:c.jsxRuntimeExports.jsx(df,{children:d||c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Cf,{address:e}),c.jsxRuntimeExports.jsx(Sf,{address:t}),c.jsxRuntimeExports.jsx(jf,{address:n}),c.jsxRuntimeExports.jsx(Pf,{identificationFields:r}),c.jsxRuntimeExports.jsx(Tf,{date:o}),c.jsxRuntimeExports.jsx(Af,{letterSubject:s,letterText:l,userFullName:a})]})})})}function Ho(e,[t,n]){return Math.min(n,Math.max(t,e))}function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Vo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ke(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Vo(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Vo(e[o],null)}}}}function q(...e){return i.useCallback(ke(...e),e)}var Ct=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(Of);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(ar,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(ar,{...r,ref:t,children:n})});Ct.displayName="Slot";var ar=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=If(n);return i.cloneElement(n,{...Df(r,n.props),ref:t?ke(t,o):o})}return i.Children.count(n)>1?i.Children.only(null):null});ar.displayName="SlotClone";var $f=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function Of(e){return i.isValidElement(e)&&e.type===$f}function Df(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function If(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function gi(e){const t=e+"CollectionProvider",[n,r]=Ze(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=x=>{const{scope:E,children:f}=x,h=i.default.useRef(null),g=i.default.useRef(new Map).current;return c.jsxRuntimeExports.jsx(o,{scope:E,itemMap:g,collectionRef:h,children:f})};l.displayName=t;const a=e+"CollectionSlot",d=i.default.forwardRef((x,E)=>{const{scope:f,children:h}=x,g=s(a,f),y=q(E,g.collectionRef);return c.jsxRuntimeExports.jsx(Ct,{ref:y,children:h})});d.displayName=a;const u=e+"CollectionItemSlot",p="data-radix-collection-item",m=i.default.forwardRef((x,E)=>{const{scope:f,children:h,...g}=x,y=i.default.useRef(null),w=q(E,y),R=s(u,f);return i.default.useEffect(()=>(R.itemMap.set(y,{ref:y,...g}),()=>void R.itemMap.delete(y))),c.jsxRuntimeExports.jsx(Ct,{[p]:"",ref:w,children:h})});m.displayName=u;function v(x){const E=s(e+"CollectionConsumer",x);return i.default.useCallback(()=>{const h=E.collectionRef.current;if(!h)return[];const g=Array.from(h.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((R,C)=>g.indexOf(R.ref.current)-g.indexOf(C.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:d,ItemSlot:m},v,r]}var kf=i.createContext(void 0);function Mf(e){const t=i.useContext(kf);return e||t||"ltr"}var Lf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=Lf.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?Ct:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Br(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}var _f="DismissableLayer",cr="dismissableLayer.update",Ff="dismissableLayer.pointerDownOutside",Wf="dismissableLayer.focusOutside",Uo,yi=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ei=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(yi),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Vf(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Uf(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return ln(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Uo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),zo(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Uo)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),zo())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(cr,b),()=>document.removeEventListener(cr,b)},[]),c.jsxRuntimeExports.jsx(Q.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Ei.displayName=_f;var Bf="DismissableLayerBranch",Hf=i.forwardRef((e,t)=>{const n=i.useContext(yi),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Q.div,{...e,ref:o})});Hf.displayName=Bf;function Vf(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){wi(Ff,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Uf(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&wi(Wf,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zo(){const e=new CustomEvent(cr);document.dispatchEvent(e)}function wi(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var Bn="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",Ko={bubbles:!1,cancelable:!0},zf="FocusScope",bi=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=oe(o),p=oe(s),m=i.useRef(null),v=q(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:Oe(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||Oe(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Oe(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){Xo.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Bn,Ko);a.addEventListener(Bn,u),a.dispatchEvent(g),g.defaultPrevented||(Kf(qf(Ri(a)),{select:!0}),document.activeElement===f&&Oe(a))}return()=>{a.removeEventListener(Bn,u),setTimeout(()=>{const g=new CustomEvent(Hn,Ko);a.addEventListener(Hn,p),a.dispatchEvent(g),g.defaultPrevented||Oe(f??document.body,{select:!0}),a.removeEventListener(Hn,p),Xo.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=Yf(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&Oe(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&Oe(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(Q.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});bi.displayName=zf;function Kf(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oe(r,{select:t}),document.activeElement!==n)return}function Yf(e){const t=Ri(e),n=Yo(t,e),r=Yo(t.reverse(),e);return[n,r]}function Ri(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yo(e,t){for(const n of e)if(!Xf(n,{upTo:t}))return n}function Xf(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 Gf(e){return e instanceof HTMLInputElement&&"select"in e}function Oe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gf(e)&&t&&e.select()}}var Xo=Zf();function Zf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Go(e,t),e.unshift(t)},remove(t){var n;e=Go(e,t),(n=e[0])==null||n.resume()}}}function Go(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qf(e){return e.filter(t=>t.tagName!=="A")}const Qf=["top","right","bottom","left"],Me=Math.min,de=Math.max,Jt=Math.round,Lt=Math.floor,be=e=>({x:e,y:e}),Jf={left:"right",right:"left",bottom:"top",top:"bottom"},ep={start:"end",end:"start"};function lr(e,t,n){return de(e,Me(t,n))}function Te(e,t){return typeof e=="function"?e(t):e}function Ae(e){return e.split("-")[0]}function pt(e){return e.split("-")[1]}function Hr(e){return e==="x"?"y":"x"}function Vr(e){return e==="y"?"height":"width"}function Le(e){return["top","bottom"].includes(Ae(e))?"y":"x"}function Ur(e){return Hr(Le(e))}function tp(e,t,n){n===void 0&&(n=!1);const r=pt(e),o=Ur(e),s=Vr(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=en(l)),[l,en(l)]}function np(e){const t=en(e);return[ur(e),t,ur(t)]}function ur(e){return e.replace(/start|end/g,t=>ep[t])}function rp(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:l;default:return[]}}function op(e,t,n,r){const o=pt(e);let s=rp(Ae(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(ur)))),s}function en(e){return e.replace(/left|right|bottom|top/g,t=>Jf[t])}function sp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ci(e){return typeof e!="number"?sp(e):{top:e,right:e,bottom:e,left:e}}function tn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zo(e,t,n){let{reference:r,floating:o}=e;const s=Le(t),l=Ur(t),a=Vr(l),d=Ae(t),u=s==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let x;switch(d){case"top":x={x:p,y:r.y-o.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-o.width,y:m};break;default:x={x:r.x,y:r.y}}switch(pt(t)){case"start":x[l]-=v*(n&&u?-1:1);break;case"end":x[l]+=v*(n&&u?-1:1);break}return x}const ip=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=Zo(u,r,d),v=r,x={},E=0;for(let f=0;f<a.length;f++){const{name:h,fn:g}=a[f],{x:y,y:w,data:R,reset:C}=await g({x:p,y:m,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:u,platform:l,elements:{reference:e,floating:t}});p=y??p,m=w??m,x={...x,[h]:{...x[h],...R}},C&&E<=50&&(E++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(u=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:p,y:m}=Zo(u,v,d)),f=-1)}return{x:p,y:m,placement:v,strategy:o,middlewareData:x}};async function St(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:l,elements:a,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:v=!1,padding:x=0}=Te(t,e),E=Ci(x),h=a[v?m==="floating"?"reference":"floating":m],g=tn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:p,strategy:d})),y=m==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),R=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=tn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:d}):y);return{top:(g.top-C.top+E.top)/R.y,bottom:(C.bottom-g.bottom+E.bottom)/R.y,left:(g.left-C.left+E.left)/R.x,right:(C.right-g.right+E.right)/R.x}}const ap=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:l,elements:a,middlewareData:d}=t,{element:u,padding:p=0}=Te(e,t)||{};if(u==null)return{};const m=Ci(p),v={x:n,y:r},x=Ur(o),E=Vr(x),f=await l.getDimensions(u),h=x==="y",g=h?"top":"left",y=h?"bottom":"right",w=h?"clientHeight":"clientWidth",R=s.reference[E]+s.reference[x]-v[x]-s.floating[E],C=v[x]-s.reference[x],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=S?S[w]:0;(!b||!await(l.isElement==null?void 0:l.isElement(S)))&&(b=a.floating[w]||s.floating[E]);const j=R/2-C/2,N=b/2-f[E]/2-1,$=Me(m[g],N),_=Me(m[y],N),U=$,B=b-f[E]-_,T=b/2-f[E]/2+j,W=lr(U,T,B),M=!d.arrow&&pt(o)!=null&&T!==W&&s.reference[E]/2-(T<U?$:_)-f[E]/2<0,L=M?T<U?T-U:T-B:0;return{[x]:v[x]+L,data:{[x]:W,centerOffset:T-W-L,...M&&{alignmentOffset:L}},reset:M}}}),cp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:l,initialPlacement:a,platform:d,elements:u}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:f=!0,...h}=Te(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Ae(o),y=Le(a),w=Ae(a)===a,R=await(d.isRTL==null?void 0:d.isRTL(u.floating)),C=v||(w||!f?[en(a)]:np(a)),S=E!=="none";!v&&S&&C.push(...op(a,f,E,R));const b=[a,...C],j=await St(t,h),N=[];let $=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&N.push(j[g]),m){const T=tp(o,l,R);N.push(j[T[0]],j[T[1]])}if($=[...$,{placement:o,overflows:N}],!N.every(T=>T<=0)){var _,U;const T=(((_=s.flip)==null?void 0:_.index)||0)+1,W=b[T];if(W)return{data:{index:T,overflows:$},reset:{placement:W}};let M=(U=$.filter(L=>L.overflows[0]<=0).sort((L,O)=>L.overflows[1]-O.overflows[1])[0])==null?void 0:U.placement;if(!M)switch(x){case"bestFit":{var B;const L=(B=$.filter(O=>{if(S){const z=Le(O.placement);return z===y||z==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(z=>z>0).reduce((z,re)=>z+re,0)]).sort((O,z)=>O[1]-z[1])[0])==null?void 0:B[0];L&&(M=L);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function qo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qo(e){return Qf.some(t=>e[t]>=0)}const lp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Te(e,t);switch(r){case"referenceHidden":{const s=await St(t,{...o,elementContext:"reference"}),l=qo(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Qo(l)}}}case"escaped":{const s=await St(t,{...o,altBoundary:!0}),l=qo(s,n.floating);return{data:{escapedOffsets:l,escaped:Qo(l)}}}default:return{}}}}};async function up(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Ae(n),a=pt(n),d=Le(n)==="y",u=["left","top"].includes(l)?-1:1,p=s&&d?-1:1,m=Te(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:E}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&typeof E=="number"&&(x=a==="end"?E*-1:E),d?{x:x*p,y:v*u}:{x:v*u,y:x*p}}const dp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:l,middlewareData:a}=t,d=await up(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:l}}}}},fp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:h=>{let{x:g,y}=h;return{x:g,y}}},...d}=Te(e,t),u={x:n,y:r},p=await St(t,d),m=Le(Ae(o)),v=Hr(m);let x=u[v],E=u[m];if(s){const h=v==="y"?"top":"left",g=v==="y"?"bottom":"right",y=x+p[h],w=x-p[g];x=lr(y,x,w)}if(l){const h=m==="y"?"top":"left",g=m==="y"?"bottom":"right",y=E+p[h],w=E-p[g];E=lr(y,E,w)}const f=a.fn({...t,[v]:x,[m]:E});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[v]:s,[m]:l}}}}}},pp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:l}=t,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=Te(e,t),p={x:n,y:r},m=Le(o),v=Hr(m);let x=p[v],E=p[m];const f=Te(a,t),h=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(d){const w=v==="y"?"height":"width",R=s.reference[v]-s.floating[w]+h.mainAxis,C=s.reference[v]+s.reference[w]-h.mainAxis;x<R?x=R:x>C&&(x=C)}if(u){var g,y;const w=v==="y"?"width":"height",R=["top","left"].includes(Ae(o)),C=s.reference[m]-s.floating[w]+(R&&((g=l.offset)==null?void 0:g[m])||0)+(R?0:h.crossAxis),S=s.reference[m]+s.reference[w]+(R?0:((y=l.offset)==null?void 0:y[m])||0)-(R?h.crossAxis:0);E<C?E=C:E>S&&(E=S)}return{[v]:x,[m]:E}}}},mp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:l,elements:a}=t,{apply:d=()=>{},...u}=Te(e,t),p=await St(t,u),m=Ae(o),v=pt(o),x=Le(o)==="y",{width:E,height:f}=s.floating;let h,g;m==="top"||m==="bottom"?(h=m,g=v===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=m,h=v==="end"?"top":"bottom");const y=f-p.top-p.bottom,w=E-p.left-p.right,R=Me(f-p[h],y),C=Me(E-p[g],w),S=!t.middlewareData.shift;let b=R,j=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(b=y),S&&!v){const $=de(p.left,0),_=de(p.right,0),U=de(p.top,0),B=de(p.bottom,0);x?j=E-2*($!==0||_!==0?$+_:de(p.left,p.right)):b=f-2*(U!==0||B!==0?U+B:de(p.top,p.bottom))}await d({...t,availableWidth:j,availableHeight:b});const N=await l.getDimensions(a.floating);return E!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function mn(){return typeof window<"u"}function mt(e){return Si(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(Si(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Si(e){return mn()?e instanceof Node||e instanceof pe(e).Node:!1}function ve(e){return mn()?e instanceof Element||e instanceof pe(e).Element:!1}function Re(e){return mn()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function Jo(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function Tt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function hp(e){return["table","td","th"].includes(mt(e))}function hn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function zr(e){const t=Kr(),n=ve(e)?xe(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vp(e){let t=_e(e);for(;Re(t)&&!lt(t);){if(zr(t))return t;if(hn(t))return null;t=_e(t)}return null}function Kr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lt(e){return["html","body","#document"].includes(mt(e))}function xe(e){return pe(e).getComputedStyle(e)}function vn(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(mt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jo(e)&&e.host||Ce(e);return Jo(t)?t.host:t}function ji(e){const t=_e(e);return lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&Tt(t)?t:ji(t)}function jt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ji(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=pe(o);if(s){const a=dr(l);return t.concat(l,l.visualViewport||[],Tt(o)?o:[],a&&n?jt(a):[])}return t.concat(o,jt(o,[],n))}function dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pi(e){const t=xe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Re(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=Jt(n)!==s||Jt(r)!==l;return a&&(n=s,r=l),{width:n,height:r,$:a}}function Yr(e){return ve(e)?e:e.contextElement}function at(e){const t=Yr(e);if(!Re(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Pi(t);let l=(s?Jt(n.width):n.width)/r,a=(s?Jt(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const xp=be(0);function Ti(e){const t=pe(e);return!Kr()||!t.visualViewport?xp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function ze(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Yr(e);let l=be(1);t&&(r?ve(r)&&(l=at(r)):l=at(e));const a=gp(s,n,r)?Ti(s):be(0);let d=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,p=o.width/l.x,m=o.height/l.y;if(s){const v=pe(s),x=r&&ve(r)?pe(r):r;let E=v,f=dr(E);for(;f&&r&&x!==E;){const h=at(f),g=f.getBoundingClientRect(),y=xe(f),w=g.left+(f.clientLeft+parseFloat(y.paddingLeft))*h.x,R=g.top+(f.clientTop+parseFloat(y.paddingTop))*h.y;d*=h.x,u*=h.y,p*=h.x,m*=h.y,d+=w,u+=R,E=pe(f),f=dr(E)}}return tn({width:p,height:m,x:d,y:u})}function Xr(e,t){const n=vn(e).scrollLeft;return t?t.left+n:ze(Ce(e)).left+n}function Ai(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Xr(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function yp(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=Ce(r),a=t?hn(t.floating):!1;if(r===l||a&&s)return n;let d={scrollLeft:0,scrollTop:0},u=be(1);const p=be(0),m=Re(r);if((m||!m&&!s)&&((mt(r)!=="body"||Tt(l))&&(d=vn(r)),Re(r))){const x=ze(r);u=at(r),p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}const v=l&&!m&&!s?Ai(l,d,!0):be(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-d.scrollLeft*u.x+p.x+v.x,y:n.y*u.y-d.scrollTop*u.y+p.y+v.y}}function Ep(e){return Array.from(e.getClientRects())}function wp(e){const t=Ce(e),n=vn(e),r=e.ownerDocument.body,o=de(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=de(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Xr(e);const a=-n.scrollTop;return xe(r).direction==="rtl"&&(l+=de(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:a}}function bp(e,t){const n=pe(e),r=Ce(e),o=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,a=0,d=0;if(o){s=o.width,l=o.height;const u=Kr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,d=o.offsetTop)}return{width:s,height:l,x:a,y:d}}function Rp(e,t){const n=ze(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Re(e)?at(e):be(1),l=e.clientWidth*s.x,a=e.clientHeight*s.y,d=o*s.x,u=r*s.y;return{width:l,height:a,x:d,y:u}}function es(e,t,n){let r;if(t==="viewport")r=bp(e,n);else if(t==="document")r=wp(Ce(e));else if(ve(t))r=Rp(t,n);else{const o=Ti(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return tn(r)}function Ni(e,t){const n=_e(e);return n===t||!ve(n)||lt(n)?!1:xe(n).position==="fixed"||Ni(n,t)}function Cp(e,t){const n=t.get(e);if(n)return n;let r=jt(e,[],!1).filter(a=>ve(a)&&mt(a)!=="body"),o=null;const s=xe(e).position==="fixed";let l=s?_e(e):e;for(;ve(l)&&!lt(l);){const a=xe(l),d=zr(l);!d&&a.position==="fixed"&&(o=null),(s?!d&&!o:!d&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Tt(l)&&!d&&Ni(e,l))?r=r.filter(p=>p!==l):o=a,l=_e(l)}return t.set(e,r),r}function Sp(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?hn(t)?[]:Cp(t,this._c):[].concat(n),r],a=l[0],d=l.reduce((u,p)=>{const m=es(t,p,o);return u.top=de(m.top,u.top),u.right=Me(m.right,u.right),u.bottom=Me(m.bottom,u.bottom),u.left=de(m.left,u.left),u},es(t,a,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jp(e){const{width:t,height:n}=Pi(e);return{width:t,height:n}}function Pp(e,t,n){const r=Re(t),o=Ce(t),s=n==="fixed",l=ze(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=be(0);if(r||!r&&!s)if((mt(t)!=="body"||Tt(o))&&(a=vn(t)),r){const v=ze(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else o&&(d.x=Xr(o));const u=o&&!r&&!s?Ai(o,a):be(0),p=l.left+a.scrollLeft-d.x-u.x,m=l.top+a.scrollTop-d.y-u.y;return{x:p,y:m,width:l.width,height:l.height}}function Vn(e){return xe(e).position==="static"}function ts(e,t){if(!Re(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ce(e)===n&&(n=n.ownerDocument.body),n}function $i(e,t){const n=pe(e);if(hn(e))return n;if(!Re(e)){let o=_e(e);for(;o&&!lt(o);){if(ve(o)&&!Vn(o))return o;o=_e(o)}return n}let r=ts(e,t);for(;r&&hp(r)&&Vn(r);)r=ts(r,t);return r&&lt(r)&&Vn(r)&&!zr(r)?n:r||vp(e)||n}const Tp=async function(e){const t=this.getOffsetParent||$i,n=this.getDimensions,r=await n(e.floating);return{reference:Pp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ap(e){return xe(e).direction==="rtl"}const Np={convertOffsetParentRelativeRectToViewportRelativeRect:yp,getDocumentElement:Ce,getClippingRect:Sp,getOffsetParent:$i,getElementRects:Tp,getClientRects:Ep,getDimensions:jp,getScale:at,isElement:ve,isRTL:Ap};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $p(e,t){let n=null,r;const o=Ce(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const u=e.getBoundingClientRect(),{left:p,top:m,width:v,height:x}=u;if(a||t(),!v||!x)return;const E=Lt(m),f=Lt(o.clientWidth-(p+v)),h=Lt(o.clientHeight-(m+x)),g=Lt(p),w={rootMargin:-E+"px "+-f+"px "+-h+"px "+-g+"px",threshold:de(0,Me(1,d))||1};let R=!0;function C(S){const b=S[0].intersectionRatio;if(b!==d){if(!R)return l();b?l(!1,b):r=setTimeout(()=>{l(!1,1e-7)},1e3)}b===1&&!Oi(u,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return l(!0),s}function Gr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=Yr(e),p=o||s?[...u?jt(u):[],...jt(t)]:[];p.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const m=u&&a?$p(u,n):null;let v=-1,x=null;l&&(x=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&x&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=x)==null||w.observe(t)})),n()}),u&&!d&&x.observe(u),x.observe(t));let E,f=d?ze(e):null;d&&h();function h(){const g=ze(e);f&&!Oi(f,g)&&n(),f=g,E=requestAnimationFrame(h)}return n(),()=>{var g;p.forEach(y=>{o&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),m==null||m(),(g=x)==null||g.disconnect(),x=null,d&&cancelAnimationFrame(E)}}const Op=dp,Dp=fp,Ip=cp,kp=mp,Mp=lp,ns=ap,Lp=pp,_p=(e,t,n)=>{const r=new Map,o={platform:Np,...n},s={...o.platform,_c:r};return ip(e,t,{...o,platform:s})};var Yt=typeof document<"u"?ee.useLayoutEffect:ee.useEffect;function nn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!nn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Di(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rs(e,t){const n=Di(e);return Math.round(t*n)/n}function Un(e){const t=i.useRef(e);return Yt(()=>{t.current=e}),t}function Zr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:l}={},transform:a=!0,whileElementsMounted:d,open:u}=e,[p,m]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=i.useState(r);nn(v,r)||x(r);const[E,f]=i.useState(null),[h,g]=i.useState(null),y=i.useCallback(O=>{O!==S.current&&(S.current=O,f(O))},[]),w=i.useCallback(O=>{O!==b.current&&(b.current=O,g(O))},[]),R=s||E,C=l||h,S=i.useRef(null),b=i.useRef(null),j=i.useRef(p),N=d!=null,$=Un(d),_=Un(o),U=Un(u),B=i.useCallback(()=>{if(!S.current||!b.current)return;const O={placement:t,strategy:n,middleware:v};_.current&&(O.platform=_.current),_p(S.current,b.current,O).then(z=>{const re={...z,isPositioned:U.current!==!1};T.current&&!nn(j.current,re)&&(j.current=re,ge.flushSync(()=>{m(re)}))})},[v,t,n,_,U]);Yt(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(O=>({...O,isPositioned:!1})))},[u]);const T=i.useRef(!1);Yt(()=>(T.current=!0,()=>{T.current=!1}),[]),Yt(()=>{if(R&&(S.current=R),C&&(b.current=C),R&&C){if($.current)return $.current(R,C,B);B()}},[R,C,B,$,N]);const W=i.useMemo(()=>({reference:S,floating:b,setReference:y,setFloating:w}),[y,w]),M=i.useMemo(()=>({reference:R,floating:C}),[R,C]),L=i.useMemo(()=>{const O={position:n,left:0,top:0};if(!M.floating)return O;const z=rs(M.floating,p.x),re=rs(M.floating,p.y);return a?{...O,transform:"translate("+z+"px, "+re+"px)",...Di(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:re}},[n,a,M.floating,p.x,p.y]);return i.useMemo(()=>({...p,update:B,refs:W,elements:M,floatingStyles:L}),[p,B,W,M,L])}const Fp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ns({element:r.current,padding:o}).fn(n):{}:r?ns({element:r,padding:o}).fn(n):{}}}},qr=(e,t)=>({...Op(e),options:[e,t]}),Qr=(e,t)=>({...Dp(e),options:[e,t]}),Jr=(e,t)=>({...Lp(e),options:[e,t]}),eo=(e,t)=>({...Ip(e),options:[e,t]}),to=(e,t)=>({...kp(e),options:[e,t]}),no=(e,t)=>({...Mp(e),options:[e,t]}),ro=(e,t)=>({...Fp(e),options:[e,t]});var Wp="Arrow",Ii=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ii.displayName=Wp;var Bp=Ii;function ki(e){const[t,n]=i.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oo="Popper",[Mi,Li]=Ze(oo),[Hp,_i]=Mi(oo),Fi=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(Hp,{scope:t,anchor:r,onAnchorChange:o,children:n})};Fi.displayName=oo;var Wi="PopperAnchor",Bi=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=_i(Wi,n),l=i.useRef(null),a=q(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(Q.div,{...o,ref:a})});Bi.displayName=Wi;var so="PopperContent",[Vp,Up]=Mi(so),Hi=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=_i(so,n),[g,y]=i.useState(null),w=q(t,J=>y(J)),[R,C]=i.useState(null),S=ki(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Kp),altBoundary:U},{refs:T,floatingStyles:W,placement:M,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Yp({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=zi(M),te=oe(E);se(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,k=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return se(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(Vp,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:k,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(Q.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});Hi.displayName=so;var Vi="PopperArrow",zp={top:"bottom",right:"left",bottom:"top",left:"right"},Ui=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Up(Vi,r),l=zp[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Bp,{...o,ref:n,style:{...o.style,display:"block"}})})});Ui.displayName=Vi;function Kp(e){return e!==null}var Yp=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=zi(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function zi(e){const[t,n="center"]=e.split("-");return[t,n]}var Xp=Fi,Gp=Bi,Zp=Hi,qp=Ui,Qp="Portal",io=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);se(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t}),l):null});io.displayName=Qp;function Jp(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])}var em="VisuallyHidden",xn=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(Q.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));xn.displayName=em;var Et="right-scroll-bar-position",wt="width-before-scroll-bar",tm="with-scroll-bars-hidden",nm="--removed-body-scroll-bar-size";function zn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function rm(e,t){var n=ee.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var om=typeof window<"u"?i.useLayoutEffect:i.useEffect,os=new WeakMap;function Ki(e,t){var n=rm(null,function(r){return e.forEach(function(o){return zn(o,r)})});return om(function(){var r=os.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(a){s.has(a)||zn(a,null)}),s.forEach(function(a){o.has(a)||zn(a,l)})}os.set(n,e)},[e]),n}var Yi=Hs(),Kn=function(){},gn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Kn,onWheelCapture:Kn,onTouchMoveCapture:Kn}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noIsolation,E=e.inert,f=e.allowPinchZoom,h=e.as,g=h===void 0?"div":h,y=e.gapMode,w=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=v,C=Ki([n,t]),S=ne(ne({},w),o);return i.createElement(i.Fragment,null,p&&i.createElement(R,{sideCar:Yi,removeScrollBar:u,shards:m,noIsolation:x,inert:E,setCallbacks:s,allowPinchZoom:!!f,lockRef:n,gapMode:y}),l?i.cloneElement(i.Children.only(a),ne(ne({},S),{ref:C})):i.createElement(g,ne({},S,{className:d,ref:C}),a))});gn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gn.classNames={fullWidth:wt,zeroRight:Et};function sm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ks();return t&&e.setAttribute("nonce",t),e}function im(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function am(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cm=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sm())&&(im(t,n),am(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lm=function(){var e=cm();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xi=function(){var e=lm(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},um={left:0,top:0,right:0,gap:0},Yn=function(e){return parseInt(e||"",10)||0},dm=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Yn(n),Yn(r),Yn(o)]},fm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return um;var t=dm(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pm=Xi(),ct="data-scroll-locked",mm=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),`
411
411
  .`.concat(tm,` {
412
412
  overflow: hidden `).concat(r,`;
413
413
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -444,10 +444,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
444
444
  body[`).concat(ct,`] {
445
445
  `).concat(nm,": ").concat(a,`px;
446
446
  }
447
- `)},ss=function(){var e=parseInt(document.body.getAttribute(ct)||"0",10);return isFinite(e)?e:0},hm=function(){i.useEffect(function(){return document.body.setAttribute(ct,(ss()+1).toString()),function(){var e=ss()-1;e<=0?document.body.removeAttribute(ct):document.body.setAttribute(ct,e.toString())}},[])},Gi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;hm();var s=i.useMemo(function(){return fm(o)},[o]);return i.createElement(pm,{styles:mm(s,!t,o,n?"":"!important")})},dr=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return dr=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{dr=!1}var et=dr?{passive:!1}:!1,vm=function(e){return e.tagName==="TEXTAREA"},Zi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vm(e)&&n[t]==="visible")},xm=function(e){return Zi(e,"overflowY")},gm=function(e){return Zi(e,"overflowX")},is=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=qi(e,r);if(o){var s=Qi(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ym=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Em=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qi=function(e,t){return e==="v"?xm(t):gm(t)},Qi=function(e,t){return e==="v"?ym(t):Em(t)},wm=function(e,t){return e==="h"&&t==="rtl"?-1:1},bm=function(e,t,n,r,o){var s=wm(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{var x=Qi(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&qi(e,a)&&(m+=g,v+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},Ft=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},as=function(e){return[e.deltaX,e.deltaY]},cs=function(e){return e&&"current"in e?e.current:e},Rm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cm=function(e){return`
447
+ `)},ss=function(){var e=parseInt(document.body.getAttribute(ct)||"0",10);return isFinite(e)?e:0},hm=function(){i.useEffect(function(){return document.body.setAttribute(ct,(ss()+1).toString()),function(){var e=ss()-1;e<=0?document.body.removeAttribute(ct):document.body.setAttribute(ct,e.toString())}},[])},Gi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;hm();var s=i.useMemo(function(){return fm(o)},[o]);return i.createElement(pm,{styles:mm(s,!t,o,n?"":"!important")})},fr=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return fr=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{fr=!1}var et=fr?{passive:!1}:!1,vm=function(e){return e.tagName==="TEXTAREA"},Zi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vm(e)&&n[t]==="visible")},xm=function(e){return Zi(e,"overflowY")},gm=function(e){return Zi(e,"overflowX")},is=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=qi(e,r);if(o){var s=Qi(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ym=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Em=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qi=function(e,t){return e==="v"?xm(t):gm(t)},Qi=function(e,t){return e==="v"?ym(t):Em(t)},wm=function(e,t){return e==="h"&&t==="rtl"?-1:1},bm=function(e,t,n,r,o){var s=wm(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{var x=Qi(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&qi(e,a)&&(m+=g,v+=E),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},Ft=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},as=function(e){return[e.deltaX,e.deltaY]},cs=function(e){return e&&"current"in e?e.current:e},Rm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cm=function(e){return`
448
448
  .block-interactivity-`.concat(e,` {pointer-events: none;}
449
449
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
450
- `)},Sm=0,tt=[];function jm(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Sm++)[0],s=i.useState(Dr)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(cs),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=Ft(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=is(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=is(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return bm(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!tt.length||tt[tt.length-1]!==s)){var g="deltaY"in h?as(h):Ft(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&Rm(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(cs).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Pm(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=Ft(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,as(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,Ft(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return tt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,et),document.addEventListener("touchmove",d,et),document.addEventListener("touchstart",p,et),function(){tt=tt.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,et),document.removeEventListener("touchmove",d,et),document.removeEventListener("touchstart",p,et)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:Cm(o)}):null,x?i.createElement(Gi,{gapMode:e.gapMode}):null)}function Pm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tm=Us(Yi,jm);var Ji=i.forwardRef(function(e,t){return i.createElement(xn,ne({},e,{ref:t,sideCar:Tm}))});Ji.classNames=xn.classNames;var Am=[" ","Enter","ArrowUp","ArrowDown"],Nm=[" ","Enter"],At="Select",[gn,yn,$m]=gi(At),[ht,Dy]=Ze(At,[$m,Li]),En=Li(),[Om,Be]=ht(At),[Dm,Im]=ht(At),ea=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:l,defaultValue:a,onValueChange:d,dir:u,name:p,autoComplete:m,disabled:v,required:x,form:E}=e,f=En(t),[h,g]=i.useState(null),[y,w]=i.useState(null),[R,C]=i.useState(!1),S=kf(u),[b=!1,j]=Rt({prop:r,defaultProp:o,onChange:s}),[N,$]=Rt({prop:l,defaultProp:a,onChange:d}),_=i.useRef(null),U=h?E||!!h.closest("form"):!0,[B,T]=i.useState(new Set),W=Array.from(B).map(k=>k.props.value).join(";");return c.jsxRuntimeExports.jsx(Xp,{...f,children:c.jsxRuntimeExports.jsxs(Om,{required:x,scope:t,trigger:h,onTriggerChange:g,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:R,onValueNodeHasChildrenChange:C,contentId:fe(),value:N,onValueChange:$,open:b,onOpenChange:j,dir:S,triggerPointerDownPosRef:_,disabled:v,children:[c.jsxRuntimeExports.jsx(gn.Provider,{scope:t,children:c.jsxRuntimeExports.jsx(Dm,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(k=>{T(L=>new Set(L).add(k))},[]),onNativeOptionRemove:i.useCallback(k=>{T(L=>{const O=new Set(L);return O.delete(k),O})},[]),children:n})}),U?c.jsxRuntimeExports.jsxs(Sa,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:k=>$(k.target.value),disabled:v,form:E,children:[N===void 0?c.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(B)]},W):null]})})};ea.displayName=At;var ta="SelectTrigger",na=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=En(n),l=Be(ta,n),a=l.disabled||r,d=q(t,l.onTriggerChange),u=yn(n),p=i.useRef("touch"),[m,v,x]=ja(f=>{const h=u().filter(w=>!w.disabled),g=h.find(w=>w.value===l.value),y=Pa(h,f,g);y!==void 0&&l.onValueChange(y.value)}),E=f=>{a||(l.onOpenChange(!0),x()),f&&(l.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return c.jsxRuntimeExports.jsx(Gp,{asChild:!0,...s,children:c.jsxRuntimeExports.jsx(Q.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ca(l.value)?"":void 0,...o,ref:d,onClick:V(o.onClick,f=>{f.currentTarget.focus(),p.current!=="mouse"&&E(f)}),onPointerDown:V(o.onPointerDown,f=>{p.current=f.pointerType;const h=f.target;h.hasPointerCapture(f.pointerId)&&h.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(E(f),f.preventDefault())}),onKeyDown:V(o.onKeyDown,f=>{const h=m.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&v(f.key),!(h&&f.key===" ")&&Am.includes(f.key)&&(E(),f.preventDefault())})})})});na.displayName=ta;var ra="SelectValue",oa=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:l="",...a}=e,d=Be(ra,n),{onValueNodeHasChildrenChange:u}=d,p=s!==void 0,m=q(t,d.onValueNodeChange);return se(()=>{u(p)},[u,p]),c.jsxRuntimeExports.jsx(Q.span,{...a,ref:m,style:{pointerEvents:"none"},children:Ca(d.value)?c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:l}):s})});oa.displayName=ra;var Mm="SelectIcon",sa=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});sa.displayName=Mm;var km="SelectPortal",ia=e=>c.jsxRuntimeExports.jsx(io,{asChild:!0,...e});ia.displayName=km;var Ke="SelectContent",aa=i.forwardRef((e,t)=>{const n=Be(Ke,e.__scopeSelect),[r,o]=i.useState();if(se(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ge.createPortal(c.jsxRuntimeExports.jsx(ca,{scope:e.__scopeSelect,children:c.jsxRuntimeExports.jsx(gn.Slot,{scope:e.__scopeSelect,children:c.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return c.jsxRuntimeExports.jsx(la,{...e,ref:t})});aa.displayName=Ke;var he=10,[ca,He]=ht(Ke),Lm="SelectContentImpl",la=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:l,side:a,sideOffset:d,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:E,hideWhenDetached:f,avoidCollisions:h,...g}=e,y=Be(Ke,n),[w,R]=i.useState(null),[C,S]=i.useState(null),b=q(t,A=>R(A)),[j,N]=i.useState(null),[$,_]=i.useState(null),U=yn(n),[B,T]=i.useState(!1),W=i.useRef(!1);i.useEffect(()=>{if(w)return dn(w)},[w]),Bs();const k=i.useCallback(A=>{const[H,...Y]=U().map(Z=>Z.ref.current),[X]=Y.slice(-1),G=document.activeElement;for(const Z of A)if(Z===G||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===H&&C&&(C.scrollTop=0),Z===X&&C&&(C.scrollTop=C.scrollHeight),Z==null||Z.focus(),document.activeElement!==G))return},[U,C]),L=i.useCallback(()=>k([j,w]),[k,j,w]);i.useEffect(()=>{B&&L()},[B,L]);const{onOpenChange:O,triggerPointerDownPosRef:z}=y;i.useEffect(()=>{if(w){let A={x:0,y:0};const H=X=>{var G,Z;A={x:Math.abs(Math.round(X.pageX)-(((G=z.current)==null?void 0:G.x)??0)),y:Math.abs(Math.round(X.pageY)-(((Z=z.current)==null?void 0:Z.y)??0))}},Y=X=>{A.x<=10&&A.y<=10?X.preventDefault():w.contains(X.target)||O(!1),document.removeEventListener("pointermove",H),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",Y,{capture:!0})}}},[w,O,z]),i.useEffect(()=>{const A=()=>O(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[O]);const[re,te]=ja(A=>{const H=U().filter(G=>!G.disabled),Y=H.find(G=>G.ref.current===document.activeElement),X=Pa(H,A,Y);X&&setTimeout(()=>X.ref.current.focus())}),P=i.useCallback((A,H,Y)=>{const X=!W.current&&!Y;(y.value!==void 0&&y.value===H||X)&&(N(A),X&&(W.current=!0))},[y.value]),M=i.useCallback(()=>w==null?void 0:w.focus(),[w]),F=i.useCallback((A,H,Y)=>{const X=!W.current&&!Y;(y.value!==void 0&&y.value===H||X)&&_(A)},[y.value]),D=r==="popper"?fr:ua,K=D===fr?{side:a,sideOffset:d,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:E,hideWhenDetached:f,avoidCollisions:h}:{};return c.jsxRuntimeExports.jsx(ca,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:P,selectedItem:j,onItemLeave:M,itemTextRefCallback:F,focusSelectedItem:L,selectedItemText:$,position:r,isPositioned:B,searchRef:re,children:c.jsxRuntimeExports.jsx(Ji,{as:Ct,allowPinchZoom:!0,children:c.jsxRuntimeExports.jsx(bi,{asChild:!0,trapped:y.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:V(o,A=>{var H;(H=y.trigger)==null||H.focus({preventScroll:!0}),A.preventDefault()}),children:c.jsxRuntimeExports.jsx(Ei,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsxRuntimeExports.jsx(D,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:A=>A.preventDefault(),...g,...K,onPlaced:()=>T(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:V(g.onKeyDown,A=>{const H=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!H&&A.key.length===1&&te(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let X=U().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(A.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const G=A.target,Z=X.indexOf(G);X=X.slice(Z+1)}setTimeout(()=>k(X)),A.preventDefault()}})})})})})})});la.displayName=Lm;var _m="SelectItemAlignedPosition",ua=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Be(Ke,n),l=He(Ke,n),[a,d]=i.useState(null),[u,p]=i.useState(null),m=q(t,b=>p(b)),v=yn(n),x=i.useRef(!1),E=i.useRef(!0),{viewport:f,selectedItem:h,selectedItemText:g,focusSelectedItem:y}=l,w=i.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&f&&h&&g){const b=s.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),$=g.getBoundingClientRect();if(s.dir!=="rtl"){const G=$.left-j.left,Z=N.left-G,J=b.left-Z,ie=b.width+J,Se=Math.max(ie,j.width),je=window.innerWidth-he,Pe=Ho(Z,[he,Math.max(he,je-Se)]);a.style.minWidth=ie+"px",a.style.left=Pe+"px"}else{const G=j.right-$.right,Z=window.innerWidth-N.right-G,J=window.innerWidth-b.right-Z,ie=b.width+J,Se=Math.max(ie,j.width),je=window.innerWidth-he,Pe=Ho(Z,[he,Math.max(he,je-Se)]);a.style.minWidth=ie+"px",a.style.right=Pe+"px"}const _=v(),U=window.innerHeight-he*2,B=f.scrollHeight,T=window.getComputedStyle(u),W=parseInt(T.borderTopWidth,10),k=parseInt(T.paddingTop,10),L=parseInt(T.borderBottomWidth,10),O=parseInt(T.paddingBottom,10),z=W+k+B+O+L,re=Math.min(h.offsetHeight*5,z),te=window.getComputedStyle(f),P=parseInt(te.paddingTop,10),M=parseInt(te.paddingBottom,10),F=b.top+b.height/2-he,D=U-F,K=h.offsetHeight/2,A=h.offsetTop+K,H=W+k+A,Y=z-H;if(H<=F){const G=_.length>0&&h===_[_.length-1].ref.current;a.style.bottom="0px";const Z=u.clientHeight-f.offsetTop-f.offsetHeight,J=Math.max(D,K+(G?M:0)+Z+L),ie=H+J;a.style.height=ie+"px"}else{const G=_.length>0&&h===_[0].ref.current;a.style.top="0px";const J=Math.max(F,W+f.offsetTop+(G?P:0)+K)+Y;a.style.height=J+"px",f.scrollTop=H-F+f.offsetTop}a.style.margin=`${he}px 0`,a.style.minHeight=re+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[v,s.trigger,s.valueNode,a,u,f,h,g,s.dir,r]);se(()=>w(),[w]);const[R,C]=i.useState();se(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=i.useCallback(b=>{b&&E.current===!0&&(w(),y==null||y(),E.current=!1)},[w,y]);return c.jsxRuntimeExports.jsx(Wm,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:S,children:c.jsxRuntimeExports.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:c.jsxRuntimeExports.jsx(Q.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ua.displayName=_m;var Fm="SelectPopperPosition",fr=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=he,...s}=e,l=En(n);return c.jsxRuntimeExports.jsx(Zp,{...l,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fr.displayName=Fm;var[Wm,ao]=ht(Ke,{}),pr="SelectViewport",da=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=He(pr,n),l=ao(pr,n),a=q(t,s.onViewportChange),d=i.useRef(0);return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsxRuntimeExports.jsx(gn.Slot,{scope:n,children:c.jsxRuntimeExports.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const E=window.innerHeight-he*2,f=parseFloat(m.style.minHeight),h=parseFloat(m.style.height),g=Math.max(f,h);if(g<E){const y=g+x,w=Math.min(E,y),R=y-w;m.style.height=w+"px",m.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});da.displayName=pr;var fa="SelectGroup",[Bm,Hm]=ht(fa),Vm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fe();return c.jsxRuntimeExports.jsx(Bm,{scope:n,id:o,children:c.jsxRuntimeExports.jsx(Q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vm.displayName=fa;var pa="SelectLabel",ma=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hm(pa,n);return c.jsxRuntimeExports.jsx(Q.div,{id:o.id,...r,ref:t})});ma.displayName=pa;var rn="SelectItem",[Um,ha]=ht(rn),va=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...l}=e,a=Be(rn,n),d=He(rn,n),u=a.value===r,[p,m]=i.useState(s??""),[v,x]=i.useState(!1),E=q(t,y=>{var w;return(w=d.itemRefCallback)==null?void 0:w.call(d,y,r,o)}),f=fe(),h=i.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsxRuntimeExports.jsx(Um,{scope:n,value:r,disabled:o,textId:f,isSelected:u,onItemTextChange:i.useCallback(y=>{m(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsxRuntimeExports.jsx(gn.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:c.jsxRuntimeExports.jsx(Q.div,{role:"option","aria-labelledby":f,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:E,onFocus:V(l.onFocus,()=>x(!0)),onBlur:V(l.onBlur,()=>x(!1)),onClick:V(l.onClick,()=>{h.current!=="mouse"&&g()}),onPointerUp:V(l.onPointerUp,()=>{h.current==="mouse"&&g()}),onPointerDown:V(l.onPointerDown,y=>{h.current=y.pointerType}),onPointerMove:V(l.onPointerMove,y=>{var w;h.current=y.pointerType,o?(w=d.onItemLeave)==null||w.call(d):h.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(l.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=d.onItemLeave)==null||w.call(d))}),onKeyDown:V(l.onKeyDown,y=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&y.key===" "||(Nm.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});va.displayName=rn;var yt="SelectItemText",xa=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,l=Be(yt,n),a=He(yt,n),d=ha(yt,n),u=Im(yt,n),[p,m]=i.useState(null),v=q(t,g=>m(g),d.onItemTextChange,g=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,g,d.value,d.disabled)}),x=p==null?void 0:p.textContent,E=i.useMemo(()=>c.jsxRuntimeExports.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:f,onNativeOptionRemove:h}=u;return se(()=>(f(E),()=>h(E)),[f,h,E]),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Q.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ge.createPortal(s.children,l.valueNode):null]})});xa.displayName=yt;var ga="SelectItemIndicator",ya=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ha(ga,n).isSelected?c.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...r,ref:t}):null});ya.displayName=ga;var mr="SelectScrollUpButton",Ea=i.forwardRef((e,t)=>{const n=He(mr,e.__scopeSelect),r=ao(mr,e.__scopeSelect),[o,s]=i.useState(!1),l=q(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=d.scrollTop>0;s(u)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsxRuntimeExports.jsx(ba,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Ea.displayName=mr;var hr="SelectScrollDownButton",wa=i.forwardRef((e,t)=>{const n=He(hr,e.__scopeSelect),r=ao(hr,e.__scopeSelect),[o,s]=i.useState(!1),l=q(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<u;s(p)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsxRuntimeExports.jsx(ba,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});wa.displayName=hr;var ba=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=He("SelectScrollButton",n),l=i.useRef(null),a=yn(n),d=i.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return i.useEffect(()=>()=>d(),[d]),se(()=>{var p;const u=a().find(m=>m.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),c.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:V(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:V(o.onPointerLeave,()=>{d()})})}),zm="SelectSeparator",Ra=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...r,ref:t})});Ra.displayName=zm;var vr="SelectArrow",Km=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=En(n),s=Be(vr,n),l=He(vr,n);return s.open&&l.position==="popper"?c.jsxRuntimeExports.jsx(qp,{...o,...r,ref:t}):null});Km.displayName=vr;function Ca(e){return e===""||e===void 0}var Sa=i.forwardRef((e,t)=>{const{value:n,...r}=e,o=i.useRef(null),s=q(t,o),l=Jp(n);return i.useEffect(()=>{const a=o.current,d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(a,n),a.dispatchEvent(m)}},[l,n]),c.jsxRuntimeExports.jsx(vn,{asChild:!0,children:c.jsxRuntimeExports.jsx("select",{...r,ref:s,defaultValue:n})})});Sa.displayName="BubbleSelect";function ja(e){const t=oe(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback(l=>{const a=n.current+l;t(a),function d(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(a)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Pa(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=Ym(e,Math.max(s,0));o.length===1&&(l=l.filter(u=>u!==n));const d=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Ym(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xm=ea,Ta=na,Gm=oa,Zm=sa,qm=ia,Aa=aa,Qm=da,Na=ma,$a=va,Jm=xa,eh=ya,Oa=Ea,Da=wa,Ia=Ra;const Ma=Xm,ka=Gm,co=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs(Ta,{ref:r,className:c.cn("flex h-10 items-center justify-between placeholder:text-neutral-100 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsxRuntimeExports.jsx(Zm,{asChild:!0,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"down",className:"h-4 w-4"})})]}));co.displayName=Ta.displayName;const La=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Oa,{ref:n,className:c.cn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"up",className:"h-4 w-4"})}));La.displayName=Oa.displayName;const _a=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Da,{ref:n,className:c.cn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"down",className:"h-4 w-4"})}));_a.displayName=Da.displayName;const Fa=i.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsxRuntimeExports.jsx(qm,{children:c.jsxRuntimeExports.jsxs(Aa,{ref:o,className:c.cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsxRuntimeExports.jsx(La,{}),c.jsxRuntimeExports.jsx(Qm,{className:c.cn(n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsxRuntimeExports.jsx(_a,{})]})}));Fa.displayName=Aa.displayName;const th=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Na,{ref:n,className:c.cn("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));th.displayName=Na.displayName;const Wa=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs($a,{ref:r,className:c.cn("relative flex w-full cursor-default select-none items-center outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsxRuntimeExports.jsx("span",{className:"absolute right-6 flex h-3.5 w-3.5 items-center justify-center",children:c.jsxRuntimeExports.jsx(eh,{children:c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.primary[900]})})}),c.jsxRuntimeExports.jsx(Jm,{children:t})]}));Wa.displayName=$a.displayName;const nh=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Ia,{ref:n,className:c.cn("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t}));nh.displayName=Ia.displayName;const rh=I.styled(ka)``,Ba=I.styled.label`
450
+ `)},Sm=0,tt=[];function jm(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Sm++)[0],s=i.useState(Dr)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(cs),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=Ft(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=is(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=is(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return bm(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!tt.length||tt[tt.length-1]!==s)){var g="deltaY"in h?as(h):Ft(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&Rm(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(cs).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Pm(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=Ft(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,as(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,Ft(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return tt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,et),document.addEventListener("touchmove",d,et),document.addEventListener("touchstart",p,et),function(){tt=tt.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,et),document.removeEventListener("touchmove",d,et),document.removeEventListener("touchstart",p,et)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:Cm(o)}):null,x?i.createElement(Gi,{gapMode:e.gapMode}):null)}function Pm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tm=Us(Yi,jm);var Ji=i.forwardRef(function(e,t){return i.createElement(gn,ne({},e,{ref:t,sideCar:Tm}))});Ji.classNames=gn.classNames;var Am=[" ","Enter","ArrowUp","ArrowDown"],Nm=[" ","Enter"],At="Select",[yn,En,$m]=gi(At),[ht,Dy]=Ze(At,[$m,Li]),wn=Li(),[Om,Be]=ht(At),[Dm,Im]=ht(At),ea=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:l,defaultValue:a,onValueChange:d,dir:u,name:p,autoComplete:m,disabled:v,required:x,form:E}=e,f=wn(t),[h,g]=i.useState(null),[y,w]=i.useState(null),[R,C]=i.useState(!1),S=Mf(u),[b=!1,j]=Rt({prop:r,defaultProp:o,onChange:s}),[N,$]=Rt({prop:l,defaultProp:a,onChange:d}),_=i.useRef(null),U=h?E||!!h.closest("form"):!0,[B,T]=i.useState(new Set),W=Array.from(B).map(M=>M.props.value).join(";");return c.jsxRuntimeExports.jsx(Xp,{...f,children:c.jsxRuntimeExports.jsxs(Om,{required:x,scope:t,trigger:h,onTriggerChange:g,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:R,onValueNodeHasChildrenChange:C,contentId:fe(),value:N,onValueChange:$,open:b,onOpenChange:j,dir:S,triggerPointerDownPosRef:_,disabled:v,children:[c.jsxRuntimeExports.jsx(yn.Provider,{scope:t,children:c.jsxRuntimeExports.jsx(Dm,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(M=>{T(L=>new Set(L).add(M))},[]),onNativeOptionRemove:i.useCallback(M=>{T(L=>{const O=new Set(L);return O.delete(M),O})},[]),children:n})}),U?c.jsxRuntimeExports.jsxs(Sa,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:N,onChange:M=>$(M.target.value),disabled:v,form:E,children:[N===void 0?c.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(B)]},W):null]})})};ea.displayName=At;var ta="SelectTrigger",na=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=wn(n),l=Be(ta,n),a=l.disabled||r,d=q(t,l.onTriggerChange),u=En(n),p=i.useRef("touch"),[m,v,x]=ja(f=>{const h=u().filter(w=>!w.disabled),g=h.find(w=>w.value===l.value),y=Pa(h,f,g);y!==void 0&&l.onValueChange(y.value)}),E=f=>{a||(l.onOpenChange(!0),x()),f&&(l.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return c.jsxRuntimeExports.jsx(Gp,{asChild:!0,...s,children:c.jsxRuntimeExports.jsx(Q.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ca(l.value)?"":void 0,...o,ref:d,onClick:V(o.onClick,f=>{f.currentTarget.focus(),p.current!=="mouse"&&E(f)}),onPointerDown:V(o.onPointerDown,f=>{p.current=f.pointerType;const h=f.target;h.hasPointerCapture(f.pointerId)&&h.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(E(f),f.preventDefault())}),onKeyDown:V(o.onKeyDown,f=>{const h=m.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&v(f.key),!(h&&f.key===" ")&&Am.includes(f.key)&&(E(),f.preventDefault())})})})});na.displayName=ta;var ra="SelectValue",oa=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:l="",...a}=e,d=Be(ra,n),{onValueNodeHasChildrenChange:u}=d,p=s!==void 0,m=q(t,d.onValueNodeChange);return se(()=>{u(p)},[u,p]),c.jsxRuntimeExports.jsx(Q.span,{...a,ref:m,style:{pointerEvents:"none"},children:Ca(d.value)?c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:l}):s})});oa.displayName=ra;var km="SelectIcon",sa=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});sa.displayName=km;var Mm="SelectPortal",ia=e=>c.jsxRuntimeExports.jsx(io,{asChild:!0,...e});ia.displayName=Mm;var Ke="SelectContent",aa=i.forwardRef((e,t)=>{const n=Be(Ke,e.__scopeSelect),[r,o]=i.useState();if(se(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?ge.createPortal(c.jsxRuntimeExports.jsx(ca,{scope:e.__scopeSelect,children:c.jsxRuntimeExports.jsx(yn.Slot,{scope:e.__scopeSelect,children:c.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return c.jsxRuntimeExports.jsx(la,{...e,ref:t})});aa.displayName=Ke;var he=10,[ca,He]=ht(Ke),Lm="SelectContentImpl",la=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:l,side:a,sideOffset:d,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:E,hideWhenDetached:f,avoidCollisions:h,...g}=e,y=Be(Ke,n),[w,R]=i.useState(null),[C,S]=i.useState(null),b=q(t,A=>R(A)),[j,N]=i.useState(null),[$,_]=i.useState(null),U=En(n),[B,T]=i.useState(!1),W=i.useRef(!1);i.useEffect(()=>{if(w)return fn(w)},[w]),Bs();const M=i.useCallback(A=>{const[H,...Y]=U().map(Z=>Z.ref.current),[X]=Y.slice(-1),G=document.activeElement;for(const Z of A)if(Z===G||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===H&&C&&(C.scrollTop=0),Z===X&&C&&(C.scrollTop=C.scrollHeight),Z==null||Z.focus(),document.activeElement!==G))return},[U,C]),L=i.useCallback(()=>M([j,w]),[M,j,w]);i.useEffect(()=>{B&&L()},[B,L]);const{onOpenChange:O,triggerPointerDownPosRef:z}=y;i.useEffect(()=>{if(w){let A={x:0,y:0};const H=X=>{var G,Z;A={x:Math.abs(Math.round(X.pageX)-(((G=z.current)==null?void 0:G.x)??0)),y:Math.abs(Math.round(X.pageY)-(((Z=z.current)==null?void 0:Z.y)??0))}},Y=X=>{A.x<=10&&A.y<=10?X.preventDefault():w.contains(X.target)||O(!1),document.removeEventListener("pointermove",H),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",Y,{capture:!0})}}},[w,O,z]),i.useEffect(()=>{const A=()=>O(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[O]);const[re,te]=ja(A=>{const H=U().filter(G=>!G.disabled),Y=H.find(G=>G.ref.current===document.activeElement),X=Pa(H,A,Y);X&&setTimeout(()=>X.ref.current.focus())}),P=i.useCallback((A,H,Y)=>{const X=!W.current&&!Y;(y.value!==void 0&&y.value===H||X)&&(N(A),X&&(W.current=!0))},[y.value]),k=i.useCallback(()=>w==null?void 0:w.focus(),[w]),F=i.useCallback((A,H,Y)=>{const X=!W.current&&!Y;(y.value!==void 0&&y.value===H||X)&&_(A)},[y.value]),D=r==="popper"?pr:ua,K=D===pr?{side:a,sideOffset:d,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:E,hideWhenDetached:f,avoidCollisions:h}:{};return c.jsxRuntimeExports.jsx(ca,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:P,selectedItem:j,onItemLeave:k,itemTextRefCallback:F,focusSelectedItem:L,selectedItemText:$,position:r,isPositioned:B,searchRef:re,children:c.jsxRuntimeExports.jsx(Ji,{as:Ct,allowPinchZoom:!0,children:c.jsxRuntimeExports.jsx(bi,{asChild:!0,trapped:y.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:V(o,A=>{var H;(H=y.trigger)==null||H.focus({preventScroll:!0}),A.preventDefault()}),children:c.jsxRuntimeExports.jsx(Ei,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsxRuntimeExports.jsx(D,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:A=>A.preventDefault(),...g,...K,onPlaced:()=>T(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:V(g.onKeyDown,A=>{const H=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!H&&A.key.length===1&&te(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let X=U().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(A.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const G=A.target,Z=X.indexOf(G);X=X.slice(Z+1)}setTimeout(()=>M(X)),A.preventDefault()}})})})})})})});la.displayName=Lm;var _m="SelectItemAlignedPosition",ua=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Be(Ke,n),l=He(Ke,n),[a,d]=i.useState(null),[u,p]=i.useState(null),m=q(t,b=>p(b)),v=En(n),x=i.useRef(!1),E=i.useRef(!0),{viewport:f,selectedItem:h,selectedItemText:g,focusSelectedItem:y}=l,w=i.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&f&&h&&g){const b=s.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),$=g.getBoundingClientRect();if(s.dir!=="rtl"){const G=$.left-j.left,Z=N.left-G,J=b.left-Z,ie=b.width+J,Se=Math.max(ie,j.width),je=window.innerWidth-he,Pe=Ho(Z,[he,Math.max(he,je-Se)]);a.style.minWidth=ie+"px",a.style.left=Pe+"px"}else{const G=j.right-$.right,Z=window.innerWidth-N.right-G,J=window.innerWidth-b.right-Z,ie=b.width+J,Se=Math.max(ie,j.width),je=window.innerWidth-he,Pe=Ho(Z,[he,Math.max(he,je-Se)]);a.style.minWidth=ie+"px",a.style.right=Pe+"px"}const _=v(),U=window.innerHeight-he*2,B=f.scrollHeight,T=window.getComputedStyle(u),W=parseInt(T.borderTopWidth,10),M=parseInt(T.paddingTop,10),L=parseInt(T.borderBottomWidth,10),O=parseInt(T.paddingBottom,10),z=W+M+B+O+L,re=Math.min(h.offsetHeight*5,z),te=window.getComputedStyle(f),P=parseInt(te.paddingTop,10),k=parseInt(te.paddingBottom,10),F=b.top+b.height/2-he,D=U-F,K=h.offsetHeight/2,A=h.offsetTop+K,H=W+M+A,Y=z-H;if(H<=F){const G=_.length>0&&h===_[_.length-1].ref.current;a.style.bottom="0px";const Z=u.clientHeight-f.offsetTop-f.offsetHeight,J=Math.max(D,K+(G?k:0)+Z+L),ie=H+J;a.style.height=ie+"px"}else{const G=_.length>0&&h===_[0].ref.current;a.style.top="0px";const J=Math.max(F,W+f.offsetTop+(G?P:0)+K)+Y;a.style.height=J+"px",f.scrollTop=H-F+f.offsetTop}a.style.margin=`${he}px 0`,a.style.minHeight=re+"px",a.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[v,s.trigger,s.valueNode,a,u,f,h,g,s.dir,r]);se(()=>w(),[w]);const[R,C]=i.useState();se(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=i.useCallback(b=>{b&&E.current===!0&&(w(),y==null||y(),E.current=!1)},[w,y]);return c.jsxRuntimeExports.jsx(Wm,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:S,children:c.jsxRuntimeExports.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:c.jsxRuntimeExports.jsx(Q.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ua.displayName=_m;var Fm="SelectPopperPosition",pr=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=he,...s}=e,l=wn(n);return c.jsxRuntimeExports.jsx(Zp,{...l,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});pr.displayName=Fm;var[Wm,ao]=ht(Ke,{}),mr="SelectViewport",da=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=He(mr,n),l=ao(mr,n),a=q(t,s.onViewportChange),d=i.useRef(0);return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsxRuntimeExports.jsx(yn.Slot,{scope:n,children:c.jsxRuntimeExports.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:V(o.onScroll,u=>{const p=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:v}=l;if(v!=null&&v.current&&m){const x=Math.abs(d.current-p.scrollTop);if(x>0){const E=window.innerHeight-he*2,f=parseFloat(m.style.minHeight),h=parseFloat(m.style.height),g=Math.max(f,h);if(g<E){const y=g+x,w=Math.min(E,y),R=y-w;m.style.height=w+"px",m.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});da.displayName=mr;var fa="SelectGroup",[Bm,Hm]=ht(fa),Vm=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fe();return c.jsxRuntimeExports.jsx(Bm,{scope:n,id:o,children:c.jsxRuntimeExports.jsx(Q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vm.displayName=fa;var pa="SelectLabel",ma=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hm(pa,n);return c.jsxRuntimeExports.jsx(Q.div,{id:o.id,...r,ref:t})});ma.displayName=pa;var rn="SelectItem",[Um,ha]=ht(rn),va=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...l}=e,a=Be(rn,n),d=He(rn,n),u=a.value===r,[p,m]=i.useState(s??""),[v,x]=i.useState(!1),E=q(t,y=>{var w;return(w=d.itemRefCallback)==null?void 0:w.call(d,y,r,o)}),f=fe(),h=i.useRef("touch"),g=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsxRuntimeExports.jsx(Um,{scope:n,value:r,disabled:o,textId:f,isSelected:u,onItemTextChange:i.useCallback(y=>{m(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsxRuntimeExports.jsx(yn.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:c.jsxRuntimeExports.jsx(Q.div,{role:"option","aria-labelledby":f,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:E,onFocus:V(l.onFocus,()=>x(!0)),onBlur:V(l.onBlur,()=>x(!1)),onClick:V(l.onClick,()=>{h.current!=="mouse"&&g()}),onPointerUp:V(l.onPointerUp,()=>{h.current==="mouse"&&g()}),onPointerDown:V(l.onPointerDown,y=>{h.current=y.pointerType}),onPointerMove:V(l.onPointerMove,y=>{var w;h.current=y.pointerType,o?(w=d.onItemLeave)==null||w.call(d):h.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(l.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=d.onItemLeave)==null||w.call(d))}),onKeyDown:V(l.onKeyDown,y=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&y.key===" "||(Nm.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});va.displayName=rn;var yt="SelectItemText",xa=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,l=Be(yt,n),a=He(yt,n),d=ha(yt,n),u=Im(yt,n),[p,m]=i.useState(null),v=q(t,g=>m(g),d.onItemTextChange,g=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,g,d.value,d.disabled)}),x=p==null?void 0:p.textContent,E=i.useMemo(()=>c.jsxRuntimeExports.jsx("option",{value:d.value,disabled:d.disabled,children:x},d.value),[d.disabled,d.value,x]),{onNativeOptionAdd:f,onNativeOptionRemove:h}=u;return se(()=>(f(E),()=>h(E)),[f,h,E]),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Q.span,{id:d.textId,...s,ref:v}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ge.createPortal(s.children,l.valueNode):null]})});xa.displayName=yt;var ga="SelectItemIndicator",ya=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ha(ga,n).isSelected?c.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...r,ref:t}):null});ya.displayName=ga;var hr="SelectScrollUpButton",Ea=i.forwardRef((e,t)=>{const n=He(hr,e.__scopeSelect),r=ao(hr,e.__scopeSelect),[o,s]=i.useState(!1),l=q(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=d.scrollTop>0;s(u)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsxRuntimeExports.jsx(ba,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop-d.offsetHeight)}}):null});Ea.displayName=hr;var vr="SelectScrollDownButton",wa=i.forwardRef((e,t)=>{const n=He(vr,e.__scopeSelect),r=ao(vr,e.__scopeSelect),[o,s]=i.useState(!1),l=q(t,r.onScrollButtonChange);return se(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<u;s(p)};const d=n.viewport;return a(),d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?c.jsxRuntimeExports.jsx(ba,{...e,ref:l,onAutoScroll:()=>{const{viewport:a,selectedItem:d}=n;a&&d&&(a.scrollTop=a.scrollTop+d.offsetHeight)}}):null});wa.displayName=vr;var ba=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=He("SelectScrollButton",n),l=i.useRef(null),a=En(n),d=i.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return i.useEffect(()=>()=>d(),[d]),se(()=>{var p;const u=a().find(m=>m.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),c.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:V(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:V(o.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:V(o.onPointerLeave,()=>{d()})})}),zm="SelectSeparator",Ra=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...r,ref:t})});Ra.displayName=zm;var xr="SelectArrow",Km=i.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wn(n),s=Be(xr,n),l=He(xr,n);return s.open&&l.position==="popper"?c.jsxRuntimeExports.jsx(qp,{...o,...r,ref:t}):null});Km.displayName=xr;function Ca(e){return e===""||e===void 0}var Sa=i.forwardRef((e,t)=>{const{value:n,...r}=e,o=i.useRef(null),s=q(t,o),l=Jp(n);return i.useEffect(()=>{const a=o.current,d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==n&&p){const m=new Event("change",{bubbles:!0});p.call(a,n),a.dispatchEvent(m)}},[l,n]),c.jsxRuntimeExports.jsx(xn,{asChild:!0,children:c.jsxRuntimeExports.jsx("select",{...r,ref:s,defaultValue:n})})});Sa.displayName="BubbleSelect";function ja(e){const t=oe(e),n=i.useRef(""),r=i.useRef(0),o=i.useCallback(l=>{const a=n.current+l;t(a),function d(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(a)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Pa(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=Ym(e,Math.max(s,0));o.length===1&&(l=l.filter(u=>u!==n));const d=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Ym(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xm=ea,Ta=na,Gm=oa,Zm=sa,qm=ia,Aa=aa,Qm=da,Na=ma,$a=va,Jm=xa,eh=ya,Oa=Ea,Da=wa,Ia=Ra;const ka=Xm,Ma=Gm,co=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs(Ta,{ref:r,className:c.cn("flex h-10 items-center justify-between placeholder:text-neutral-100 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsxRuntimeExports.jsx(Zm,{asChild:!0,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"down",className:"h-4 w-4"})})]}));co.displayName=Ta.displayName;const La=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Oa,{ref:n,className:c.cn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"up",className:"h-4 w-4"})}));La.displayName=Oa.displayName;const _a=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Da,{ref:n,className:c.cn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsxRuntimeExports.jsx(c.Chevron,{direction:"down",className:"h-4 w-4"})}));_a.displayName=Da.displayName;const Fa=i.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>c.jsxRuntimeExports.jsx(qm,{children:c.jsxRuntimeExports.jsxs(Aa,{ref:o,className:c.cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsxRuntimeExports.jsx(La,{}),c.jsxRuntimeExports.jsx(Qm,{className:c.cn(n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsxRuntimeExports.jsx(_a,{})]})}));Fa.displayName=Aa.displayName;const th=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Na,{ref:n,className:c.cn("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));th.displayName=Na.displayName;const Wa=i.forwardRef(({className:e,children:t,...n},r)=>c.jsxRuntimeExports.jsxs($a,{ref:r,className:c.cn("relative flex w-full cursor-default select-none items-center outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[c.jsxRuntimeExports.jsx("span",{className:"absolute right-6 flex h-3.5 w-3.5 items-center justify-center",children:c.jsxRuntimeExports.jsx(eh,{children:c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.primary[900]})})}),c.jsxRuntimeExports.jsx(Jm,{children:t})]}));Wa.displayName=$a.displayName;const nh=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(Ia,{ref:n,className:c.cn("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t}));nh.displayName=Ia.displayName;const rh=I.styled(Ma)``,Ba=I.styled.label`
451
451
  position: absolute;
452
452
  top: 0;
453
453
  left: 0;
@@ -506,7 +506,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
506
506
  background: ${c.colors.neutral[50]};
507
507
  cursor: pointer;
508
508
  }
509
- `;function sh({label:e,options:t,onChange:n,value:r}){return ee.useEffect(()=>{t.length===1&&!r&&n(t[0].value)},[t,r]),c.jsxRuntimeExports.jsxs(Ma,{value:r,onValueChange:o=>n(o),children:[c.jsxRuntimeExports.jsxs(oh,{children:[c.jsxRuntimeExports.jsx(Ba,{children:e}),c.jsxRuntimeExports.jsx(rh,{})]}),c.jsxRuntimeExports.jsx(Ha,{children:t.map(o=>c.jsxRuntimeExports.jsx(Va,{$selected:r===o.value,value:o.value,children:o.text},o.value))})]})}function ih({height:e,width:t,...n}){return c.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse bg-neutral-100"),style:{height:e,width:t},...n})}const ah=({height:e,width:t})=>c.jsxRuntimeExports.jsx(ih,{height:e,width:t}),ch=I.styled(co)`
509
+ `;function sh({label:e,options:t,onChange:n,value:r}){return ee.useEffect(()=>{t.length===1&&!r&&n(t[0].value)},[t,r]),c.jsxRuntimeExports.jsxs(ka,{value:r,onValueChange:o=>n(o),children:[c.jsxRuntimeExports.jsxs(oh,{children:[c.jsxRuntimeExports.jsx(Ba,{children:e}),c.jsxRuntimeExports.jsx(rh,{})]}),c.jsxRuntimeExports.jsx(Ha,{children:t.map(o=>c.jsxRuntimeExports.jsx(Va,{$selected:r===o.value,value:o.value,children:o.text},o.value))})]})}function ih({height:e,width:t,...n}){return c.jsxRuntimeExports.jsx("div",{className:c.cn("animate-pulse bg-neutral-100"),style:{height:e,width:t},...n})}const ah=({height:e,width:t})=>c.jsxRuntimeExports.jsx(ih,{height:e,width:t}),ch=I.styled(co)`
510
510
  & span {
511
511
  color: ${c.colors.fg.primary};
512
512
  margin: 0;
@@ -516,7 +516,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
516
516
  height: 1.313rem;
517
517
  width: 0.063rem;
518
518
  background: ${c.colors.border.default};
519
- `;function uh({value:e,onChange:t,children:n}){const[r,o]=ee.useState(e);ee.useEffect(()=>{o(e)},[e]);const s=l=>{o(l),t&&t(l)};return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsxs(Ma,{value:r,onValueChange:s,children:[c.jsxRuntimeExports.jsx(ch,{children:c.jsxRuntimeExports.jsx(ka,{children:r})}),c.jsxRuntimeExports.jsx(Ha,{children:n})]}),c.jsxRuntimeExports.jsx(lh,{})]})}const dh=I.styled.div`
519
+ `;function uh({value:e,onChange:t,children:n}){const[r,o]=ee.useState(e);ee.useEffect(()=>{o(e)},[e]);const s=l=>{o(l),t&&t(l)};return c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsxs(ka,{value:r,onValueChange:s,children:[c.jsxRuntimeExports.jsx(ch,{children:c.jsxRuntimeExports.jsx(Ma,{children:r})}),c.jsxRuntimeExports.jsx(Ha,{children:n})]}),c.jsxRuntimeExports.jsx(lh,{})]})}const dh=I.styled.div`
520
520
  z-index: 1;
521
521
  `,fh=I.styled.div`
522
522
  position: absolute;
@@ -555,7 +555,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
555
555
  padding: 0.875rem 0;
556
556
  width: 100%;
557
557
  height: 100%;
558
- `,wn=I.styled.label`
558
+ `,bn=I.styled.label`
559
559
  position: absolute;
560
560
  top: 0;
561
561
  left: 0;
@@ -578,14 +578,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
578
578
  &:focus {
579
579
  outline: none;
580
580
  }
581
- &:focus + ${wn} {
581
+ &:focus + ${bn} {
582
582
  ${Ua}
583
583
  }
584
584
  &::-webkit-outer-spin-button,
585
585
  &::-webkit-inner-spin-button {
586
586
  -webkit-appearance: none;
587
587
  }
588
- `;function hh({label:e,value:t,type:n,currency:r,onChange:o,onBlur:s,tooltipText:l,error:a,helperText:d,...u}){const p=r?"number":n||"text",m=ee.useId();return c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsxs(za,{$error:!!a,children:[r&&c.jsxRuntimeExports.jsx(uh,{value:"€",children:c.jsxRuntimeExports.jsx(Va,{value:"€",children:"EUR (€)"})}),c.jsxRuntimeExports.jsxs(Ka,{children:[c.jsxRuntimeExports.jsx(mh,{type:p,id:`${m}-${e}`,onChange:v=>o(v.target.value),onBlur:s,value:t,...u}),c.jsxRuntimeExports.jsx(wn,{htmlFor:`${m}-${e}`,$hasValue:!!t,children:e})]}),l&&c.jsxRuntimeExports.jsx(ph,{children:l})]}),(a||d)&&c.jsxRuntimeExports.jsx($r,{error:!!a,children:a||d})]})}const vh=I.styled.div`
588
+ `;function hh({label:e,value:t,type:n,currency:r,onChange:o,onBlur:s,tooltipText:l,error:a,helperText:d,...u}){const p=r?"number":n||"text",m=ee.useId();return c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsxs(za,{$error:!!a,children:[r&&c.jsxRuntimeExports.jsx(uh,{value:"€",children:c.jsxRuntimeExports.jsx(Va,{value:"€",children:"EUR (€)"})}),c.jsxRuntimeExports.jsxs(Ka,{children:[c.jsxRuntimeExports.jsx(mh,{type:p,id:`${m}-${e}`,onChange:v=>o(v.target.value),onBlur:s,value:t,...u}),c.jsxRuntimeExports.jsx(bn,{htmlFor:`${m}-${e}`,$hasValue:!!t,children:e})]}),l&&c.jsxRuntimeExports.jsx(ph,{children:l})]}),(a||d)&&c.jsxRuntimeExports.jsx(an,{error:!!a,children:a||d})]})}const vh=I.styled.div`
589
589
  margin: 0 auto;
590
590
  vertical-align: middle;
591
591
  position: relative;
@@ -632,14 +632,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
632
632
  transform: translate(-50%, -50%) scale(0);
633
633
  }
634
634
  }
635
- `;function Ya({size:e="4rem",color:t=c.colors.fg.primary}){return c.jsxRuntimeExports.jsx(vh,{$size:e,$color:t})}const xh=1,gh=1e6;let Yn=0;function yh(){return Yn=(Yn+1)%Number.MAX_SAFE_INTEGER,Yn.toString()}const Xn=new Map,ls=e=>{if(Xn.has(e))return;const t=setTimeout(()=>{Xn.delete(e),bt({type:"REMOVE_TOAST",toastId:e})},gh);Xn.set(e,t)},Eh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,xh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?ls(n):e.toasts.forEach(r=>{ls(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Xt=[];let Gt={toasts:[]};function bt(e){Gt=Eh(Gt,e),Xt.forEach(t=>{t(Gt)})}function wh({...e}){const t=yh(),n=o=>bt({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>bt({type:"DISMISS_TOAST",toastId:t});return bt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Xa(){const[e,t]=i.useState(Gt);return i.useEffect(()=>(Xt.push(t),()=>{const n=Xt.indexOf(t);n>-1&&Xt.splice(n,1)}),[e]),{...e,toast:wh,dismiss:n=>bt({type:"DISMISS_TOAST",toastId:n})}}function bh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9 7.58579L7.58579 9L10.5858 12L7.58579 15L9 16.4142L12 13.4142L15 16.4142L16.4142 15L13.4142 12L16.4142 9L15 7.58579L12 10.5858L9 7.58579Z",fill:"#FE4C00"})})}function Rh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM10 10H13V17H11V12H10V10ZM11 9V7H13V9H11Z",fill:"#9DA7A2"})})}function Ch(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21.9996C17.5228 21.9996 22 17.5225 22 11.9996C22 6.47679 17.5228 1.99963 12 1.99963C6.47715 1.99963 2 6.47679 2 11.9996C2 17.5225 6.47715 21.9996 12 21.9996ZM10.5744 16.4881L16.4073 9.35888L14.8594 8.09241L10.4259 13.5112L8.50015 11.5854L7.08594 12.9996L10.5744 16.4881Z",fill:"#3B872C"})})}function Sh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7367 4.53861C12.9689 3.19498 11.0315 3.19498 10.2637 4.53861L1.71007 19.5075C0.948179 20.8408 1.91091 22.4998 3.44656 22.4998H20.5538C22.0895 22.4998 23.0522 20.8408 22.2903 19.5075L13.7367 4.53861ZM11 9.49997H13V15.5H11V9.49997ZM11 17.5H13V19.5H11V17.5Z",fill:"#FEA900"})})}var jh="DismissableLayer",xr="dismissableLayer.update",Ph="dismissableLayer.pointerDownOutside",Th="dismissableLayer.focusOutside",us,Ga=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Za=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(Ga),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Nh(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=$h(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return cn(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(us=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ds(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=us)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ds())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(xr,b),()=>document.removeEventListener(xr,b)},[]),c.jsxRuntimeExports.jsx(Q.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Za.displayName=jh;var Ah="DismissableLayerBranch",qa=i.forwardRef((e,t)=>{const n=i.useContext(Ga),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Q.div,{...e,ref:o})});qa.displayName=Ah;function Nh(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Qa(Ph,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $h(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qa(Th,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ds(){const e=new CustomEvent(xr);document.dispatchEvent(e)}function Qa(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var Oh=Za,Dh=qa;function Ih(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var lo=e=>{const{present:t,children:n}=e,r=Mh(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=q(r.ref,kh(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};lo.displayName="Presence";function Mh(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Ih(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Wt(r.current);s.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Wt(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),se(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Wt(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Wt(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wt(e){return(e==null?void 0:e.animationName)||"none"}function kh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uo="ToastProvider",[fo,Lh,_h]=gi("Toast"),[Ja,Iy]=Ze("Toast",[_h]),[Fh,bn]=Ja(uo),ec=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:l}=e,[a,d]=i.useState(null),[u,p]=i.useState(0),m=i.useRef(!1),v=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${uo}\`. Expected non-empty \`string\`.`),c.jsxRuntimeExports.jsx(fo.Provider,{scope:t,children:c.jsxRuntimeExports.jsx(Fh,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:d,onToastAdd:i.useCallback(()=>p(x=>x+1),[]),onToastRemove:i.useCallback(()=>p(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:v,children:l})})};ec.displayName=uo;var tc="ToastViewport",Wh=["F8"],gr="toast.viewportPause",yr="toast.viewportResume",nc=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Wh,label:o="Notifications ({hotkey})",...s}=e,l=bn(tc,n),a=Lh(n),d=i.useRef(null),u=i.useRef(null),p=i.useRef(null),m=i.useRef(null),v=q(t,m,l.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=l.toastCount>0;i.useEffect(()=>{const h=g=>{var w;r.length!==0&&r.every(R=>g[R]||g.code===R)&&((w=m.current)==null||w.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),i.useEffect(()=>{const h=d.current,g=m.current;if(E&&h&&g){const y=()=>{if(!l.isClosePausedRef.current){const S=new CustomEvent(gr);g.dispatchEvent(S),l.isClosePausedRef.current=!0}},w=()=>{if(l.isClosePausedRef.current){const S=new CustomEvent(yr);g.dispatchEvent(S),l.isClosePausedRef.current=!1}},R=S=>{!h.contains(S.relatedTarget)&&w()},C=()=>{h.contains(document.activeElement)||w()};return h.addEventListener("focusin",y),h.addEventListener("focusout",R),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",w),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",R),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",w)}}},[E,l.isClosePausedRef]);const f=i.useCallback(({tabbingDirection:h})=>{const y=a().map(w=>{const R=w.ref.current,C=[R,...Jh(R)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const h=m.current;if(h){const g=y=>{var C,S,b;const w=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!w){const j=document.activeElement,N=y.shiftKey;if(y.target===h&&N){(C=u.current)==null||C.focus();return}const U=f({tabbingDirection:N?"backwards":"forwards"}),B=U.findIndex(T=>T===j);Gn(U.slice(B+1))?y.preventDefault():N?(S=u.current)==null||S.focus():(b=p.current)==null||b.focus()}};return h.addEventListener("keydown",g),()=>h.removeEventListener("keydown",g)}},[a,f]),c.jsxRuntimeExports.jsxs(Dh,{ref:d,role:"region","aria-label":o.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&c.jsxRuntimeExports.jsx(Er,{ref:u,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"forwards"});Gn(h)}}),c.jsxRuntimeExports.jsx(fo.Slot,{scope:n,children:c.jsxRuntimeExports.jsx(Q.ol,{tabIndex:-1,...s,ref:v})}),E&&c.jsxRuntimeExports.jsx(Er,{ref:p,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"backwards"});Gn(h)}})]})});nc.displayName=tc;var rc="ToastFocusProxy",Er=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=bn(rc,n);return c.jsxRuntimeExports.jsx(vn,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:l=>{var u;const a=l.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Er.displayName=rc;var Rn="Toast",Bh="toast.swipeStart",Hh="toast.swipeMove",Vh="toast.swipeCancel",Uh="toast.swipeEnd",oc=i.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...l}=e,[a=!0,d]=Rt({prop:r,defaultProp:o,onChange:s});return c.jsxRuntimeExports.jsx(lo,{present:n||a,children:c.jsxRuntimeExports.jsx(Yh,{open:a,...l,ref:t,onClose:()=>d(!1),onPause:oe(e.onPause),onResume:oe(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(e.onSwipeMove,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:V(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:V(e.onSwipeEnd,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),d(!1)})})})});oc.displayName=Rn;var[zh,Kh]=Ja(Rn,{onClose(){}}),Yh=i.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:l,onEscapeKeyDown:a,onPause:d,onResume:u,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:v,onSwipeEnd:x,...E}=e,f=bn(Rn,n),[h,g]=i.useState(null),y=q(t,T=>g(T)),w=i.useRef(null),R=i.useRef(null),C=o||f.duration,S=i.useRef(0),b=i.useRef(C),j=i.useRef(0),{onToastAdd:N,onToastRemove:$}=f,_=oe(()=>{var W;(h==null?void 0:h.contains(document.activeElement))&&((W=f.viewport)==null||W.focus()),l()}),U=i.useCallback(T=>{!T||T===1/0||(window.clearTimeout(j.current),S.current=new Date().getTime(),j.current=window.setTimeout(_,T))},[_]);i.useEffect(()=>{const T=f.viewport;if(T){const W=()=>{U(b.current),u==null||u()},k=()=>{const L=new Date().getTime()-S.current;b.current=b.current-L,window.clearTimeout(j.current),d==null||d()};return T.addEventListener(gr,k),T.addEventListener(yr,W),()=>{T.removeEventListener(gr,k),T.removeEventListener(yr,W)}}},[f.viewport,C,d,u,U]),i.useEffect(()=>{s&&!f.isClosePausedRef.current&&U(C)},[s,C,f.isClosePausedRef,U]),i.useEffect(()=>(N(),()=>$()),[N,$]);const B=i.useMemo(()=>h?dc(h):null,[h]);return f.viewport?c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[B&&c.jsxRuntimeExports.jsx(Xh,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),c.jsxRuntimeExports.jsx(zh,{scope:n,onClose:_,children:ge.createPortal(c.jsxRuntimeExports.jsx(fo.ItemSlot,{scope:n,children:c.jsxRuntimeExports.jsx(Oh,{asChild:!0,onEscapeKeyDown:V(a,()=>{f.isFocusedToastEscapeKeyDownRef.current||_(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsxRuntimeExports.jsx(Q.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...E,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,T=>{T.key==="Escape"&&(a==null||a(T.nativeEvent),T.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:V(e.onPointerDown,T=>{T.button===0&&(w.current={x:T.clientX,y:T.clientY})}),onPointerMove:V(e.onPointerMove,T=>{if(!w.current)return;const W=T.clientX-w.current.x,k=T.clientY-w.current.y,L=!!R.current,O=["left","right"].includes(f.swipeDirection),z=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,re=O?z(0,W):0,te=O?0:z(0,k),P=T.pointerType==="touch"?10:2,M={x:re,y:te},F={originalEvent:T,delta:M};L?(R.current=M,Bt(Hh,m,F,{discrete:!1})):fs(M,f.swipeDirection,P)?(R.current=M,Bt(Bh,p,F,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(W)>P||Math.abs(k)>P)&&(w.current=null)}),onPointerUp:V(e.onPointerUp,T=>{const W=R.current,k=T.target;if(k.hasPointerCapture(T.pointerId)&&k.releasePointerCapture(T.pointerId),R.current=null,w.current=null,W){const L=T.currentTarget,O={originalEvent:T,delta:W};fs(W,f.swipeDirection,f.swipeThreshold)?Bt(Uh,x,O,{discrete:!0}):Bt(Vh,v,O,{discrete:!0}),L.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Xh=e=>{const{__scopeToast:t,children:n,...r}=e,o=bn(Rn,t),[s,l]=i.useState(!1),[a,d]=i.useState(!1);return qh(()=>l(!0)),i.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsxRuntimeExports.jsx(io,{asChild:!0,children:c.jsxRuntimeExports.jsx(vn,{...r,children:s&&c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[o.label," ",n]})})})},Gh="ToastTitle",sc=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t})});sc.displayName=Gh;var Zh="ToastDescription",ic=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t})});ic.displayName=Zh;var ac="ToastAction",cc=i.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsxRuntimeExports.jsx(uc,{altText:n,asChild:!0,children:c.jsxRuntimeExports.jsx(po,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ac}\`. Expected non-empty \`string\`.`),null)});cc.displayName=ac;var lc="ToastClose",po=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=Kh(lc,n);return c.jsxRuntimeExports.jsx(uc,{asChild:!0,children:c.jsxRuntimeExports.jsx(Q.button,{type:"button",...r,ref:t,onClick:V(e.onClick,o.onClose)})})});po.displayName=lc;var uc=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return c.jsxRuntimeExports.jsx(Q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function dc(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Qh(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...dc(r))}}),t}function Bt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var fs=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function qh(e=()=>{}){const t=oe(e);se(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Qh(e){return e.nodeType===e.ELEMENT_NODE}function Jh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Gn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ev=ec,fc=nc,pc=oc,mc=sc,hc=ic,vc=cc,xc=po;function gc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=gc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tv(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=gc(e))&&(r&&(r+=" "),r+=t);return r}const nv=tv,rv=(e,t)=>n=>nv(e,n==null?void 0:n.class,n==null?void 0:n.className),ov=ev,yc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fc,{ref:n,className:c.cn("fixed bottom-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:w-fit sm:min-w-[300px] sm:max-w-[420px]",e),...t}));yc.displayName=fc.displayName;const sv=rv("group pointer-events-auto relative flex w-full items-center overflow-hidden pr-8 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full"),Ec=i.forwardRef(({className:e,testId:t,...n},r)=>c.jsxRuntimeExports.jsx(pc,{"data-testid":t,ref:r,className:c.cn(sv(),e),...n}));Ec.displayName=pc.displayName;const iv=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(vc,{ref:n,className:c.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-neutral-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900",e),...t}));iv.displayName=vc.displayName;const wc=i.forwardRef(({color:e,...t},n)=>c.jsxRuntimeExports.jsx(xc,{ref:n,"toast-close":"",...t,children:c.jsxRuntimeExports.jsx(c.Close,{color:e,className:"h-4 w-4"})}));wc.displayName=xc.displayName;const bc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(mc,{ref:n,className:c.cn("text-sm font-semibold",e),...t}));bc.displayName=mc.displayName;const Rc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(hc,{ref:n,className:c.cn("text-sm opacity-90",e),...t}));Rc.displayName=hc.displayName;const wr={success:{background:c.colors.sf.light.action,color:c.colors.fg.accent.action},error:{background:c.colors.sf.light.error,color:c.colors.fg.accent.error},info:{background:c.colors.sf.light.tertiary,color:c.colors.fg.base},warning:{background:c.colors.sf.light.warning,color:c.colors.fg.accent.warning}},av=I.styled(Ec)`
635
+ `;function Ya({size:e="4rem",color:t=c.colors.fg.primary}){return c.jsxRuntimeExports.jsx(vh,{$size:e,$color:t})}const xh=1,gh=1e6;let Xn=0;function yh(){return Xn=(Xn+1)%Number.MAX_SAFE_INTEGER,Xn.toString()}const Gn=new Map,ls=e=>{if(Gn.has(e))return;const t=setTimeout(()=>{Gn.delete(e),bt({type:"REMOVE_TOAST",toastId:e})},gh);Gn.set(e,t)},Eh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,xh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?ls(n):e.toasts.forEach(r=>{ls(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Xt=[];let Gt={toasts:[]};function bt(e){Gt=Eh(Gt,e),Xt.forEach(t=>{t(Gt)})}function wh({...e}){const t=yh(),n=o=>bt({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>bt({type:"DISMISS_TOAST",toastId:t});return bt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function Xa(){const[e,t]=i.useState(Gt);return i.useEffect(()=>(Xt.push(t),()=>{const n=Xt.indexOf(t);n>-1&&Xt.splice(n,1)}),[e]),{...e,toast:wh,dismiss:n=>bt({type:"DISMISS_TOAST",toastId:n})}}function bh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9 7.58579L7.58579 9L10.5858 12L7.58579 15L9 16.4142L12 13.4142L15 16.4142L16.4142 15L13.4142 12L16.4142 9L15 7.58579L12 10.5858L9 7.58579Z",fill:"#FE4C00"})})}function Rh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM10 10H13V17H11V12H10V10ZM11 9V7H13V9H11Z",fill:"#9DA7A2"})})}function Ch(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21.9996C17.5228 21.9996 22 17.5225 22 11.9996C22 6.47679 17.5228 1.99963 12 1.99963C6.47715 1.99963 2 6.47679 2 11.9996C2 17.5225 6.47715 21.9996 12 21.9996ZM10.5744 16.4881L16.4073 9.35888L14.8594 8.09241L10.4259 13.5112L8.50015 11.5854L7.08594 12.9996L10.5744 16.4881Z",fill:"#3B872C"})})}function Sh(){return c.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:c.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7367 4.53861C12.9689 3.19498 11.0315 3.19498 10.2637 4.53861L1.71007 19.5075C0.948179 20.8408 1.91091 22.4998 3.44656 22.4998H20.5538C22.0895 22.4998 23.0522 20.8408 22.2903 19.5075L13.7367 4.53861ZM11 9.49997H13V15.5H11V9.49997ZM11 17.5H13V19.5H11V17.5Z",fill:"#FEA900"})})}var jh="DismissableLayer",gr="dismissableLayer.update",Ph="dismissableLayer.pointerDownOutside",Th="dismissableLayer.focusOutside",us,Ga=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Za=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(Ga),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Nh(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=$h(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return ln(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(us=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ds(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=us)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ds())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(gr,b),()=>document.removeEventListener(gr,b)},[]),c.jsxRuntimeExports.jsx(Q.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Za.displayName=jh;var Ah="DismissableLayerBranch",qa=i.forwardRef((e,t)=>{const n=i.useContext(Ga),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(Q.div,{...e,ref:o})});qa.displayName=Ah;function Nh(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Qa(Ph,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function $h(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qa(Th,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ds(){const e=new CustomEvent(gr);document.dispatchEvent(e)}function Qa(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var Oh=Za,Dh=qa;function Ih(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var lo=e=>{const{present:t,children:n}=e,r=kh(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=q(r.ref,Mh(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};lo.displayName="Presence";function kh(e){const[t,n]=i.useState(),r=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Ih(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Wt(r.current);s.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Wt(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),se(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Wt(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Wt(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wt(e){return(e==null?void 0:e.animationName)||"none"}function Mh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uo="ToastProvider",[fo,Lh,_h]=gi("Toast"),[Ja,Iy]=Ze("Toast",[_h]),[Fh,Rn]=Ja(uo),ec=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:l}=e,[a,d]=i.useState(null),[u,p]=i.useState(0),m=i.useRef(!1),v=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${uo}\`. Expected non-empty \`string\`.`),c.jsxRuntimeExports.jsx(fo.Provider,{scope:t,children:c.jsxRuntimeExports.jsx(Fh,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:d,onToastAdd:i.useCallback(()=>p(x=>x+1),[]),onToastRemove:i.useCallback(()=>p(x=>x-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:v,children:l})})};ec.displayName=uo;var tc="ToastViewport",Wh=["F8"],yr="toast.viewportPause",Er="toast.viewportResume",nc=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Wh,label:o="Notifications ({hotkey})",...s}=e,l=Rn(tc,n),a=Lh(n),d=i.useRef(null),u=i.useRef(null),p=i.useRef(null),m=i.useRef(null),v=q(t,m,l.onViewportChange),x=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=l.toastCount>0;i.useEffect(()=>{const h=g=>{var w;r.length!==0&&r.every(R=>g[R]||g.code===R)&&((w=m.current)==null||w.focus())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),i.useEffect(()=>{const h=d.current,g=m.current;if(E&&h&&g){const y=()=>{if(!l.isClosePausedRef.current){const S=new CustomEvent(yr);g.dispatchEvent(S),l.isClosePausedRef.current=!0}},w=()=>{if(l.isClosePausedRef.current){const S=new CustomEvent(Er);g.dispatchEvent(S),l.isClosePausedRef.current=!1}},R=S=>{!h.contains(S.relatedTarget)&&w()},C=()=>{h.contains(document.activeElement)||w()};return h.addEventListener("focusin",y),h.addEventListener("focusout",R),h.addEventListener("pointermove",y),h.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",w),()=>{h.removeEventListener("focusin",y),h.removeEventListener("focusout",R),h.removeEventListener("pointermove",y),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",w)}}},[E,l.isClosePausedRef]);const f=i.useCallback(({tabbingDirection:h})=>{const y=a().map(w=>{const R=w.ref.current,C=[R,...Jh(R)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const h=m.current;if(h){const g=y=>{var C,S,b;const w=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!w){const j=document.activeElement,N=y.shiftKey;if(y.target===h&&N){(C=u.current)==null||C.focus();return}const U=f({tabbingDirection:N?"backwards":"forwards"}),B=U.findIndex(T=>T===j);Zn(U.slice(B+1))?y.preventDefault():N?(S=u.current)==null||S.focus():(b=p.current)==null||b.focus()}};return h.addEventListener("keydown",g),()=>h.removeEventListener("keydown",g)}},[a,f]),c.jsxRuntimeExports.jsxs(Dh,{ref:d,role:"region","aria-label":o.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&c.jsxRuntimeExports.jsx(wr,{ref:u,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"forwards"});Zn(h)}}),c.jsxRuntimeExports.jsx(fo.Slot,{scope:n,children:c.jsxRuntimeExports.jsx(Q.ol,{tabIndex:-1,...s,ref:v})}),E&&c.jsxRuntimeExports.jsx(wr,{ref:p,onFocusFromOutsideViewport:()=>{const h=f({tabbingDirection:"backwards"});Zn(h)}})]})});nc.displayName=tc;var rc="ToastFocusProxy",wr=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Rn(rc,n);return c.jsxRuntimeExports.jsx(xn,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:l=>{var u;const a=l.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});wr.displayName=rc;var Cn="Toast",Bh="toast.swipeStart",Hh="toast.swipeMove",Vh="toast.swipeCancel",Uh="toast.swipeEnd",oc=i.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...l}=e,[a=!0,d]=Rt({prop:r,defaultProp:o,onChange:s});return c.jsxRuntimeExports.jsx(lo,{present:n||a,children:c.jsxRuntimeExports.jsx(Yh,{open:a,...l,ref:t,onClose:()=>d(!1),onPause:oe(e.onPause),onResume:oe(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(e.onSwipeMove,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:V(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:V(e.onSwipeEnd,u=>{const{x:p,y:m}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),d(!1)})})})});oc.displayName=Cn;var[zh,Kh]=Ja(Cn,{onClose(){}}),Yh=i.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:l,onEscapeKeyDown:a,onPause:d,onResume:u,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:v,onSwipeEnd:x,...E}=e,f=Rn(Cn,n),[h,g]=i.useState(null),y=q(t,T=>g(T)),w=i.useRef(null),R=i.useRef(null),C=o||f.duration,S=i.useRef(0),b=i.useRef(C),j=i.useRef(0),{onToastAdd:N,onToastRemove:$}=f,_=oe(()=>{var W;(h==null?void 0:h.contains(document.activeElement))&&((W=f.viewport)==null||W.focus()),l()}),U=i.useCallback(T=>{!T||T===1/0||(window.clearTimeout(j.current),S.current=new Date().getTime(),j.current=window.setTimeout(_,T))},[_]);i.useEffect(()=>{const T=f.viewport;if(T){const W=()=>{U(b.current),u==null||u()},M=()=>{const L=new Date().getTime()-S.current;b.current=b.current-L,window.clearTimeout(j.current),d==null||d()};return T.addEventListener(yr,M),T.addEventListener(Er,W),()=>{T.removeEventListener(yr,M),T.removeEventListener(Er,W)}}},[f.viewport,C,d,u,U]),i.useEffect(()=>{s&&!f.isClosePausedRef.current&&U(C)},[s,C,f.isClosePausedRef,U]),i.useEffect(()=>(N(),()=>$()),[N,$]);const B=i.useMemo(()=>h?dc(h):null,[h]);return f.viewport?c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[B&&c.jsxRuntimeExports.jsx(Xh,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:B}),c.jsxRuntimeExports.jsx(zh,{scope:n,onClose:_,children:ge.createPortal(c.jsxRuntimeExports.jsx(fo.ItemSlot,{scope:n,children:c.jsxRuntimeExports.jsx(Oh,{asChild:!0,onEscapeKeyDown:V(a,()=>{f.isFocusedToastEscapeKeyDownRef.current||_(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsxRuntimeExports.jsx(Q.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...E,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,T=>{T.key==="Escape"&&(a==null||a(T.nativeEvent),T.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:V(e.onPointerDown,T=>{T.button===0&&(w.current={x:T.clientX,y:T.clientY})}),onPointerMove:V(e.onPointerMove,T=>{if(!w.current)return;const W=T.clientX-w.current.x,M=T.clientY-w.current.y,L=!!R.current,O=["left","right"].includes(f.swipeDirection),z=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,re=O?z(0,W):0,te=O?0:z(0,M),P=T.pointerType==="touch"?10:2,k={x:re,y:te},F={originalEvent:T,delta:k};L?(R.current=k,Bt(Hh,m,F,{discrete:!1})):fs(k,f.swipeDirection,P)?(R.current=k,Bt(Bh,p,F,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(W)>P||Math.abs(M)>P)&&(w.current=null)}),onPointerUp:V(e.onPointerUp,T=>{const W=R.current,M=T.target;if(M.hasPointerCapture(T.pointerId)&&M.releasePointerCapture(T.pointerId),R.current=null,w.current=null,W){const L=T.currentTarget,O={originalEvent:T,delta:W};fs(W,f.swipeDirection,f.swipeThreshold)?Bt(Uh,x,O,{discrete:!0}):Bt(Vh,v,O,{discrete:!0}),L.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Xh=e=>{const{__scopeToast:t,children:n,...r}=e,o=Rn(Cn,t),[s,l]=i.useState(!1),[a,d]=i.useState(!1);return qh(()=>l(!0)),i.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsxRuntimeExports.jsx(io,{asChild:!0,children:c.jsxRuntimeExports.jsx(xn,{...r,children:s&&c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[o.label," ",n]})})})},Gh="ToastTitle",sc=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t})});sc.displayName=Gh;var Zh="ToastDescription",ic=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsxRuntimeExports.jsx(Q.div,{...r,ref:t})});ic.displayName=Zh;var ac="ToastAction",cc=i.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsxRuntimeExports.jsx(uc,{altText:n,asChild:!0,children:c.jsxRuntimeExports.jsx(po,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ac}\`. Expected non-empty \`string\`.`),null)});cc.displayName=ac;var lc="ToastClose",po=i.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=Kh(lc,n);return c.jsxRuntimeExports.jsx(uc,{asChild:!0,children:c.jsxRuntimeExports.jsx(Q.button,{type:"button",...r,ref:t,onClick:V(e.onClick,o.onClose)})})});po.displayName=lc;var uc=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return c.jsxRuntimeExports.jsx(Q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function dc(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Qh(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...dc(r))}}),t}function Bt(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Br(o,s):o.dispatchEvent(s)}var fs=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function qh(e=()=>{}){const t=oe(e);se(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Qh(e){return e.nodeType===e.ELEMENT_NODE}function Jh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var ev=ec,fc=nc,pc=oc,mc=sc,hc=ic,vc=cc,xc=po;function gc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=gc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tv(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=gc(e))&&(r&&(r+=" "),r+=t);return r}const nv=tv,rv=(e,t)=>n=>nv(e,n==null?void 0:n.class,n==null?void 0:n.className),ov=ev,yc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(fc,{ref:n,className:c.cn("fixed bottom-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:w-fit sm:min-w-[300px] sm:max-w-[420px]",e),...t}));yc.displayName=fc.displayName;const sv=rv("group pointer-events-auto relative flex w-full items-center overflow-hidden pr-8 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full"),Ec=i.forwardRef(({className:e,testId:t,...n},r)=>c.jsxRuntimeExports.jsx(pc,{"data-testid":t,ref:r,className:c.cn(sv(),e),...n}));Ec.displayName=pc.displayName;const iv=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(vc,{ref:n,className:c.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-neutral-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900",e),...t}));iv.displayName=vc.displayName;const wc=i.forwardRef(({color:e,...t},n)=>c.jsxRuntimeExports.jsx(xc,{ref:n,"toast-close":"",...t,children:c.jsxRuntimeExports.jsx(c.Close,{color:e,className:"h-4 w-4"})}));wc.displayName=xc.displayName;const bc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(mc,{ref:n,className:c.cn("text-sm font-semibold",e),...t}));bc.displayName=mc.displayName;const Rc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(hc,{ref:n,className:c.cn("text-sm opacity-90",e),...t}));Rc.displayName=hc.displayName;const br={success:{background:c.colors.sf.light.action,color:c.colors.fg.accent.action},error:{background:c.colors.sf.light.error,color:c.colors.fg.accent.error},info:{background:c.colors.sf.light.tertiary,color:c.colors.fg.base},warning:{background:c.colors.sf.light.warning,color:c.colors.fg.accent.warning}},av=I.styled(Ec)`
636
636
  border-radius: 1rem;
637
637
  padding: 0.75rem;
638
638
  border: none;
639
639
  box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.04);
640
640
  font-size: 0.813rem;
641
- background: ${({$variant:e})=>wr[e].background};
642
- color: ${({$variant:e})=>wr[e].color};
641
+ background: ${({$variant:e})=>br[e].background};
642
+ color: ${({$variant:e})=>br[e].color};
643
643
  gap: 0.5rem;
644
644
  `,cv=I.styled.div`
645
645
  display: flex;
@@ -652,14 +652,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
652
652
  ${c.typography.label}
653
653
  `,dv=I.styled(Rc)`
654
654
  ${c.typography.body}
655
- `,fv=({variant:e})=>{switch(e){case"success":return c.jsxRuntimeExports.jsx(Ch,{});case"error":return c.jsxRuntimeExports.jsx(bh,{});case"warning":return c.jsxRuntimeExports.jsx(Sh,{});default:return c.jsxRuntimeExports.jsx(Rh,{})}};function pv(){const{toasts:e}=Xa();return c.jsxRuntimeExports.jsxs(ov,{children:[e.map(function({id:t,title:n,description:r,testId:o,variant:s="info",...l}){return c.jsxRuntimeExports.jsxs(av,{$variant:s,testId:o,...l,children:[c.jsxRuntimeExports.jsx(lv,{children:c.jsxRuntimeExports.jsx(fv,{variant:s})}),c.jsxRuntimeExports.jsxs(cv,{children:[n&&c.jsxRuntimeExports.jsx(uv,{children:n}),r&&c.jsxRuntimeExports.jsx(dv,{children:r})]}),c.jsxRuntimeExports.jsx(wc,{color:wr[s].color})]},t)}),c.jsxRuntimeExports.jsx(yc,{})]})}const Cc=i.forwardRef(({...e},t)=>c.jsxRuntimeExports.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Cc.displayName="Breadcrumb";const Sc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("ol",{ref:n,className:c.cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400",e),...t}));Sc.displayName="BreadcrumbList";const jc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("li",{ref:n,className:c.cn("inline-flex items-center gap-1.5",e),...t}));jc.displayName="BreadcrumbItem";const mv=i.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?an:"a";return c.jsxRuntimeExports.jsx(o,{ref:r,className:c.cn("transition-colors hover:text-neutral-950 dark:hover:text-neutral-50",t),...n})});mv.displayName="BreadcrumbLink";const hv=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:c.cn("font-normal text-neutral-950 dark:text-neutral-50",e),...t}));hv.displayName="BreadcrumbPage";const Pc=({children:e,className:t,...n})=>c.jsxRuntimeExports.jsx("li",{role:"presentation","aria-hidden":"true",className:c.cn("flex items-center",t),...n,children:e??c.jsxRuntimeExports.jsx("div",{className:"w-3.5 h-3.5 border-r-2 border-t-2 border-neutral-400 transform rotate-45"})});Pc.displayName="BreadcrumbSeparator";const Tc={...c.typography.label,fontSize:"0.8125rem",letterSpacing:"-0.26px"},ps={color:c.colors.white,...Tc},vv={backgroundColor:c.colors.neutral["800-A08"],color:c.colors.neutral[300],...Tc},xv=({children:e,isActive:t,isCompleted:n,isCompletedAndActive:r,className:o,onClick:s,isHovered:l,hoverIcon:a})=>r?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700","cursor-pointer hover:opacity-80",o),style:ps,onClick:s,children:e}):n?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors",s&&"cursor-pointer hover:opacity-80",o),style:{backgroundColor:c.colors.primary["600-A08"]},onClick:s,children:l&&a?a:c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.primary[700],size:16})}):t?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700",o),style:ps,children:e}):c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors",o),style:vv,children:e}),gv=()=>c.jsxRuntimeExports.jsx(Pc,{children:c.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 border-r-2 border-t-2 border-neutral-300 transform rotate-45"})}),yv=e=>{if(!e)return null;const t=c.Icons[e];return t?c.jsxRuntimeExports.jsx(t,{color:c.colors.primary[700],size:16}):null};function Ev({steps:e,currentStep:t=1,onStepClick:n,hoverIcons:r,completedStep:o}){const[s,l]=ee.useState(null),a=t>e.length,d=o??t,u=p=>{const m=p===t&&p<d,v=a||p<=d&&p!==t;return{isActive:!a&&p===t,isCompleted:v,isCompletedAndActive:m}};return c.jsxRuntimeExports.jsx("div",{className:"flex items-center py-4",children:c.jsxRuntimeExports.jsx(Cc,{children:c.jsxRuntimeExports.jsx(Sc,{className:"gap-2.5",children:e.map((p,m)=>{const v=m+1,{isActive:x,isCompleted:E,isCompletedAndActive:f}=u(v),h=m===e.length-1,g=!x,w=v===t+1&&!a,R=(E||f)&&n,C=r==null?void 0:r[m],S=C?yv(C):void 0;return c.jsxRuntimeExports.jsxs(ee.Fragment,{children:[c.jsxRuntimeExports.jsxs(jc,{className:c.cn("gap-0",g&&"md:gap-1.5",w&&"gap-1.5"),onMouseEnter:()=>R&&l(v),onMouseLeave:()=>l(null),children:[c.jsxRuntimeExports.jsx(xv,{isActive:x,isCompleted:E,isCompletedAndActive:f,onClick:R?()=>n(v):void 0,isHovered:s===v,hoverIcon:S,children:v}),g&&c.jsxRuntimeExports.jsx("span",{className:c.cn("whitespace-nowrap transition-colors",w?"inline":"hidden md:inline",E?"text-primary-700":"text-neutral-300",R&&"cursor-pointer hover:opacity-80"),style:{...c.typography.label,fontSize:"0.8125rem",letterSpacing:"-0.26px"},onClick:R?()=>n(v):void 0,children:p})]}),!h&&c.jsxRuntimeExports.jsx(gv,{})]},v)})})})})}var Ac=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(wv);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(br,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(br,{...r,ref:t,children:n})});Ac.displayName="Slot";var br=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=Rv(n),s=bv(r,n.props);return n.type!==i.Fragment&&(s.ref=t?Me(t,o):o),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});br.displayName="SlotClone";var Nc=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function wv(e){return i.isValidElement(e)&&e.type===Nc}function bv(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Rv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=Cv.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?Ac:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Sv(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}var jv="DismissableLayer",Rr="dismissableLayer.update",Pv="dismissableLayer.pointerDownOutside",Tv="dismissableLayer.focusOutside",ms,$c=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oc=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext($c),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=$v(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Ov(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return cn(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ms=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),hs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ms)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),hs())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(Rr,b),()=>document.removeEventListener(Rr,b)},[]),c.jsxRuntimeExports.jsx(ae.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Oc.displayName=jv;var Av="DismissableLayerBranch",Nv=i.forwardRef((e,t)=>{const n=i.useContext($c),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(ae.div,{...e,ref:o})});Nv.displayName=Av;function $v(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Dc(Pv,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ov(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Dc(Tv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hs(){const e=new CustomEvent(Rr);document.dispatchEvent(e)}function Dc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Sv(o,s):o.dispatchEvent(s)}var Dv="Arrow",Ic=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(ae.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ic.displayName=Dv;var Iv=Ic,mo="Popper",[Mc,kc]=Ze(mo),[Mv,Lc]=Mc(mo),_c=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(Mv,{scope:t,anchor:r,onAnchorChange:o,children:n})};_c.displayName=mo;var Fc="PopperAnchor",Wc=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Lc(Fc,n),l=i.useRef(null),a=q(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(ae.div,{...o,ref:a})});Wc.displayName=Fc;var ho="PopperContent",[kv,Lv]=Mc(ho),Bc=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=Lc(ho,n),[g,y]=i.useState(null),w=q(t,J=>y(J)),[R,C]=i.useState(null),S=Mi(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Fv),altBoundary:U},{refs:T,floatingStyles:W,placement:k,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Wv({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=Uc(k),te=oe(E);se(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,M=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return se(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(kv,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:M,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(ae.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});Bc.displayName=ho;var Hc="PopperArrow",_v={top:"bottom",right:"left",bottom:"top",left:"right"},Vc=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Lv(Hc,r),l=_v[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Iv,{...o,ref:n,style:{...o.style,display:"block"}})})});Vc.displayName=Hc;function Fv(e){return e!==null}var Wv=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=Uc(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function Uc(e){const[t,n="center"]=e.split("-");return[t,n]}var Bv=_c,Hv=Wc,Vv=Bc,Uv=Vc,zv="VisuallyHidden",zc=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(ae.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));zc.displayName=zv;var Kv=zc,[Cn,My]=Ze("Tooltip",[kc]),Sn=kc(),Kc="TooltipProvider",Yv=700,Cr="tooltip.open",[Xv,vo]=Cn(Kc),Yc=e=>{const{__scopeTooltip:t,delayDuration:n=Yv,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[l,a]=i.useState(!0),d=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const p=u.current;return()=>window.clearTimeout(p)},[]),c.jsxRuntimeExports.jsx(Xv,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:s})};Yc.displayName=Kc;var jn="Tooltip",[Gv,Pn]=Cn(jn),Xc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:a}=e,d=vo(jn,e.__scopeTooltip),u=Sn(t),[p,m]=i.useState(null),v=fe(),x=i.useRef(0),E=l??d.disableHoverableContent,f=a??d.delayDuration,h=i.useRef(!1),[g=!1,y]=Rt({prop:r,defaultProp:o,onChange:b=>{b?(d.onOpen(),document.dispatchEvent(new CustomEvent(Cr))):d.onClose(),s==null||s(b)}}),w=i.useMemo(()=>g?h.current?"delayed-open":"instant-open":"closed",[g]),R=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,h.current=!1,y(!0)},[y]),C=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,y(!1)},[y]),S=i.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{h.current=!0,y(!0),x.current=0},f)},[f,y]);return i.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),c.jsxRuntimeExports.jsx(Bv,{...u,children:c.jsxRuntimeExports.jsx(Gv,{scope:t,contentId:v,open:g,stateAttribute:w,trigger:p,onTriggerChange:m,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayed?S():R()},[d.isOpenDelayed,S,R]),onTriggerLeave:i.useCallback(()=>{E?C():(window.clearTimeout(x.current),x.current=0)},[C,E]),onOpen:R,onClose:C,disableHoverableContent:E,children:n})})};Xc.displayName=jn;var Sr="TooltipTrigger",Gc=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Pn(Sr,n),s=vo(Sr,n),l=Sn(n),a=i.useRef(null),d=q(t,a,o.onTriggerChange),u=i.useRef(!1),p=i.useRef(!1),m=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsxRuntimeExports.jsx(Hv,{asChild:!0,...l,children:c.jsxRuntimeExports.jsx(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:V(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});Gc.displayName=Sr;var Zv="TooltipPortal",[ky,qv]=Cn(Zv,{forceMount:void 0}),ut="TooltipContent",Zc=i.forwardRef((e,t)=>{const n=qv(ut,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,l=Pn(ut,e.__scopeTooltip);return c.jsxRuntimeExports.jsx(lo,{present:r||l.open,children:l.disableHoverableContent?c.jsxRuntimeExports.jsx(qc,{side:o,...s,ref:t}):c.jsxRuntimeExports.jsx(Qv,{side:o,...s,ref:t})})}),Qv=i.forwardRef((e,t)=>{const n=Pn(ut,e.__scopeTooltip),r=vo(ut,e.__scopeTooltip),o=i.useRef(null),s=q(t,o),[l,a]=i.useState(null),{trigger:d,onClose:u}=n,p=o.current,{onPointerInTransitChange:m}=r,v=i.useCallback(()=>{a(null),m(!1)},[m]),x=i.useCallback((E,f)=>{const h=E.currentTarget,g={x:E.clientX,y:E.clientY},y=nx(g,h.getBoundingClientRect()),w=rx(g,y),R=ox(f.getBoundingClientRect()),C=ix([...w,...R]);a(C),m(!0)},[m]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(d&&p){const E=h=>x(h,p),f=h=>x(h,d);return d.addEventListener("pointerleave",E),p.addEventListener("pointerleave",f),()=>{d.removeEventListener("pointerleave",E),p.removeEventListener("pointerleave",f)}}},[d,p,x,v]),i.useEffect(()=>{if(l){const E=f=>{const h=f.target,g={x:f.clientX,y:f.clientY},y=(d==null?void 0:d.contains(h))||(p==null?void 0:p.contains(h)),w=!sx(g,l);y?v():w&&(v(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[d,p,l,u,v]),c.jsxRuntimeExports.jsx(qc,{...e,ref:s})}),[Jv,ex]=Cn(jn,{isInside:!1}),qc=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:l,...a}=e,d=Pn(ut,n),u=Sn(n),{onClose:p}=d;return i.useEffect(()=>(document.addEventListener(Cr,p),()=>document.removeEventListener(Cr,p)),[p]),i.useEffect(()=>{if(d.trigger){const m=v=>{const x=v.target;x!=null&&x.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),c.jsxRuntimeExports.jsx(Oc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:c.jsxRuntimeExports.jsxs(Vv,{"data-state":d.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsxRuntimeExports.jsx(Nc,{children:r}),c.jsxRuntimeExports.jsx(Jv,{scope:n,isInside:!0,children:c.jsxRuntimeExports.jsx(Kv,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Zc.displayName=ut;var Qc="TooltipArrow",tx=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Sn(n);return ex(Qc,n).isInside?null:c.jsxRuntimeExports.jsx(Uv,{...o,...r,ref:t})});tx.displayName=Qc;function nx(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rx(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ox(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sx(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const a=t[s].x,d=t[s].y,u=t[l].x,p=t[l].y;d>r!=p>r&&n<(u-a)*(r-d)/(p-d)+a&&(o=!o)}return o}function ix(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ax(t)}function ax(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var cx=Yc,lx=Xc,ux=Gc,Jc=Zc;const dx=cx,fx=lx,px=ux,el=i.forwardRef(({className:e,sideOffset:t=4,...n},r)=>{const o={...c.typography.body,background:c.colors.primary[900],borderRadius:".5rem",color:c.colors.white,fontSize:".8125rem",padding:".5rem .75rem",whiteSpace:"normal",width:"19.375rem"};return c.jsxRuntimeExports.jsx(Jc,{ref:r,sideOffset:t,className:c.cn("z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),style:o,...n})});el.displayName=Jc.displayName;function me(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tl(...e){return t=>{let n=!1;const r=e.map(o=>{const s=vs(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():vs(e[o],null)}}}}function Ee(...e){return i.useCallback(tl(...e),e)}function mx(e,t){const n=i.createContext(t),r=s=>{const{children:l,...a}=s,d=i.useMemo(()=>a,Object.values(a));return c.jsxRuntimeExports.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=i.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function xo(e,t=[]){let n=[];function r(s,l){const a=i.createContext(l),d=n.length;n=[...n,l];const u=m=>{var g;const{scope:v,children:x,...E}=m,f=((g=v==null?void 0:v[e])==null?void 0:g[d])||a,h=i.useMemo(()=>E,Object.values(E));return c.jsxRuntimeExports.jsx(f.Provider,{value:h,children:x})};u.displayName=s+"Provider";function p(m,v){var f;const x=((f=v==null?void 0:v[e])==null?void 0:f[d])||a,E=i.useContext(x);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,p]}const o=()=>{const s=n.map(l=>i.createContext(l));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,hx(o,...t)]}function hx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function go(e){const t=vx(e),n=i.forwardRef((r,o)=>{const{children:s,...l}=r,a=i.Children.toArray(s),d=a.find(gx);if(d){const u=d.props.children,p=a.map(m=>m===d?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:m);return c.jsxRuntimeExports.jsx(t,{...l,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,p):null})}return c.jsxRuntimeExports.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vx(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const l=Ex(o),a=yx(s,o.props);return o.type!==i.Fragment&&(a.ref=r?tl(r,l):l),i.cloneElement(o,a)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xx=Symbol("radix.slottable");function gx(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xx}function yx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Ex(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=wx.reduce((e,t)=>{const n=go(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:l,...a}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(d,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bx(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}function dt(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rx(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Cx="DismissableLayer",jr="dismissableLayer.update",Sx="dismissableLayer.pointerDownOutside",jx="dismissableLayer.focusOutside",xs,nl=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yo=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(nl),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=Ee(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Ax(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Nx(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return Rx(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xs=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=xs)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gs())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(jr,b),()=>document.removeEventListener(jr,b)},[]),c.jsxRuntimeExports.jsx(ue.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,S.onFocusCapture),onBlurCapture:me(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,C.onPointerDownCapture)})});yo.displayName=Cx;var Px="DismissableLayerBranch",Tx=i.forwardRef((e,t)=>{const n=i.useContext(nl),r=i.useRef(null),o=Ee(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(ue.div,{...e,ref:o})});Tx.displayName=Px;function Ax(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){rl(Sx,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nx(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&rl(jx,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gs(){const e=new CustomEvent(jr);document.dispatchEvent(e)}function rl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bx(o,s):o.dispatchEvent(s)}var Zn=0;function ol(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ys()),document.body.insertAdjacentElement("beforeend",e[1]??ys()),Zn++,()=>{Zn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zn--}},[])}function ys(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qn="focusScope.autoFocusOnMount",Qn="focusScope.autoFocusOnUnmount",Es={bubbles:!1,cancelable:!0},$x="FocusScope",Eo=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=dt(o),p=dt(s),m=i.useRef(null),v=Ee(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:De(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||De(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&De(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){bs.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(qn,Es);a.addEventListener(qn,u),a.dispatchEvent(g),g.defaultPrevented||(Ox(Lx(sl(a)),{select:!0}),document.activeElement===f&&De(a))}return()=>{a.removeEventListener(qn,u),setTimeout(()=>{const g=new CustomEvent(Qn,Es);a.addEventListener(Qn,p),a.dispatchEvent(g),g.defaultPrevented||De(f??document.body,{select:!0}),a.removeEventListener(Qn,p),bs.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=Dx(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&De(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&De(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(ue.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});Eo.displayName=$x;function Ox(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(De(r,{select:t}),document.activeElement!==n)return}function Dx(e){const t=sl(e),n=ws(t,e),r=ws(t.reverse(),e);return[n,r]}function sl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ws(e,t){for(const n of e)if(!Ix(n,{upTo:t}))return n}function Ix(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 Mx(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&&Mx(e)&&t&&e.select()}}var bs=kx();function kx(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Rs(e,t),e.unshift(t)},remove(t){var n;e=Rs(e,t),(n=e[0])==null||n.resume()}}}function Rs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lx(e){return e.filter(t=>t.tagName!=="A")}var Fe=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},_x=i[" useId ".trim().toString()]||(()=>{}),Fx=0;function Zt(e){const[t,n]=i.useState(_x());return Fe(()=>{e||n(r=>r??String(Fx++))},[e]),e||(t?`radix-${t}`:"")}var Wx="Arrow",il=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});il.displayName=Wx;var Bx=il;function Hx(e){const[t,n]=i.useState(void 0);return Fe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wo="Popper",[al,cl]=xo(wo),[Vx,ll]=al(wo),ul=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(Vx,{scope:t,anchor:r,onAnchorChange:o,children:n})};ul.displayName=wo;var dl="PopperAnchor",fl=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ll(dl,n),l=i.useRef(null),a=Ee(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(ue.div,{...o,ref:a})});fl.displayName=dl;var bo="PopperContent",[Ux,zx]=al(bo),pl=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=ll(bo,n),[g,y]=i.useState(null),w=Ee(t,J=>y(J)),[R,C]=i.useState(null),S=Hx(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Yx),altBoundary:U},{refs:T,floatingStyles:W,placement:k,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Xx({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=vl(k),te=dt(E);Fe(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,M=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return Fe(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(Ux,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:M,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(ue.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});pl.displayName=bo;var ml="PopperArrow",Kx={top:"bottom",right:"left",bottom:"top",left:"right"},hl=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=zx(ml,r),l=Kx[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Bx,{...o,ref:n,style:{...o.style,display:"block"}})})});hl.displayName=ml;function Yx(e){return e!==null}var Xx=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=vl(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function vl(e){const[t,n="center"]=e.split("-");return[t,n]}var Gx=ul,xl=fl,Zx=pl,qx=hl,Qx="Portal",Ro=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);Fe(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(ue.div,{...r,ref:t}),l):null});Ro.displayName=Qx;function Jx(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=eg(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=Ee(r.ref,tg(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};vt.displayName="Presence";function eg(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Jx(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Ht(r.current);s.current=a==="mounted"?u:"none"},[a]),Fe(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Ht(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Fe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Ht(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Ht(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ht(e){return(e==null?void 0:e.animationName)||"none"}function tg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ng=i[" useInsertionEffect ".trim().toString()]||Fe;function gl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=rg({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:o;{const p=i.useRef(e!==void 0);i.useEffect(()=>{const m=p.current;m!==a&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,r])}const u=i.useCallback(p=>{var m;if(a){const v=og(p)?p(e):p;v!==e&&((m=l.current)==null||m.call(l,v))}else s(p)},[a,e,s,l]);return[d,u]}function rg({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return ng(()=>{s.current=t},[t]),i.useEffect(()=>{var l;o.current!==n&&((l=s.current)==null||l.call(s,n),o.current=n)},[n,o]),[n,r,s]}function og(e){return typeof e=="function"}function sg(e){return e}function ig(e,t){t===void 0&&(t=sg);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(a){return a!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var a=n;n=[],a.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(p){l.push(p),u()},filter:function(p){return l=l.filter(p),n}}}};return o}function ag(e){e===void 0&&(e={});var t=ig(null);return t.options=ne({async:!0,ssr:!1},e),t}var yl=function(e){var t=e.sideCar,n=Pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,ne({},n))};yl.isSideCarExport=!0;function cg(e,t){return e.useMedium(t),yl}var El=ag(),Jn=function(){},Tn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Jn,onWheelCapture:Jn,onTouchMoveCapture:Jn}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noRelative,E=e.noIsolation,f=e.inert,h=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,w=e.gapMode,R=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,S=Ki([n,t]),b=ne(ne({},R),o);return i.createElement(i.Fragment,null,p&&i.createElement(C,{sideCar:El,removeScrollBar:u,shards:m,noRelative:x,noIsolation:E,inert:f,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),l?i.cloneElement(i.Children.only(a),ne(ne({},b),{ref:S})):i.createElement(y,ne({},b,{className:d,ref:S}),a))});Tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Tn.classNames={fullWidth:wt,zeroRight:Et};var Pr=!1;if(typeof window<"u")try{var Vt=Object.defineProperty({},"passive",{get:function(){return Pr=!0,!0}});window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch{Pr=!1}var nt=Pr?{passive:!1}:!1,lg=function(e){return e.tagName==="TEXTAREA"},wl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lg(e)&&n[t]==="visible")},ug=function(e){return wl(e,"overflowY")},dg=function(e){return wl(e,"overflowX")},Cs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=bl(e,r);if(o){var s=Rl(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bl=function(e,t){return e==="v"?ug(t):dg(t)},Rl=function(e,t){return e==="v"?fg(t):pg(t)},mg=function(e,t){return e==="h"&&t==="rtl"?-1:1},hg=function(e,t,n,r,o){var s=mg(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{if(!a)break;var x=Rl(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&bl(e,a)&&(m+=g,v+=E);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},js=function(e){return e&&"current"in e?e.current:e},vg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xg=function(e){return`
655
+ `,fv=({variant:e})=>{switch(e){case"success":return c.jsxRuntimeExports.jsx(Ch,{});case"error":return c.jsxRuntimeExports.jsx(bh,{});case"warning":return c.jsxRuntimeExports.jsx(Sh,{});default:return c.jsxRuntimeExports.jsx(Rh,{})}};function pv(){const{toasts:e}=Xa();return c.jsxRuntimeExports.jsxs(ov,{children:[e.map(function({id:t,title:n,description:r,testId:o,variant:s="info",...l}){return c.jsxRuntimeExports.jsxs(av,{$variant:s,testId:o,...l,children:[c.jsxRuntimeExports.jsx(lv,{children:c.jsxRuntimeExports.jsx(fv,{variant:s})}),c.jsxRuntimeExports.jsxs(cv,{children:[n&&c.jsxRuntimeExports.jsx(uv,{children:n}),r&&c.jsxRuntimeExports.jsx(dv,{children:r})]}),c.jsxRuntimeExports.jsx(wc,{color:br[s].color})]},t)}),c.jsxRuntimeExports.jsx(yc,{})]})}const Cc=i.forwardRef(({...e},t)=>c.jsxRuntimeExports.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Cc.displayName="Breadcrumb";const Sc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("ol",{ref:n,className:c.cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400",e),...t}));Sc.displayName="BreadcrumbList";const jc=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("li",{ref:n,className:c.cn("inline-flex items-center gap-1.5",e),...t}));jc.displayName="BreadcrumbItem";const mv=i.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?cn:"a";return c.jsxRuntimeExports.jsx(o,{ref:r,className:c.cn("transition-colors hover:text-neutral-950 dark:hover:text-neutral-50",t),...n})});mv.displayName="BreadcrumbLink";const hv=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:c.cn("font-normal text-neutral-950 dark:text-neutral-50",e),...t}));hv.displayName="BreadcrumbPage";const Pc=({children:e,className:t,...n})=>c.jsxRuntimeExports.jsx("li",{role:"presentation","aria-hidden":"true",className:c.cn("flex items-center",t),...n,children:e??c.jsxRuntimeExports.jsx("div",{className:"w-3.5 h-3.5 border-r-2 border-t-2 border-neutral-400 transform rotate-45"})});Pc.displayName="BreadcrumbSeparator";const Tc={...c.typography.label,fontSize:"0.8125rem",letterSpacing:"-0.26px"},ps={color:c.colors.white,...Tc},vv={backgroundColor:c.colors.neutral["800-A08"],color:c.colors.neutral[300],...Tc},xv=({children:e,isActive:t,isCompleted:n,isCompletedAndActive:r,className:o,onClick:s,isHovered:l,hoverIcon:a})=>r?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700","cursor-pointer hover:opacity-80",o),style:ps,onClick:s,children:e}):n?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors",s&&"cursor-pointer hover:opacity-80",o),style:{backgroundColor:c.colors.primary["600-A08"]},onClick:s,children:l&&a?a:c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.primary[700],size:16})}):t?c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors bg-primary-700",o),style:ps,children:e}):c.jsxRuntimeExports.jsx("div",{className:c.cn("w-5 h-5 rounded-full flex items-center justify-center transition-colors",o),style:vv,children:e}),gv=()=>c.jsxRuntimeExports.jsx(Pc,{children:c.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 border-r-2 border-t-2 border-neutral-300 transform rotate-45"})}),yv=e=>{if(!e)return null;const t=c.Icons[e];return t?c.jsxRuntimeExports.jsx(t,{color:c.colors.primary[700],size:16}):null};function Ev({steps:e,currentStep:t=1,onStepClick:n,hoverIcons:r,completedStep:o}){const[s,l]=ee.useState(null),a=t>e.length,d=o??t,u=p=>{const m=p===t&&p<d,v=a||p<=d&&p!==t;return{isActive:!a&&p===t,isCompleted:v,isCompletedAndActive:m}};return c.jsxRuntimeExports.jsx("div",{className:"flex items-center py-4",children:c.jsxRuntimeExports.jsx(Cc,{children:c.jsxRuntimeExports.jsx(Sc,{className:"gap-2.5",children:e.map((p,m)=>{const v=m+1,{isActive:x,isCompleted:E,isCompletedAndActive:f}=u(v),h=m===e.length-1,g=!x,w=v===t+1&&!a,R=(E||f)&&n,C=r==null?void 0:r[m],S=C?yv(C):void 0;return c.jsxRuntimeExports.jsxs(ee.Fragment,{children:[c.jsxRuntimeExports.jsxs(jc,{className:c.cn("gap-0",g&&"md:gap-1.5",w&&"gap-1.5"),onMouseEnter:()=>R&&l(v),onMouseLeave:()=>l(null),children:[c.jsxRuntimeExports.jsx(xv,{isActive:x,isCompleted:E,isCompletedAndActive:f,onClick:R?()=>n(v):void 0,isHovered:s===v,hoverIcon:S,children:v}),g&&c.jsxRuntimeExports.jsx("span",{className:c.cn("whitespace-nowrap transition-colors",w?"inline":"hidden md:inline",E?"text-primary-700":"text-neutral-300",R&&"cursor-pointer hover:opacity-80"),style:{...c.typography.label,fontSize:"0.8125rem",letterSpacing:"-0.26px"},onClick:R?()=>n(v):void 0,children:p})]}),!h&&c.jsxRuntimeExports.jsx(gv,{})]},v)})})})})}var Ac=i.forwardRef((e,t)=>{const{children:n,...r}=e,o=i.Children.toArray(n),s=o.find(wv);if(s){const l=s.props.children,a=o.map(d=>d===s?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:d);return c.jsxRuntimeExports.jsx(Rr,{...r,ref:t,children:i.isValidElement(l)?i.cloneElement(l,void 0,a):null})}return c.jsxRuntimeExports.jsx(Rr,{...r,ref:t,children:n})});Ac.displayName="Slot";var Rr=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const o=Rv(n),s=bv(r,n.props);return n.type!==i.Fragment&&(s.ref=t?ke(t,o):o),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});Rr.displayName="SlotClone";var Nc=({children:e})=>c.jsxRuntimeExports.jsx(c.jsxRuntimeExports.Fragment,{children:e});function wv(e){return i.isValidElement(e)&&e.type===Nc}function bv(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Rv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Cv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ae=Cv.reduce((e,t)=>{const n=i.forwardRef((r,o)=>{const{asChild:s,...l}=r,a=s?Ac:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(a,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Sv(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}var jv="DismissableLayer",Cr="dismissableLayer.update",Pv="dismissableLayer.pointerDownOutside",Tv="dismissableLayer.focusOutside",ms,$c=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oc=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext($c),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=q(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=$v(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Ov(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return ln(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ms=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),hs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ms)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),hs())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(Cr,b),()=>document.removeEventListener(Cr,b)},[]),c.jsxRuntimeExports.jsx(ae.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,S.onFocusCapture),onBlurCapture:V(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Oc.displayName=jv;var Av="DismissableLayerBranch",Nv=i.forwardRef((e,t)=>{const n=i.useContext($c),r=i.useRef(null),o=q(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(ae.div,{...e,ref:o})});Nv.displayName=Av;function $v(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){Dc(Pv,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ov(e,t=globalThis==null?void 0:globalThis.document){const n=oe(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&Dc(Tv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hs(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function Dc(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Sv(o,s):o.dispatchEvent(s)}var Dv="Arrow",Ic=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(ae.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ic.displayName=Dv;var Iv=Ic,mo="Popper",[kc,Mc]=Ze(mo),[kv,Lc]=kc(mo),_c=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(kv,{scope:t,anchor:r,onAnchorChange:o,children:n})};_c.displayName=mo;var Fc="PopperAnchor",Wc=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Lc(Fc,n),l=i.useRef(null),a=q(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(ae.div,{...o,ref:a})});Wc.displayName=Fc;var ho="PopperContent",[Mv,Lv]=kc(ho),Bc=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=Lc(ho,n),[g,y]=i.useState(null),w=q(t,J=>y(J)),[R,C]=i.useState(null),S=ki(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Fv),altBoundary:U},{refs:T,floatingStyles:W,placement:M,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Wv({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=Uc(M),te=oe(E);se(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,k=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return se(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(Mv,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:k,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(ae.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});Bc.displayName=ho;var Hc="PopperArrow",_v={top:"bottom",right:"left",bottom:"top",left:"right"},Vc=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Lv(Hc,r),l=_v[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Iv,{...o,ref:n,style:{...o.style,display:"block"}})})});Vc.displayName=Hc;function Fv(e){return e!==null}var Wv=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=Uc(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function Uc(e){const[t,n="center"]=e.split("-");return[t,n]}var Bv=_c,Hv=Wc,Vv=Bc,Uv=Vc,zv="VisuallyHidden",zc=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(ae.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));zc.displayName=zv;var Kv=zc,[Sn,ky]=Ze("Tooltip",[Mc]),jn=Mc(),Kc="TooltipProvider",Yv=700,Sr="tooltip.open",[Xv,vo]=Sn(Kc),Yc=e=>{const{__scopeTooltip:t,delayDuration:n=Yv,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[l,a]=i.useState(!0),d=i.useRef(!1),u=i.useRef(0);return i.useEffect(()=>{const p=u.current;return()=>window.clearTimeout(p)},[]),c.jsxRuntimeExports.jsx(Xv,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:s})};Yc.displayName=Kc;var Pn="Tooltip",[Gv,Tn]=Sn(Pn),Xc=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:a}=e,d=vo(Pn,e.__scopeTooltip),u=jn(t),[p,m]=i.useState(null),v=fe(),x=i.useRef(0),E=l??d.disableHoverableContent,f=a??d.delayDuration,h=i.useRef(!1),[g=!1,y]=Rt({prop:r,defaultProp:o,onChange:b=>{b?(d.onOpen(),document.dispatchEvent(new CustomEvent(Sr))):d.onClose(),s==null||s(b)}}),w=i.useMemo(()=>g?h.current?"delayed-open":"instant-open":"closed",[g]),R=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,h.current=!1,y(!0)},[y]),C=i.useCallback(()=>{window.clearTimeout(x.current),x.current=0,y(!1)},[y]),S=i.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{h.current=!0,y(!0),x.current=0},f)},[f,y]);return i.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),c.jsxRuntimeExports.jsx(Bv,{...u,children:c.jsxRuntimeExports.jsx(Gv,{scope:t,contentId:v,open:g,stateAttribute:w,trigger:p,onTriggerChange:m,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayed?S():R()},[d.isOpenDelayed,S,R]),onTriggerLeave:i.useCallback(()=>{E?C():(window.clearTimeout(x.current),x.current=0)},[C,E]),onOpen:R,onClose:C,disableHoverableContent:E,children:n})})};Xc.displayName=Pn;var jr="TooltipTrigger",Gc=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Tn(jr,n),s=vo(jr,n),l=jn(n),a=i.useRef(null),d=q(t,a,o.onTriggerChange),u=i.useRef(!1),p=i.useRef(!1),m=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsxRuntimeExports.jsx(Hv,{asChild:!0,...l,children:c.jsxRuntimeExports.jsx(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:V(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});Gc.displayName=jr;var Zv="TooltipPortal",[My,qv]=Sn(Zv,{forceMount:void 0}),ut="TooltipContent",Zc=i.forwardRef((e,t)=>{const n=qv(ut,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,l=Tn(ut,e.__scopeTooltip);return c.jsxRuntimeExports.jsx(lo,{present:r||l.open,children:l.disableHoverableContent?c.jsxRuntimeExports.jsx(qc,{side:o,...s,ref:t}):c.jsxRuntimeExports.jsx(Qv,{side:o,...s,ref:t})})}),Qv=i.forwardRef((e,t)=>{const n=Tn(ut,e.__scopeTooltip),r=vo(ut,e.__scopeTooltip),o=i.useRef(null),s=q(t,o),[l,a]=i.useState(null),{trigger:d,onClose:u}=n,p=o.current,{onPointerInTransitChange:m}=r,v=i.useCallback(()=>{a(null),m(!1)},[m]),x=i.useCallback((E,f)=>{const h=E.currentTarget,g={x:E.clientX,y:E.clientY},y=nx(g,h.getBoundingClientRect()),w=rx(g,y),R=ox(f.getBoundingClientRect()),C=ix([...w,...R]);a(C),m(!0)},[m]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(d&&p){const E=h=>x(h,p),f=h=>x(h,d);return d.addEventListener("pointerleave",E),p.addEventListener("pointerleave",f),()=>{d.removeEventListener("pointerleave",E),p.removeEventListener("pointerleave",f)}}},[d,p,x,v]),i.useEffect(()=>{if(l){const E=f=>{const h=f.target,g={x:f.clientX,y:f.clientY},y=(d==null?void 0:d.contains(h))||(p==null?void 0:p.contains(h)),w=!sx(g,l);y?v():w&&(v(),u())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[d,p,l,u,v]),c.jsxRuntimeExports.jsx(qc,{...e,ref:s})}),[Jv,ex]=Sn(Pn,{isInside:!1}),qc=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:l,...a}=e,d=Tn(ut,n),u=jn(n),{onClose:p}=d;return i.useEffect(()=>(document.addEventListener(Sr,p),()=>document.removeEventListener(Sr,p)),[p]),i.useEffect(()=>{if(d.trigger){const m=v=>{const x=v.target;x!=null&&x.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),c.jsxRuntimeExports.jsx(Oc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:c.jsxRuntimeExports.jsxs(Vv,{"data-state":d.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsxRuntimeExports.jsx(Nc,{children:r}),c.jsxRuntimeExports.jsx(Jv,{scope:n,isInside:!0,children:c.jsxRuntimeExports.jsx(Kv,{id:d.contentId,role:"tooltip",children:o||r})})]})})});Zc.displayName=ut;var Qc="TooltipArrow",tx=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jn(n);return ex(Qc,n).isInside?null:c.jsxRuntimeExports.jsx(Uv,{...o,...r,ref:t})});tx.displayName=Qc;function nx(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rx(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ox(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sx(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const a=t[s].x,d=t[s].y,u=t[l].x,p=t[l].y;d>r!=p>r&&n<(u-a)*(r-d)/(p-d)+a&&(o=!o)}return o}function ix(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ax(t)}function ax(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var cx=Yc,lx=Xc,ux=Gc,Jc=Zc;const dx=cx,fx=lx,px=ux,el=i.forwardRef(({className:e,sideOffset:t=4,...n},r)=>{const o={...c.typography.body,background:c.colors.primary[900],borderRadius:".5rem",color:c.colors.white,fontSize:".8125rem",padding:".5rem .75rem",whiteSpace:"normal",width:"19.375rem"};return c.jsxRuntimeExports.jsx(Jc,{ref:r,sideOffset:t,className:c.cn("z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),style:o,...n})});el.displayName=Jc.displayName;function me(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tl(...e){return t=>{let n=!1;const r=e.map(o=>{const s=vs(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():vs(e[o],null)}}}}function Ee(...e){return i.useCallback(tl(...e),e)}function mx(e,t){const n=i.createContext(t),r=s=>{const{children:l,...a}=s,d=i.useMemo(()=>a,Object.values(a));return c.jsxRuntimeExports.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=i.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function xo(e,t=[]){let n=[];function r(s,l){const a=i.createContext(l),d=n.length;n=[...n,l];const u=m=>{var g;const{scope:v,children:x,...E}=m,f=((g=v==null?void 0:v[e])==null?void 0:g[d])||a,h=i.useMemo(()=>E,Object.values(E));return c.jsxRuntimeExports.jsx(f.Provider,{value:h,children:x})};u.displayName=s+"Provider";function p(m,v){var f;const x=((f=v==null?void 0:v[e])==null?void 0:f[d])||a,E=i.useContext(x);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,p]}const o=()=>{const s=n.map(l=>i.createContext(l));return function(a){const d=(a==null?void 0:a[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return o.scopeName=e,[r,hx(o,...t)]}function hx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((a,{useScope:d,scopeName:u})=>{const m=d(s)[`__scope${u}`];return{...a,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function go(e){const t=vx(e),n=i.forwardRef((r,o)=>{const{children:s,...l}=r,a=i.Children.toArray(s),d=a.find(gx);if(d){const u=d.props.children,p=a.map(m=>m===d?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:m);return c.jsxRuntimeExports.jsx(t,{...l,ref:o,children:i.isValidElement(u)?i.cloneElement(u,void 0,p):null})}return c.jsxRuntimeExports.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function vx(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const l=Ex(o),a=yx(s,o.props);return o.type!==i.Fragment&&(a.ref=r?tl(r,l):l),i.cloneElement(o,a)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xx=Symbol("radix.slottable");function gx(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xx}function yx(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const d=s(...a);return o(...a),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Ex(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=wx.reduce((e,t)=>{const n=go(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:l,...a}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsxRuntimeExports.jsx(d,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bx(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}function dt(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Rx(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Cx="DismissableLayer",Pr="dismissableLayer.update",Sx="dismissableLayer.pointerDownOutside",jx="dismissableLayer.focusOutside",xs,nl=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yo=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:a,...d}=e,u=i.useContext(nl),[p,m]=i.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=i.useState({}),E=Ee(t,b=>m(b)),f=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=f.indexOf(h),y=p?f.indexOf(p):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,R=y>=g,C=Ax(b=>{const j=b.target,N=[...u.branches].some($=>$.contains(j));!R||N||(o==null||o(b),l==null||l(b),b.defaultPrevented||a==null||a())},v),S=Nx(b=>{const j=b.target;[...u.branches].some($=>$.contains(j))||(s==null||s(b),l==null||l(b),b.defaultPrevented||a==null||a())},v);return Rx(b=>{y===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},v),i.useEffect(()=>{if(p)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xs=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),gs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=xs)}},[p,v,n,u]),i.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),gs())},[p,u]),i.useEffect(()=>{const b=()=>x({});return document.addEventListener(Pr,b),()=>document.removeEventListener(Pr,b)},[]),c.jsxRuntimeExports.jsx(ue.div,{...d,ref:E,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,S.onFocusCapture),onBlurCapture:me(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,C.onPointerDownCapture)})});yo.displayName=Cx;var Px="DismissableLayerBranch",Tx=i.forwardRef((e,t)=>{const n=i.useContext(nl),r=i.useRef(null),o=Ee(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsxRuntimeExports.jsx(ue.div,{...e,ref:o})});Tx.displayName=Px;function Ax(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let d=function(){rl(Sx,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nx(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=i.useRef(!1);return i.useEffect(()=>{const o=s=>{s.target&&!r.current&&rl(jx,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gs(){const e=new CustomEvent(Pr);document.dispatchEvent(e)}function rl(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bx(o,s):o.dispatchEvent(s)}var qn=0;function ol(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ys()),document.body.insertAdjacentElement("beforeend",e[1]??ys()),qn++,()=>{qn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qn--}},[])}function ys(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qn="focusScope.autoFocusOnMount",Jn="focusScope.autoFocusOnUnmount",Es={bubbles:!1,cancelable:!0},$x="FocusScope",Eo=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[a,d]=i.useState(null),u=dt(o),p=dt(s),m=i.useRef(null),v=Ee(t,f=>d(f)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let f=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:De(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||De(m.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&De(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",h);const y=new MutationObserver(g);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",h),y.disconnect()}}},[r,a,x.paused]),i.useEffect(()=>{if(a){bs.add(x);const f=document.activeElement;if(!a.contains(f)){const g=new CustomEvent(Qn,Es);a.addEventListener(Qn,u),a.dispatchEvent(g),g.defaultPrevented||(Ox(Lx(sl(a)),{select:!0}),document.activeElement===f&&De(a))}return()=>{a.removeEventListener(Qn,u),setTimeout(()=>{const g=new CustomEvent(Jn,Es);a.addEventListener(Jn,p),a.dispatchEvent(g),g.defaultPrevented||De(f??document.body,{select:!0}),a.removeEventListener(Jn,p),bs.remove(x)},0)}}},[a,u,p,x]);const E=i.useCallback(f=>{if(!n&&!r||x.paused)return;const h=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(h&&g){const y=f.currentTarget,[w,R]=Dx(y);w&&R?!f.shiftKey&&g===R?(f.preventDefault(),n&&De(w,{select:!0})):f.shiftKey&&g===w&&(f.preventDefault(),n&&De(R,{select:!0})):g===y&&f.preventDefault()}},[n,r,x.paused]);return c.jsxRuntimeExports.jsx(ue.div,{tabIndex:-1,...l,ref:v,onKeyDown:E})});Eo.displayName=$x;function Ox(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(De(r,{select:t}),document.activeElement!==n)return}function Dx(e){const t=sl(e),n=ws(t,e),r=ws(t.reverse(),e);return[n,r]}function sl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ws(e,t){for(const n of e)if(!Ix(n,{upTo:t}))return n}function Ix(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 kx(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&&kx(e)&&t&&e.select()}}var bs=Mx();function Mx(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Rs(e,t),e.unshift(t)},remove(t){var n;e=Rs(e,t),(n=e[0])==null||n.resume()}}}function Rs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lx(e){return e.filter(t=>t.tagName!=="A")}var Fe=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},_x=i[" useId ".trim().toString()]||(()=>{}),Fx=0;function Zt(e){const[t,n]=i.useState(_x());return Fe(()=>{e||n(r=>r??String(Fx++))},[e]),e||(t?`radix-${t}`:"")}var Wx="Arrow",il=i.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsxRuntimeExports.jsx(ue.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});il.displayName=Wx;var Bx=il;function Hx(e){const[t,n]=i.useState(void 0);return Fe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,a;if("borderBoxSize"in s){const d=s.borderBoxSize,u=Array.isArray(d)?d[0]:d;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wo="Popper",[al,cl]=xo(wo),[Vx,ll]=al(wo),ul=e=>{const{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return c.jsxRuntimeExports.jsx(Vx,{scope:t,anchor:r,onAnchorChange:o,children:n})};ul.displayName=wo;var dl="PopperAnchor",fl=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ll(dl,n),l=i.useRef(null),a=Ee(t,l);return i.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:c.jsxRuntimeExports.jsx(ue.div,{...o,ref:a})});fl.displayName=dl;var bo="PopperContent",[Ux,zx]=al(bo),pl=i.forwardRef((e,t)=>{var A,H,Y,X,G,Z;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:l=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:E,...f}=e,h=ll(bo,n),[g,y]=i.useState(null),w=Ee(t,J=>y(J)),[R,C]=i.useState(null),S=Hx(R),b=(S==null?void 0:S.width)??0,j=(S==null?void 0:S.height)??0,N=r+(s!=="center"?"-"+s:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(u)?u:[u],U=_.length>0,B={padding:$,boundary:_.filter(Yx),altBoundary:U},{refs:T,floatingStyles:W,placement:M,isPositioned:L,middlewareData:O}=Zr({strategy:"fixed",placement:N,whileElementsMounted:(...J)=>Gr(...J,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[qr({mainAxis:o+j,alignmentAxis:l}),d&&Qr({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Jr():void 0,...B}),d&&eo({...B}),to({...B,apply:({elements:J,rects:ie,availableWidth:Se,availableHeight:je})=>{const{width:Pe,height:xt}=ie.reference,le=J.floating.style;le.setProperty("--radix-popper-available-width",`${Se}px`),le.setProperty("--radix-popper-available-height",`${je}px`),le.setProperty("--radix-popper-anchor-width",`${Pe}px`),le.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),R&&ro({element:R,padding:a}),Xx({arrowWidth:b,arrowHeight:j}),v&&no({strategy:"referenceHidden",...B})]}),[z,re]=vl(M),te=dt(E);Fe(()=>{L&&(te==null||te())},[L,te]);const P=(A=O.arrow)==null?void 0:A.x,k=(H=O.arrow)==null?void 0:H.y,F=((Y=O.arrow)==null?void 0:Y.centerOffset)!==0,[D,K]=i.useState();return Fe(()=>{g&&K(window.getComputedStyle(g).zIndex)},[g]),c.jsxRuntimeExports.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[(X=O.transformOrigin)==null?void 0:X.x,(G=O.transformOrigin)==null?void 0:G.y].join(" "),...((Z=O.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsxRuntimeExports.jsx(Ux,{scope:n,placedSide:z,onArrowChange:C,arrowX:P,arrowY:k,shouldHideArrow:F,children:c.jsxRuntimeExports.jsx(ue.div,{"data-side":z,"data-align":re,...f,ref:w,style:{...f.style,animation:L?void 0:"none"}})})})});pl.displayName=bo;var ml="PopperArrow",Kx={top:"bottom",right:"left",bottom:"top",left:"right"},hl=i.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=zx(ml,r),l=Kx[s.placedSide];return c.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsxRuntimeExports.jsx(Bx,{...o,ref:n,style:{...o.style,display:"block"}})})});hl.displayName=ml;function Yx(e){return e!==null}var Xx=e=>({name:"transformOrigin",options:e,fn(t){var h,g,y;const{placement:n,rects:r,middlewareData:o}=t,l=((h=o.arrow)==null?void 0:h.centerOffset)!==0,a=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[u,p]=vl(n),m={start:"0%",center:"50%",end:"100%"}[p],v=(((g=o.arrow)==null?void 0:g.x)??0)+a/2,x=(((y=o.arrow)==null?void 0:y.y)??0)+d/2;let E="",f="";return u==="bottom"?(E=l?m:`${v}px`,f=`${-d}px`):u==="top"?(E=l?m:`${v}px`,f=`${r.floating.height+d}px`):u==="right"?(E=`${-d}px`,f=l?m:`${x}px`):u==="left"&&(E=`${r.floating.width+d}px`,f=l?m:`${x}px`),{data:{x:E,y:f}}}});function vl(e){const[t,n="center"]=e.split("-");return[t,n]}var Gx=ul,xl=fl,Zx=pl,qx=hl,Qx="Portal",Ro=i.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=i.useState(!1);Fe(()=>s(!0),[]);const l=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return l?ge.default.createPortal(c.jsxRuntimeExports.jsx(ue.div,{...r,ref:t}),l):null});Ro.displayName=Qx;function Jx(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var vt=e=>{const{present:t,children:n}=e,r=eg(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=Ee(r.ref,tg(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null};vt.displayName="Presence";function eg(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),l=e?"mounted":"unmounted",[a,d]=Jx(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=Ht(r.current);s.current=a==="mounted"?u:"none"},[a]),Fe(()=>{const u=r.current,p=o.current;if(p!==e){const v=s.current,x=Ht(u);e?d("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Fe(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,m=x=>{const f=Ht(r.current).includes(x.animationName);if(x.target===t&&f&&(d("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=x=>{x.target===t&&(s.current=Ht(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ht(e){return(e==null?void 0:e.animationName)||"none"}function tg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ng=i[" useInsertionEffect ".trim().toString()]||Fe;function gl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=rg({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:o;{const p=i.useRef(e!==void 0);i.useEffect(()=>{const m=p.current;m!==a&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,r])}const u=i.useCallback(p=>{var m;if(a){const v=og(p)?p(e):p;v!==e&&((m=l.current)==null||m.call(l,v))}else s(p)},[a,e,s,l]);return[d,u]}function rg({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return ng(()=>{s.current=t},[t]),i.useEffect(()=>{var l;o.current!==n&&((l=s.current)==null||l.call(s,n),o.current=n)},[n,o]),[n,r,s]}function og(e){return typeof e=="function"}function sg(e){return e}function ig(e,t){t===void 0&&(t=sg);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(a){return a!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var a=n;n=[],a.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(p){l.push(p),u()},filter:function(p){return l=l.filter(p),n}}}};return o}function ag(e){e===void 0&&(e={});var t=ig(null);return t.options=ne({async:!0,ssr:!1},e),t}var yl=function(e){var t=e.sideCar,n=Pt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,ne({},n))};yl.isSideCarExport=!0;function cg(e,t){return e.useMedium(t),yl}var El=ag(),er=function(){},An=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:er,onWheelCapture:er,onTouchMoveCapture:er}),o=r[0],s=r[1],l=e.forwardProps,a=e.children,d=e.className,u=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,x=e.noRelative,E=e.noIsolation,f=e.inert,h=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,w=e.gapMode,R=Pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,S=Ki([n,t]),b=ne(ne({},R),o);return i.createElement(i.Fragment,null,p&&i.createElement(C,{sideCar:El,removeScrollBar:u,shards:m,noRelative:x,noIsolation:E,inert:f,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),l?i.cloneElement(i.Children.only(a),ne(ne({},b),{ref:S})):i.createElement(y,ne({},b,{className:d,ref:S}),a))});An.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};An.classNames={fullWidth:wt,zeroRight:Et};var Tr=!1;if(typeof window<"u")try{var Vt=Object.defineProperty({},"passive",{get:function(){return Tr=!0,!0}});window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch{Tr=!1}var nt=Tr?{passive:!1}:!1,lg=function(e){return e.tagName==="TEXTAREA"},wl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lg(e)&&n[t]==="visible")},ug=function(e){return wl(e,"overflowY")},dg=function(e){return wl(e,"overflowX")},Cs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=bl(e,r);if(o){var s=Rl(e,r),l=s[1],a=s[2];if(l>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bl=function(e,t){return e==="v"?ug(t):dg(t)},Rl=function(e,t){return e==="v"?fg(t):pg(t)},mg=function(e,t){return e==="h"&&t==="rtl"?-1:1},hg=function(e,t,n,r,o){var s=mg(e,window.getComputedStyle(t).direction),l=s*r,a=n.target,d=t.contains(a),u=!1,p=l>0,m=0,v=0;do{if(!a)break;var x=Rl(e,a),E=x[0],f=x[1],h=x[2],g=f-h-s*E;(E||g)&&bl(e,a)&&(m+=g,v+=E);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(p&&(Math.abs(m)<1||!o)||!p&&(Math.abs(v)<1||!o))&&(u=!0),u},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ss=function(e){return[e.deltaX,e.deltaY]},js=function(e){return e&&"current"in e?e.current:e},vg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xg=function(e){return`
656
656
  .block-interactivity-`.concat(e,` {pointer-events: none;}
657
657
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
658
- `)},gg=0,rt=[];function yg(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(gg++)[0],s=i.useState(Xi)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(js),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=Ut(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=Cs(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=Cs(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return hg(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!rt.length||rt[rt.length-1]!==s)){var g="deltaY"in h?Ss(h):Ut(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&vg(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(js).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Eg(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=Ut(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,Ss(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,Ut(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return rt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,nt),document.addEventListener("touchmove",d,nt),document.addEventListener("touchstart",p,nt),function(){rt=rt.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,nt),document.removeEventListener("touchmove",d,nt),document.removeEventListener("touchstart",p,nt)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:xg(o)}):null,x?i.createElement(Gi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Eg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wg=cg(El,yg);var Co=i.forwardRef(function(e,t){return i.createElement(Tn,ne({},e,{ref:t,sideCar:wg}))});Co.classNames=Tn.classNames;var An="Popover",[Cl,Ly]=xo(An,[cl]),Nt=cl(),[bg,Ve]=Cl(An),Sl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!1}=e,a=Nt(t),d=i.useRef(null),[u,p]=i.useState(!1),[m,v]=gl({prop:r,defaultProp:o??!1,onChange:s,caller:An});return c.jsxRuntimeExports.jsx(Gx,{...a,children:c.jsxRuntimeExports.jsx(bg,{scope:t,contentId:Zt(),triggerRef:d,open:m,onOpenChange:v,onOpenToggle:i.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>p(!0),[]),onCustomAnchorRemove:i.useCallback(()=>p(!1),[]),modal:l,children:n})})};Sl.displayName=An;var jl="PopoverAnchor",Rg=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(jl,n),s=Nt(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:a}=o;return i.useEffect(()=>(l(),()=>a()),[l,a]),c.jsxRuntimeExports.jsx(xl,{...s,...r,ref:t})});Rg.displayName=jl;var Pl="PopoverTrigger",Tl=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(Pl,n),s=Nt(n),l=Ee(t,o.triggerRef),a=c.jsxRuntimeExports.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Dl(o.open),...r,ref:l,onClick:me(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsxRuntimeExports.jsx(xl,{asChild:!0,...s,children:a})});Tl.displayName=Pl;var So="PopoverPortal",[Cg,Sg]=Cl(So,{forceMount:void 0}),Al=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Ve(So,t);return c.jsxRuntimeExports.jsx(Cg,{scope:t,forceMount:n,children:c.jsxRuntimeExports.jsx(vt,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ro,{asChild:!0,container:o,children:r})})})};Al.displayName=So;var ft="PopoverContent",Nl=i.forwardRef((e,t)=>{const n=Sg(ft,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Ve(ft,e.__scopePopover);return c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Pg,{...o,ref:t}):c.jsxRuntimeExports.jsx(Tg,{...o,ref:t})})});Nl.displayName=ft;var jg=go("PopoverContent.RemoveScroll"),Pg=i.forwardRef((e,t)=>{const n=Ve(ft,e.__scopePopover),r=i.useRef(null),o=Ee(t,r),s=i.useRef(!1);return i.useEffect(()=>{const l=r.current;if(l)return dn(l)},[]),c.jsxRuntimeExports.jsx(Co,{as:jg,allowPinchZoom:!0,children:c.jsxRuntimeExports.jsx($l,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,l=>{var a;l.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,l=>{const a=l.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,u=a.button===2||d;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:me(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),Tg=i.forwardRef((e,t)=>{const n=Ve(ft,e.__scopePopover),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx($l,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),$l=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:p,...m}=e,v=Ve(ft,n),x=Nt(n);return ol(),c.jsxRuntimeExports.jsx(Eo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(yo,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:c.jsxRuntimeExports.jsx(Zx,{"data-state":Dl(v.open),role:"dialog",id:v.contentId,...x,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ol="PopoverClose",Ag=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(Ol,n);return c.jsxRuntimeExports.jsx(ue.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});Ag.displayName=Ol;var Ng="PopoverArrow",$g=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nt(n);return c.jsxRuntimeExports.jsx(qx,{...o,...r,ref:t})});$g.displayName=Ng;function Dl(e){return e?"open":"closed"}var Og=Sl,Dg=Al,Il=Nl,Ps=1,Ig=.9,Mg=.8,kg=.17,er=.1,tr=.999,Lg=.9999,_g=.99,Fg=/[\\\/_+.#"@\[\(\{&]/,Wg=/[\\\/_+.#"@\[\(\{&]/g,Bg=/[\s-]/,Ml=/[\s-]/g;function Tr(e,t,n,r,o,s,l){if(s===t.length)return o===e.length?Ps:_g;var a=`${o},${s}`;if(l[a]!==void 0)return l[a];for(var d=r.charAt(s),u=n.indexOf(d,o),p=0,m,v,x,E;u>=0;)m=Tr(e,t,n,r,u+1,s+1,l),m>p&&(u===o?m*=Ps:Fg.test(e.charAt(u-1))?(m*=Mg,x=e.slice(o,u-1).match(Wg),x&&o>0&&(m*=Math.pow(tr,x.length))):Bg.test(e.charAt(u-1))?(m*=Ig,E=e.slice(o,u-1).match(Ml),E&&o>0&&(m*=Math.pow(tr,E.length))):(m*=kg,o>0&&(m*=Math.pow(tr,u-o))),e.charAt(u)!==t.charAt(s)&&(m*=Lg)),(m<er&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(v=Tr(e,t,n,r,u+1,s+2,l),v*er>m&&(m=v*er)),m>p&&(p=m),u=n.indexOf(d,u+1);return l[a]=p,p}function Ts(e){return e.toLowerCase().replace(Ml," ")}function Hg(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Tr(e,t,Ts(e),Ts(t),0,0,{})}var Nn="Dialog",[kl,_y]=xo(Nn),[Vg,we]=kl(Nn),Ll=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,a=i.useRef(null),d=i.useRef(null),[u,p]=gl({prop:r,defaultProp:o??!1,onChange:s,caller:Nn});return c.jsxRuntimeExports.jsx(Vg,{scope:t,triggerRef:a,contentRef:d,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),open:u,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};Ll.displayName=Nn;var _l="DialogTrigger",Ug=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(_l,n),s=Ee(t,o.triggerRef);return c.jsxRuntimeExports.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":To(o.open),...r,ref:s,onClick:me(e.onClick,o.onOpenToggle)})});Ug.displayName=_l;var jo="DialogPortal",[zg,Fl]=kl(jo,{forceMount:void 0}),Wl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=we(jo,t);return c.jsxRuntimeExports.jsx(zg,{scope:t,forceMount:n,children:i.Children.map(r,l=>c.jsxRuntimeExports.jsx(vt,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ro,{asChild:!0,container:o,children:l})}))})};Wl.displayName=jo;var on="DialogOverlay",Bl=i.forwardRef((e,t)=>{const n=Fl(on,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(on,e.__scopeDialog);return s.modal?c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:c.jsxRuntimeExports.jsx(Yg,{...o,ref:t})}):null});Bl.displayName=on;var Kg=go("DialogOverlay.RemoveScroll"),Yg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(on,n);return c.jsxRuntimeExports.jsx(Co,{as:Kg,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsxRuntimeExports.jsx(ue.div,{"data-state":To(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ye="DialogContent",Hl=i.forwardRef((e,t)=>{const n=Fl(Ye,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(Ye,e.__scopeDialog);return c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Xg,{...o,ref:t}):c.jsxRuntimeExports.jsx(Gg,{...o,ref:t})})});Hl.displayName=Ye;var Xg=i.forwardRef((e,t)=>{const n=we(Ye,e.__scopeDialog),r=i.useRef(null),o=Ee(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return dn(s)},[]),c.jsxRuntimeExports.jsx(Vl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),Gg=i.forwardRef((e,t)=>{const n=we(Ye,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx(Vl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Vl=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,a=we(Ye,n),d=i.useRef(null),u=Ee(t,d);return ol(),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Eo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(yo,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":To(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Jg,{titleId:a.titleId}),c.jsxRuntimeExports.jsx(ty,{contentRef:d,descriptionId:a.descriptionId})]})]})}),Po="DialogTitle",Zg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Po,n);return c.jsxRuntimeExports.jsx(ue.h2,{id:o.titleId,...r,ref:t})});Zg.displayName=Po;var Ul="DialogDescription",qg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Ul,n);return c.jsxRuntimeExports.jsx(ue.p,{id:o.descriptionId,...r,ref:t})});qg.displayName=Ul;var zl="DialogClose",Qg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(zl,n);return c.jsxRuntimeExports.jsx(ue.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});Qg.displayName=zl;function To(e){return e?"open":"closed"}var Kl="DialogTitleWarning",[Fy,Yl]=mx(Kl,{contentName:Ye,titleName:Po,docsSlug:"dialog"}),Jg=({titleId:e})=>{const t=Yl(Kl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
658
+ `)},gg=0,rt=[];function yg(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(gg++)[0],s=i.useState(Xi)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(js),!0).filter(Boolean);return f.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(f,h){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!l.current.allowPinchZoom;var g=Ut(f),y=n.current,w="deltaX"in f?f.deltaX:y[0]-g[0],R="deltaY"in f?f.deltaY:y[1]-g[1],C,S=f.target,b=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in f&&b==="h"&&S.type==="range")return!1;var j=Cs(b,S);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=Cs(b,S)),!j)return!1;if(!r.current&&"changedTouches"in f&&(w||R)&&(r.current=C),!C)return!0;var N=r.current||C;return hg(N,h,f,N==="h"?w:R,!0)},[]),d=i.useCallback(function(f){var h=f;if(!(!rt.length||rt[rt.length-1]!==s)){var g="deltaY"in h?Ss(h):Ut(h),y=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&vg(C.delta,g)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(js).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=w.length>0?a(h,w[0]):!l.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=i.useCallback(function(f,h,g,y){var w={name:f,delta:h,target:g,should:y,shadowParent:Eg(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),p=i.useCallback(function(f){n.current=Ut(f),r.current=void 0},[]),m=i.useCallback(function(f){u(f.type,Ss(f),f.target,a(f,e.lockRef.current))},[]),v=i.useCallback(function(f){u(f.type,Ut(f),f.target,a(f,e.lockRef.current))},[]);i.useEffect(function(){return rt.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",d,nt),document.addEventListener("touchmove",d,nt),document.addEventListener("touchstart",p,nt),function(){rt=rt.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,nt),document.removeEventListener("touchmove",d,nt),document.removeEventListener("touchstart",p,nt)}},[]);var x=e.removeScrollBar,E=e.inert;return i.createElement(i.Fragment,null,E?i.createElement(s,{styles:xg(o)}):null,x?i.createElement(Gi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Eg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wg=cg(El,yg);var Co=i.forwardRef(function(e,t){return i.createElement(An,ne({},e,{ref:t,sideCar:wg}))});Co.classNames=An.classNames;var Nn="Popover",[Cl,Ly]=xo(Nn,[cl]),Nt=cl(),[bg,Ve]=Cl(Nn),Sl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!1}=e,a=Nt(t),d=i.useRef(null),[u,p]=i.useState(!1),[m,v]=gl({prop:r,defaultProp:o??!1,onChange:s,caller:Nn});return c.jsxRuntimeExports.jsx(Gx,{...a,children:c.jsxRuntimeExports.jsx(bg,{scope:t,contentId:Zt(),triggerRef:d,open:m,onOpenChange:v,onOpenToggle:i.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>p(!0),[]),onCustomAnchorRemove:i.useCallback(()=>p(!1),[]),modal:l,children:n})})};Sl.displayName=Nn;var jl="PopoverAnchor",Rg=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(jl,n),s=Nt(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:a}=o;return i.useEffect(()=>(l(),()=>a()),[l,a]),c.jsxRuntimeExports.jsx(xl,{...s,...r,ref:t})});Rg.displayName=jl;var Pl="PopoverTrigger",Tl=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(Pl,n),s=Nt(n),l=Ee(t,o.triggerRef),a=c.jsxRuntimeExports.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Dl(o.open),...r,ref:l,onClick:me(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsxRuntimeExports.jsx(xl,{asChild:!0,...s,children:a})});Tl.displayName=Pl;var So="PopoverPortal",[Cg,Sg]=Cl(So,{forceMount:void 0}),Al=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Ve(So,t);return c.jsxRuntimeExports.jsx(Cg,{scope:t,forceMount:n,children:c.jsxRuntimeExports.jsx(vt,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ro,{asChild:!0,container:o,children:r})})})};Al.displayName=So;var ft="PopoverContent",Nl=i.forwardRef((e,t)=>{const n=Sg(ft,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Ve(ft,e.__scopePopover);return c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Pg,{...o,ref:t}):c.jsxRuntimeExports.jsx(Tg,{...o,ref:t})})});Nl.displayName=ft;var jg=go("PopoverContent.RemoveScroll"),Pg=i.forwardRef((e,t)=>{const n=Ve(ft,e.__scopePopover),r=i.useRef(null),o=Ee(t,r),s=i.useRef(!1);return i.useEffect(()=>{const l=r.current;if(l)return fn(l)},[]),c.jsxRuntimeExports.jsx(Co,{as:jg,allowPinchZoom:!0,children:c.jsxRuntimeExports.jsx($l,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,l=>{var a;l.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,l=>{const a=l.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,u=a.button===2||d;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:me(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),Tg=i.forwardRef((e,t)=>{const n=Ve(ft,e.__scopePopover),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx($l,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),$l=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:p,...m}=e,v=Ve(ft,n),x=Nt(n);return ol(),c.jsxRuntimeExports.jsx(Eo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(yo,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:c.jsxRuntimeExports.jsx(Zx,{"data-state":Dl(v.open),role:"dialog",id:v.contentId,...x,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ol="PopoverClose",Ag=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ve(Ol,n);return c.jsxRuntimeExports.jsx(ue.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});Ag.displayName=Ol;var Ng="PopoverArrow",$g=i.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Nt(n);return c.jsxRuntimeExports.jsx(qx,{...o,...r,ref:t})});$g.displayName=Ng;function Dl(e){return e?"open":"closed"}var Og=Sl,Dg=Al,Il=Nl,Ps=1,Ig=.9,kg=.8,Mg=.17,tr=.1,nr=.999,Lg=.9999,_g=.99,Fg=/[\\\/_+.#"@\[\(\{&]/,Wg=/[\\\/_+.#"@\[\(\{&]/g,Bg=/[\s-]/,kl=/[\s-]/g;function Ar(e,t,n,r,o,s,l){if(s===t.length)return o===e.length?Ps:_g;var a=`${o},${s}`;if(l[a]!==void 0)return l[a];for(var d=r.charAt(s),u=n.indexOf(d,o),p=0,m,v,x,E;u>=0;)m=Ar(e,t,n,r,u+1,s+1,l),m>p&&(u===o?m*=Ps:Fg.test(e.charAt(u-1))?(m*=kg,x=e.slice(o,u-1).match(Wg),x&&o>0&&(m*=Math.pow(nr,x.length))):Bg.test(e.charAt(u-1))?(m*=Ig,E=e.slice(o,u-1).match(kl),E&&o>0&&(m*=Math.pow(nr,E.length))):(m*=Mg,o>0&&(m*=Math.pow(nr,u-o))),e.charAt(u)!==t.charAt(s)&&(m*=Lg)),(m<tr&&n.charAt(u-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(u-1)!==r.charAt(s))&&(v=Ar(e,t,n,r,u+1,s+2,l),v*tr>m&&(m=v*tr)),m>p&&(p=m),u=n.indexOf(d,u+1);return l[a]=p,p}function Ts(e){return e.toLowerCase().replace(kl," ")}function Hg(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ar(e,t,Ts(e),Ts(t),0,0,{})}var $n="Dialog",[Ml,_y]=xo($n),[Vg,we]=Ml($n),Ll=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,a=i.useRef(null),d=i.useRef(null),[u,p]=gl({prop:r,defaultProp:o??!1,onChange:s,caller:$n});return c.jsxRuntimeExports.jsx(Vg,{scope:t,triggerRef:a,contentRef:d,contentId:Zt(),titleId:Zt(),descriptionId:Zt(),open:u,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};Ll.displayName=$n;var _l="DialogTrigger",Ug=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(_l,n),s=Ee(t,o.triggerRef);return c.jsxRuntimeExports.jsx(ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":To(o.open),...r,ref:s,onClick:me(e.onClick,o.onOpenToggle)})});Ug.displayName=_l;var jo="DialogPortal",[zg,Fl]=Ml(jo,{forceMount:void 0}),Wl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=we(jo,t);return c.jsxRuntimeExports.jsx(zg,{scope:t,forceMount:n,children:i.Children.map(r,l=>c.jsxRuntimeExports.jsx(vt,{present:n||s.open,children:c.jsxRuntimeExports.jsx(Ro,{asChild:!0,container:o,children:l})}))})};Wl.displayName=jo;var on="DialogOverlay",Bl=i.forwardRef((e,t)=>{const n=Fl(on,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(on,e.__scopeDialog);return s.modal?c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:c.jsxRuntimeExports.jsx(Yg,{...o,ref:t})}):null});Bl.displayName=on;var Kg=go("DialogOverlay.RemoveScroll"),Yg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(on,n);return c.jsxRuntimeExports.jsx(Co,{as:Kg,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsxRuntimeExports.jsx(ue.div,{"data-state":To(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ye="DialogContent",Hl=i.forwardRef((e,t)=>{const n=Fl(Ye,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=we(Ye,e.__scopeDialog);return c.jsxRuntimeExports.jsx(vt,{present:r||s.open,children:s.modal?c.jsxRuntimeExports.jsx(Xg,{...o,ref:t}):c.jsxRuntimeExports.jsx(Gg,{...o,ref:t})})});Hl.displayName=Ye;var Xg=i.forwardRef((e,t)=>{const n=we(Ye,e.__scopeDialog),r=i.useRef(null),o=Ee(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return fn(s)},[]),c.jsxRuntimeExports.jsx(Vl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&s.preventDefault()}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault())})}),Gg=i.forwardRef((e,t)=>{const n=we(Ye,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return c.jsxRuntimeExports.jsx(Vl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,a;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Vl=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,a=we(Ye,n),d=i.useRef(null),u=Ee(t,d);return ol(),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Eo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsxRuntimeExports.jsx(yo,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":To(a.open),...l,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxRuntimeExports.jsxs(c.jsxRuntimeExports.Fragment,{children:[c.jsxRuntimeExports.jsx(Jg,{titleId:a.titleId}),c.jsxRuntimeExports.jsx(ty,{contentRef:d,descriptionId:a.descriptionId})]})]})}),Po="DialogTitle",Zg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Po,n);return c.jsxRuntimeExports.jsx(ue.h2,{id:o.titleId,...r,ref:t})});Zg.displayName=Po;var Ul="DialogDescription",qg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(Ul,n);return c.jsxRuntimeExports.jsx(ue.p,{id:o.descriptionId,...r,ref:t})});qg.displayName=Ul;var zl="DialogClose",Qg=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=we(zl,n);return c.jsxRuntimeExports.jsx(ue.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});Qg.displayName=zl;function To(e){return e?"open":"closed"}var Kl="DialogTitleWarning",[Fy,Yl]=mx(Kl,{contentName:Ye,titleName:Po,docsSlug:"dialog"}),Jg=({titleId:e})=>{const t=Yl(Kl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
659
659
 
660
660
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
661
661
 
662
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ey="DialogDescriptionWarning",ty=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yl(ey).contentName}}.`;return i.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ny=Ll,ry=Wl,oy=Bl,sy=Hl,gt='[cmdk-group=""]',nr='[cmdk-group-items=""]',iy='[cmdk-group-heading=""]',Xl='[cmdk-item=""]',As=`${Xl}:not([aria-disabled="true"])`,Ar="cmdk-item-select",ot="data-value",ay=(e,t,n)=>Hg(e,t,n),Gl=i.createContext(void 0),$t=()=>i.useContext(Gl),Zl=i.createContext(void 0),Ao=()=>i.useContext(Zl),ql=i.createContext(void 0),Ql=i.forwardRef((e,t)=>{let n=st(()=>{var P,M;return{search:"",value:(M=(P=e.value)!=null?P:e.defaultValue)!=null?M:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=st(()=>new Set),o=st(()=>new Map),s=st(()=>new Map),l=st(()=>new Set),a=Jl(e),{label:d,children:u,value:p,onValueChange:m,filter:v,shouldFilter:x,loop:E,disablePointerSelection:f=!1,vimBindings:h=!0,...g}=e,y=fe(),w=fe(),R=fe(),C=i.useRef(null),S=gy();Xe(()=>{if(p!==void 0){let P=p.trim();n.current.value=P,b.emit()}},[p]),Xe(()=>{S(6,B)},[]);let b=i.useMemo(()=>({subscribe:P=>(l.current.add(P),()=>l.current.delete(P)),snapshot:()=>n.current,setState:(P,M,F)=>{var D,K,A,H;if(!Object.is(n.current[P],M)){if(n.current[P]=M,P==="search")U(),$(),S(1,_);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Y=document.getElementById(R);Y?Y.focus():(D=document.getElementById(y))==null||D.focus()}if(S(7,()=>{var Y;n.current.selectedItemId=(Y=T())==null?void 0:Y.id,b.emit()}),F||S(5,B),((K=a.current)==null?void 0:K.value)!==void 0){let Y=M??"";(H=(A=a.current).onValueChange)==null||H.call(A,Y);return}}b.emit()}},emit:()=>{l.current.forEach(P=>P())}}),[]),j=i.useMemo(()=>({value:(P,M,F)=>{var D;M!==((D=s.current.get(P))==null?void 0:D.value)&&(s.current.set(P,{value:M,keywords:F}),n.current.filtered.items.set(P,N(M,F)),S(2,()=>{$(),b.emit()}))},item:(P,M)=>(r.current.add(P),M&&(o.current.has(M)?o.current.get(M).add(P):o.current.set(M,new Set([P]))),S(3,()=>{U(),$(),n.current.value||_(),b.emit()}),()=>{s.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let F=T();S(4,()=>{U(),(F==null?void 0:F.getAttribute("id"))===P&&_(),b.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{s.current.delete(P),o.current.delete(P)}),filter:()=>a.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:R,labelId:w,listInnerRef:C}),[]);function N(P,M){var F,D;let K=(D=(F=a.current)==null?void 0:F.filter)!=null?D:ay;return P?K(P,n.current.search,M):0}function $(){if(!n.current.search||a.current.shouldFilter===!1)return;let P=n.current.filtered.items,M=[];n.current.filtered.groups.forEach(D=>{let K=o.current.get(D),A=0;K.forEach(H=>{let Y=P.get(H);A=Math.max(Y,A)}),M.push([D,A])});let F=C.current;W().sort((D,K)=>{var A,H;let Y=D.getAttribute("id"),X=K.getAttribute("id");return((A=P.get(X))!=null?A:0)-((H=P.get(Y))!=null?H:0)}).forEach(D=>{let K=D.closest(nr);K?K.appendChild(D.parentElement===K?D:D.closest(`${nr} > *`)):F.appendChild(D.parentElement===F?D:D.closest(`${nr} > *`))}),M.sort((D,K)=>K[1]-D[1]).forEach(D=>{var K;let A=(K=C.current)==null?void 0:K.querySelector(`${gt}[${ot}="${encodeURIComponent(D[0])}"]`);A==null||A.parentElement.appendChild(A)})}function _(){let P=W().find(F=>F.getAttribute("aria-disabled")!=="true"),M=P==null?void 0:P.getAttribute(ot);b.setState("value",M||void 0)}function U(){var P,M,F,D;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let K=0;for(let A of r.current){let H=(M=(P=s.current.get(A))==null?void 0:P.value)!=null?M:"",Y=(D=(F=s.current.get(A))==null?void 0:F.keywords)!=null?D:[],X=N(H,Y);n.current.filtered.items.set(A,X),X>0&&K++}for(let[A,H]of o.current)for(let Y of H)if(n.current.filtered.items.get(Y)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=K}function B(){var P,M,F;let D=T();D&&(((P=D.parentElement)==null?void 0:P.firstChild)===D&&((F=(M=D.closest(gt))==null?void 0:M.querySelector(iy))==null||F.scrollIntoView({block:"nearest"})),D.scrollIntoView({block:"nearest"}))}function T(){var P;return(P=C.current)==null?void 0:P.querySelector(`${Xl}[aria-selected="true"]`)}function W(){var P;return Array.from(((P=C.current)==null?void 0:P.querySelectorAll(As))||[])}function k(P){let M=W()[P];M&&b.setState("value",M.getAttribute(ot))}function L(P){var M;let F=T(),D=W(),K=D.findIndex(H=>H===F),A=D[K+P];(M=a.current)!=null&&M.loop&&(A=K+P<0?D[D.length-1]:K+P===D.length?D[0]:D[K+P]),A&&b.setState("value",A.getAttribute(ot))}function O(P){let M=T(),F=M==null?void 0:M.closest(gt),D;for(;F&&!D;)F=P>0?vy(F,gt):xy(F,gt),D=F==null?void 0:F.querySelector(As);D?b.setState("value",D.getAttribute(ot)):L(P)}let z=()=>k(W().length-1),re=P=>{P.preventDefault(),P.metaKey?z():P.altKey?O(1):L(1)},te=P=>{P.preventDefault(),P.metaKey?k(0):P.altKey?O(-1):L(-1)};return i.createElement(ae.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:P=>{var M;(M=g.onKeyDown)==null||M.call(g,P);let F=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||F))switch(P.key){case"n":case"j":{h&&P.ctrlKey&&re(P);break}case"ArrowDown":{re(P);break}case"p":case"k":{h&&P.ctrlKey&&te(P);break}case"ArrowUp":{te(P);break}case"Home":{P.preventDefault(),k(0);break}case"End":{P.preventDefault(),z();break}case"Enter":{P.preventDefault();let D=T();if(D){let K=new Event(Ar);D.dispatchEvent(K)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:Ey},d),$n(e,P=>i.createElement(Zl.Provider,{value:b},i.createElement(Gl.Provider,{value:j},P))))}),cy=i.forwardRef((e,t)=>{var n,r;let o=fe(),s=i.useRef(null),l=i.useContext(ql),a=$t(),d=Jl(e),u=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;Xe(()=>{if(!u)return a.item(o,l==null?void 0:l.id)},[u]);let p=eu(o,s,[e.value,e.children,s],e.keywords),m=Ao(),v=We(S=>S.value&&S.value===p.current),x=We(S=>u||a.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);i.useEffect(()=>{let S=s.current;if(!(!S||e.disabled))return S.addEventListener(Ar,E),()=>S.removeEventListener(Ar,E)},[x,e.onSelect,e.disabled]);function E(){var S,b;f(),(b=(S=d.current).onSelect)==null||b.call(S,p.current)}function f(){m.setState("value",p.current,!0)}if(!x)return null;let{disabled:h,value:g,onSelect:y,forceMount:w,keywords:R,...C}=e;return i.createElement(ae.div,{ref:Me(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!v,"data-disabled":!!h,"data-selected":!!v,onPointerMove:h||a.getDisablePointerSelection()?void 0:f,onClick:h?void 0:E},e.children)}),ly=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,l=fe(),a=i.useRef(null),d=i.useRef(null),u=fe(),p=$t(),m=We(x=>o||p.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);Xe(()=>p.group(l),[]),eu(l,a,[e.value,e.heading,d]);let v=i.useMemo(()=>({id:l,forceMount:o}),[o]);return i.createElement(ae.div,{ref:Me(a,t),...s,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&i.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),$n(e,x=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},i.createElement(ql.Provider,{value:v},x))))}),uy=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=i.useRef(null),s=We(l=>!l.search);return!n&&!s?null:i.createElement(ae.div,{ref:Me(o,t),...r,"cmdk-separator":"",role:"separator"})}),dy=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=Ao(),l=We(u=>u.search),a=We(u=>u.selectedItemId),d=$t();return i.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),i.createElement(ae.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":a,id:d.inputId,type:"text",value:o?e.value:l,onChange:u=>{o||s.setState("search",u.target.value),n==null||n(u.target.value)}})}),fy=i.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=i.useRef(null),l=i.useRef(null),a=We(u=>u.selectedItemId),d=$t();return i.useEffect(()=>{if(l.current&&s.current){let u=l.current,p=s.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let x=u.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(u),()=>{cancelAnimationFrame(m),v.unobserve(u)}}},[]),i.createElement(ae.div,{ref:Me(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:d.listId},$n(e,u=>i.createElement("div",{ref:Me(l,d.listInnerRef),"cmdk-list-sizer":""},u)))}),py=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:l,...a}=e;return i.createElement(ny,{open:n,onOpenChange:r},i.createElement(ry,{container:l},i.createElement(oy,{"cmdk-overlay":"",className:o}),i.createElement(sy,{"aria-label":e.label,"cmdk-dialog":"",className:s},i.createElement(Ql,{ref:t,...a}))))}),my=i.forwardRef((e,t)=>We(n=>n.filtered.count===0)?i.createElement(ae.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),hy=i.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return i.createElement(ae.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},$n(e,l=>i.createElement("div",{"aria-hidden":!0},l)))}),ce=Object.assign(Ql,{List:fy,Item:cy,Input:dy,Group:ly,Separator:uy,Dialog:py,Empty:my,Loading:hy});function vy(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function xy(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Jl(e){let t=i.useRef(e);return Xe(()=>{t.current=e}),t}var Xe=typeof window>"u"?i.useEffect:i.useLayoutEffect;function st(e){let t=i.useRef();return t.current===void 0&&(t.current=e()),t}function We(e){let t=Ao(),n=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,n,n)}function eu(e,t,n,r=[]){let o=i.useRef(),s=$t();return Xe(()=>{var l;let a=(()=>{var u;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(u=p.current.textContent)==null?void 0:u.trim():o.current}})(),d=r.map(u=>u.trim());s.value(e,a,d),(l=t.current)==null||l.setAttribute(ot,a),o.current=a}),o}var gy=()=>{let[e,t]=i.useState(),n=st(()=>new Map);return Xe(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function yy(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function $n({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.cloneElement(yy(t),{ref:t.ref},n(t.props.children)):n(t)}var Ey={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const tu=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce,{ref:n,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));tu.displayName=ce.displayName;const wy=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:c.jsxRuntimeExports.jsx(ce.Input,{ref:n,className:c.cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})}));wy.displayName=ce.Input.displayName;const Nr=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.List,{ref:n,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Nr.displayName=ce.List.displayName;const nu=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(ce.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));nu.displayName=ce.Empty.displayName;const ru=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Group,{ref:n,className:c.cn("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));ru.displayName=ce.Group.displayName;const by=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Separator,{ref:n,className:c.cn("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t}));by.displayName=ce.Separator.displayName;const ou=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Item,{ref:n,className:c.cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50",e),...t}));ou.displayName=ce.Item.displayName;const Ry=Og,su=i.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>c.jsxRuntimeExports.jsx(Dg,{children:c.jsxRuntimeExports.jsx(Il,{ref:o,align:t,sideOffset:n,className:c.cn("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})}));su.displayName=Il.displayName;const Cy=I.styled(su)`
662
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ey="DialogDescriptionWarning",ty=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yl(ey).contentName}}.`;return i.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ny=Ll,ry=Wl,oy=Bl,sy=Hl,gt='[cmdk-group=""]',rr='[cmdk-group-items=""]',iy='[cmdk-group-heading=""]',Xl='[cmdk-item=""]',As=`${Xl}:not([aria-disabled="true"])`,Nr="cmdk-item-select",ot="data-value",ay=(e,t,n)=>Hg(e,t,n),Gl=i.createContext(void 0),$t=()=>i.useContext(Gl),Zl=i.createContext(void 0),Ao=()=>i.useContext(Zl),ql=i.createContext(void 0),Ql=i.forwardRef((e,t)=>{let n=st(()=>{var P,k;return{search:"",value:(k=(P=e.value)!=null?P:e.defaultValue)!=null?k:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=st(()=>new Set),o=st(()=>new Map),s=st(()=>new Map),l=st(()=>new Set),a=Jl(e),{label:d,children:u,value:p,onValueChange:m,filter:v,shouldFilter:x,loop:E,disablePointerSelection:f=!1,vimBindings:h=!0,...g}=e,y=fe(),w=fe(),R=fe(),C=i.useRef(null),S=gy();Xe(()=>{if(p!==void 0){let P=p.trim();n.current.value=P,b.emit()}},[p]),Xe(()=>{S(6,B)},[]);let b=i.useMemo(()=>({subscribe:P=>(l.current.add(P),()=>l.current.delete(P)),snapshot:()=>n.current,setState:(P,k,F)=>{var D,K,A,H;if(!Object.is(n.current[P],k)){if(n.current[P]=k,P==="search")U(),$(),S(1,_);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Y=document.getElementById(R);Y?Y.focus():(D=document.getElementById(y))==null||D.focus()}if(S(7,()=>{var Y;n.current.selectedItemId=(Y=T())==null?void 0:Y.id,b.emit()}),F||S(5,B),((K=a.current)==null?void 0:K.value)!==void 0){let Y=k??"";(H=(A=a.current).onValueChange)==null||H.call(A,Y);return}}b.emit()}},emit:()=>{l.current.forEach(P=>P())}}),[]),j=i.useMemo(()=>({value:(P,k,F)=>{var D;k!==((D=s.current.get(P))==null?void 0:D.value)&&(s.current.set(P,{value:k,keywords:F}),n.current.filtered.items.set(P,N(k,F)),S(2,()=>{$(),b.emit()}))},item:(P,k)=>(r.current.add(P),k&&(o.current.has(k)?o.current.get(k).add(P):o.current.set(k,new Set([P]))),S(3,()=>{U(),$(),n.current.value||_(),b.emit()}),()=>{s.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let F=T();S(4,()=>{U(),(F==null?void 0:F.getAttribute("id"))===P&&_(),b.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{s.current.delete(P),o.current.delete(P)}),filter:()=>a.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:R,labelId:w,listInnerRef:C}),[]);function N(P,k){var F,D;let K=(D=(F=a.current)==null?void 0:F.filter)!=null?D:ay;return P?K(P,n.current.search,k):0}function $(){if(!n.current.search||a.current.shouldFilter===!1)return;let P=n.current.filtered.items,k=[];n.current.filtered.groups.forEach(D=>{let K=o.current.get(D),A=0;K.forEach(H=>{let Y=P.get(H);A=Math.max(Y,A)}),k.push([D,A])});let F=C.current;W().sort((D,K)=>{var A,H;let Y=D.getAttribute("id"),X=K.getAttribute("id");return((A=P.get(X))!=null?A:0)-((H=P.get(Y))!=null?H:0)}).forEach(D=>{let K=D.closest(rr);K?K.appendChild(D.parentElement===K?D:D.closest(`${rr} > *`)):F.appendChild(D.parentElement===F?D:D.closest(`${rr} > *`))}),k.sort((D,K)=>K[1]-D[1]).forEach(D=>{var K;let A=(K=C.current)==null?void 0:K.querySelector(`${gt}[${ot}="${encodeURIComponent(D[0])}"]`);A==null||A.parentElement.appendChild(A)})}function _(){let P=W().find(F=>F.getAttribute("aria-disabled")!=="true"),k=P==null?void 0:P.getAttribute(ot);b.setState("value",k||void 0)}function U(){var P,k,F,D;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let K=0;for(let A of r.current){let H=(k=(P=s.current.get(A))==null?void 0:P.value)!=null?k:"",Y=(D=(F=s.current.get(A))==null?void 0:F.keywords)!=null?D:[],X=N(H,Y);n.current.filtered.items.set(A,X),X>0&&K++}for(let[A,H]of o.current)for(let Y of H)if(n.current.filtered.items.get(Y)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=K}function B(){var P,k,F;let D=T();D&&(((P=D.parentElement)==null?void 0:P.firstChild)===D&&((F=(k=D.closest(gt))==null?void 0:k.querySelector(iy))==null||F.scrollIntoView({block:"nearest"})),D.scrollIntoView({block:"nearest"}))}function T(){var P;return(P=C.current)==null?void 0:P.querySelector(`${Xl}[aria-selected="true"]`)}function W(){var P;return Array.from(((P=C.current)==null?void 0:P.querySelectorAll(As))||[])}function M(P){let k=W()[P];k&&b.setState("value",k.getAttribute(ot))}function L(P){var k;let F=T(),D=W(),K=D.findIndex(H=>H===F),A=D[K+P];(k=a.current)!=null&&k.loop&&(A=K+P<0?D[D.length-1]:K+P===D.length?D[0]:D[K+P]),A&&b.setState("value",A.getAttribute(ot))}function O(P){let k=T(),F=k==null?void 0:k.closest(gt),D;for(;F&&!D;)F=P>0?vy(F,gt):xy(F,gt),D=F==null?void 0:F.querySelector(As);D?b.setState("value",D.getAttribute(ot)):L(P)}let z=()=>M(W().length-1),re=P=>{P.preventDefault(),P.metaKey?z():P.altKey?O(1):L(1)},te=P=>{P.preventDefault(),P.metaKey?M(0):P.altKey?O(-1):L(-1)};return i.createElement(ae.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:P=>{var k;(k=g.onKeyDown)==null||k.call(g,P);let F=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||F))switch(P.key){case"n":case"j":{h&&P.ctrlKey&&re(P);break}case"ArrowDown":{re(P);break}case"p":case"k":{h&&P.ctrlKey&&te(P);break}case"ArrowUp":{te(P);break}case"Home":{P.preventDefault(),M(0);break}case"End":{P.preventDefault(),z();break}case"Enter":{P.preventDefault();let D=T();if(D){let K=new Event(Nr);D.dispatchEvent(K)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:Ey},d),On(e,P=>i.createElement(Zl.Provider,{value:b},i.createElement(Gl.Provider,{value:j},P))))}),cy=i.forwardRef((e,t)=>{var n,r;let o=fe(),s=i.useRef(null),l=i.useContext(ql),a=$t(),d=Jl(e),u=(r=(n=d.current)==null?void 0:n.forceMount)!=null?r:l==null?void 0:l.forceMount;Xe(()=>{if(!u)return a.item(o,l==null?void 0:l.id)},[u]);let p=eu(o,s,[e.value,e.children,s],e.keywords),m=Ao(),v=We(S=>S.value&&S.value===p.current),x=We(S=>u||a.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);i.useEffect(()=>{let S=s.current;if(!(!S||e.disabled))return S.addEventListener(Nr,E),()=>S.removeEventListener(Nr,E)},[x,e.onSelect,e.disabled]);function E(){var S,b;f(),(b=(S=d.current).onSelect)==null||b.call(S,p.current)}function f(){m.setState("value",p.current,!0)}if(!x)return null;let{disabled:h,value:g,onSelect:y,forceMount:w,keywords:R,...C}=e;return i.createElement(ae.div,{ref:ke(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!v,"data-disabled":!!h,"data-selected":!!v,onPointerMove:h||a.getDisablePointerSelection()?void 0:f,onClick:h?void 0:E},e.children)}),ly=i.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,l=fe(),a=i.useRef(null),d=i.useRef(null),u=fe(),p=$t(),m=We(x=>o||p.filter()===!1?!0:x.search?x.filtered.groups.has(l):!0);Xe(()=>p.group(l),[]),eu(l,a,[e.value,e.heading,d]);let v=i.useMemo(()=>({id:l,forceMount:o}),[o]);return i.createElement(ae.div,{ref:ke(a,t),...s,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&i.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),On(e,x=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},i.createElement(ql.Provider,{value:v},x))))}),uy=i.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=i.useRef(null),s=We(l=>!l.search);return!n&&!s?null:i.createElement(ae.div,{ref:ke(o,t),...r,"cmdk-separator":"",role:"separator"})}),dy=i.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=Ao(),l=We(u=>u.search),a=We(u=>u.selectedItemId),d=$t();return i.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),i.createElement(ae.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":a,id:d.inputId,type:"text",value:o?e.value:l,onChange:u=>{o||s.setState("search",u.target.value),n==null||n(u.target.value)}})}),fy=i.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=i.useRef(null),l=i.useRef(null),a=We(u=>u.selectedItemId),d=$t();return i.useEffect(()=>{if(l.current&&s.current){let u=l.current,p=s.current,m,v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let x=u.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return v.observe(u),()=>{cancelAnimationFrame(m),v.unobserve(u)}}},[]),i.createElement(ae.div,{ref:ke(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:d.listId},On(e,u=>i.createElement("div",{ref:ke(l,d.listInnerRef),"cmdk-list-sizer":""},u)))}),py=i.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:l,...a}=e;return i.createElement(ny,{open:n,onOpenChange:r},i.createElement(ry,{container:l},i.createElement(oy,{"cmdk-overlay":"",className:o}),i.createElement(sy,{"aria-label":e.label,"cmdk-dialog":"",className:s},i.createElement(Ql,{ref:t,...a}))))}),my=i.forwardRef((e,t)=>We(n=>n.filtered.count===0)?i.createElement(ae.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),hy=i.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return i.createElement(ae.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},On(e,l=>i.createElement("div",{"aria-hidden":!0},l)))}),ce=Object.assign(Ql,{List:fy,Item:cy,Input:dy,Group:ly,Separator:uy,Dialog:py,Empty:my,Loading:hy});function vy(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function xy(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Jl(e){let t=i.useRef(e);return Xe(()=>{t.current=e}),t}var Xe=typeof window>"u"?i.useEffect:i.useLayoutEffect;function st(e){let t=i.useRef();return t.current===void 0&&(t.current=e()),t}function We(e){let t=Ao(),n=()=>e(t.snapshot());return i.useSyncExternalStore(t.subscribe,n,n)}function eu(e,t,n,r=[]){let o=i.useRef(),s=$t();return Xe(()=>{var l;let a=(()=>{var u;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(u=p.current.textContent)==null?void 0:u.trim():o.current}})(),d=r.map(u=>u.trim());s.value(e,a,d),(l=t.current)==null||l.setAttribute(ot,a),o.current=a}),o}var gy=()=>{let[e,t]=i.useState(),n=st(()=>new Map);return Xe(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function yy(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function On({asChild:e,children:t},n){return e&&i.isValidElement(t)?i.cloneElement(yy(t),{ref:t.ref},n(t.props.children)):n(t)}var Ey={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const tu=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce,{ref:n,className:c.cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));tu.displayName=ce.displayName;const wy=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:c.jsxRuntimeExports.jsx(ce.Input,{ref:n,className:c.cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})}));wy.displayName=ce.Input.displayName;const $r=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.List,{ref:n,className:c.cn("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));$r.displayName=ce.List.displayName;const nu=i.forwardRef((e,t)=>c.jsxRuntimeExports.jsx(ce.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));nu.displayName=ce.Empty.displayName;const ru=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Group,{ref:n,className:c.cn("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));ru.displayName=ce.Group.displayName;const by=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Separator,{ref:n,className:c.cn("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t}));by.displayName=ce.Separator.displayName;const ou=i.forwardRef(({className:e,...t},n)=>c.jsxRuntimeExports.jsx(ce.Item,{ref:n,className:c.cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-6 [&_svg]:shrink-0 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50",e),...t}));ou.displayName=ce.Item.displayName;const Ry=Og,su=i.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>c.jsxRuntimeExports.jsx(Dg,{children:c.jsxRuntimeExports.jsx(Il,{ref:o,align:t,sideOffset:n,className:c.cn("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})}));su.displayName=Il.displayName;const Cy=I.styled(su)`
663
663
  width: var(--radix-popover-trigger-width);
664
664
  padding: 0.5rem;
665
665
  border-radius: 0.75rem;
@@ -684,7 +684,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
684
684
  &:focus {
685
685
  outline: none;
686
686
  }
687
- &:focus + ${wn} {
687
+ &:focus + ${bn} {
688
688
  height: 50%;
689
689
  transform: translateY(-5%);
690
690
  font-size: 0.75rem;
@@ -720,4 +720,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
720
720
  display: flex;
721
721
  justify-content: center;
722
722
  align-items: center;
723
- `;function Ny({selectedValue:e,setSelectedValue:t,value:n,onChange:r,options:o,isLoading:s,isError:l,label:a,errorText:d="Es ist ein Fehler aufgetreten",emptyText:u="Keine Ergebnisse gefunden",allowCustomValue:p=!0,...m}){const v=ee.useId(),[x,E]=ee.useState(!1),[f,h]=ee.useState(null),[g,y]=ee.useState(""),w=ee.useRef(null),R=j=>{var N;t(j),r(((N=o==null?void 0:o.find($=>$.value===j))==null?void 0:N.value)??""),E(!1),setTimeout(()=>{var $;return($=w.current)==null?void 0:$.focus()},0)},C=()=>{t(n),r(n),E(!1),setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)},S=o==null?void 0:o.some(j=>j.value.toLowerCase()===n.toLowerCase()||j.label.toLowerCase()===n.toLowerCase()),b=p&&n&&!S&&!s;return c.jsxRuntimeExports.jsxs(Ry,{open:x,onOpenChange:E,modal:!0,children:[c.jsxRuntimeExports.jsxs(Sy,{value:g,onValueChange:y,onKeyDown:j=>{if(f==="top"&&(j.key==="ArrowDown"||j.key==="ArrowUp")){j.preventDefault();const N=[...b?[n]:[],...(o==null?void 0:o.map(_=>_.value))||[]],$=N.indexOf(g);if(j.key==="ArrowDown"){const _=$>0?$-1:N.length-1;y(N[_]||"")}else if(j.key==="ArrowUp"){const _=$<N.length-1?$+1:0;y(N[_]||"")}}},children:[c.jsxRuntimeExports.jsx(Tl,{asChild:!0,children:c.jsxRuntimeExports.jsx(za,{$error:l,onClick:()=>{var j;(j=w.current)==null||j.focus(),E(!0)},children:c.jsxRuntimeExports.jsxs(Ka,{children:[c.jsxRuntimeExports.jsx(Py,{...m,ref:w,id:`${v}-${a}`,value:n,onKeyDown:j=>{j.key==="Backspace"&&t(""),j.key==="Enter"||j.key==="Escape"?E(!1):!x&&j.key!=="Tab"&&E(!0)},onValueChange:r,autoComplete:"new-password"}),c.jsxRuntimeExports.jsx(wn,{htmlFor:`${v}-${a}`,$hasValue:!!n,children:a})]})})}),!x&&c.jsxRuntimeExports.jsx(Nr,{"aria-hidden":"true",className:"hidden"}),c.jsxRuntimeExports.jsx(Cy,{ref:j=>{if(j){const N=j.getAttribute("data-side");N!==f&&h(N)}},asChild:!0,onOpenAutoFocus:j=>j.preventDefault(),onInteractOutside:j=>{j.target instanceof Element&&j.target.hasAttribute("cmdk-input")&&j.preventDefault()},children:c.jsxRuntimeExports.jsxs(Nr,{children:[!s&&c.jsxRuntimeExports.jsx(Ty,{children:u}),c.jsxRuntimeExports.jsxs(jy,{$reverse:f==="top",children:[b&&c.jsxRuntimeExports.jsx(Ns,{$isSelected:!1,value:n,onSelect:C,children:c.jsxRuntimeExports.jsx($s,{children:c.jsxRuntimeExports.jsxs("b",{children:['"',n,'"']})})}),s&&c.jsxRuntimeExports.jsx(Ay,{children:c.jsxRuntimeExports.jsx(Ya,{size:"1rem"})}),o&&o.map(j=>c.jsxRuntimeExports.jsx(Ns,{$isSelected:j.value===e,value:j.value,onSelect:R,children:c.jsxRuntimeExports.jsxs($s,{children:[j.label,j.value===e&&c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.fg.accent.action})]})},j.value))]})]})})]}),l&&c.jsxRuntimeExports.jsx($r,{error:l,children:d})]})}exports.colors=c.colors;exports.typography=c.typography;exports.Autocomplete=Ny;exports.Button=uu;exports.DatePicker=vu;exports.Dialog=Vd;exports.DialogContent=xi;exports.DialogDetails=Kd;exports.DialogHeader=qd;exports.Divider=Jd;exports.IconButton=Qt;exports.Input=hh;exports.Letter=Nf;exports.Loading=Ya;exports.Message=af;exports.MessageOption=lf;exports.Select=sh;exports.Skeleton=ah;exports.Spinner=Ds;exports.StatusIndicator=Ev;exports.Toaster=pv;exports.Tooltip=fx;exports.TooltipContent=el;exports.TooltipProvider=dx;exports.TooltipTrigger=px;exports.useIsMobile=sn;exports.useToast=Xa;
723
+ `;function Ny({selectedValue:e,setSelectedValue:t,value:n,onChange:r,options:o,isLoading:s,isError:l,label:a,errorText:d="Es ist ein Fehler aufgetreten",emptyText:u="Keine Ergebnisse gefunden",allowCustomValue:p=!0,...m}){const v=ee.useId(),[x,E]=ee.useState(!1),[f,h]=ee.useState(null),[g,y]=ee.useState(""),w=ee.useRef(null),R=j=>{var N;t(j),r(((N=o==null?void 0:o.find($=>$.value===j))==null?void 0:N.value)??""),E(!1),setTimeout(()=>{var $;return($=w.current)==null?void 0:$.focus()},0)},C=()=>{t(n),r(n),E(!1),setTimeout(()=>{var j;return(j=w.current)==null?void 0:j.focus()},0)},S=o==null?void 0:o.some(j=>j.value.toLowerCase()===n.toLowerCase()||j.label.toLowerCase()===n.toLowerCase()),b=p&&n&&!S&&!s;return c.jsxRuntimeExports.jsxs(Ry,{open:x,onOpenChange:E,modal:!0,children:[c.jsxRuntimeExports.jsxs(Sy,{value:g,onValueChange:y,onKeyDown:j=>{if(f==="top"&&(j.key==="ArrowDown"||j.key==="ArrowUp")){j.preventDefault();const N=[...b?[n]:[],...(o==null?void 0:o.map(_=>_.value))||[]],$=N.indexOf(g);if(j.key==="ArrowDown"){const _=$>0?$-1:N.length-1;y(N[_]||"")}else if(j.key==="ArrowUp"){const _=$<N.length-1?$+1:0;y(N[_]||"")}}},children:[c.jsxRuntimeExports.jsx(Tl,{asChild:!0,children:c.jsxRuntimeExports.jsx(za,{$error:l,onClick:()=>{var j;(j=w.current)==null||j.focus(),E(!0)},children:c.jsxRuntimeExports.jsxs(Ka,{children:[c.jsxRuntimeExports.jsx(Py,{...m,ref:w,id:`${v}-${a}`,value:n,onKeyDown:j=>{j.key==="Backspace"&&t(""),j.key==="Enter"||j.key==="Escape"?E(!1):!x&&j.key!=="Tab"&&E(!0)},onValueChange:r,autoComplete:"new-password"}),c.jsxRuntimeExports.jsx(bn,{htmlFor:`${v}-${a}`,$hasValue:!!n,children:a})]})})}),!x&&c.jsxRuntimeExports.jsx($r,{"aria-hidden":"true",className:"hidden"}),c.jsxRuntimeExports.jsx(Cy,{ref:j=>{if(j){const N=j.getAttribute("data-side");N!==f&&h(N)}},asChild:!0,onOpenAutoFocus:j=>j.preventDefault(),onInteractOutside:j=>{j.target instanceof Element&&j.target.hasAttribute("cmdk-input")&&j.preventDefault()},children:c.jsxRuntimeExports.jsxs($r,{children:[!s&&c.jsxRuntimeExports.jsx(Ty,{children:u}),c.jsxRuntimeExports.jsxs(jy,{$reverse:f==="top",children:[b&&c.jsxRuntimeExports.jsx(Ns,{$isSelected:!1,value:n,onSelect:C,children:c.jsxRuntimeExports.jsx($s,{children:c.jsxRuntimeExports.jsxs("b",{children:['"',n,'"']})})}),s&&c.jsxRuntimeExports.jsx(Ay,{children:c.jsxRuntimeExports.jsx(Ya,{size:"1rem"})}),o&&o.map(j=>c.jsxRuntimeExports.jsx(Ns,{$isSelected:j.value===e,value:j.value,onSelect:R,children:c.jsxRuntimeExports.jsxs($s,{children:[j.label,j.value===e&&c.jsxRuntimeExports.jsx(c.Check,{color:c.colors.fg.accent.action})]})},j.value))]})]})})]}),l&&c.jsxRuntimeExports.jsx(an,{error:l,children:d})]})}exports.colors=c.colors;exports.typography=c.typography;exports.Autocomplete=Ny;exports.Button=uu;exports.DatePicker=vu;exports.Dialog=Vd;exports.DialogContent=xi;exports.DialogDetails=Kd;exports.DialogHeader=qd;exports.Divider=Jd;exports.Helper=an;exports.IconButton=Qt;exports.Input=hh;exports.Letter=Nf;exports.Loading=Ya;exports.Message=af;exports.MessageOption=lf;exports.Select=sh;exports.Skeleton=ah;exports.Spinner=Ds;exports.StatusIndicator=Ev;exports.Toaster=pv;exports.Tooltip=fx;exports.TooltipContent=el;exports.TooltipProvider=dx;exports.TooltipTrigger=px;exports.useIsMobile=sn;exports.useToast=Xa;