@qodo/design-system 0.17.3 → 0.17.4
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/design-system.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -152,7 +152,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Yg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",Yg),Ji=wn("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:j(Ji({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(Xi,{className:"ml-2 w-4 h-4 animate-spin"})]}));Qe.displayName="Button";const Xg=wn("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),Rr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:j(Xg({variant:t,className:e})),...o}));Rr.displayName="Input";function Ps(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Zg(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,d=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function we(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),d=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[d])||l,h=c.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:h,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[d])||l,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const d=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[n,Jg(o,...t)]}function Jg(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:d,scopeName:u})=>{const p=d(a)[`__scope${u}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function js(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let r=!1;const n=e.map(o=>{const a=js(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():js(e[o],null)}}}}function se(...e){return c.useCallback(et(...e),e)}function it(e){const t=ev(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),d=l.find(rv);if(d){const u=d.props.children,f=l.map(p=>p===d?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Qg=it("Slot");function ev(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=ov(o),l=nv(a,o.props);return o.type!==c.Fragment&&(l.ref=n?et(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qi=Symbol("radix.slottable");function tv(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qi,t}function rv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qi}function nv(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const d=a(...l);return o(...l),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ov(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function En(e){const t=e+"CollectionProvider",[r,n]=we(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:h,children:y}=v,x=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:h,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=it(l),u=S.forwardRef((v,h)=>{const{scope:y,children:x}=v,C=a(l,y),E=se(h,C.collectionRef);return s.jsx(d,{ref:E,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=it(f),m=S.forwardRef((v,h)=>{const{scope:y,children:x,...C}=v,E=S.useRef(null),N=se(h,E),T=a(f,y);return S.useEffect(()=>(T.itemMap.set(E,{ref:E,...C}),()=>void T.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:N,children:x})});m.displayName=f;function b(v){const h=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((T,A)=>C.indexOf(T.ref.current)-C.indexOf(A.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var av=c.createContext(void 0);function Tt(e){const t=c.useContext(av);return e||t||"ltr"}var sv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=sv.reduce((e,t)=>{const r=it(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function el(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function iv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var lv="DismissableLayer",To="dismissableLayer.update",cv="dismissableLayer.pointerDownOutside",dv="dismissableLayer.focusOutside",Ns,tl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...d}=e,u=c.useContext(tl),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,A=>p(A)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(h),x=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,N=pv(A=>{const P=A.target,V=[...u.branches].some(U=>U.contains(P));!E||V||(o==null||o(A),i==null||i(A),A.defaultPrevented||l==null||l())},g),T=mv(A=>{const P=A.target;[...u.branches].some(U=>U.contains(P))||(a==null||a(A),i==null||i(A),A.defaultPrevented||l==null||l())},g);return iv(A=>{x===u.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ns=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ks(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ns)}},[f,g,r,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ks())},[f,u]),c.useEffect(()=>{const A=()=>m({});return document.addEventListener(To,A),()=>document.removeEventListener(To,A)},[]),s.jsx(H.div,{...d,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,T.onFocusCapture),onBlurCapture:F(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,N.onPointerDownCapture)})});Qt.displayName=lv;var uv="DismissableLayerBranch",fv=c.forwardRef((e,t)=>{const r=c.useContext(tl),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(H.div,{...e,ref:o})});fv.displayName=uv;function pv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){rl(cv,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function mv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&rl(dv,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ks(){const e=new CustomEvent(To);document.dispatchEvent(e)}function rl(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?el(o,a):o.dispatchEvent(a)}var io=0;function Rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ts()),document.body.insertAdjacentElement("beforeend",e[1]??Ts()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Ts(){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 lo="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",As={bubbles:!1,cancelable:!0},gv="FocusScope",Pr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,d]=c.useState(null),u=De(o),f=De(a),p=c.useRef(null),g=se(t,v=>d(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:st(p.current,{select:!0})},h=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||st(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&st(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),x.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){Is.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(lo,As);l.addEventListener(lo,u),l.dispatchEvent(y),y.defaultPrevented||(vv(wv(nl(l)),{select:!0}),document.activeElement===v&&st(l))}return()=>{l.removeEventListener(lo,u),setTimeout(()=>{const y=new CustomEvent(co,As);l.addEventListener(co,f),l.dispatchEvent(y),y.defaultPrevented||st(v??document.body,{select:!0}),l.removeEventListener(co,f),Is.remove(m)},0)}}},[l,u,f,m]);const b=c.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(h&&y){const x=v.currentTarget,[C,E]=hv(x);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&st(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&st(E,{select:!0})):y===x&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(H.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Pr.displayName=gv;function vv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(st(n,{select:t}),document.activeElement!==r)return}function hv(e){const t=nl(e),r=_s(t,e),n=_s(t.reverse(),e);return[r,n]}function nl(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _s(e,t){for(const r of e)if(!xv(r,{upTo:t}))return r}function xv(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 bv(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bv(e)&&t&&e.select()}}var Is=yv();function yv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ms(e,t),e.unshift(t)},remove(t){var r;e=Ms(e,t),(r=e[0])==null||r.resume()}}}function Ms(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function wv(e){return e.filter(t=>t.tagName!=="A")}var be=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Cv=c[" useId ".trim().toString()]||(()=>{}),Sv=0;function me(e){const[t,r]=c.useState(Cv());return be(()=>{r(n=>n??String(Sv++))},[e]),t?`radix-${t}`:""}const Ev=["top","right","bottom","left"],lt=Math.min,Ne=Math.max,on=Math.round,Hr=Math.floor,He=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Pv={start:"end",end:"start"};function Ao(e,t,r){return Ne(e,lt(t,r))}function tt(e,t){return typeof e=="function"?e(t):e}function rt(e){return e.split("-")[0]}function er(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const jv=new Set(["top","bottom"]);function Ue(e){return jv.has(rt(e))?"y":"x"}function na(e){return ta(Ue(e))}function Nv(e,t,r){r===void 0&&(r=!1);const n=er(e),o=na(e),a=ra(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=an(i)),[i,an(i)]}function kv(e){const t=an(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Pv[t])}const Os=["left","right"],Ds=["right","left"],Tv=["top","bottom"],Av=["bottom","top"];function _v(e,t,r){switch(e){case"top":case"bottom":return r?t?Ds:Os:t?Os:Ds;case"left":case"right":return t?Tv:Av;default:return[]}}function Iv(e,t,r,n){const o=er(e);let a=_v(rt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(_o)))),a}function an(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function Mv(e){return{top:0,right:0,bottom:0,left:0,...e}}function ol(e){return typeof e!="number"?Mv(e):{top:e,right:e,bottom:e,left:e}}function sn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function $s(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=na(t),l=ra(i),d=rt(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(d){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(er(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const Ov=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=$s(u,n,d),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:h,fn:y}=l[v],{x,y:C,data:E,reset:N}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,m={...m,[h]:{...m[h],...E}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:p}=$s(u,g,d)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function xr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=tt(t,e),b=ol(m),h=l[g?p==="floating"?"reference":"floating":p],y=sn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),x=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},N=sn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:d}):x);return{top:(y.top-N.top+b.top)/E.y,bottom:(N.bottom-y.bottom+b.bottom)/E.y,left:(y.left-N.left+b.left)/E.x,right:(N.right-y.right+b.right)/E.x}}const Dv=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=tt(e,t)||{};if(u==null)return{};const p=ol(f),g={x:r,y:n},m=na(o),b=ra(m),v=await i.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",C=h?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],N=g[m]-a.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let A=T?T[C]:0;(!A||!await(i.isElement==null?void 0:i.isElement(T)))&&(A=l.floating[C]||a.floating[b]);const P=E/2-N/2,V=A/2-v[b]/2-1,U=lt(p[y],V),re=lt(p[x],V),te=U,Q=A-v[b]-re,W=A/2-v[b]/2+P,D=Ao(te,W,Q),I=!d.arrow&&er(o)!=null&&W!==D&&a.reference[b]/2-(W<te?U:re)-v[b]/2<0,O=I?W<te?W-te:W-Q:0;return{[m]:g[m]+O,data:{[m]:D,centerOffset:W-D-O,...I&&{alignmentOffset:O}},reset:I}}}),$v=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=tt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rt(o),x=Ue(l),C=rt(l)===l,E=await(d.isRTL==null?void 0:d.isRTL(u.floating)),N=g||(C||!v?[an(l)]:kv(l)),T=b!=="none";!g&&T&&N.push(...Iv(l,v,b,E));const A=[l,...N],P=await xr(t,h),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(P[y]),p){const W=Nv(o,i,E);V.push(P[W[0]],P[W[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(W=>W<=0)){var re,te;const W=(((re=a.flip)==null?void 0:re.index)||0)+1,D=A[W];if(D&&(!(p==="alignment"?x!==Ue(D):!1)||U.every(R=>Ue(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:D}};let I=(te=U.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const O=(Q=U.filter(R=>{if(T){const M=Ue(R.placement);return M===x||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:Q[0];O&&(I=O);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fs(e){return Ev.some(t=>e[t]>=0)}const Lv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=tt(e,t);switch(n){case"referenceHidden":{const a=await xr(t,{...o,elementContext:"reference"}),i=Ls(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fs(i)}}}case"escaped":{const a=await xr(t,{...o,altBoundary:!0}),i=Ls(a,r.floating);return{data:{escapedOffsets:i,escaped:Fs(i)}}}default:return{}}}}},al=new Set(["left","top"]);async function Fv(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=rt(r),l=er(r),d=Ue(r)==="y",u=al.has(i)?-1:1,f=a&&d?-1:1,p=tt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),d?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const Vv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,d=await Fv(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:i}}}}},Bv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...d}=tt(e,t),u={x:r,y:n},f=await xr(t,d),p=Ue(rt(o)),g=ta(p);let m=u[g],b=u[p];if(a){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],C=m-f[y];m=Ao(x,m,C)}if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],C=b-f[y];b=Ao(x,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},Gv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=tt(e,t),f={x:r,y:n},p=Ue(o),g=ta(p);let m=f[g],b=f[p];const v=tt(l,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(d){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+h.mainAxis,N=a.reference[g]+a.reference[C]-h.mainAxis;m<E?m=E:m>N&&(m=N)}if(u){var y,x;const C=g==="y"?"width":"height",E=al.has(rt(o)),N=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:h.crossAxis),T=a.reference[p]+a.reference[C]+(E?0:((x=i.offset)==null?void 0:x[p])||0)-(E?h.crossAxis:0);b<N?b=N:b>T&&(b=T)}return{[g]:m,[p]:b}}}},Wv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:d=()=>{},...u}=tt(e,t),f=await xr(t,u),p=rt(o),g=er(o),m=Ue(o)==="y",{width:b,height:v}=a.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,C=b-f.left-f.right,E=lt(v-f[h],x),N=lt(b-f[y],C),T=!t.middlewareData.shift;let A=E,P=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=x),T&&!g){const U=Ne(f.left,0),re=Ne(f.right,0),te=Ne(f.top,0),Q=Ne(f.bottom,0);m?P=b-2*(U!==0||re!==0?U+re:Ne(f.left,f.right)):A=v-2*(te!==0||Q!==0?te+Q:Ne(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:A});const V=await i.getDimensions(l.floating);return b!==V.width||v!==V.height?{reset:{rects:!0}}:{}}}};function Pn(){return typeof window<"u"}function tr(e){return sl(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sl(e){return Pn()?e instanceof Node||e instanceof ke(e).Node:!1}function $e(e){return Pn()?e instanceof Element||e instanceof ke(e).Element:!1}function Ke(e){return Pn()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function Vs(e){return!Pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}const zv=new Set(["inline","contents"]);function jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!zv.has(o)}const qv=new Set(["table","td","th"]);function Uv(e){return qv.has(tr(e))}const Hv=[":popover-open",":modal"];function jn(e){return Hv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kv=["transform","translate","scale","rotate","perspective"],Yv=["transform","translate","scale","rotate","perspective","filter"],Xv=["paint","layout","strict","content"];function oa(e){const t=aa(),r=$e(e)?Le(e):e;return Kv.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Yv.some(n=>(r.willChange||"").includes(n))||Xv.some(n=>(r.contain||"").includes(n))}function Zv(e){let t=ct(e);for(;Ke(t)&&!Ht(t);){if(oa(t))return t;if(jn(t))return null;t=ct(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jv=new Set(["html","body","#document"]);function Ht(e){return Jv.has(tr(e))}function Le(e){return ke(e).getComputedStyle(e)}function Nn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ye(e);return Vs(t)?t.host:t}function il(e){const t=ct(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&jr(t)?t:il(t)}function br(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=il(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ke(o);if(a){const l=Io(i);return t.concat(i,i.visualViewport||[],jr(o)?o:[],l&&r?br(l):[])}return t.concat(o,br(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ll(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=on(r)!==a||on(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function sa(e){return $e(e)?e:e.contextElement}function qt(e){const t=sa(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ll(t);let i=(a?on(r.width):r.width)/n,l=(a?on(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Qv=He(0);function cl(e){const t=ke(e);return!aa()||!t.visualViewport?Qv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ke(e)?!1:t}function Et(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=sa(e);let i=He(1);t&&(n?$e(n)&&(i=qt(n)):i=qt(e));const l=eh(a,r,n)?cl(a):He(0);let d=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=ke(a),m=n&&$e(n)?ke(n):n;let b=g,v=Io(b);for(;v&&n&&m!==b;){const h=qt(v),y=v.getBoundingClientRect(),x=Le(v),C=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,E=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=C,u+=E,b=ke(v),v=Io(b)}}return sn({width:f,height:p,x:d,y:u})}function kn(e,t){const r=Nn(e).scrollLeft;return t?t.left+r:Et(Ye(e)).left+r}function dl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-kn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function th(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?jn(t.floating):!1;if(n===i||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((tr(n)!=="body"||jr(i))&&(d=Nn(n)),Ke(n))){const m=Et(n);u=qt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?dl(i,d):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-d.scrollTop*u.y+f.y+g.y}}function rh(e){return Array.from(e.getClientRects())}function nh(e){const t=Ye(e),r=Nn(e),n=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+kn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Ne(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Bs=25;function oh(e,t){const r=ke(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,d=0;if(o){a=o.width,i=o.height;const f=aa();(!f||f&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const u=kn(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Bs&&(a-=b)}else u<=Bs&&(a+=u);return{width:a,height:i,x:l,y:d}}const ah=new Set(["absolute","fixed"]);function sh(e,t){const r=Et(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?qt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,u=n*a.y;return{width:i,height:l,x:d,y:u}}function Gs(e,t,r){let n;if(t==="viewport")n=oh(e,r);else if(t==="document")n=nh(Ye(e));else if($e(t))n=sh(t,r);else{const o=cl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(n)}function ul(e,t){const r=ct(e);return r===t||!$e(r)||Ht(r)?!1:Le(r).position==="fixed"||ul(r,t)}function ih(e,t){const r=t.get(e);if(r)return r;let n=br(e,[],!1).filter(l=>$e(l)&&tr(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ct(e):e;for(;$e(i)&&!Ht(i);){const l=Le(i),d=oa(i);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&ah.has(o.position)||jr(i)&&!d&&ul(e,i))?n=n.filter(f=>f!==i):o=l,i=ct(i)}return t.set(e,n),n}function lh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?jn(t)?[]:ih(t,this._c):[].concat(r),n],l=i[0],d=i.reduce((u,f)=>{const p=Gs(t,f,o);return u.top=Ne(p.top,u.top),u.right=lt(p.right,u.right),u.bottom=lt(p.bottom,u.bottom),u.left=Ne(p.left,u.left),u},Gs(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ch(e){const{width:t,height:r}=ll(e);return{width:t,height:r}}function dh(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=Et(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=He(0);function u(){d.x=kn(o)}if(n||!n&&!a)if((tr(t)!=="body"||jr(o))&&(l=Nn(t)),n){const m=Et(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?dl(o,l):He(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function uo(e){return Le(e).position==="static"}function Ws(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function fl(e,t){const r=ke(e);if(jn(e))return r;if(!Ke(e)){let o=ct(e);for(;o&&!Ht(o);){if($e(o)&&!uo(o))return o;o=ct(o)}return r}let n=Ws(e,t);for(;n&&Uv(n)&&uo(n);)n=Ws(n,t);return n&&Ht(n)&&uo(n)&&!oa(n)?r:n||Zv(e)||r}const uh=async function(e){const t=this.getOffsetParent||fl,r=this.getDimensions,n=await r(e.floating);return{reference:dh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fh(e){return Le(e).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:th,getDocumentElement:Ye,getClippingRect:lh,getOffsetParent:fl,getElementRects:uh,getClientRects:rh,getDimensions:ch,getScale:qt,isElement:$e,isRTL:fh};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mh(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Hr(p),v=Hr(o.clientWidth-(f+g)),h=Hr(o.clientHeight-(p+m)),y=Hr(f),C={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:Ne(0,lt(1,d))||1};let E=!0;function N(T){const A=T[0].intersectionRatio;if(A!==d){if(!E)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!pl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(N,C)}r.observe(e)}return i(!0),a}function gh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=sa(e),f=o||a?[...u?br(u):[],...br(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?mh(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!d&&m.observe(u),m.observe(t));let b,v=d?Et(e):null;d&&h();function h(){const y=Et(e);v&&!pl(v,y)&&r(),v=y,b=requestAnimationFrame(h)}return r(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(b)}}const vh=Vv,hh=Bv,xh=$v,bh=Wv,yh=Lv,zs=Dv,wh=Gv,Ch=(e,t,r)=>{const n=new Map,o={platform:ph,...r},a={...o.platform,_c:n};return Ov(e,t,{...o,platform:a})};var Sh=typeof document<"u",Eh=function(){},en=Sh?S.useLayoutEffect:Eh;function ln(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ln(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ln(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ml(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(e,t){const r=ml(e);return Math.round(t*r)/r}function fo(e){const t=c.useRef(e);return en(()=>{t.current=e}),t}function Rh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);ln(g,n)||m(n);const[b,v]=c.useState(null),[h,y]=c.useState(null),x=c.useCallback(R=>{R!==T.current&&(T.current=R,v(R))},[]),C=c.useCallback(R=>{R!==A.current&&(A.current=R,y(R))},[]),E=a||b,N=i||h,T=c.useRef(null),A=c.useRef(null),P=c.useRef(f),V=d!=null,U=fo(d),re=fo(o),te=fo(u),Q=c.useCallback(()=>{if(!T.current||!A.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),Ch(T.current,A.current,R).then(M=>{const B={...M,isPositioned:te.current!==!1};W.current&&!ln(P.current,B)&&(P.current=B,yn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const W=c.useRef(!1);en(()=>(W.current=!0,()=>{W.current=!1}),[]),en(()=>{if(E&&(T.current=E),N&&(A.current=N),E&&N){if(U.current)return U.current(E,N,Q);Q()}},[E,N,Q,U,V]);const D=c.useMemo(()=>({reference:T,floating:A,setReference:x,setFloating:C}),[x,C]),I=c.useMemo(()=>({reference:E,floating:N}),[E,N]),O=c.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const M=qs(I.floating,f.x),B=qs(I.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+B+"px)",...ml(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Q,refs:D,elements:I,floatingStyles:O}),[f,Q,D,I,O])}const Ph=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?zs({element:n.current,padding:o}).fn(r):{}:n?zs({element:n,padding:o}).fn(r):{}}}},jh=(e,t)=>({...vh(e),options:[e,t]}),Nh=(e,t)=>({...hh(e),options:[e,t]}),kh=(e,t)=>({...wh(e),options:[e,t]}),Th=(e,t)=>({...xh(e),options:[e,t]}),Ah=(e,t)=>({...bh(e),options:[e,t]}),_h=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...Ph(e),options:[e,t]});var Mh="Arrow",gl=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(H.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});gl.displayName=Mh;var Oh=gl;function ia(e){const[t,r]=c.useState(void 0);return be(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var la="Popper",[vl,ut]=we(la),[Dh,hl]=vl(la),xl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(Dh,{scope:t,anchor:n,onAnchorChange:o,children:r})};xl.displayName=la;var bl="PopperAnchor",yl=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=hl(bl,r),i=c.useRef(null),l=se(t,i),d=c.useRef(null);return c.useEffect(()=>{const u=d.current;d.current=(n==null?void 0:n.current)||i.current,u!==d.current&&a.onAnchorChange(d.current)}),n?null:s.jsx(H.div,{...o,ref:l})});yl.displayName=bl;var ca="PopperContent",[$h,Lh]=vl(ca),wl=c.forwardRef((e,t)=>{var _,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=hl(ca,r),[y,x]=c.useState(null),C=se(t,Se=>x(Se)),[E,N]=c.useState(null),T=ia(E),A=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(Vh),altBoundary:te},{refs:W,floatingStyles:D,placement:I,isPositioned:O,middlewareData:R}=Rh({strategy:"fixed",placement:V,whileElementsMounted:(...Se)=>gh(...Se,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[jh({mainAxis:o+P,alignmentAxis:i}),d&&Nh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?kh():void 0,...Q}),d&&Th({...Q}),Ah({...Q,apply:({elements:Se,rects:Te,availableWidth:Ge,availableHeight:Me})=>{const{width:ot,height:Wr}=Te.reference,Ze=Se.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${ot}px`),Ze.setProperty("--radix-popper-anchor-height",`${Wr}px`)}}),E&&Ih({element:E,padding:l}),Bh({arrowWidth:A,arrowHeight:P}),g&&_h({strategy:"referenceHidden",...Q})]}),[M,B]=El(I),J=De(b);be(()=>{O&&(J==null||J())},[O,J]);const k=(_=R.arrow)==null?void 0:_.x,G=(K=R.arrow)==null?void 0:K.y,Z=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=c.useState();return be(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:O?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx($h,{scope:r,placedSide:M,onArrowChange:N,arrowX:k,arrowY:G,shouldHideArrow:Z,children:s.jsx(H.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:O?void 0:"none"}})})})});wl.displayName=ca;var Cl="PopperArrow",Fh={top:"bottom",right:"left",bottom:"top",left:"right"},Sl=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Lh(Cl,n),i=Fh[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Oh,{...o,ref:r,style:{...o.style,display:"block"}})})});Sl.displayName=Cl;function Vh(e){return e!==null}var Bh=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:r,rects:n,middlewareData:o}=t,i=((h=o.arrow)==null?void 0:h.centerOffset)!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=El(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+d/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-d}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+d}px`):u==="right"?(b=`${-d}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+d}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function El(e){const[t,r="center"]=e.split("-");return[t,r]}var Nr=xl,kr=yl,Tn=wl,An=Sl,Gh="Portal",rr=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);be(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Sr.createPortal(s.jsx(H.div,{...n,ref:t}),i):null});rr.displayName=Gh;var Wh=c[" useInsertionEffect ".trim().toString()]||be;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=zh({defaultProp:t,onChange:r}),l=e!==void 0,d=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,n])}const u=c.useCallback(f=>{var p;if(l){const g=qh(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[d,u]}function zh({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return Wh(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function qh(e){return typeof e=="function"}function da(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Rl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Uh="VisuallyHidden",Pl=c.forwardRef((e,t)=>s.jsx(H.span,{...e,ref:t,style:{...Rl,...e.style}}));Pl.displayName=Uh;var Hh=Pl,Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Kr=new WeakMap,Yr={},po=0,jl=function(e){return e&&(e.host||jl(e.parentNode))},Yh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=jl(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xh=function(e,t,r,n){var o=Yh(t,Array.isArray(e)?e:[e]);Yr[r]||(Yr[r]=new WeakMap);var a=Yr[r],i=[],l=new Set,d=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=($t.get(g)||0)+1,h=(a.get(g)||0)+1;$t.set(g,v),a.set(g,h),i.push(g),v===1&&b&&Kr.set(g,!0),h===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),po++,function(){i.forEach(function(p){var g=$t.get(p)-1,m=a.get(p)-1;$t.set(p,g),a.set(p,m),g||(Kr.has(p)||p.removeAttribute(n),Kr.delete(p)),m||p.removeAttribute(r)}),po--,po||($t=new WeakMap,$t=new WeakMap,Kr=new WeakMap,Yr={})}},_n=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Kh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Xh(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function Nl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Zh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var tn="right-scroll-bar-position",rn="width-before-scroll-bar",Jh="with-scroll-bars-hidden",Qh="--removed-body-scroll-bar-size";function mo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ex(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var tx=typeof window<"u"?c.useLayoutEffect:c.useEffect,Us=new WeakMap;function rx(e,t){var r=ex(null,function(n){return e.forEach(function(o){return mo(o,n)})});return tx(function(){var n=Us.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||mo(l,null)}),a.forEach(function(l){o.has(l)||mo(l,i)})}Us.set(r,e)},[e]),r}function nx(e){return e}function ox(e,t){t===void 0&&(t=nx);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var d=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function ax(e){e===void 0&&(e={});var t=ox(null);return t.options=qe({async:!0,ssr:!1},e),t}var kl=function(e){var t=e.sideCar,r=Nl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,qe({},r))};kl.isSideCarExport=!0;function sx(e,t){return e.useMedium(t),kl}var Tl=ax(),go=function(){},In=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:go,onWheelCapture:go,onTouchMoveCapture:go}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,E=Nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,T=rx([r,t]),A=qe(qe({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(N,{sideCar:Tl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),qe(qe({},A),{ref:T})):c.createElement(x,qe({},A,{className:d,ref:T}),l))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:rn,zeroRight:tn};var ix=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ix();return t&&e.setAttribute("nonce",t),e}function cx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ux=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lx())&&(cx(t,r),dx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fx=function(){var e=ux();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Al=function(){var e=fx(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},px={left:0,top:0,right:0,gap:0},vo=function(e){return parseInt(e||"",10)||0},mx=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vo(r),vo(n),vo(o)]},gx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return px;var t=mx(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},vx=Al(),Ut="data-scroll-locked",hx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
155
|
+
*/const Yg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",Yg),Ji=wn("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:j(Ji({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(Xi,{className:"ml-2 w-4 h-4 animate-spin"})]}));Qe.displayName="Button";const Xg=wn("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),Rr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:j(Xg({variant:t,className:e})),...o}));Rr.displayName="Input";function Ps(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Zg(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,d=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function we(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),d=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[d])||l,h=c.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:h,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[d])||l,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const d=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[n,Jg(o,...t)]}function Jg(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:d,scopeName:u})=>{const p=d(a)[`__scope${u}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function js(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let r=!1;const n=e.map(o=>{const a=js(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():js(e[o],null)}}}}function se(...e){return c.useCallback(et(...e),e)}function it(e){const t=ev(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),d=l.find(rv);if(d){const u=d.props.children,f=l.map(p=>p===d?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Qg=it("Slot");function ev(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=ov(o),l=nv(a,o.props);return o.type!==c.Fragment&&(l.ref=n?et(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qi=Symbol("radix.slottable");function tv(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qi,t}function rv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qi}function nv(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{const d=a(...l);return o(...l),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ov(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function En(e){const t=e+"CollectionProvider",[r,n]=we(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:h,children:y}=v,x=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:h,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=it(l),u=S.forwardRef((v,h)=>{const{scope:y,children:x}=v,C=a(l,y),E=se(h,C.collectionRef);return s.jsx(d,{ref:E,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=it(f),m=S.forwardRef((v,h)=>{const{scope:y,children:x,...C}=v,E=S.useRef(null),N=se(h,E),T=a(f,y);return S.useEffect(()=>(T.itemMap.set(E,{ref:E,...C}),()=>void T.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:N,children:x})});m.displayName=f;function b(v){const h=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((T,A)=>C.indexOf(T.ref.current)-C.indexOf(A.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var av=c.createContext(void 0);function Tt(e){const t=c.useContext(av);return e||t||"ltr"}var sv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=sv.reduce((e,t)=>{const r=it(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function el(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function iv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var lv="DismissableLayer",To="dismissableLayer.update",cv="dismissableLayer.pointerDownOutside",dv="dismissableLayer.focusOutside",Ns,tl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...d}=e,u=c.useContext(tl),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,A=>p(A)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(h),x=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,N=pv(A=>{const P=A.target,V=[...u.branches].some(U=>U.contains(P));!E||V||(o==null||o(A),i==null||i(A),A.defaultPrevented||l==null||l())},g),T=mv(A=>{const P=A.target;[...u.branches].some(U=>U.contains(P))||(a==null||a(A),i==null||i(A),A.defaultPrevented||l==null||l())},g);return iv(A=>{x===u.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ns=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ks(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ns)}},[f,g,r,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ks())},[f,u]),c.useEffect(()=>{const A=()=>m({});return document.addEventListener(To,A),()=>document.removeEventListener(To,A)},[]),s.jsx(H.div,{...d,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,T.onFocusCapture),onBlurCapture:F(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,N.onPointerDownCapture)})});Qt.displayName=lv;var uv="DismissableLayerBranch",fv=c.forwardRef((e,t)=>{const r=c.useContext(tl),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(H.div,{...e,ref:o})});fv.displayName=uv;function pv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){rl(cv,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function mv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&rl(dv,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ks(){const e=new CustomEvent(To);document.dispatchEvent(e)}function rl(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?el(o,a):o.dispatchEvent(a)}var io=0;function Rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ts()),document.body.insertAdjacentElement("beforeend",e[1]??Ts()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Ts(){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 lo="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",As={bubbles:!1,cancelable:!0},gv="FocusScope",Pr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,d]=c.useState(null),u=De(o),f=De(a),p=c.useRef(null),g=se(t,v=>d(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:st(p.current,{select:!0})},h=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||st(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&st(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),x.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){Is.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(lo,As);l.addEventListener(lo,u),l.dispatchEvent(y),y.defaultPrevented||(vv(wv(nl(l)),{select:!0}),document.activeElement===v&&st(l))}return()=>{l.removeEventListener(lo,u),setTimeout(()=>{const y=new CustomEvent(co,As);l.addEventListener(co,f),l.dispatchEvent(y),y.defaultPrevented||st(v??document.body,{select:!0}),l.removeEventListener(co,f),Is.remove(m)},0)}}},[l,u,f,m]);const b=c.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(h&&y){const x=v.currentTarget,[C,E]=hv(x);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&st(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&st(E,{select:!0})):y===x&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(H.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Pr.displayName=gv;function vv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(st(n,{select:t}),document.activeElement!==r)return}function hv(e){const t=nl(e),r=_s(t,e),n=_s(t.reverse(),e);return[r,n]}function nl(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _s(e,t){for(const r of e)if(!xv(r,{upTo:t}))return r}function xv(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 bv(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bv(e)&&t&&e.select()}}var Is=yv();function yv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ms(e,t),e.unshift(t)},remove(t){var r;e=Ms(e,t),(r=e[0])==null||r.resume()}}}function Ms(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function wv(e){return e.filter(t=>t.tagName!=="A")}var be=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Cv=c[" useId ".trim().toString()]||(()=>{}),Sv=0;function me(e){const[t,r]=c.useState(Cv());return be(()=>{r(n=>n??String(Sv++))},[e]),t?`radix-${t}`:""}const Ev=["top","right","bottom","left"],lt=Math.min,Ne=Math.max,on=Math.round,Hr=Math.floor,He=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Pv={start:"end",end:"start"};function Ao(e,t,r){return Ne(e,lt(t,r))}function tt(e,t){return typeof e=="function"?e(t):e}function rt(e){return e.split("-")[0]}function er(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const jv=new Set(["top","bottom"]);function Ue(e){return jv.has(rt(e))?"y":"x"}function na(e){return ta(Ue(e))}function Nv(e,t,r){r===void 0&&(r=!1);const n=er(e),o=na(e),a=ra(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=an(i)),[i,an(i)]}function kv(e){const t=an(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Pv[t])}const Os=["left","right"],Ds=["right","left"],Tv=["top","bottom"],Av=["bottom","top"];function _v(e,t,r){switch(e){case"top":case"bottom":return r?t?Ds:Os:t?Os:Ds;case"left":case"right":return t?Tv:Av;default:return[]}}function Iv(e,t,r,n){const o=er(e);let a=_v(rt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(_o)))),a}function an(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function Mv(e){return{top:0,right:0,bottom:0,left:0,...e}}function ol(e){return typeof e!="number"?Mv(e):{top:e,right:e,bottom:e,left:e}}function sn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function $s(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=na(t),l=ra(i),d=rt(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(d){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(er(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const Ov=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=$s(u,n,d),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:h,fn:y}=l[v],{x,y:C,data:E,reset:N}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,m={...m,[h]:{...m[h],...E}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:p}=$s(u,g,d)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function xr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=tt(t,e),b=ol(m),h=l[g?p==="floating"?"reference":"floating":p],y=sn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),x=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},N=sn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:d}):x);return{top:(y.top-N.top+b.top)/E.y,bottom:(N.bottom-y.bottom+b.bottom)/E.y,left:(y.left-N.left+b.left)/E.x,right:(N.right-y.right+b.right)/E.x}}const Dv=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=tt(e,t)||{};if(u==null)return{};const p=ol(f),g={x:r,y:n},m=na(o),b=ra(m),v=await i.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",C=h?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],N=g[m]-a.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let A=T?T[C]:0;(!A||!await(i.isElement==null?void 0:i.isElement(T)))&&(A=l.floating[C]||a.floating[b]);const P=E/2-N/2,V=A/2-v[b]/2-1,U=lt(p[y],V),re=lt(p[x],V),te=U,Q=A-v[b]-re,W=A/2-v[b]/2+P,D=Ao(te,W,Q),I=!d.arrow&&er(o)!=null&&W!==D&&a.reference[b]/2-(W<te?U:re)-v[b]/2<0,O=I?W<te?W-te:W-Q:0;return{[m]:g[m]+O,data:{[m]:D,centerOffset:W-D-O,...I&&{alignmentOffset:O}},reset:I}}}),$v=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=tt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rt(o),x=Ue(l),C=rt(l)===l,E=await(d.isRTL==null?void 0:d.isRTL(u.floating)),N=g||(C||!v?[an(l)]:kv(l)),T=b!=="none";!g&&T&&N.push(...Iv(l,v,b,E));const A=[l,...N],P=await xr(t,h),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(P[y]),p){const W=Nv(o,i,E);V.push(P[W[0]],P[W[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(W=>W<=0)){var re,te;const W=(((re=a.flip)==null?void 0:re.index)||0)+1,D=A[W];if(D&&(!(p==="alignment"?x!==Ue(D):!1)||U.every(R=>Ue(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:D}};let I=(te=U.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const O=(Q=U.filter(R=>{if(T){const M=Ue(R.placement);return M===x||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:Q[0];O&&(I=O);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fs(e){return Ev.some(t=>e[t]>=0)}const Lv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=tt(e,t);switch(n){case"referenceHidden":{const a=await xr(t,{...o,elementContext:"reference"}),i=Ls(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fs(i)}}}case"escaped":{const a=await xr(t,{...o,altBoundary:!0}),i=Ls(a,r.floating);return{data:{escapedOffsets:i,escaped:Fs(i)}}}default:return{}}}}},al=new Set(["left","top"]);async function Fv(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=rt(r),l=er(r),d=Ue(r)==="y",u=al.has(i)?-1:1,f=a&&d?-1:1,p=tt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),d?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const Vv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,d=await Fv(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:i}}}}},Bv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...d}=tt(e,t),u={x:r,y:n},f=await xr(t,d),p=Ue(rt(o)),g=ta(p);let m=u[g],b=u[p];if(a){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],C=m-f[y];m=Ao(x,m,C)}if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],C=b-f[y];b=Ao(x,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},Gv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=tt(e,t),f={x:r,y:n},p=Ue(o),g=ta(p);let m=f[g],b=f[p];const v=tt(l,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(d){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+h.mainAxis,N=a.reference[g]+a.reference[C]-h.mainAxis;m<E?m=E:m>N&&(m=N)}if(u){var y,x;const C=g==="y"?"width":"height",E=al.has(rt(o)),N=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:h.crossAxis),T=a.reference[p]+a.reference[C]+(E?0:((x=i.offset)==null?void 0:x[p])||0)-(E?h.crossAxis:0);b<N?b=N:b>T&&(b=T)}return{[g]:m,[p]:b}}}},Wv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:d=()=>{},...u}=tt(e,t),f=await xr(t,u),p=rt(o),g=er(o),m=Ue(o)==="y",{width:b,height:v}=a.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,C=b-f.left-f.right,E=lt(v-f[h],x),N=lt(b-f[y],C),T=!t.middlewareData.shift;let A=E,P=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=x),T&&!g){const U=Ne(f.left,0),re=Ne(f.right,0),te=Ne(f.top,0),Q=Ne(f.bottom,0);m?P=b-2*(U!==0||re!==0?U+re:Ne(f.left,f.right)):A=v-2*(te!==0||Q!==0?te+Q:Ne(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:A});const V=await i.getDimensions(l.floating);return b!==V.width||v!==V.height?{reset:{rects:!0}}:{}}}};function Pn(){return typeof window<"u"}function tr(e){return sl(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sl(e){return Pn()?e instanceof Node||e instanceof ke(e).Node:!1}function $e(e){return Pn()?e instanceof Element||e instanceof ke(e).Element:!1}function Ke(e){return Pn()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function Vs(e){return!Pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}const zv=new Set(["inline","contents"]);function jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!zv.has(o)}const qv=new Set(["table","td","th"]);function Uv(e){return qv.has(tr(e))}const Hv=[":popover-open",":modal"];function jn(e){return Hv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kv=["transform","translate","scale","rotate","perspective"],Yv=["transform","translate","scale","rotate","perspective","filter"],Xv=["paint","layout","strict","content"];function oa(e){const t=aa(),r=$e(e)?Le(e):e;return Kv.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Yv.some(n=>(r.willChange||"").includes(n))||Xv.some(n=>(r.contain||"").includes(n))}function Zv(e){let t=ct(e);for(;Ke(t)&&!Ht(t);){if(oa(t))return t;if(jn(t))return null;t=ct(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jv=new Set(["html","body","#document"]);function Ht(e){return Jv.has(tr(e))}function Le(e){return ke(e).getComputedStyle(e)}function Nn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ye(e);return Vs(t)?t.host:t}function il(e){const t=ct(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&jr(t)?t:il(t)}function br(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=il(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ke(o);if(a){const l=Io(i);return t.concat(i,i.visualViewport||[],jr(o)?o:[],l&&r?br(l):[])}return t.concat(o,br(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ll(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=on(r)!==a||on(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function sa(e){return $e(e)?e:e.contextElement}function qt(e){const t=sa(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ll(t);let i=(a?on(r.width):r.width)/n,l=(a?on(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Qv=He(0);function cl(e){const t=ke(e);return!aa()||!t.visualViewport?Qv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ke(e)?!1:t}function Et(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=sa(e);let i=He(1);t&&(n?$e(n)&&(i=qt(n)):i=qt(e));const l=eh(a,r,n)?cl(a):He(0);let d=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=ke(a),m=n&&$e(n)?ke(n):n;let b=g,v=Io(b);for(;v&&n&&m!==b;){const h=qt(v),y=v.getBoundingClientRect(),x=Le(v),C=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,E=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=C,u+=E,b=ke(v),v=Io(b)}}return sn({width:f,height:p,x:d,y:u})}function kn(e,t){const r=Nn(e).scrollLeft;return t?t.left+r:Et(Ye(e)).left+r}function dl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-kn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function th(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?jn(t.floating):!1;if(n===i||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((tr(n)!=="body"||jr(i))&&(d=Nn(n)),Ke(n))){const m=Et(n);u=qt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?dl(i,d):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-d.scrollTop*u.y+f.y+g.y}}function rh(e){return Array.from(e.getClientRects())}function nh(e){const t=Ye(e),r=Nn(e),n=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+kn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Ne(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Bs=25;function oh(e,t){const r=ke(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,d=0;if(o){a=o.width,i=o.height;const f=aa();(!f||f&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const u=kn(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Bs&&(a-=b)}else u<=Bs&&(a+=u);return{width:a,height:i,x:l,y:d}}const ah=new Set(["absolute","fixed"]);function sh(e,t){const r=Et(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?qt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,u=n*a.y;return{width:i,height:l,x:d,y:u}}function Gs(e,t,r){let n;if(t==="viewport")n=oh(e,r);else if(t==="document")n=nh(Ye(e));else if($e(t))n=sh(t,r);else{const o=cl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(n)}function ul(e,t){const r=ct(e);return r===t||!$e(r)||Ht(r)?!1:Le(r).position==="fixed"||ul(r,t)}function ih(e,t){const r=t.get(e);if(r)return r;let n=br(e,[],!1).filter(l=>$e(l)&&tr(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ct(e):e;for(;$e(i)&&!Ht(i);){const l=Le(i),d=oa(i);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&ah.has(o.position)||jr(i)&&!d&&ul(e,i))?n=n.filter(f=>f!==i):o=l,i=ct(i)}return t.set(e,n),n}function lh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?jn(t)?[]:ih(t,this._c):[].concat(r),n],l=i[0],d=i.reduce((u,f)=>{const p=Gs(t,f,o);return u.top=Ne(p.top,u.top),u.right=lt(p.right,u.right),u.bottom=lt(p.bottom,u.bottom),u.left=Ne(p.left,u.left),u},Gs(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ch(e){const{width:t,height:r}=ll(e);return{width:t,height:r}}function dh(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=Et(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=He(0);function u(){d.x=kn(o)}if(n||!n&&!a)if((tr(t)!=="body"||jr(o))&&(l=Nn(t)),n){const m=Et(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?dl(o,l):He(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function uo(e){return Le(e).position==="static"}function Ws(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function fl(e,t){const r=ke(e);if(jn(e))return r;if(!Ke(e)){let o=ct(e);for(;o&&!Ht(o);){if($e(o)&&!uo(o))return o;o=ct(o)}return r}let n=Ws(e,t);for(;n&&Uv(n)&&uo(n);)n=Ws(n,t);return n&&Ht(n)&&uo(n)&&!oa(n)?r:n||Zv(e)||r}const uh=async function(e){const t=this.getOffsetParent||fl,r=this.getDimensions,n=await r(e.floating);return{reference:dh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fh(e){return Le(e).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:th,getDocumentElement:Ye,getClippingRect:lh,getOffsetParent:fl,getElementRects:uh,getClientRects:rh,getDimensions:ch,getScale:qt,isElement:$e,isRTL:fh};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mh(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Hr(p),v=Hr(o.clientWidth-(f+g)),h=Hr(o.clientHeight-(p+m)),y=Hr(f),C={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:Ne(0,lt(1,d))||1};let E=!0;function N(T){const A=T[0].intersectionRatio;if(A!==d){if(!E)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!pl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(N,C)}r.observe(e)}return i(!0),a}function gh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=sa(e),f=o||a?[...u?br(u):[],...br(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?mh(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!d&&m.observe(u),m.observe(t));let b,v=d?Et(e):null;d&&h();function h(){const y=Et(e);v&&!pl(v,y)&&r(),v=y,b=requestAnimationFrame(h)}return r(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(b)}}const vh=Vv,hh=Bv,xh=$v,bh=Wv,yh=Lv,zs=Dv,wh=Gv,Ch=(e,t,r)=>{const n=new Map,o={platform:ph,...r},a={...o.platform,_c:n};return Ov(e,t,{...o,platform:a})};var Sh=typeof document<"u",Eh=function(){},en=Sh?S.useLayoutEffect:Eh;function ln(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ln(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ln(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ml(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(e,t){const r=ml(e);return Math.round(t*r)/r}function fo(e){const t=c.useRef(e);return en(()=>{t.current=e}),t}function Rh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);ln(g,n)||m(n);const[b,v]=c.useState(null),[h,y]=c.useState(null),x=c.useCallback(R=>{R!==T.current&&(T.current=R,v(R))},[]),C=c.useCallback(R=>{R!==A.current&&(A.current=R,y(R))},[]),E=a||b,N=i||h,T=c.useRef(null),A=c.useRef(null),P=c.useRef(f),V=d!=null,U=fo(d),re=fo(o),te=fo(u),Q=c.useCallback(()=>{if(!T.current||!A.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),Ch(T.current,A.current,R).then(M=>{const B={...M,isPositioned:te.current!==!1};W.current&&!ln(P.current,B)&&(P.current=B,yn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const W=c.useRef(!1);en(()=>(W.current=!0,()=>{W.current=!1}),[]),en(()=>{if(E&&(T.current=E),N&&(A.current=N),E&&N){if(U.current)return U.current(E,N,Q);Q()}},[E,N,Q,U,V]);const D=c.useMemo(()=>({reference:T,floating:A,setReference:x,setFloating:C}),[x,C]),I=c.useMemo(()=>({reference:E,floating:N}),[E,N]),O=c.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const M=qs(I.floating,f.x),B=qs(I.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+B+"px)",...ml(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Q,refs:D,elements:I,floatingStyles:O}),[f,Q,D,I,O])}const Ph=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?zs({element:n.current,padding:o}).fn(r):{}:n?zs({element:n,padding:o}).fn(r):{}}}},jh=(e,t)=>({...vh(e),options:[e,t]}),Nh=(e,t)=>({...hh(e),options:[e,t]}),kh=(e,t)=>({...wh(e),options:[e,t]}),Th=(e,t)=>({...xh(e),options:[e,t]}),Ah=(e,t)=>({...bh(e),options:[e,t]}),_h=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...Ph(e),options:[e,t]});var Mh="Arrow",gl=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(H.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});gl.displayName=Mh;var Oh=gl;function ia(e){const[t,r]=c.useState(void 0);return be(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,l;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var la="Popper",[vl,ut]=we(la),[Dh,hl]=vl(la),xl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(Dh,{scope:t,anchor:n,onAnchorChange:o,children:r})};xl.displayName=la;var bl="PopperAnchor",yl=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=hl(bl,r),i=c.useRef(null),l=se(t,i),d=c.useRef(null);return c.useEffect(()=>{const u=d.current;d.current=(n==null?void 0:n.current)||i.current,u!==d.current&&a.onAnchorChange(d.current)}),n?null:s.jsx(H.div,{...o,ref:l})});yl.displayName=bl;var ca="PopperContent",[$h,Lh]=vl(ca),wl=c.forwardRef((e,t)=>{var _,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=hl(ca,r),[y,x]=c.useState(null),C=se(t,Se=>x(Se)),[E,N]=c.useState(null),T=ia(E),A=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(Vh),altBoundary:te},{refs:W,floatingStyles:D,placement:I,isPositioned:O,middlewareData:R}=Rh({strategy:"fixed",placement:V,whileElementsMounted:(...Se)=>gh(...Se,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[jh({mainAxis:o+P,alignmentAxis:i}),d&&Nh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?kh():void 0,...Q}),d&&Th({...Q}),Ah({...Q,apply:({elements:Se,rects:Te,availableWidth:Ge,availableHeight:Me})=>{const{width:ot,height:Wr}=Te.reference,Ze=Se.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${ot}px`),Ze.setProperty("--radix-popper-anchor-height",`${Wr}px`)}}),E&&Ih({element:E,padding:l}),Bh({arrowWidth:A,arrowHeight:P}),g&&_h({strategy:"referenceHidden",...Q})]}),[M,B]=El(I),J=De(b);be(()=>{O&&(J==null||J())},[O,J]);const k=(_=R.arrow)==null?void 0:_.x,G=(K=R.arrow)==null?void 0:K.y,Z=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=c.useState();return be(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:O?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx($h,{scope:r,placedSide:M,onArrowChange:N,arrowX:k,arrowY:G,shouldHideArrow:Z,children:s.jsx(H.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:O?void 0:"none"}})})})});wl.displayName=ca;var Cl="PopperArrow",Fh={top:"bottom",right:"left",bottom:"top",left:"right"},Sl=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Lh(Cl,n),i=Fh[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Oh,{...o,ref:r,style:{...o.style,display:"block"}})})});Sl.displayName=Cl;function Vh(e){return e!==null}var Bh=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:r,rects:n,middlewareData:o}=t,i=((h=o.arrow)==null?void 0:h.centerOffset)!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=El(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+d/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-d}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+d}px`):u==="right"?(b=`${-d}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+d}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function El(e){const[t,r="center"]=e.split("-");return[t,r]}var Nr=xl,kr=yl,Tn=wl,An=Sl,Gh="Portal",rr=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);be(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Sr.createPortal(s.jsx(H.div,{...n,ref:t}),i):null});rr.displayName=Gh;var Wh=c[" useInsertionEffect ".trim().toString()]||be;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=zh({defaultProp:t,onChange:r}),l=e!==void 0,d=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,n])}const u=c.useCallback(f=>{var p;if(l){const g=qh(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[d,u]}function zh({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return Wh(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function qh(e){return typeof e=="function"}function da(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Rl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Uh="VisuallyHidden",Pl=c.forwardRef((e,t)=>s.jsx(H.span,{...e,ref:t,style:{...Rl,...e.style}}));Pl.displayName=Uh;var Hh=Pl,Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Kr=new WeakMap,Yr={},po=0,jl=function(e){return e&&(e.host||jl(e.parentNode))},Yh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=jl(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Xh=function(e,t,r,n){var o=Yh(t,Array.isArray(e)?e:[e]);Yr[r]||(Yr[r]=new WeakMap);var a=Yr[r],i=[],l=new Set,d=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=($t.get(g)||0)+1,h=(a.get(g)||0)+1;$t.set(g,v),a.set(g,h),i.push(g),v===1&&b&&Kr.set(g,!0),h===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),po++,function(){i.forEach(function(p){var g=$t.get(p)-1,m=a.get(p)-1;$t.set(p,g),a.set(p,m),g||(Kr.has(p)||p.removeAttribute(n),Kr.delete(p)),m||p.removeAttribute(r)}),po--,po||($t=new WeakMap,$t=new WeakMap,Kr=new WeakMap,Yr={})}},_n=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Kh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Xh(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function Nl(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Zh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var tn="right-scroll-bar-position",rn="width-before-scroll-bar",Jh="with-scroll-bars-hidden",Qh="--removed-body-scroll-bar-size";function mo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ex(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var tx=typeof window<"u"?c.useLayoutEffect:c.useEffect,Us=new WeakMap;function rx(e,t){var r=ex(null,function(n){return e.forEach(function(o){return mo(o,n)})});return tx(function(){var n=Us.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||mo(l,null)}),a.forEach(function(l){o.has(l)||mo(l,i)})}Us.set(r,e)},[e]),r}function nx(e){return e}function ox(e,t){t===void 0&&(t=nx);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var d=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function ax(e){e===void 0&&(e={});var t=ox(null);return t.options=qe({async:!0,ssr:!1},e),t}var kl=function(e){var t=e.sideCar,r=Nl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return c.createElement(n,qe({},r))};kl.isSideCarExport=!0;function sx(e,t){return e.useMedium(t),kl}var Tl=ax(),go=function(){},In=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:go,onWheelCapture:go,onTouchMoveCapture:go}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,E=Nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,T=rx([r,t]),A=qe(qe({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(N,{sideCar:Tl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),qe(qe({},A),{ref:T})):c.createElement(x,qe({},A,{className:d,ref:T}),l))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:rn,zeroRight:tn};var ix=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ix();return t&&e.setAttribute("nonce",t),e}function cx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ux=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lx())&&(cx(t,r),dx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fx=function(){var e=ux();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Al=function(){var e=fx(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},px={left:0,top:0,right:0,gap:0},vo=function(e){return parseInt(e||"",10)||0},mx=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vo(r),vo(n),vo(o)]},gx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return px;var t=mx(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},vx=Al(),Ut="data-scroll-locked",hx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
156
156
|
.`.concat(Jh,` {
|
|
157
157
|
overflow: hidden `).concat(n,`;
|
|
158
158
|
padding-right: `).concat(l,"px ").concat(n,`;
|