@tomny-dev/uzi 0.1.10-pr.3.12.1.e64e20c → 0.1.10-pr.3.13.1.4e34d64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),tr=require("react-dom");function nr(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 c=nr(O),ct=nr(tr);function go(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=go(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():go(e[r],null)}}}}function H(...e){return c.useCallback(lt(...e),e)}var ta=Symbol.for("react.lazy"),It=c[" use ".trim().toString()];function na(e){return typeof e=="object"&&e!==null&&"then"in e}function or(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ta&&"_payload"in e&&na(e._payload)}function rr(e){const t=ra(e),n=c.forwardRef((o,r)=>{let{children:s,...a}=o;or(s)&&typeof It=="function"&&(s=It(s._payload));const i=c.Children.toArray(s),u=i.find(ia);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var oa=rr("Slot");function ra(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n;if(or(r)&&typeof It=="function"&&(r=It(r._payload)),c.isValidElement(r)){const a=ca(r),i=aa(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sa=Symbol("radix.slottable");function ia(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sa}function aa(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]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ca(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 z(...e){return e.filter(Boolean).join(" ")}const la="uzi-button-module__button__5dzDN",ua="uzi-button-module__sizeSm__jb544",da="uzi-button-module__sizeMd__lIo8M",fa="uzi-button-module__sizeLg__QSSuW",pa="uzi-button-module__sizeIcon__Aa9tN",ma="uzi-button-module__variantPrimary__zp2Pg",ha="uzi-button-module__variantSecondary__oX5CB",va="uzi-button-module__variantOutline__uXfiP",ga="uzi-button-module__variantGhost__-OEB8",_a="uzi-button-module__variantDestructive__5IeYA",wa="uzi-button-module__variantLink__Olx4I",rn={button:la,sizeSm:ua,sizeMd:da,sizeLg:fa,sizeIcon:pa,variantPrimary:ma,variantSecondary:ha,variantOutline:va,variantGhost:ga,variantDestructive:_a,variantLink:wa},xa={default:"variantPrimary",primary:"variantPrimary",secondary:"variantSecondary",outline:"variantOutline",ghost:"variantGhost",destructive:"variantDestructive",link:"variantLink"},ya={default:"sizeMd",sm:"sizeSm",md:"sizeMd",lg:"sizeLg",icon:"sizeIcon"};function sr({as:e,variant:t="default",size:n="default",className:o,children:r,asChild:s=!1,...a}){const i=z(rn.button,rn[xa[t]],rn[ya[n]],o);return s?l.jsx(oa,{className:i,...a,children:r}):e==="a"?l.jsx("a",{className:i,...a,children:r}):l.jsx("button",{type:"button",className:i,...a,children:r})}function ba(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a);i.displayName=s+"Context";const u=n.length;n=[...n,a];const d=f=>{const{scope:g,children:v,..._}=f,p=g?.[e]?.[u]||i,h=c.useMemo(()=>_,Object.values(_));return l.jsx(p.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(f,g){const v=g?.[e]?.[u]||i,_=c.useContext(v);if(_)return _;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Sa(r,...t)]}function Sa(...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 a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}var q=globalThis?.document?c.useLayoutEffect:()=>{},Ca=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ln=Ca.reduce((e,t)=>{const n=rr(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),_t={exports:{}},sn={};var _o;function Ea(){if(_o)return sn;_o=1;var e=O;function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(f,g){var v=g(),_=o({inst:{value:v,getSnapshot:g}}),p=_[0].inst,h=_[1];return s(function(){p.value=v,p.getSnapshot=g,u(p)&&h({inst:p})},[f,v,g]),r(function(){return u(p)&&h({inst:p}),f(function(){u(p)&&h({inst:p})})},[f]),a(v),v}function u(f){var g=f.getSnapshot;f=f.value;try{var v=g();return!n(f,v)}catch{return!0}}function d(f,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return sn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sn}var an={};var wo;function Ra(){return wo||(wo=1,process.env.NODE_ENV!=="production"&&(function(){function e(v,_){return v===_&&(v!==0||1/v===1/_)||v!==v&&_!==_}function t(v,_){m||r.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=_();if(!f){var h=_();s(p,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=a({inst:{value:p,getSnapshot:_}});var x=h[0].inst,w=h[1];return u(function(){x.value=p,x.getSnapshot=_,n(x)&&w({inst:x})},[v,p,_]),i(function(){return n(x)&&w({inst:x}),v(function(){n(x)&&w({inst:x})})},[v]),d(p),p}function n(v){var _=v.getSnapshot;v=v.value;try{var p=_();return!s(v,p)}catch{return!0}}function o(v,_){return _()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=O,s=typeof Object.is=="function"?Object.is:e,a=r.useState,i=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue,m=!1,f=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;an.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),an}var xo;function Ta(){return xo||(xo=1,process.env.NODE_ENV==="production"?_t.exports=Ea():_t.exports=Ra()),_t.exports}var Pa=Ta();function Ma(){return Pa.useSyncExternalStore(Ia,()=>!0,()=>!1)}function Ia(){return()=>{}}var kn="Avatar",[Na]=ba(kn),[Aa,ir]=Na(kn),ar=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=c.useState("idle");return l.jsx(Aa,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:l.jsx(Ln.span,{...o,ref:t})})});ar.displayName=kn;var cr="AvatarImage",lr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,a=ir(cr,n),i=Oa(o,s),u=ne(d=>{r(d),a.onImageLoadingStatusChange(d)});return q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(Ln.img,{...s,ref:t,src:o}):null});lr.displayName=cr;var ur="AvatarFallback",dr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=ir(ur,n),[a,i]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(u)}},[o]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(Ln.span,{...r,ref:t}):null});dr.displayName=ur;function yo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Oa(e,{referrerPolicy:t,crossOrigin:n}){const o=Ma(),r=c.useRef(null),s=o?(r.current||(r.current=new window.Image),r.current):null,[a,i]=c.useState(()=>yo(s,e));return q(()=>{i(yo(s,e))},[s,e]),q(()=>{const u=f=>()=>{i(f)};if(!s)return;const d=u("loaded"),m=u("error");return s.addEventListener("load",d),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",d),s.removeEventListener("error",m)}},[s,n,t]),a}var Da=ar,ja=lr,La=dr;const ka="uzi-avatar-module__avatar__yPIOs",Fa="uzi-avatar-module__image__Ngo7A",za="uzi-avatar-module__fallback__Tf3oZ",Ye={avatar:ka,"size-sm":"uzi-avatar-module__size-sm__v5riJ","size-md":"uzi-avatar-module__size-md__g7IQS","size-lg":"uzi-avatar-module__size-lg__Ca4xk",image:Fa,fallback:za};function Ba({className:e,size:t="md",...n}){const o=t==="sm"?Ye["size-sm"]:t==="lg"?Ye["size-lg"]:Ye["size-md"];return l.jsx(Da,{className:z(Ye.avatar,o,e),...n})}function $a({className:e,...t}){return l.jsx(ja,{className:z(Ye.image,e),...t})}function Wa({className:e,...t}){return l.jsx(La,{className:z(Ye.fallback,e),...t})}const Va="uzi-card-module__card__ZPFTz",Ha="uzi-card-module__interactive__zlPML",wt={card:Va,"tone-default":"uzi-card-module__tone-default__7Ujf9","tone-muted":"uzi-card-module__tone-muted__RQy5B","tone-contrast":"uzi-card-module__tone-contrast__JpFxL",interactive:Ha,"padding-none":"uzi-card-module__padding-none__LXdx-","padding-sm":"uzi-card-module__padding-sm__-Ub1s","padding-md":"uzi-card-module__padding-md__kUf46","padding-lg":"uzi-card-module__padding-lg__a5mWP"};function Ua({as:e,tone:t="default",padding:n="md",interactive:o=!1,className:r,children:s,...a}){const i=e??"div",u={default:null,muted:"tone-muted",contrast:"tone-contrast"},d={none:"padding-none",sm:"padding-sm",md:"padding-md",lg:"padding-lg"},m=z(wt.card,u[t]?wt[u[t]]:null,wt[d[n]],o&&wt.interactive,r);return l.jsx(i,{className:m,...a,children:s})}const Ka="uzi-pill-module__pill__uCKcP",Ga="uzi-pill-module__icon__KQ8zg",Ya="uzi-pill-module__content__T7AG1",nt={pill:Ka,"size-sm":"uzi-pill-module__size-sm__JANOQ","size-md":"uzi-pill-module__size-md__fdsqR","tone-neutral":"uzi-pill-module__tone-neutral__-af-x","tone-success":"uzi-pill-module__tone-success__kW2Kf","tone-warning":"uzi-pill-module__tone-warning__Rc5-s","tone-info":"uzi-pill-module__tone-info__0vQrj","tone-danger":"uzi-pill-module__tone-danger__gzNOa",icon:Ga,content:Ya};function Xa({as:e,tone:t="neutral",size:n="md",icon:o,className:r,children:s,...a}){const i=e??"span",u=z(nt.pill,nt[`tone-${t}`],nt[`size-${n}`],r);return l.jsxs(i,{className:u,...a,children:[o?l.jsx("span",{className:nt.icon,"aria-hidden":"true",children:o}):null,l.jsx("span",{className:nt.content,children:s})]})}function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function qa(e,t){const n=c.createContext(t),o=s=>{const{children:a,...i}=s,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:a})};o.displayName=e+"Provider";function r(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Oe(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const d=f=>{const{scope:g,children:v,..._}=f,p=g?.[e]?.[u]||i,h=c.useMemo(()=>_,Object.values(_));return l.jsx(p.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(f,g){const v=g?.[e]?.[u]||i,_=c.useContext(v);if(_)return _;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Za(r,...t)]}function Za(...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 a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ja=c[" useId ".trim().toString()]||(()=>{}),Qa=0;function he(e){const[t,n]=c.useState(Ja());return q(()=>{n(o=>o??String(Qa++))},[e]),e||(t?`radix-${t}`:"")}var ec=c[" useInsertionEffect ".trim().toString()]||q;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=tc({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r;{const m=c.useRef(e!==void 0);c.useEffect(()=>{const f=m.current;f!==i&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),m.current=i},[i,o])}const d=c.useCallback(m=>{if(i){const f=nc(m)?m(e):m;f!==e&&a.current?.(f)}else s(m)},[i,e,s,a]);return[u,d]}function tc({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return ec(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function nc(e){return typeof e=="function"}function Ze(e){const t=oc(e),n=c.forwardRef((o,r)=>{const{children:s,...a}=o,i=c.Children.toArray(s),u=i.find(sc);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function oc(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const a=ac(r),i=ic(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rc=Symbol("radix.slottable");function sc(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rc}function ic(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]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ac(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=cc.reduce((e,t)=>{const n=Ze(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Fn(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function lc(e,t=globalThis?.document){const n=ne(e);c.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 uc="DismissableLayer",yn="dismissableLayer.update",dc="dismissableLayer.pointerDownOutside",fc="dismissableLayer.focusOutside",bo,fr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,d=c.useContext(fr),[m,f]=c.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=c.useState({}),_=H(t,C=>f(C)),p=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(h),w=m?p.indexOf(m):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=x,S=mc(C=>{const N=C.target,P=[...d.branches].some(D=>D.contains(N));!b||P||(r?.(C),a?.(C),C.defaultPrevented||i?.())},g),R=hc(C=>{const N=C.target;[...d.branches].some(D=>D.contains(N))||(s?.(C),a?.(C),C.defaultPrevented||i?.())},g);return lc(C=>{w===d.layers.size-1&&(o?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},g),c.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(bo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),So(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=bo)}},[m,g,n,d]),c.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),So())},[m,d]),c.useEffect(()=>{const C=()=>v({});return document.addEventListener(yn,C),()=>document.removeEventListener(yn,C)},[]),l.jsx(B.div,{...u,ref:_,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,R.onFocusCapture),onBlurCapture:I(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=uc;var pc="DismissableLayerBranch",pr=c.forwardRef((e,t)=>{const n=c.useContext(fr),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(B.div,{...e,ref:r})});pr.displayName=pc;function mc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let u=function(){mr(dc,n,d,{discrete:!0})};const d={originalEvent:i};i.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},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function hc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&mr(fc,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 So(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function mr(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?Fn(r,s):r.dispatchEvent(s)}var vc=ut,gc=pr,cn="focusScope.autoFocusOnMount",ln="focusScope.autoFocusOnUnmount",Co={bubbles:!1,cancelable:!0},_c="FocusScope",zt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),d=ne(r),m=ne(s),f=c.useRef(null),g=H(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(y){if(v.paused||!i)return;const b=y.target;i.contains(b)?f.current=b:Ie(f.current,{select:!0})},h=function(y){if(v.paused||!i)return;const b=y.relatedTarget;b!==null&&(i.contains(b)||Ie(f.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&Ie(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(x);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()}}},[o,i,v.paused]),c.useEffect(()=>{if(i){Ro.add(v);const p=document.activeElement;if(!i.contains(p)){const x=new CustomEvent(cn,Co);i.addEventListener(cn,d),i.dispatchEvent(x),x.defaultPrevented||(wc(Cc(hr(i)),{select:!0}),document.activeElement===p&&Ie(i))}return()=>{i.removeEventListener(cn,d),setTimeout(()=>{const x=new CustomEvent(ln,Co);i.addEventListener(ln,m),i.dispatchEvent(x),x.defaultPrevented||Ie(p??document.body,{select:!0}),i.removeEventListener(ln,m),Ro.remove(v)},0)}}},[i,d,m,v]);const _=c.useCallback(p=>{if(!n&&!o||v.paused)return;const h=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(h&&x){const w=p.currentTarget,[y,b]=xc(w);y&&b?!p.shiftKey&&x===b?(p.preventDefault(),n&&Ie(y,{select:!0})):p.shiftKey&&x===y&&(p.preventDefault(),n&&Ie(b,{select:!0})):x===w&&p.preventDefault()}},[n,o,v.paused]);return l.jsx(B.div,{tabIndex:-1,...a,ref:g,onKeyDown:_})});zt.displayName=_c;function wc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function xc(e){const t=hr(e),n=Eo(t,e),o=Eo(t.reverse(),e);return[n,o]}function hr(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 Eo(e,t){for(const n of e)if(!yc(n,{upTo:t}))return n}function yc(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 bc(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bc(e)&&t&&e.select()}}var Ro=Sc();function Sc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=To(e,t),e.unshift(t)},remove(t){e=To(e,t),e[0]?.resume()}}}function To(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Cc(e){return e.filter(t=>t.tagName!=="A")}var Ec="Portal",dt=c.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=c.useState(!1);q(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?tr.createPortal(l.jsx(B.div,{...o,ref:t}),a):null});dt.displayName=Ec;function Rc(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Pe=e=>{const{present:t,children:n}=e,o=Tc(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=H(o.ref,Pc(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Pe.displayName="Presence";function Tc(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Rc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=xt(o.current);s.current=i==="mounted"?d:"none"},[i]),q(()=>{const d=o.current,m=r.current;if(m!==e){const g=s.current,v=xt(d);e?u("MOUNT"):v==="none"||d?.display==="none"?u("UNMOUNT"):u(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,f=v=>{const p=xt(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&p&&(u("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=v=>{v.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function xt(e){return e?.animationName||"none"}function Pc(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 un=0;function zn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),un++,()=>{un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),un--}},[])}function Po(){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 xe=function(){return xe=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},xe.apply(this,arguments)};function vr(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 Mc(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 Tt="right-scroll-bar-position",Pt="width-before-scroll-bar",Ic="with-scroll-bars-hidden",Nc="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ac(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 Oc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Mo=new WeakMap;function Dc(e,t){var n=Ac(null,function(o){return e.forEach(function(r){return dn(r,o)})});return Oc(function(){var o=Mo.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){r.has(i)||dn(i,a)})}Mo.set(n,e)},[e]),n}function jc(e){return e}function Lc(e,t){t===void 0&&(t=jc);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 a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var m=a;a=[],m.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return r}function kc(e){e===void 0&&(e={});var t=Lc(null);return t.options=xe({async:!0,ssr:!1},e),t}var gr=function(e){var t=e.sideCar,n=vr(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 c.createElement(o,xe({},n))};gr.isSideCarExport=!0;function Fc(e,t){return e.useMedium(t),gr}var _r=kc(),fn=function(){},Bt=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,m=e.enabled,f=e.shards,g=e.sideCar,v=e.noRelative,_=e.noIsolation,p=e.inert,h=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,y=e.gapMode,b=vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,R=Dc([n,t]),C=xe(xe({},b),r);return c.createElement(c.Fragment,null,m&&c.createElement(S,{sideCar:_r,removeScrollBar:d,shards:f,noRelative:v,noIsolation:_,inert:p,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),xe(xe({},C),{ref:R})):c.createElement(w,xe({},C,{className:u,ref:R}),i))});Bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bt.classNames={fullWidth:Pt,zeroRight:Tt};var zc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zc();return t&&e.setAttribute("nonce",t),e}function $c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Wc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Bc())&&($c(t,n),Wc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hc=function(){var e=Vc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wr=function(){var e=Hc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Uc={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Kc=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[pn(n),pn(o),pn(r)]},Gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Uc;var t=Kc(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])}},Yc=wr(),Xe="data-scroll-locked",Xc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),tr=require("react-dom");function nr(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 c=nr(O),ct=nr(tr);function go(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=go(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():go(e[r],null)}}}}function H(...e){return c.useCallback(lt(...e),e)}var ta=Symbol.for("react.lazy"),It=c[" use ".trim().toString()];function na(e){return typeof e=="object"&&e!==null&&"then"in e}function or(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ta&&"_payload"in e&&na(e._payload)}function rr(e){const t=ra(e),n=c.forwardRef((o,r)=>{let{children:s,...a}=o;or(s)&&typeof It=="function"&&(s=It(s._payload));const i=c.Children.toArray(s),u=i.find(ia);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var oa=rr("Slot");function ra(e){const t=c.forwardRef((n,o)=>{let{children:r,...s}=n;if(or(r)&&typeof It=="function"&&(r=It(r._payload)),c.isValidElement(r)){const a=ca(r),i=aa(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sa=Symbol("radix.slottable");function ia(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sa}function aa(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]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ca(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 z(...e){return e.filter(Boolean).join(" ")}const la="uzi-button-module__button__5dzDN",ua="uzi-button-module__sizeSm__jb544",da="uzi-button-module__sizeMd__lIo8M",fa="uzi-button-module__sizeLg__QSSuW",pa="uzi-button-module__sizeIcon__Aa9tN",ma="uzi-button-module__variantPrimary__zp2Pg",ha="uzi-button-module__variantSecondary__oX5CB",va="uzi-button-module__variantOutline__uXfiP",ga="uzi-button-module__variantGhost__-OEB8",_a="uzi-button-module__variantDestructive__5IeYA",wa="uzi-button-module__variantLink__Olx4I",rn={button:la,sizeSm:ua,sizeMd:da,sizeLg:fa,sizeIcon:pa,variantPrimary:ma,variantSecondary:ha,variantOutline:va,variantGhost:ga,variantDestructive:_a,variantLink:wa},xa={default:"variantPrimary",primary:"variantPrimary",secondary:"variantSecondary",outline:"variantOutline",ghost:"variantGhost",destructive:"variantDestructive",link:"variantLink"},ya={default:"sizeMd",sm:"sizeSm",md:"sizeMd",lg:"sizeLg",icon:"sizeIcon"};function sr({as:e,variant:t="default",size:n="default",className:o,children:r,asChild:s=!1,...a}){const i=z(rn.button,rn[xa[t]],rn[ya[n]],o);return s?l.jsx(oa,{className:i,...a,children:r}):e==="a"?l.jsx("a",{className:i,...a,children:r}):l.jsx("button",{type:"button",className:i,...a,children:r})}function ba(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a);i.displayName=s+"Context";const u=n.length;n=[...n,a];const d=f=>{const{scope:g,children:v,..._}=f,p=g?.[e]?.[u]||i,h=c.useMemo(()=>_,Object.values(_));return l.jsx(p.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(f,g){const v=g?.[e]?.[u]||i,_=c.useContext(v);if(_)return _;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Sa(r,...t)]}function Sa(...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 a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ne(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}var q=globalThis?.document?c.useLayoutEffect:()=>{},Ca=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ln=Ca.reduce((e,t)=>{const n=rr(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),_t={exports:{}},sn={};var _o;function Ea(){if(_o)return sn;_o=1;var e=O;function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(f,g){var v=g(),_=o({inst:{value:v,getSnapshot:g}}),p=_[0].inst,h=_[1];return s(function(){p.value=v,p.getSnapshot=g,u(p)&&h({inst:p})},[f,v,g]),r(function(){return u(p)&&h({inst:p}),f(function(){u(p)&&h({inst:p})})},[f]),a(v),v}function u(f){var g=f.getSnapshot;f=f.value;try{var v=g();return!n(f,v)}catch{return!0}}function d(f,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:i;return sn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,sn}var an={};var wo;function Ra(){return wo||(wo=1,process.env.NODE_ENV!=="production"&&(function(){function e(v,_){return v===_&&(v!==0||1/v===1/_)||v!==v&&_!==_}function t(v,_){m||r.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=_();if(!f){var h=_();s(p,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=a({inst:{value:p,getSnapshot:_}});var x=h[0].inst,w=h[1];return u(function(){x.value=p,x.getSnapshot=_,n(x)&&w({inst:x})},[v,p,_]),i(function(){return n(x)&&w({inst:x}),v(function(){n(x)&&w({inst:x})})},[v]),d(p),p}function n(v){var _=v.getSnapshot;v=v.value;try{var p=_();return!s(v,p)}catch{return!0}}function o(v,_){return _()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=O,s=typeof Object.is=="function"?Object.is:e,a=r.useState,i=r.useEffect,u=r.useLayoutEffect,d=r.useDebugValue,m=!1,f=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?o:t;an.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),an}var xo;function Ta(){return xo||(xo=1,process.env.NODE_ENV==="production"?_t.exports=Ea():_t.exports=Ra()),_t.exports}var Pa=Ta();function Ma(){return Pa.useSyncExternalStore(Ia,()=>!0,()=>!1)}function Ia(){return()=>{}}var kn="Avatar",[Na]=ba(kn),[Aa,ir]=Na(kn),ar=c.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=c.useState("idle");return l.jsx(Aa,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:l.jsx(Ln.span,{...o,ref:t})})});ar.displayName=kn;var cr="AvatarImage",lr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,a=ir(cr,n),i=Oa(o,s),u=ne(d=>{r(d),a.onImageLoadingStatusChange(d)});return q(()=>{i!=="idle"&&u(i)},[i,u]),i==="loaded"?l.jsx(Ln.img,{...s,ref:t,src:o}):null});lr.displayName=cr;var ur="AvatarFallback",dr=c.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=ir(ur,n),[a,i]=c.useState(o===void 0);return c.useEffect(()=>{if(o!==void 0){const u=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(u)}},[o]),a&&s.imageLoadingStatus!=="loaded"?l.jsx(Ln.span,{...r,ref:t}):null});dr.displayName=ur;function yo(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Oa(e,{referrerPolicy:t,crossOrigin:n}){const o=Ma(),r=c.useRef(null),s=o?(r.current||(r.current=new window.Image),r.current):null,[a,i]=c.useState(()=>yo(s,e));return q(()=>{i(yo(s,e))},[s,e]),q(()=>{const u=f=>()=>{i(f)};if(!s)return;const d=u("loaded"),m=u("error");return s.addEventListener("load",d),s.addEventListener("error",m),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",d),s.removeEventListener("error",m)}},[s,n,t]),a}var Da=ar,ja=lr,La=dr;const ka="uzi-avatar-module__avatar__yPIOs",Fa="uzi-avatar-module__image__Ngo7A",za="uzi-avatar-module__fallback__Tf3oZ",Ye={avatar:ka,"size-sm":"uzi-avatar-module__size-sm__v5riJ","size-md":"uzi-avatar-module__size-md__g7IQS","size-lg":"uzi-avatar-module__size-lg__Ca4xk",image:Fa,fallback:za};function $a({className:e,size:t="md",...n}){const o=t==="sm"?Ye["size-sm"]:t==="lg"?Ye["size-lg"]:Ye["size-md"];return l.jsx(Da,{className:z(Ye.avatar,o,e),...n})}function Ba({className:e,...t}){return l.jsx(ja,{className:z(Ye.image,e),...t})}function Wa({className:e,...t}){return l.jsx(La,{className:z(Ye.fallback,e),...t})}const Va="uzi-card-module__card__ZPFTz",Ha="uzi-card-module__interactive__zlPML",wt={card:Va,"tone-default":"uzi-card-module__tone-default__7Ujf9","tone-muted":"uzi-card-module__tone-muted__RQy5B","tone-contrast":"uzi-card-module__tone-contrast__JpFxL",interactive:Ha,"padding-none":"uzi-card-module__padding-none__LXdx-","padding-sm":"uzi-card-module__padding-sm__-Ub1s","padding-md":"uzi-card-module__padding-md__kUf46","padding-lg":"uzi-card-module__padding-lg__a5mWP"};function Ua({as:e,tone:t="default",padding:n="md",interactive:o=!1,className:r,children:s,...a}){const i=e??"div",u={default:null,muted:"tone-muted",contrast:"tone-contrast"},d={none:"padding-none",sm:"padding-sm",md:"padding-md",lg:"padding-lg"},m=z(wt.card,u[t]?wt[u[t]]:null,wt[d[n]],o&&wt.interactive,r);return l.jsx(i,{className:m,...a,children:s})}const Ka="uzi-pill-module__pill__uCKcP",Ga="uzi-pill-module__icon__KQ8zg",Ya="uzi-pill-module__content__T7AG1",nt={pill:Ka,"size-sm":"uzi-pill-module__size-sm__JANOQ","size-md":"uzi-pill-module__size-md__fdsqR","tone-success":"uzi-pill-module__tone-success__kW2Kf","tone-warning":"uzi-pill-module__tone-warning__Rc5-s","tone-info":"uzi-pill-module__tone-info__0vQrj","tone-danger":"uzi-pill-module__tone-danger__gzNOa",icon:Ga,content:Ya};function Xa({as:e,tone:t="neutral",size:n="md",icon:o,className:r,children:s,...a}){const i=e??"span",u=z(nt.pill,nt[`tone-${t}`],nt[`size-${n}`],r);return l.jsxs(i,{className:u,...a,children:[o?l.jsx("span",{className:nt.icon,"aria-hidden":"true",children:o}):null,l.jsx("span",{className:nt.content,children:s})]})}function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function qa(e,t){const n=c.createContext(t),o=s=>{const{children:a,...i}=s,u=c.useMemo(()=>i,Object.values(i));return l.jsx(n.Provider,{value:u,children:a})};o.displayName=e+"Provider";function r(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Oe(e,t=[]){let n=[];function o(s,a){const i=c.createContext(a),u=n.length;n=[...n,a];const d=f=>{const{scope:g,children:v,..._}=f,p=g?.[e]?.[u]||i,h=c.useMemo(()=>_,Object.values(_));return l.jsx(p.Provider,{value:h,children:v})};d.displayName=s+"Provider";function m(f,g){const v=g?.[e]?.[u]||i,_=c.useContext(v);if(_)return _;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[d,m]}const r=()=>{const s=n.map(a=>c.createContext(a));return function(i){const u=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return r.scopeName=e,[o,Za(r,...t)]}function Za(...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 a=o.reduce((i,{useScope:u,scopeName:d})=>{const f=u(s)[`__scope${d}`];return{...i,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ja=c[" useId ".trim().toString()]||(()=>{}),Qa=0;function he(e){const[t,n]=c.useState(Ja());return q(()=>{n(o=>o??String(Qa++))},[e]),e||(t?`radix-${t}`:"")}var ec=c[" useInsertionEffect ".trim().toString()]||q;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=tc({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:r;{const m=c.useRef(e!==void 0);c.useEffect(()=>{const f=m.current;f!==i&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${i?"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.`),m.current=i},[i,o])}const d=c.useCallback(m=>{if(i){const f=nc(m)?m(e):m;f!==e&&a.current?.(f)}else s(m)},[i,e,s,a]);return[u,d]}function tc({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return ec(()=>{s.current=t},[t]),c.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function nc(e){return typeof e=="function"}function Ze(e){const t=oc(e),n=c.forwardRef((o,r)=>{const{children:s,...a}=o,i=c.Children.toArray(s),u=i.find(sc);if(u){const d=u.props.children,m=i.map(f=>f===u?c.Children.count(d)>1?c.Children.only(null):c.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...a,ref:r,children:c.isValidElement(d)?c.cloneElement(d,void 0,m):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function oc(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const a=ac(r),i=ic(s,r.props);return r.type!==c.Fragment&&(i.ref=o?lt(o,a):a),c.cloneElement(r,i)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rc=Symbol("radix.slottable");function sc(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rc}function ic(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]=(...i)=>{const u=s(...i);return r(...i),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function ac(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=cc.reduce((e,t)=>{const n=Ze(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:a,...i}=r,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Fn(e,t){e&&ct.flushSync(()=>e.dispatchEvent(t))}function lc(e,t=globalThis?.document){const n=ne(e);c.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 uc="DismissableLayer",yn="dismissableLayer.update",dc="dismissableLayer.pointerDownOutside",fc="dismissableLayer.focusOutside",bo,fr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,d=c.useContext(fr),[m,f]=c.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=c.useState({}),_=H(t,C=>f(C)),p=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(h),w=m?p.indexOf(m):-1,y=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=x,S=mc(C=>{const N=C.target,P=[...d.branches].some(D=>D.contains(N));!b||P||(r?.(C),a?.(C),C.defaultPrevented||i?.())},g),R=hc(C=>{const N=C.target;[...d.branches].some(D=>D.contains(N))||(s?.(C),a?.(C),C.defaultPrevented||i?.())},g);return lc(C=>{w===d.layers.size-1&&(o?.(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},g),c.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(bo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),So(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=bo)}},[m,g,n,d]),c.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),So())},[m,d]),c.useEffect(()=>{const C=()=>v({});return document.addEventListener(yn,C),()=>document.removeEventListener(yn,C)},[]),l.jsx($.div,{...u,ref:_,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,R.onFocusCapture),onBlurCapture:I(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});ut.displayName=uc;var pc="DismissableLayerBranch",pr=c.forwardRef((e,t)=>{const n=c.useContext(fr),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx($.div,{...e,ref:r})});pr.displayName=pc;function mc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let u=function(){mr(dc,n,d,{discrete:!0})};const d={originalEvent:i};i.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},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function hc(e,t=globalThis?.document){const n=ne(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&mr(fc,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 So(){const e=new CustomEvent(yn);document.dispatchEvent(e)}function mr(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?Fn(r,s):r.dispatchEvent(s)}var vc=ut,gc=pr,cn="focusScope.autoFocusOnMount",ln="focusScope.autoFocusOnUnmount",Co={bubbles:!1,cancelable:!0},_c="FocusScope",zt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,u]=c.useState(null),d=ne(r),m=ne(s),f=c.useRef(null),g=H(t,p=>u(p)),v=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let p=function(y){if(v.paused||!i)return;const b=y.target;i.contains(b)?f.current=b:Ie(f.current,{select:!0})},h=function(y){if(v.paused||!i)return;const b=y.relatedTarget;b!==null&&(i.contains(b)||Ie(f.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&Ie(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(x);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()}}},[o,i,v.paused]),c.useEffect(()=>{if(i){Ro.add(v);const p=document.activeElement;if(!i.contains(p)){const x=new CustomEvent(cn,Co);i.addEventListener(cn,d),i.dispatchEvent(x),x.defaultPrevented||(wc(Cc(hr(i)),{select:!0}),document.activeElement===p&&Ie(i))}return()=>{i.removeEventListener(cn,d),setTimeout(()=>{const x=new CustomEvent(ln,Co);i.addEventListener(ln,m),i.dispatchEvent(x),x.defaultPrevented||Ie(p??document.body,{select:!0}),i.removeEventListener(ln,m),Ro.remove(v)},0)}}},[i,d,m,v]);const _=c.useCallback(p=>{if(!n&&!o||v.paused)return;const h=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(h&&x){const w=p.currentTarget,[y,b]=xc(w);y&&b?!p.shiftKey&&x===b?(p.preventDefault(),n&&Ie(y,{select:!0})):p.shiftKey&&x===y&&(p.preventDefault(),n&&Ie(b,{select:!0})):x===w&&p.preventDefault()}},[n,o,v.paused]);return l.jsx($.div,{tabIndex:-1,...a,ref:g,onKeyDown:_})});zt.displayName=_c;function wc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ie(o,{select:t}),document.activeElement!==n)return}function xc(e){const t=hr(e),n=Eo(t,e),o=Eo(t.reverse(),e);return[n,o]}function hr(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 Eo(e,t){for(const n of e)if(!yc(n,{upTo:t}))return n}function yc(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 bc(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bc(e)&&t&&e.select()}}var Ro=Sc();function Sc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=To(e,t),e.unshift(t)},remove(t){e=To(e,t),e[0]?.resume()}}}function To(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Cc(e){return e.filter(t=>t.tagName!=="A")}var Ec="Portal",dt=c.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=c.useState(!1);q(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?tr.createPortal(l.jsx($.div,{...o,ref:t}),a):null});dt.displayName=Ec;function Rc(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Pe=e=>{const{present:t,children:n}=e,o=Tc(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=H(o.ref,Pc(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Pe.displayName="Presence";function Tc(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Rc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=xt(o.current);s.current=i==="mounted"?d:"none"},[i]),q(()=>{const d=o.current,m=r.current;if(m!==e){const g=s.current,v=xt(d);e?u("MOUNT"):v==="none"||d?.display==="none"?u("UNMOUNT"):u(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,f=v=>{const p=xt(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&p&&(u("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=v=>{v.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function xt(e){return e?.animationName||"none"}function Pc(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 un=0;function zn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),un++,()=>{un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),un--}},[])}function Po(){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 xe=function(){return xe=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},xe.apply(this,arguments)};function vr(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 Mc(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 Tt="right-scroll-bar-position",Pt="width-before-scroll-bar",Ic="with-scroll-bars-hidden",Nc="--removed-body-scroll-bar-size";function dn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ac(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 Oc=typeof window<"u"?c.useLayoutEffect:c.useEffect,Mo=new WeakMap;function Dc(e,t){var n=Ac(null,function(o){return e.forEach(function(r){return dn(r,o)})});return Oc(function(){var o=Mo.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||dn(i,null)}),s.forEach(function(i){r.has(i)||dn(i,a)})}Mo.set(n,e)},[e]),n}function jc(e){return e}function Lc(e,t){t===void 0&&(t=jc);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 a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var m=a;a=[],m.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return r}function kc(e){e===void 0&&(e={});var t=Lc(null);return t.options=xe({async:!0,ssr:!1},e),t}var gr=function(e){var t=e.sideCar,n=vr(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 c.createElement(o,xe({},n))};gr.isSideCarExport=!0;function Fc(e,t){return e.useMedium(t),gr}var _r=kc(),fn=function(){},$t=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:fn,onWheelCapture:fn,onTouchMoveCapture:fn}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,m=e.enabled,f=e.shards,g=e.sideCar,v=e.noRelative,_=e.noIsolation,p=e.inert,h=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,y=e.gapMode,b=vr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,R=Dc([n,t]),C=xe(xe({},b),r);return c.createElement(c.Fragment,null,m&&c.createElement(S,{sideCar:_r,removeScrollBar:d,shards:f,noRelative:v,noIsolation:_,inert:p,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:y}),a?c.cloneElement(c.Children.only(i),xe(xe({},C),{ref:R})):c.createElement(w,xe({},C,{className:u,ref:R}),i))});$t.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$t.classNames={fullWidth:Pt,zeroRight:Tt};var zc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zc();return t&&e.setAttribute("nonce",t),e}function Bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Wc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(Bc(t,n),Wc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hc=function(){var e=Vc();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wr=function(){var e=Hc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Uc={left:0,top:0,right:0,gap:0},pn=function(e){return parseInt(e||"",10)||0},Kc=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[pn(n),pn(o),pn(r)]},Gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Uc;var t=Kc(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])}},Yc=wr(),Xe="data-scroll-locked",Xc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(Ic,` {
3
3
  overflow: hidden `).concat(o,`;
4
4
  padding-right: `).concat(i,"px ").concat(o,`;
@@ -38,9 +38,9 @@
38
38
  `)},Io=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},qc=function(){c.useEffect(function(){return document.body.setAttribute(Xe,(Io()+1).toString()),function(){var e=Io()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Zc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;qc();var s=c.useMemo(function(){return Gc(r)},[r]);return c.createElement(Yc,{styles:Xc(s,!t,r,n?"":"!important")})},bn=!1;if(typeof window<"u")try{var yt=Object.defineProperty({},"passive",{get:function(){return bn=!0,!0}});window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch{bn=!1}var Ue=bn?{passive:!1}:!1,Jc=function(e){return e.tagName==="TEXTAREA"},xr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Jc(e)&&n[t]==="visible")},Qc=function(e){return xr(e,"overflowY")},el=function(e){return xr(e,"overflowX")},No=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=yr(e,o);if(r){var s=br(e,o),a=s[1],i=s[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},tl=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},nl=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},yr=function(e,t){return e==="v"?Qc(t):el(t)},br=function(e,t){return e==="v"?tl(t):nl(t)},ol=function(e,t){return e==="h"&&t==="rtl"?-1:1},rl=function(e,t,n,o,r){var s=ol(e,window.getComputedStyle(t).direction),a=s*o,i=n.target,u=t.contains(i),d=!1,m=a>0,f=0,g=0;do{if(!i)break;var v=br(e,i),_=v[0],p=v[1],h=v[2],x=p-h-s*_;(_||x)&&yr(e,i)&&(f+=x,g+=_);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(m&&Math.abs(f)<1||!m&&Math.abs(g)<1)&&(d=!0),d},bt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ao=function(e){return[e.deltaX,e.deltaY]},Oo=function(e){return e&&"current"in e?e.current:e},sl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},il=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},al=0,Ke=[];function cl(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(al++)[0],s=c.useState(wr)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Mc([e.lockRef.current],(e.shards||[]).map(Oo),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var x=bt(p),w=n.current,y="deltaX"in p?p.deltaX:w[0]-x[0],b="deltaY"in p?p.deltaY:w[1]-x[1],S,R=p.target,C=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in p&&C==="h"&&R.type==="range")return!1;var N=window.getSelection(),P=N&&N.anchorNode,D=P?P===R||P.contains(R):!1;if(D)return!1;var L=No(C,R);if(!L)return!0;if(L?S=C:(S=C==="v"?"h":"v",L=No(C,R)),!L)return!1;if(!o.current&&"changedTouches"in p&&(y||b)&&(o.current=S),!S)return!0;var k=o.current||S;return rl(k,h,p,k==="h"?y:b)},[]),u=c.useCallback(function(p){var h=p;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var x="deltaY"in h?Ao(h):bt(h),w=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&sl(S.delta,x)})[0];if(w&&w.should){h.cancelable&&h.preventDefault();return}if(!w){var y=(a.current.shards||[]).map(Oo).filter(Boolean).filter(function(S){return S.contains(h.target)}),b=y.length>0?i(h,y[0]):!a.current.noIsolation;b&&h.cancelable&&h.preventDefault()}}},[]),d=c.useCallback(function(p,h,x,w){var y={name:p,delta:h,target:x,should:w,shadowParent:ll(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),m=c.useCallback(function(p){n.current=bt(p),o.current=void 0},[]),f=c.useCallback(function(p){d(p.type,Ao(p),p.target,i(p,e.lockRef.current))},[]),g=c.useCallback(function(p){d(p.type,bt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",m,Ue),function(){Ke=Ke.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",m,Ue)}},[]);var v=e.removeScrollBar,_=e.inert;return c.createElement(c.Fragment,null,_?c.createElement(s,{styles:il(r)}):null,v?c.createElement(Zc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ll(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ul=Fc(_r,cl);var $t=c.forwardRef(function(e,t){return c.createElement(Bt,xe({},e,{ref:t,sideCar:ul}))});$t.classNames=Bt.classNames;var dl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,St=new WeakMap,Ct={},mn=0,Sr=function(e){return e&&(e.host||Sr(e.parentNode))},fl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Sr(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})},pl=function(e,t,n,o){var r=fl(t,Array.isArray(e)?e:[e]);Ct[n]||(Ct[n]=new WeakMap);var s=Ct[n],a=[],i=new Set,u=new Set(r),d=function(f){!f||i.has(f)||(i.add(f),d(f.parentNode))};r.forEach(d);var m=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(g){if(i.has(g))m(g);else try{var v=g.getAttribute(o),_=v!==null&&v!=="false",p=(Ge.get(g)||0)+1,h=(s.get(g)||0)+1;Ge.set(g,p),s.set(g,h),a.push(g),p===1&&_&&St.set(g,!0),h===1&&g.setAttribute(n,"true"),_||g.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",g,x)}})};return m(t),i.clear(),mn++,function(){a.forEach(function(f){var g=Ge.get(f)-1,v=s.get(f)-1;Ge.set(f,g),s.set(f,v),g||(St.has(f)||f.removeAttribute(o),St.delete(f)),v||f.removeAttribute(n)}),mn--,mn||(Ge=new WeakMap,Ge=new WeakMap,St=new WeakMap,Ct={})}},Bn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=dl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),pl(o,r,n,"aria-hidden")):function(){return null}},Wt="Dialog",[Cr]=Oe(Wt),[ml,_e]=Cr(Wt),Er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),u=c.useRef(null),[d,m]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:Wt});return l.jsx(ml,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(f=>!f),[m]),modal:a,children:n})};Er.displayName=Wt;var Rr="DialogTrigger",hl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Rr,n),s=H(t,r.triggerRef);return l.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Vn(r.open),...o,ref:s,onClick:I(e.onClick,r.onOpenToggle)})});hl.displayName=Rr;var $n="DialogPortal",[vl,Tr]=Cr($n,{forceMount:void 0}),Pr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=_e($n,t);return l.jsx(vl,{scope:t,forceMount:n,children:c.Children.map(o,a=>l.jsx(Pe,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:a})}))})};Pr.displayName=$n;var Nt="DialogOverlay",Mr=c.forwardRef((e,t)=>{const n=Tr(Nt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Nt,e.__scopeDialog);return s.modal?l.jsx(Pe,{present:o||s.open,children:l.jsx(_l,{...r,ref:t})}):null});Mr.displayName=Nt;var gl=Ze("DialogOverlay.RemoveScroll"),_l=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Nt,n);return l.jsx($t,{as:gl,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(B.div,{"data-state":Vn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Be="DialogContent",Ir=c.forwardRef((e,t)=>{const n=Tr(Be,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Be,e.__scopeDialog);return l.jsx(Pe,{present:o||s.open,children:s.modal?l.jsx(wl,{...r,ref:t}):l.jsx(xl,{...r,ref:t})})});Ir.displayName=Be;var wl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(null),r=H(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return Bn(s)},[]),l.jsx(Nr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault())})}),xl=c.forwardRef((e,t)=>{const n=_e(Be,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return l.jsx(Nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Nr=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,i=_e(Be,n),u=c.useRef(null),d=H(t,u);return zn(),l.jsxs(l.Fragment,{children:[l.jsx(zt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Vn(i.open),...a,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(yl,{titleId:i.titleId}),l.jsx(Sl,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Wn="DialogTitle",Ar=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Wn,n);return l.jsx(B.h2,{id:r.titleId,...o,ref:t})});Ar.displayName=Wn;var Or="DialogDescription",Dr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Or,n);return l.jsx(B.p,{id:r.descriptionId,...o,ref:t})});Dr.displayName=Or;var jr="DialogClose",Lr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(jr,n);return l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});Lr.displayName=jr;function Vn(e){return e?"open":"closed"}var kr="DialogTitleWarning",[Tv,Fr]=qa(kr,{contentName:Be,titleName:Wn,docsSlug:"dialog"}),yl=({titleId:e})=>{const t=Fr(kr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
41
+ `)},al=0,Ke=[];function cl(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(al++)[0],s=c.useState(wr)[0],a=c.useRef(e);c.useEffect(function(){a.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=Mc([e.lockRef.current],(e.shards||[]).map(Oo),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=c.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var x=bt(p),w=n.current,y="deltaX"in p?p.deltaX:w[0]-x[0],b="deltaY"in p?p.deltaY:w[1]-x[1],S,R=p.target,C=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in p&&C==="h"&&R.type==="range")return!1;var N=window.getSelection(),P=N&&N.anchorNode,D=P?P===R||P.contains(R):!1;if(D)return!1;var L=No(C,R);if(!L)return!0;if(L?S=C:(S=C==="v"?"h":"v",L=No(C,R)),!L)return!1;if(!o.current&&"changedTouches"in p&&(y||b)&&(o.current=S),!S)return!0;var k=o.current||S;return rl(k,h,p,k==="h"?y:b)},[]),u=c.useCallback(function(p){var h=p;if(!(!Ke.length||Ke[Ke.length-1]!==s)){var x="deltaY"in h?Ao(h):bt(h),w=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&sl(S.delta,x)})[0];if(w&&w.should){h.cancelable&&h.preventDefault();return}if(!w){var y=(a.current.shards||[]).map(Oo).filter(Boolean).filter(function(S){return S.contains(h.target)}),b=y.length>0?i(h,y[0]):!a.current.noIsolation;b&&h.cancelable&&h.preventDefault()}}},[]),d=c.useCallback(function(p,h,x,w){var y={name:p,delta:h,target:x,should:w,shadowParent:ll(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),m=c.useCallback(function(p){n.current=bt(p),o.current=void 0},[]),f=c.useCallback(function(p){d(p.type,Ao(p),p.target,i(p,e.lockRef.current))},[]),g=c.useCallback(function(p){d(p.type,bt(p),p.target,i(p,e.lockRef.current))},[]);c.useEffect(function(){return Ke.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",m,Ue),function(){Ke=Ke.filter(function(p){return p!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",m,Ue)}},[]);var v=e.removeScrollBar,_=e.inert;return c.createElement(c.Fragment,null,_?c.createElement(s,{styles:il(r)}):null,v?c.createElement(Zc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ll(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ul=Fc(_r,cl);var Bt=c.forwardRef(function(e,t){return c.createElement($t,xe({},e,{ref:t,sideCar:ul}))});Bt.classNames=$t.classNames;var dl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,St=new WeakMap,Ct={},mn=0,Sr=function(e){return e&&(e.host||Sr(e.parentNode))},fl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Sr(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})},pl=function(e,t,n,o){var r=fl(t,Array.isArray(e)?e:[e]);Ct[n]||(Ct[n]=new WeakMap);var s=Ct[n],a=[],i=new Set,u=new Set(r),d=function(f){!f||i.has(f)||(i.add(f),d(f.parentNode))};r.forEach(d);var m=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(g){if(i.has(g))m(g);else try{var v=g.getAttribute(o),_=v!==null&&v!=="false",p=(Ge.get(g)||0)+1,h=(s.get(g)||0)+1;Ge.set(g,p),s.set(g,h),a.push(g),p===1&&_&&St.set(g,!0),h===1&&g.setAttribute(n,"true"),_||g.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",g,x)}})};return m(t),i.clear(),mn++,function(){a.forEach(function(f){var g=Ge.get(f)-1,v=s.get(f)-1;Ge.set(f,g),s.set(f,v),g||(St.has(f)||f.removeAttribute(o),St.delete(f)),v||f.removeAttribute(n)}),mn--,mn||(Ge=new WeakMap,Ge=new WeakMap,St=new WeakMap,Ct={})}},$n=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=dl(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),pl(o,r,n,"aria-hidden")):function(){return null}},Wt="Dialog",[Cr]=Oe(Wt),[ml,_e]=Cr(Wt),Er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),u=c.useRef(null),[d,m]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:Wt});return l.jsx(ml,{scope:t,triggerRef:i,contentRef:u,contentId:he(),titleId:he(),descriptionId:he(),open:d,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(f=>!f),[m]),modal:a,children:n})};Er.displayName=Wt;var Rr="DialogTrigger",hl=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Rr,n),s=H(t,r.triggerRef);return l.jsx($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Vn(r.open),...o,ref:s,onClick:I(e.onClick,r.onOpenToggle)})});hl.displayName=Rr;var Bn="DialogPortal",[vl,Tr]=Cr(Bn,{forceMount:void 0}),Pr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=_e(Bn,t);return l.jsx(vl,{scope:t,forceMount:n,children:c.Children.map(o,a=>l.jsx(Pe,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:a})}))})};Pr.displayName=Bn;var Nt="DialogOverlay",Mr=c.forwardRef((e,t)=>{const n=Tr(Nt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e(Nt,e.__scopeDialog);return s.modal?l.jsx(Pe,{present:o||s.open,children:l.jsx(_l,{...r,ref:t})}):null});Mr.displayName=Nt;var gl=Ze("DialogOverlay.RemoveScroll"),_l=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Nt,n);return l.jsx(Bt,{as:gl,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx($.div,{"data-state":Vn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),$e="DialogContent",Ir=c.forwardRef((e,t)=>{const n=Tr($e,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=_e($e,e.__scopeDialog);return l.jsx(Pe,{present:o||s.open,children:s.modal?l.jsx(wl,{...r,ref:t}):l.jsx(xl,{...r,ref:t})})});Ir.displayName=$e;var wl=c.forwardRef((e,t)=>{const n=_e($e,e.__scopeDialog),o=c.useRef(null),r=H(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return $n(s)},[]),l.jsx(Nr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault())})}),xl=c.forwardRef((e,t)=>{const n=_e($e,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return l.jsx(Nr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Nr=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,i=_e($e,n),u=c.useRef(null),d=H(t,u);return zn(),l.jsxs(l.Fragment,{children:[l.jsx(zt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(ut,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Vn(i.open),...a,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(yl,{titleId:i.titleId}),l.jsx(Sl,{contentRef:u,descriptionId:i.descriptionId})]})]})}),Wn="DialogTitle",Ar=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Wn,n);return l.jsx($.h2,{id:r.titleId,...o,ref:t})});Ar.displayName=Wn;var Or="DialogDescription",Dr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(Or,n);return l.jsx($.p,{id:r.descriptionId,...o,ref:t})});Dr.displayName=Or;var jr="DialogClose",Lr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=_e(jr,n);return l.jsx($.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});Lr.displayName=jr;function Vn(e){return e?"open":"closed"}var kr="DialogTitleWarning",[Tv,Fr]=qa(kr,{contentName:$e,titleName:Wn,docsSlug:"dialog"}),yl=({titleId:e})=>{const t=Fr(kr),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 c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},bl="DialogDescriptionWarning",Sl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fr(bl).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Cl=Er,El=Pr,Rl=Mr,Tl=Ir,Pl=Ar,Ml=Dr,Il=Lr;const Nl="uzi-modal-module__portalLayer__t7blc",Al="uzi-modal-module__backdrop__IMd3b",Ol="uzi-modal-module__backdropFadeIn__GNJdx",Dl="uzi-modal-module__backdropFadeOut__R-3K5",jl="uzi-modal-module__overlayContent__0DtbP",Ll="uzi-modal-module__modalContentIn__fub8M",kl="uzi-modal-module__modalContentOut__elTJ3",Fl="uzi-modal-module__modal__Mao59",zl="uzi-modal-module__header__PmCaO",Bl="uzi-modal-module__titles__IboyQ",$l="uzi-modal-module__title__Zd7pL",Wl="uzi-modal-module__subtitle__t-LRK",Vl="uzi-modal-module__closeButton__GTiZr",Hl="uzi-modal-module__body__km6FQ",Ul="uzi-modal-module__footer__jWLTv",de={portalLayer:Nl,backdrop:Al,backdropFadeIn:Ol,backdropFadeOut:Dl,overlayContent:jl,modalContentIn:Ll,modalContentOut:kl,modal:Fl,"size-sm":"uzi-modal-module__size-sm__Uu9je","size-md":"uzi-modal-module__size-md__TiiWy","size-lg":"uzi-modal-module__size-lg__BrTIO","size-xl":"uzi-modal-module__size-xl__sj0mh",header:zl,titles:Bl,title:$l,subtitle:Wl,closeButton:Vl,body:Hl,footer:Ul};function zr({open:e,onClose:t,className:n,children:o}){return l.jsx(Cl,{open:e,onOpenChange:r=>{r||t()},children:l.jsx(El,{children:l.jsxs("div",{className:de.portalLayer,children:[l.jsx(Rl,{className:z(de.backdrop,n)}),l.jsx(Tl,{className:de.overlayContent,children:o})]})})})}function Kl({open:e,onClose:t,title:n,subtitle:o,size:r="md",children:s,footer:a}){return l.jsx(zr,{open:e,onClose:t,children:l.jsxs("div",{className:z(de.modal,de[`size-${r}`]),children:[l.jsxs("div",{className:de.header,children:[l.jsxs("div",{className:de.titles,children:[l.jsx(Pl,{className:de.title,children:n}),o?l.jsx(Ml,{className:de.subtitle,children:o}):null]}),l.jsx(Il,{asChild:!0,children:l.jsx("button",{className:de.closeButton,"aria-label":"Close",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})})]}),l.jsx("div",{className:de.body,children:s}),a&&l.jsx("div",{className:de.footer,children:a})]})})}const Gl="uzi-alert-module__alert__7Bt6c",Yl="uzi-alert-module__success__apdFG",Xl="uzi-alert-module__error__KLgi1",ql="uzi-alert-module__warning__F4fpk",Zl="uzi-alert-module__info__1IKHt",Do={alert:Gl,success:Yl,error:Xl,warning:ql,info:Zl};function Jl({tone:e,children:t,className:n}){return l.jsx("div",{className:z(Do.alert,Do[e],n),role:"alert",children:t})}function Vt(e){const t=e+"CollectionProvider",[n,o]=Oe(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:x}=p,w=O.useRef(null),y=O.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:y,collectionRef:w,children:x})};a.displayName=t;const i=e+"CollectionSlot",u=Ze(i),d=O.forwardRef((p,h)=>{const{scope:x,children:w}=p,y=s(i,x),b=H(h,y.collectionRef);return l.jsx(u,{ref:b,children:w})});d.displayName=i;const m=e+"CollectionItemSlot",f="data-radix-collection-item",g=Ze(m),v=O.forwardRef((p,h)=>{const{scope:x,children:w,...y}=p,b=O.useRef(null),S=H(h,b),R=s(m,x);return O.useEffect(()=>(R.itemMap.set(b,{ref:b,...y}),()=>{R.itemMap.delete(b)})),l.jsx(g,{[f]:"",ref:S,children:w})});v.displayName=m;function _(p){const h=s(e+"CollectionConsumer",p);return O.useCallback(()=>{const w=h.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((R,C)=>y.indexOf(R.ref.current)-y.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:d,ItemSlot:v},_,o]}var Br=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"}),Ql="VisuallyHidden",Hn=c.forwardRef((e,t)=>l.jsx(B.span,{...e,ref:t,style:{...Br,...e.style}}));Hn.displayName=Ql;var Un="ToastProvider",[Kn,eu,tu]=Vt("Toast"),[$r]=Oe("Toast",[tu]),[nu,Ht]=$r(Un),Wr=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[d,m]=c.useState(0),f=c.useRef(!1),g=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Un}\`. Expected non-empty \`string\`.`),l.jsx(Kn.Provider,{scope:t,children:l.jsx(nu,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:d,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>m(v=>v+1),[]),onToastRemove:c.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:g,children:a})})};Wr.displayName=Un;var Vr="ToastViewport",ou=["F8"],Sn="toast.viewportPause",Cn="toast.viewportResume",Hr=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=ou,label:r="Notifications ({hotkey})",...s}=e,a=Ht(Vr,n),i=eu(n),u=c.useRef(null),d=c.useRef(null),m=c.useRef(null),f=c.useRef(null),g=H(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=a.toastCount>0;c.useEffect(()=>{const h=x=>{o.length!==0&&o.every(y=>x[y]||x.code===y)&&f.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]),c.useEffect(()=>{const h=u.current,x=f.current;if(_&&h&&x){const w=()=>{if(!a.isClosePausedRef.current){const R=new CustomEvent(Sn);x.dispatchEvent(R),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const R=new CustomEvent(Cn);x.dispatchEvent(R),a.isClosePausedRef.current=!1}},b=R=>{!h.contains(R.relatedTarget)&&y()},S=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",w),h.addEventListener("focusout",b),h.addEventListener("pointermove",w),h.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",w),h.removeEventListener("focusout",b),h.removeEventListener("pointermove",w),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",y)}}},[_,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:h})=>{const w=i().map(y=>{const b=y.ref.current,S=[b,...gu(b)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?w.reverse():w).flat()},[i]);return c.useEffect(()=>{const h=f.current;if(h){const x=w=>{const y=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!y){const S=document.activeElement,R=w.shiftKey;if(w.target===h&&R){d.current?.focus();return}const P=p({tabbingDirection:R?"backwards":"forwards"}),D=P.findIndex(L=>L===S);hn(P.slice(D+1))?w.preventDefault():R?d.current?.focus():m.current?.focus()}};return h.addEventListener("keydown",x),()=>h.removeEventListener("keydown",x)}},[i,p]),l.jsxs(gc,{ref:u,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&l.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"forwards"});hn(h)}}),l.jsx(Kn.Slot,{scope:n,children:l.jsx(B.ol,{tabIndex:-1,...s,ref:g})}),_&&l.jsx(En,{ref:m,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"backwards"});hn(h)}})]})});Hr.displayName=Vr;var Ur="ToastFocusProxy",En=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ht(Ur,n);return l.jsx(Hn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const i=a.relatedTarget;!s.viewport?.contains(i)&&o()}})});En.displayName=Ur;var ft="Toast",ru="toast.swipeStart",su="toast.swipeMove",iu="toast.swipeCancel",au="toast.swipeEnd",Kr=c.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[i,u]=ze({prop:o,defaultProp:r??!0,onChange:s,caller:ft});return l.jsx(Pe,{present:n||i,children:l.jsx(uu,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:I(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:I(e.onSwipeMove,d=>{const{x:m,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:I(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:I(e.onSwipeEnd,d=>{const{x:m,y:f}=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",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Kr.displayName=ft;var[cu,lu]=$r(ft,{onClose(){}}),uu=c.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:d,onSwipeStart:m,onSwipeMove:f,onSwipeCancel:g,onSwipeEnd:v,..._}=e,p=Ht(ft,n),[h,x]=c.useState(null),w=H(t,T=>x(T)),y=c.useRef(null),b=c.useRef(null),S=r||p.duration,R=c.useRef(0),C=c.useRef(S),N=c.useRef(0),{onToastAdd:P,onToastRemove:D}=p,L=ne(()=>{h?.contains(document.activeElement)&&p.viewport?.focus(),a()}),k=c.useCallback(T=>{!T||T===1/0||(window.clearTimeout(N.current),R.current=new Date().getTime(),N.current=window.setTimeout(L,T))},[L]);c.useEffect(()=>{const T=p.viewport;if(T){const $=()=>{k(C.current),d?.()},j=()=>{const F=new Date().getTime()-R.current;C.current=C.current-F,window.clearTimeout(N.current),u?.()};return T.addEventListener(Sn,j),T.addEventListener(Cn,$),()=>{T.removeEventListener(Sn,j),T.removeEventListener(Cn,$)}}},[p.viewport,S,u,d,k]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&k(S)},[s,S,p.isClosePausedRef,k]),c.useEffect(()=>(P(),()=>D()),[P,D]);const W=c.useMemo(()=>h?Jr(h):null,[h]);return p.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(du,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(cu,{scope:n,onClose:L,children:ct.createPortal(l.jsx(Kn.ItemSlot,{scope:n,children:l.jsx(vc,{asChild:!0,onEscapeKeyDown:I(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(B.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:I(e.onKeyDown,T=>{T.key==="Escape"&&(i?.(T.nativeEvent),T.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:I(e.onPointerDown,T=>{T.button===0&&(y.current={x:T.clientX,y:T.clientY})}),onPointerMove:I(e.onPointerMove,T=>{if(!y.current)return;const $=T.clientX-y.current.x,j=T.clientY-y.current.y,F=!!b.current,M=["left","right"].includes(p.swipeDirection),E=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=M?E(0,$):0,G=M?0:E(0,j),Q=T.pointerType==="touch"?10:2,Z={x:V,y:G},re={originalEvent:T,delta:Z};F?(b.current=Z,Et(su,f,re,{discrete:!1})):jo(Z,p.swipeDirection,Q)?(b.current=Z,Et(ru,m,re,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs($)>Q||Math.abs(j)>Q)&&(y.current=null)}),onPointerUp:I(e.onPointerUp,T=>{const $=b.current,j=T.target;if(j.hasPointerCapture(T.pointerId)&&j.releasePointerCapture(T.pointerId),b.current=null,y.current=null,$){const F=T.currentTarget,M={originalEvent:T,delta:$};jo($,p.swipeDirection,p.swipeThreshold)?Et(au,v,M,{discrete:!0}):Et(iu,g,M,{discrete:!0}),F.addEventListener("click",E=>E.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),du=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ht(ft,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return hu(()=>a(!0)),c.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:l.jsx(dt,{asChild:!0,children:l.jsx(Hn,{...o,children:s&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},fu="ToastTitle",pu=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});pu.displayName=fu;var mu="ToastDescription",Gr=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});Gr.displayName=mu;var Yr="ToastAction",Xr=c.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(Zr,{altText:n,asChild:!0,children:l.jsx(Gn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yr}\`. Expected non-empty \`string\`.`),null)});Xr.displayName=Yr;var qr="ToastClose",Gn=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=lu(qr,n);return l.jsx(Zr,{asChild:!0,children:l.jsx(B.button,{type:"button",...o,ref:t,onClick:I(e.onClick,r.onClose)})})});Gn.displayName=qr;var Zr=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(B.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Jr(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),vu(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Jr(o))}}),t}function Et(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?Fn(r,s):r.dispatchEvent(s)}var jo=(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 hu(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 vu(e){return e.nodeType===e.ELEMENT_NODE}function gu(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 hn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var _u=Wr,wu=Hr,xu=Kr,yu=Gr,bu=Xr,Su=Gn;const Cu="uzi-toast-module__stack__SRrda",Eu="uzi-toast-module__topRight__WiZzM",Ru="uzi-toast-module__topLeft__SzFS9",Tu="uzi-toast-module__topCenter__X5W-x",Pu="uzi-toast-module__bottomRight__DMtoS",Mu="uzi-toast-module__bottomLeft__ZZ7VF",Iu="uzi-toast-module__bottomCenter__QNJrM",Nu="uzi-toast-module__toast__HNUcj",Au="uzi-toast-module__toastSlideIn__BTXfm",Ou="uzi-toast-module__toastSlideOut__mBX-G",Du="uzi-toast-module__toastSwipeOut__R-jk2",ju="uzi-toast-module__icon__LIAqr",Lu="uzi-toast-module__body__9vzs7",ku="uzi-toast-module__message__TBY65",Fu="uzi-toast-module__actions__Iykd9",zu="uzi-toast-module__actionButton__cvUr0",Bu="uzi-toast-module__closeButton__9JKNG",Ee={stack:Cu,topRight:Eu,topLeft:Ru,topCenter:Tu,bottomRight:Pu,bottomLeft:Mu,bottomCenter:Iu,toast:Nu,toastSlideIn:Au,toastSlideOut:Ou,toastSwipeOut:Du,icon:ju,body:Lu,message:ku,actions:Fu,actionButton:zu,closeButton:Bu},$u={position:"top-right",maxToasts:5,defaultDuration:4e3,pauseOnHover:!0,pauseOnFocusLoss:!0},Qr=O.createContext(void 0);let Wu=0;const Vu=()=>`toast-${++Wu}-${Date.now()}`;function Hu({children:e,config:t}){const[n,o]=O.useState([]),[r,s]=O.useState(!1),a=O.useMemo(()=>({...$u,...t}),[t]),i=O.useCallback((p,h={})=>{const x=Vu();return o(w=>{const y=[...w,{id:x,message:p,type:h.type??"info",duration:h.duration??(h.type==="error"?6e3:a.defaultDuration),dismissible:h.dismissible??!0,action:h.action}];return y.length>a.maxToasts&&y.shift(),y}),x},[a.defaultDuration,a.maxToasts]),u=O.useCallback((p,h)=>i(p,{...h,type:"success"}),[i]),d=O.useCallback((p,h)=>i(p,{...h,type:"error",duration:h?.duration??6e3}),[i]),m=O.useCallback((p,h)=>i(p,{...h,type:"warning"}),[i]),f=O.useCallback((p,h)=>i(p,{...h,type:"info"}),[i]),g=O.useCallback(p=>{o(h=>h.filter(x=>x.id!==p))},[]),v=O.useCallback(()=>o([]),[]);O.useEffect(()=>{if(!a.pauseOnFocusLoss)return;const p=()=>s(document.visibilityState!=="visible");return document.addEventListener("visibilitychange",p),()=>document.removeEventListener("visibilitychange",p)},[a.pauseOnFocusLoss]);const _=O.useMemo(()=>({toasts:n,push:i,success:u,error:d,warning:m,info:f,dismiss:g,dismissAll:v}),[n,i,u,d,m,f,g,v]);return l.jsx(Qr.Provider,{value:_,children:l.jsxs(_u,{swipeDirection:"right",children:[e,l.jsx(Ku,{toasts:n,position:a.position,pauseOnHover:a.pauseOnHover,isPaused:r,onDismiss:g,onPauseChange:s})]})})}function Uu(){const e=O.useContext(Qr);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function Ku({toasts:e,position:t,pauseOnHover:n,isPaused:o,onDismiss:r,onPauseChange:s}){const a=(()=>{switch(t){case"top-left":return"topLeft";case"top-center":return"topCenter";case"bottom-right":return"bottomRight";case"bottom-left":return"bottomLeft";case"bottom-center":return"bottomCenter";default:return"topRight"}})();return l.jsxs(l.Fragment,{children:[e.map(i=>l.jsx(Gu,{toast:i,isPaused:o,onDismiss:r},i.id)),l.jsx(wu,{className:z(Ee.stack,Ee[a]),label:"Notifications",onMouseEnter:()=>n&&s(!0),onMouseLeave:()=>n&&s(!1)})]})}function Gu({toast:e,isPaused:t,onDismiss:n}){const[o,r]=O.useState(!0),s=O.useRef(null),a=O.useRef(0),i=O.useRef(e.duration??0),u=O.useRef(!1),d=Yu(e.type),m={"--toast-bg":d.background,"--toast-border":d.border,"--toast-text":d.text,"--toast-button-bg":d.buttonBg,"--toast-button-border":d.buttonBorder,"--toast-action-bg":d.actionBg,"--toast-action-border":d.actionBorder},f=()=>{s.current&&(window.clearTimeout(s.current),s.current=null)},g=O.useCallback(()=>{u.current||(u.current=!0,r(!1),f(),window.setTimeout(()=>n(e.id),160))},[n,e.id]),v=O.useCallback(p=>{if(!p||p<=0){g();return}a.current=performance.now(),f(),s.current=window.setTimeout(()=>g(),p)},[g]);O.useEffect(()=>{if(!(!e.duration||e.duration<=0))return v(e.duration),f},[v,e.duration]),O.useEffect(()=>{if(!(!e.duration||e.duration<=0))if(t){const p=performance.now()-a.current;i.current=Math.max(0,i.current-p),f()}else v(i.current)},[t,v,e.duration]);const _=Xu(e.type);return l.jsxs(xu,{open:o,onOpenChange:p=>{p||g()},duration:2147483647,className:Ee.toast,style:m,children:[l.jsx("span",{className:Ee.icon,"aria-hidden":!0,children:_}),l.jsxs("div",{className:Ee.body,children:[l.jsx(yu,{className:Ee.message,children:e.message}),e.action&&l.jsx("div",{className:Ee.actions,children:l.jsx(bu,{asChild:!0,altText:e.action.label,children:l.jsx("button",{type:"button",className:Ee.actionButton,onClick:()=>{e.action?.onClick(),g()},children:e.action.label})})})]}),e.dismissible!==!1&&l.jsx(Su,{asChild:!0,children:l.jsx("button",{type:"button",className:Ee.closeButton,"aria-label":"Dismiss notification",children:l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M11 3L3 11M3 3l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]})}function Yu(e){switch(e){case"success":return{background:"#22c55e",border:"#16a34a",text:"#0b1224",buttonBg:"rgba(0, 0, 0, 0.08)",buttonBorder:"rgba(0, 0, 0, 0.2)",actionBg:"rgba(0, 0, 0, 0.1)",actionBorder:"rgba(0, 0, 0, 0.2)"};case"error":return{background:"#f87171",border:"#ef4444",text:"#0b1224",buttonBg:"rgba(0, 0, 0, 0.08)",buttonBorder:"rgba(0, 0, 0, 0.2)",actionBg:"rgba(0, 0, 0, 0.1)",actionBorder:"rgba(0, 0, 0, 0.2)"};case"warning":return{background:"#fbbf24",border:"#f59e0b",text:"#0b1224",buttonBg:"rgba(0, 0, 0, 0.08)",buttonBorder:"rgba(0, 0, 0, 0.2)",actionBg:"rgba(0, 0, 0, 0.1)",actionBorder:"rgba(0, 0, 0, 0.2)"};default:return{background:"#38bdf8",border:"#0ea5e9",text:"#0b1224",buttonBg:"rgba(0, 0, 0, 0.08)",buttonBorder:"rgba(0, 0, 0, 0.2)",actionBg:"rgba(0, 0, 0, 0.1)",actionBorder:"rgba(0, 0, 0, 0.2)"}}}function Xu(e){switch(e){case"success":return"OK";case"error":return"X";case"warning":return"!";default:return"i"}}const qu="uzi-input-module__input__-ipHD",Zu={input:qu},es=c.forwardRef(({className:e,type:t,...n},o)=>l.jsx("input",{ref:o,type:t,className:z(Zu.input,e),...n}));es.displayName="Input";const Ju="uzi-label-module__label__gKflt",Qu={label:Ju},ts=c.forwardRef(({className:e,...t},n)=>l.jsx("label",{ref:n,className:z(Qu.label,e),...t}));ts.displayName="Label";const ed="uzi-checkbox-module__checkbox__zAB1y",td={checkbox:ed},ns=c.forwardRef(({className:e,...t},n)=>l.jsx("input",{ref:n,type:"checkbox",className:z(td.checkbox,e),...t}));ns.displayName="Checkbox";var nd=c.createContext(void 0);function Yn(e){const t=c.useContext(nd);return e||t||"ltr"}const od=["top","right","bottom","left"],Ne=Math.min,ce=Math.max,At=Math.round,Rt=Math.floor,be=e=>({x:e,y:e}),rd={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(e,t,n){return ce(e,Ne(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function ye(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(ye(e))}function sd(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=Zn(e),s=qn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ot(a)),[a,Ot(a)]}function id(e){const t=Ot(e);return[Tn(e),t,Tn(t)]}function Tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lo=["left","right"],ko=["right","left"],ad=["top","bottom"],cd=["bottom","top"];function ld(e,t,n){switch(e){case"top":case"bottom":return n?t?ko:Lo:t?Lo:ko;case"left":case"right":return t?ad:cd;default:return[]}}function ud(e,t,n,o){const r=Qe(e);let s=ld(Te(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Tn)))),s}function Ot(e){const t=Te(e);return rd[t]+e.slice(t.length)}function dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function os(e){return typeof e!="number"?dd(e):{top:e,right:e,bottom:e,left:e}}function Dt(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 Fo(e,t,n){let{reference:o,floating:r}=e;const s=ye(t),a=Zn(t),i=qn(a),u=Te(t),d=s==="y",m=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let v;switch(u){case"top":v={x:m,y:o.y-r.height};break;case"bottom":v={x:m,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(Qe(t)){case"start":v[a]-=g*(n&&d?-1:1);break;case"end":v[a]+=g*(n&&d?-1:1);break}return v}async function fd(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:g=!1,padding:v=0}=Re(t,e),_=os(v),h=i[g?f==="floating"?"reference":"floating":f],x=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:m,strategy:u})),w=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),b=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:y,strategy:u}):w);return{top:(x.top-S.top+_.top)/b.y,bottom:(S.bottom-x.bottom+_.bottom)/b.y,left:(x.left-S.left+_.left)/b.x,right:(S.right-x.right+_.right)/b.x}}const pd=50,md=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:fd},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:m,y:f}=Fo(d,o,u),g=o,v=0;const _={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:y,y:b,data:S,reset:R}=await w({x:m,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:_,rects:d,platform:i,elements:{reference:e,floating:t}});m=y??m,f=b??f,_[x]={..._[x],...S},R&&v<pd&&(v++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:m,y:f}=Fo(d,g,u)),p=-1)}return{x:m,y:f,placement:g,strategy:r,middlewareData:_}},hd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:m=0}=Re(e,t)||{};if(d==null)return{};const f=os(m),g={x:n,y:o},v=Zn(r),_=qn(v),p=await a.getDimensions(d),h=v==="y",x=h?"top":"left",w=h?"bottom":"right",y=h?"clientHeight":"clientWidth",b=s.reference[_]+s.reference[v]-g[v]-s.floating[_],S=g[v]-s.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=R?R[y]:0;(!C||!await(a.isElement==null?void 0:a.isElement(R)))&&(C=i.floating[y]||s.floating[_]);const N=b/2-S/2,P=C/2-p[_]/2-1,D=Ne(f[x],P),L=Ne(f[w],P),k=D,W=C-p[_]-L,T=C/2-p[_]/2+N,$=Rn(k,T,W),j=!u.arrow&&Qe(r)!=null&&T!==$&&s.reference[_]/2-(T<k?D:L)-p[_]/2<0,F=j?T<k?T-k:T-W:0;return{[v]:g[v]+F,data:{[v]:$,centerOffset:T-$-F,...j&&{alignmentOffset:F}},reset:j}}}),vd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:p=!0,...h}=Re(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Te(r),w=ye(i),y=Te(i)===i,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=g||(y||!p?[Ot(i)]:id(i)),R=_!=="none";!g&&R&&S.push(...ud(i,p,_,b));const C=[i,...S],N=await u.detectOverflow(t,h),P=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(m&&P.push(N[x]),f){const T=sd(r,a,b);P.push(N[T[0]],N[T[1]])}if(D=[...D,{placement:r,overflows:P}],!P.every(T=>T<=0)){var L,k;const T=(((L=s.flip)==null?void 0:L.index)||0)+1,$=C[T];if($&&(!(f==="alignment"?w!==ye($):!1)||D.every(M=>ye(M.placement)===w?M.overflows[0]>0:!0)))return{data:{index:T,overflows:D},reset:{placement:$}};let j=(k=D.filter(F=>F.overflows[0]<=0).sort((F,M)=>F.overflows[1]-M.overflows[1])[0])==null?void 0:k.placement;if(!j)switch(v){case"bestFit":{var W;const F=(W=D.filter(M=>{if(R){const E=ye(M.placement);return E===w||E==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(E=>E>0).reduce((E,V)=>E+V,0)]).sort((M,E)=>M[1]-E[1])[0])==null?void 0:W[0];F&&(j=F);break}case"initialPlacement":j=i;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bo(e){return od.some(t=>e[t]>=0)}const gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Re(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...s,elementContext:"reference"}),i=zo(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Bo(i)}}}case"escaped":{const a=await o.detectOverflow(t,{...s,altBoundary:!0}),i=zo(a,n.floating);return{data:{escapedOffsets:i,escaped:Bo(i)}}}default:return{}}}}},rs=new Set(["left","top"]);async function _d(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Te(n),i=Qe(n),u=ye(n)==="y",d=rs.has(a)?-1:1,m=s&&u?-1:1,f=Re(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:_}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof _=="number"&&(v=i==="end"?_*-1:_),u?{x:v*m,y:g*d}:{x:g*d,y:v*m}}const wd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,u=await _d(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},xd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:x=>{let{x:w,y}=x;return{x:w,y}}},...d}=Re(e,t),m={x:n,y:o},f=await s.detectOverflow(t,d),g=ye(Te(r)),v=Xn(g);let _=m[v],p=m[g];if(a){const x=v==="y"?"top":"left",w=v==="y"?"bottom":"right",y=_+f[x],b=_-f[w];_=Rn(y,_,b)}if(i){const x=g==="y"?"top":"left",w=g==="y"?"bottom":"right",y=p+f[x],b=p-f[w];p=Rn(y,p,b)}const h=u.fn({...t,[v]:_,[g]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:a,[g]:i}}}}}},yd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=Re(e,t),m={x:n,y:o},f=ye(r),g=Xn(f);let v=m[g],_=m[f];const p=Re(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const y=g==="y"?"height":"width",b=s.reference[g]-s.floating[y]+h.mainAxis,S=s.reference[g]+s.reference[y]-h.mainAxis;v<b?v=b:v>S&&(v=S)}if(d){var x,w;const y=g==="y"?"width":"height",b=rs.has(Te(r)),S=s.reference[f]-s.floating[y]+(b&&((x=a.offset)==null?void 0:x[f])||0)+(b?0:h.crossAxis),R=s.reference[f]+s.reference[y]+(b?0:((w=a.offset)==null?void 0:w[f])||0)-(b?h.crossAxis:0);_<S?_=S:_>R&&(_=R)}return{[g]:v,[f]:_}}}},bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...d}=Re(e,t),m=await a.detectOverflow(t,d),f=Te(r),g=Qe(r),v=ye(r)==="y",{width:_,height:p}=s.floating;let h,x;f==="top"||f==="bottom"?(h=f,x=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(x=f,h=g==="end"?"top":"bottom");const w=p-m.top-m.bottom,y=_-m.left-m.right,b=Ne(p-m[h],w),S=Ne(_-m[x],y),R=!t.middlewareData.shift;let C=b,N=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(C=w),R&&!g){const D=ce(m.left,0),L=ce(m.right,0),k=ce(m.top,0),W=ce(m.bottom,0);v?N=_-2*(D!==0||L!==0?D+L:ce(m.left,m.right)):C=p-2*(k!==0||W!==0?k+W:ce(m.top,m.bottom))}await u({...t,availableWidth:N,availableHeight:C});const P=await a.getDimensions(i.floating);return _!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function et(e){return ss(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(ss(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ss(e){return Ut()?e instanceof Node||e instanceof le(e).Node:!1}function ve(e){return Ut()?e instanceof Element||e instanceof le(e).Element:!1}function Me(e){return Ut()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function $o(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Sd(e){return/^(table|td|th)$/.test(et(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Cd=/transform|translate|scale|rotate|perspective|filter/,Ed=/paint|layout|strict|content/,Fe=e=>!!e&&e!=="none";let vn;function Jn(e){const t=ve(e)?ge(e):e;return Fe(t.transform)||Fe(t.translate)||Fe(t.scale)||Fe(t.rotate)||Fe(t.perspective)||!Qn()&&(Fe(t.backdropFilter)||Fe(t.filter))||Cd.test(t.willChange||"")||Ed.test(t.contain||"")}function Rd(e){let t=Ae(e);for(;Me(t)&&!Je(t);){if(Jn(t))return t;if(Kt(t))return null;t=Ae(t)}return null}function Qn(){return vn==null&&(vn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vn}function Je(e){return/^(html|body|#document)$/.test(et(e))}function ge(e){return le(e).getComputedStyle(e)}function Gt(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$o(e)&&e.host||Se(e);return $o(t)?t.host:t}function is(e){const t=Ae(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:Me(t)&&pt(t)?t:is(t)}function st(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=is(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=le(r);if(s){const i=Pn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],i&&n?st(i):[])}else return t.concat(r,st(r,[],n))}function Pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function as(e){const t=ge(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Me(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=At(n)!==s||At(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function eo(e){return ve(e)?e:e.contextElement}function qe(e){const t=eo(e);if(!Me(t))return be(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=as(t);let a=(s?At(n.width):n.width)/o,i=(s?At(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Td=be(0);function cs(e){const t=le(e);return!Qn()||!t.visualViewport?Td:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=eo(e);let a=be(1);t&&(o?ve(o)&&(a=qe(o)):a=qe(e));const i=Pd(s,n,o)?cs(s):be(0);let u=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,m=r.width/a.x,f=r.height/a.y;if(s){const g=le(s),v=o&&ve(o)?le(o):o;let _=g,p=Pn(_);for(;p&&o&&v!==_;){const h=qe(p),x=p.getBoundingClientRect(),w=ge(p),y=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,b=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;u*=h.x,d*=h.y,m*=h.x,f*=h.y,u+=y,d+=b,_=le(p),p=Pn(_)}}return Dt({width:m,height:f,x:u,y:d})}function Yt(e,t){const n=Gt(e).scrollLeft;return t?t.left+n:$e(Se(e)).left+n}function ls(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Md(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=Se(o),i=t?Kt(t.floating):!1;if(o===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},d=be(1);const m=be(0),f=Me(o);if((f||!f&&!s)&&((et(o)!=="body"||pt(a))&&(u=Gt(o)),f)){const v=$e(o);d=qe(o),m.x=v.x+o.clientLeft,m.y=v.y+o.clientTop}const g=a&&!f&&!s?ls(a,u):be(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-u.scrollTop*d.y+m.y+g.y}}function Id(e){return Array.from(e.getClientRects())}function Nd(e){const t=Se(e),n=Gt(e),o=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const i=-n.scrollTop;return ge(o).direction==="rtl"&&(a+=ce(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const Wo=25;function Ad(e,t){const n=le(e),o=Se(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,u=0;if(r){s=r.width,a=r.height;const m=Qn();(!m||m&&t==="fixed")&&(i=r.offsetLeft,u=r.offsetTop)}const d=Yt(o);if(d<=0){const m=o.ownerDocument,f=m.body,g=getComputedStyle(f),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,_=Math.abs(o.clientWidth-f.clientWidth-v);_<=Wo&&(s-=_)}else d<=Wo&&(s+=d);return{width:s,height:a,x:i,y:u}}function Od(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Me(e)?qe(e):be(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=r*s.x,d=o*s.y;return{width:a,height:i,x:u,y:d}}function Vo(e,t,n){let o;if(t==="viewport")o=Ad(e,n);else if(t==="document")o=Nd(Se(e));else if(ve(t))o=Od(t,n);else{const r=cs(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function us(e,t){const n=Ae(e);return n===t||!ve(n)||Je(n)?!1:ge(n).position==="fixed"||us(n,t)}function Dd(e,t){const n=t.get(e);if(n)return n;let o=st(e,[],!1).filter(i=>ve(i)&&et(i)!=="body"),r=null;const s=ge(e).position==="fixed";let a=s?Ae(e):e;for(;ve(a)&&!Je(a);){const i=ge(a),u=Jn(a);!u&&i.position==="fixed"&&(r=null),(s?!u&&!r:!u&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||pt(a)&&!u&&us(e,a))?o=o.filter(m=>m!==a):r=i,a=Ae(a)}return t.set(e,o),o}function jd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:Dd(t,this._c):[].concat(n),o],i=Vo(t,a[0],r);let u=i.top,d=i.right,m=i.bottom,f=i.left;for(let g=1;g<a.length;g++){const v=Vo(t,a[g],r);u=ce(v.top,u),d=Ne(v.right,d),m=Ne(v.bottom,m),f=ce(v.left,f)}return{width:d-f,height:m-u,x:f,y:u}}function Ld(e){const{width:t,height:n}=as(e);return{width:t,height:n}}function kd(e,t,n){const o=Me(t),r=Se(t),s=n==="fixed",a=$e(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=be(0);function d(){u.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||pt(r))&&(i=Gt(t)),o){const v=$e(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else r&&d();s&&!o&&r&&d();const m=r&&!o&&!s?ls(r,i):be(0),f=a.left+i.scrollLeft-u.x-m.x,g=a.top+i.scrollTop-u.y-m.y;return{x:f,y:g,width:a.width,height:a.height}}function gn(e){return ge(e).position==="static"}function Ho(e,t){if(!Me(e)||ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Se(e)===n&&(n=n.ownerDocument.body),n}function ds(e,t){const n=le(e);if(Kt(e))return n;if(!Me(e)){let r=Ae(e);for(;r&&!Je(r);){if(ve(r)&&!gn(r))return r;r=Ae(r)}return n}let o=Ho(e,t);for(;o&&Sd(o)&&gn(o);)o=Ho(o,t);return o&&Je(o)&&gn(o)&&!Jn(o)?n:o||Rd(e)||n}const Fd=async function(e){const t=this.getOffsetParent||ds,n=this.getDimensions,o=await n(e.floating);return{reference:kd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zd(e){return ge(e).direction==="rtl"}const Bd={convertOffsetParentRelativeRectToViewportRelativeRect:Md,getDocumentElement:Se,getClippingRect:jd,getOffsetParent:ds,getElementRects:Fd,getClientRects:Id,getDimensions:Ld,getScale:qe,isElement:ve,isRTL:zd};function fs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $d(e,t){let n=null,o;const r=Se(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:m,top:f,width:g,height:v}=d;if(i||t(),!g||!v)return;const _=Rt(f),p=Rt(r.clientWidth-(m+g)),h=Rt(r.clientHeight-(f+v)),x=Rt(m),y={rootMargin:-_+"px "+-p+"px "+-h+"px "+-x+"px",threshold:ce(0,Ne(1,u))||1};let b=!0;function S(R){const C=R[0].intersectionRatio;if(C!==u){if(!b)return a();C?a(!1,C):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!fs(d,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),s}function Wd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=eo(e),m=r||s?[...d?st(d):[],...t?st(t):[]]:[];m.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=d&&i?$d(d,n):null;let g=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),d&&!u&&v.observe(d),t&&v.observe(t));let _,p=u?$e(e):null;u&&h();function h(){const x=$e(e);p&&!fs(p,x)&&n(),p=x,_=requestAnimationFrame(h)}return n(),()=>{var x;m.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,u&&cancelAnimationFrame(_)}}const Vd=wd,Hd=xd,Ud=vd,Kd=bd,Gd=gd,Uo=hd,Yd=yd,Xd=(e,t,n)=>{const o=new Map,r={platform:Bd,...n},s={...r.platform,_c:o};return md(e,t,{...r,platform:s})};var qd=typeof document<"u",Zd=function(){},Mt=qd?O.useLayoutEffect:Zd;function jt(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(!jt(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)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ps(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(e,t){const n=ps(e);return Math.round(t*n)/n}function _n(e){const t=c.useRef(e);return Mt(()=>{t.current=e}),t}function Jd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[m,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=c.useState(o);jt(g,o)||v(o);const[_,p]=c.useState(null),[h,x]=c.useState(null),w=c.useCallback(M=>{M!==R.current&&(R.current=M,p(M))},[]),y=c.useCallback(M=>{M!==C.current&&(C.current=M,x(M))},[]),b=s||_,S=a||h,R=c.useRef(null),C=c.useRef(null),N=c.useRef(m),P=u!=null,D=_n(u),L=_n(r),k=_n(d),W=c.useCallback(()=>{if(!R.current||!C.current)return;const M={placement:t,strategy:n,middleware:g};L.current&&(M.platform=L.current),Xd(R.current,C.current,M).then(E=>{const V={...E,isPositioned:k.current!==!1};T.current&&!jt(N.current,V)&&(N.current=V,ct.flushSync(()=>{f(V)}))})},[g,t,n,L,k]);Mt(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[d]);const T=c.useRef(!1);Mt(()=>(T.current=!0,()=>{T.current=!1}),[]),Mt(()=>{if(b&&(R.current=b),S&&(C.current=S),b&&S){if(D.current)return D.current(b,S,W);W()}},[b,S,W,D,P]);const $=c.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:y}),[w,y]),j=c.useMemo(()=>({reference:b,floating:S}),[b,S]),F=c.useMemo(()=>{const M={position:n,left:0,top:0};if(!j.floating)return M;const E=Ko(j.floating,m.x),V=Ko(j.floating,m.y);return i?{...M,transform:"translate("+E+"px, "+V+"px)",...ps(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:E,top:V}},[n,i,j.floating,m.x,m.y]);return c.useMemo(()=>({...m,update:W,refs:$,elements:j,floatingStyles:F}),[m,W,$,j,F])}const Qd=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?Uo({element:o.current,padding:r}).fn(n):{}:o?Uo({element:o,padding:r}).fn(n):{}}}},ef=(e,t)=>{const n=Vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},tf=(e,t)=>{const n=Hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},nf=(e,t)=>({fn:Yd(e).fn,options:[e,t]}),of=(e,t)=>{const n=Ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},rf=(e,t)=>{const n=Kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},sf=(e,t)=>{const n=Gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},af=(e,t)=>{const n=Qd(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cf="Arrow",ms=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(B.svg,{...s,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"})})});ms.displayName=cf;var lf=ms;function uf(e){const[t,n]=c.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 s=r[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var to="Popper",[hs,Xt]=Oe(to),[df,vs]=hs(to),gs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return l.jsx(df,{scope:t,anchor:o,onAnchorChange:r,children:n})};gs.displayName=to;var _s="PopperAnchor",ws=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=vs(_s,n),a=c.useRef(null),i=H(t,a),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=o?.current||a.current,d!==u.current&&s.onAnchorChange(u.current)}),o?null:l.jsx(B.div,{...r,ref:i})});ws.displayName=_s;var no="PopperContent",[ff,pf]=hs(no),xs=c.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:f="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:_,...p}=e,h=vs(no,n),[x,w]=c.useState(null),y=H(t,A=>w(A)),[b,S]=c.useState(null),R=uf(b),C=R?.width??0,N=R?.height??0,P=o+(s!=="center"?"-"+s:""),D=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(d)?d:[d],k=L.length>0,W={padding:D,boundary:L.filter(hf),altBoundary:k},{refs:T,floatingStyles:$,placement:j,isPositioned:F,middlewareData:M}=Jd({strategy:"fixed",placement:P,whileElementsMounted:(...A)=>Wd(...A,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[ef({mainAxis:r+N,alignmentAxis:a}),u&&tf({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?nf():void 0,...W}),u&&of({...W}),rf({...W,apply:({elements:A,rects:U,availableWidth:se,availableHeight:K})=>{const{width:Y,height:X}=U.reference,ue=A.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${K}px`),ue.setProperty("--radix-popper-anchor-width",`${Y}px`),ue.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&af({element:b,padding:i}),vf({arrowWidth:C,arrowHeight:N}),g&&sf({strategy:"referenceHidden",...W})]}),[E,V]=Ss(j),G=ne(_);q(()=>{F&&G?.()},[F,G]);const Q=M.arrow?.x,Z=M.arrow?.y,re=M.arrow?.centerOffset!==0,[Ce,ie]=c.useState();return q(()=>{x&&ie(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:F?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(ff,{scope:n,placedSide:E,onArrowChange:S,arrowX:Q,arrowY:Z,shouldHideArrow:re,children:l.jsx(B.div,{"data-side":E,"data-align":V,...p,ref:y,style:{...p.style,animation:F?void 0:"none"}})})})});xs.displayName=no;var ys="PopperArrow",mf={top:"bottom",right:"left",bottom:"top",left:"right"},bs=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=pf(ys,o),a=mf[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]: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:l.jsx(lf,{...r,ref:n,style:{...r.style,display:"block"}})})});bs.displayName=ys;function hf(e){return e!==null}var vf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,m]=Ss(n),f={start:"0%",center:"50%",end:"100%"}[m],g=(r.arrow?.x??0)+i/2,v=(r.arrow?.y??0)+u/2;let _="",p="";return d==="bottom"?(_=a?f:`${g}px`,p=`${-u}px`):d==="top"?(_=a?f:`${g}px`,p=`${o.floating.height+u}px`):d==="right"?(_=`${-u}px`,p=a?f:`${v}px`):d==="left"&&(_=`${o.floating.width+u}px`,p=a?f:`${v}px`),{data:{x:_,y:p}}}});function Ss(e){const[t,n="center"]=e.split("-");return[t,n]}var oo=gs,Cs=ws,Es=xs,Rs=bs,wn="rovingFocusGroup.onEntryFocus",gf={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[Mn,Ts,_f]=Vt(mt),[wf,Ps]=Oe(mt,[_f]),[xf,yf]=wf(mt),Ms=c.forwardRef((e,t)=>l.jsx(Mn.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Mn.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(bf,{...e,ref:t})})}));Ms.displayName=mt;var bf=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...f}=e,g=c.useRef(null),v=H(t,g),_=Yn(s),[p,h]=ze({prop:a,defaultProp:i??null,onChange:u,caller:mt}),[x,w]=c.useState(!1),y=ne(d),b=Ts(n),S=c.useRef(!1),[R,C]=c.useState(0);return c.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(wn,y),()=>N.removeEventListener(wn,y)},[y]),l.jsx(xf,{scope:n,orientation:o,dir:_,loop:r,currentTabStopId:p,onItemFocus:c.useCallback(N=>h(N),[h]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:c.useCallback(()=>C(N=>N-1),[]),children:l.jsx(B.div,{tabIndex:x||R===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{S.current=!0}),onFocus:I(e.onFocus,N=>{const P=!S.current;if(N.target===N.currentTarget&&P&&!x){const D=new CustomEvent(wn,gf);if(N.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=b().filter(j=>j.focusable),k=L.find(j=>j.active),W=L.find(j=>j.id===p),$=[k,W,...L].filter(Boolean).map(j=>j.ref.current);As($,m)}}S.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})}),Is="RovingFocusGroupItem",Ns=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,u=he(),d=s||u,m=yf(Is,n),f=m.currentTabStopId===d,g=Ts(n),{onFocusableItemAdd:v,onFocusableItemRemove:_,currentTabStopId:p}=m;return c.useEffect(()=>{if(o)return v(),()=>_()},[o,v,_]),l.jsx(Mn.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(B.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:I(e.onMouseDown,h=>{o?m.onItemFocus(d):h.preventDefault()}),onFocus:I(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:I(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){m.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const x=Ef(h,m.orientation,m.dir);if(x!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=g().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=m.loop?Rf(y,b+1):y.slice(b+1)}setTimeout(()=>As(y))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:p!=null}):a})})});Ns.displayName=Is;var Sf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ef(e,t,n){const o=Cf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Sf[o]}function As(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 Tf=Ms,Pf=Ns,In=["Enter"," "],Mf=["ArrowDown","PageUp","Home"],Os=["ArrowUp","PageDown","End"],If=[...Mf,...Os],Nf={ltr:[...In,"ArrowRight"],rtl:[...In,"ArrowLeft"]},Af={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ht="Menu",[it,Of,Df]=Vt(ht),[He,Ds]=Oe(ht,[Df,Xt,Ps]),vt=Xt(),js=Ps(),[Ls,De]=He(ht),[jf,gt]=He(ht),ks=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,i=vt(t),[u,d]=c.useState(null),m=c.useRef(!1),f=ne(s),g=Yn(r);return c.useEffect(()=>{const v=()=>{m.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},_=()=>m.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),l.jsx(oo,{...i,children:l.jsx(Ls,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:l.jsx(jf,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:m,dir:g,modal:a,children:o})})})};ks.displayName=ht;var Lf="MenuAnchor",ro=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Cs,{...r,...o,ref:t})});ro.displayName=Lf;var so="MenuPortal",[kf,Fs]=He(so,{forceMount:void 0}),zs=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=De(so,t);return l.jsx(kf,{scope:t,forceMount:n,children:l.jsx(Pe,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:o})})})};zs.displayName=so;var fe="MenuContent",[Ff,io]=He(fe),Bs=c.forwardRef((e,t)=>{const n=Fs(fe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(fe,e.__scopeMenu),a=gt(fe,e.__scopeMenu);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Pe,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(zf,{...r,ref:t}):l.jsx(Bf,{...r,ref:t})})})})}),zf=c.forwardRef((e,t)=>{const n=De(fe,e.__scopeMenu),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return Bn(s)},[]),l.jsx(ao,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bf=c.forwardRef((e,t)=>{const n=De(fe,e.__scopeMenu);return l.jsx(ao,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$f=Ze("MenuContent.ScrollLock"),ao=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:g,onDismiss:v,disableOutsideScroll:_,...p}=e,h=De(fe,n),x=gt(fe,n),w=vt(n),y=js(n),b=Of(n),[S,R]=c.useState(null),C=c.useRef(null),N=H(t,C,h.onContentChange),P=c.useRef(0),D=c.useRef(""),L=c.useRef(0),k=c.useRef(null),W=c.useRef("right"),T=c.useRef(0),$=_?$t:c.Fragment,j=_?{as:$f,allowPinchZoom:!0}:void 0,F=E=>{const V=D.current+E,G=b().filter(A=>!A.disabled),Q=document.activeElement,Z=G.find(A=>A.ref.current===Q)?.textValue,re=G.map(A=>A.textValue),Ce=Qf(re,V,Z),ie=G.find(A=>A.textValue===Ce)?.ref.current;(function A(U){D.current=U,window.clearTimeout(P.current),U!==""&&(P.current=window.setTimeout(()=>A(""),1e3))})(V),ie&&setTimeout(()=>ie.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),zn();const M=c.useCallback(E=>W.current===k.current?.side&&tp(E,k.current?.area),[]);return l.jsx(Ff,{scope:n,searchRef:D,onItemEnter:c.useCallback(E=>{M(E)&&E.preventDefault()},[M]),onItemLeave:c.useCallback(E=>{M(E)||(C.current?.focus(),R(null))},[M]),onTriggerLeave:c.useCallback(E=>{M(E)&&E.preventDefault()},[M]),pointerGraceTimerRef:L,onPointerGraceIntentChange:c.useCallback(E=>{k.current=E},[]),children:l.jsx($,{...j,children:l.jsx(zt,{asChild:!0,trapped:r,onMountAutoFocus:I(s,E=>{E.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:g,onDismiss:v,children:l.jsx(Tf,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:R,onEntryFocus:I(u,E=>{x.isUsingKeyboardRef.current||E.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Es,{role:"menu","aria-orientation":"vertical","data-state":oi(h.open),"data-radix-menu-content":"",dir:x.dir,...w,...p,ref:N,style:{outline:"none",...p.style},onKeyDown:I(p.onKeyDown,E=>{const G=E.target.closest("[data-radix-menu-content]")===E.currentTarget,Q=E.ctrlKey||E.altKey||E.metaKey,Z=E.key.length===1;G&&(E.key==="Tab"&&E.preventDefault(),!Q&&Z&&F(E.key));const re=C.current;if(E.target!==re||!If.includes(E.key))return;E.preventDefault();const ie=b().filter(A=>!A.disabled).map(A=>A.ref.current);Os.includes(E.key)&&ie.reverse(),Zf(ie)}),onBlur:I(e.onBlur,E=>{E.currentTarget.contains(E.target)||(window.clearTimeout(P.current),D.current="")}),onPointerMove:I(e.onPointerMove,at(E=>{const V=E.target,G=T.current!==E.clientX;if(E.currentTarget.contains(V)&&G){const Q=E.clientX>T.current?"right":"left";W.current=Q,T.current=E.clientX}}))})})})})})})});Bs.displayName=fe;var Wf="MenuGroup",co=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"group",...o,ref:t})});co.displayName=Wf;var Vf="MenuLabel",$s=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{...o,ref:t})});$s.displayName=Vf;var Lt="MenuItem",Go="menu.itemSelect",qt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=c.useRef(null),a=gt(Lt,e.__scopeMenu),i=io(Lt,e.__scopeMenu),u=H(t,s),d=c.useRef(!1),m=()=>{const f=s.current;if(!n&&f){const g=new CustomEvent(Go,{bubbles:!0,cancelable:!0});f.addEventListener(Go,v=>o?.(v),{once:!0}),Fn(f,g),g.defaultPrevented?d.current=!1:a.onClose()}};return l.jsx(Ws,{...r,ref:u,disabled:n,onClick:I(e.onClick,m),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:I(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,f=>{const g=i.searchRef.current!=="";n||g&&f.key===" "||In.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});qt.displayName=Lt;var Ws=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=io(Lt,n),i=js(n),u=c.useRef(null),d=H(t,u),[m,f]=c.useState(!1),[g,v]=c.useState("");return c.useEffect(()=>{const _=u.current;_&&v((_.textContent??"").trim())},[s.children]),l.jsx(it.ItemSlot,{scope:n,disabled:o,textValue:r??g,children:l.jsx(Pf,{asChild:!0,...i,focusable:!o,children:l.jsx(B.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:I(e.onPointerMove,at(_=>{o?a.onItemLeave(_):(a.onItemEnter(_),_.defaultPrevented||_.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,at(_=>a.onItemLeave(_))),onFocus:I(e.onFocus,()=>f(!0)),onBlur:I(e.onBlur,()=>f(!1))})})})}),Hf="MenuCheckboxItem",Vs=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Ys,{scope:e.__scopeMenu,checked:n,children:l.jsx(qt,{role:"menuitemcheckbox","aria-checked":kt(n)?"mixed":n,...r,ref:t,"data-state":fo(n),onSelect:I(r.onSelect,()=>o?.(kt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vs.displayName=Hf;var Hs="MenuRadioGroup",[Uf,Kf]=He(Hs,{value:void 0,onValueChange:()=>{}}),Us=c.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ne(o);return l.jsx(Uf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(co,{...r,ref:t})})});Us.displayName=Hs;var Ks="MenuRadioItem",Gs=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=Kf(Ks,e.__scopeMenu),s=n===r.value;return l.jsx(Ys,{scope:e.__scopeMenu,checked:s,children:l.jsx(qt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":fo(s),onSelect:I(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Gs.displayName=Ks;var lo="MenuItemIndicator",[Ys,Gf]=He(lo,{checked:!1}),Xs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Gf(lo,n);return l.jsx(Pe,{present:o||kt(s.checked)||s.checked===!0,children:l.jsx(B.span,{...r,ref:t,"data-state":fo(s.checked)})})});Xs.displayName=lo;var Yf="MenuSeparator",qs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(B.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});qs.displayName=Yf;var Xf="MenuArrow",Zs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Rs,{...r,...o,ref:t})});Zs.displayName=Xf;var uo="MenuSub",[qf,Js]=He(uo),Qs=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=De(uo,t),a=vt(t),[i,u]=c.useState(null),[d,m]=c.useState(null),f=ne(r);return c.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),l.jsx(oo,{...a,children:l.jsx(Ls,{scope:t,open:o,onOpenChange:f,content:d,onContentChange:m,children:l.jsx(qf,{scope:t,contentId:he(),triggerId:he(),trigger:i,onTriggerChange:u,children:n})})})};Qs.displayName=uo;var ot="MenuSubTrigger",ei=c.forwardRef((e,t)=>{const n=De(ot,e.__scopeMenu),o=gt(ot,e.__scopeMenu),r=Js(ot,e.__scopeMenu),s=io(ot,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},m=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>m,[m]),c.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),u(null)}},[i,u]),l.jsx(ro,{asChild:!0,...d,children:l.jsx(Ws,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":oi(n.open),...e,ref:lt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,at(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:I(e.onPointerLeave,at(f=>{m();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,_=v==="right",p=_?-5:5,h=g[_?"left":"right"],x=g[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:h,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:h,y:g.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,f=>{const g=s.searchRef.current!=="";e.disabled||g&&f.key===" "||Nf[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ei.displayName=ot;var ti="MenuSubContent",ni=c.forwardRef((e,t)=>{const n=Fs(fe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(fe,e.__scopeMenu),a=gt(fe,e.__scopeMenu),i=Js(ti,e.__scopeMenu),u=c.useRef(null),d=H(t,u);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Pe,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:l.jsx(ao,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{a.isUsingKeyboardRef.current&&u.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:I(e.onFocusOutside,m=>{m.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,m=>{a.onClose(),m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{const f=m.currentTarget.contains(m.target),g=Af[a.dir].includes(m.key);f&&g&&(s.onOpenChange(!1),i.trigger?.focus(),m.preventDefault())})})})})})});ni.displayName=ti;function oi(e){return e?"open":"closed"}function kt(e){return e==="indeterminate"}function fo(e){return kt(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 Jf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Qf(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Jf(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.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 s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],u=t[a],d=i.x,m=i.y,f=u.x,g=u.y;m>o!=g>o&&n<(f-d)*(o-m)/(g-m)+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 at(e){return t=>t.pointerType==="mouse"?e(t):void 0}var np=ks,op=ro,rp=zs,sp=Bs,ip=co,ap=$s,cp=qt,lp=Vs,up=Us,dp=Gs,fp=Xs,pp=qs,mp=Zs,hp=Qs,vp=ei,gp=ni,Zt="DropdownMenu",[_p]=Oe(Zt,[Ds]),oe=Ds(),[wp,ri]=_p(Zt),si=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=oe(t),d=c.useRef(null),[m,f]=ze({prop:r,defaultProp:s??!1,onChange:a,caller:Zt});return l.jsx(wp,{scope:t,triggerId:he(),triggerRef:d,contentId:he(),open:m,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(g=>!g),[f]),modal:i,children:l.jsx(np,{...u,open:m,onOpenChange:f,dir:o,modal:i,children:n})})};si.displayName=Zt;var ii="DropdownMenuTrigger",ai=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=ri(ii,n),a=oe(n);return l.jsx(op,{asChild:!0,...a,children:l.jsx(B.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:lt(t,s.triggerRef),onPointerDown:I(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:I(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});ai.displayName=ii;var xp="DropdownMenuPortal",ci=e=>{const{__scopeDropdownMenu:t,...n}=e,o=oe(t);return l.jsx(rp,{...o,...n})};ci.displayName=xp;var li="DropdownMenuContent",ui=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ri(li,n),s=oe(n),a=c.useRef(!1);return l.jsx(sp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{a.current||r.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:I(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,m=u.button===2||d;(!r.modal||m)&&(a.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)"}})});ui.displayName=li;var yp="DropdownMenuGroup",di=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(ip,{...r,...o,ref:t})});di.displayName=yp;var bp="DropdownMenuLabel",fi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(ap,{...r,...o,ref:t})});fi.displayName=bp;var Sp="DropdownMenuItem",pi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(cp,{...r,...o,ref:t})});pi.displayName=Sp;var Cp="DropdownMenuCheckboxItem",mi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(lp,{...r,...o,ref:t})});mi.displayName=Cp;var Ep="DropdownMenuRadioGroup",hi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(up,{...r,...o,ref:t})});hi.displayName=Ep;var Rp="DropdownMenuRadioItem",vi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(dp,{...r,...o,ref:t})});vi.displayName=Rp;var Tp="DropdownMenuItemIndicator",gi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(fp,{...r,...o,ref:t})});gi.displayName=Tp;var Pp="DropdownMenuSeparator",_i=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(pp,{...r,...o,ref:t})});_i.displayName=Pp;var Mp="DropdownMenuArrow",Ip=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(mp,{...r,...o,ref:t})});Ip.displayName=Mp;var Np=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,a=oe(t),[i,u]=ze({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return l.jsx(hp,{...a,open:i,onOpenChange:u,children:n})},Ap="DropdownMenuSubTrigger",wi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(vp,{...r,...o,ref:t})});wi.displayName=Ap;var Op="DropdownMenuSubContent",xi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(gp,{...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)"}})});xi.displayName=Op;var yi=si,bi=ai,po=ci,Si=ui,Dp=di,jp=fi,Lp=pi,Ci=mi,kp=hi,Fp=vi,mo=gi,zp=_i,Bp=Np,$p=wi,Wp=xi;const Vp="uzi-multi-select-module__wrapper__Izj2x",Hp="uzi-multi-select-module__wrapperFullWidth__eH8pf",Up="uzi-multi-select-module__trigger__r3816",Kp="uzi-multi-select-module__value__PuUmG",Gp="uzi-multi-select-module__placeholder__dJIU-",Yp="uzi-multi-select-module__chip__46Ms-",Xp="uzi-multi-select-module__chipSummary__zLwi8",qp="uzi-multi-select-module__chevron__SWK5l",Zp="uzi-multi-select-module__menu__q8auA",Jp="uzi-multi-select-module__option__-Ioqk",Qp="uzi-multi-select-module__optionDisabled__qtCi8",em="uzi-multi-select-module__optionSelected__74IO8",tm="uzi-multi-select-module__optionLabel__cVoN7",nm="uzi-multi-select-module__indicator__NO-WE",om="uzi-multi-select-module__indicatorSelected__9sEAy",rm="uzi-multi-select-module__indicatorDisabled__vqdiH",ee={wrapper:Vp,wrapperFullWidth:Hp,trigger:Up,value:Kp,placeholder:Gp,chip:Yp,chipSummary:Xp,chevron:qp,menu:Zp,option:Jp,optionDisabled:Qp,optionSelected:em,optionLabel:tm,indicator:nm,indicatorSelected:om,indicatorDisabled:rm},Ei=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="Select options",fullWidth:r=!0,maxVisibleValues:s=2,className:a,disabled:i=!1,name:u,"aria-label":d,"aria-labelledby":m},f)=>{const g=c.useMemo(()=>new Set(t),[t]),v=c.useMemo(()=>e.filter(w=>g.has(w.value)),[e,g]),_=c.useCallback(w=>{if(g.has(w)){n(t.filter(y=>y!==w));return}n([...t,w])},[n,g,t]),p=Math.max(1,s),h=v.slice(0,p),x=Math.max(0,v.length-h.length);return l.jsx(yi,{modal:!1,children:l.jsxs("div",{className:z(ee.wrapper,r&&ee.wrapperFullWidth,a),children:[l.jsx(bi,{asChild:!0,children:l.jsxs("button",{ref:f,type:"button",className:ee.trigger,"aria-label":d,"aria-labelledby":m,disabled:i,children:[l.jsx("span",{className:ee.value,children:v.length===0?l.jsx("span",{className:ee.placeholder,children:o}):l.jsxs(l.Fragment,{children:[h.map(w=>l.jsx("span",{className:ee.chip,children:w.label},w.value)),x>0?l.jsxs("span",{className:z(ee.chip,ee.chipSummary),children:["+",x]}):null]})}),l.jsx("span",{className:ee.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),u?t.map(w=>l.jsx("input",{type:"hidden",name:u,value:w},w)):null,l.jsx(po,{children:l.jsx(Si,{className:ee.menu,sideOffset:4,align:"start",children:e.map(w=>{const y=g.has(w.value);return l.jsxs(Ci,{className:z(ee.option,y&&ee.optionSelected,w.disabled&&ee.optionDisabled),checked:y,disabled:w.disabled,onCheckedChange:()=>_(w.value),onSelect:b=>b.preventDefault(),children:[l.jsx("span",{className:z(ee.indicator,y&&ee.indicatorSelected,w.disabled&&ee.indicatorDisabled),"aria-hidden":"true",children:l.jsx(mo,{forceMount:!0,children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx("span",{className:ee.optionLabel,children:w.label})]},w.value)})})})]})})});Ei.displayName="MultiSelect";function Yo(e,[t,n]){return Math.min(n,Math.max(t,e))}function sm(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var im=[" ","Enter","ArrowUp","ArrowDown"],am=[" ","Enter"],We="Select",[Jt,Qt,cm]=Vt(We),[tt]=Oe(We,[cm,Xt]),en=Xt(),[lm,je]=tt(We),[um,dm]=tt(We),Ri=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:u,dir:d,name:m,autoComplete:f,disabled:g,required:v,form:_}=e,p=en(t),[h,x]=c.useState(null),[w,y]=c.useState(null),[b,S]=c.useState(!1),R=Yn(d),[C,N]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[P,D]=ze({prop:a,defaultProp:i,onChange:u,caller:We}),L=c.useRef(null),k=h?_||!!h.closest("form"):!0,[W,T]=c.useState(new Set),$=Array.from(W).map(j=>j.props.value).join(";");return l.jsx(oo,{...p,children:l.jsxs(lm,{required:v,scope:t,trigger:h,onTriggerChange:x,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:he(),value:P,onValueChange:D,open:C,onOpenChange:N,dir:R,triggerPointerDownPosRef:L,disabled:g,children:[l.jsx(Jt.Provider,{scope:t,children:l.jsx(um,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(j=>{T(F=>new Set(F).add(j))},[]),onNativeOptionRemove:c.useCallback(j=>{T(F=>{const M=new Set(F);return M.delete(j),M})},[]),children:n})}),k?l.jsxs(Ki,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:f,value:P,onChange:j=>D(j.target.value),disabled:g,form:_,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Ri.displayName=We;var Ti="SelectTrigger",Pi=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=en(n),a=je(Ti,n),i=a.disabled||o,u=H(t,a.onTriggerChange),d=Qt(n),m=c.useRef("touch"),[f,g,v]=Yi(p=>{const h=d().filter(y=>!y.disabled),x=h.find(y=>y.value===a.value),w=Xi(h,p,x);w!==void 0&&a.onValueChange(w.value)}),_=p=>{i||(a.onOpenChange(!0),v()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return l.jsx(Cs,{asChild:!0,...s,children:l.jsx(B.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Gi(a.value)?"":void 0,...r,ref:u,onClick:I(r.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&_(p)}),onPointerDown:I(r.onPointerDown,p=>{m.current=p.pointerType;const h=p.target;h.hasPointerCapture(p.pointerId)&&h.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(_(p),p.preventDefault())}),onKeyDown:I(r.onKeyDown,p=>{const h=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(h&&p.key===" ")&&im.includes(p.key)&&(_(),p.preventDefault())})})})});Pi.displayName=Ti;var Mi="SelectValue",Ii=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,u=je(Mi,n),{onValueNodeHasChildrenChange:d}=u,m=s!==void 0,f=H(t,u.onValueNodeChange);return q(()=>{d(m)},[d,m]),l.jsx(B.span,{...i,ref:f,style:{pointerEvents:"none"},children:Gi(u.value)?l.jsx(l.Fragment,{children:a}):s})});Ii.displayName=Mi;var fm="SelectIcon",Ni=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(B.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Ni.displayName=fm;var pm="SelectPortal",Ai=e=>l.jsx(dt,{asChild:!0,...e});Ai.displayName=pm;var Ve="SelectContent",Oi=c.forwardRef((e,t)=>{const n=je(Ve,e.__scopeSelect),[o,r]=c.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?ct.createPortal(l.jsx(Di,{scope:e.__scopeSelect,children:l.jsx(Jt.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(ji,{...e,ref:t})});Oi.displayName=Ve;var me=10,[Di,Le]=tt(Ve),mm="SelectContentImpl",hm=Ze("SelectContent.RemoveScroll"),ji=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:p,avoidCollisions:h,...x}=e,w=je(Ve,n),[y,b]=c.useState(null),[S,R]=c.useState(null),C=H(t,A=>b(A)),[N,P]=c.useState(null),[D,L]=c.useState(null),k=Qt(n),[W,T]=c.useState(!1),$=c.useRef(!1);c.useEffect(()=>{if(y)return Bn(y)},[y]),zn();const j=c.useCallback(A=>{const[U,...se]=k().map(X=>X.ref.current),[K]=se.slice(-1),Y=document.activeElement;for(const X of A)if(X===Y||(X?.scrollIntoView({block:"nearest"}),X===U&&S&&(S.scrollTop=0),X===K&&S&&(S.scrollTop=S.scrollHeight),X?.focus(),document.activeElement!==Y))return},[k,S]),F=c.useCallback(()=>j([N,y]),[j,N,y]);c.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:M,triggerPointerDownPosRef:E}=w;c.useEffect(()=>{if(y){let A={x:0,y:0};const U=K=>{A={x:Math.abs(Math.round(K.pageX)-(E.current?.x??0)),y:Math.abs(Math.round(K.pageY)-(E.current?.y??0))}},se=K=>{A.x<=10&&A.y<=10?K.preventDefault():y.contains(K.target)||M(!1),document.removeEventListener("pointermove",U),E.current=null};return E.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",se,{capture:!0})}}},[y,M,E]),c.useEffect(()=>{const A=()=>M(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[M]);const[V,G]=Yi(A=>{const U=k().filter(Y=>!Y.disabled),se=U.find(Y=>Y.ref.current===document.activeElement),K=Xi(U,A,se);K&&setTimeout(()=>K.ref.current.focus())}),Q=c.useCallback((A,U,se)=>{const K=!$.current&&!se;(w.value!==void 0&&w.value===U||K)&&(P(A),K&&($.current=!0))},[w.value]),Z=c.useCallback(()=>y?.focus(),[y]),re=c.useCallback((A,U,se)=>{const K=!$.current&&!se;(w.value!==void 0&&w.value===U||K)&&L(A)},[w.value]),Ce=o==="popper"?Nn:Li,ie=Ce===Nn?{side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:p,avoidCollisions:h}:{};return l.jsx(Di,{scope:n,content:y,viewport:S,onViewportChange:R,itemRefCallback:Q,selectedItem:N,onItemLeave:Z,itemTextRefCallback:re,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:V,children:l.jsx($t,{as:hm,allowPinchZoom:!0,children:l.jsx(zt,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:I(r,A=>{w.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...x,...ie,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:I(x.onKeyDown,A=>{const U=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!U&&A.key.length===1&&G(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let K=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(A.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const Y=A.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>j(K)),A.preventDefault()}})})})})})})});ji.displayName=mm;var vm="SelectItemAlignedPosition",Li=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=je(Ve,n),a=Le(Ve,n),[i,u]=c.useState(null),[d,m]=c.useState(null),f=H(t,C=>m(C)),g=Qt(n),v=c.useRef(!1),_=c.useRef(!0),{viewport:p,selectedItem:h,selectedItemText:x,focusSelectedItem:w}=a,y=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&p&&h&&x){const C=s.trigger.getBoundingClientRect(),N=d.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),D=x.getBoundingClientRect();if(s.dir!=="rtl"){const Y=D.left-N.left,X=P.left-Y,ue=C.left-X,ke=C.width+ue,tn=Math.max(ke,N.width),nn=window.innerWidth-me,on=Yo(X,[me,Math.max(me,nn-tn)]);i.style.minWidth=ke+"px",i.style.left=on+"px"}else{const Y=N.right-D.right,X=window.innerWidth-P.right-Y,ue=window.innerWidth-C.right-X,ke=C.width+ue,tn=Math.max(ke,N.width),nn=window.innerWidth-me,on=Yo(X,[me,Math.max(me,nn-tn)]);i.style.minWidth=ke+"px",i.style.right=on+"px"}const L=g(),k=window.innerHeight-me*2,W=p.scrollHeight,T=window.getComputedStyle(d),$=parseInt(T.borderTopWidth,10),j=parseInt(T.paddingTop,10),F=parseInt(T.borderBottomWidth,10),M=parseInt(T.paddingBottom,10),E=$+j+W+M+F,V=Math.min(h.offsetHeight*5,E),G=window.getComputedStyle(p),Q=parseInt(G.paddingTop,10),Z=parseInt(G.paddingBottom,10),re=C.top+C.height/2-me,Ce=k-re,ie=h.offsetHeight/2,A=h.offsetTop+ie,U=$+j+A,se=E-U;if(U<=re){const Y=L.length>0&&h===L[L.length-1].ref.current;i.style.bottom="0px";const X=d.clientHeight-p.offsetTop-p.offsetHeight,ue=Math.max(Ce,ie+(Y?Z:0)+X+F),ke=U+ue;i.style.height=ke+"px"}else{const Y=L.length>0&&h===L[0].ref.current;i.style.top="0px";const ue=Math.max(re,$+p.offsetTop+(Y?Q:0)+ie)+se;i.style.height=ue+"px",p.scrollTop=U-re+p.offsetTop}i.style.margin=`${me}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=k+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[g,s.trigger,s.valueNode,i,d,p,h,x,s.dir,o]);q(()=>y(),[y]);const[b,S]=c.useState();q(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const R=c.useCallback(C=>{C&&_.current===!0&&(y(),w?.(),_.current=!1)},[y,w]);return l.jsx(_m,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(B.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Li.displayName=vm;var gm="SelectPopperPosition",Nn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=me,...s}=e,a=en(n);return l.jsx(Es,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Nn.displayName=gm;var[_m,ho]=tt(Ve,{}),An="SelectViewport",ki=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Le(An,n),a=ho(An,n),i=H(t,s.onViewportChange),u=c.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(Jt.Slot,{scope:n,children:l.jsx(B.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,d=>{const m=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=a;if(g?.current&&f){const v=Math.abs(u.current-m.scrollTop);if(v>0){const _=window.innerHeight-me*2,p=parseFloat(f.style.minHeight),h=parseFloat(f.style.height),x=Math.max(p,h);if(x<_){const w=x+v,y=Math.min(_,w),b=w-y;f.style.height=y+"px",f.style.bottom==="0px"&&(m.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});ki.displayName=An;var Fi="SelectGroup",[wm,xm]=tt(Fi),ym=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=he();return l.jsx(wm,{scope:n,id:r,children:l.jsx(B.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ym.displayName=Fi;var zi="SelectLabel",bm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=xm(zi,n);return l.jsx(B.div,{id:r.id,...o,ref:t})});bm.displayName=zi;var Ft="SelectItem",[Sm,Bi]=tt(Ft),$i=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=je(Ft,n),u=Le(Ft,n),d=i.value===o,[m,f]=c.useState(s??""),[g,v]=c.useState(!1),_=H(t,w=>u.itemRefCallback?.(w,o,r)),p=he(),h=c.useRef("touch"),x=()=>{r||(i.onValueChange(o),i.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(Sm,{scope:n,value:o,disabled:r,textId:p,isSelected:d,onItemTextChange:c.useCallback(w=>{f(y=>y||(w?.textContent??"").trim())},[]),children:l.jsx(Jt.ItemSlot,{scope:n,value:o,disabled:r,textValue:m,children:l.jsx(B.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:_,onFocus:I(a.onFocus,()=>v(!0)),onBlur:I(a.onBlur,()=>v(!1)),onClick:I(a.onClick,()=>{h.current!=="mouse"&&x()}),onPointerUp:I(a.onPointerUp,()=>{h.current==="mouse"&&x()}),onPointerDown:I(a.onPointerDown,w=>{h.current=w.pointerType}),onPointerMove:I(a.onPointerMove,w=>{h.current=w.pointerType,r?u.onItemLeave?.():h.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(a.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:I(a.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(am.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});$i.displayName=Ft;var rt="SelectItemText",Wi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=je(rt,n),i=Le(rt,n),u=Bi(rt,n),d=dm(rt,n),[m,f]=c.useState(null),g=H(t,x=>f(x),u.onItemTextChange,x=>i.itemTextRefCallback?.(x,u.value,u.disabled)),v=m?.textContent,_=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:p,onNativeOptionRemove:h}=d;return q(()=>(p(_),()=>h(_)),[p,h,_]),l.jsxs(l.Fragment,{children:[l.jsx(B.span,{id:u.textId,...s,ref:g}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ct.createPortal(s.children,a.valueNode):null]})});Wi.displayName=rt;var Vi="SelectItemIndicator",Hi=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Bi(Vi,n).isSelected?l.jsx(B.span,{"aria-hidden":!0,...o,ref:t}):null});Hi.displayName=Vi;var On="SelectScrollUpButton",Cm=c.forwardRef((e,t)=>{const n=Le(On,e.__scopeSelect),o=ho(On,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ui,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Cm.displayName=On;var Dn="SelectScrollDownButton",Em=c.forwardRef((e,t)=>{const n=Le(Dn,e.__scopeSelect),o=ho(Dn,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)<d;s(m)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ui,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Em.displayName=Dn;var Ui=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Le("SelectScrollButton",n),a=c.useRef(null),i=Qt(n),u=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),q(()=>{i().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(B.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{u()})})}),Rm="SelectSeparator",Tm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(B.div,{"aria-hidden":!0,...o,ref:t})});Tm.displayName=Rm;var jn="SelectArrow",Pm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=en(n),s=je(jn,n),a=Le(jn,n);return s.open&&a.position==="popper"?l.jsx(Rs,{...r,...o,ref:t}):null});Pm.displayName=jn;var Mm="SelectBubbleInput",Ki=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=H(o,r),a=sm(t);return c.useEffect(()=>{const i=r.current;if(!i)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&m){const f=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(f)}},[a,t]),l.jsx(B.select,{...n,style:{...Br,...n.style},ref:s,defaultValue:t})});Ki.displayName=Mm;function Gi(e){return e===""||e===void 0}function Yi(e){const t=ne(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(a=>{const i=n.current+a;t(i),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Xi(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Im(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Im(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Nm=Ri,Am=Pi,Om=Ii,Dm=Ni,jm=Ai,Lm=Oi,km=ki,Xo=$i,qo=Wi,Zo=Hi;const Fm="uzi-select-module__wrapper__7szq0",zm="uzi-select-module__wrapperFullWidth__IyOIG",Bm="uzi-select-module__trigger__ldh8w",$m="uzi-select-module__value__FTUJh",Wm="uzi-select-module__chevron__U6HXS",Vm="uzi-select-module__content__pOWWy",Hm="uzi-select-module__viewport__VGZM6",Um="uzi-select-module__item__6uM6-",Km="uzi-select-module__indicator__ZHcg5",Gm="uzi-select-module__indicatorIcon__kOV2G",ae={wrapper:Fm,wrapperFullWidth:zm,trigger:Bm,value:$m,chevron:Wm,content:Vm,viewport:Hm,item:Um,indicator:Km,indicatorIcon:Gm},Jo="__uzi_select_empty__",vo=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r=!1,fullWidth:s=!0,className:a,id:i,name:u,disabled:d,required:m,autoComplete:f,form:g,title:v,"aria-label":_,"aria-labelledby":p,onBlur:h,onFocus:x},w)=>l.jsx("div",{className:z(ae.wrapper,s&&ae.wrapperFullWidth,a),children:l.jsxs(Nm,{value:t,onValueChange:y=>n(y===Jo?"":y),name:u,disabled:d,required:m,autoComplete:f,form:g,children:[l.jsxs(Am,{ref:w,id:i,className:ae.trigger,title:v,"aria-label":_,"aria-labelledby":p,onBlur:h,onFocus:x,children:[l.jsx(Om,{className:ae.value,placeholder:o}),l.jsx(Dm,{className:ae.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l.jsx(jm,{children:l.jsx(Lm,{className:ae.content,position:"popper",sideOffset:4,align:"start",children:l.jsxs(km,{className:ae.viewport,children:[o&&r?l.jsxs(Xo,{value:Jo,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:o})]}):null,e.map(y=>l.jsxs(Xo,{value:y.value,disabled:y.disabled,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:y.label})]},y.value))]})})})]})}));vo.displayName="Select";const qi=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="All",allowClear:r=!0,...s},a)=>l.jsx(vo,{ref:a,options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r,fullWidth:!1,...s}));qi.displayName="Dropdown";const Ym="uzi-dropdown-menu-module__content__n-ElH",Xm="uzi-dropdown-menu-module__item__tBNtW",qm="uzi-dropdown-menu-module__itemDestructive__oWmKd",Zm="uzi-dropdown-menu-module__insetItem__g7ONJ",Jm="uzi-dropdown-menu-module__indicator__5qwFh",Qm="uzi-dropdown-menu-module__indicatorIcon__nhJMw",eh="uzi-dropdown-menu-module__radioDot__GWUVT",th="uzi-dropdown-menu-module__label__sFnNR",nh="uzi-dropdown-menu-module__separator__PgUob",oh="uzi-dropdown-menu-module__chevron__kxfiF",te={content:Ym,item:Xm,itemDestructive:qm,insetItem:Zm,indicator:Jm,indicatorIcon:Qm,radioDot:eh,label:th,separator:nh,chevron:oh};function rh(e){return l.jsx(yi,{...e})}function sh(e){return l.jsx(bi,{...e})}function ih(e){return l.jsx(Dp,{...e})}function ah(e){return l.jsx(po,{...e})}function ch(e){return l.jsx(Bp,{...e})}function lh(e){return l.jsx(kp,{...e})}function uh({className:e,sideOffset:t=4,...n}){return l.jsx(po,{children:l.jsx(Si,{sideOffset:t,className:z(te.content,e),...n})})}function dh({className:e,inset:t,variant:n="default",...o}){return l.jsx(Lp,{"data-inset":t?"true":void 0,className:z(te.item,n==="destructive"&&te.itemDestructive,e),...o})}function fh({className:e,children:t,...n}){return l.jsxs(Ci,{className:z(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),t]})}function ph({className:e,children:t,...n}){return l.jsxs(Fp,{className:z(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("span",{className:te.radioDot})})}),t]})}function mh({className:e,inset:t,...n}){return l.jsx(jp,{"data-inset":t?"true":void 0,className:z(te.label,e),...n})}function hh({className:e,...t}){return l.jsx(zp,{className:z(te.separator,e),...t})}function vh({className:e,inset:t,children:n,...o}){return l.jsxs($p,{"data-inset":t?"true":void 0,className:z(te.item,e),...o,children:[n,l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.chevron,children:l.jsx("path",{d:"M6 3.5 10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function gh({className:e,...t}){return l.jsx(Wp,{className:z(te.content,e),...t})}const _h=["light","dark","system"],wh=["blue","cyan","violet","emerald","amber","rose"],xh="uzi-theme",yh="uzi-accent",bh=xh,Sh=yh,Ch="data-uzi-theme",Eh="data-uzi-accent",Zi=O.createContext(void 0);function Rh(e){return _h.includes(e)}function Th(e){return wh.includes(e)}function Ph(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Mh({children:e,theme:t,defaultTheme:n="system",accent:o,defaultAccent:r="blue",onThemeChange:s,onAccentChange:a,storageKey:i=bh,accentStorageKey:u=Sh,disableStorage:d=!1}){const[m,f]=O.useState(n),[g,v]=O.useState(r),[_,p]=O.useState("light");O.useEffect(()=>{if(p(Ph()),!d){const P=window.localStorage.getItem(i);Rh(P)&&f(P);const D=window.localStorage.getItem(u);Th(D)&&v(D)}},[d,i,u]);const h=t!==void 0,x=o!==void 0,w=h?t:m,y=x?o:g,b=w==="system"?_:w;O.useEffect(()=>{if(typeof window>"u")return;const P=window.matchMedia("(prefers-color-scheme: dark)"),D=()=>p(P.matches?"dark":"light");return D(),P.addEventListener("change",D),()=>P.removeEventListener("change",D)},[]),O.useEffect(()=>{if(typeof document>"u")return;const P=document.documentElement;P.setAttribute(Ch,b),P.setAttribute(Eh,y),P.style.colorScheme=b,P.classList.toggle("dark",b==="dark")},[y,b]);const S=O.useCallback(P=>{h||f(P),!d&&typeof window<"u"&&window.localStorage.setItem(i,P),s?.(P)},[d,h,s,i]),R=O.useCallback(P=>{x||v(P),!d&&typeof window<"u"&&window.localStorage.setItem(u,P),a?.(P)},[u,d,x,a]),C=O.useCallback(()=>{S(b==="dark"?"light":"dark")},[b,S]),N=O.useMemo(()=>({theme:w,resolvedTheme:b,accent:y,setTheme:S,setAccent:R,toggleTheme:C}),[y,w,b,R,S,C]);return l.jsx(Zi.Provider,{value:N,children:e})}function Ji(){const e=O.useContext(Zi);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const Ih="uzi-theme-toggle-button-module__withLabel__KqtDj",Nh={withLabel:Ih};function Ah(){return l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:l.jsx("path",{d:"M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function Oh(){return l.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:[l.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.8"}),l.jsx("path",{d:"M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function Qi({showLabel:e=!1,lightLabel:t="Light mode",darkLabel:n="Dark mode",className:o,onClick:r,...s}){const{resolvedTheme:a,toggleTheme:i}=Ji(),u=a==="dark"?t:n;return l.jsxs(sr,{type:"button",variant:"ghost",size:e?"sm":"icon",className:z(e&&Nh.withLabel,o),"aria-label":`Switch to ${u.toLowerCase()}`,title:`Switch to ${u.toLowerCase()}`,onClick:d=>{r?.(d),d.defaultPrevented||i()},...s,children:[a==="dark"?l.jsx(Oh,{}):l.jsx(Ah,{}),e&&l.jsx("span",{children:u})]})}const Dh="uzi-top-bar-module__topBar__MJ-7S",jh="uzi-top-bar-module__topBarStatic__JvEwt",Lh="uzi-top-bar-module__topBarInner__PBbi8",kh="uzi-top-bar-module__topBarStart__DrdN2",Fh="uzi-top-bar-module__topBarBrand__80VV3",zh="uzi-top-bar-module__topBarBrandContent__O4Uto",Bh="uzi-top-bar-module__topBarCenter__Kwxg-",$h="uzi-top-bar-module__topBarCenterGroup__7Ishp",Wh="uzi-top-bar-module__topBarActions__mgMd8",pe={topBar:Dh,topBarStatic:jh,topBarInner:Lh,topBarStart:kh,topBarBrand:Fh,topBarBrandContent:zh,topBarCenter:Bh,topBarCenterGroup:$h,topBarActions:Wh};function ea({leading:e,brand:t,brandHref:n,brandingLocation:o="left",start:r,center:s,actions:a,showThemeToggle:i=!1,themeToggleProps:u,className:d,innerClassName:m,isSticky:f,sticky:g=!0,children:v,..._}){const p=f??g,h=t?n?l.jsx("a",{href:n,className:pe.topBarBrand,children:l.jsx("span",{className:pe.topBarBrandContent,children:t})}):l.jsx("div",{className:pe.topBarBrand,children:l.jsx("span",{className:pe.topBarBrandContent,children:t})}):null;return l.jsx("header",{className:z(pe.topBar,!p&&pe.topBarStatic,d),..._,children:l.jsxs("div",{className:z(pe.topBarInner,m),children:[l.jsxs("div",{className:pe.topBarStart,children:[e,o==="left"&&h,r]}),h&&o==="center"||s||v?l.jsx("div",{className:pe.topBarCenter,children:l.jsxs("div",{className:pe.topBarCenterGroup,children:[o==="center"&&h,s??v]})}):null,l.jsxs("div",{className:pe.topBarActions,children:[i&&l.jsx(Qi,{...u}),a]})]})})}const Vh="uzi-app-shell-module__appShell__S0cVI",Hh="uzi-app-shell-module__appShellAnimated__-CRIl",Uh="uzi-app-shell-module__appShellOpen__1rZUl",Kh="uzi-app-shell-module__appShellCollapsed__fSasN",Gh="uzi-app-shell-module__appShellTopbar__rgXsW",Yh="uzi-app-shell-module__appShellHamburger__BciFA",Xh="uzi-app-shell-module__appShellSidebar__oY7uj",qh="uzi-app-shell-module__appShellMain__eHP2r",Zh="uzi-app-shell-module__appShellBackdrop__y31xs",Jh="uzi-app-shell-module__appShellSidebarOpen__Z5AIo",we={appShell:Vh,appShellAnimated:Hh,appShellOpen:Uh,appShellCollapsed:Kh,appShellTopbar:Gh,appShellHamburger:Yh,appShellSidebar:Xh,appShellMain:qh,appShellBackdrop:Zh,appShellSidebarOpen:Jh},Qh=960;function Qo(){return typeof window>"u"?!1:window.innerWidth>=Qh}function ev({children:e,sidebar:t,brand:n,brandHref:o,topbarStart:r,topbarEnd:s,showThemeToggle:a=!1,themeToggleProps:i,topBarBrandingLocation:u="left",className:d,sidebarClassName:m,topbarClassName:f,mainClassName:g,sidebarWidth:v,closeSidebarOnChangeKey:_,hamburgerLabel:p="Toggle navigation",onSidebarToggle:h}){const[x,w]=O.useState(!1),[y,b]=O.useState(!1),[S,R]=O.useState(!1),C=O.useRef(!1),N=O.useRef(_),P=O.useRef(null),D=O.useRef(null),L=O.useRef(null),k=O.useId();O.useEffect(()=>{const M=Qo();w(M),b(M),C.current=M;const E=window.requestAnimationFrame(()=>{R(!0)}),V=()=>{const G=Qo();w(G),G!==C.current&&(b(G),C.current=G)};return window.addEventListener("resize",V),()=>{window.cancelAnimationFrame(E),window.removeEventListener("resize",V)}},[]),O.useEffect(()=>{if(x||!y)return;const M=L.current,E=()=>b(!1),V=Q=>{const Z=Q.target;Z&&(P.current?.contains(Z)||D.current?.contains(Z)||E())},G=window.setTimeout(()=>{document.addEventListener("pointerdown",V),window.addEventListener("scroll",E,{passive:!0}),M?.addEventListener("scroll",E,{passive:!0}),document.addEventListener("touchmove",E,{passive:!0})},10);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",V),window.removeEventListener("scroll",E),M?.removeEventListener("scroll",E),document.removeEventListener("touchmove",E)}},[y,x]),O.useEffect(()=>{!x&&N.current!==_&&b(!1),N.current=_},[_,x]),O.useEffect(()=>{h?.(y)},[y,h]);const W=()=>b(M=>!M),T=v===void 0?void 0:typeof v=="number"?`${v}px`:v,$=T?{"--app-shell-sidebar-width":T}:void 0,j=z(we.appShell,S&&we.appShellAnimated,y?we.appShellOpen:we.appShellCollapsed,d),F=z(we.appShellSidebar,y&&we.appShellSidebarOpen,m);return l.jsxs("div",{className:j,style:$,"data-app-shell":!0,"data-desktop":x?"true":"false","data-sidebar-open":y?"true":"false",children:[l.jsx(ea,{className:z(we.appShellTopbar,f),leading:l.jsx("button",{ref:D,type:"button",className:we.appShellHamburger,onClick:W,"aria-label":p,"aria-expanded":y,"aria-controls":k,children:l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:l.jsx("path",{d:"M3 6h18M3 12h18M3 18h18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})})}),brand:n,brandHref:o,brandingLocation:u,start:r,actions:s,showThemeToggle:a,themeToggleProps:i}),!x&&y&&l.jsx("div",{className:we.appShellBackdrop,onClick:()=>b(!1),onTouchStart:()=>b(!1),"aria-hidden":"true"}),l.jsx("aside",{ref:P,id:k,className:F,"aria-label":"Sidebar navigation",children:t}),l.jsx("main",{ref:L,className:z(we.appShellMain,g),children:e})]})}const tv="uzi-sidebar-nav-module__sidebarNav__eUI5c",nv="uzi-sidebar-nav-module__sidebarNavCollapsed__xTM9s",ov="uzi-sidebar-nav-module__header__Y4NLy",rv="uzi-sidebar-nav-module__footer__GjWky",sv="uzi-sidebar-nav-module__sections__mXuGQ",iv="uzi-sidebar-nav-module__section__yjtCY",av="uzi-sidebar-nav-module__sectionItems__tNcph",cv="uzi-sidebar-nav-module__sectionLabel__Wx94m",lv="uzi-sidebar-nav-module__item__uMHkJ",uv="uzi-sidebar-nav-module__itemActive__wBbiS",dv="uzi-sidebar-nav-module__itemCollapsed__jLJN-",fv="uzi-sidebar-nav-module__itemDisabled__Yf8Il",pv="uzi-sidebar-nav-module__icon__tyrUg",mv="uzi-sidebar-nav-module__itemBody__wI0iy",hv="uzi-sidebar-nav-module__labelRow__D8sEJ",vv="uzi-sidebar-nav-module__label__A-nt6",gv="uzi-sidebar-nav-module__description__Xf3Si",_v="uzi-sidebar-nav-module__badge__-hnFd",J={sidebarNav:tv,sidebarNavCollapsed:nv,header:ov,footer:rv,sections:sv,section:iv,sectionItems:av,sectionLabel:cv,item:lv,itemActive:uv,itemCollapsed:dv,itemDisabled:fv,icon:pv,itemBody:mv,labelRow:hv,label:vv,description:gv,badge:_v},wv=(e,t)=>e.active!==void 0?e.active:!e.href||!t?!1:e.href==="/"?t==="/":t.startsWith(e.href);function xv({items:e=[],sections:t,currentPath:n,getIsActive:o=wv,onItemClick:r,header:s,footer:a,ariaLabel:i="Sidebar navigation",collapsed:u=!1,iconSize:d,className:m,itemClassName:f,sectionClassName:g}){const v=t?.length?t:[{id:"default",items:e}],_=d!==void 0?{"--sidebar-nav-icon-size":typeof d=="number"?`${d}px`:d}:void 0;return l.jsxs("nav",{className:z(J.sidebarNav,u&&J.sidebarNavCollapsed,m),"aria-label":i,style:_,children:[s?l.jsx("div",{className:J.header,children:s}):null,l.jsx("div",{className:J.sections,children:v.map((p,h)=>l.jsxs("div",{className:z(J.section,g),children:[p.label&&!u?l.jsx("div",{className:J.sectionLabel,children:p.label}):null,l.jsx("div",{className:J.sectionItems,children:p.items.map((x,w)=>l.jsx(yv,{item:x,active:o(x,n),collapsed:u,itemClassName:f,onItemClick:r},`${p.id??h}-${x.href??x.title??w}`))})]},p.id??`section-${h}`))}),a?l.jsx("div",{className:J.footer,children:a}):null]})}function yv({item:e,active:t,collapsed:n,itemClassName:o,onItemClick:r}){const s=e.rel??(e.target==="_blank"?"noreferrer":void 0),a=e.title??(typeof e.label=="string"?e.label:void 0),i=z(J.item,t&&J.itemActive,n&&J.itemCollapsed,e.disabled&&J.itemDisabled,o),u=l.jsxs(l.Fragment,{children:[e.icon&&l.jsx("span",{className:J.icon,children:e.icon}),n?null:l.jsxs("span",{className:J.itemBody,children:[l.jsxs("span",{className:J.labelRow,children:[l.jsx("span",{className:J.label,children:e.label}),e.badge&&l.jsx("span",{className:J.badge,children:e.badge})]}),e.description?l.jsx("span",{className:J.description,children:e.description}):null]})]}),d=()=>{e.disabled||(e.onClick?.(),r?.(e))};return e.href?e.disabled?l.jsx("div",{className:i,"aria-current":t?"page":void 0,"aria-disabled":"true",title:n?a:void 0,children:u}):l.jsx("a",{className:i,href:e.href,target:e.target,rel:s,"aria-current":t?"page":void 0,title:n?a:void 0,onClick:d,children:u}):l.jsx("button",{type:"button",className:i,"aria-current":t?"page":void 0,"aria-disabled":e.disabled?"true":void 0,disabled:e.disabled,title:n?a:void 0,onClick:d,children:u})}const bv="uzi-skeleton-module__skeleton__fula5",er={skeleton:bv,"skeleton-pulse":"uzi-skeleton-module__skeleton-pulse__Yp45W","radius-sm":"uzi-skeleton-module__radius-sm__FdccD","radius-md":"uzi-skeleton-module__radius-md__zH3RE","radius-lg":"uzi-skeleton-module__radius-lg__YVrHw","radius-full":"uzi-skeleton-module__radius-full__5o2m0"};function Sv({width:e,height:t,radius:n="md",className:o,style:r,...s}){return l.jsx("div",{className:z(er.skeleton,er[`radius-${n}`],o),style:{width:e,height:t,...r},"aria-hidden":"true",...s})}const Cv="uzi-progress-module__track__gM0oV",Ev="uzi-progress-module__fill__aLAbp",xn={track:Cv,fill:Ev,"tone-default":"uzi-progress-module__tone-default__fhf7o","tone-success":"uzi-progress-module__tone-success__FsGHD","tone-warning":"uzi-progress-module__tone-warning__UAttL","tone-danger":"uzi-progress-module__tone-danger__-L-Ee"};function Rv({value:e,tone:t="default",className:n,"aria-label":o,...r}){const s=Math.max(0,Math.min(100,e));return l.jsx("div",{className:z(xn.track,n),role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,...r,children:l.jsx("div",{className:z(xn.fill,xn[`tone-${t}`]),style:{width:`${s}%`}})})}exports.Alert=Jl;exports.AppShell=ev;exports.Avatar=Ba;exports.AvatarFallback=Wa;exports.AvatarImage=$a;exports.Button=sr;exports.Card=Ua;exports.Checkbox=ns;exports.Dropdown=qi;exports.DropdownMenu=rh;exports.DropdownMenuCheckboxItem=fh;exports.DropdownMenuContent=uh;exports.DropdownMenuGroup=ih;exports.DropdownMenuItem=dh;exports.DropdownMenuLabel=mh;exports.DropdownMenuPortal=ah;exports.DropdownMenuRadioGroup=lh;exports.DropdownMenuRadioItem=ph;exports.DropdownMenuSeparator=hh;exports.DropdownMenuSub=ch;exports.DropdownMenuSubContent=gh;exports.DropdownMenuSubTrigger=vh;exports.DropdownMenuTrigger=sh;exports.Input=es;exports.Label=ts;exports.Modal=Kl;exports.ModalOverlay=zr;exports.MultiSelect=Ei;exports.Pill=Xa;exports.Progress=Rv;exports.Select=vo;exports.SidebarNav=xv;exports.Skeleton=Sv;exports.ThemeProvider=Mh;exports.ThemeToggleButton=Qi;exports.ToastProvider=Hu;exports.TopBar=ea;exports.cx=z;exports.useTheme=Ji;exports.useToast=Uu;
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},bl="DialogDescriptionWarning",Sl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fr(bl).contentName}}.`;return c.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Cl=Er,El=Pr,Rl=Mr,Tl=Ir,Pl=Ar,Ml=Dr,Il=Lr;const Nl="uzi-modal-module__portalLayer__t7blc",Al="uzi-modal-module__backdrop__IMd3b",Ol="uzi-modal-module__backdropFadeIn__GNJdx",Dl="uzi-modal-module__backdropFadeOut__R-3K5",jl="uzi-modal-module__overlayContent__0DtbP",Ll="uzi-modal-module__modalContentIn__fub8M",kl="uzi-modal-module__modalContentOut__elTJ3",Fl="uzi-modal-module__modal__Mao59",zl="uzi-modal-module__header__PmCaO",$l="uzi-modal-module__titles__IboyQ",Bl="uzi-modal-module__title__Zd7pL",Wl="uzi-modal-module__subtitle__t-LRK",Vl="uzi-modal-module__closeButton__GTiZr",Hl="uzi-modal-module__body__km6FQ",Ul="uzi-modal-module__footer__jWLTv",de={portalLayer:Nl,backdrop:Al,backdropFadeIn:Ol,backdropFadeOut:Dl,overlayContent:jl,modalContentIn:Ll,modalContentOut:kl,modal:Fl,"size-sm":"uzi-modal-module__size-sm__Uu9je","size-md":"uzi-modal-module__size-md__TiiWy","size-lg":"uzi-modal-module__size-lg__BrTIO","size-xl":"uzi-modal-module__size-xl__sj0mh",header:zl,titles:$l,title:Bl,subtitle:Wl,closeButton:Vl,body:Hl,footer:Ul};function zr({open:e,onClose:t,className:n,children:o}){return l.jsx(Cl,{open:e,onOpenChange:r=>{r||t()},children:l.jsx(El,{children:l.jsxs("div",{className:de.portalLayer,children:[l.jsx(Rl,{className:z(de.backdrop,n)}),l.jsx(Tl,{className:de.overlayContent,children:o})]})})})}function Kl({open:e,onClose:t,title:n,subtitle:o,size:r="md",children:s,footer:a}){return l.jsx(zr,{open:e,onClose:t,children:l.jsxs("div",{className:z(de.modal,de[`size-${r}`]),children:[l.jsxs("div",{className:de.header,children:[l.jsxs("div",{className:de.titles,children:[l.jsx(Pl,{className:de.title,children:n}),o?l.jsx(Ml,{className:de.subtitle,children:o}):null]}),l.jsx(Il,{asChild:!0,children:l.jsx("button",{className:de.closeButton,"aria-label":"Close",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})})]}),l.jsx("div",{className:de.body,children:s}),a&&l.jsx("div",{className:de.footer,children:a})]})})}const Gl="uzi-alert-module__alert__7Bt6c",Yl="uzi-alert-module__success__apdFG",Xl="uzi-alert-module__error__KLgi1",ql="uzi-alert-module__warning__F4fpk",Zl="uzi-alert-module__info__1IKHt",Do={alert:Gl,success:Yl,error:Xl,warning:ql,info:Zl};function Jl({tone:e,children:t,className:n}){return l.jsx("div",{className:z(Do.alert,Do[e],n),role:"alert",children:t})}function Vt(e){const t=e+"CollectionProvider",[n,o]=Oe(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:x}=p,w=O.useRef(null),y=O.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:y,collectionRef:w,children:x})};a.displayName=t;const i=e+"CollectionSlot",u=Ze(i),d=O.forwardRef((p,h)=>{const{scope:x,children:w}=p,y=s(i,x),b=H(h,y.collectionRef);return l.jsx(u,{ref:b,children:w})});d.displayName=i;const m=e+"CollectionItemSlot",f="data-radix-collection-item",g=Ze(m),v=O.forwardRef((p,h)=>{const{scope:x,children:w,...y}=p,b=O.useRef(null),S=H(h,b),R=s(m,x);return O.useEffect(()=>(R.itemMap.set(b,{ref:b,...y}),()=>{R.itemMap.delete(b)})),l.jsx(g,{[f]:"",ref:S,children:w})});v.displayName=m;function _(p){const h=s(e+"CollectionConsumer",p);return O.useCallback(()=>{const w=h.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((R,C)=>y.indexOf(R.ref.current)-y.indexOf(C.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:d,ItemSlot:v},_,o]}var $r=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"}),Ql="VisuallyHidden",Hn=c.forwardRef((e,t)=>l.jsx($.span,{...e,ref:t,style:{...$r,...e.style}}));Hn.displayName=Ql;var Un="ToastProvider",[Kn,eu,tu]=Vt("Toast"),[Br]=Oe("Toast",[tu]),[nu,Ht]=Br(Un),Wr=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[i,u]=c.useState(null),[d,m]=c.useState(0),f=c.useRef(!1),g=c.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Un}\`. Expected non-empty \`string\`.`),l.jsx(Kn.Provider,{scope:t,children:l.jsx(nu,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:d,viewport:i,onViewportChange:u,onToastAdd:c.useCallback(()=>m(v=>v+1),[]),onToastRemove:c.useCallback(()=>m(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:g,children:a})})};Wr.displayName=Un;var Vr="ToastViewport",ou=["F8"],Sn="toast.viewportPause",Cn="toast.viewportResume",Hr=c.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=ou,label:r="Notifications ({hotkey})",...s}=e,a=Ht(Vr,n),i=eu(n),u=c.useRef(null),d=c.useRef(null),m=c.useRef(null),f=c.useRef(null),g=H(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=a.toastCount>0;c.useEffect(()=>{const h=x=>{o.length!==0&&o.every(y=>x[y]||x.code===y)&&f.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[o]),c.useEffect(()=>{const h=u.current,x=f.current;if(_&&h&&x){const w=()=>{if(!a.isClosePausedRef.current){const R=new CustomEvent(Sn);x.dispatchEvent(R),a.isClosePausedRef.current=!0}},y=()=>{if(a.isClosePausedRef.current){const R=new CustomEvent(Cn);x.dispatchEvent(R),a.isClosePausedRef.current=!1}},b=R=>{!h.contains(R.relatedTarget)&&y()},S=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",w),h.addEventListener("focusout",b),h.addEventListener("pointermove",w),h.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",w),h.removeEventListener("focusout",b),h.removeEventListener("pointermove",w),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",y)}}},[_,a.isClosePausedRef]);const p=c.useCallback(({tabbingDirection:h})=>{const w=i().map(y=>{const b=y.ref.current,S=[b,...gu(b)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?w.reverse():w).flat()},[i]);return c.useEffect(()=>{const h=f.current;if(h){const x=w=>{const y=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!y){const S=document.activeElement,R=w.shiftKey;if(w.target===h&&R){d.current?.focus();return}const P=p({tabbingDirection:R?"backwards":"forwards"}),D=P.findIndex(L=>L===S);hn(P.slice(D+1))?w.preventDefault():R?d.current?.focus():m.current?.focus()}};return h.addEventListener("keydown",x),()=>h.removeEventListener("keydown",x)}},[i,p]),l.jsxs(gc,{ref:u,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&l.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"forwards"});hn(h)}}),l.jsx(Kn.Slot,{scope:n,children:l.jsx($.ol,{tabIndex:-1,...s,ref:g})}),_&&l.jsx(En,{ref:m,onFocusFromOutsideViewport:()=>{const h=p({tabbingDirection:"backwards"});hn(h)}})]})});Hr.displayName=Vr;var Ur="ToastFocusProxy",En=c.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ht(Ur,n);return l.jsx(Hn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const i=a.relatedTarget;!s.viewport?.contains(i)&&o()}})});En.displayName=Ur;var ft="Toast",ru="toast.swipeStart",su="toast.swipeMove",iu="toast.swipeCancel",au="toast.swipeEnd",Kr=c.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[i,u]=ze({prop:o,defaultProp:r??!0,onChange:s,caller:ft});return l.jsx(Pe,{present:n||i,children:l.jsx(uu,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:I(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:I(e.onSwipeMove,d=>{const{x:m,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:I(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:I(e.onSwipeEnd,d=>{const{x:m,y:f}=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",`${m}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})});Kr.displayName=ft;var[cu,lu]=Br(ft,{onClose(){}}),uu=c.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:d,onSwipeStart:m,onSwipeMove:f,onSwipeCancel:g,onSwipeEnd:v,..._}=e,p=Ht(ft,n),[h,x]=c.useState(null),w=H(t,T=>x(T)),y=c.useRef(null),b=c.useRef(null),S=r||p.duration,R=c.useRef(0),C=c.useRef(S),N=c.useRef(0),{onToastAdd:P,onToastRemove:D}=p,L=ne(()=>{h?.contains(document.activeElement)&&p.viewport?.focus(),a()}),k=c.useCallback(T=>{!T||T===1/0||(window.clearTimeout(N.current),R.current=new Date().getTime(),N.current=window.setTimeout(L,T))},[L]);c.useEffect(()=>{const T=p.viewport;if(T){const B=()=>{k(C.current),d?.()},j=()=>{const F=new Date().getTime()-R.current;C.current=C.current-F,window.clearTimeout(N.current),u?.()};return T.addEventListener(Sn,j),T.addEventListener(Cn,B),()=>{T.removeEventListener(Sn,j),T.removeEventListener(Cn,B)}}},[p.viewport,S,u,d,k]),c.useEffect(()=>{s&&!p.isClosePausedRef.current&&k(S)},[s,S,p.isClosePausedRef,k]),c.useEffect(()=>(P(),()=>D()),[P,D]);const W=c.useMemo(()=>h?Jr(h):null,[h]);return p.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(du,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(cu,{scope:n,onClose:L,children:ct.createPortal(l.jsx(Kn.ItemSlot,{scope:n,children:l.jsx(vc,{asChild:!0,onEscapeKeyDown:I(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||L(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx($.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:I(e.onKeyDown,T=>{T.key==="Escape"&&(i?.(T.nativeEvent),T.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:I(e.onPointerDown,T=>{T.button===0&&(y.current={x:T.clientX,y:T.clientY})}),onPointerMove:I(e.onPointerMove,T=>{if(!y.current)return;const B=T.clientX-y.current.x,j=T.clientY-y.current.y,F=!!b.current,M=["left","right"].includes(p.swipeDirection),E=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=M?E(0,B):0,G=M?0:E(0,j),Q=T.pointerType==="touch"?10:2,Z={x:V,y:G},re={originalEvent:T,delta:Z};F?(b.current=Z,Et(su,f,re,{discrete:!1})):jo(Z,p.swipeDirection,Q)?(b.current=Z,Et(ru,m,re,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(B)>Q||Math.abs(j)>Q)&&(y.current=null)}),onPointerUp:I(e.onPointerUp,T=>{const B=b.current,j=T.target;if(j.hasPointerCapture(T.pointerId)&&j.releasePointerCapture(T.pointerId),b.current=null,y.current=null,B){const F=T.currentTarget,M={originalEvent:T,delta:B};jo(B,p.swipeDirection,p.swipeThreshold)?Et(au,v,M,{discrete:!0}):Et(iu,g,M,{discrete:!0}),F.addEventListener("click",E=>E.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),du=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ht(ft,t),[s,a]=c.useState(!1),[i,u]=c.useState(!1);return hu(()=>a(!0)),c.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:l.jsx(dt,{asChild:!0,children:l.jsx(Hn,{...o,children:s&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},fu="ToastTitle",pu=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx($.div,{...o,ref:t})});pu.displayName=fu;var mu="ToastDescription",Gr=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx($.div,{...o,ref:t})});Gr.displayName=mu;var Yr="ToastAction",Xr=c.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(Zr,{altText:n,asChild:!0,children:l.jsx(Gn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Yr}\`. Expected non-empty \`string\`.`),null)});Xr.displayName=Yr;var qr="ToastClose",Gn=c.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=lu(qr,n);return l.jsx(Zr,{asChild:!0,children:l.jsx($.button,{type:"button",...o,ref:t,onClick:I(e.onClick,r.onClose)})})});Gn.displayName=qr;var Zr=c.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Jr(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),vu(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Jr(o))}}),t}function Et(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?Fn(r,s):r.dispatchEvent(s)}var jo=(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 hu(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 vu(e){return e.nodeType===e.ELEMENT_NODE}function gu(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 hn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var _u=Wr,wu=Hr,xu=Kr,yu=Gr,bu=Xr,Su=Gn;const Cu="uzi-toast-module__stack__SRrda",Eu="uzi-toast-module__topRight__WiZzM",Ru="uzi-toast-module__topLeft__SzFS9",Tu="uzi-toast-module__topCenter__X5W-x",Pu="uzi-toast-module__bottomRight__DMtoS",Mu="uzi-toast-module__bottomLeft__ZZ7VF",Iu="uzi-toast-module__bottomCenter__QNJrM",Nu="uzi-toast-module__toast__HNUcj",Au="uzi-toast-module__toastSlideIn__BTXfm",Ou="uzi-toast-module__toastSlideOut__mBX-G",Du="uzi-toast-module__toastSwipeOut__R-jk2",ju="uzi-toast-module__icon__LIAqr",Lu="uzi-toast-module__body__9vzs7",ku="uzi-toast-module__message__TBY65",Fu="uzi-toast-module__actions__Iykd9",zu="uzi-toast-module__actionButton__cvUr0",$u="uzi-toast-module__closeButton__9JKNG",Ee={stack:Cu,topRight:Eu,topLeft:Ru,topCenter:Tu,bottomRight:Pu,bottomLeft:Mu,bottomCenter:Iu,toast:Nu,toastSlideIn:Au,toastSlideOut:Ou,toastSwipeOut:Du,icon:ju,body:Lu,message:ku,actions:Fu,actionButton:zu,closeButton:$u},Bu={position:"top-right",maxToasts:5,defaultDuration:4e3,pauseOnHover:!0,pauseOnFocusLoss:!0},Qr=O.createContext(void 0);let Wu=0;const Vu=()=>`toast-${++Wu}-${Date.now()}`;function Hu({children:e,config:t}){const[n,o]=O.useState([]),[r,s]=O.useState(!1),a=O.useMemo(()=>({...Bu,...t}),[t]),i=O.useCallback((p,h={})=>{const x=Vu();return o(w=>{const y=[...w,{id:x,message:p,type:h.type??"info",duration:h.duration??(h.type==="error"?6e3:a.defaultDuration),dismissible:h.dismissible??!0,action:h.action}];return y.length>a.maxToasts&&y.shift(),y}),x},[a.defaultDuration,a.maxToasts]),u=O.useCallback((p,h)=>i(p,{...h,type:"success"}),[i]),d=O.useCallback((p,h)=>i(p,{...h,type:"error",duration:h?.duration??6e3}),[i]),m=O.useCallback((p,h)=>i(p,{...h,type:"warning"}),[i]),f=O.useCallback((p,h)=>i(p,{...h,type:"info"}),[i]),g=O.useCallback(p=>{o(h=>h.filter(x=>x.id!==p))},[]),v=O.useCallback(()=>o([]),[]);O.useEffect(()=>{if(!a.pauseOnFocusLoss)return;const p=()=>s(document.visibilityState!=="visible");return document.addEventListener("visibilitychange",p),()=>document.removeEventListener("visibilitychange",p)},[a.pauseOnFocusLoss]);const _=O.useMemo(()=>({toasts:n,push:i,success:u,error:d,warning:m,info:f,dismiss:g,dismissAll:v}),[n,i,u,d,m,f,g,v]);return l.jsx(Qr.Provider,{value:_,children:l.jsxs(_u,{swipeDirection:"right",children:[e,l.jsx(Ku,{toasts:n,position:a.position,pauseOnHover:a.pauseOnHover,isPaused:r,onDismiss:g,onPauseChange:s})]})})}function Uu(){const e=O.useContext(Qr);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function Ku({toasts:e,position:t,pauseOnHover:n,isPaused:o,onDismiss:r,onPauseChange:s}){const a=(()=>{switch(t){case"top-left":return"topLeft";case"top-center":return"topCenter";case"bottom-right":return"bottomRight";case"bottom-left":return"bottomLeft";case"bottom-center":return"bottomCenter";default:return"topRight"}})();return l.jsxs(l.Fragment,{children:[e.map(i=>l.jsx(Gu,{toast:i,isPaused:o,onDismiss:r},i.id)),l.jsx(wu,{className:z(Ee.stack,Ee[a]),label:"Notifications",onMouseEnter:()=>n&&s(!0),onMouseLeave:()=>n&&s(!1)})]})}function Gu({toast:e,isPaused:t,onDismiss:n}){const[o,r]=O.useState(!0),s=O.useRef(null),a=O.useRef(0),i=O.useRef(e.duration??0),u=O.useRef(!1),d=Yu(e.type),m={"--toast-bg":d.background,"--toast-border":d.border,"--toast-text":d.text,"--toast-action-bg":d.actionBg,"--toast-action-border":d.actionBorder},f=()=>{s.current&&(window.clearTimeout(s.current),s.current=null)},g=O.useCallback(()=>{u.current||(u.current=!0,r(!1),f(),window.setTimeout(()=>n(e.id),160))},[n,e.id]),v=O.useCallback(p=>{if(!p||p<=0){g();return}a.current=performance.now(),f(),s.current=window.setTimeout(()=>g(),p)},[g]);O.useEffect(()=>{if(!(!e.duration||e.duration<=0))return v(e.duration),f},[v,e.duration]),O.useEffect(()=>{if(!(!e.duration||e.duration<=0))if(t){const p=performance.now()-a.current;i.current=Math.max(0,i.current-p),f()}else v(i.current)},[t,v,e.duration]);const _=Xu(e.type);return l.jsxs(xu,{open:o,onOpenChange:p=>{p||g()},duration:2147483647,className:Ee.toast,style:m,children:[l.jsx("span",{className:Ee.icon,"aria-hidden":!0,children:_}),l.jsxs("div",{className:Ee.body,children:[l.jsx(yu,{className:Ee.message,children:e.message}),e.action&&l.jsx("div",{className:Ee.actions,children:l.jsx(bu,{asChild:!0,altText:e.action.label,children:l.jsx("button",{type:"button",className:Ee.actionButton,onClick:()=>{e.action?.onClick(),g()},children:e.action.label})})})]}),e.dismissible!==!1&&l.jsx(Su,{asChild:!0,children:l.jsx("button",{type:"button",className:Ee.closeButton,"aria-label":"Dismiss notification",children:l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":!0,children:l.jsx("path",{d:"M11 3L3 11M3 3l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]})}function Yu(e){switch(e){case"success":return{background:"color-mix(in srgb, var(--success) 15%, var(--popover))",border:"color-mix(in srgb, var(--success) 40%, transparent)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--success) 12%, transparent)",actionBorder:"color-mix(in srgb, var(--success) 30%, transparent)"};case"error":return{background:"color-mix(in srgb, var(--destructive) 15%, var(--popover))",border:"color-mix(in srgb, var(--destructive) 40%, transparent)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--destructive) 12%, transparent)",actionBorder:"color-mix(in srgb, var(--destructive) 30%, transparent)"};case"warning":return{background:"color-mix(in srgb, var(--warning) 15%, var(--popover))",border:"color-mix(in srgb, var(--warning) 40%, transparent)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--warning) 12%, transparent)",actionBorder:"color-mix(in srgb, var(--warning) 30%, transparent)"};default:return{background:"color-mix(in srgb, var(--primary) 15%, var(--popover))",border:"color-mix(in srgb, var(--primary) 40%, transparent)",text:"var(--popover-foreground)",actionBg:"color-mix(in srgb, var(--primary) 12%, transparent)",actionBorder:"color-mix(in srgb, var(--primary) 30%, transparent)"}}}function Xu(e){switch(e){case"success":return"OK";case"error":return"X";case"warning":return"!";default:return"i"}}const qu="uzi-input-module__input__-ipHD",Zu={input:qu},es=c.forwardRef(({className:e,type:t,...n},o)=>l.jsx("input",{ref:o,type:t,className:z(Zu.input,e),...n}));es.displayName="Input";const Ju="uzi-label-module__label__gKflt",Qu={label:Ju},ts=c.forwardRef(({className:e,...t},n)=>l.jsx("label",{ref:n,className:z(Qu.label,e),...t}));ts.displayName="Label";const ed="uzi-checkbox-module__checkbox__zAB1y",td={checkbox:ed},ns=c.forwardRef(({className:e,...t},n)=>l.jsx("input",{ref:n,type:"checkbox",className:z(td.checkbox,e),...t}));ns.displayName="Checkbox";var nd=c.createContext(void 0);function Yn(e){const t=c.useContext(nd);return e||t||"ltr"}const od=["top","right","bottom","left"],Ne=Math.min,ce=Math.max,At=Math.round,Rt=Math.floor,be=e=>({x:e,y:e}),rd={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(e,t,n){return ce(e,Ne(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function Xn(e){return e==="x"?"y":"x"}function qn(e){return e==="y"?"height":"width"}function ye(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zn(e){return Xn(ye(e))}function sd(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=Zn(e),s=qn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ot(a)),[a,Ot(a)]}function id(e){const t=Ot(e);return[Tn(e),t,Tn(t)]}function Tn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lo=["left","right"],ko=["right","left"],ad=["top","bottom"],cd=["bottom","top"];function ld(e,t,n){switch(e){case"top":case"bottom":return n?t?ko:Lo:t?Lo:ko;case"left":case"right":return t?ad:cd;default:return[]}}function ud(e,t,n,o){const r=Qe(e);let s=ld(Te(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Tn)))),s}function Ot(e){const t=Te(e);return rd[t]+e.slice(t.length)}function dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function os(e){return typeof e!="number"?dd(e):{top:e,right:e,bottom:e,left:e}}function Dt(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 Fo(e,t,n){let{reference:o,floating:r}=e;const s=ye(t),a=Zn(t),i=qn(a),u=Te(t),d=s==="y",m=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let v;switch(u){case"top":v={x:m,y:o.y-r.height};break;case"bottom":v={x:m,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(Qe(t)){case"start":v[a]-=g*(n&&d?-1:1);break;case"end":v[a]+=g*(n&&d?-1:1);break}return v}async function fd(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:g=!1,padding:v=0}=Re(t,e),_=os(v),h=i[g?f==="floating"?"reference":"floating":f],x=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:m,strategy:u})),w=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),b=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:y,strategy:u}):w);return{top:(x.top-S.top+_.top)/b.y,bottom:(S.bottom-x.bottom+_.bottom)/b.y,left:(x.left-S.left+_.left)/b.x,right:(S.right-x.right+_.right)/b.x}}const pd=50,md=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:fd},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:m,y:f}=Fo(d,o,u),g=o,v=0;const _={};for(let p=0;p<s.length;p++){const h=s[p];if(!h)continue;const{name:x,fn:w}=h,{x:y,y:b,data:S,reset:R}=await w({x:m,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:_,rects:d,platform:i,elements:{reference:e,floating:t}});m=y??m,f=b??f,_[x]={..._[x],...S},R&&v<pd&&(v++,typeof R=="object"&&(R.placement&&(g=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:m,y:f}=Fo(d,g,u)),p=-1)}return{x:m,y:f,placement:g,strategy:r,middlewareData:_}},hd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:m=0}=Re(e,t)||{};if(d==null)return{};const f=os(m),g={x:n,y:o},v=Zn(r),_=qn(v),p=await a.getDimensions(d),h=v==="y",x=h?"top":"left",w=h?"bottom":"right",y=h?"clientHeight":"clientWidth",b=s.reference[_]+s.reference[v]-g[v]-s.floating[_],S=g[v]-s.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let C=R?R[y]:0;(!C||!await(a.isElement==null?void 0:a.isElement(R)))&&(C=i.floating[y]||s.floating[_]);const N=b/2-S/2,P=C/2-p[_]/2-1,D=Ne(f[x],P),L=Ne(f[w],P),k=D,W=C-p[_]-L,T=C/2-p[_]/2+N,B=Rn(k,T,W),j=!u.arrow&&Qe(r)!=null&&T!==B&&s.reference[_]/2-(T<k?D:L)-p[_]/2<0,F=j?T<k?T-k:T-W:0;return{[v]:g[v]+F,data:{[v]:B,centerOffset:T-B-F,...j&&{alignmentOffset:F}},reset:j}}}),vd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:p=!0,...h}=Re(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Te(r),w=ye(i),y=Te(i)===i,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=g||(y||!p?[Ot(i)]:id(i)),R=_!=="none";!g&&R&&S.push(...ud(i,p,_,b));const C=[i,...S],N=await u.detectOverflow(t,h),P=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(m&&P.push(N[x]),f){const T=sd(r,a,b);P.push(N[T[0]],N[T[1]])}if(D=[...D,{placement:r,overflows:P}],!P.every(T=>T<=0)){var L,k;const T=(((L=s.flip)==null?void 0:L.index)||0)+1,B=C[T];if(B&&(!(f==="alignment"?w!==ye(B):!1)||D.every(M=>ye(M.placement)===w?M.overflows[0]>0:!0)))return{data:{index:T,overflows:D},reset:{placement:B}};let j=(k=D.filter(F=>F.overflows[0]<=0).sort((F,M)=>F.overflows[1]-M.overflows[1])[0])==null?void 0:k.placement;if(!j)switch(v){case"bestFit":{var W;const F=(W=D.filter(M=>{if(R){const E=ye(M.placement);return E===w||E==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(E=>E>0).reduce((E,V)=>E+V,0)]).sort((M,E)=>M[1]-E[1])[0])==null?void 0:W[0];F&&(j=F);break}case"initialPlacement":j=i;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $o(e){return od.some(t=>e[t]>=0)}const gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...s}=Re(e,t);switch(r){case"referenceHidden":{const a=await o.detectOverflow(t,{...s,elementContext:"reference"}),i=zo(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:$o(i)}}}case"escaped":{const a=await o.detectOverflow(t,{...s,altBoundary:!0}),i=zo(a,n.floating);return{data:{escapedOffsets:i,escaped:$o(i)}}}default:return{}}}}},rs=new Set(["left","top"]);async function _d(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Te(n),i=Qe(n),u=ye(n)==="y",d=rs.has(a)?-1:1,m=s&&u?-1:1,f=Re(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:_}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof _=="number"&&(v=i==="end"?_*-1:_),u?{x:v*m,y:g*d}:{x:g*d,y:v*m}}const wd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,u=await _d(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},xd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:x=>{let{x:w,y}=x;return{x:w,y}}},...d}=Re(e,t),m={x:n,y:o},f=await s.detectOverflow(t,d),g=ye(Te(r)),v=Xn(g);let _=m[v],p=m[g];if(a){const x=v==="y"?"top":"left",w=v==="y"?"bottom":"right",y=_+f[x],b=_-f[w];_=Rn(y,_,b)}if(i){const x=g==="y"?"top":"left",w=g==="y"?"bottom":"right",y=p+f[x],b=p-f[w];p=Rn(y,p,b)}const h=u.fn({...t,[v]:_,[g]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[v]:a,[g]:i}}}}}},yd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=Re(e,t),m={x:n,y:o},f=ye(r),g=Xn(f);let v=m[g],_=m[f];const p=Re(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const y=g==="y"?"height":"width",b=s.reference[g]-s.floating[y]+h.mainAxis,S=s.reference[g]+s.reference[y]-h.mainAxis;v<b?v=b:v>S&&(v=S)}if(d){var x,w;const y=g==="y"?"width":"height",b=rs.has(Te(r)),S=s.reference[f]-s.floating[y]+(b&&((x=a.offset)==null?void 0:x[f])||0)+(b?0:h.crossAxis),R=s.reference[f]+s.reference[y]+(b?0:((w=a.offset)==null?void 0:w[f])||0)-(b?h.crossAxis:0);_<S?_=S:_>R&&(_=R)}return{[g]:v,[f]:_}}}},bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...d}=Re(e,t),m=await a.detectOverflow(t,d),f=Te(r),g=Qe(r),v=ye(r)==="y",{width:_,height:p}=s.floating;let h,x;f==="top"||f==="bottom"?(h=f,x=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(x=f,h=g==="end"?"top":"bottom");const w=p-m.top-m.bottom,y=_-m.left-m.right,b=Ne(p-m[h],w),S=Ne(_-m[x],y),R=!t.middlewareData.shift;let C=b,N=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(C=w),R&&!g){const D=ce(m.left,0),L=ce(m.right,0),k=ce(m.top,0),W=ce(m.bottom,0);v?N=_-2*(D!==0||L!==0?D+L:ce(m.left,m.right)):C=p-2*(k!==0||W!==0?k+W:ce(m.top,m.bottom))}await u({...t,availableWidth:N,availableHeight:C});const P=await a.getDimensions(i.floating);return _!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function Ut(){return typeof window<"u"}function et(e){return ss(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(ss(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ss(e){return Ut()?e instanceof Node||e instanceof le(e).Node:!1}function ve(e){return Ut()?e instanceof Element||e instanceof le(e).Element:!1}function Me(e){return Ut()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function Bo(e){return!Ut()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Sd(e){return/^(table|td|th)$/.test(et(e))}function Kt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Cd=/transform|translate|scale|rotate|perspective|filter/,Ed=/paint|layout|strict|content/,Fe=e=>!!e&&e!=="none";let vn;function Jn(e){const t=ve(e)?ge(e):e;return Fe(t.transform)||Fe(t.translate)||Fe(t.scale)||Fe(t.rotate)||Fe(t.perspective)||!Qn()&&(Fe(t.backdropFilter)||Fe(t.filter))||Cd.test(t.willChange||"")||Ed.test(t.contain||"")}function Rd(e){let t=Ae(e);for(;Me(t)&&!Je(t);){if(Jn(t))return t;if(Kt(t))return null;t=Ae(t)}return null}function Qn(){return vn==null&&(vn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vn}function Je(e){return/^(html|body|#document)$/.test(et(e))}function ge(e){return le(e).getComputedStyle(e)}function Gt(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||Se(e);return Bo(t)?t.host:t}function is(e){const t=Ae(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:Me(t)&&pt(t)?t:is(t)}function st(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=is(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=le(r);if(s){const i=Pn(a);return t.concat(a,a.visualViewport||[],pt(r)?r:[],i&&n?st(i):[])}else return t.concat(r,st(r,[],n))}function Pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function as(e){const t=ge(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Me(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=At(n)!==s||At(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function eo(e){return ve(e)?e:e.contextElement}function qe(e){const t=eo(e);if(!Me(t))return be(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=as(t);let a=(s?At(n.width):n.width)/o,i=(s?At(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Td=be(0);function cs(e){const t=le(e);return!Qn()||!t.visualViewport?Td:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function Be(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=eo(e);let a=be(1);t&&(o?ve(o)&&(a=qe(o)):a=qe(e));const i=Pd(s,n,o)?cs(s):be(0);let u=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,m=r.width/a.x,f=r.height/a.y;if(s){const g=le(s),v=o&&ve(o)?le(o):o;let _=g,p=Pn(_);for(;p&&o&&v!==_;){const h=qe(p),x=p.getBoundingClientRect(),w=ge(p),y=x.left+(p.clientLeft+parseFloat(w.paddingLeft))*h.x,b=x.top+(p.clientTop+parseFloat(w.paddingTop))*h.y;u*=h.x,d*=h.y,m*=h.x,f*=h.y,u+=y,d+=b,_=le(p),p=Pn(_)}}return Dt({width:m,height:f,x:u,y:d})}function Yt(e,t){const n=Gt(e).scrollLeft;return t?t.left+n:Be(Se(e)).left+n}function ls(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Md(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=Se(o),i=t?Kt(t.floating):!1;if(o===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},d=be(1);const m=be(0),f=Me(o);if((f||!f&&!s)&&((et(o)!=="body"||pt(a))&&(u=Gt(o)),f)){const v=Be(o);d=qe(o),m.x=v.x+o.clientLeft,m.y=v.y+o.clientTop}const g=a&&!f&&!s?ls(a,u):be(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-u.scrollTop*d.y+m.y+g.y}}function Id(e){return Array.from(e.getClientRects())}function Nd(e){const t=Se(e),n=Gt(e),o=e.ownerDocument.body,r=ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const i=-n.scrollTop;return ge(o).direction==="rtl"&&(a+=ce(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const Wo=25;function Ad(e,t){const n=le(e),o=Se(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,u=0;if(r){s=r.width,a=r.height;const m=Qn();(!m||m&&t==="fixed")&&(i=r.offsetLeft,u=r.offsetTop)}const d=Yt(o);if(d<=0){const m=o.ownerDocument,f=m.body,g=getComputedStyle(f),v=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,_=Math.abs(o.clientWidth-f.clientWidth-v);_<=Wo&&(s-=_)}else d<=Wo&&(s+=d);return{width:s,height:a,x:i,y:u}}function Od(e,t){const n=Be(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Me(e)?qe(e):be(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=r*s.x,d=o*s.y;return{width:a,height:i,x:u,y:d}}function Vo(e,t,n){let o;if(t==="viewport")o=Ad(e,n);else if(t==="document")o=Nd(Se(e));else if(ve(t))o=Od(t,n);else{const r=cs(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function us(e,t){const n=Ae(e);return n===t||!ve(n)||Je(n)?!1:ge(n).position==="fixed"||us(n,t)}function Dd(e,t){const n=t.get(e);if(n)return n;let o=st(e,[],!1).filter(i=>ve(i)&&et(i)!=="body"),r=null;const s=ge(e).position==="fixed";let a=s?Ae(e):e;for(;ve(a)&&!Je(a);){const i=ge(a),u=Jn(a);!u&&i.position==="fixed"&&(r=null),(s?!u&&!r:!u&&i.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||pt(a)&&!u&&us(e,a))?o=o.filter(m=>m!==a):r=i,a=Ae(a)}return t.set(e,o),o}function jd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:Dd(t,this._c):[].concat(n),o],i=Vo(t,a[0],r);let u=i.top,d=i.right,m=i.bottom,f=i.left;for(let g=1;g<a.length;g++){const v=Vo(t,a[g],r);u=ce(v.top,u),d=Ne(v.right,d),m=Ne(v.bottom,m),f=ce(v.left,f)}return{width:d-f,height:m-u,x:f,y:u}}function Ld(e){const{width:t,height:n}=as(e);return{width:t,height:n}}function kd(e,t,n){const o=Me(t),r=Se(t),s=n==="fixed",a=Be(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=be(0);function d(){u.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||pt(r))&&(i=Gt(t)),o){const v=Be(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else r&&d();s&&!o&&r&&d();const m=r&&!o&&!s?ls(r,i):be(0),f=a.left+i.scrollLeft-u.x-m.x,g=a.top+i.scrollTop-u.y-m.y;return{x:f,y:g,width:a.width,height:a.height}}function gn(e){return ge(e).position==="static"}function Ho(e,t){if(!Me(e)||ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Se(e)===n&&(n=n.ownerDocument.body),n}function ds(e,t){const n=le(e);if(Kt(e))return n;if(!Me(e)){let r=Ae(e);for(;r&&!Je(r);){if(ve(r)&&!gn(r))return r;r=Ae(r)}return n}let o=Ho(e,t);for(;o&&Sd(o)&&gn(o);)o=Ho(o,t);return o&&Je(o)&&gn(o)&&!Jn(o)?n:o||Rd(e)||n}const Fd=async function(e){const t=this.getOffsetParent||ds,n=this.getDimensions,o=await n(e.floating);return{reference:kd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zd(e){return ge(e).direction==="rtl"}const $d={convertOffsetParentRelativeRectToViewportRelativeRect:Md,getDocumentElement:Se,getClippingRect:jd,getOffsetParent:ds,getElementRects:Fd,getClientRects:Id,getDimensions:Ld,getScale:qe,isElement:ve,isRTL:zd};function fs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bd(e,t){let n=null,o;const r=Se(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:m,top:f,width:g,height:v}=d;if(i||t(),!g||!v)return;const _=Rt(f),p=Rt(r.clientWidth-(m+g)),h=Rt(r.clientHeight-(f+v)),x=Rt(m),y={rootMargin:-_+"px "+-p+"px "+-h+"px "+-x+"px",threshold:ce(0,Ne(1,u))||1};let b=!0;function S(R){const C=R[0].intersectionRatio;if(C!==u){if(!b)return a();C?a(!1,C):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!fs(d,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return a(!0),s}function Wd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=eo(e),m=r||s?[...d?st(d):[],...t?st(t):[]]:[];m.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=d&&i?Bd(d,n):null;let g=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),d&&!u&&v.observe(d),t&&v.observe(t));let _,p=u?Be(e):null;u&&h();function h(){const x=Be(e);p&&!fs(p,x)&&n(),p=x,_=requestAnimationFrame(h)}return n(),()=>{var x;m.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,u&&cancelAnimationFrame(_)}}const Vd=wd,Hd=xd,Ud=vd,Kd=bd,Gd=gd,Uo=hd,Yd=yd,Xd=(e,t,n)=>{const o=new Map,r={platform:$d,...n},s={...r.platform,_c:o};return md(e,t,{...r,platform:s})};var qd=typeof document<"u",Zd=function(){},Mt=qd?O.useLayoutEffect:Zd;function jt(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(!jt(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)&&!jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ps(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(e,t){const n=ps(e);return Math.round(t*n)/n}function _n(e){const t=c.useRef(e);return Mt(()=>{t.current=e}),t}function Jd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[m,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=c.useState(o);jt(g,o)||v(o);const[_,p]=c.useState(null),[h,x]=c.useState(null),w=c.useCallback(M=>{M!==R.current&&(R.current=M,p(M))},[]),y=c.useCallback(M=>{M!==C.current&&(C.current=M,x(M))},[]),b=s||_,S=a||h,R=c.useRef(null),C=c.useRef(null),N=c.useRef(m),P=u!=null,D=_n(u),L=_n(r),k=_n(d),W=c.useCallback(()=>{if(!R.current||!C.current)return;const M={placement:t,strategy:n,middleware:g};L.current&&(M.platform=L.current),Xd(R.current,C.current,M).then(E=>{const V={...E,isPositioned:k.current!==!1};T.current&&!jt(N.current,V)&&(N.current=V,ct.flushSync(()=>{f(V)}))})},[g,t,n,L,k]);Mt(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[d]);const T=c.useRef(!1);Mt(()=>(T.current=!0,()=>{T.current=!1}),[]),Mt(()=>{if(b&&(R.current=b),S&&(C.current=S),b&&S){if(D.current)return D.current(b,S,W);W()}},[b,S,W,D,P]);const B=c.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:y}),[w,y]),j=c.useMemo(()=>({reference:b,floating:S}),[b,S]),F=c.useMemo(()=>{const M={position:n,left:0,top:0};if(!j.floating)return M;const E=Ko(j.floating,m.x),V=Ko(j.floating,m.y);return i?{...M,transform:"translate("+E+"px, "+V+"px)",...ps(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:E,top:V}},[n,i,j.floating,m.x,m.y]);return c.useMemo(()=>({...m,update:W,refs:B,elements:j,floatingStyles:F}),[m,W,B,j,F])}const Qd=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?Uo({element:o.current,padding:r}).fn(n):{}:o?Uo({element:o,padding:r}).fn(n):{}}}},ef=(e,t)=>{const n=Vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},tf=(e,t)=>{const n=Hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},nf=(e,t)=>({fn:Yd(e).fn,options:[e,t]}),of=(e,t)=>{const n=Ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},rf=(e,t)=>{const n=Kd(e);return{name:n.name,fn:n.fn,options:[e,t]}},sf=(e,t)=>{const n=Gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},af=(e,t)=>{const n=Qd(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cf="Arrow",ms=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx($.svg,{...s,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"})})});ms.displayName=cf;var lf=ms;function uf(e){const[t,n]=c.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 s=r[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var to="Popper",[hs,Xt]=Oe(to),[df,vs]=hs(to),gs=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return l.jsx(df,{scope:t,anchor:o,onAnchorChange:r,children:n})};gs.displayName=to;var _s="PopperAnchor",ws=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=vs(_s,n),a=c.useRef(null),i=H(t,a),u=c.useRef(null);return c.useEffect(()=>{const d=u.current;u.current=o?.current||a.current,d!==u.current&&s.onAnchorChange(u.current)}),o?null:l.jsx($.div,{...r,ref:i})});ws.displayName=_s;var no="PopperContent",[ff,pf]=hs(no),xs=c.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:f="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:_,...p}=e,h=vs(no,n),[x,w]=c.useState(null),y=H(t,A=>w(A)),[b,S]=c.useState(null),R=uf(b),C=R?.width??0,N=R?.height??0,P=o+(s!=="center"?"-"+s:""),D=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(d)?d:[d],k=L.length>0,W={padding:D,boundary:L.filter(hf),altBoundary:k},{refs:T,floatingStyles:B,placement:j,isPositioned:F,middlewareData:M}=Jd({strategy:"fixed",placement:P,whileElementsMounted:(...A)=>Wd(...A,{animationFrame:v==="always"}),elements:{reference:h.anchor},middleware:[ef({mainAxis:r+N,alignmentAxis:a}),u&&tf({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?nf():void 0,...W}),u&&of({...W}),rf({...W,apply:({elements:A,rects:U,availableWidth:se,availableHeight:K})=>{const{width:Y,height:X}=U.reference,ue=A.floating.style;ue.setProperty("--radix-popper-available-width",`${se}px`),ue.setProperty("--radix-popper-available-height",`${K}px`),ue.setProperty("--radix-popper-anchor-width",`${Y}px`),ue.setProperty("--radix-popper-anchor-height",`${X}px`)}}),b&&af({element:b,padding:i}),vf({arrowWidth:C,arrowHeight:N}),g&&sf({strategy:"referenceHidden",...W})]}),[E,V]=Ss(j),G=ne(_);q(()=>{F&&G?.()},[F,G]);const Q=M.arrow?.x,Z=M.arrow?.y,re=M.arrow?.centerOffset!==0,[Ce,ie]=c.useState();return q(()=>{x&&ie(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:F?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(ff,{scope:n,placedSide:E,onArrowChange:S,arrowX:Q,arrowY:Z,shouldHideArrow:re,children:l.jsx($.div,{"data-side":E,"data-align":V,...p,ref:y,style:{...p.style,animation:F?void 0:"none"}})})})});xs.displayName=no;var ys="PopperArrow",mf={top:"bottom",right:"left",bottom:"top",left:"right"},bs=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=pf(ys,o),a=mf[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]: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:l.jsx(lf,{...r,ref:n,style:{...r.style,display:"block"}})})});bs.displayName=ys;function hf(e){return e!==null}var vf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,m]=Ss(n),f={start:"0%",center:"50%",end:"100%"}[m],g=(r.arrow?.x??0)+i/2,v=(r.arrow?.y??0)+u/2;let _="",p="";return d==="bottom"?(_=a?f:`${g}px`,p=`${-u}px`):d==="top"?(_=a?f:`${g}px`,p=`${o.floating.height+u}px`):d==="right"?(_=`${-u}px`,p=a?f:`${v}px`):d==="left"&&(_=`${o.floating.width+u}px`,p=a?f:`${v}px`),{data:{x:_,y:p}}}});function Ss(e){const[t,n="center"]=e.split("-");return[t,n]}var oo=gs,Cs=ws,Es=xs,Rs=bs,wn="rovingFocusGroup.onEntryFocus",gf={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[Mn,Ts,_f]=Vt(mt),[wf,Ps]=Oe(mt,[_f]),[xf,yf]=wf(mt),Ms=c.forwardRef((e,t)=>l.jsx(Mn.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Mn.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(bf,{...e,ref:t})})}));Ms.displayName=mt;var bf=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...f}=e,g=c.useRef(null),v=H(t,g),_=Yn(s),[p,h]=ze({prop:a,defaultProp:i??null,onChange:u,caller:mt}),[x,w]=c.useState(!1),y=ne(d),b=Ts(n),S=c.useRef(!1),[R,C]=c.useState(0);return c.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(wn,y),()=>N.removeEventListener(wn,y)},[y]),l.jsx(xf,{scope:n,orientation:o,dir:_,loop:r,currentTabStopId:p,onItemFocus:c.useCallback(N=>h(N),[h]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:c.useCallback(()=>C(N=>N-1),[]),children:l.jsx($.div,{tabIndex:x||R===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{S.current=!0}),onFocus:I(e.onFocus,N=>{const P=!S.current;if(N.target===N.currentTarget&&P&&!x){const D=new CustomEvent(wn,gf);if(N.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=b().filter(j=>j.focusable),k=L.find(j=>j.active),W=L.find(j=>j.id===p),B=[k,W,...L].filter(Boolean).map(j=>j.ref.current);As(B,m)}}S.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})}),Is="RovingFocusGroupItem",Ns=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,u=he(),d=s||u,m=yf(Is,n),f=m.currentTabStopId===d,g=Ts(n),{onFocusableItemAdd:v,onFocusableItemRemove:_,currentTabStopId:p}=m;return c.useEffect(()=>{if(o)return v(),()=>_()},[o,v,_]),l.jsx(Mn.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx($.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:I(e.onMouseDown,h=>{o?m.onItemFocus(d):h.preventDefault()}),onFocus:I(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:I(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){m.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const x=Ef(h,m.orientation,m.dir);if(x!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=g().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=m.loop?Rf(y,b+1):y.slice(b+1)}setTimeout(()=>As(y))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:p!=null}):a})})});Ns.displayName=Is;var Sf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ef(e,t,n){const o=Cf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Sf[o]}function As(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 Tf=Ms,Pf=Ns,In=["Enter"," "],Mf=["ArrowDown","PageUp","Home"],Os=["ArrowUp","PageDown","End"],If=[...Mf,...Os],Nf={ltr:[...In,"ArrowRight"],rtl:[...In,"ArrowLeft"]},Af={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ht="Menu",[it,Of,Df]=Vt(ht),[He,Ds]=Oe(ht,[Df,Xt,Ps]),vt=Xt(),js=Ps(),[Ls,De]=He(ht),[jf,gt]=He(ht),ks=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,i=vt(t),[u,d]=c.useState(null),m=c.useRef(!1),f=ne(s),g=Yn(r);return c.useEffect(()=>{const v=()=>{m.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},_=()=>m.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),l.jsx(oo,{...i,children:l.jsx(Ls,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:l.jsx(jf,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:m,dir:g,modal:a,children:o})})})};ks.displayName=ht;var Lf="MenuAnchor",ro=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Cs,{...r,...o,ref:t})});ro.displayName=Lf;var so="MenuPortal",[kf,Fs]=He(so,{forceMount:void 0}),zs=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=De(so,t);return l.jsx(kf,{scope:t,forceMount:n,children:l.jsx(Pe,{present:n||s.open,children:l.jsx(dt,{asChild:!0,container:r,children:o})})})};zs.displayName=so;var fe="MenuContent",[Ff,io]=He(fe),$s=c.forwardRef((e,t)=>{const n=Fs(fe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(fe,e.__scopeMenu),a=gt(fe,e.__scopeMenu);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Pe,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:a.modal?l.jsx(zf,{...r,ref:t}):l.jsx($f,{...r,ref:t})})})})}),zf=c.forwardRef((e,t)=>{const n=De(fe,e.__scopeMenu),o=c.useRef(null),r=H(t,o);return c.useEffect(()=>{const s=o.current;if(s)return $n(s)},[]),l.jsx(ao,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$f=c.forwardRef((e,t)=>{const n=De(fe,e.__scopeMenu);return l.jsx(ao,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Bf=Ze("MenuContent.ScrollLock"),ao=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:g,onDismiss:v,disableOutsideScroll:_,...p}=e,h=De(fe,n),x=gt(fe,n),w=vt(n),y=js(n),b=Of(n),[S,R]=c.useState(null),C=c.useRef(null),N=H(t,C,h.onContentChange),P=c.useRef(0),D=c.useRef(""),L=c.useRef(0),k=c.useRef(null),W=c.useRef("right"),T=c.useRef(0),B=_?Bt:c.Fragment,j=_?{as:Bf,allowPinchZoom:!0}:void 0,F=E=>{const V=D.current+E,G=b().filter(A=>!A.disabled),Q=document.activeElement,Z=G.find(A=>A.ref.current===Q)?.textValue,re=G.map(A=>A.textValue),Ce=Qf(re,V,Z),ie=G.find(A=>A.textValue===Ce)?.ref.current;(function A(U){D.current=U,window.clearTimeout(P.current),U!==""&&(P.current=window.setTimeout(()=>A(""),1e3))})(V),ie&&setTimeout(()=>ie.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),zn();const M=c.useCallback(E=>W.current===k.current?.side&&tp(E,k.current?.area),[]);return l.jsx(Ff,{scope:n,searchRef:D,onItemEnter:c.useCallback(E=>{M(E)&&E.preventDefault()},[M]),onItemLeave:c.useCallback(E=>{M(E)||(C.current?.focus(),R(null))},[M]),onTriggerLeave:c.useCallback(E=>{M(E)&&E.preventDefault()},[M]),pointerGraceTimerRef:L,onPointerGraceIntentChange:c.useCallback(E=>{k.current=E},[]),children:l.jsx(B,{...j,children:l.jsx(zt,{asChild:!0,trapped:r,onMountAutoFocus:I(s,E=>{E.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:g,onDismiss:v,children:l.jsx(Tf,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:R,onEntryFocus:I(u,E=>{x.isUsingKeyboardRef.current||E.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(Es,{role:"menu","aria-orientation":"vertical","data-state":oi(h.open),"data-radix-menu-content":"",dir:x.dir,...w,...p,ref:N,style:{outline:"none",...p.style},onKeyDown:I(p.onKeyDown,E=>{const G=E.target.closest("[data-radix-menu-content]")===E.currentTarget,Q=E.ctrlKey||E.altKey||E.metaKey,Z=E.key.length===1;G&&(E.key==="Tab"&&E.preventDefault(),!Q&&Z&&F(E.key));const re=C.current;if(E.target!==re||!If.includes(E.key))return;E.preventDefault();const ie=b().filter(A=>!A.disabled).map(A=>A.ref.current);Os.includes(E.key)&&ie.reverse(),Zf(ie)}),onBlur:I(e.onBlur,E=>{E.currentTarget.contains(E.target)||(window.clearTimeout(P.current),D.current="")}),onPointerMove:I(e.onPointerMove,at(E=>{const V=E.target,G=T.current!==E.clientX;if(E.currentTarget.contains(V)&&G){const Q=E.clientX>T.current?"right":"left";W.current=Q,T.current=E.clientX}}))})})})})})})});$s.displayName=fe;var Wf="MenuGroup",co=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx($.div,{role:"group",...o,ref:t})});co.displayName=Wf;var Vf="MenuLabel",Bs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx($.div,{...o,ref:t})});Bs.displayName=Vf;var Lt="MenuItem",Go="menu.itemSelect",qt=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=c.useRef(null),a=gt(Lt,e.__scopeMenu),i=io(Lt,e.__scopeMenu),u=H(t,s),d=c.useRef(!1),m=()=>{const f=s.current;if(!n&&f){const g=new CustomEvent(Go,{bubbles:!0,cancelable:!0});f.addEventListener(Go,v=>o?.(v),{once:!0}),Fn(f,g),g.defaultPrevented?d.current=!1:a.onClose()}};return l.jsx(Ws,{...r,ref:u,disabled:n,onClick:I(e.onClick,m),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:I(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,f=>{const g=i.searchRef.current!=="";n||g&&f.key===" "||In.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});qt.displayName=Lt;var Ws=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=io(Lt,n),i=js(n),u=c.useRef(null),d=H(t,u),[m,f]=c.useState(!1),[g,v]=c.useState("");return c.useEffect(()=>{const _=u.current;_&&v((_.textContent??"").trim())},[s.children]),l.jsx(it.ItemSlot,{scope:n,disabled:o,textValue:r??g,children:l.jsx(Pf,{asChild:!0,...i,focusable:!o,children:l.jsx($.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:I(e.onPointerMove,at(_=>{o?a.onItemLeave(_):(a.onItemEnter(_),_.defaultPrevented||_.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,at(_=>a.onItemLeave(_))),onFocus:I(e.onFocus,()=>f(!0)),onBlur:I(e.onBlur,()=>f(!1))})})})}),Hf="MenuCheckboxItem",Vs=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Ys,{scope:e.__scopeMenu,checked:n,children:l.jsx(qt,{role:"menuitemcheckbox","aria-checked":kt(n)?"mixed":n,...r,ref:t,"data-state":fo(n),onSelect:I(r.onSelect,()=>o?.(kt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vs.displayName=Hf;var Hs="MenuRadioGroup",[Uf,Kf]=He(Hs,{value:void 0,onValueChange:()=>{}}),Us=c.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=ne(o);return l.jsx(Uf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:l.jsx(co,{...r,ref:t})})});Us.displayName=Hs;var Ks="MenuRadioItem",Gs=c.forwardRef((e,t)=>{const{value:n,...o}=e,r=Kf(Ks,e.__scopeMenu),s=n===r.value;return l.jsx(Ys,{scope:e.__scopeMenu,checked:s,children:l.jsx(qt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":fo(s),onSelect:I(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Gs.displayName=Ks;var lo="MenuItemIndicator",[Ys,Gf]=He(lo,{checked:!1}),Xs=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Gf(lo,n);return l.jsx(Pe,{present:o||kt(s.checked)||s.checked===!0,children:l.jsx($.span,{...r,ref:t,"data-state":fo(s.checked)})})});Xs.displayName=lo;var Yf="MenuSeparator",qs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});qs.displayName=Yf;var Xf="MenuArrow",Zs=c.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=vt(n);return l.jsx(Rs,{...r,...o,ref:t})});Zs.displayName=Xf;var uo="MenuSub",[qf,Js]=He(uo),Qs=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:r}=e,s=De(uo,t),a=vt(t),[i,u]=c.useState(null),[d,m]=c.useState(null),f=ne(r);return c.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),l.jsx(oo,{...a,children:l.jsx(Ls,{scope:t,open:o,onOpenChange:f,content:d,onContentChange:m,children:l.jsx(qf,{scope:t,contentId:he(),triggerId:he(),trigger:i,onTriggerChange:u,children:n})})})};Qs.displayName=uo;var ot="MenuSubTrigger",ei=c.forwardRef((e,t)=>{const n=De(ot,e.__scopeMenu),o=gt(ot,e.__scopeMenu),r=Js(ot,e.__scopeMenu),s=io(ot,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},m=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>m,[m]),c.useEffect(()=>{const f=i.current;return()=>{window.clearTimeout(f),u(null)}},[i,u]),l.jsx(ro,{asChild:!0,...d,children:l.jsx(Ws,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":oi(n.open),...e,ref:lt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,at(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:I(e.onPointerLeave,at(f=>{m();const g=n.content?.getBoundingClientRect();if(g){const v=n.content?.dataset.side,_=v==="right",p=_?-5:5,h=g[_?"left":"right"],x=g[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:h,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:h,y:g.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,f=>{const g=s.searchRef.current!=="";e.disabled||g&&f.key===" "||Nf[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ei.displayName=ot;var ti="MenuSubContent",ni=c.forwardRef((e,t)=>{const n=Fs(fe,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(fe,e.__scopeMenu),a=gt(fe,e.__scopeMenu),i=Js(ti,e.__scopeMenu),u=c.useRef(null),d=H(t,u);return l.jsx(it.Provider,{scope:e.__scopeMenu,children:l.jsx(Pe,{present:o||s.open,children:l.jsx(it.Slot,{scope:e.__scopeMenu,children:l.jsx(ao,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{a.isUsingKeyboardRef.current&&u.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:I(e.onFocusOutside,m=>{m.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,m=>{a.onClose(),m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{const f=m.currentTarget.contains(m.target),g=Af[a.dir].includes(m.key);f&&g&&(s.onOpenChange(!1),i.trigger?.focus(),m.preventDefault())})})})})})});ni.displayName=ti;function oi(e){return e?"open":"closed"}function kt(e){return e==="indeterminate"}function fo(e){return kt(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 Jf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Qf(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Jf(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.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 s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],u=t[a],d=i.x,m=i.y,f=u.x,g=u.y;m>o!=g>o&&n<(f-d)*(o-m)/(g-m)+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 at(e){return t=>t.pointerType==="mouse"?e(t):void 0}var np=ks,op=ro,rp=zs,sp=$s,ip=co,ap=Bs,cp=qt,lp=Vs,up=Us,dp=Gs,fp=Xs,pp=qs,mp=Zs,hp=Qs,vp=ei,gp=ni,Zt="DropdownMenu",[_p]=Oe(Zt,[Ds]),oe=Ds(),[wp,ri]=_p(Zt),si=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,u=oe(t),d=c.useRef(null),[m,f]=ze({prop:r,defaultProp:s??!1,onChange:a,caller:Zt});return l.jsx(wp,{scope:t,triggerId:he(),triggerRef:d,contentId:he(),open:m,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(g=>!g),[f]),modal:i,children:l.jsx(np,{...u,open:m,onOpenChange:f,dir:o,modal:i,children:n})})};si.displayName=Zt;var ii="DropdownMenuTrigger",ai=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=ri(ii,n),a=oe(n);return l.jsx(op,{asChild:!0,...a,children:l.jsx($.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:lt(t,s.triggerRef),onPointerDown:I(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:I(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});ai.displayName=ii;var xp="DropdownMenuPortal",ci=e=>{const{__scopeDropdownMenu:t,...n}=e,o=oe(t);return l.jsx(rp,{...o,...n})};ci.displayName=xp;var li="DropdownMenuContent",ui=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ri(li,n),s=oe(n),a=c.useRef(!1);return l.jsx(sp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{a.current||r.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:I(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,m=u.button===2||d;(!r.modal||m)&&(a.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)"}})});ui.displayName=li;var yp="DropdownMenuGroup",di=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(ip,{...r,...o,ref:t})});di.displayName=yp;var bp="DropdownMenuLabel",fi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(ap,{...r,...o,ref:t})});fi.displayName=bp;var Sp="DropdownMenuItem",pi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(cp,{...r,...o,ref:t})});pi.displayName=Sp;var Cp="DropdownMenuCheckboxItem",mi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(lp,{...r,...o,ref:t})});mi.displayName=Cp;var Ep="DropdownMenuRadioGroup",hi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(up,{...r,...o,ref:t})});hi.displayName=Ep;var Rp="DropdownMenuRadioItem",vi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(dp,{...r,...o,ref:t})});vi.displayName=Rp;var Tp="DropdownMenuItemIndicator",gi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(fp,{...r,...o,ref:t})});gi.displayName=Tp;var Pp="DropdownMenuSeparator",_i=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(pp,{...r,...o,ref:t})});_i.displayName=Pp;var Mp="DropdownMenuArrow",Ip=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(mp,{...r,...o,ref:t})});Ip.displayName=Mp;var Np=e=>{const{__scopeDropdownMenu:t,children:n,open:o,onOpenChange:r,defaultOpen:s}=e,a=oe(t),[i,u]=ze({prop:o,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return l.jsx(hp,{...a,open:i,onOpenChange:u,children:n})},Ap="DropdownMenuSubTrigger",wi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(vp,{...r,...o,ref:t})});wi.displayName=Ap;var Op="DropdownMenuSubContent",xi=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=oe(n);return l.jsx(gp,{...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)"}})});xi.displayName=Op;var yi=si,bi=ai,po=ci,Si=ui,Dp=di,jp=fi,Lp=pi,Ci=mi,kp=hi,Fp=vi,mo=gi,zp=_i,$p=Np,Bp=wi,Wp=xi;const Vp="uzi-multi-select-module__wrapper__Izj2x",Hp="uzi-multi-select-module__wrapperFullWidth__eH8pf",Up="uzi-multi-select-module__trigger__r3816",Kp="uzi-multi-select-module__value__PuUmG",Gp="uzi-multi-select-module__placeholder__dJIU-",Yp="uzi-multi-select-module__chip__46Ms-",Xp="uzi-multi-select-module__chipSummary__zLwi8",qp="uzi-multi-select-module__chevron__SWK5l",Zp="uzi-multi-select-module__menu__q8auA",Jp="uzi-multi-select-module__option__-Ioqk",Qp="uzi-multi-select-module__optionDisabled__qtCi8",em="uzi-multi-select-module__optionSelected__74IO8",tm="uzi-multi-select-module__optionLabel__cVoN7",nm="uzi-multi-select-module__indicator__NO-WE",om="uzi-multi-select-module__indicatorSelected__9sEAy",rm="uzi-multi-select-module__indicatorDisabled__vqdiH",ee={wrapper:Vp,wrapperFullWidth:Hp,trigger:Up,value:Kp,placeholder:Gp,chip:Yp,chipSummary:Xp,chevron:qp,menu:Zp,option:Jp,optionDisabled:Qp,optionSelected:em,optionLabel:tm,indicator:nm,indicatorSelected:om,indicatorDisabled:rm},Ei=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="Select options",fullWidth:r=!0,maxVisibleValues:s=2,className:a,disabled:i=!1,name:u,"aria-label":d,"aria-labelledby":m},f)=>{const g=c.useMemo(()=>new Set(t),[t]),v=c.useMemo(()=>e.filter(w=>g.has(w.value)),[e,g]),_=c.useCallback(w=>{if(g.has(w)){n(t.filter(y=>y!==w));return}n([...t,w])},[n,g,t]),p=Math.max(1,s),h=v.slice(0,p),x=Math.max(0,v.length-h.length);return l.jsx(yi,{modal:!1,children:l.jsxs("div",{className:z(ee.wrapper,r&&ee.wrapperFullWidth,a),children:[l.jsx(bi,{asChild:!0,children:l.jsxs("button",{ref:f,type:"button",className:ee.trigger,"aria-label":d,"aria-labelledby":m,disabled:i,children:[l.jsx("span",{className:ee.value,children:v.length===0?l.jsx("span",{className:ee.placeholder,children:o}):l.jsxs(l.Fragment,{children:[h.map(w=>l.jsx("span",{className:ee.chip,children:w.label},w.value)),x>0?l.jsxs("span",{className:z(ee.chip,ee.chipSummary),children:["+",x]}):null]})}),l.jsx("span",{className:ee.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),u?t.map(w=>l.jsx("input",{type:"hidden",name:u,value:w},w)):null,l.jsx(po,{children:l.jsx(Si,{className:ee.menu,sideOffset:4,align:"start",children:e.map(w=>{const y=g.has(w.value);return l.jsxs(Ci,{className:z(ee.option,y&&ee.optionSelected,w.disabled&&ee.optionDisabled),checked:y,disabled:w.disabled,onCheckedChange:()=>_(w.value),onSelect:b=>b.preventDefault(),children:[l.jsx("span",{className:z(ee.indicator,y&&ee.indicatorSelected,w.disabled&&ee.indicatorDisabled),"aria-hidden":"true",children:l.jsx(mo,{forceMount:!0,children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx("span",{className:ee.optionLabel,children:w.label})]},w.value)})})})]})})});Ei.displayName="MultiSelect";function Yo(e,[t,n]){return Math.min(n,Math.max(t,e))}function sm(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var im=[" ","Enter","ArrowUp","ArrowDown"],am=[" ","Enter"],We="Select",[Jt,Qt,cm]=Vt(We),[tt]=Oe(We,[cm,Xt]),en=Xt(),[lm,je]=tt(We),[um,dm]=tt(We),Ri=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:u,dir:d,name:m,autoComplete:f,disabled:g,required:v,form:_}=e,p=en(t),[h,x]=c.useState(null),[w,y]=c.useState(null),[b,S]=c.useState(!1),R=Yn(d),[C,N]=ze({prop:o,defaultProp:r??!1,onChange:s,caller:We}),[P,D]=ze({prop:a,defaultProp:i,onChange:u,caller:We}),L=c.useRef(null),k=h?_||!!h.closest("form"):!0,[W,T]=c.useState(new Set),B=Array.from(W).map(j=>j.props.value).join(";");return l.jsx(oo,{...p,children:l.jsxs(lm,{required:v,scope:t,trigger:h,onTriggerChange:x,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:S,contentId:he(),value:P,onValueChange:D,open:C,onOpenChange:N,dir:R,triggerPointerDownPosRef:L,disabled:g,children:[l.jsx(Jt.Provider,{scope:t,children:l.jsx(um,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(j=>{T(F=>new Set(F).add(j))},[]),onNativeOptionRemove:c.useCallback(j=>{T(F=>{const M=new Set(F);return M.delete(j),M})},[]),children:n})}),k?l.jsxs(Ki,{"aria-hidden":!0,required:v,tabIndex:-1,name:m,autoComplete:f,value:P,onChange:j=>D(j.target.value),disabled:g,form:_,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},B):null]})})};Ri.displayName=We;var Ti="SelectTrigger",Pi=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=en(n),a=je(Ti,n),i=a.disabled||o,u=H(t,a.onTriggerChange),d=Qt(n),m=c.useRef("touch"),[f,g,v]=Yi(p=>{const h=d().filter(y=>!y.disabled),x=h.find(y=>y.value===a.value),w=Xi(h,p,x);w!==void 0&&a.onValueChange(w.value)}),_=p=>{i||(a.onOpenChange(!0),v()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return l.jsx(Cs,{asChild:!0,...s,children:l.jsx($.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Gi(a.value)?"":void 0,...r,ref:u,onClick:I(r.onClick,p=>{p.currentTarget.focus(),m.current!=="mouse"&&_(p)}),onPointerDown:I(r.onPointerDown,p=>{m.current=p.pointerType;const h=p.target;h.hasPointerCapture(p.pointerId)&&h.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(_(p),p.preventDefault())}),onKeyDown:I(r.onKeyDown,p=>{const h=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&g(p.key),!(h&&p.key===" ")&&im.includes(p.key)&&(_(),p.preventDefault())})})})});Pi.displayName=Ti;var Mi="SelectValue",Ii=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,u=je(Mi,n),{onValueNodeHasChildrenChange:d}=u,m=s!==void 0,f=H(t,u.onValueNodeChange);return q(()=>{d(m)},[d,m]),l.jsx($.span,{...i,ref:f,style:{pointerEvents:"none"},children:Gi(u.value)?l.jsx(l.Fragment,{children:a}):s})});Ii.displayName=Mi;var fm="SelectIcon",Ni=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx($.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Ni.displayName=fm;var pm="SelectPortal",Ai=e=>l.jsx(dt,{asChild:!0,...e});Ai.displayName=pm;var Ve="SelectContent",Oi=c.forwardRef((e,t)=>{const n=je(Ve,e.__scopeSelect),[o,r]=c.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?ct.createPortal(l.jsx(Di,{scope:e.__scopeSelect,children:l.jsx(Jt.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(ji,{...e,ref:t})});Oi.displayName=Ve;var me=10,[Di,Le]=tt(Ve),mm="SelectContentImpl",hm=Ze("SelectContent.RemoveScroll"),ji=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:p,avoidCollisions:h,...x}=e,w=je(Ve,n),[y,b]=c.useState(null),[S,R]=c.useState(null),C=H(t,A=>b(A)),[N,P]=c.useState(null),[D,L]=c.useState(null),k=Qt(n),[W,T]=c.useState(!1),B=c.useRef(!1);c.useEffect(()=>{if(y)return $n(y)},[y]),zn();const j=c.useCallback(A=>{const[U,...se]=k().map(X=>X.ref.current),[K]=se.slice(-1),Y=document.activeElement;for(const X of A)if(X===Y||(X?.scrollIntoView({block:"nearest"}),X===U&&S&&(S.scrollTop=0),X===K&&S&&(S.scrollTop=S.scrollHeight),X?.focus(),document.activeElement!==Y))return},[k,S]),F=c.useCallback(()=>j([N,y]),[j,N,y]);c.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:M,triggerPointerDownPosRef:E}=w;c.useEffect(()=>{if(y){let A={x:0,y:0};const U=K=>{A={x:Math.abs(Math.round(K.pageX)-(E.current?.x??0)),y:Math.abs(Math.round(K.pageY)-(E.current?.y??0))}},se=K=>{A.x<=10&&A.y<=10?K.preventDefault():y.contains(K.target)||M(!1),document.removeEventListener("pointermove",U),E.current=null};return E.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",se,{capture:!0})}}},[y,M,E]),c.useEffect(()=>{const A=()=>M(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[M]);const[V,G]=Yi(A=>{const U=k().filter(Y=>!Y.disabled),se=U.find(Y=>Y.ref.current===document.activeElement),K=Xi(U,A,se);K&&setTimeout(()=>K.ref.current.focus())}),Q=c.useCallback((A,U,se)=>{const K=!B.current&&!se;(w.value!==void 0&&w.value===U||K)&&(P(A),K&&(B.current=!0))},[w.value]),Z=c.useCallback(()=>y?.focus(),[y]),re=c.useCallback((A,U,se)=>{const K=!B.current&&!se;(w.value!==void 0&&w.value===U||K)&&L(A)},[w.value]),Ce=o==="popper"?Nn:Li,ie=Ce===Nn?{side:i,sideOffset:u,align:d,alignOffset:m,arrowPadding:f,collisionBoundary:g,collisionPadding:v,sticky:_,hideWhenDetached:p,avoidCollisions:h}:{};return l.jsx(Di,{scope:n,content:y,viewport:S,onViewportChange:R,itemRefCallback:Q,selectedItem:N,onItemLeave:Z,itemTextRefCallback:re,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:V,children:l.jsx(Bt,{as:hm,allowPinchZoom:!0,children:l.jsx(zt,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:I(r,A=>{w.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:l.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...x,...ie,onPlaced:()=>T(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:I(x.onKeyDown,A=>{const U=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!U&&A.key.length===1&&G(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let K=k().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(A.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const Y=A.target,X=K.indexOf(Y);K=K.slice(X+1)}setTimeout(()=>j(K)),A.preventDefault()}})})})})})})});ji.displayName=mm;var vm="SelectItemAlignedPosition",Li=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=je(Ve,n),a=Le(Ve,n),[i,u]=c.useState(null),[d,m]=c.useState(null),f=H(t,C=>m(C)),g=Qt(n),v=c.useRef(!1),_=c.useRef(!0),{viewport:p,selectedItem:h,selectedItemText:x,focusSelectedItem:w}=a,y=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&p&&h&&x){const C=s.trigger.getBoundingClientRect(),N=d.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),D=x.getBoundingClientRect();if(s.dir!=="rtl"){const Y=D.left-N.left,X=P.left-Y,ue=C.left-X,ke=C.width+ue,tn=Math.max(ke,N.width),nn=window.innerWidth-me,on=Yo(X,[me,Math.max(me,nn-tn)]);i.style.minWidth=ke+"px",i.style.left=on+"px"}else{const Y=N.right-D.right,X=window.innerWidth-P.right-Y,ue=window.innerWidth-C.right-X,ke=C.width+ue,tn=Math.max(ke,N.width),nn=window.innerWidth-me,on=Yo(X,[me,Math.max(me,nn-tn)]);i.style.minWidth=ke+"px",i.style.right=on+"px"}const L=g(),k=window.innerHeight-me*2,W=p.scrollHeight,T=window.getComputedStyle(d),B=parseInt(T.borderTopWidth,10),j=parseInt(T.paddingTop,10),F=parseInt(T.borderBottomWidth,10),M=parseInt(T.paddingBottom,10),E=B+j+W+M+F,V=Math.min(h.offsetHeight*5,E),G=window.getComputedStyle(p),Q=parseInt(G.paddingTop,10),Z=parseInt(G.paddingBottom,10),re=C.top+C.height/2-me,Ce=k-re,ie=h.offsetHeight/2,A=h.offsetTop+ie,U=B+j+A,se=E-U;if(U<=re){const Y=L.length>0&&h===L[L.length-1].ref.current;i.style.bottom="0px";const X=d.clientHeight-p.offsetTop-p.offsetHeight,ue=Math.max(Ce,ie+(Y?Z:0)+X+F),ke=U+ue;i.style.height=ke+"px"}else{const Y=L.length>0&&h===L[0].ref.current;i.style.top="0px";const ue=Math.max(re,B+p.offsetTop+(Y?Q:0)+ie)+se;i.style.height=ue+"px",p.scrollTop=U-re+p.offsetTop}i.style.margin=`${me}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=k+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[g,s.trigger,s.valueNode,i,d,p,h,x,s.dir,o]);q(()=>y(),[y]);const[b,S]=c.useState();q(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const R=c.useCallback(C=>{C&&_.current===!0&&(y(),w?.(),_.current=!1)},[y,w]);return l.jsx(_m,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx($.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Li.displayName=vm;var gm="SelectPopperPosition",Nn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=me,...s}=e,a=en(n);return l.jsx(Es,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Nn.displayName=gm;var[_m,ho]=tt(Ve,{}),An="SelectViewport",ki=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Le(An,n),a=ho(An,n),i=H(t,s.onViewportChange),u=c.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(Jt.Slot,{scope:n,children:l.jsx($.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,d=>{const m=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=a;if(g?.current&&f){const v=Math.abs(u.current-m.scrollTop);if(v>0){const _=window.innerHeight-me*2,p=parseFloat(f.style.minHeight),h=parseFloat(f.style.height),x=Math.max(p,h);if(x<_){const w=x+v,y=Math.min(_,w),b=w-y;f.style.height=y+"px",f.style.bottom==="0px"&&(m.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});ki.displayName=An;var Fi="SelectGroup",[wm,xm]=tt(Fi),ym=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=he();return l.jsx(wm,{scope:n,id:r,children:l.jsx($.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ym.displayName=Fi;var zi="SelectLabel",bm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=xm(zi,n);return l.jsx($.div,{id:r.id,...o,ref:t})});bm.displayName=zi;var Ft="SelectItem",[Sm,$i]=tt(Ft),Bi=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=je(Ft,n),u=Le(Ft,n),d=i.value===o,[m,f]=c.useState(s??""),[g,v]=c.useState(!1),_=H(t,w=>u.itemRefCallback?.(w,o,r)),p=he(),h=c.useRef("touch"),x=()=>{r||(i.onValueChange(o),i.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(Sm,{scope:n,value:o,disabled:r,textId:p,isSelected:d,onItemTextChange:c.useCallback(w=>{f(y=>y||(w?.textContent??"").trim())},[]),children:l.jsx(Jt.ItemSlot,{scope:n,value:o,disabled:r,textValue:m,children:l.jsx($.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:_,onFocus:I(a.onFocus,()=>v(!0)),onBlur:I(a.onBlur,()=>v(!1)),onClick:I(a.onClick,()=>{h.current!=="mouse"&&x()}),onPointerUp:I(a.onPointerUp,()=>{h.current==="mouse"&&x()}),onPointerDown:I(a.onPointerDown,w=>{h.current=w.pointerType}),onPointerMove:I(a.onPointerMove,w=>{h.current=w.pointerType,r?u.onItemLeave?.():h.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(a.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:I(a.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(am.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});Bi.displayName=Ft;var rt="SelectItemText",Wi=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=je(rt,n),i=Le(rt,n),u=$i(rt,n),d=dm(rt,n),[m,f]=c.useState(null),g=H(t,x=>f(x),u.onItemTextChange,x=>i.itemTextRefCallback?.(x,u.value,u.disabled)),v=m?.textContent,_=c.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:p,onNativeOptionRemove:h}=d;return q(()=>(p(_),()=>h(_)),[p,h,_]),l.jsxs(l.Fragment,{children:[l.jsx($.span,{id:u.textId,...s,ref:g}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?ct.createPortal(s.children,a.valueNode):null]})});Wi.displayName=rt;var Vi="SelectItemIndicator",Hi=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return $i(Vi,n).isSelected?l.jsx($.span,{"aria-hidden":!0,...o,ref:t}):null});Hi.displayName=Vi;var On="SelectScrollUpButton",Cm=c.forwardRef((e,t)=>{const n=Le(On,e.__scopeSelect),o=ho(On,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ui,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop-u.offsetHeight)}}):null});Cm.displayName=On;var Dn="SelectScrollDownButton",Em=c.forwardRef((e,t)=>{const n=Le(Dn,e.__scopeSelect),o=ho(Dn,e.__scopeSelect),[r,s]=c.useState(!1),a=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)<d;s(m)};const u=n.viewport;return i(),u.addEventListener("scroll",i),()=>u.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ui,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:u}=n;i&&u&&(i.scrollTop=i.scrollTop+u.offsetHeight)}}):null});Em.displayName=Dn;var Ui=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Le("SelectScrollButton",n),a=c.useRef(null),i=Qt(n),u=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>u(),[u]),q(()=>{i().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx($.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{u()})})}),Rm="SelectSeparator",Tm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx($.div,{"aria-hidden":!0,...o,ref:t})});Tm.displayName=Rm;var jn="SelectArrow",Pm=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=en(n),s=je(jn,n),a=Le(jn,n);return s.open&&a.position==="popper"?l.jsx(Rs,{...r,...o,ref:t}):null});Pm.displayName=jn;var Mm="SelectBubbleInput",Ki=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=H(o,r),a=sm(t);return c.useEffect(()=>{const i=r.current;if(!i)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==t&&m){const f=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(f)}},[a,t]),l.jsx($.select,{...n,style:{...$r,...n.style},ref:s,defaultValue:t})});Ki.displayName=Mm;function Gi(e){return e===""||e===void 0}function Yi(e){const t=ne(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(a=>{const i=n.current+a;t(i),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Xi(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Im(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Im(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Nm=Ri,Am=Pi,Om=Ii,Dm=Ni,jm=Ai,Lm=Oi,km=ki,Xo=Bi,qo=Wi,Zo=Hi;const Fm="uzi-select-module__wrapper__7szq0",zm="uzi-select-module__wrapperFullWidth__IyOIG",$m="uzi-select-module__trigger__ldh8w",Bm="uzi-select-module__value__FTUJh",Wm="uzi-select-module__chevron__U6HXS",Vm="uzi-select-module__content__pOWWy",Hm="uzi-select-module__viewport__VGZM6",Um="uzi-select-module__item__6uM6-",Km="uzi-select-module__indicator__ZHcg5",Gm="uzi-select-module__indicatorIcon__kOV2G",ae={wrapper:Fm,wrapperFullWidth:zm,trigger:$m,value:Bm,chevron:Wm,content:Vm,viewport:Hm,item:Um,indicator:Km,indicatorIcon:Gm},Jo="__uzi_select_empty__",vo=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r=!1,fullWidth:s=!0,className:a,id:i,name:u,disabled:d,required:m,autoComplete:f,form:g,title:v,"aria-label":_,"aria-labelledby":p,onBlur:h,onFocus:x},w)=>l.jsx("div",{className:z(ae.wrapper,s&&ae.wrapperFullWidth,a),children:l.jsxs(Nm,{value:t,onValueChange:y=>n(y===Jo?"":y),name:u,disabled:d,required:m,autoComplete:f,form:g,children:[l.jsxs(Am,{ref:w,id:i,className:ae.trigger,title:v,"aria-label":_,"aria-labelledby":p,onBlur:h,onFocus:x,children:[l.jsx(Om,{className:ae.value,placeholder:o}),l.jsx(Dm,{className:ae.chevron,"aria-hidden":"true",children:l.jsx("svg",{viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:l.jsx("path",{d:"M2 3.5L5 6.5L8 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),l.jsx(jm,{children:l.jsx(Lm,{className:ae.content,position:"popper",sideOffset:4,align:"start",children:l.jsxs(km,{className:ae.viewport,children:[o&&r?l.jsxs(Xo,{value:Jo,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:o})]}):null,e.map(y=>l.jsxs(Xo,{value:y.value,disabled:y.disabled,className:ae.item,children:[l.jsx("span",{className:ae.indicator,children:l.jsx(Zo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:ae.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx(qo,{children:y.label})]},y.value))]})})})]})}));vo.displayName="Select";const qi=c.forwardRef(({options:e,value:t,onChange:n,placeholder:o="All",allowClear:r=!0,...s},a)=>l.jsx(vo,{ref:a,options:e,value:t,onChange:n,placeholder:o,allowEmptyOption:r,fullWidth:!1,...s}));qi.displayName="Dropdown";const Ym="uzi-dropdown-menu-module__content__n-ElH",Xm="uzi-dropdown-menu-module__item__tBNtW",qm="uzi-dropdown-menu-module__itemDestructive__oWmKd",Zm="uzi-dropdown-menu-module__insetItem__g7ONJ",Jm="uzi-dropdown-menu-module__indicator__5qwFh",Qm="uzi-dropdown-menu-module__indicatorIcon__nhJMw",eh="uzi-dropdown-menu-module__radioDot__GWUVT",th="uzi-dropdown-menu-module__label__sFnNR",nh="uzi-dropdown-menu-module__separator__PgUob",oh="uzi-dropdown-menu-module__chevron__kxfiF",te={content:Ym,item:Xm,itemDestructive:qm,insetItem:Zm,indicator:Jm,indicatorIcon:Qm,radioDot:eh,label:th,separator:nh,chevron:oh};function rh(e){return l.jsx(yi,{...e})}function sh(e){return l.jsx(bi,{...e})}function ih(e){return l.jsx(Dp,{...e})}function ah(e){return l.jsx(po,{...e})}function ch(e){return l.jsx($p,{...e})}function lh(e){return l.jsx(kp,{...e})}function uh({className:e,sideOffset:t=4,...n}){return l.jsx(po,{children:l.jsx(Si,{sideOffset:t,className:z(te.content,e),...n})})}function dh({className:e,inset:t,variant:n="default",...o}){return l.jsx(Lp,{"data-inset":t?"true":void 0,className:z(te.item,n==="destructive"&&te.itemDestructive,e),...o})}function fh({className:e,children:t,...n}){return l.jsxs(Ci,{className:z(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.indicatorIcon,children:l.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})})}),t]})}function ph({className:e,children:t,...n}){return l.jsxs(Fp,{className:z(te.item,te.insetItem,e),...n,children:[l.jsx("span",{className:te.indicator,children:l.jsx(mo,{children:l.jsx("span",{className:te.radioDot})})}),t]})}function mh({className:e,inset:t,...n}){return l.jsx(jp,{"data-inset":t?"true":void 0,className:z(te.label,e),...n})}function hh({className:e,...t}){return l.jsx(zp,{className:z(te.separator,e),...t})}function vh({className:e,inset:t,children:n,...o}){return l.jsxs(Bp,{"data-inset":t?"true":void 0,className:z(te.item,e),...o,children:[n,l.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",className:te.chevron,children:l.jsx("path",{d:"M6 3.5 10.5 8 6 12.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})]})}function gh({className:e,...t}){return l.jsx(Wp,{className:z(te.content,e),...t})}const _h=["light","dark","system"],wh=["blue","cyan","violet","emerald","amber","rose"],xh="uzi-theme",yh="uzi-accent",bh=xh,Sh=yh,Ch="data-uzi-theme",Eh="data-uzi-accent",Zi=O.createContext(void 0);function Rh(e){return _h.includes(e)}function Th(e){return wh.includes(e)}function Ph(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Mh({children:e,theme:t,defaultTheme:n="system",accent:o,defaultAccent:r="blue",onThemeChange:s,onAccentChange:a,storageKey:i=bh,accentStorageKey:u=Sh,disableStorage:d=!1}){const[m,f]=O.useState(n),[g,v]=O.useState(r),[_,p]=O.useState("light");O.useEffect(()=>{if(p(Ph()),!d){const P=window.localStorage.getItem(i);Rh(P)&&f(P);const D=window.localStorage.getItem(u);Th(D)&&v(D)}},[d,i,u]);const h=t!==void 0,x=o!==void 0,w=h?t:m,y=x?o:g,b=w==="system"?_:w;O.useEffect(()=>{if(typeof window>"u")return;const P=window.matchMedia("(prefers-color-scheme: dark)"),D=()=>p(P.matches?"dark":"light");return D(),P.addEventListener("change",D),()=>P.removeEventListener("change",D)},[]),O.useEffect(()=>{if(typeof document>"u")return;const P=document.documentElement;P.setAttribute(Ch,b),P.setAttribute(Eh,y),P.style.colorScheme=b,P.classList.toggle("dark",b==="dark")},[y,b]);const S=O.useCallback(P=>{h||f(P),!d&&typeof window<"u"&&window.localStorage.setItem(i,P),s?.(P)},[d,h,s,i]),R=O.useCallback(P=>{x||v(P),!d&&typeof window<"u"&&window.localStorage.setItem(u,P),a?.(P)},[u,d,x,a]),C=O.useCallback(()=>{S(b==="dark"?"light":"dark")},[b,S]),N=O.useMemo(()=>({theme:w,resolvedTheme:b,accent:y,setTheme:S,setAccent:R,toggleTheme:C}),[y,w,b,R,S,C]);return l.jsx(Zi.Provider,{value:N,children:e})}function Ji(){const e=O.useContext(Zi);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const Ih="uzi-theme-toggle-button-module__withLabel__KqtDj",Nh={withLabel:Ih};function Ah(){return l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:l.jsx("path",{d:"M20 15.2A8.5 8.5 0 0 1 8.8 4 9 9 0 1 0 20 15.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function Oh(){return l.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",width:"16",height:"16",fill:"none",children:[l.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.8"}),l.jsx("path",{d:"M12 2.75v2.5M12 18.75v2.5M21.25 12h-2.5M5.25 12h-2.5M18.54 5.46l-1.77 1.77M7.23 16.77l-1.77 1.77M18.54 18.54l-1.77-1.77M7.23 7.23 5.46 5.46",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function Qi({showLabel:e=!1,lightLabel:t="Light mode",darkLabel:n="Dark mode",className:o,onClick:r,...s}){const{resolvedTheme:a,toggleTheme:i}=Ji(),u=a==="dark"?t:n;return l.jsxs(sr,{type:"button",variant:"ghost",size:e?"sm":"icon",className:z(e&&Nh.withLabel,o),"aria-label":`Switch to ${u.toLowerCase()}`,title:`Switch to ${u.toLowerCase()}`,onClick:d=>{r?.(d),d.defaultPrevented||i()},...s,children:[a==="dark"?l.jsx(Oh,{}):l.jsx(Ah,{}),e&&l.jsx("span",{children:u})]})}const Dh="uzi-top-bar-module__topBar__MJ-7S",jh="uzi-top-bar-module__topBarStatic__JvEwt",Lh="uzi-top-bar-module__topBarInner__PBbi8",kh="uzi-top-bar-module__topBarStart__DrdN2",Fh="uzi-top-bar-module__topBarBrand__80VV3",zh="uzi-top-bar-module__topBarBrandContent__O4Uto",$h="uzi-top-bar-module__topBarCenter__Kwxg-",Bh="uzi-top-bar-module__topBarCenterGroup__7Ishp",Wh="uzi-top-bar-module__topBarActions__mgMd8",pe={topBar:Dh,topBarStatic:jh,topBarInner:Lh,topBarStart:kh,topBarBrand:Fh,topBarBrandContent:zh,topBarCenter:$h,topBarCenterGroup:Bh,topBarActions:Wh};function ea({leading:e,brand:t,brandHref:n,brandingLocation:o="left",start:r,center:s,actions:a,showThemeToggle:i=!1,themeToggleProps:u,className:d,innerClassName:m,isSticky:f,sticky:g=!0,children:v,..._}){const p=f??g,h=t?n?l.jsx("a",{href:n,className:pe.topBarBrand,children:l.jsx("span",{className:pe.topBarBrandContent,children:t})}):l.jsx("div",{className:pe.topBarBrand,children:l.jsx("span",{className:pe.topBarBrandContent,children:t})}):null;return l.jsx("header",{className:z(pe.topBar,!p&&pe.topBarStatic,d),..._,children:l.jsxs("div",{className:z(pe.topBarInner,m),children:[l.jsxs("div",{className:pe.topBarStart,children:[e,o==="left"&&h,r]}),h&&o==="center"||s||v?l.jsx("div",{className:pe.topBarCenter,children:l.jsxs("div",{className:pe.topBarCenterGroup,children:[o==="center"&&h,s??v]})}):null,l.jsxs("div",{className:pe.topBarActions,children:[i&&l.jsx(Qi,{...u}),a]})]})})}const Vh="uzi-app-shell-module__appShell__S0cVI",Hh="uzi-app-shell-module__appShellAnimated__-CRIl",Uh="uzi-app-shell-module__appShellOpen__1rZUl",Kh="uzi-app-shell-module__appShellCollapsed__fSasN",Gh="uzi-app-shell-module__appShellTopbar__rgXsW",Yh="uzi-app-shell-module__appShellHamburger__BciFA",Xh="uzi-app-shell-module__appShellSidebar__oY7uj",qh="uzi-app-shell-module__appShellMain__eHP2r",Zh="uzi-app-shell-module__appShellBackdrop__y31xs",Jh="uzi-app-shell-module__appShellSidebarOpen__Z5AIo",we={appShell:Vh,appShellAnimated:Hh,appShellOpen:Uh,appShellCollapsed:Kh,appShellTopbar:Gh,appShellHamburger:Yh,appShellSidebar:Xh,appShellMain:qh,appShellBackdrop:Zh,appShellSidebarOpen:Jh},Qh=960;function Qo(){return typeof window>"u"?!1:window.innerWidth>=Qh}function ev({children:e,sidebar:t,brand:n,brandHref:o,topbarStart:r,topbarEnd:s,showThemeToggle:a=!1,themeToggleProps:i,topBarBrandingLocation:u="left",className:d,sidebarClassName:m,topbarClassName:f,mainClassName:g,sidebarWidth:v,closeSidebarOnChangeKey:_,hamburgerLabel:p="Toggle navigation",onSidebarToggle:h}){const[x,w]=O.useState(!1),[y,b]=O.useState(!1),[S,R]=O.useState(!1),C=O.useRef(!1),N=O.useRef(_),P=O.useRef(null),D=O.useRef(null),L=O.useRef(null),k=O.useId();O.useEffect(()=>{const M=Qo();w(M),b(M),C.current=M;const E=window.requestAnimationFrame(()=>{R(!0)}),V=()=>{const G=Qo();w(G),G!==C.current&&(b(G),C.current=G)};return window.addEventListener("resize",V),()=>{window.cancelAnimationFrame(E),window.removeEventListener("resize",V)}},[]),O.useEffect(()=>{if(x||!y)return;const M=L.current,E=()=>b(!1),V=Q=>{const Z=Q.target;Z&&(P.current?.contains(Z)||D.current?.contains(Z)||E())},G=window.setTimeout(()=>{document.addEventListener("pointerdown",V),window.addEventListener("scroll",E,{passive:!0}),M?.addEventListener("scroll",E,{passive:!0}),document.addEventListener("touchmove",E,{passive:!0})},10);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",V),window.removeEventListener("scroll",E),M?.removeEventListener("scroll",E),document.removeEventListener("touchmove",E)}},[y,x]),O.useEffect(()=>{!x&&N.current!==_&&b(!1),N.current=_},[_,x]),O.useEffect(()=>{h?.(y)},[y,h]);const W=()=>b(M=>!M),T=v===void 0?void 0:typeof v=="number"?`${v}px`:v,B=T?{"--app-shell-sidebar-width":T}:void 0,j=z(we.appShell,S&&we.appShellAnimated,y?we.appShellOpen:we.appShellCollapsed,d),F=z(we.appShellSidebar,y&&we.appShellSidebarOpen,m);return l.jsxs("div",{className:j,style:B,"data-app-shell":!0,"data-desktop":x?"true":"false","data-sidebar-open":y?"true":"false",children:[l.jsx(ea,{className:z(we.appShellTopbar,f),leading:l.jsx("button",{ref:D,type:"button",className:we.appShellHamburger,onClick:W,"aria-label":p,"aria-expanded":y,"aria-controls":k,children:l.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:l.jsx("path",{d:"M3 6h18M3 12h18M3 18h18",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})})}),brand:n,brandHref:o,brandingLocation:u,start:r,actions:s,showThemeToggle:a,themeToggleProps:i}),!x&&y&&l.jsx("div",{className:we.appShellBackdrop,onClick:()=>b(!1),onTouchStart:()=>b(!1),"aria-hidden":"true"}),l.jsx("aside",{ref:P,id:k,className:F,"aria-label":"Sidebar navigation",children:t}),l.jsx("main",{ref:L,className:z(we.appShellMain,g),children:e})]})}const tv="uzi-sidebar-nav-module__sidebarNav__eUI5c",nv="uzi-sidebar-nav-module__sidebarNavCollapsed__xTM9s",ov="uzi-sidebar-nav-module__header__Y4NLy",rv="uzi-sidebar-nav-module__footer__GjWky",sv="uzi-sidebar-nav-module__sections__mXuGQ",iv="uzi-sidebar-nav-module__section__yjtCY",av="uzi-sidebar-nav-module__sectionItems__tNcph",cv="uzi-sidebar-nav-module__sectionLabel__Wx94m",lv="uzi-sidebar-nav-module__item__uMHkJ",uv="uzi-sidebar-nav-module__itemActive__wBbiS",dv="uzi-sidebar-nav-module__itemCollapsed__jLJN-",fv="uzi-sidebar-nav-module__itemDisabled__Yf8Il",pv="uzi-sidebar-nav-module__icon__tyrUg",mv="uzi-sidebar-nav-module__itemBody__wI0iy",hv="uzi-sidebar-nav-module__labelRow__D8sEJ",vv="uzi-sidebar-nav-module__label__A-nt6",gv="uzi-sidebar-nav-module__description__Xf3Si",_v="uzi-sidebar-nav-module__badge__-hnFd",J={sidebarNav:tv,sidebarNavCollapsed:nv,header:ov,footer:rv,sections:sv,section:iv,sectionItems:av,sectionLabel:cv,item:lv,itemActive:uv,itemCollapsed:dv,itemDisabled:fv,icon:pv,itemBody:mv,labelRow:hv,label:vv,description:gv,badge:_v},wv=(e,t)=>e.active!==void 0?e.active:!e.href||!t?!1:e.href==="/"?t==="/":t.startsWith(e.href);function xv({items:e=[],sections:t,currentPath:n,getIsActive:o=wv,onItemClick:r,header:s,footer:a,ariaLabel:i="Sidebar navigation",collapsed:u=!1,iconSize:d,className:m,itemClassName:f,sectionClassName:g}){const v=t?.length?t:[{id:"default",items:e}],_=d!==void 0?{"--sidebar-nav-icon-size":typeof d=="number"?`${d}px`:d}:void 0;return l.jsxs("nav",{className:z(J.sidebarNav,u&&J.sidebarNavCollapsed,m),"aria-label":i,style:_,children:[s?l.jsx("div",{className:J.header,children:s}):null,l.jsx("div",{className:J.sections,children:v.map((p,h)=>l.jsxs("div",{className:z(J.section,g),children:[p.label&&!u?l.jsx("div",{className:J.sectionLabel,children:p.label}):null,l.jsx("div",{className:J.sectionItems,children:p.items.map((x,w)=>l.jsx(yv,{item:x,active:o(x,n),collapsed:u,itemClassName:f,onItemClick:r},`${p.id??h}-${x.href??x.title??w}`))})]},p.id??`section-${h}`))}),a?l.jsx("div",{className:J.footer,children:a}):null]})}function yv({item:e,active:t,collapsed:n,itemClassName:o,onItemClick:r}){const s=e.rel??(e.target==="_blank"?"noreferrer":void 0),a=e.title??(typeof e.label=="string"?e.label:void 0),i=z(J.item,t&&J.itemActive,n&&J.itemCollapsed,e.disabled&&J.itemDisabled,o),u=l.jsxs(l.Fragment,{children:[e.icon&&l.jsx("span",{className:J.icon,children:e.icon}),n?null:l.jsxs("span",{className:J.itemBody,children:[l.jsxs("span",{className:J.labelRow,children:[l.jsx("span",{className:J.label,children:e.label}),e.badge&&l.jsx("span",{className:J.badge,children:e.badge})]}),e.description?l.jsx("span",{className:J.description,children:e.description}):null]})]}),d=()=>{e.disabled||(e.onClick?.(),r?.(e))};return e.href?e.disabled?l.jsx("div",{className:i,"aria-current":t?"page":void 0,"aria-disabled":"true",title:n?a:void 0,children:u}):l.jsx("a",{className:i,href:e.href,target:e.target,rel:s,"aria-current":t?"page":void 0,title:n?a:void 0,onClick:d,children:u}):l.jsx("button",{type:"button",className:i,"aria-current":t?"page":void 0,"aria-disabled":e.disabled?"true":void 0,disabled:e.disabled,title:n?a:void 0,onClick:d,children:u})}const bv="uzi-skeleton-module__skeleton__fula5",er={skeleton:bv,"skeleton-pulse":"uzi-skeleton-module__skeleton-pulse__Yp45W","radius-sm":"uzi-skeleton-module__radius-sm__FdccD","radius-md":"uzi-skeleton-module__radius-md__zH3RE","radius-lg":"uzi-skeleton-module__radius-lg__YVrHw","radius-full":"uzi-skeleton-module__radius-full__5o2m0"};function Sv({width:e,height:t,radius:n="md",className:o,style:r,...s}){return l.jsx("div",{className:z(er.skeleton,er[`radius-${n}`],o),style:{width:e,height:t,...r},"aria-hidden":"true",...s})}const Cv="uzi-progress-module__track__gM0oV",Ev="uzi-progress-module__fill__aLAbp",xn={track:Cv,fill:Ev,"tone-default":"uzi-progress-module__tone-default__fhf7o","tone-success":"uzi-progress-module__tone-success__FsGHD","tone-warning":"uzi-progress-module__tone-warning__UAttL","tone-danger":"uzi-progress-module__tone-danger__-L-Ee"};function Rv({value:e,tone:t="default",className:n,"aria-label":o,...r}){const s=Math.max(0,Math.min(100,e));return l.jsx("div",{className:z(xn.track,n),role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o,...r,children:l.jsx("div",{className:z(xn.fill,xn[`tone-${t}`]),style:{width:`${s}%`}})})}exports.Alert=Jl;exports.AppShell=ev;exports.Avatar=$a;exports.AvatarFallback=Wa;exports.AvatarImage=Ba;exports.Button=sr;exports.Card=Ua;exports.Checkbox=ns;exports.Dropdown=qi;exports.DropdownMenu=rh;exports.DropdownMenuCheckboxItem=fh;exports.DropdownMenuContent=uh;exports.DropdownMenuGroup=ih;exports.DropdownMenuItem=dh;exports.DropdownMenuLabel=mh;exports.DropdownMenuPortal=ah;exports.DropdownMenuRadioGroup=lh;exports.DropdownMenuRadioItem=ph;exports.DropdownMenuSeparator=hh;exports.DropdownMenuSub=ch;exports.DropdownMenuSubContent=gh;exports.DropdownMenuSubTrigger=vh;exports.DropdownMenuTrigger=sh;exports.Input=es;exports.Label=ts;exports.Modal=Kl;exports.ModalOverlay=zr;exports.MultiSelect=Ei;exports.Pill=Xa;exports.Progress=Rv;exports.Select=vo;exports.SidebarNav=xv;exports.Skeleton=Sv;exports.ThemeProvider=Mh;exports.ThemeToggleButton=Qi;exports.ToastProvider=Hu;exports.TopBar=ea;exports.cx=z;exports.useTheme=Ji;exports.useToast=Uu;
46
46
  //# sourceMappingURL=index.cjs.map