@ryanodd/design-system 0.1.0-dev1 → 0.1.0-dev10
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/cjs/index.js +19 -19
- package/dist/esm/index.d.ts +205 -6
- package/dist/esm/index.js +3755 -2460
- package/dist/index.css +1 -1
- package/package.json +5 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),K=require("react"),mo=require("react-dom");function vo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=vo(K),sn=vo(mo),Qs="_button_w6zk1_1",Js="_buttonNotificationDot_w6zk1_143",Fn={button:Qs,buttonNotificationDot:Js},ei="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='m12%2019l-7-7l7-7m7%207H5'/%3e%3c/svg%3e",ti="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M5%2012h14m-7-7l7%207l-7%207'/%3e%3c/svg%3e",ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='m9.55%2015.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175%209.2q-.3.3-.7.3t-.7-.3L4.55%2013q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z'/%3e%3c/svg%3e",oi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/svg%3e",ri="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M18%206L6%2018M6%206l12%2012'/%3e%3c/svg%3e",si="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M15%203h6v6m-11%205L21%203m-3%2010v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h6'/%3e%3c/svg%3e",ii="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='currentColor'%20d='M31.23%2017.736c.063-.57.103-1.148.103-1.736s-.04-1.166-.104-1.737l-4.378-1.557c-.218-.716-.504-1.4-.85-2.05l1.992-4.192a15.6%2015.6%200%200%200-2.458-2.46L21.343%206a11%2011%200%200%200-2.05-.85L17.737.772C17.166.708%2016.588.667%2016%20.667s-1.166.04-1.737.105L12.707%205.15q-1.075.327-2.05.85L6.464%204.004c-.91.725-1.734%201.55-2.46%202.46L6%2010.654q-.523.976-.85%202.05l-4.378%201.56c-.064.57-.105%201.15-.105%201.737s.04%201.165.105%201.736l4.378%201.558q.327%201.074.85%202.05l-1.995%204.192c.725.91%201.55%201.733%202.46%202.458L10.654%2026q.976.523%202.05.852l1.558%204.377c.57.063%201.148.103%201.737.103c.588%200%201.165-.04%201.736-.104l1.558-4.378c.715-.218%201.4-.504%202.05-.85l4.192%201.992c.91-.725%201.733-1.55%202.458-2.458L26%2021.343c.348-.647.634-1.334.852-2.05l4.377-1.557zM16%2020.87a4.871%204.871%200%201%201-.002-9.742A4.871%204.871%200%200%201%2016%2020.87'/%3e%3c/svg%3e",ci="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3e%3cpath%20d='m15%2012l-8.373%208.373a1%201%200%201%201-3-3L12%209m6%206l4-4'/%3e%3cpath%20d='m21.5%2011.5l-1.914-1.914A2%202%200%200%201%2019%208.172V7l-2.26-2.26a6%206%200%200%200-4.202-1.756L9%202.96l.92.82A6.18%206.18%200%200%201%2012%208.4V10l2%202h1.172a2%202%200%200%201%201.414.586L18.5%2014.5'/%3e%3c/g%3e%3c/svg%3e",ai="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M6.979%203.074a6%206%200%200%201%204.988%201.425l.037.033l.034-.03a6%206%200%200%201%204.733-1.44l.246.036a6%206%200%200%201%203.364%2010.008l-.18.185l-.048.041l-7.45%207.379a1%201%200%200%201-1.313.082l-.094-.082l-7.493-7.422A6%206%200%200%201%206.979%203.074'/%3e%3c/svg%3e",li="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3ccircle%20cx='8'%20cy='2.5'%20r='.75'/%3e%3ccircle%20cx='8'%20cy='8'%20r='.75'/%3e%3ccircle%20cx='8'%20cy='13.5'%20r='.75'/%3e%3c/g%3e%3c/svg%3e",ui="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20256%20256'%3e%3cpath%20fill='currentColor'%20d='m213.85%20125.46l-112%20120a8%208%200%200%201-13.69-7l14.66-73.33l-57.63-21.64a8%208%200%200%201-3-13l112-120a8%208%200%200%201%2013.69%207l-14.7%2073.41l57.63%2021.61a8%208%200%200%201%203%2012.95Z'/%3e%3c/svg%3e",di="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3e%3crect%20width='20'%20height='16'%20x='2'%20y='4'%20rx='2'/%3e%3cpath%20d='m22%207l-8.97%205.7a1.94%201.94%200%200%201-2.06%200L2%207'/%3e%3c/g%3e%3c/svg%3e",fi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M4%2012h16M4%206h16M4%2018h16'/%3e%3c/svg%3e",pi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M7.159%203.185C7.415%203.066%207.699%203%208%203h8a2%202%200%200%201%202%202v9m0%204v1a2%202%200%200%201-2%202H8a2%202%200%200%201-2-2V6m5-2h2M3%203l18%2018m-9-4v.01'/%3e%3c/svg%3e",mi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='m12.9%206.855l4.242%204.242l-9.9%209.9H3v-4.243zm1.414-1.415l2.121-2.121a1%201%200%200%201%201.414%200l2.829%202.828a1%201%200%200%201%200%201.415l-2.122%202.121z'/%3e%3c/svg%3e",vi="_icon_178c1_1",hi={icon:vi},gi=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=K.forwardRef(({size:o="lg",className:r,...s},c)=>p.jsx(e,{className:`${r} ${hi.icon}`,"data-size":o,ref:c,alt:t,...s}));return n.displayName=t,n},ho=V(ei,"Left"),go=V(ti,"Right"),cn=V(ni,"Check"),wo=V(oi,"Circle"),an=V(ri,"Close"),xo=V(si,"External Link"),yo=V(ii,"Gear"),Co=V(ci,"Hammer"),bo=V(ai,"Heart"),Eo=V(li,"Kebab"),Ro=V(ui,"Lightning"),To=V(di,"Mail"),So=V(fi,"Menu"),Po=V(pi,"No Mobile Devices"),_o=V(mi,"Pencil"),Ut={ArrowLeft:ho,ArrowRight:go,Check:cn,Circle:wo,Close:an,ExternalLink:xo,Gear:yo,Hammer:Co,Heart:bo,Kebab:Eo,Lightning:Ro,Mail:To,Menu:So,NoMobile:Po,Pencil:_o,None:null},wi="_spinnerWrapper_1mfc7_1",xi="_spinner_1mfc7_1",$n={spinnerWrapper:wi,spinner:xi},ln=K.forwardRef(({className:e,size:t="lg",...n},o)=>p.jsx("div",{ref:o,className:$n.spinnerWrapper,"data-size":t,...n,children:p.jsx("div",{className:$n.spinner})}));ln.displayName="Spinner";const Ve=K.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:s="medium",variant:c,loading:a,iconOnly:d,...l},u)=>{const f=o?Ut[o]:void 0,v=r?Ut[r]:void 0,h=s==="small"?"sm":s==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":s,"data-variant":c,"data-icon-only":d,children:[f&&p.jsx(f,{size:h}),a&&p.jsx(ln,{size:h}),n,v&&p.jsx(v,{size:h}),t&&p.jsx("span",{className:Fn.buttonNotificationDot,children:t})]})});Ve.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Bn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Bn(e[r],null)}}}}function B(...e){return i.useCallback(wt(...e),e)}function yi(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,d=i.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:d,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),d=n.length;n=[...n,c];const l=f=>{const{scope:v,children:h,...w}=f,m=v?.[e]?.[d]||a,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:h})};l.displayName=s+"Provider";function u(f,v){const h=v?.[e]?.[d]||a,w=i.useContext(h);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const d=a?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return r.scopeName=e,[o,Ci(r,...t)]}function Ci(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:d,scopeName:l})=>{const f=d(s)[`__scope${l}`];return{...a,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ae=globalThis?.document?i.useLayoutEffect:()=>{},bi=i[" useInsertionEffect ".trim().toString()]||ae;function Oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,c]=Ei({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,o])}const l=i.useCallback(u=>{if(a){const f=Ri(u)?u(e):u;f!==e&&c.current?.(f)}else s(u)},[a,e,s,c]);return[d,l]}function Ei({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return bi(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ri(e){return typeof e=="function"}function Ti(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mo(e){const[t,n]=i.useState(void 0);return ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const d=s.borderBoxSize,l=Array.isArray(d)?d[0]:d;c=l.inlineSize,a=l.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Si(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Pi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=B(o.ref,_i(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Z.displayName="Presence";function Pi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,d]=Si(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=et(o.current);s.current=a==="mounted"?l:"none"},[a]),ae(()=>{const l=o.current,u=r.current;if(u!==e){const v=s.current,h=et(l);e?d("MOUNT"):h==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&v!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ae(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=h=>{const m=et(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(d("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=h=>{h.target===t&&(s.current=et(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function et(e){return e?.animationName||"none"}function _i(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=Mi(e),n=i.forwardRef((o,r)=>{const{children:s,...c}=o,a=i.Children.toArray(s),d=a.find(Oi);if(d){const l=d.props.children,u=a.map(f=>f===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...c,ref:r,children:i.isValidElement(l)?i.cloneElement(l,void 0,u):null})}return p.jsx(t,{...c,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Mi(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const c=Ni(r),a=Di(s,r.props);return r.type!==i.Fragment&&(a.ref=o?wt(o,c):c),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ao=Symbol("radix.slottable");function Ai(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ao,t}function Oi(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ao}function Di(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{const d=s(...a);return r(...a),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ni(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ii=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Ii.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:c,...a}=r,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...a,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var xt="Checkbox",[ki]=de(xt),[Li,dn]=ki(xt);function ji(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:c,name:a,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[v,h]=Oe({prop:n,defaultProp:r??!1,onChange:d,caller:xt}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),C=w?!!c||!!w.closest("form"):!0,b={checked:v,disabled:s,setChecked:h,control:w,setControl:m,name:a,form:c,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:me(r)?!1:r,isFormControl:C,bubbleInput:g,setBubbleInput:x};return p.jsx(Li,{scope:t,...b,children:Fi(f)?f(b):o})}var Oo="CheckboxTrigger",Do=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:c,disabled:a,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:h,bubbleInput:w}=dn(Oo,e),m=B(r,u),g=i.useRef(d);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":Fo(d),"data-disabled":a?"":void 0,disabled:a,value:c,...o,ref:m,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(y=>me(y)?!0:!y),w&&h&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})})});Do.displayName=Oo;var No=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:c,disabled:a,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(ji,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:a,required:c,onCheckedChange:l,name:o,form:u,value:d,internal_do_not_use_render:({isFormControl:v})=>p.jsxs(p.Fragment,{children:[p.jsx(Do,{...f,ref:t,__scopeCheckbox:n}),v&&p.jsx(jo,{__scopeCheckbox:n})]})})});No.displayName=xt;var Io="CheckboxIndicator",ko=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=dn(Io,n);return p.jsx(Z,{present:o||me(s.checked)||s.checked===!0,children:p.jsx(I.span,{"data-state":Fo(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ko.displayName=Io;var Lo="CheckboxBubbleInput",jo=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:c,required:a,disabled:d,name:l,value:u,form:f,bubbleInput:v,setBubbleInput:h}=dn(Lo,e),w=B(n,h),m=Ti(s),g=Mo(o);i.useEffect(()=>{const y=v;if(!y)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:T});y.indeterminate=me(s),E.call(y,me(s)?!1:s),y.dispatchEvent(R)}},[v,m,s,r]);const x=i.useRef(me(s)?!1:s);return p.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:a,disabled:d,name:l,value:u,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jo.displayName=Lo;function Fi(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function Fo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const $i="_checkboxRow_5ztin_1",Bi="_checkboxRoot_5ztin_7",Wi="_checkboxIndicator_5ztin_19",Hi="_checkboxCheckmarkIcon_5ztin_29",Vi="_checkboxLabel_5ztin_35",ke={checkboxRow:$i,checkboxRoot:Bi,checkboxIndicator:Wi,checkboxCheckmarkIcon:Hi,checkboxLabel:Vi},Ki=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:ke.checkboxRow,children:[p.jsx(No,{checked:n,onCheckedChange:r=>{o(r===!0)},className:ke.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(ko,{className:ke.checkboxIndicator,children:p.jsx(cn,{className:ke.checkboxCheckmarkIcon})})}),p.jsx("label",{className:ke.checkboxLabel,htmlFor:e,children:t})]});var Ui=i[" useId ".trim().toString()]||(()=>{}),Gi=0;function we(e){const[t,n]=i.useState(Ui());return ae(()=>{n(o=>o??String(Gi++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function zi(e,t=globalThis?.document){const n=Y(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Yi="DismissableLayer",Gt="dismissableLayer.update",Xi="dismissableLayer.pointerDownOutside",qi="dismissableLayer.focusOutside",Wn,$o=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...d}=e,l=i.useContext($o),[u,f]=i.useState(null),v=u?.ownerDocument??globalThis?.document,[,h]=i.useState({}),w=B(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=u?m.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,b=y>=x,E=Qi(R=>{const M=R.target,N=[...l.branches].some(D=>D.contains(M));!b||N||(r?.(R),c?.(R),R.defaultPrevented||a?.())},v),T=Ji(R=>{const M=R.target;[...l.branches].some(D=>D.contains(M))||(s?.(R),c?.(R),R.defaultPrevented||a?.())},v);return zi(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},v),i.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Wn)}},[u,v,n,l]),i.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),i.useEffect(()=>{const R=()=>h({});return document.addEventListener(Gt,R),()=>document.removeEventListener(Gt,R)},[]),p.jsx(I.div,{...d,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});Ke.displayName=Yi;var Zi="DismissableLayerBranch",Bo=i.forwardRef((e,t)=>{const n=i.useContext($o),o=i.useRef(null),r=B(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Bo.displayName=Zi;function Qi(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let d=function(){Wo(Xi,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ji(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(qi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hn(){const e=new CustomEvent(Gt);document.dispatchEvent(e)}function Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var ec=Ke,tc=Bo,It="focusScope.autoFocusOnMount",kt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},nc="FocusScope",fn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,d]=i.useState(null),l=Y(r),u=Y(s),f=i.useRef(null),v=B(t,m=>d(m)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(C){if(h.paused||!a)return;const b=C.target;a.contains(b)?f.current=b:pe(f.current,{select:!0})},g=function(C){if(h.paused||!a)return;const b=C.relatedTarget;b!==null&&(a.contains(b)||pe(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&pe(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,h.paused]),i.useEffect(()=>{if(a){Un.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(It,Vn);a.addEventListener(It,l),a.dispatchEvent(x),x.defaultPrevented||(oc(ac(Ho(a)),{select:!0}),document.activeElement===m&&pe(a))}return()=>{a.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(kt,Vn);a.addEventListener(kt,u),a.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),a.removeEventListener(kt,u),Un.remove(h)},0)}}},[a,l,u,h]);const w=i.useCallback(m=>{if(!n&&!o||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[C,b]=rc(y);C&&b?!m.shiftKey&&x===b?(m.preventDefault(),n&&pe(C,{select:!0})):m.shiftKey&&x===C&&(m.preventDefault(),n&&pe(b,{select:!0})):x===y&&m.preventDefault()}},[n,o,h.paused]);return p.jsx(I.div,{tabIndex:-1,...c,ref:v,onKeyDown:w})});fn.displayName=nc;function oc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function rc(e){const t=Ho(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Ho(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!sc(n,{upTo:t}))return n}function sc(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 ic(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ic(e)&&t&&e.select()}}var Un=cc();function cc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gn(e,t),e.unshift(t)},remove(t){e=Gn(e,t),e[0]?.resume()}}}function Gn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ac(e){return e.filter(t=>t.tagName!=="A")}var lc="Portal",Ue=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);ae(()=>s(!0),[]);const c=n||r&&globalThis?.document?.body;return c?mo.createPortal(p.jsx(I.div,{...o,ref:t}),c):null});Ue.displayName=lc;var Lt=0;function Vo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}function zn(){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 oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oe.apply(this,arguments)};function Ko(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function uc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",lt="width-before-scroll-bar",dc="with-scroll-bars-hidden",fc="--removed-body-scroll-bar-size";function jt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pc(e,t){var n=K.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var mc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Yn=new WeakMap;function vc(e,t){var n=pc(null,function(o){return e.forEach(function(r){return jt(r,o)})});return mc(function(){var o=Yn.get(n);if(o){var r=new Set(o),s=new Set(e),c=n.current;r.forEach(function(a){s.has(a)||jt(a,null)}),s.forEach(function(a){r.has(a)||jt(a,c)})}Yn.set(n,e)},[e]),n}function hc(e){return e}function gc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,o);return n.push(c),function(){n=n.filter(function(a){return a!==c})}},assignSyncMedium:function(s){for(o=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){o=!0;var c=[];if(n.length){var a=n;n=[],a.forEach(s),c=n}var d=function(){var u=c;c=[],u.forEach(s)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){c.push(u),l()},filter:function(u){return c=c.filter(u),n}}}};return r}function wc(e){e===void 0&&(e={});var t=gc(null);return t.options=oe({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Ko(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,oe({},n))};Uo.isSideCarExport=!0;function xc(e,t){return e.useMedium(t),Uo}var Go=wc(),Ft=function(){},yt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],s=o[1],c=e.forwardProps,a=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,v=e.sideCar,h=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,b=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,T=vc([n,t]),R=oe(oe({},b),r);return i.createElement(i.Fragment,null,u&&i.createElement(E,{sideCar:Go,removeScrollBar:l,shards:f,noRelative:h,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:C}),c?i.cloneElement(i.Children.only(a),oe(oe({},R),{ref:T})):i.createElement(y,oe({},R,{className:d,ref:T}),a))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:lt,zeroRight:at};var yc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ec(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cc())&&(bc(t,n),Ec(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tc=function(){var e=Rc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=Tc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Sc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},_c=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Mc=zo(),Pe="data-scroll-locked",Ac=function(e,t,n,o){var r=e.left,s=e.top,c=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),nr=require("react-dom");function or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=or(O),pt=or(nr),Pi="_badge_1quq7_1",Ti={badge:Pi},Mi=({variant:e="neutral",size:t="md",className:n,...o})=>l.jsx("div",{className:`${Ti.badge} ${n??""}`,"data-variant":e,"data-size":t,...o}),Ai="_button_1wslv_1",Ii="_buttonNotificationDot_1wslv_143",_o={button:Ai,buttonNotificationDot:Ii},Ni=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),Oi=O.forwardRef(Ni),ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),Di=O.forwardRef(ki),ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),Li=O.forwardRef(ji),Fi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),$i=O.forwardRef(Fi),Bi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),Wi=O.forwardRef(Bi),Hi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),Vi=O.forwardRef(Hi),Ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),Ui=O.forwardRef(Ki),Gi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),zi=O.forwardRef(Gi),Yi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Xi=O.forwardRef(Yi),qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Zi=O.forwardRef(qi),Qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),Ji=O.forwardRef(Qi),ec=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),tc=O.forwardRef(ec),nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),oc=O.forwardRef(nc),rc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),sc=O.forwardRef(rc),ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),ic=O.forwardRef(ac),cc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),lc=O.forwardRef(cc),uc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),dc=O.forwardRef(uc),fc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),pc=O.forwardRef(fc),mc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),hc=O.forwardRef(mc),vc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),gc=O.forwardRef(vc),wc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),xc=O.forwardRef(wc),yc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Cc=O.forwardRef(yc),bc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Ec=O.forwardRef(bc),Sc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),Rc=O.forwardRef(Sc),_c=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),Pc=O.forwardRef(_c),Tc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),Mc=O.forwardRef(Tc),Ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),Ic=O.forwardRef(Ac),Nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),Oc=O.forwardRef(Nc),kc="_icon_178c1_1",Dc={icon:kc},jc=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=O.forwardRef(({size:o="lg",className:r,...a},i)=>l.jsx(e,{className:`${r} ${Dc.icon}`,"data-size":o,ref:i,alt:t,...a}));return n.displayName=t,n},rr=V(Oi,"Left"),sr=V(Di,"Right"),ar=V(Li,"Calendar"),Ut=V($i,"Check"),ir=V(Wi,"Chevron Down"),Lc=V(Vi,"Chevron Left"),Fc=V(Ui,"Chevron Right"),$c=V(zi,"Chevron Up"),cr=V(Xi,"Circle"),Xn=V(Zi,"Close"),lr=V(Ji,"Coffee"),ur=V(tc,"External Link"),dr=V(oc,"Gear"),fr=V(sc,"Hammer"),pr=V(ic,"Heart"),mr=V(lc,"Inbox"),hr=V(pc,"Lamp"),vr=V(dc,"Kebab"),gr=V(hc,"Lightning"),wr=V(gc,"Log In"),xr=V(xc,"Log Out"),yr=V(Cc,"Mail"),Cr=V(Ec,"Menu"),br=V(Rc,"No Mobile Devices"),Er=V(Pc,"Pencil"),Sr=V(Mc,"Plus"),Rr=V(Ic,"Signpost"),_r=V(Oc,"Sun Moon"),Ze={ArrowLeft:rr,ArrowRight:sr,Calendar:ar,Check:Ut,Circle:cr,Close:Xn,Coffee:lr,ExternalLink:ur,Gear:dr,Hammer:fr,Heart:pr,Inbox:mr,Kebab:vr,Lamp:hr,Lightning:gr,LogIn:wr,LogOut:xr,Mail:yr,Menu:Cr,NoMobile:br,Pencil:Er,Plus:Sr,Signpost:Rr,SunMoon:_r},Bc="_spinnerWrapper_1mfc7_1",Wc="_spinner_1mfc7_1",Po={spinnerWrapper:Bc,spinner:Wc},qn=O.forwardRef(({className:e,size:t="lg",...n},o)=>l.jsx("div",{ref:o,className:Po.spinnerWrapper,"data-size":t,...n,children:l.jsx("div",{className:Po.spinner})}));qn.displayName="Spinner";const mt=O.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:a="md",variant:i,loading:c,iconOnly:u,...d},f)=>{const p=o?Ze[o]:void 0,h=r?Ze[r]:void 0,g=a==="sm"?"sm":a==="md"?"md":"lg";return l.jsxs("button",{ref:f,...d,className:`${_o.button} ${e??""}`,"data-size":a,"data-variant":i,"data-icon-only":u,children:[p&&l.jsx(p,{size:g}),c&&l.jsx(qn,{size:g}),n,h&&l.jsx(h,{size:g}),t&&l.jsx("span",{className:_o.buttonNotificationDot,children:t})]})});mt.displayName="Button";function To(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gt(...e){return t=>{let n=!1;const o=e.map(r=>{const a=To(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():To(e[r],null)}}}}function H(...e){return s.useCallback(Gt(...e),e)}function Hc(e,t){const n=s.createContext(t),o=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return l.jsx(n.Provider,{value:u,children:i})};o.displayName=e+"Provider";function r(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function pe(e,t=[]){let n=[];function o(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=p=>{const{scope:h,children:g,...w}=p,m=h?.[e]?.[u]||c,v=s.useMemo(()=>w,Object.values(w));return l.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function f(p,h){const g=h?.[e]?.[u]||c,w=s.useContext(g);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return r.scopeName=e,[o,Vc(r,...t)]}function Vc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var q=globalThis?.document?s.useLayoutEffect:()=>{},Kc=s[" useInsertionEffect ".trim().toString()]||q;function be({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=Uc({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:r;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=c},[c,o])}const d=s.useCallback(f=>{if(c){const p=Gc(f)?f(e):f;p!==e&&i.current?.(p)}else a(f)},[c,e,a,i]);return[u,d]}function Uc({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return Kc(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function Gc(e){return typeof e=="function"}function Pr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Tr(e){const[t,n]=s.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function zc(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var oe=e=>{const{present:t,children:n}=e,o=Yc(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=H(o.ref,Xc(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};oe.displayName="Presence";function Yc(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,u]=zc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=Rt(o.current);a.current=c==="mounted"?d:"none"},[c]),q(()=>{const d=o.current,f=r.current;if(f!==e){const h=a.current,g=Rt(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=g=>{const m=Rt(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Rt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function Rt(e){return e?.animationName||"none"}function Xc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function De(e){const t=qc(e),n=s.forwardRef((o,r)=>{const{children:a,...i}=o,c=s.Children.toArray(a),u=c.find(Qc);if(u){const d=u.props.children,f=c.map(p=>p===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return l.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function qc(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const i=el(r),c=Jc(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Gt(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mr=Symbol("radix.slottable");function Zc(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mr,t}function Qc(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mr}function Jc(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const u=a(...c);return r(...c),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function el(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=tl.reduce((e,t)=>{const n=De(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Zn(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}var zt="Checkbox",[nl]=pe(zt),[ol,Qn]=nl(zt);function rl(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=e,[h,g]=be({prop:n,defaultProp:r??!1,onChange:u,caller:zt}),[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useRef(!1),C=w?!!i||!!w.closest("form"):!0,b={checked:h,disabled:a,setChecked:g,control:w,setControl:m,name:c,form:i,value:f,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:Pe(r)?!1:r,isFormControl:C,bubbleInput:v,setBubbleInput:y};return l.jsx(ol,{scope:t,...b,children:sl(p)?p(b):o})}var Ar="CheckboxTrigger",Ir=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:w}=Qn(Ar,e),m=H(r,f),v=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const x=()=>p(v.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[a,p]),l.jsx(k.button,{type:"button",role:"checkbox","aria-checked":Pe(u)?"mixed":u,"aria-required":d,"data-state":Lr(u),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:m,onKeyDown:R(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:R(n,y=>{p(x=>Pe(x)?!0:!x),w&&g&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Ir.displayName=Ar;var Nr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:f,...p}=e;return l.jsx(rl,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:o,form:f,value:u,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Ir,{...p,ref:t,__scopeCheckbox:n}),h&&l.jsx(jr,{__scopeCheckbox:n})]})})});Nr.displayName=zt;var Or="CheckboxIndicator",kr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=Qn(Or,n);return l.jsx(oe,{present:o||Pe(a.checked)||a.checked===!0,children:l.jsx(k.span,{"data-state":Lr(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});kr.displayName=Or;var Dr="CheckboxBubbleInput",jr=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=Qn(Dr,e),w=H(n,g),m=Pr(a),v=Tr(o);s.useEffect(()=>{const x=h;if(!x)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==a&&E){const S=new Event("click",{bubbles:T});x.indeterminate=Pe(a),E.call(x,Pe(a)?!1:a),x.dispatchEvent(S)}},[h,m,a,r]);const y=s.useRef(Pe(a)?!1:a);return l.jsx(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jr.displayName=Dr;function sl(e){return typeof e=="function"}function Pe(e){return e==="indeterminate"}function Lr(e){return Pe(e)?"indeterminate":e?"checked":"unchecked"}const al="_checkboxRow_aw0oa_1",il="_checkboxRoot_aw0oa_7",cl="_checkboxIndicator_aw0oa_19",ll="_checkboxCheckmarkIcon_aw0oa_29",ul="_checkboxLabel_aw0oa_35",rt={checkboxRow:al,checkboxRoot:il,checkboxIndicator:cl,checkboxCheckmarkIcon:ll,checkboxLabel:ul},dl=({id:e,labelContent:t,checked:n,onClick:o})=>l.jsxs("div",{className:rt.checkboxRow,children:[l.jsx(Nr,{checked:n,onCheckedChange:r=>{o(r===!0)},className:rt.checkboxRoot,defaultChecked:!0,id:e,children:l.jsx(kr,{className:rt.checkboxIndicator,children:l.jsx(Ut,{className:rt.checkboxCheckmarkIcon})})}),l.jsx("label",{className:rt.checkboxLabel,htmlFor:e,children:t})]});var fl=s[" useId ".trim().toString()]||(()=>{}),pl=0;function ue(e){const[t,n]=s.useState(fl());return q(()=>{n(o=>o??String(pl++))},[e]),t?`radix-${t}`:""}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function ml(e,t=globalThis?.document){const n=ne(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var hl="DismissableLayer",Nn="dismissableLayer.update",vl="dismissableLayer.pointerDownOutside",gl="dismissableLayer.focusOutside",Mo,Fr=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(Fr),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),w=H(t,S=>p(S)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,E=xl(S=>{const A=S.target,j=[...d.branches].some(D=>D.contains(A));!b||j||(r?.(S),i?.(S),S.defaultPrevented||c?.())},h),T=yl(S=>{const A=S.target;[...d.branches].some(D=>D.contains(A))||(a?.(S),i?.(S),S.defaultPrevented||c?.())},h);return ml(S=>{x===d.layers.size-1&&(o?.(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},h),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Mo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ao(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Mo)}},[f,h,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ao())},[f,d]),s.useEffect(()=>{const S=()=>g({});return document.addEventListener(Nn,S),()=>document.removeEventListener(Nn,S)},[]),l.jsx(k.div,{...u,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,T.onFocusCapture),onBlurCapture:R(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,E.onPointerDownCapture)})});Be.displayName=hl;var wl="DismissableLayerBranch",$r=s.forwardRef((e,t)=>{const n=s.useContext(Fr),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(k.div,{...e,ref:r})});$r.displayName=wl;function xl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Br(vl,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function yl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Br(gl,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Nn);document.dispatchEvent(e)}function Br(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var Cl=Be,bl=$r,Cn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},El="FocusScope",ht=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=ne(r),f=ne(a),p=s.useRef(null),h=H(t,m=>u(m)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(C){if(g.paused||!c)return;const b=C.target;c.contains(b)?p.current=b:_e(p.current,{select:!0})},v=function(C){if(g.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||_e(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[o,c,g.paused]),s.useEffect(()=>{if(c){Oo.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(Cn,Io);c.addEventListener(Cn,d),c.dispatchEvent(y),y.defaultPrevented||(Sl(Ml(Wr(c)),{select:!0}),document.activeElement===m&&_e(c))}return()=>{c.removeEventListener(Cn,d),setTimeout(()=>{const y=new CustomEvent(bn,Io);c.addEventListener(bn,f),c.dispatchEvent(y),y.defaultPrevented||_e(m??document.body,{select:!0}),c.removeEventListener(bn,f),Oo.remove(g)},0)}}},[c,d,f,g]);const w=s.useCallback(m=>{if(!n&&!o||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[C,b]=Rl(x);C&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&_e(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),n&&_e(b,{select:!0})):y===x&&m.preventDefault()}},[n,o,g.paused]);return l.jsx(k.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});ht.displayName=El;function Sl(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(_e(o,{select:t}),document.activeElement!==n)return}function Rl(e){const t=Wr(e),n=No(t,e),o=No(t.reverse(),e);return[n,o]}function Wr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function No(e,t){for(const n of e)if(!_l(n,{upTo:t}))return n}function _l(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 Pl(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pl(e)&&t&&e.select()}}var Oo=Tl();function Tl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ko(e,t),e.unshift(t)},remove(t){e=ko(e,t),e[0]?.resume()}}}function ko(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ml(e){return e.filter(t=>t.tagName!=="A")}var Al="Portal",We=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);q(()=>a(!0),[]);const i=n||r&&globalThis?.document?.body;return i?nr.createPortal(l.jsx(k.div,{...o,ref:t}),i):null});We.displayName=Al;var En=0;function Yt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Do()),document.body.insertAdjacentElement("beforeend",e[1]??Do()),En++,()=>{En===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),En--}},[])}function Do(){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 ve=function(){return ve=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ve.apply(this,arguments)};function Hr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Il(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",kt="width-before-scroll-bar",Nl="with-scroll-bars-hidden",Ol="--removed-body-scroll-bar-size";function Sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kl(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Dl=typeof window<"u"?s.useLayoutEffect:s.useEffect,jo=new WeakMap;function jl(e,t){var n=kl(null,function(o){return e.forEach(function(r){return Sn(r,o)})});return Dl(function(){var o=jo.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(c){a.has(c)||Sn(c,null)}),a.forEach(function(c){r.has(c)||Sn(c,i)})}jo.set(n,e)},[e]),n}function Ll(e){return e}function Fl(e,t){t===void 0&&(t=Ll);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return r}function $l(e){e===void 0&&(e={});var t=Fl(null);return t.options=ve({async:!0,ssr:!1},e),t}var Vr=function(e){var t=e.sideCar,n=Hr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,ve({},n))};Vr.isSideCarExport=!0;function Bl(e,t){return e.useMedium(t),Vr}var Kr=$l(),Rn=function(){},Xt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:Rn,onWheelCapture:Rn,onTouchMoveCapture:Rn}),r=o[0],a=o[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,b=Hr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=jl([n,t]),S=ve(ve({},b),r);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:Kr,removeScrollBar:d,shards:p,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),ve(ve({},S),{ref:T})):s.createElement(x,ve({},S,{className:u,ref:T}),c))});Xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xt.classNames={fullWidth:kt,zeroRight:Ot};var Wl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wl();return t&&e.setAttribute("nonce",t),e}function Vl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Kl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ul=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Hl())&&(Vl(t,n),Kl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gl=function(){var e=Ul();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ur=function(){var e=Gl(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},zl={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Yl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[_n(n),_n(o),_n(r)]},Xl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zl;var t=Yl(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},ql=Ur(),Xe="data-scroll-locked",Zl=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Nl,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
|
-
padding-right: `).concat(
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(Xe,`] {
|
|
7
7
|
overflow: hidden `).concat(o,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
10
|
padding-left: `.concat(r,`px;
|
|
11
|
-
padding-top: `).concat(
|
|
12
|
-
padding-right: `).concat(
|
|
11
|
+
padding-top: `).concat(a,`px;
|
|
12
|
+
padding-right: `).concat(i,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
15
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(
|
|
19
|
+
.`).concat(Ot,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(o,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(
|
|
23
|
+
.`).concat(kt,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(Ot," .").concat(Ot,` {
|
|
28
28
|
right: 0 `).concat(o,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(kt," .").concat(kt,` {
|
|
32
32
|
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(Xe,`] {
|
|
36
|
+
`).concat(Ol,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},Lo=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},Ql=function(){s.useEffect(function(){return document.body.setAttribute(Xe,(Lo()+1).toString()),function(){var e=Lo()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Jl=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ql();var a=s.useMemo(function(){return Xl(r)},[r]);return s.createElement(ql,{styles:Zl(a,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{On=!1}var Ke=On?{passive:!1}:!1,eu=function(e){return e.tagName==="TEXTAREA"},Gr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eu(e)&&n[t]==="visible")},tu=function(e){return Gr(e,"overflowY")},nu=function(e){return Gr(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=zr(e,o);if(r){var a=Yr(e,o),i=a[1],c=a[2];if(i>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ou=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ru=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},zr=function(e,t){return e==="v"?tu(t):nu(t)},Yr=function(e,t){return e==="v"?ou(t):ru(t)},su=function(e,t){return e==="h"&&t==="rtl"?-1:1},au=function(e,t,n,o,r){var a=su(e,window.getComputedStyle(t).direction),i=a*o,c=n.target,u=t.contains(c),d=!1,f=i>0,p=0,h=0;do{if(!c)break;var g=Yr(e,c),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&zr(e,c)&&(p+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$o=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},iu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cu=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},lu=0,Ue=[];function uu(e){var t=s.useRef([]),n=s.useRef([0,0]),o=s.useRef(),r=s.useState(lu++)[0],a=s.useState(Ur)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Il([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Pt(m),x=n.current,C="deltaX"in m?m.deltaX:x[0]-y[0],b="deltaY"in m?m.deltaY:x[1]-y[1],E,T=m.target,S=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in m&&S==="h"&&T.type==="range")return!1;var A=Fo(S,T);if(!A)return!0;if(A?E=S:(E=S==="v"?"h":"v",A=Fo(S,T)),!A)return!1;if(!o.current&&"changedTouches"in m&&(C||b)&&(o.current=E),!E)return!0;var j=o.current||E;return au(j,v,m,j==="h"?C:b)},[]),u=s.useCallback(function(m){var v=m;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in v?$o(v):Pt(v),x=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&iu(E.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(E){return E.contains(v.target)}),b=C.length>0?c(v,C[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=s.useCallback(function(m,v,y,x){var C={name:m,delta:v,target:y,should:x,shadowParent:du(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),f=s.useCallback(function(m){n.current=Pt(m),o.current=void 0},[]),p=s.useCallback(function(m){d(m.type,$o(m),m.target,c(m,e.lockRef.current))},[]),h=s.useCallback(function(m){d(m.type,Pt(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ke),document.addEventListener("touchmove",u,Ke),document.addEventListener("touchstart",f,Ke),function(){Ue=Ue.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,Ke),document.removeEventListener("touchmove",u,Ke),document.removeEventListener("touchstart",f,Ke)}},[]);var g=e.removeScrollBar,w=e.inert;return s.createElement(s.Fragment,null,w?s.createElement(a,{styles:cu(r)}):null,g?s.createElement(Jl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function du(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fu=Bl(Kr,uu);var vt=s.forwardRef(function(e,t){return s.createElement(Xt,ve({},e,{ref:t,sideCar:fu}))});vt.classNames=Xt.classNames;var pu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,Tt=new WeakMap,Mt={},Pn=0,Xr=function(e){return e&&(e.host||Xr(e.parentNode))},mu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Xr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hu=function(e,t,n,o){var r=mu(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var a=Mt[n],i=[],c=new Set,u=new Set(r),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(c.has(h))f(h);else try{var g=h.getAttribute(o),w=g!==null&&g!=="false",m=(Ge.get(h)||0)+1,v=(a.get(h)||0)+1;Ge.set(h,m),a.set(h,v),i.push(h),m===1&&w&&Tt.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),c.clear(),Pn++,function(){i.forEach(function(p){var h=Ge.get(p)-1,g=a.get(p)-1;Ge.set(p,h),a.set(p,g),h||(Tt.has(p)||p.removeAttribute(o),Tt.delete(p)),g||p.removeAttribute(n)}),Pn--,Pn||(Ge=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Mt={})}},qt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=pu(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),hu(o,r,n,"aria-hidden")):function(){return null}},Zt="Dialog",[qr]=pe(Zt),[vu,me]=qr(Zt),Zr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Zt});return l.jsx(vu,{scope:t,triggerRef:c,contentRef:u,contentId:ue(),titleId:ue(),descriptionId:ue(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Zr.displayName=Zt;var Qr="DialogTrigger",Jr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(Qr,n),a=H(t,r.triggerRef);return l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":to(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)})});Jr.displayName=Qr;var Jn="DialogPortal",[gu,es]=qr(Jn,{forceMount:void 0}),ts=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=me(Jn,t);return l.jsx(gu,{scope:t,forceMount:n,children:s.Children.map(o,i=>l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:i})}))})};ts.displayName=Jn;var jt="DialogOverlay",ns=s.forwardRef((e,t)=>{const n=es(jt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(jt,e.__scopeDialog);return a.modal?l.jsx(oe,{present:o||a.open,children:l.jsx(xu,{...r,ref:t})}):null});ns.displayName=jt;var wu=De("DialogOverlay.RemoveScroll"),xu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(jt,n);return l.jsx(vt,{as:wu,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(k.div,{"data-state":to(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),je="DialogContent",os=s.forwardRef((e,t)=>{const n=es(je,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(je,e.__scopeDialog);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(yu,{...r,ref:t}):l.jsx(Cu,{...r,ref:t})})});os.displayName=je;var yu=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return qt(a)},[]),l.jsx(rs,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault())})}),Cu=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(rs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),rs=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,c=me(je,n),u=s.useRef(null),d=H(t,u);return Yt(),l.jsxs(l.Fragment,{children:[l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":to(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Eu,{titleId:c.titleId}),l.jsx(Ru,{contentRef:u,descriptionId:c.descriptionId})]})]})}),eo="DialogTitle",ss=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(eo,n);return l.jsx(k.h2,{id:r.titleId,...o,ref:t})});ss.displayName=eo;var as="DialogDescription",bu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(as,n);return l.jsx(k.p,{id:r.descriptionId,...o,ref:t})});bu.displayName=as;var is="DialogClose",cs=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(is,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});cs.displayName=is;function to(e){return e?"open":"closed"}var ls="DialogTitleWarning",[gv,us]=Hc(ls,{contentName:je,titleName:eo,docsSlug:"dialog"}),Eu=({titleId:e})=>{const t=us(ls),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},oa="DialogDescriptionWarning",ra=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pr(oa).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},sa=er,ia=nr,ca=rr,aa=sr,la=ir,ua=ar,da=dr;const fa="_dialogOverlay_1flkk_1",pa="_dialogContent_1flkk_20",ma="_dialogCloseButton_1flkk_65",va="_dialogTitle_1flkk_72",st={dialogOverlay:fa,dialogContent:pa,dialogCloseButton:ma,dialogTitle:va},ha=({trigger:e,content:t,title:n,...o})=>p.jsxs(sa,{...o,children:[p.jsx(ia,{asChild:!0,children:e}),p.jsxs(ca,{children:[p.jsx(aa,{className:`${st.dialogOverlay}`}),p.jsxs(la,{className:st.dialogContent,onPointerDownOutside:r=>{r?.preventDefault()},"data-size":"md",children:[p.jsx(da,{asChild:!0,children:p.jsx(Ve,{className:`${st.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(an,{})})}),p.jsx(ua,{className:st.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:g,children:x}=m,y=K.useRef(null),C=K.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:C,collectionRef:y,children:x})};c.displayName=t;const a=e+"CollectionSlot",d=je(a),l=K.forwardRef((m,g)=>{const{scope:x,children:y}=m,C=s(a,x),b=B(g,C.collectionRef);return p.jsx(d,{ref:b,children:y})});l.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",v=je(u),h=K.forwardRef((m,g)=>{const{scope:x,children:y,...C}=m,b=K.useRef(null),E=B(g,b),T=s(u,x);return K.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),p.jsx(v,{[f]:"",ref:E,children:y})});h.displayName=u;function w(m){const g=s(e+"CollectionConsumer",m);return K.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((T,R)=>C.indexOf(T.ref.current)-C.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:l,ItemSlot:h},w,o]}var ga=i.createContext(void 0);function mr(e){const t=i.useContext(ga);return e||t||"ltr"}const wa=["top","right","bottom","left"],ve=Math.min,G=Math.max,ft=Math.round,it=Math.floor,se=e=>({x:e,y:e}),xa={left:"right",right:"left",bottom:"top",top:"bottom"},ya={start:"end",end:"start"};function Yt(e,t,n){return G(e,ve(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function De(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Ca=new Set(["top","bottom"]);function re(e){return Ca.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function ba(e,t,n){n===void 0&&(n=!1);const o=De(e),r=yn(e),s=xn(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=pt(c)),[c,pt(c)]}function Ea(e){const t=pt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>ya[t])}const Jn=["left","right"],eo=["right","left"],Ra=["top","bottom"],Ta=["bottom","top"];function Sa(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?Ra:Ta;default:return[]}}function Pa(e,t,n,o){const r=De(e);let s=Sa(ue(e),n==="start",o);return r&&(s=s.map(c=>c+"-"+r),t&&(s=s.concat(s.map(Xt)))),s}function pt(e){return e.replace(/left|right|bottom|top/g,t=>xa[t])}function _a(e){return{top:0,right:0,bottom:0,left:0,...e}}function vr(e){return typeof e!="number"?_a(e):{top:e,right:e,bottom:e,left:e}}function mt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function to(e,t,n){let{reference:o,floating:r}=e;const s=re(t),c=yn(t),a=xn(c),d=ue(t),l=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,v=o[a]/2-r[a]/2;let h;switch(d){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(De(t)){case"start":h[c]-=v*(n&&l?-1:1);break;case"end":h[c]+=v*(n&&l?-1:1);break}return h}const Ma=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:c}=n,a=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let l=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=to(l,o,d),v=o,h={},w=0;for(let m=0;m<a.length;m++){const{name:g,fn:x}=a[m],{x:y,y:C,data:b,reset:E}=await x({x:u,y:f,initialPlacement:o,placement:v,strategy:r,middlewareData:h,rects:l,platform:c,elements:{reference:e,floating:t}});u=y??u,f=C??f,h={...h,[g]:{...h[g],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(l=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=to(l,v,d)),m=-1)}return{x:u,y:f,placement:v,strategy:r,middlewareData:h}};async function Fe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:c,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:v=!1,padding:h=0}=le(t,e),w=vr(h),g=a[v?f==="floating"?"reference":"floating":f],x=mt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:d})),y=f==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},E=mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:C,strategy:d}):y);return{top:(x.top-E.top+w.top)/b.y,bottom:(E.bottom-x.bottom+w.bottom)/b.y,left:(x.left-E.left+w.left)/b.x,right:(E.right-x.right+w.right)/b.x}}const Aa=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:c,elements:a,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=vr(u),v={x:n,y:o},h=yn(r),w=xn(h),m=await c.getDimensions(l),g=h==="y",x=g?"top":"left",y=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=s.reference[w]+s.reference[h]-v[h]-s.floating[w],E=v[h]-s.reference[h],T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l));let R=T?T[C]:0;(!R||!await(c.isElement==null?void 0:c.isElement(T)))&&(R=a.floating[C]||s.floating[w]);const M=b/2-E/2,N=R/2-m[w]/2-1,D=ve(f[x],N),k=ve(f[y],N),$=D,L=R-m[w]-k,P=R/2-m[w]/2+M,j=Yt($,P,L),O=!d.arrow&&De(r)!=null&&P!==j&&s.reference[w]/2-(P<$?D:k)-m[w]/2<0,F=O?P<$?P-$:P-L:0;return{[h]:v[h]+F,data:{[h]:j,centerOffset:P-j-F,...O&&{alignmentOffset:F}},reset:O}}}),Oa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:c,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=le(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ue(r),y=re(a),C=ue(a)===a,b=await(d.isRTL==null?void 0:d.isRTL(l.floating)),E=v||(C||!m?[pt(a)]:Ea(a)),T=w!=="none";!v&&T&&E.push(...Pa(a,m,w,b));const R=[a,...E],M=await Fe(t,g),N=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(M[x]),f){const P=ba(r,c,b);N.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var k,$;const P=(((k=s.flip)==null?void 0:k.index)||0)+1,j=R[P];if(j&&(!(f==="alignment"?y!==re(j):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:j}};let O=($=D.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!O)switch(h){case"bestFit":{var L;const F=(L=D.filter(A=>{if(T){const S=re(A.placement);return S===y||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,W)=>S+W,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:L[0];F&&(O=F);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function no(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return wa.some(t=>e[t]>=0)}const Da=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=le(e,t);switch(o){case"referenceHidden":{const s=await Fe(t,{...r,elementContext:"reference"}),c=no(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:oo(c)}}}case"escaped":{const s=await Fe(t,{...r,altBoundary:!0}),c=no(s,n.floating);return{data:{escapedOffsets:c,escaped:oo(c)}}}default:return{}}}}},hr=new Set(["left","top"]);async function Na(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=ue(n),a=De(n),d=re(n)==="y",l=hr.has(c)?-1:1,u=s&&d?-1:1,f=le(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(h=a==="end"?w*-1:w),d?{x:h*u,y:v*l}:{x:v*l,y:h*u}}const Ia=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:c,middlewareData:a}=t,d=await Na(t,e);return c===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:c}}}}},ka=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:g=>{let{x,y}=g;return{x,y}}},...d}=le(e,t),l={x:n,y:o},u=await Fe(t,d),f=re(ue(r)),v=wn(f);let h=l[v],w=l[f];if(s){const g=v==="y"?"top":"left",x=v==="y"?"bottom":"right",y=h+u[g],C=h-u[x];h=Yt(y,h,C)}if(c){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+u[g],C=w-u[x];w=Yt(y,w,C)}const m=a.fn({...t,[v]:h,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[v]:s,[f]:c}}}}}},La=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:c}=t,{offset:a=0,mainAxis:d=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:o},f=re(r),v=wn(f);let h=u[v],w=u[f];const m=le(a,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const C=v==="y"?"height":"width",b=s.reference[v]-s.floating[C]+g.mainAxis,E=s.reference[v]+s.reference[C]-g.mainAxis;h<b?h=b:h>E&&(h=E)}if(l){var x,y;const C=v==="y"?"width":"height",b=hr.has(ue(r)),E=s.reference[f]-s.floating[C]+(b&&((x=c.offset)==null?void 0:x[f])||0)+(b?0:g.crossAxis),T=s.reference[f]+s.reference[C]+(b?0:((y=c.offset)==null?void 0:y[f])||0)-(b?g.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[v]:h,[f]:w}}}},ja=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:c,elements:a}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),v=De(r),h=re(r)==="y",{width:w,height:m}=s.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=v===(await(c.isRTL==null?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,g=v==="end"?"top":"bottom");const y=m-u.top-u.bottom,C=w-u.left-u.right,b=ve(m-u[g],y),E=ve(w-u[x],C),T=!t.middlewareData.shift;let R=b,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),T&&!v){const D=G(u.left,0),k=G(u.right,0),$=G(u.top,0),L=G(u.bottom,0);h?M=w-2*(D!==0||k!==0?D+k:G(u.left,u.right)):R=m-2*($!==0||L!==0?$+L:G(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const N=await c.getDimensions(a.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function bt(){return typeof window<"u"}function Ne(e){return gr(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ce(e){var t;return(t=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return bt()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return bt()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return bt()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!bt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const Fa=new Set(["inline","contents"]);function Ge(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Fa.has(r)}const $a=new Set(["table","td","th"]);function Ba(e){return $a.has(Ne(e))}const Wa=[":popover-open",":modal"];function Et(e){return Wa.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ha=["transform","translate","scale","rotate","perspective"],Va=["transform","translate","scale","rotate","perspective","filter"],Ka=["paint","layout","strict","content"];function Cn(e){const t=bn(),n=J(e)?ee(e):e;return Ha.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Va.some(o=>(n.willChange||"").includes(o))||Ka.some(o=>(n.contain||"").includes(o))}function Ua(e){let t=he(e);for(;ie(t)&&!Me(t);){if(Cn(t))return t;if(Et(t))return null;t=he(t)}return null}function bn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ga=new Set(["html","body","#document"]);function Me(e){return Ga.has(Ne(e))}function ee(e){return z(e).getComputedStyle(e)}function Rt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ce(e);return ro(t)?t.host:t}function wr(e){const t=he(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ge(t)?t:wr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=wr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),c=z(r);if(s){const a=qt(c);return t.concat(c,c.visualViewport||[],Ge(r)?r:[],a&&n?$e(a):[])}return t.concat(r,$e(r,[],n))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,c=r?e.offsetHeight:o,a=ft(n)!==s||ft(o)!==c;return a&&(n=s,o=c),{width:n,height:o,$:a}}function En(e){return J(e)?e:e.contextElement}function _e(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=xr(t);let c=(s?ft(n.width):n.width)/o,a=(s?ft(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!a||!Number.isFinite(a))&&(a=1),{x:c,y:a}}const za=se(0);function yr(e){const t=z(e);return!bn()||!t.visualViewport?za:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ya(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=En(e);let c=se(1);t&&(o?J(o)&&(c=_e(o)):c=_e(e));const a=Ya(s,n,o)?yr(s):se(0);let d=(r.left+a.x)/c.x,l=(r.top+a.y)/c.y,u=r.width/c.x,f=r.height/c.y;if(s){const v=z(s),h=o&&J(o)?z(o):o;let w=v,m=qt(w);for(;m&&o&&h!==w;){const g=_e(m),x=m.getBoundingClientRect(),y=ee(m),C=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,b=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=C,l+=b,w=z(m),m=qt(w)}}return mt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=Rt(e).scrollLeft;return t?t.left+n:ye(ce(e)).left+n}function Cr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Xa(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",c=ce(o),a=t?Et(t.floating):!1;if(o===c||a&&s)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!s)&&((Ne(o)!=="body"||Ge(c))&&(d=Rt(o)),ie(o))){const h=ye(o);l=_e(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const v=c&&!f&&!s?Cr(c,d):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+v.x,y:n.y*l.y-d.scrollTop*l.y+u.y+v.y}}function qa(e){return Array.from(e.getClientRects())}function Za(e){const t=ce(e),n=Rt(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Tt(e);const a=-n.scrollTop;return ee(o).direction==="rtl"&&(c+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:c,y:a}}const so=25;function Qa(e,t){const n=z(e),o=ce(e),r=n.visualViewport;let s=o.clientWidth,c=o.clientHeight,a=0,d=0;if(r){s=r.width,c=r.height;const u=bn();(!u||u&&t==="fixed")&&(a=r.offsetLeft,d=r.offsetTop)}const l=Tt(o);if(l<=0){const u=o.ownerDocument,f=u.body,v=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-h);w<=so&&(s-=w)}else l<=so&&(s+=l);return{width:s,height:c,x:a,y:d}}const Ja=new Set(["absolute","fixed"]);function el(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),c=e.clientWidth*s.x,a=e.clientHeight*s.y,d=r*s.x,l=o*s.y;return{width:c,height:a,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=Qa(e,n);else if(t==="document")o=Za(ce(e));else if(J(t))o=el(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function br(e,t){const n=he(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||br(n,t)}function tl(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(a=>J(a)&&Ne(a)!=="body"),r=null;const s=ee(e).position==="fixed";let c=s?he(e):e;for(;J(c)&&!Me(c);){const a=ee(c),d=Cn(c);!d&&a.position==="fixed"&&(r=null),(s?!d&&!r:!d&&a.position==="static"&&!!r&&Ja.has(r.position)||Ge(c)&&!d&&br(e,c))?o=o.filter(u=>u!==c):r=a,c=he(c)}return t.set(e,o),o}function nl(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?Et(t)?[]:tl(t,this._c):[].concat(n),o],a=c[0],d=c.reduce((l,u)=>{const f=io(t,u,r);return l.top=G(f.top,l.top),l.right=ve(f.right,l.right),l.bottom=ve(f.bottom,l.bottom),l.left=G(f.left,l.left),l},io(t,a,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ol(e){const{width:t,height:n}=xr(e);return{width:t,height:n}}function rl(e,t,n){const o=ie(t),r=ce(t),s=n==="fixed",c=ye(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!s)if((Ne(t)!=="body"||Ge(r))&&(a=Rt(t)),o){const h=ye(t,!0,s,t);d.x=h.x+t.clientLeft,d.y=h.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?Cr(r,a):se(0),f=c.left+a.scrollLeft-d.x-u.x,v=c.top+a.scrollTop-d.y-u.y;return{x:f,y:v,width:c.width,height:c.height}}function Wt(e){return ee(e).position==="static"}function co(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ce(e)===n&&(n=n.ownerDocument.body),n}function Er(e,t){const n=z(e);if(Et(e))return n;if(!ie(e)){let r=he(e);for(;r&&!Me(r);){if(J(r)&&!Wt(r))return r;r=he(r)}return n}let o=co(e,t);for(;o&&Ba(o)&&Wt(o);)o=co(o,t);return o&&Me(o)&&Wt(o)&&!Cn(o)?n:o||Ua(e)||n}const sl=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,o=await n(e.floating);return{reference:rl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function il(e){return ee(e).direction==="rtl"}const cl={convertOffsetParentRelativeRectToViewportRelativeRect:Xa,getDocumentElement:ce,getClippingRect:nl,getOffsetParent:Er,getElementRects:sl,getClientRects:qa,getDimensions:ol,getScale:_e,isElement:J,isRTL:il};function Rr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function al(e,t){let n=null,o;const r=ce(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function c(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:v,height:h}=l;if(a||t(),!v||!h)return;const w=it(f),m=it(r.clientWidth-(u+v)),g=it(r.clientHeight-(f+h)),x=it(u),C={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,ve(1,d))||1};let b=!0;function E(T){const R=T[0].intersectionRatio;if(R!==d){if(!b)return c();R?c(!1,R):o=setTimeout(()=>{c(!1,1e-7)},1e3)}R===1&&!Rr(l,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return c(!0),s}function ll(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||s?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&a?al(l,n):null;let v=-1,h=null;c&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),l&&!d&&h.observe(l),h.observe(t));let w,m=d?ye(e):null;d&&g();function g(){const x=ye(e);m&&!Rr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=h)==null||x.disconnect(),h=null,d&&cancelAnimationFrame(w)}}const ul=Ia,dl=ka,fl=Oa,pl=ja,ml=Da,ao=Aa,vl=La,hl=(e,t,n)=>{const o=new Map,r={platform:cl,...n},s={...r.platform,_c:o};return Ma(e,t,{...r,platform:s})};var gl=typeof document<"u",wl=function(){},ut=gl?K.useLayoutEffect:wl;function vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!vt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!vt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Tr(e);return Math.round(t*n)/n}function Ht(e){const t=i.useRef(e);return ut(()=>{t.current=e}),t}function xl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:c}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[u,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=i.useState(o);vt(v,o)||h(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(A=>{A!==T.current&&(T.current=A,m(A))},[]),C=i.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),b=s||w,E=c||g,T=i.useRef(null),R=i.useRef(null),M=i.useRef(u),N=d!=null,D=Ht(d),k=Ht(r),$=Ht(l),L=i.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:n,middleware:v};k.current&&(A.platform=k.current),hl(T.current,R.current,A).then(S=>{const W={...S,isPositioned:$.current!==!1};P.current&&!vt(M.current,W)&&(M.current=W,sn.flushSync(()=>{f(W)}))})},[v,t,n,k,$]);ut(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=i.useRef(!1);ut(()=>(P.current=!0,()=>{P.current=!1}),[]),ut(()=>{if(b&&(T.current=b),E&&(R.current=E),b&&E){if(D.current)return D.current(b,E,L);L()}},[b,E,L,D,N]);const j=i.useMemo(()=>({reference:T,floating:R,setReference:y,setFloating:C}),[y,C]),O=i.useMemo(()=>({reference:b,floating:E}),[b,E]),F=i.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const S=lo(O.floating,u.x),W=lo(O.floating,u.y);return a?{...A,transform:"translate("+S+"px, "+W+"px)",...Tr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:W}},[n,a,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:L,refs:j,elements:O,floatingStyles:F}),[u,L,j,O,F])}const yl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ao({element:o.current,padding:r}).fn(n):{}:o?ao({element:o,padding:r}).fn(n):{}}}},Cl=(e,t)=>({...ul(e),options:[e,t]}),bl=(e,t)=>({...dl(e),options:[e,t]}),El=(e,t)=>({...vl(e),options:[e,t]}),Rl=(e,t)=>({...fl(e),options:[e,t]}),Tl=(e,t)=>({...pl(e),options:[e,t]}),Sl=(e,t)=>({...ml(e),options:[e,t]}),Pl=(e,t)=>({...yl(e),options:[e,t]});var _l="Arrow",Sr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sr.displayName=_l;var Ml=Sr,Rn="Popper",[Pr,St]=de(Rn),[Al,_r]=Pr(Rn),Mr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Al,{scope:t,anchor:o,onAnchorChange:r,children:n})};Mr.displayName=Rn;var Ar="PopperAnchor",Or=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=_r(Ar,n),c=i.useRef(null),a=B(t,c),d=i.useRef(null);return i.useEffect(()=>{const l=d.current;d.current=o?.current||c.current,l!==d.current&&s.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:a})});Or.displayName=Ar;var Tn="PopperContent",[Ol,Dl]=Pr(Tn),Dr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:w,...m}=e,g=_r(Tn,n),[x,y]=i.useState(null),C=B(t,H=>y(H)),[b,E]=i.useState(null),T=Mo(b),R=T?.width??0,M=T?.height??0,N=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],$=k.length>0,L={padding:D,boundary:k.filter(Il),altBoundary:$},{refs:P,floatingStyles:j,placement:O,isPositioned:F,middlewareData:A}=xl({strategy:"fixed",placement:N,whileElementsMounted:(...H)=>ll(...H,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Cl({mainAxis:r+M,alignmentAxis:c}),d&&bl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?El():void 0,...L}),d&&Rl({...L}),Tl({...L,apply:({elements:H,rects:Ie,availableWidth:Ys,availableHeight:Xs})=>{const{width:qs,height:Zs}=Ie.reference,Je=H.floating.style;Je.setProperty("--radix-popper-available-width",`${Ys}px`),Je.setProperty("--radix-popper-available-height",`${Xs}px`),Je.setProperty("--radix-popper-anchor-width",`${qs}px`),Je.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),b&&Pl({element:b,padding:a}),kl({arrowWidth:R,arrowHeight:M}),v&&Sl({strategy:"referenceHidden",...L})]}),[S,W]=kr(O),X=Y(w);ae(()=>{F&&X?.()},[F,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Qe,ge]=i.useState();return ae(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:F?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ol,{scope:n,placedSide:S,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":S,"data-align":W,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});Dr.displayName=Tn;var Nr="PopperArrow",Nl={top:"bottom",right:"left",bottom:"top",left:"right"},Ir=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Dl(Nr,o),c=Nl[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Ml,{...r,ref:n,style:{...r.style,display:"block"}})})});Ir.displayName=Nr;function Il(e){return e!==null}var kl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,c=r.arrow?.centerOffset!==0,a=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[l,u]=kr(n),f={start:"0%",center:"50%",end:"100%"}[u],v=(r.arrow?.x??0)+a/2,h=(r.arrow?.y??0)+d/2;let w="",m="";return l==="bottom"?(w=c?f:`${v}px`,m=`${-d}px`):l==="top"?(w=c?f:`${v}px`,m=`${o.floating.height+d}px`):l==="right"?(w=`${-d}px`,m=c?f:`${h}px`):l==="left"&&(w=`${o.floating.width+d}px`,m=c?f:`${h}px`),{data:{x:w,y:m}}}});function kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Lr=Mr,jr=Or,Fr=Dr,$r=Ir,Vt="rovingFocusGroup.onEntryFocus",Ll={bubbles:!1,cancelable:!0},ze="RovingFocusGroup",[Zt,Br,jl]=gn(ze),[Fl,Wr]=de(ze,[jl]),[$l,Bl]=Fl(ze),Hr=i.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wl,{...e,ref:t})})}));Hr.displayName=ze;var Wl=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,v=i.useRef(null),h=B(t,v),w=mr(s),[m,g]=Oe({prop:c,defaultProp:a??null,onChange:d,caller:ze}),[x,y]=i.useState(!1),C=Y(l),b=Br(n),E=i.useRef(!1),[T,R]=i.useState(0);return i.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(Vt,C),()=>M.removeEventListener(Vt,C)},[C]),p.jsx($l,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!x){const D=new CustomEvent(Vt,Ll);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const k=b().filter(O=>O.focusable),$=k.find(O=>O.active),L=k.find(O=>O.id===m),j=[$,L,...k].filter(Boolean).map(O=>O.ref.current);Ur(j,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>y(!1))})})}),Vr="RovingFocusGroupItem",Kr=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:c,...a}=e,d=we(),l=s||d,u=Bl(Vr,n),f=u.currentTabStopId===l,v=Br(n),{onFocusableItemAdd:h,onFocusableItemRemove:w,currentTabStopId:m}=u;return i.useEffect(()=>{if(o)return h(),()=>w()},[o,h,w]),p.jsx(Zt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:_(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=Kl(g,u.orientation,u.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let C=v().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const b=C.indexOf(g.currentTarget);C=u.loop?Ul(C,b+1):C.slice(b+1)}setTimeout(()=>Ur(C))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:m!=null}):c})})});Kr.displayName=Vr;var Hl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kl(e,t,n){const o=Vl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Hl[o]}function Ur(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Ul(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Gl=Hr,zl=Kr,Qt=["Enter"," "],Yl=["ArrowDown","PageUp","Home"],Gr=["ArrowUp","PageDown","End"],Xl=[...Yl,...Gr],ql={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},Zl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Be,Ql,Jl]=gn(Ye),[Ce,zr]=de(Ye,[Jl,St,Wr]),Pt=St(),Yr=Wr(),[eu,be]=Ce(Ye),[tu,Xe]=Ce(Ye),Xr=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:c=!0}=e,a=Pt(t),[d,l]=i.useState(null),u=i.useRef(!1),f=Y(s),v=mr(r);return i.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Lr,{...a,children:p.jsx(eu,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(tu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:v,modal:c,children:o})})})};Xr.displayName=Ye;var nu="MenuAnchor",Sn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(jr,{...r,...o,ref:t})});Sn.displayName=nu;var Pn="MenuPortal",[ou,qr]=Ce(Pn,{forceMount:void 0}),Zr=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=be(Pn,t);return p.jsx(ou,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Zr.displayName=Pn;var q="MenuContent",[ru,_n]=Ce(q),Qr=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=be(q,e.__scopeMenu),c=Xe(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:c.modal?p.jsx(su,{...r,ref:t}):p.jsx(iu,{...r,ref:t})})})})}),su=i.forwardRef((e,t)=>{const n=be(q,e.__scopeMenu),o=i.useRef(null),r=B(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(Mn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),iu=i.forwardRef((e,t)=>{const n=be(q,e.__scopeMenu);return p.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cu=je("MenuContent.ScrollLock"),Mn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:a,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,onDismiss:h,disableOutsideScroll:w,...m}=e,g=be(q,n),x=Xe(q,n),y=Pt(n),C=Yr(n),b=Ql(n),[E,T]=i.useState(null),R=i.useRef(null),M=B(t,R,g.onContentChange),N=i.useRef(0),D=i.useRef(""),k=i.useRef(0),$=i.useRef(null),L=i.useRef("right"),P=i.useRef(0),j=w?pn:i.Fragment,O=w?{as:cu,allowPinchZoom:!0}:void 0,F=S=>{const W=D.current+S,X=b().filter(H=>!H.disabled),Q=document.activeElement,ne=X.find(H=>H.ref.current===Q)?.textValue,fe=X.map(H=>H.textValue),Qe=xu(fe,W,ne),ge=X.find(H=>H.textValue===Qe)?.ref.current;(function H(Ie){D.current=Ie,window.clearTimeout(N.current),Ie!==""&&(N.current=window.setTimeout(()=>H(""),1e3))})(W),ge&&setTimeout(()=>ge.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Vo();const A=i.useCallback(S=>L.current===$.current?.side&&Cu(S,$.current?.area),[]);return p.jsx(ru,{scope:n,searchRef:D,onItemEnter:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:i.useCallback(S=>{A(S)||(R.current?.focus(),T(null))},[A]),onTriggerLeave:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:k,onPointerGraceIntentChange:i.useCallback(S=>{$.current=S},[]),children:p.jsx(j,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:_(s,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:p.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,onDismiss:h,children:p.jsx(Gl,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:_(d,S=>{x.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":ms(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:_(m.onKeyDown,S=>{const X=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Q=S.ctrlKey||S.altKey||S.metaKey,ne=S.key.length===1;X&&(S.key==="Tab"&&S.preventDefault(),!Q&&ne&&F(S.key));const fe=R.current;if(S.target!==fe||!Xl.includes(S.key))return;S.preventDefault();const ge=b().filter(H=>!H.disabled).map(H=>H.ref.current);Gr.includes(S.key)&&ge.reverse(),gu(ge)}),onBlur:_(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:_(e.onPointerMove,We(S=>{const W=S.target,X=P.current!==S.clientX;if(S.currentTarget.contains(W)&&X){const Q=S.clientX>P.current?"right":"left";L.current=Q,P.current=S.clientX}}))})})})})})})});Qr.displayName=q;var au="MenuGroup",An=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=au;var lu="MenuLabel",Jr=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Jr.displayName=lu;var ht="MenuItem",uo="menu.itemSelect",_t=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),c=Xe(ht,e.__scopeMenu),a=_n(ht,e.__scopeMenu),d=B(t,s),l=i.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const v=new CustomEvent(uo,{bubbles:!0,cancelable:!0});f.addEventListener(uo,h=>o?.(h),{once:!0}),un(f,v),v.defaultPrevented?l.current=!1:c.onClose()}};return p.jsx(es,{...r,ref:d,disabled:n,onClick:_(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,f=>{const v=a.searchRef.current!=="";n||v&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=ht;var es=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,c=_n(ht,n),a=Yr(n),d=i.useRef(null),l=B(t,d),[u,f]=i.useState(!1),[v,h]=i.useState("");return i.useEffect(()=>{const w=d.current;w&&h((w.textContent??"").trim())},[s.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:p.jsx(zl,{asChild:!0,...a,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:l,onPointerMove:_(e.onPointerMove,We(w=>{o?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,We(w=>c.onItemLeave(w))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),uu="MenuCheckboxItem",ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(is,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":Dn(n),onSelect:_(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ts.displayName=uu;var ns="MenuRadioGroup",[du,fu]=Ce(ns,{value:void 0,onValueChange:()=>{}}),os=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Y(o);return p.jsx(du,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(An,{...r,ref:t})})});os.displayName=ns;var rs="MenuRadioItem",ss=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=fu(rs,e.__scopeMenu),s=n===r.value;return p.jsx(is,{scope:e.__scopeMenu,checked:s,children:p.jsx(_t,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Dn(s),onSelect:_(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ss.displayName=rs;var On="MenuItemIndicator",[is,pu]=Ce(On,{checked:!1}),cs=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=pu(On,n);return p.jsx(Z,{present:o||gt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Dn(s.checked)})})});cs.displayName=On;var mu="MenuSeparator",as=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});as.displayName=mu;var vu="MenuArrow",ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx($r,{...r,...o,ref:t})});ls.displayName=vu;var hu="MenuSub",[Ef,us]=Ce(hu),Le="MenuSubTrigger",ds=i.forwardRef((e,t)=>{const n=be(Le,e.__scopeMenu),o=Xe(Le,e.__scopeMenu),r=us(Le,e.__scopeMenu),s=_n(Le,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:d}=s,l={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),d(null)}},[a,d]),p.jsx(Sn,{asChild:!0,...l,children:p.jsx(es,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ms(n.open),...e,ref:wt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:_(e.onPointerLeave,We(f=>{u();const v=n.content?.getBoundingClientRect();if(v){const h=n.content?.dataset.side,w=h==="right",m=w?-5:5,g=v[w?"left":"right"],x=v[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:g,y:v.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{const v=s.searchRef.current!=="";e.disabled||v&&f.key===" "||ql[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ds.displayName=Le;var fs="MenuSubContent",ps=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=be(q,e.__scopeMenu),c=Xe(q,e.__scopeMenu),a=us(fs,e.__scopeMenu),d=i.useRef(null),l=B(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(Mn,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{c.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:_(e.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,u=>{c.onClose(),u.preventDefault()}),onKeyDown:_(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),v=Zl[c.dir].includes(u.key);f&&v&&(s.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});ps.displayName=fs;function ms(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Dn(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function gu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function xu(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=wu(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const d=c.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function yu(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s],d=t[c],l=a.x,u=a.y,f=d.x,v=d.y;u>o!=v>o&&n<(f-l)*(o-u)/(v-u)+l&&(r=!r)}return r}function Cu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yu(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var bu=Xr,Eu=Sn,Ru=Zr,Tu=Qr,Su=An,Pu=Jr,_u=_t,Mu=ts,Au=os,Ou=ss,Du=cs,Nu=as,Iu=ls,ku=ds,Lu=ps,Mt="DropdownMenu",[ju]=de(Mt,[zr]),U=zr(),[Fu,vs]=ju(Mt),hs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:c,modal:a=!0}=e,d=U(t),l=i.useRef(null),[u,f]=Oe({prop:r,defaultProp:s??!1,onChange:c,caller:Mt});return p.jsx(Fu,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(v=>!v),[f]),modal:a,children:p.jsx(bu,{...d,open:u,onOpenChange:f,dir:o,modal:a,children:n})})};hs.displayName=Mt;var gs="DropdownMenuTrigger",ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=vs(gs,n),c=U(n);return p.jsx(Eu,{asChild:!0,...c,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:wt(t,s.triggerRef),onPointerDown:_(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:_(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ws.displayName=gs;var $u="DropdownMenuPortal",xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx(Ru,{...o,...n})};xs.displayName=$u;var ys="DropdownMenuContent",Cs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=vs(ys,n),s=U(n),c=i.useRef(!1);return p.jsx(Tu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,a=>{c.current||r.triggerRef.current?.focus(),c.current=!1,a.preventDefault()}),onInteractOutside:_(e.onInteractOutside,a=>{const d=a.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!r.modal||u)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cs.displayName=ys;var Bu="DropdownMenuGroup",Wu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Su,{...r,...o,ref:t})});Wu.displayName=Bu;var Hu="DropdownMenuLabel",Vu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Pu,{...r,...o,ref:t})});Vu.displayName=Hu;var Ku="DropdownMenuItem",bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(_u,{...r,...o,ref:t})});bs.displayName=Ku;var Uu="DropdownMenuCheckboxItem",Gu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Mu,{...r,...o,ref:t})});Gu.displayName=Uu;var zu="DropdownMenuRadioGroup",Yu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Au,{...r,...o,ref:t})});Yu.displayName=zu;var Xu="DropdownMenuRadioItem",qu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ou,{...r,...o,ref:t})});qu.displayName=Xu;var Zu="DropdownMenuItemIndicator",Qu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Du,{...r,...o,ref:t})});Qu.displayName=Zu;var Ju="DropdownMenuSeparator",ed=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Nu,{...r,...o,ref:t})});ed.displayName=Ju;var td="DropdownMenuArrow",Es=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Iu,{...r,...o,ref:t})});Es.displayName=td;var nd="DropdownMenuSubTrigger",od=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(ku,{...r,...o,ref:t})});od.displayName=nd;var rd="DropdownMenuSubContent",sd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Lu,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sd.displayName=rd;var id=hs,cd=ws,ad=xs,ld=Cs,ud=bs,dd=Es;const fd="_menuButtonContent_boy14_1",pd="_menuButtonItem_boy14_10",md="_menuButtonArrow_boy14_42",Jt={menuButtonContent:fd,menuButtonItem:pd,menuButtonArrow:md},vd=({children:e,...t})=>p.jsxs(id,{modal:!1,...t,children:[p.jsx(cd,{asChild:!0,children:p.jsx(Ve,{"data-variant":"tertiary",iconOnly:!0,icon:"Menu"})}),p.jsx(ad,{children:p.jsxs(ld,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(dd,{className:Jt.menuButtonArrow})]})})]}),hd=({children:e,...t})=>p.jsx(ud,{className:Jt.menuButtonItem,...t,children:e});var gd=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"}),wd="VisuallyHidden",At=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...gd,...e.style}}));At.displayName=wd;var xd=At,Nn="ToastProvider",[In,yd,Cd]=gn("Toast"),[Rs]=de("Toast",[Cd]),[bd,Ot]=Rs(Nn),Ts=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:c}=e,[a,d]=i.useState(null),[l,u]=i.useState(0),f=i.useRef(!1),v=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nn}\`. Expected non-empty \`string\`.`),p.jsx(In.Provider,{scope:t,children:p.jsx(bd,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:a,onViewportChange:d,onToastAdd:i.useCallback(()=>u(h=>h+1),[]),onToastRemove:i.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:v,children:c})})};Ts.displayName=Nn;var Ss="ToastViewport",Ed=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ps=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Ed,label:r="Notifications ({hotkey})",...s}=e,c=Ot(Ss,n),a=yd(n),d=i.useRef(null),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),v=B(t,f,c.onViewportChange),h=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=c.toastCount>0;i.useEffect(()=>{const g=x=>{o.length!==0&&o.every(C=>x[C]||x.code===C)&&f.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),i.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!c.isClosePausedRef.current){const T=new CustomEvent(en);x.dispatchEvent(T),c.isClosePausedRef.current=!0}},C=()=>{if(c.isClosePausedRef.current){const T=new CustomEvent(tn);x.dispatchEvent(T),c.isClosePausedRef.current=!1}},b=T=>{!g.contains(T.relatedTarget)&&C()},E=()=>{g.contains(document.activeElement)||C()};return g.addEventListener("focusin",y),g.addEventListener("focusout",b),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",C),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",C)}}},[w,c.isClosePausedRef]);const m=i.useCallback(({tabbingDirection:g})=>{const y=a().map(C=>{const b=C.ref.current,E=[b,...Ld(b)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const g=f.current;if(g){const x=y=>{const C=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!C){const E=document.activeElement,T=y.shiftKey;if(y.target===g&&T){l.current?.focus();return}const N=m({tabbingDirection:T?"backwards":"forwards"}),D=N.findIndex(k=>k===E);Kt(N.slice(D+1))?y.preventDefault():T?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[a,m]),p.jsxs(tc,{ref:d,role:"region","aria-label":r.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(nn,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Kt(g)}}),p.jsx(In.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...s,ref:v})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Kt(g)}})]})});Ps.displayName=Ss;var _s="ToastFocusProxy",nn=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ot(_s,n);return p.jsx(At,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:c=>{const a=c.relatedTarget;!s.viewport?.contains(a)&&o()}})});nn.displayName=_s;var qe="Toast",Rd="toast.swipeStart",Td="toast.swipeMove",Sd="toast.swipeCancel",Pd="toast.swipeEnd",Ms=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...c}=e,[a,d]=Oe({prop:o,defaultProp:r??!0,onChange:s,caller:qe});return p.jsx(Z,{present:n||a,children:p.jsx(Ad,{open:a,...c,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:_(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Ms.displayName=qe;var[_d,Md]=Rs(qe,{onClose(){}}),Ad=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:c,onEscapeKeyDown:a,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:v,onSwipeEnd:h,...w}=e,m=Ot(qe,n),[g,x]=i.useState(null),y=B(t,P=>x(P)),C=i.useRef(null),b=i.useRef(null),E=r||m.duration,T=i.useRef(0),R=i.useRef(E),M=i.useRef(0),{onToastAdd:N,onToastRemove:D}=m,k=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),c()}),$=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(k,P))},[k]);i.useEffect(()=>{const P=m.viewport;if(P){const j=()=>{$(R.current),l?.()},O=()=>{const F=new Date().getTime()-T.current;R.current=R.current-F,window.clearTimeout(M.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,j),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,j)}}},[m.viewport,E,d,l,$]),i.useEffect(()=>{s&&!m.isClosePausedRef.current&&$(E)},[s,E,m.isClosePausedRef,$]),i.useEffect(()=>(N(),()=>D()),[N,D]);const L=i.useMemo(()=>g?Ls(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[L&&p.jsx(Od,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:L}),p.jsx(_d,{scope:n,onClose:k,children:sn.createPortal(p.jsx(In.ItemSlot,{scope:n,children:p.jsx(ec,{asChild:!0,onEscapeKeyDown:_(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,P=>{P.key==="Escape"&&(a?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:_(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:_(e.onPointerMove,P=>{if(!C.current)return;const j=P.clientX-C.current.x,O=P.clientY-C.current.y,F=!!b.current,A=["left","right"].includes(m.swipeDirection),S=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,W=A?S(0,j):0,X=A?0:S(0,O),Q=P.pointerType==="touch"?10:2,ne={x:W,y:X},fe={originalEvent:P,delta:ne};F?(b.current=ne,ct(Td,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(b.current=ne,ct(Rd,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(j)>Q||Math.abs(O)>Q)&&(C.current=null)}),onPointerUp:_(e.onPointerUp,P=>{const j=b.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),b.current=null,C.current=null,j){const F=P.currentTarget,A={originalEvent:P,delta:j};fo(j,m.swipeDirection,m.swipeThreshold)?ct(Pd,h,A,{discrete:!0}):ct(Sd,v,A,{discrete:!0}),F.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Od=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(qe,t),[s,c]=i.useState(!1),[a,d]=i.useState(!1);return Id(()=>c(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:p.jsx(Ue,{asChild:!0,children:p.jsx(At,{...o,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},Dd="ToastTitle",As=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});As.displayName=Dd;var Nd="ToastDescription",Os=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Os.displayName=Nd;var Ds="ToastAction",Ns=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(ks,{altText:n,asChild:!0,children:p.jsx(kn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ds}\`. Expected non-empty \`string\`.`),null)});Ns.displayName=Ds;var Is="ToastClose",kn=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Md(Is,n);return p.jsx(ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,r.onClose)})})});kn.displayName=Is;var ks=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return p.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Ls(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),kd(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const c=o.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Ls(o))}}),t}function ct(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Id(e=()=>{}){const t=Y(e);ae(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function kd(e){return e.nodeType===e.ELEMENT_NODE}function Ld(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var jd=Ts,Fd=Ps,$d=Ms,Bd=As,Wd=Os,Hd=Ns,Vd=kn;const Kd="_toast_7o27j_1",Ud="_toastContent_7o27j_12",Gd="_toastViewport_7o27j_70",zd="_toastTitle_7o27j_89",Yd="_toastDescription_7o27j_95",Se={toast:Kd,toastContent:Ud,toastViewport:Gd,toastTitle:zd,toastDescription:Yd},Xd=({...e})=>p.jsx(jd,{...e}),js=K.forwardRef(({...e},t)=>p.jsx(Fd,{className:Se.toastViewport,ref:t,...e}));js.displayName="ToastViewport";const Fs=K.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs($d,{className:Se.toast,ref:r,...o,children:[p.jsxs("div",{className:Se.toastContent,children:[p.jsx(Bd,{className:Se.toastTitle,children:e}),t&&p.jsx(Wd,{className:Se.toastDescription,children:t})]}),n&&p.jsx(Hd,{className:Se.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(Vd,{asChild:!0,children:p.jsx(Ve,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));Fs.displayName="Toast";var[Dt]=de("Tooltip",[St]),Nt=St(),$s="TooltipProvider",qd=700,on="tooltip.open",[Zd,Ln]=Dt($s),Bs=e=>{const{__scopeTooltip:t,delayDuration:n=qd,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,c=i.useRef(!0),a=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(Zd,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:i.useCallback(l=>{a.current=l},[]),disableHoverableContent:r,children:s})};Bs.displayName=$s;var He="Tooltip",[Qd,Ze]=Dt(He),Ws=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:c,delayDuration:a}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=i.useState(null),v=we(),h=i.useRef(0),w=c??d.disableHoverableContent,m=a??d.delayDuration,g=i.useRef(!1),[x,y]=Oe({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),s?.(R)},caller:He}),C=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),b=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),T=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,y(!0),h.current=0},m)},[m,y]);return i.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(Lr,{...l,children:p.jsx(Qd,{scope:t,contentId:v,open:x,stateAttribute:C,trigger:u,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayedRef.current?T():b()},[d.isOpenDelayedRef,T,b]),onTriggerLeave:i.useCallback(()=>{w?E():(window.clearTimeout(h.current),h.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};Ws.displayName=He;var rn="TooltipTrigger",Hs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ze(rn,n),s=Ln(rn,n),c=Nt(n),a=i.useRef(null),d=B(t,a,r.onTriggerChange),l=i.useRef(!1),u=i.useRef(!1),f=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jr,{asChild:!0,...c,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:_(e.onPointerMove,v=>{v.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Hs.displayName=rn;var jn="TooltipPortal",[Jd,ef]=Dt(jn,{forceMount:void 0}),Vs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=Ze(jn,t);return p.jsx(Jd,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Vs.displayName=jn;var Ae="TooltipContent",Ks=i.forwardRef((e,t)=>{const n=ef(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,c=Ze(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||c.open,children:c.disableHoverableContent?p.jsx(Us,{side:r,...s,ref:t}):p.jsx(tf,{side:r,...s,ref:t})})}),tf=i.forwardRef((e,t)=>{const n=Ze(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=i.useRef(null),s=B(t,r),[c,a]=i.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,v=i.useCallback(()=>{a(null),f(!1)},[f]),h=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=sf(x,g.getBoundingClientRect()),C=cf(x,y),b=af(m.getBoundingClientRect()),E=uf([...C,...b]);a(E),f(!0)},[f]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(d&&u){const w=g=>h(g,u),m=g=>h(g,d);return d.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[d,u,h,v]),i.useEffect(()=>{if(c){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=d?.contains(g)||u?.contains(g),C=!lf(x,c);y?v():C&&(v(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,c,l,v]),p.jsx(Us,{...e,ref:s})}),[nf,of]=Dt(He,{isInside:!1}),rf=Ai("TooltipContent"),Us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:c,...a}=e,d=Ze(Ae,n),l=Nt(n),{onClose:u}=d;return i.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),i.useEffect(()=>{if(d.trigger){const f=v=>{v.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),p.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Fr,{"data-state":d.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(rf,{children:o}),p.jsx(nf,{scope:n,isInside:!0,children:p.jsx(xd,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Ks.displayName=Ae;var Gs="TooltipArrow",zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return of(Gs,n).isInside?null:p.jsx($r,{...r,...o,ref:t})});zs.displayName=Gs;function sf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function cf(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function af(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function lf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s],d=t[c],l=a.x,u=a.y,f=d.x,v=d.y;u>o!=v>o&&n<(f-l)*(o-u)/(v-u)+l&&(r=!r)}return r}function uf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),df(t)}function df(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ff=Bs,pf=Ws,mf=Hs,vf=Vs,hf=Ks,gf=zs;const wf="_tooltipContent_4rdhp_1",xf="_tooltipArrow_4rdhp_12",po={tooltipContent:wf,tooltipArrow:xf},yf=({...e})=>p.jsx(ff,{...e});function Cf({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...s}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(pf,{open:n,defaultOpen:o,onOpenChange:c=>{r?.(c)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(mf,{asChild:!0,children:e}),p.jsx(vf,{children:p.jsxs(hf,{className:po.tooltipContent,...s,sideOffset:4,children:[t,p.jsx(gf,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=ho;exports.ArrowRight=go;exports.Button=Ve;exports.Check=cn;exports.Checkbox=Ki;exports.Circle=wo;exports.Close=an;exports.Dialog=ha;exports.ExternalLink=xo;exports.Gear=yo;exports.Hammer=Co;exports.Heart=bo;exports.IconMap=Ut;exports.Kebab=Eo;exports.Lightning=Ro;exports.Mail=To;exports.Menu=So;exports.MenuButton=vd;exports.MenuButtonItem=hd;exports.NoMobile=Po;exports.Pencil=_o;exports.Spinner=ln;exports.Toast=Fs;exports.ToastProvider=Xd;exports.ToastViewport=js;exports.Tooltip=Cf;exports.TooltipProvider=yf;exports.createIcon=V;exports.iconSizes=gi;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Su="DialogDescriptionWarning",Ru=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${us(Su).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},_u=Zr,Pu=Jr,Tu=ts,Mu=ns,Au=os,Iu=ss,Nu=cs;const Ou="_dialogOverlay_1qzfk_1",ku="_dialogContent_1qzfk_20",Du="_dialogCloseButton_1qzfk_65",ju="_dialogTitle_1qzfk_72",At={dialogOverlay:Ou,dialogContent:ku,dialogCloseButton:Du,dialogTitle:ju},Lu=["sm","md","lg"],Fu=({trigger:e,children:t,title:n,size:o="md",...r})=>l.jsxs(_u,{...r,children:[l.jsx(Pu,{asChild:!0,children:e}),l.jsxs(Tu,{children:[l.jsx(Mu,{className:`${At.dialogOverlay}`}),l.jsxs(Au,{className:At.dialogContent,"data-size":o,onPointerDownOutside:a=>{a?.preventDefault()},children:[l.jsx(Nu,{asChild:!0,children:l.jsx(mt,{className:`${At.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:l.jsx(Xn,{})})}),l.jsx(Iu,{className:At.dialogTitle,children:n}),t]})]})]}),$u="_emptyState_nzjhq_1",Bu={emptyState:$u},Wu=({title:e,description:t,...n})=>l.jsxs("div",{className:Bu.emptyState,...n,children:[l.jsx("h2",{className:"header-2",children:e}),t&&l.jsx("p",{className:"subtitle-2",children:t})]}),Hu="_container_swxkv_1",Vu="_label_swxkv_8",Ku="_inputWrapper_swxkv_15",Uu="_input_swxkv_15",Gu="_startIcon_swxkv_68",zu="_endIcon_swxkv_69",Yu="_error_swxkv_88",Xu="_helperText_swxkv_94",Re={container:Hu,label:Vu,inputWrapper:Ku,input:Uu,startIcon:Gu,endIcon:zu,error:Yu,helperText:Xu},ds=O.forwardRef(({className:e,label:t,error:n,helperText:o,startIcon:r,endIcon:a,id:i,...c},u)=>{const d=O.useId(),f=i||d,p=o?`${f}-helper-text`:void 0,h=n?`${f}-error`:void 0,g=r?Ze[r]:void 0,w=a?Ze[a]:void 0;return l.jsxs("div",{className:`${Re.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:f,className:Re.label,children:t}),l.jsxs("div",{className:Re.inputWrapper,children:[g&&l.jsx("div",{className:Re.startIcon,children:l.jsx(g,{size:"md"})}),l.jsx("input",{ref:u,id:f,className:Re.input,"aria-invalid":!!n,"aria-describedby":h||p,"data-has-start-icon":!!r,"data-has-end-icon":!!a,"data-has-error":!!n,...c}),w&&l.jsx("div",{className:Re.endIcon,children:l.jsx(w,{size:"md"})})]}),n&&l.jsx("span",{id:h,className:Re.error,children:n}),o&&!n&&l.jsx("span",{id:p,className:Re.helperText,children:o})]})});ds.displayName="Input";function Qt(e){const t=e+"CollectionProvider",[n,o]=pe(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:y}=m,x=O.useRef(null),C=O.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=De(c),d=O.forwardRef((m,v)=>{const{scope:y,children:x}=m,C=a(c,y),b=H(v,C.collectionRef);return l.jsx(u,{ref:b,children:x})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=De(f),g=O.forwardRef((m,v)=>{const{scope:y,children:x,...C}=m,b=O.useRef(null),E=H(v,b),T=a(f,y);return O.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),l.jsx(h,{[p]:"",ref:E,children:x})});g.displayName=f;function w(m){const v=a(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,S)=>C.indexOf(T.ref.current)-C.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},w,o]}var qu=s.createContext(void 0);function no(e){const t=s.useContext(qu);return e||t||"ltr"}const Zu=["top","right","bottom","left"],Te=Math.min,se=Math.max,Lt=Math.round,It=Math.floor,we=e=>({x:e,y:e}),Qu={left:"right",right:"left",bottom:"top",top:"bottom"},Ju={start:"end",end:"start"};function kn(e,t,n){return se(e,Te(t,n))}function Ee(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function oo(e){return e==="x"?"y":"x"}function ro(e){return e==="y"?"height":"width"}const ed=new Set(["top","bottom"]);function ge(e){return ed.has(Se(e))?"y":"x"}function so(e){return oo(ge(e))}function td(e,t,n){n===void 0&&(n=!1);const o=tt(e),r=so(e),a=ro(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ft(i)),[i,Ft(i)]}function nd(e){const t=Ft(e);return[Dn(e),t,Dn(t)]}function Dn(e){return e.replace(/start|end/g,t=>Ju[t])}const Wo=["left","right"],Ho=["right","left"],od=["top","bottom"],rd=["bottom","top"];function sd(e,t,n){switch(e){case"top":case"bottom":return n?t?Ho:Wo:t?Wo:Ho;case"left":case"right":return t?od:rd;default:return[]}}function ad(e,t,n,o){const r=tt(e);let a=sd(Se(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(Dn)))),a}function Ft(e){return e.replace(/left|right|bottom|top/g,t=>Qu[t])}function id(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?id(e):{top:e,right:e,bottom:e,left:e}}function $t(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Vo(e,t,n){let{reference:o,floating:r}=e;const a=ge(t),i=so(t),c=ro(i),u=Se(t),d=a==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let g;switch(u){case"top":g={x:f,y:o.y-r.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(tt(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const cd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Vo(d,o,u),h=o,g={},w=0;for(let m=0;m<c.length;m++){const{name:v,fn:y}=c[m],{x,y:C,data:b,reset:E}=await y({x:f,y:p,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,g={...g,[v]:{...g[v],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=Vo(d,h,u)),m=-1)}return{x:f,y:p,placement:h,strategy:r,middlewareData:g}};async function ct(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=Ee(t,e),w=fs(g),v=c[h?p==="floating"?"reference":"floating":p],y=$t(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:f,strategy:u})),x=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),b=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=$t(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:C,strategy:u}):x);return{top:(y.top-E.top+w.top)/b.y,bottom:(E.bottom-y.bottom+w.bottom)/b.y,left:(y.left-E.left+w.left)/b.x,right:(E.right-y.right+w.right)/b.x}}const ld=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:f=0}=Ee(e,t)||{};if(d==null)return{};const p=fs(f),h={x:n,y:o},g=so(r),w=ro(g),m=await i.getDimensions(d),v=g==="y",y=v?"top":"left",x=v?"bottom":"right",C=v?"clientHeight":"clientWidth",b=a.reference[w]+a.reference[g]-h[g]-a.floating[w],E=h[g]-a.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let S=T?T[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(T)))&&(S=c.floating[C]||a.floating[w]);const A=b/2-E/2,j=S/2-m[w]/2-1,D=Te(p[y],j),L=Te(p[x],j),B=D,W=S-m[w]-L,P=S/2-m[w]/2+A,$=kn(B,P,W),N=!u.arrow&&tt(r)!=null&&P!==$&&a.reference[w]/2-(P<B?D:L)-m[w]/2<0,F=N?P<B?P-B:P-W:0;return{[g]:h[g]+F,data:{[g]:$,centerOffset:P-$-F,...N&&{alignmentOffset:F}},reset:N}}}),ud=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Ee(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(r),x=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!m?[Ft(c)]:nd(c)),T=w!=="none";!h&&T&&E.push(...ad(c,m,w,b));const S=[c,...E],A=await ct(t,v),j=[];let D=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&j.push(A[y]),p){const P=td(r,i,b);j.push(A[P[0]],A[P[1]])}if(D=[...D,{placement:r,overflows:j}],!j.every(P=>P<=0)){var L,B;const P=(((L=a.flip)==null?void 0:L.index)||0)+1,$=S[P];if($&&(!(p==="alignment"?x!==ge($):!1)||D.every(I=>ge(I.placement)===x?I.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let N=(B=D.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(g){case"bestFit":{var W;const F=(W=D.filter(I=>{if(T){const _=ge(I.placement);return _===x||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];F&&(N=F);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return Zu.some(t=>e[t]>=0)}const dd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ee(e,t);switch(o){case"referenceHidden":{const a=await ct(t,{...r,elementContext:"reference"}),i=Ko(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const a=await ct(t,{...r,altBoundary:!0}),i=Ko(a,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}},ps=new Set(["left","top"]);async function fd(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Se(n),c=tt(n),u=ge(n)==="y",d=ps.has(i)?-1:1,f=a&&u?-1:1,p=Ee(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(g=c==="end"?w*-1:w),u?{x:g*f,y:h*d}:{x:h*d,y:g*f}}const pd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:c}=t,u=await fd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:i}}}}},md=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...u}=Ee(e,t),d={x:n,y:o},f=await ct(t,u),p=ge(Se(r)),h=oo(p);let g=d[h],w=d[p];if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+f[v],C=g-f[y];g=kn(x,g,C)}if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=w+f[v],C=w-f[y];w=kn(x,w,C)}const m=c.fn({...t,[h]:g,[p]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:a,[p]:i}}}}}},hd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ee(e,t),f={x:n,y:o},p=ge(r),h=oo(p);let g=f[h],w=f[p];const m=Ee(c,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=h==="y"?"height":"width",b=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;g<b?g=b:g>E&&(g=E)}if(d){var y,x;const C=h==="y"?"width":"height",b=ps.has(Se(r)),E=a.reference[p]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[p])||0)+(b?0:v.crossAxis),T=a.reference[p]+a.reference[C]+(b?0:((x=i.offset)==null?void 0:x[p])||0)-(b?v.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:g,[p]:w}}}},vd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ee(e,t),f=await ct(t,d),p=Se(r),h=tt(r),g=ge(r)==="y",{width:w,height:m}=a.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=p,v=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,C=w-f.left-f.right,b=Te(m-f[v],x),E=Te(w-f[y],C),T=!t.middlewareData.shift;let S=b,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),T&&!h){const D=se(f.left,0),L=se(f.right,0),B=se(f.top,0),W=se(f.bottom,0);g?A=w-2*(D!==0||L!==0?D+L:se(f.left,f.right)):S=m-2*(B!==0||W!==0?B+W:se(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:S});const j=await i.getDimensions(c.floating);return w!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function nt(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(ms(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ms(e){return Jt()?e instanceof Node||e instanceof ae(e).Node:!1}function de(e){return Jt()?e instanceof Element||e instanceof ae(e).Element:!1}function xe(e){return Jt()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function Go(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}const gd=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!gd.has(r)}const wd=new Set(["table","td","th"]);function xd(e){return wd.has(nt(e))}const yd=[":popover-open",":modal"];function en(e){return yd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cd=["transform","translate","scale","rotate","perspective"],bd=["transform","translate","scale","rotate","perspective","filter"],Ed=["paint","layout","strict","content"];function ao(e){const t=io(),n=de(e)?fe(e):e;return Cd.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bd.some(o=>(n.willChange||"").includes(o))||Ed.some(o=>(n.contain||"").includes(o))}function Sd(e){let t=Me(e);for(;xe(t)&&!Qe(t);){if(ao(t))return t;if(en(t))return null;t=Me(t)}return null}function io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rd=new Set(["html","body","#document"]);function Qe(e){return Rd.has(nt(e))}function fe(e){return ae(e).getComputedStyle(e)}function tn(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Go(e)&&e.host||ye(e);return Go(t)?t.host:t}function hs(e){const t=Me(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&>(t)?t:hs(t)}function lt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=hs(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(a){const c=jn(i);return t.concat(i,i.visualViewport||[],gt(r)?r:[],c&&n?lt(c):[])}return t.concat(r,lt(r,[],n))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vs(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=xe(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Lt(n)!==a||Lt(o)!==i;return c&&(n=a,o=i),{width:n,height:o,$:c}}function co(e){return de(e)?e:e.contextElement}function qe(e){const t=co(e);if(!xe(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=vs(t);let i=(a?Lt(n.width):n.width)/o,c=(a?Lt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const _d=we(0);function gs(e){const t=ae(e);return!io()||!t.visualViewport?_d:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function Le(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=co(e);let i=we(1);t&&(o?de(o)&&(i=qe(o)):i=qe(e));const c=Pd(a,n,o)?gs(a):we(0);let u=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(a){const h=ae(a),g=o&&de(o)?ae(o):o;let w=h,m=jn(w);for(;m&&o&&g!==w;){const v=qe(m),y=m.getBoundingClientRect(),x=fe(m),C=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,p*=v.y,u+=C,d+=b,w=ae(m),m=jn(w)}}return $t({width:f,height:p,x:u,y:d})}function nn(e,t){const n=tn(e).scrollLeft;return t?t.left+n:Le(ye(e)).left+n}function ws(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-nn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Td(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=ye(o),c=t?en(t.floating):!1;if(o===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=we(1);const f=we(0),p=xe(o);if((p||!p&&!a)&&((nt(o)!=="body"||gt(i))&&(u=tn(o)),xe(o))){const g=Le(o);d=qe(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const h=i&&!p&&!a?ws(i,u):we(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function Md(e){return Array.from(e.getClientRects())}function Ad(e){const t=ye(e),n=tn(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+nn(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:c}}const zo=25;function Id(e,t){const n=ae(e),o=ye(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,c=0,u=0;if(r){a=r.width,i=r.height;const f=io();(!f||f&&t==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}const d=nn(o);if(d<=0){const f=o.ownerDocument,p=f.body,h=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-g);w<=zo&&(a-=w)}else d<=zo&&(a+=d);return{width:a,height:i,x:c,y:u}}const Nd=new Set(["absolute","fixed"]);function Od(e,t){const n=Le(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=xe(e)?qe(e):we(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,u=r*a.x,d=o*a.y;return{width:i,height:c,x:u,y:d}}function Yo(e,t,n){let o;if(t==="viewport")o=Id(e,n);else if(t==="document")o=Ad(ye(e));else if(de(t))o=Od(t,n);else{const r=gs(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $t(o)}function xs(e,t){const n=Me(e);return n===t||!de(n)||Qe(n)?!1:fe(n).position==="fixed"||xs(n,t)}function kd(e,t){const n=t.get(e);if(n)return n;let o=lt(e,[],!1).filter(c=>de(c)&&nt(c)!=="body"),r=null;const a=fe(e).position==="fixed";let i=a?Me(e):e;for(;de(i)&&!Qe(i);){const c=fe(i),u=ao(i);!u&&c.position==="fixed"&&(r=null),(a?!u&&!r:!u&&c.position==="static"&&!!r&&Nd.has(r.position)||gt(i)&&!u&&xs(e,i))?o=o.filter(f=>f!==i):r=c,i=Me(i)}return t.set(e,o),o}function Dd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?en(t)?[]:kd(t,this._c):[].concat(n),o],c=i[0],u=i.reduce((d,f)=>{const p=Yo(t,f,r);return d.top=se(p.top,d.top),d.right=Te(p.right,d.right),d.bottom=Te(p.bottom,d.bottom),d.left=se(p.left,d.left),d},Yo(t,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function jd(e){const{width:t,height:n}=vs(e);return{width:t,height:n}}function Ld(e,t,n){const o=xe(t),r=ye(t),a=n==="fixed",i=Le(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=we(0);function d(){u.x=nn(r)}if(o||!o&&!a)if((nt(t)!=="body"||gt(r))&&(c=tn(t)),o){const g=Le(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else r&&d();a&&!o&&r&&d();const f=r&&!o&&!a?ws(r,c):we(0),p=i.left+c.scrollLeft-u.x-f.x,h=i.top+c.scrollTop-u.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function Tn(e){return fe(e).position==="static"}function Xo(e,t){if(!xe(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function ys(e,t){const n=ae(e);if(en(e))return n;if(!xe(e)){let r=Me(e);for(;r&&!Qe(r);){if(de(r)&&!Tn(r))return r;r=Me(r)}return n}let o=Xo(e,t);for(;o&&xd(o)&&Tn(o);)o=Xo(o,t);return o&&Qe(o)&&Tn(o)&&!ao(o)?n:o||Sd(e)||n}const Fd=async function(e){const t=this.getOffsetParent||ys,n=this.getDimensions,o=await n(e.floating);return{reference:Ld(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $d(e){return fe(e).direction==="rtl"}const Bd={convertOffsetParentRelativeRectToViewportRelativeRect:Td,getDocumentElement:ye,getClippingRect:Dd,getOffsetParent:ys,getElementRects:Fd,getClientRects:Md,getDimensions:jd,getScale:qe,isElement:de,isRTL:$d};function Cs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wd(e,t){let n=null,o;const r=ye(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:h,height:g}=d;if(c||t(),!h||!g)return;const w=It(p),m=It(r.clientWidth-(f+h)),v=It(r.clientHeight-(p+g)),y=It(f),C={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let b=!0;function E(T){const S=T[0].intersectionRatio;if(S!==u){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Cs(d,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function Hd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=co(e),f=r||a?[...d?lt(d):[],...lt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&c?Wd(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let w,m=u?Le(e):null;u&&v();function v(){const y=Le(e);m&&!Cs(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),p?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(w)}}const Vd=pd,Kd=md,Ud=ud,Gd=vd,zd=dd,qo=ld,Yd=hd,Xd=(e,t,n)=>{const o=new Map,r={platform:Bd,...n},a={...r.platform,_c:o};return cd(e,t,{...r,platform:a})};var qd=typeof document<"u",Zd=function(){},Dt=qd?O.useLayoutEffect:Zd;function Bt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Bt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!Bt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function bs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=bs(e);return Math.round(t*n)/n}function Mn(e){const t=s.useRef(e);return Dt(()=>{t.current=e}),t}function Qd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=s.useState(o);Bt(h,o)||g(o);const[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useCallback(I=>{I!==T.current&&(T.current=I,m(I))},[]),C=s.useCallback(I=>{I!==S.current&&(S.current=I,y(I))},[]),b=a||w,E=i||v,T=s.useRef(null),S=s.useRef(null),A=s.useRef(f),j=u!=null,D=Mn(u),L=Mn(r),B=Mn(d),W=s.useCallback(()=>{if(!T.current||!S.current)return;const I={placement:t,strategy:n,middleware:h};L.current&&(I.platform=L.current),Xd(T.current,S.current,I).then(_=>{const z={..._,isPositioned:B.current!==!1};P.current&&!Bt(A.current,z)&&(A.current=z,pt.flushSync(()=>{p(z)}))})},[h,t,n,L,B]);Dt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[d]);const P=s.useRef(!1);Dt(()=>(P.current=!0,()=>{P.current=!1}),[]),Dt(()=>{if(b&&(T.current=b),E&&(S.current=E),b&&E){if(D.current)return D.current(b,E,W);W()}},[b,E,W,D,j]);const $=s.useMemo(()=>({reference:T,floating:S,setReference:x,setFloating:C}),[x,C]),N=s.useMemo(()=>({reference:b,floating:E}),[b,E]),F=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!N.floating)return I;const _=Zo(N.floating,f.x),z=Zo(N.floating,f.y);return c?{...I,transform:"translate("+_+"px, "+z+"px)",...bs(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,c,N.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:W,refs:$,elements:N,floatingStyles:F}),[f,W,$,N,F])}const Jd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?qo({element:o.current,padding:r}).fn(n):{}:o?qo({element:o,padding:r}).fn(n):{}}}},ef=(e,t)=>({...Vd(e),options:[e,t]}),tf=(e,t)=>({...Kd(e),options:[e,t]}),nf=(e,t)=>({...Yd(e),options:[e,t]}),of=(e,t)=>({...Ud(e),options:[e,t]}),rf=(e,t)=>({...Gd(e),options:[e,t]}),sf=(e,t)=>({...zd(e),options:[e,t]}),af=(e,t)=>({...Jd(e),options:[e,t]});var cf="Arrow",Es=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return l.jsx(k.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Es.displayName=cf;var lf=Es,lo="Popper",[Ss,Ae]=pe(lo),[uf,Rs]=Ss(lo),_s=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return l.jsx(uf,{scope:t,anchor:o,onAnchorChange:r,children:n})};_s.displayName=lo;var Ps="PopperAnchor",Ts=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Rs(Ps,n),i=s.useRef(null),c=H(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=o?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),o?null:l.jsx(k.div,{...r,ref:c})});Ts.displayName=Ps;var uo="PopperContent",[df,ff]=Ss(uo),Ms=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=Rs(uo,n),[y,x]=s.useState(null),C=H(t,M=>x(M)),[b,E]=s.useState(null),T=Tr(b),S=T?.width??0,A=T?.height??0,j=o+(a!=="center"?"-"+a:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(d)?d:[d],B=L.length>0,W={padding:D,boundary:L.filter(mf),altBoundary:B},{refs:P,floatingStyles:$,placement:N,isPositioned:F,middlewareData:I}=Qd({strategy:"fixed",placement:j,whileElementsMounted:(...M)=>Hd(...M,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[ef({mainAxis:r+A,alignmentAxis:i}),u&&tf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?nf():void 0,...W}),u&&of({...W}),rf({...W,apply:({elements:M,rects:K,availableWidth:J,availableHeight:U})=>{const{width:G,height:Y}=K.reference,ie=M.floating.style;ie.setProperty("--radix-popper-available-width",`${J}px`),ie.setProperty("--radix-popper-available-height",`${U}px`),ie.setProperty("--radix-popper-anchor-width",`${G}px`),ie.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),b&&af({element:b,padding:c}),hf({arrowWidth:S,arrowHeight:A}),h&&sf({strategy:"referenceHidden",...W})]}),[_,z]=Ns(N),X=ne(w);q(()=>{F&&X?.()},[F,X]);const Z=I.arrow?.x,te=I.arrow?.y,Q=I.arrow?.centerOffset!==0,[Ce,re]=s.useState();return q(()=>{y&&re(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:F?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(df,{scope:n,placedSide:_,onArrowChange:E,arrowX:Z,arrowY:te,shouldHideArrow:Q,children:l.jsx(k.div,{"data-side":_,"data-align":z,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});Ms.displayName=uo;var As="PopperArrow",pf={top:"bottom",right:"left",bottom:"top",left:"right"},Is=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=ff(As,o),i=pf[a.placedSide];return l.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:l.jsx(lf,{...r,ref:n,style:{...r.style,display:"block"}})})});Is.displayName=As;function mf(e){return e!==null}var hf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=Ns(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,g=(r.arrow?.y??0)+u/2;let w="",m="";return d==="bottom"?(w=i?p:`${h}px`,m=`${-u}px`):d==="top"?(w=i?p:`${h}px`,m=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,m=i?p:`${g}px`):d==="left"&&(w=`${o.floating.width+u}px`,m=i?p:`${g}px`),{data:{x:w,y:m}}}});function Ns(e){const[t,n="center"]=e.split("-");return[t,n]}var on=_s,wt=Ts,rn=Ms,sn=Is,An="rovingFocusGroup.onEntryFocus",vf={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[Ln,Os,gf]=Qt(xt),[wf,ks]=pe(xt,[gf]),[xf,yf]=wf(xt),Ds=s.forwardRef((e,t)=>l.jsx(Ln.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ln.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Cf,{...e,ref:t})})}));Ds.displayName=xt;var Cf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=s.useRef(null),g=H(t,h),w=no(a),[m,v]=be({prop:i,defaultProp:c??null,onChange:u,caller:xt}),[y,x]=s.useState(!1),C=ne(d),b=Os(n),E=s.useRef(!1),[T,S]=s.useState(0);return s.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(An,C),()=>A.removeEventListener(An,C)},[C]),l.jsx(xf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(A=>v(A),[v]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(A=>A+1),[]),onFocusableItemRemove:s.useCallback(()=>S(A=>A-1),[]),children:l.jsx(k.div,{tabIndex:y||T===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{E.current=!0}),onFocus:R(e.onFocus,A=>{const j=!E.current;if(A.target===A.currentTarget&&j&&!y){const D=new CustomEvent(An,vf);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=b().filter(N=>N.focusable),B=L.find(N=>N.active),W=L.find(N=>N.id===m),$=[B,W,...L].filter(Boolean).map(N=>N.ref.current);Fs($,f)}}E.current=!1}),onBlur:R(e.onBlur,()=>x(!1))})})}),js="RovingFocusGroupItem",Ls=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,children:i,...c}=e,u=ue(),d=a||u,f=yf(js,n),p=f.currentTabStopId===d,h=Os(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=f;return s.useEffect(()=>{if(o)return g(),()=>w()},[o,g,w]),l.jsx(Ln.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(k.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:R(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:R(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Sf(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=h().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const b=C.indexOf(v.currentTarget);C=f.loop?Rf(C,b+1):C.slice(b+1)}setTimeout(()=>Fs(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});Ls.displayName=js;var bf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ef(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sf(e,t,n){const o=Ef(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return bf[o]}function Fs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Rf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var _f=Ds,Pf=Ls,Fn=["Enter"," "],Tf=["ArrowDown","PageUp","Home"],$s=["ArrowUp","PageDown","End"],Mf=[...Tf,...$s],Af={ltr:[...Fn,"ArrowRight"],rtl:[...Fn,"ArrowLeft"]},If={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yt="Menu",[ut,Nf,Of]=Qt(yt),[He,Bs]=pe(yt,[Of,Ae,ks]),an=Ae(),Ws=ks(),[kf,Ve]=He(yt),[Df,Ct]=He(yt),Hs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=an(t),[u,d]=s.useState(null),f=s.useRef(!1),p=ne(a),h=no(r);return s.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(on,{...c,children:l.jsx(kf,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(Df,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:i,children:o})})})};Hs.displayName=yt;var jf="MenuAnchor",fo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(wt,{...r,...o,ref:t})});fo.displayName=jf;var po="MenuPortal",[Lf,Vs]=He(po,{forceMount:void 0}),Ks=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ve(po,t);return l.jsx(Lf,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Ks.displayName=po;var ce="MenuContent",[Ff,mo]=He(ce),Us=s.forwardRef((e,t)=>{const n=Vs(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx($f,{...r,ref:t}):l.jsx(Bf,{...r,ref:t})})})})}),$f=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return qt(a)},[]),l.jsx(ho,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu);return l.jsx(ho,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Wf=De("MenuContent.ScrollLock"),ho=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Ve(ce,n),y=Ct(ce,n),x=an(n),C=Ws(n),b=Nf(n),[E,T]=s.useState(null),S=s.useRef(null),A=H(t,S,v.onContentChange),j=s.useRef(0),D=s.useRef(""),L=s.useRef(0),B=s.useRef(null),W=s.useRef("right"),P=s.useRef(0),$=w?vt:s.Fragment,N=w?{as:Wf,allowPinchZoom:!0}:void 0,F=_=>{const z=D.current+_,X=b().filter(M=>!M.disabled),Z=document.activeElement,te=X.find(M=>M.ref.current===Z)?.textValue,Q=X.map(M=>M.textValue),Ce=Jf(Q,z,te),re=X.find(M=>M.textValue===Ce)?.ref.current;(function M(K){D.current=K,window.clearTimeout(j.current),K!==""&&(j.current=window.setTimeout(()=>M(""),1e3))})(z),re&&setTimeout(()=>re.focus())};s.useEffect(()=>()=>window.clearTimeout(j.current),[]),Yt();const I=s.useCallback(_=>W.current===B.current?.side&&tp(_,B.current?.area),[]);return l.jsx(Ff,{scope:n,searchRef:D,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(S.current?.focus(),T(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback(_=>{B.current=_},[]),children:l.jsx($,{...N,children:l.jsx(ht,{asChild:!0,trapped:r,onMountAutoFocus:R(a,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,children:l.jsx(_f,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:R(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(rn,{role:"menu","aria-orientation":"vertical","data-state":ia(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:R(m.onKeyDown,_=>{const X=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Z=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;X&&(_.key==="Tab"&&_.preventDefault(),!Z&&te&&F(_.key));const Q=S.current;if(_.target!==Q||!Mf.includes(_.key))return;_.preventDefault();const re=b().filter(M=>!M.disabled).map(M=>M.ref.current);$s.includes(_.key)&&re.reverse(),Zf(re)}),onBlur:R(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:R(e.onPointerMove,dt(_=>{const z=_.target,X=P.current!==_.clientX;if(_.currentTarget.contains(z)&&X){const Z=_.clientX>P.current?"right":"left";W.current=Z,P.current=_.clientX}}))})})})})})})});Us.displayName=ce;var Hf="MenuGroup",vo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"group",...o,ref:t})});vo.displayName=Hf;var Vf="MenuLabel",Gs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});Gs.displayName=Vf;var Wt="MenuItem",Qo="menu.itemSelect",cn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=s.useRef(null),i=Ct(Wt,e.__scopeMenu),c=mo(Wt,e.__scopeMenu),u=H(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const h=new CustomEvent(Qo,{bubbles:!0,cancelable:!0});p.addEventListener(Qo,g=>o?.(g),{once:!0}),Zn(p,h),h.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(zs,{...r,ref:u,disabled:n,onClick:R(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:R(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,p=>{const h=c.searchRef.current!=="";n||h&&p.key===" "||Fn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});cn.displayName=Wt;var zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,i=mo(Wt,n),c=Ws(n),u=s.useRef(null),d=H(t,u),[f,p]=s.useState(!1),[h,g]=s.useState("");return s.useEffect(()=>{const w=u.current;w&&g((w.textContent??"").trim())},[a.children]),l.jsx(ut.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:l.jsx(Pf,{asChild:!0,...c,focusable:!o,children:l.jsx(k.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:R(e.onPointerMove,dt(w=>{o?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,dt(w=>i.onItemLeave(w))),onFocus:R(e.onFocus,()=>p(!0)),onBlur:R(e.onBlur,()=>p(!1))})})})}),Kf="MenuCheckboxItem",Ys=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Js,{scope:e.__scopeMenu,checked:n,children:l.jsx(cn,{role:"menuitemcheckbox","aria-checked":Ht(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:R(r.onSelect,()=>o?.(Ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ys.displayName=Kf;var Xs="MenuRadioGroup",[Uf,Gf]=He(Xs,{value:void 0,onValueChange:()=>{}}),qs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=ne(o);return l.jsx(Uf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(vo,{...r,ref:t})})});qs.displayName=Xs;var Zs="MenuRadioItem",Qs=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=Gf(Zs,e.__scopeMenu),a=n===r.value;return l.jsx(Js,{scope:e.__scopeMenu,checked:a,children:l.jsx(cn,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":wo(a),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Qs.displayName=Zs;var go="MenuItemIndicator",[Js,zf]=He(go,{checked:!1}),ea=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=zf(go,n);return l.jsx(oe,{present:o||Ht(a.checked)||a.checked===!0,children:l.jsx(k.span,{...r,ref:t,"data-state":wo(a.checked)})})});ea.displayName=go;var Yf="MenuSeparator",ta=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ta.displayName=Yf;var Xf="MenuArrow",na=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(sn,{...r,...o,ref:t})});na.displayName=Xf;var qf="MenuSub",[wv,oa]=He(qf),at="MenuSubTrigger",ra=s.forwardRef((e,t)=>{const n=Ve(at,e.__scopeMenu),o=Ct(at,e.__scopeMenu),r=oa(at,e.__scopeMenu),a=mo(at,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]),l.jsx(fo,{asChild:!0,...d,children:l.jsx(zs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ia(n.open),...e,ref:Gt(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,dt(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,dt(p=>{f();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,w=g==="right",m=w?-5:5,v=h[w?"left":"right"],y=h[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,p=>{const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||Af[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});ra.displayName=at;var sa="MenuSubContent",aa=s.forwardRef((e,t)=>{const n=Vs(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu),c=oa(sa,e.__scopeMenu),u=s.useRef(null),d=H(t,u);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:l.jsx(ho,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),h=If[i.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});aa.displayName=sa;function ia(e){return e?"open":"closed"}function Ht(e){return e==="indeterminate"}function wo(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function Zf(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Qf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Jf(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Qf(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function ep(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function tp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ep(n,t)}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var np=Hs,op=fo,rp=Ks,sp=Us,ap=vo,ip=Gs,cp=cn,lp=Ys,up=qs,dp=Qs,fp=ea,pp=ta,mp=na,hp=ra,vp=aa,ln="DropdownMenu",[gp]=pe(ln,[Bs]),ee=Bs(),[wp,ca]=gp(ln),la=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=ee(t),d=s.useRef(null),[f,p]=be({prop:r,defaultProp:a??!1,onChange:i,caller:ln});return l.jsx(wp,{scope:t,triggerId:ue(),triggerRef:d,contentId:ue(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(h=>!h),[p]),modal:c,children:l.jsx(np,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};la.displayName=ln;var ua="DropdownMenuTrigger",da=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=ca(ua,n),i=ee(n);return l.jsx(op,{asChild:!0,...i,children:l.jsx(k.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Gt(t,a.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});da.displayName=ua;var xp="DropdownMenuPortal",fa=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ee(t);return l.jsx(rp,{...o,...n})};fa.displayName=xp;var pa="DropdownMenuContent",ma=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ca(pa,n),a=ee(n),i=s.useRef(!1);return l.jsx(sp,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ma.displayName=pa;var yp="DropdownMenuGroup",Cp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(ap,{...r,...o,ref:t})});Cp.displayName=yp;var bp="DropdownMenuLabel",Ep=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(ip,{...r,...o,ref:t})});Ep.displayName=bp;var Sp="DropdownMenuItem",ha=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(cp,{...r,...o,ref:t})});ha.displayName=Sp;var Rp="DropdownMenuCheckboxItem",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(lp,{...r,...o,ref:t})});_p.displayName=Rp;var Pp="DropdownMenuRadioGroup",Tp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(up,{...r,...o,ref:t})});Tp.displayName=Pp;var Mp="DropdownMenuRadioItem",Ap=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(dp,{...r,...o,ref:t})});Ap.displayName=Mp;var Ip="DropdownMenuItemIndicator",Np=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(fp,{...r,...o,ref:t})});Np.displayName=Ip;var Op="DropdownMenuSeparator",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(pp,{...r,...o,ref:t})});kp.displayName=Op;var Dp="DropdownMenuArrow",va=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(mp,{...r,...o,ref:t})});va.displayName=Dp;var jp="DropdownMenuSubTrigger",Lp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(hp,{...r,...o,ref:t})});Lp.displayName=jp;var Fp="DropdownMenuSubContent",$p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(vp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$p.displayName=Fp;var Bp=la,Wp=da,Hp=fa,Vp=ma,Kp=ha,Up=va;const Gp="_menuButtonContent_gcc8s_1",zp="_menuButtonItem_gcc8s_13",Yp="_menuButtonItemLabel_gcc8s_41",Xp="_menuButtonArrow_gcc8s_46",Vt={menuButtonContent:Gp,menuButtonItem:zp,menuButtonItemLabel:Yp,menuButtonArrow:Xp},qp=({children:e,trigger:t,...n})=>l.jsxs(Bp,{modal:!1,...n,children:[l.jsx(Wp,{asChild:!0,children:t}),l.jsx(Hp,{children:l.jsxs(Vp,{align:"end",className:Vt.menuButtonContent,sideOffset:5,children:[e,l.jsx(Up,{className:Vt.menuButtonArrow})]})})]}),Zp=({children:e,icon:t,...n})=>{const o=t?Ze[t]:void 0;return l.jsxs(Kp,{className:Vt.menuButtonItem,...n,children:[o&&l.jsx(o,{size:"md",className:"text-color-secondary"}),l.jsx("label",{className:`label-3 text-color-secondary ${Vt.menuButtonItemLabel}`,children:e})]})};var un="Popover",[ga]=pe(un,[Ae]),bt=Ae(),[Qp,Ie]=ga(un),wa=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!1}=e,c=bt(t),u=s.useRef(null),[d,f]=s.useState(!1),[p,h]=be({prop:o,defaultProp:r??!1,onChange:a,caller:un});return l.jsx(on,{...c,children:l.jsx(Qp,{scope:t,contentId:ue(),triggerRef:u,open:p,onOpenChange:h,onOpenToggle:s.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>f(!0),[]),onCustomAnchorRemove:s.useCallback(()=>f(!1),[]),modal:i,children:n})})};wa.displayName=un;var xa="PopoverAnchor",Jp=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(xa,n),a=bt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(wt,{...a,...o,ref:t})});Jp.displayName=xa;var ya="PopoverTrigger",Ca=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(ya,n),a=bt(n),i=H(t,r.triggerRef),c=l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ta(r.open),...o,ref:i,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:l.jsx(wt,{asChild:!0,...a,children:c})});Ca.displayName=ya;var xo="PopoverPortal",[em,tm]=ga(xo,{forceMount:void 0}),ba=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ie(xo,t);return l.jsx(em,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};ba.displayName=xo;var Je="PopoverContent",Ea=s.forwardRef((e,t)=>{const n=tm(Je,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ie(Je,e.__scopePopover);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(om,{...r,ref:t}):l.jsx(rm,{...r,ref:t})})});Ea.displayName=Je;var nm=De("PopoverContent.RemoveScroll"),om=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(null),r=H(t,o),a=s.useRef(!1);return s.useEffect(()=>{const i=o.current;if(i)return qt(i)},[]),l.jsx(vt,{as:nm,allowPinchZoom:!0,children:l.jsx(Sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),rm=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(Sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Sa=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,h=Ie(Je,n),g=bt(n);return Yt(),l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(rn,{"data-state":Ta(h.open),role:"dialog",id:h.contentId,...g,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ra="PopoverClose",_a=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(Ra,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});_a.displayName=Ra;var sm="PopoverArrow",Pa=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=bt(n);return l.jsx(sn,{...r,...o,ref:t})});Pa.displayName=sm;function Ta(e){return e?"open":"closed"}var am=wa,im=Ca,cm=ba,lm=Ea,um=_a,dm=Pa;const fm="_popover_bk0al_2",pm="_popoverContent_bk0al_34",mm="_popoverArrow_bk0al_38",hm="_popoverClose_bk0al_42",st={popover:fm,popoverContent:pm,popoverArrow:mm,popoverClose:hm},vm=({trigger:e,title:t,size:n="md",popoverContent:o,...r})=>l.jsxs(am,{children:[l.jsx(im,{asChild:!0,children:e}),l.jsx(cm,{children:l.jsxs(lm,{side:"right",className:st.popover,...r,sideOffset:5,"data-size":n,children:[t&&l.jsx("h2",{className:`header-3 ${st.popoverTitle}`,children:t}),l.jsx("div",{className:st.popoverContent,children:o}),l.jsx("div",{className:st.popoverClose,children:l.jsx(um,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",size:"sm",iconOnly:!0,icon:"Close"})})}),l.jsx(dm,{className:st.popoverArrow})]})})]});function Jo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ma=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"}),gm="VisuallyHidden",dn=s.forwardRef((e,t)=>l.jsx(k.span,{...e,ref:t,style:{...Ma,...e.style}}));dn.displayName=gm;var wm=dn,xm=[" ","Enter","ArrowUp","ArrowDown"],ym=[" ","Enter"],Fe="Select",[fn,pn,Cm]=Qt(Fe),[ot]=pe(Fe,[Cm,Ae]),mn=Ae(),[bm,Ne]=ot(Fe),[Em,Sm]=ot(Fe),Aa=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:g,form:w}=e,m=mn(t),[v,y]=s.useState(null),[x,C]=s.useState(null),[b,E]=s.useState(!1),T=no(d),[S,A]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Fe}),[j,D]=be({prop:i,defaultProp:c,onChange:u,caller:Fe}),L=s.useRef(null),B=v?w||!!v.closest("form"):!0,[W,P]=s.useState(new Set),$=Array.from(W).map(N=>N.props.value).join(";");return l.jsx(on,{...m,children:l.jsxs(bm,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:E,contentId:ue(),value:j,onValueChange:D,open:S,onOpenChange:A,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[l.jsx(fn.Provider,{scope:t,children:l.jsx(Em,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(N=>{P(F=>new Set(F).add(N))},[]),onNativeOptionRemove:s.useCallback(N=>{P(F=>{const I=new Set(F);return I.delete(N),I})},[]),children:n})}),B?l.jsxs(qa,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:j,onChange:N=>D(N.target.value),disabled:h,form:w,children:[j===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Aa.displayName=Fe;var Ia="SelectTrigger",Na=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=mn(n),i=Ne(Ia,n),c=i.disabled||o,u=H(t,i.onTriggerChange),d=pn(n),f=s.useRef("touch"),[p,h,g]=Qa(m=>{const v=d().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),x=Ja(v,m,y);x!==void 0&&i.onValueChange(x.value)}),w=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(wt,{asChild:!0,...a,children:l.jsx(k.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Za(i.value)?"":void 0,...r,ref:u,onClick:R(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&w(m)}),onPointerDown:R(r.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:R(r.onKeyDown,m=>{const v=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&xm.includes(m.key)&&(w(),m.preventDefault())})})})});Na.displayName=Ia;var Oa="SelectValue",ka=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:i="",...c}=e,u=Ne(Oa,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=H(t,u.onValueNodeChange);return q(()=>{d(f)},[d,f]),l.jsx(k.span,{...c,ref:p,style:{pointerEvents:"none"},children:Za(u.value)?l.jsx(l.Fragment,{children:i}):a})});ka.displayName=Oa;var Rm="SelectIcon",Da=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(k.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Da.displayName=Rm;var _m="SelectPortal",ja=e=>l.jsx(We,{asChild:!0,...e});ja.displayName=_m;var $e="SelectContent",La=s.forwardRef((e,t)=>{const n=Ne($e,e.__scopeSelect),[o,r]=s.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?pt.createPortal(l.jsx(Fa,{scope:e.__scopeSelect,children:l.jsx(fn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx($a,{...e,ref:t})});La.displayName=$e;var le=10,[Fa,Oe]=ot($e),Pm="SelectContentImpl",Tm=De("SelectContent.RemoveScroll"),$a=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,x=Ne($e,n),[C,b]=s.useState(null),[E,T]=s.useState(null),S=H(t,M=>b(M)),[A,j]=s.useState(null),[D,L]=s.useState(null),B=pn(n),[W,P]=s.useState(!1),$=s.useRef(!1);s.useEffect(()=>{if(C)return qt(C)},[C]),Yt();const N=s.useCallback(M=>{const[K,...J]=B().map(Y=>Y.ref.current),[U]=J.slice(-1),G=document.activeElement;for(const Y of M)if(Y===G||(Y?.scrollIntoView({block:"nearest"}),Y===K&&E&&(E.scrollTop=0),Y===U&&E&&(E.scrollTop=E.scrollHeight),Y?.focus(),document.activeElement!==G))return},[B,E]),F=s.useCallback(()=>N([A,C]),[N,A,C]);s.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:I,triggerPointerDownPosRef:_}=x;s.useEffect(()=>{if(C){let M={x:0,y:0};const K=U=>{M={x:Math.abs(Math.round(U.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(U.pageY)-(_.current?.y??0))}},J=U=>{M.x<=10&&M.y<=10?U.preventDefault():C.contains(U.target)||I(!1),document.removeEventListener("pointermove",K),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const M=()=>I(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[I]);const[z,X]=Qa(M=>{const K=B().filter(G=>!G.disabled),J=K.find(G=>G.ref.current===document.activeElement),U=Ja(K,M,J);U&&setTimeout(()=>U.ref.current.focus())}),Z=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&(j(M),U&&($.current=!0))},[x.value]),te=s.useCallback(()=>C?.focus(),[C]),Q=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&L(M)},[x.value]),Ce=o==="popper"?$n:Ba,re=Ce===$n?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(Fa,{scope:n,content:C,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:A,onItemLeave:te,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:z,children:l.jsx(vt,{as:Tm,allowPinchZoom:!0,children:l.jsx(ht,{asChild:!0,trapped:x.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:R(r,M=>{x.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:M=>M.preventDefault(),...y,...re,onPlaced:()=>P(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,M=>{const K=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!K&&M.key.length===1&&X(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let U=B().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(M.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const G=M.target,Y=U.indexOf(G);U=U.slice(Y+1)}setTimeout(()=>N(U)),M.preventDefault()}})})})})})})});$a.displayName=Pm;var Mm="SelectItemAlignedPosition",Ba=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Ne($e,n),i=Oe($e,n),[c,u]=s.useState(null),[d,f]=s.useState(null),p=H(t,S=>f(S)),h=pn(n),g=s.useRef(!1),w=s.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&m&&v&&y){const S=a.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const G=D.left-A.left,Y=j.left-G,ie=S.left-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.left=yn+"px"}else{const G=A.right-D.right,Y=window.innerWidth-j.right-G,ie=window.innerWidth-S.right-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.right=yn+"px"}const L=h(),B=window.innerHeight-le*2,W=m.scrollHeight,P=window.getComputedStyle(d),$=parseInt(P.borderTopWidth,10),N=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),I=parseInt(P.paddingBottom,10),_=$+N+W+I+F,z=Math.min(v.offsetHeight*5,_),X=window.getComputedStyle(m),Z=parseInt(X.paddingTop,10),te=parseInt(X.paddingBottom,10),Q=S.top+S.height/2-le,Ce=B-Q,re=v.offsetHeight/2,M=v.offsetTop+re,K=$+N+M,J=_-K;if(K<=Q){const G=L.length>0&&v===L[L.length-1].ref.current;c.style.bottom="0px";const Y=d.clientHeight-m.offsetTop-m.offsetHeight,ie=Math.max(Ce,re+(G?te:0)+Y+F),ke=K+ie;c.style.height=ke+"px"}else{const G=L.length>0&&v===L[0].ref.current;c.style.top="0px";const ie=Math.max(Q,$+m.offsetTop+(G?Z:0)+re)+J;c.style.height=ie+"px",m.scrollTop=K-Q+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=z+"px",c.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,m,v,y,a.dir,o]);q(()=>C(),[C]);const[b,E]=s.useState();q(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const T=s.useCallback(S=>{S&&w.current===!0&&(C(),x?.(),w.current=!1)},[C,x]);return l.jsx(Im,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(k.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Ba.displayName=Mm;var Am="SelectPopperPosition",$n=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...a}=e,i=mn(n);return l.jsx(rn,{...i,...a,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});$n.displayName=Am;var[Im,yo]=ot($e,{}),Bn="SelectViewport",Wa=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=Oe(Bn,n),i=yo(Bn,n),c=H(t,a.onViewportChange),u=s.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(fn.Slot,{scope:n,children:l.jsx(k.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=i;if(h?.current&&p){const g=Math.abs(u.current-f.scrollTop);if(g>0){const w=window.innerHeight-le*2,m=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(m,v);if(y<w){const x=y+g,C=Math.min(w,x),b=x-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Wa.displayName=Bn;var Ha="SelectGroup",[Nm,Om]=ot(Ha),km=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ue();return l.jsx(Nm,{scope:n,id:r,children:l.jsx(k.div,{role:"group","aria-labelledby":r,...o,ref:t})})});km.displayName=Ha;var Va="SelectLabel",Dm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Om(Va,n);return l.jsx(k.div,{id:r.id,...o,ref:t})});Dm.displayName=Va;var Kt="SelectItem",[jm,Ka]=ot(Kt),Ua=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...i}=e,c=Ne(Kt,n),u=Oe(Kt,n),d=c.value===o,[f,p]=s.useState(a??""),[h,g]=s.useState(!1),w=H(t,x=>u.itemRefCallback?.(x,o,r)),m=ue(),v=s.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(jm,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:s.useCallback(x=>{p(C=>C||(x?.textContent??"").trim())},[]),children:l.jsx(fn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(k.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:w,onFocus:R(i.onFocus,()=>g(!0)),onBlur:R(i.onBlur,()=>g(!1)),onClick:R(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:R(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:R(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:R(i.onPointerMove,x=>{v.current=x.pointerType,r?u.onItemLeave?.():v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:R(i.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(ym.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Ua.displayName=Kt;var it="SelectItemText",Ga=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,i=Ne(it,n),c=Oe(it,n),u=Ka(it,n),d=Sm(it,n),[f,p]=s.useState(null),h=H(t,y=>p(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),g=f?.textContent,w=s.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return q(()=>(m(w),()=>v(w)),[m,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});Ga.displayName=it;var za="SelectItemIndicator",Ya=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Ka(za,n).isSelected?l.jsx(k.span,{"aria-hidden":!0,...o,ref:t}):null});Ya.displayName=za;var Wn="SelectScrollUpButton",Lm=s.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=yo(Wn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Lm.displayName=Wn;var Hn="SelectScrollDownButton",Fm=s.forwardRef((e,t)=>{const n=Oe(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Fm.displayName=Hn;var Xa=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Oe("SelectScrollButton",n),i=s.useRef(null),c=pn(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),q(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),l.jsx(k.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{u()})})}),$m="SelectSeparator",Bm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(k.div,{"aria-hidden":!0,...o,ref:t})});Bm.displayName=$m;var Vn="SelectArrow",Wm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=mn(n),a=Ne(Vn,n),i=Oe(Vn,n);return a.open&&i.position==="popper"?l.jsx(sn,{...r,...o,ref:t}):null});Wm.displayName=Vn;var Hm="SelectBubbleInput",qa=s.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=s.useRef(null),a=H(o,r),i=Pr(t);return s.useEffect(()=>{const c=r.current;if(!c)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(p)}},[i,t]),l.jsx(k.select,{...n,style:{...Ma,...n.style},ref:a,defaultValue:t})});qa.displayName=Hm;function Za(e){return e===""||e===void 0}function Qa(e){const t=ne(e),n=s.useRef(""),o=s.useRef(0),r=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function Ja(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Vm(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Vm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Km=Aa,Um=Na,Gm=ka,zm=Da,Ym=ja,Xm=La,qm=Wa,Zm=Ua,Qm=Ga,Jm=Ya;const eh="_container_1ka3x_1",th="_label_1ka3x_9",nh="_trigger_1ka3x_16",oh="_icon_1ka3x_55",rh="_content_1ka3x_61",sh="_viewport_1ka3x_71",ah="_item_1ka3x_75",ih="_itemIndicator_1ka3x_93",ch="_error_1ka3x_106",lh="_helperText_1ka3x_112",he={container:eh,label:th,trigger:nh,icon:oh,content:rh,viewport:sh,item:ah,itemIndicator:ih,error:ch,helperText:lh},ei=({label:e,error:t,helperText:n,placeholder:o="Select an option...",children:r,...a})=>{const i=O.useId(),c=a.name||i,u=n?`${c}-helper-text`:void 0,d=t?`${c}-error`:void 0;return l.jsxs("div",{className:he.container,children:[e&&l.jsx("label",{htmlFor:c,className:he.label,children:e}),l.jsxs(Km,{...a,children:[l.jsxs(Um,{id:c,className:he.trigger,"aria-invalid":!!t,"aria-describedby":d||u,"data-has-error":!!t,children:[l.jsx(Gm,{placeholder:o}),l.jsx(zm,{className:he.icon,children:l.jsx(ir,{size:"md"})})]}),l.jsx(Ym,{children:l.jsx(Xm,{className:he.content,position:"popper",sideOffset:5,children:l.jsx(qm,{className:he.viewport,children:r})})})]}),t&&l.jsx("span",{id:d,className:he.error,children:t}),n&&!t&&l.jsx("span",{id:u,className:he.helperText,children:n})]})},ti=O.forwardRef(({children:e,className:t,...n},o)=>l.jsxs(Zm,{className:`${he.item} ${t??""}`,...n,ref:o,children:[l.jsx(Qm,{className:"label-1",children:e}),l.jsx(Jm,{className:he.itemIndicator,children:l.jsx(Ut,{size:"sm"})})]}));ti.displayName="SelectItem";ei.displayName="SelectInput";const uh="_container_1wksd_1",dh="_label_1wksd_8",fh="_inputWrapper_1wksd_15",ph="_textArea_1wksd_21",mh="_error_1wksd_60",hh="_helperText_1wksd_66",ze={container:uh,label:dh,inputWrapper:fh,textArea:ph,error:mh,helperText:hh},ni=O.forwardRef(({className:e,label:t,error:n,helperText:o,id:r,...a},i)=>{const c=O.useId(),u=r||c,d=o?`${u}-helper-text`:void 0,f=n?`${u}-error`:void 0;return l.jsxs("div",{className:`${ze.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:u,className:ze.label,children:t}),l.jsx("div",{className:ze.inputWrapper,children:l.jsx("textarea",{ref:i,id:u,className:ze.textArea,"aria-invalid":!!n,"aria-describedby":f||d,"data-has-error":!!n,...a})}),n&&l.jsx("span",{id:f,className:ze.error,children:n}),o&&!n&&l.jsx("span",{id:d,className:ze.helperText,children:o})]})});ni.displayName="TextArea";var Co="ToastProvider",[bo,vh,gh]=Qt("Toast"),[oi]=pe("Toast",[gh]),[wh,hn]=oi(Co),ri=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:a=50,children:i}=e,[c,u]=s.useState(null),[d,f]=s.useState(0),p=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Co}\`. Expected non-empty \`string\`.`),l.jsx(bo.Provider,{scope:t,children:l.jsx(wh,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:a,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:s.useCallback(()=>f(g=>g+1),[]),onToastRemove:s.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:i})})};ri.displayName=Co;var si="ToastViewport",xh=["F8"],Kn="toast.viewportPause",Un="toast.viewportResume",ai=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=xh,label:r="Notifications ({hotkey})",...a}=e,i=hn(si,n),c=vh(n),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=H(t,p,i.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;s.useEffect(()=>{const v=y=>{o.length!==0&&o.every(C=>y[C]||y.code===C)&&p.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o]),s.useEffect(()=>{const v=u.current,y=p.current;if(w&&v&&y){const x=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Kn);y.dispatchEvent(T),i.isClosePausedRef.current=!0}},C=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Un);y.dispatchEvent(T),i.isClosePausedRef.current=!1}},b=T=>{!v.contains(T.relatedTarget)&&C()},E=()=>{v.contains(document.activeElement)||C()};return v.addEventListener("focusin",x),v.addEventListener("focusout",b),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",E),window.addEventListener("blur",x),window.addEventListener("focus",C),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",b),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",x),window.removeEventListener("focus",C)}}},[w,i.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:v})=>{const x=c().map(C=>{const b=C.ref.current,E=[b,...Nh(b)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?x.reverse():x).flat()},[c]);return s.useEffect(()=>{const v=p.current;if(v){const y=x=>{const C=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!C){const E=document.activeElement,T=x.shiftKey;if(x.target===v&&T){d.current?.focus();return}const j=m({tabbingDirection:T?"backwards":"forwards"}),D=j.findIndex(L=>L===E);In(j.slice(D+1))?x.preventDefault():T?d.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[c,m]),l.jsxs(bl,{ref:u,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Gn,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});In(v)}}),l.jsx(bo.Slot,{scope:n,children:l.jsx(k.ol,{tabIndex:-1,...a,ref:h})}),w&&l.jsx(Gn,{ref:f,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});In(v)}})]})});ai.displayName=si;var ii="ToastFocusProxy",Gn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,a=hn(ii,n);return l.jsx(dn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{const c=i.relatedTarget;!a.viewport?.contains(c)&&o()}})});Gn.displayName=ii;var Et="Toast",yh="toast.swipeStart",Ch="toast.swipeMove",bh="toast.swipeCancel",Eh="toast.swipeEnd",ci=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:a,...i}=e,[c,u]=be({prop:o,defaultProp:r??!0,onChange:a,caller:Et});return l.jsx(oe,{present:n||c,children:l.jsx(_h,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:R(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:R(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:R(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:R(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});ci.displayName=Et;var[Sh,Rh]=oi(Et,{onClose(){}}),_h=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:a,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:g,...w}=e,m=hn(Et,n),[v,y]=s.useState(null),x=H(t,P=>y(P)),C=s.useRef(null),b=s.useRef(null),E=r||m.duration,T=s.useRef(0),S=s.useRef(E),A=s.useRef(0),{onToastAdd:j,onToastRemove:D}=m,L=ne(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),B=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),T.current=new Date().getTime(),A.current=window.setTimeout(L,P))},[L]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{B(S.current),d?.()},N=()=>{const F=new Date().getTime()-T.current;S.current=S.current-F,window.clearTimeout(A.current),u?.()};return P.addEventListener(Kn,N),P.addEventListener(Un,$),()=>{P.removeEventListener(Kn,N),P.removeEventListener(Un,$)}}},[m.viewport,E,u,d,B]),s.useEffect(()=>{a&&!m.isClosePausedRef.current&&B(E)},[a,E,m.isClosePausedRef,B]),s.useEffect(()=>(j(),()=>D()),[j,D]);const W=s.useMemo(()=>v?hi(v):null,[v]);return m.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(Ph,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(Sh,{scope:n,onClose:L,children:pt.createPortal(l.jsx(bo.ItemSlot,{scope:n,children:l.jsx(Cl,{asChild:!0,onEscapeKeyDown:R(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(k.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:R(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:R(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:R(e.onPointerMove,P=>{if(!C.current)return;const $=P.clientX-C.current.x,N=P.clientY-C.current.y,F=!!b.current,I=["left","right"].includes(m.swipeDirection),_=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=I?_(0,$):0,X=I?0:_(0,N),Z=P.pointerType==="touch"?10:2,te={x:z,y:X},Q={originalEvent:P,delta:te};F?(b.current=te,Nt(Ch,p,Q,{discrete:!1})):er(te,m.swipeDirection,Z)?(b.current=te,Nt(yh,f,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Z||Math.abs(N)>Z)&&(C.current=null)}),onPointerUp:R(e.onPointerUp,P=>{const $=b.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),b.current=null,C.current=null,$){const F=P.currentTarget,I={originalEvent:P,delta:$};er($,m.swipeDirection,m.swipeThreshold)?Nt(Eh,g,I,{discrete:!0}):Nt(bh,h,I,{discrete:!0}),F.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Ph=e=>{const{__scopeToast:t,children:n,...o}=e,r=hn(Et,t),[a,i]=s.useState(!1),[c,u]=s.useState(!1);return Ah(()=>i(!0)),s.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:l.jsx(We,{asChild:!0,children:l.jsx(dn,{...o,children:a&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},Th="ToastTitle",li=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});li.displayName=Th;var Mh="ToastDescription",ui=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});ui.displayName=Mh;var di="ToastAction",fi=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(mi,{altText:n,asChild:!0,children:l.jsx(Eo,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${di}\`. Expected non-empty \`string\`.`),null)});fi.displayName=di;var pi="ToastClose",Eo=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Rh(pi,n);return l.jsx(mi,{asChild:!0,children:l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,r.onClose)})})});Eo.displayName=pi;var mi=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(k.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function hi(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),Ih(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!r)if(a){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...hi(o))}}),t}function Nt(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var er=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),a=o>r;return t==="left"||t==="right"?a&&o>n:!a&&r>n};function Ah(e=()=>{}){const t=ne(e);q(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function Ih(e){return e.nodeType===e.ELEMENT_NODE}function Nh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function In(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Oh=ri,kh=ai,Dh=ci,jh=li,Lh=ui,Fh=fi,$h=Eo;const Bh="_toast_1ga0s_1",Wh="_toastContent_1ga0s_12",Hh="_toastViewport_1ga0s_70",Vh="_toastTitle_1ga0s_89",Kh="_toastDescription_1ga0s_95",Ye={toast:Bh,toastContent:Wh,toastViewport:Hh,toastTitle:Vh,toastDescription:Kh},Uh=({...e})=>l.jsx(Oh,{...e}),vi=O.forwardRef(({...e},t)=>l.jsx(kh,{className:Ye.toastViewport,ref:t,...e}));vi.displayName="ToastViewport";const gi=O.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>l.jsxs(Dh,{className:Ye.toast,ref:r,...o,children:[l.jsxs("div",{className:Ye.toastContent,children:[l.jsx(jh,{className:Ye.toastTitle,children:e}),t&&l.jsx(Lh,{className:Ye.toastDescription,children:t})]}),n&&l.jsx(Fh,{className:Ye.toastAction,asChild:!0,altText:"Toast action",children:n}),l.jsx($h,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));gi.displayName="Toast";var[vn]=pe("Tooltip",[Ae]),gn=Ae(),wi="TooltipProvider",Gh=700,zn="tooltip.open",[zh,So]=vn(wi),xi=e=>{const{__scopeTooltip:t,delayDuration:n=Gh,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(zh,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:a})};xi.displayName=wi;var ft="Tooltip",[Yh,St]=vn(ft),yi=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=So(ft,e.__scopeTooltip),d=gn(t),[f,p]=s.useState(null),h=ue(),g=s.useRef(0),w=i??u.disableHoverableContent,m=c??u.delayDuration,v=s.useRef(!1),[y,x]=be({prop:o,defaultProp:r??!1,onChange:S=>{S?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),a?.(S)},caller:ft}),C=s.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,x(!0)},[x]),E=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,x(!0),g.current=0},m)},[m,x]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(on,{...d,children:l.jsx(Yh,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?T():b()},[u.isOpenDelayedRef,T,b]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(g.current),g.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};yi.displayName=ft;var Yn="TooltipTrigger",Ci=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=St(Yn,n),a=So(Yn,n),i=gn(n),c=s.useRef(null),u=H(t,c,r.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(wt,{asChild:!0,...i,children:l.jsx(k.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:R(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});Ci.displayName=Yn;var Ro="TooltipPortal",[Xh,qh]=vn(Ro,{forceMount:void 0}),bi=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=St(Ro,t);return l.jsx(Xh,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};bi.displayName=Ro;var et="TooltipContent",Ei=s.forwardRef((e,t)=>{const n=qh(et,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=St(et,e.__scopeTooltip);return l.jsx(oe,{present:o||i.open,children:i.disableHoverableContent?l.jsx(Si,{side:r,...a,ref:t}):l.jsx(Zh,{side:r,...a,ref:t})})}),Zh=s.forwardRef((e,t)=>{const n=St(et,e.__scopeTooltip),o=So(et,e.__scopeTooltip),r=s.useRef(null),a=H(t,r),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,f=r.current,{onPointerInTransitChange:p}=o,h=s.useCallback(()=>{c(null),p(!1)},[p]),g=s.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},x=tv(y,v.getBoundingClientRect()),C=nv(y,x),b=ov(m.getBoundingClientRect()),E=sv([...C,...b]);c(E),p(!0)},[p]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(u&&f){const w=v=>g(v,f),m=v=>g(v,u);return u.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[u,f,g,h]),s.useEffect(()=>{if(i){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=u?.contains(v)||f?.contains(v),C=!rv(y,i);x?h():C&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,f,i,d,h]),l.jsx(Si,{...e,ref:a})}),[Qh,Jh]=vn(ft,{isInside:!1}),ev=Zc("TooltipContent"),Si=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=St(et,n),d=gn(n),{onClose:f}=u;return s.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),s.useEffect(()=>{if(u.trigger){const p=h=>{h.target?.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(rn,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ev,{children:o}),l.jsx(Qh,{scope:n,isInside:!0,children:l.jsx(wm,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Ei.displayName=et;var Ri="TooltipArrow",_i=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=gn(n);return Jh(Ri,n).isInside?null:l.jsx(sn,{...r,...o,ref:t})});_i.displayName=Ri;function tv(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function nv(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function ov(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function rv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function sv(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),av(t)}function av(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var iv=xi,cv=yi,lv=Ci,uv=bi,dv=Ei,fv=_i;const pv="_tooltipContent_17t5h_1",mv="_tooltipArrow_17t5h_12",tr={tooltipContent:pv,tooltipArrow:mv},hv=({...e})=>l.jsx(iv,{...e});function vv({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...a}){return t===void 0?l.jsx(l.Fragment,{children:e}):l.jsxs(cv,{open:n,defaultOpen:o,onOpenChange:i=>{r?.(i)},disableHoverableContent:!0,delayDuration:200,children:[l.jsx(lv,{asChild:!0,children:e}),l.jsx(uv,{children:l.jsxs(dv,{className:tr.tooltipContent,...a,sideOffset:4,children:[t,l.jsx(fv,{className:tr.tooltipArrow})]})})]})}exports.ArrowLeft=rr;exports.ArrowRight=sr;exports.Badge=Mi;exports.Button=mt;exports.Calendar=ar;exports.Check=Ut;exports.Checkbox=dl;exports.ChevronDown=ir;exports.ChevronLeft=Lc;exports.ChevronRight=Fc;exports.ChevronUp=$c;exports.Circle=cr;exports.Close=Xn;exports.Coffee=lr;exports.Dialog=Fu;exports.EmptyState=Wu;exports.ExternalLink=ur;exports.Gear=dr;exports.Hammer=fr;exports.Heart=pr;exports.IconMap=Ze;exports.Inbox=mr;exports.Input=ds;exports.Kebab=vr;exports.Lamp=hr;exports.Lightning=gr;exports.LogIn=wr;exports.LogOut=xr;exports.Mail=yr;exports.Menu=Cr;exports.MenuButton=qp;exports.MenuButtonItem=Zp;exports.NoMobile=br;exports.Pencil=Er;exports.Plus=Sr;exports.Popover=vm;exports.SelectInput=ei;exports.SelectItem=ti;exports.Signpost=Rr;exports.Spinner=qn;exports.SunMoon=_r;exports.TextArea=ni;exports.Toast=gi;exports.ToastProvider=Uh;exports.ToastViewport=vi;exports.Tooltip=vv;exports.TooltipProvider=hv;exports.createIcon=V;exports.dialogSizes=Lu;exports.iconSizes=jc;
|