randmarcomps 1.52.0 → 1.56.0

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.
@@ -63,6 +63,10 @@ export declare const DialogHeader: {
63
63
  displayName: string;
64
64
  };
65
65
 
66
+ export declare const DialogOverlay: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
67
+
68
+ export declare const DialogPortal: React_2.FC<DialogPrimitive.DialogPortalProps>;
69
+
66
70
  export declare const DialogTitle: React_2.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React_2.RefAttributes<HTMLHeadingElement>, "ref"> & React_2.RefAttributes<HTMLHeadingElement>>;
67
71
 
68
72
  export declare const DialogTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
@@ -7668,7 +7668,8 @@ function rf({ onSignOut: e, searchResultsRouteName: t, rightMenu: n }) {
7668
7668
  onKeyDown: (f) => {
7669
7669
  f.key === "Enter" && d();
7670
7670
  }
7671
- }
7671
+ },
7672
+ "topbar-search"
7672
7673
  )
7673
7674
  ] }) }) }),
7674
7675
  n || /* @__PURE__ */ u(Ae, {}),
@@ -7861,6 +7862,8 @@ export {
7861
7862
  Yo as DialogDescription,
7862
7863
  Uo as DialogFooter,
7863
7864
  Go as DialogHeader,
7865
+ jo as DialogOverlay,
7866
+ vc as DialogPortal,
7864
7867
  Ko as DialogTitle,
7865
7868
  gc as DialogTrigger,
7866
7869
  ar as Input,
@@ -1,4 +1,4 @@
1
- (function(T,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],c):(T=typeof globalThis<"u"?globalThis:T||self,c(T.randmarcomps={},T.jsxRuntime,T.React,T.ReactDOM,T["react-router-dom"]))})(this,function(T,c,X,Dn,mt){"use strict";function _n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=_n(X),ir=_n(Dn);var Rs=Object.defineProperty,zs=Object.defineProperties,Ws=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,Fn=(e,t,r)=>t in e?Rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bs=(e,t)=>{for(var r in t||(t={}))In.call(t,r)&&Fn(e,r,t[r]);if(vt)for(var r of vt(t))Ln.call(t,r)&&Fn(e,r,t[r]);return e},Vs=(e,t)=>zs(e,Ws(t)),Hs=(e,t)=>{var r={};for(var n in e)In.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vt)for(var n of vt(e))t.indexOf(n)<0&&Ln.call(e,n)&&(r[n]=e[n]);return r};function js(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function Gs(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var Us=18,$n=40,Ks=`${$n}px`,Ys=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Xs({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,a]=i.useState(!1),[s,l]=i.useState(!1),[u,d]=i.useState(!1),f=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&o&&s,[o,s,r]),h=i.useCallback(()=>{let v=e.current,m=t.current;if(!v||!m||u||r==="none")return;let y=v,p=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=p-Us,w=g;document.querySelectorAll(Ys).length===0&&document.elementFromPoint(b,w)===v||(a(!0),d(!0))},[e,t,u,r]);return i.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function m(){let p=window.innerWidth-v.getBoundingClientRect().right;l(p>=$n)}m();let y=setInterval(m,1e3);return()=>{clearInterval(y)}},[e,r]),i.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let m=setTimeout(h,0),y=setTimeout(h,2e3),p=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(y),clearTimeout(p),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Ks}}var Rn=i.createContext({}),zn=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:a,textAlign:s="left",pattern:l,placeholder:u,inputMode:d="numeric",onComplete:f,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:m,noScriptCSSFallback:y=qs,render:p,children:g}=r,b=Hs(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,S,E,C;let[N,R]=i.useState(typeof b.defaultValue=="string"?b.defaultValue:""),I=n??N,z=Gs(I),H=i.useCallback(L=>{o==null||o(L),R(L)},[o]),W=i.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),_=i.useRef(null),P=i.useRef(null),B=i.useRef({value:I,onChange:H,isIOS:typeof window<"u"&&((x=(w=window==null?void 0:window.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),M=i.useRef({prev:[(S=_.current)==null?void 0:S.selectionStart,(E=_.current)==null?void 0:E.selectionEnd,(C=_.current)==null?void 0:C.selectionDirection]});i.useImperativeHandle(t,()=>_.current,[]),i.useEffect(()=>{let L=_.current,$=P.current;if(!L||!$)return;B.current.value!==L.value&&B.current.onChange(L.value),M.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function Q(){if(document.activeElement!==L){re(null),te(null);return}let G=L.selectionStart,le=L.selectionEnd,sr=L.selectionDirection,me=L.maxLength,Be=L.value,Ee=M.current.prev,De=-1,_e=-1,Ve;if(Be.length!==0&&G!==null&&le!==null){let Ku=G===le,Yu=G===Be.length&&Be.length<me;if(Ku&&!Yu){let He=G;if(He===0)De=0,_e=1,Ve="forward";else if(He===me)De=He-1,_e=He,Ve="backward";else if(me>1&&Be.length>1){let kn=0;if(Ee[0]!==null&&Ee[1]!==null){Ve=He<Ee[1]?"backward":"forward";let Xu=Ee[0]===Ee[1]&&Ee[0]<me;Ve==="backward"&&!Xu&&(kn=-1)}De=kn+He,_e=kn+He+1}}De!==-1&&_e!==-1&&De!==_e&&_.current.setSelectionRange(De,_e,Ve)}let Fs=De!==-1?De:G,$s=_e!==-1?_e:le,Uu=Ve??sr;re(Fs),te($s),M.current.prev=[Fs,$s,Uu]}if(document.addEventListener("selectionchange",Q,{capture:!0}),Q(),document.activeElement===L&&Y(!0),!document.getElementById("input-otp-style")){let G=document.createElement("style");if(G.id="input-otp-style",document.head.appendChild(G),G.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";st(G.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),st(G.sheet,`[data-input-otp]:autofill { ${le} }`),st(G.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),st(G.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),st(G.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ne=()=>{$&&$.style.setProperty("--root-height",`${L.clientHeight}px`)};ne();let oe=new ResizeObserver(ne);return oe.observe(L),()=>{document.removeEventListener("selectionchange",Q,{capture:!0}),oe.disconnect()}},[]);let[j,k]=i.useState(!1),[F,Y]=i.useState(!1),[Z,re]=i.useState(null),[J,te]=i.useState(null);i.useEffect(()=>{js(()=>{var L,$,Q,ne;(L=_.current)==null||L.dispatchEvent(new Event("input"));let oe=($=_.current)==null?void 0:$.selectionStart,G=(Q=_.current)==null?void 0:Q.selectionEnd,le=(ne=_.current)==null?void 0:ne.selectionDirection;oe!==null&&G!==null&&(re(oe),te(G),M.current.prev=[oe,G,le])})},[I,F]),i.useEffect(()=>{z!==void 0&&I!==z&&z.length<a&&I.length===a&&(f==null||f(I))},[a,f,z,I]);let ie=Xs({containerRef:P,inputRef:_,pushPasswordManagerStrategy:h,isFocused:F}),ke=i.useCallback(L=>{let $=L.currentTarget.value.slice(0,a);if($.length>0&&W&&!W.test($)){L.preventDefault();return}typeof z=="string"&&$.length<z.length&&document.dispatchEvent(new Event("selectionchange")),H($)},[a,H,z,W]),xe=i.useCallback(()=>{var L;if(_.current){let $=Math.min(_.current.value.length,a-1),Q=_.current.value.length;(L=_.current)==null||L.setSelectionRange($,Q),re($),te(Q)}Y(!0)},[a]),ht=i.useCallback(L=>{var $,Q;let ne=_.current;if(!v&&(!B.current.isIOS||!L.clipboardData||!ne))return;let oe=L.clipboardData.getData("text/plain"),G=v?v(oe):oe;L.preventDefault();let le=($=_.current)==null?void 0:$.selectionStart,sr=(Q=_.current)==null?void 0:Q.selectionEnd,me=(le!==sr?I.slice(0,le)+G+I.slice(sr):I.slice(0,le)+G+I.slice(le)).slice(0,a);if(me.length>0&&W&&!W.test(me))return;ne.value=me,H(me);let Be=Math.min(me.length,a-1),Ee=me.length;ne.setSelectionRange(Be,Ee),re(Be),te(Ee)},[a,H,W,I]),or=i.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),gt=i.useMemo(()=>({position:"absolute",inset:0,width:ie.willPushPWMBadge?`calc(100% + ${ie.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ie.willPushPWMBadge?`inset(0 ${ie.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ie.PWM_BADGE_SPACE_WIDTH,ie.willPushPWMBadge,s]),ar=i.useMemo(()=>i.createElement("input",Vs(Bs({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":Z,"data-input-otp-mse":J,inputMode:d,pattern:W==null?void 0:W.source,"aria-placeholder":u,style:gt,maxLength:a,value:I,ref:_,onPaste:L=>{var $;ht(L),($=b.onPaste)==null||$.call(b,L)},onChange:ke,onMouseOver:L=>{var $;k(!0),($=b.onMouseOver)==null||$.call(b,L)},onMouseLeave:L=>{var $;k(!1),($=b.onMouseLeave)==null||$.call(b,L)},onFocus:L=>{var $;xe(),($=b.onFocus)==null||$.call(b,L)},onBlur:L=>{var $;Y(!1),($=b.onBlur)==null||$.call(b,L)}})),[ke,xe,ht,d,gt,a,J,Z,b,W==null?void 0:W.source,I]),at=i.useMemo(()=>({slots:Array.from({length:a}).map((L,$)=>{var Q;let ne=F&&Z!==null&&J!==null&&(Z===J&&$===Z||$>=Z&&$<J),oe=I[$]!==void 0?I[$]:null,G=I[0]!==void 0?null:(Q=u==null?void 0:u[$])!=null?Q:null;return{char:oe,placeholderChar:G,isActive:ne,hasFakeCaret:ne&&oe===null}}),isFocused:F,isHovering:!b.disabled&&j}),[F,j,a,J,Z,b.disabled,I]),We=i.useMemo(()=>p?p(at):i.createElement(Rn.Provider,{value:at},g),[g,at,p]);return i.createElement(i.Fragment,null,y!==null&&i.createElement("noscript",null,i.createElement("style",null,y)),i.createElement("div",{ref:P,"data-input-otp-container":!0,style:or,className:m},We,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ar)))});zn.displayName="Input";function st(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var qs=`
1
+ (function(T,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],c):(T=typeof globalThis<"u"?globalThis:T||self,c(T.randmarcomps={},T.jsxRuntime,T.React,T.ReactDOM,T["react-router-dom"]))})(this,function(T,c,X,_n,mt){"use strict";function In(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=In(X),ir=In(_n);var zs=Object.defineProperty,Ws=Object.defineProperties,Bs=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Fn=Object.prototype.propertyIsEnumerable,$n=(e,t,r)=>t in e?zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vs=(e,t)=>{for(var r in t||(t={}))Ln.call(t,r)&&$n(e,r,t[r]);if(vt)for(var r of vt(t))Fn.call(t,r)&&$n(e,r,t[r]);return e},Hs=(e,t)=>Ws(e,Bs(t)),js=(e,t)=>{var r={};for(var n in e)Ln.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vt)for(var n of vt(e))t.indexOf(n)<0&&Fn.call(e,n)&&(r[n]=e[n]);return r};function Gs(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function Us(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var Ks=18,Rn=40,Ys=`${Rn}px`,Xs=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function qs({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,a]=i.useState(!1),[s,l]=i.useState(!1),[u,d]=i.useState(!1),f=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&o&&s,[o,s,r]),h=i.useCallback(()=>{let v=e.current,m=t.current;if(!v||!m||u||r==="none")return;let y=v,p=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=p-Ks,w=g;document.querySelectorAll(Xs).length===0&&document.elementFromPoint(b,w)===v||(a(!0),d(!0))},[e,t,u,r]);return i.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function m(){let p=window.innerWidth-v.getBoundingClientRect().right;l(p>=Rn)}m();let y=setInterval(m,1e3);return()=>{clearInterval(y)}},[e,r]),i.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let m=setTimeout(h,0),y=setTimeout(h,2e3),p=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(y),clearTimeout(p),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:Ys}}var zn=i.createContext({}),Wn=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:a,textAlign:s="left",pattern:l,placeholder:u,inputMode:d="numeric",onComplete:f,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:m,noScriptCSSFallback:y=Zs,render:p,children:g}=r,b=js(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,S,E,C;let[N,R]=i.useState(typeof b.defaultValue=="string"?b.defaultValue:""),I=n??N,z=Us(I),H=i.useCallback(L=>{o==null||o(L),R(L)},[o]),W=i.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),_=i.useRef(null),P=i.useRef(null),B=i.useRef({value:I,onChange:H,isIOS:typeof window<"u"&&((x=(w=window==null?void 0:window.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),M=i.useRef({prev:[(S=_.current)==null?void 0:S.selectionStart,(E=_.current)==null?void 0:E.selectionEnd,(C=_.current)==null?void 0:C.selectionDirection]});i.useImperativeHandle(t,()=>_.current,[]),i.useEffect(()=>{let L=_.current,$=P.current;if(!L||!$)return;B.current.value!==L.value&&B.current.onChange(L.value),M.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function Q(){if(document.activeElement!==L){re(null),te(null);return}let G=L.selectionStart,le=L.selectionEnd,sr=L.selectionDirection,me=L.maxLength,Be=L.value,Ee=M.current.prev,De=-1,_e=-1,Ve;if(Be.length!==0&&G!==null&&le!==null){let Ku=G===le,Yu=G===Be.length&&Be.length<me;if(Ku&&!Yu){let He=G;if(He===0)De=0,_e=1,Ve="forward";else if(He===me)De=He-1,_e=He,Ve="backward";else if(me>1&&Be.length>1){let Dn=0;if(Ee[0]!==null&&Ee[1]!==null){Ve=He<Ee[1]?"backward":"forward";let Xu=Ee[0]===Ee[1]&&Ee[0]<me;Ve==="backward"&&!Xu&&(Dn=-1)}De=Dn+He,_e=Dn+He+1}}De!==-1&&_e!==-1&&De!==_e&&_.current.setSelectionRange(De,_e,Ve)}let $s=De!==-1?De:G,Rs=_e!==-1?_e:le,Uu=Ve??sr;re($s),te(Rs),M.current.prev=[$s,Rs,Uu]}if(document.addEventListener("selectionchange",Q,{capture:!0}),Q(),document.activeElement===L&&Y(!0),!document.getElementById("input-otp-style")){let G=document.createElement("style");if(G.id="input-otp-style",document.head.appendChild(G),G.sheet){let le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";st(G.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),st(G.sheet,`[data-input-otp]:autofill { ${le} }`),st(G.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),st(G.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),st(G.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ne=()=>{$&&$.style.setProperty("--root-height",`${L.clientHeight}px`)};ne();let oe=new ResizeObserver(ne);return oe.observe(L),()=>{document.removeEventListener("selectionchange",Q,{capture:!0}),oe.disconnect()}},[]);let[j,k]=i.useState(!1),[F,Y]=i.useState(!1),[Z,re]=i.useState(null),[J,te]=i.useState(null);i.useEffect(()=>{Gs(()=>{var L,$,Q,ne;(L=_.current)==null||L.dispatchEvent(new Event("input"));let oe=($=_.current)==null?void 0:$.selectionStart,G=(Q=_.current)==null?void 0:Q.selectionEnd,le=(ne=_.current)==null?void 0:ne.selectionDirection;oe!==null&&G!==null&&(re(oe),te(G),M.current.prev=[oe,G,le])})},[I,F]),i.useEffect(()=>{z!==void 0&&I!==z&&z.length<a&&I.length===a&&(f==null||f(I))},[a,f,z,I]);let ie=qs({containerRef:P,inputRef:_,pushPasswordManagerStrategy:h,isFocused:F}),ke=i.useCallback(L=>{let $=L.currentTarget.value.slice(0,a);if($.length>0&&W&&!W.test($)){L.preventDefault();return}typeof z=="string"&&$.length<z.length&&document.dispatchEvent(new Event("selectionchange")),H($)},[a,H,z,W]),xe=i.useCallback(()=>{var L;if(_.current){let $=Math.min(_.current.value.length,a-1),Q=_.current.value.length;(L=_.current)==null||L.setSelectionRange($,Q),re($),te(Q)}Y(!0)},[a]),ht=i.useCallback(L=>{var $,Q;let ne=_.current;if(!v&&(!B.current.isIOS||!L.clipboardData||!ne))return;let oe=L.clipboardData.getData("text/plain"),G=v?v(oe):oe;L.preventDefault();let le=($=_.current)==null?void 0:$.selectionStart,sr=(Q=_.current)==null?void 0:Q.selectionEnd,me=(le!==sr?I.slice(0,le)+G+I.slice(sr):I.slice(0,le)+G+I.slice(le)).slice(0,a);if(me.length>0&&W&&!W.test(me))return;ne.value=me,H(me);let Be=Math.min(me.length,a-1),Ee=me.length;ne.setSelectionRange(Be,Ee),re(Be),te(Ee)},[a,H,W,I]),or=i.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),gt=i.useMemo(()=>({position:"absolute",inset:0,width:ie.willPushPWMBadge?`calc(100% + ${ie.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:ie.willPushPWMBadge?`inset(0 ${ie.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[ie.PWM_BADGE_SPACE_WIDTH,ie.willPushPWMBadge,s]),ar=i.useMemo(()=>i.createElement("input",Hs(Vs({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":Z,"data-input-otp-mse":J,inputMode:d,pattern:W==null?void 0:W.source,"aria-placeholder":u,style:gt,maxLength:a,value:I,ref:_,onPaste:L=>{var $;ht(L),($=b.onPaste)==null||$.call(b,L)},onChange:ke,onMouseOver:L=>{var $;k(!0),($=b.onMouseOver)==null||$.call(b,L)},onMouseLeave:L=>{var $;k(!1),($=b.onMouseLeave)==null||$.call(b,L)},onFocus:L=>{var $;xe(),($=b.onFocus)==null||$.call(b,L)},onBlur:L=>{var $;Y(!1),($=b.onBlur)==null||$.call(b,L)}})),[ke,xe,ht,d,gt,a,J,Z,b,W==null?void 0:W.source,I]),at=i.useMemo(()=>({slots:Array.from({length:a}).map((L,$)=>{var Q;let ne=F&&Z!==null&&J!==null&&(Z===J&&$===Z||$>=Z&&$<J),oe=I[$]!==void 0?I[$]:null,G=I[0]!==void 0?null:(Q=u==null?void 0:u[$])!=null?Q:null;return{char:oe,placeholderChar:G,isActive:ne,hasFakeCaret:ne&&oe===null}}),isFocused:F,isHovering:!b.disabled&&j}),[F,j,a,J,Z,b.disabled,I]),We=i.useMemo(()=>p?p(at):i.createElement(zn.Provider,{value:at},g),[g,at,p]);return i.createElement(i.Fragment,null,y!==null&&i.createElement("noscript",null,i.createElement("style",null,y)),i.createElement("div",{ref:P,"data-input-otp-container":!0,style:or,className:m},We,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},ar)))});Wn.displayName="Input";function st(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Zs=`
2
2
  [data-input-otp] {
3
3
  --nojs-bg: white !important;
4
4
  --nojs-fg: black !important;
@@ -22,78 +22,78 @@
22
22
  *
23
23
  * This source code is licensed under the ISC license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
- */const Zs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wn=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
25
+ */const Qs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bn=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
26
26
  * @license lucide-react v0.479.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */var Qs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
30
+ */var Js={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
31
31
  * @license lucide-react v0.479.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */const Js=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...l},u)=>X.createElement("svg",{ref:u,...Qs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Wn("lucide",o),...l},[...s.map(([d,f])=>X.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
35
+ */const ei=X.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...l},u)=>X.createElement("svg",{ref:u,...Js,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Bn("lucide",o),...l},[...s.map(([d,f])=>X.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
36
36
  * @license lucide-react v0.479.0 - ISC
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const de=(e,t)=>{const r=X.forwardRef(({className:n,...o},a)=>X.createElement(Js,{ref:a,iconNode:t,className:Wn(`lucide-${Zs(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
40
+ */const de=(e,t)=>{const r=X.forwardRef(({className:n,...o},a)=>X.createElement(ei,{ref:a,iconNode:t,className:Bn(`lucide-${Qs(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.479.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const ei=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
45
+ */const ti=de("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
46
46
  * @license lucide-react v0.479.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const ti=de("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
50
+ */const ri=de("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
51
51
  * @license lucide-react v0.479.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const ri=de("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
55
+ */const ni=de("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
56
56
  * @license lucide-react v0.479.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const ni=de("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
60
+ */const oi=de("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
61
61
  * @license lucide-react v0.479.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const oi=de("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
65
+ */const ai=de("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
66
66
  * @license lucide-react v0.479.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const ai=de("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
70
+ */const si=de("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
71
71
  * @license lucide-react v0.479.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const si=de("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
75
+ */const ii=de("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
76
76
  * @license lucide-react v0.479.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const ii=de("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
80
+ */const li=de("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
81
81
  * @license lucide-react v0.479.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const li=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
85
+ */const ci=de("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
86
86
  * @license lucide-react v0.479.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const ci=de("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
90
+ */const di=de("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
91
91
  * @license lucide-react v0.479.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const lr=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Bn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Bn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Bn(e))&&(n&&(n+=" "),n+=t);return n}const cr="-",di=e=>{const t=fi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(cr);return l[0]===""&&l.length!==1&&l.shift(),Hn(l,t)||ui(s)},getConflictingClassGroupIds:(s,l)=>{const u=r[s]||[];return l&&n[s]?[...u,...n[s]]:u}}},Hn=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Hn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(cr);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},jn=/^\[(.+)\]$/,ui=e=>{if(jn.test(e)){const t=jn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},fi=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)dr(r[o],n,o,t);return n},dr=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Gn(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(pi(o)){dr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{dr(s,Gn(t,a),r,n)})})},Gn=(e,t)=>{let r=e;return t.split(cr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},pi=e=>e.isThemeGetter,hi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}},ur="!",fr=":",gi=fr.length,mi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let s=0,l=0,u=0,d;for(let y=0;y<o.length;y++){let p=o[y];if(s===0&&l===0){if(p===fr){a.push(o.slice(u,y)),u=y+gi;continue}if(p==="/"){d=y;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}const f=a.length===0?o:o.substring(u),h=vi(f),v=h!==f,m=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+fr,a=n;n=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},vi=e=>e.endsWith(ur)?e.substring(0,e.length-1):e.startsWith(ur)?e.substring(1):e,bi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},yi=e=>({cache:hi(e.cacheSize),parseClassName:mi(e),sortModifiers:bi(e),...di(e)}),wi=/\s+/,xi=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(wi);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:h,modifiers:v,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}=r(f);if(h){u=f+(u.length>0?" "+u:u);continue}let g=!!p,b=n(g?y.substring(0,p):y);if(!b){if(!g){u=f+(u.length>0?" "+u:u);continue}if(b=n(y),!b){u=f+(u.length>0?" "+u:u);continue}g=!1}const w=a(v).join(":"),x=m?w+ur:w,S=x+b;if(s.includes(S))continue;s.push(S);const E=o(b,g);for(let C=0;C<E.length;++C){const N=E[C];s.push(x+N)}u=f+(u.length>0?" "+u:u)}return u};function Si(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Un(t))&&(n&&(n+=" "),n+=r);return n}const Un=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Un(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ci(e,...t){let r,n,o,a=s;function s(u){const d=t.reduce((f,h)=>h(f),e());return r=yi(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=xi(u,r);return o(u,f),f}return function(){return a(Si.apply(null,arguments))}}const q=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Kn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ei=/^\d+\/\d+$/,Ti=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ni=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Pi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ai=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ei.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),Xn=e=>e.endsWith("%")&&V(e.slice(0,-1)),Te=e=>Ti.test(e),Mi=()=>!0,ki=e=>Ni.test(e)&&!Pi.test(e),pr=()=>!1,Di=e=>Ai.test(e),_i=e=>Oi.test(e),Ii=e=>!A(e)&&!O(e),Li=e=>Ge(e,Qn,pr),A=e=>Kn.test(e),Le=e=>Ge(e,Jn,ki),hr=e=>Ge(e,Ui,V),Fi=e=>Ge(e,qn,pr),$i=e=>Ge(e,Zn,_i),Ri=e=>Ge(e,pr,Di),O=e=>Yn.test(e),bt=e=>Ue(e,Jn),zi=e=>Ue(e,Ki),Wi=e=>Ue(e,qn),Bi=e=>Ue(e,Qn),Vi=e=>Ue(e,Zn),Hi=e=>Ue(e,Yi,!0),Ge=(e,t,r)=>{const n=Kn.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ue=(e,t,r=!1)=>{const n=Yn.exec(e);return n?n[1]?t(n[1]):r:!1},qn=e=>e==="position",ji=new Set(["image","url"]),Zn=e=>ji.has(e),Gi=new Set(["length","size","percentage"]),Qn=e=>Gi.has(e),Jn=e=>e==="length",Ui=e=>e==="number",Ki=e=>e==="family-name",Yi=e=>e==="shadow",Xi=Ci(()=>{const e=q("color"),t=q("font"),r=q("text"),n=q("font-weight"),o=q("tracking"),a=q("leading"),s=q("breakpoint"),l=q("container"),u=q("spacing"),d=q("radius"),f=q("shadow"),h=q("inset-shadow"),v=q("drop-shadow"),m=q("blur"),y=q("perspective"),p=q("aspect"),g=q("ease"),b=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],C=()=>[O,A,u],N=()=>[je,"full","auto",...C()],R=()=>[Ie,"none","subgrid",O,A],I=()=>["auto",{span:["full",Ie,O,A]},O,A],z=()=>[Ie,"auto",O,A],H=()=>["auto","min","max","fr",O,A],W=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...C()],B=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],M=()=>[e,O,A],j=()=>[Xn,Le],k=()=>["","none","full",d,O,A],F=()=>["",V,bt,Le],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["","none",m,O,A],J=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O,A],te=()=>["none",V,O,A],ie=()=>["none",V,O,A],ke=()=>[V,O,A],xe=()=>[je,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Te],breakpoint:[Te],color:[Mi],container:[Te],"drop-shadow":[Te],ease:["in","out","in-out"],font:[Ii],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Te],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Te],shadow:[Te],spacing:["px",V],text:[Te],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,A,O,p]}],container:["container"],columns:[{columns:[V,A,O,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),A,O]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",O,A]}],basis:[{basis:[je,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,je,"auto","initial","none",A]}],grow:[{grow:["",V,O,A]}],shrink:[{shrink:["",V,O,A]}],order:[{order:[Ie,"first","last","none",O,A]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,bt,Le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,hr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xn,A]}],"font-family":[{font:[zi,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,A]}],"line-clamp":[{"line-clamp":[V,"none",O,hr]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",O,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",O,Le]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[V,"auto",O,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Wi,Fi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Bi,Li]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,O,A],radial:["",O,A],conic:[Ie,O,A]},Vi,$i]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,O,A]}],"outline-w":[{outline:["",V,bt,Le]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,Hi,Ri]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",O,A,h]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[V,Le]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[V,O,A]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none",O,A]}],blur:[{blur:re()}],brightness:[{brightness:[V,O,A]}],contrast:[{contrast:[V,O,A]}],"drop-shadow":[{"drop-shadow":["","none",v,O,A]}],grayscale:[{grayscale:["",V,O,A]}],"hue-rotate":[{"hue-rotate":[V,O,A]}],invert:[{invert:["",V,O,A]}],saturate:[{saturate:[V,O,A]}],sepia:[{sepia:["",V,O,A]}],"backdrop-filter":[{"backdrop-filter":["","none",O,A]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[V,O,A]}],"backdrop-contrast":[{"backdrop-contrast":[V,O,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,O,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,O,A]}],"backdrop-invert":[{"backdrop-invert":["",V,O,A]}],"backdrop-opacity":[{"backdrop-opacity":[V,O,A]}],"backdrop-saturate":[{"backdrop-saturate":[V,O,A]}],"backdrop-sepia":[{"backdrop-sepia":["",V,O,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",O,A]}],ease:[{ease:["linear","initial",g,O,A]}],delay:[{delay:[V,O,A]}],animate:[{animate:["none",b,O,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,O,A]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[O,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[V,bt,Le,hr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function D(...e){return Xi(Vn(e))}function qi({className:e,containerClassName:t,...r}){return c.jsx(zn,{"data-slot":"input-otp",containerClassName:D("flex items-center gap-2 has-disabled:opacity-50",t),className:D("disabled:cursor-not-allowed",e),...r})}function Zi({className:e,...t}){return c.jsx("div",{"data-slot":"input-otp-group",className:D("flex items-center",e),...t})}function Qi({index:e,className:t,...r}){const n=i.useContext(Rn),{char:o,hasFakeCaret:a,isActive:s}=(n==null?void 0:n.slots[e])??{};return c.jsxs("div",{"data-slot":"input-otp-slot","data-active":s,className:D("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[o,a&&c.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:c.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Ji({...e}){return c.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:c.jsx(ai,{})})}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function eo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function to(...e){return t=>{let r=!1;const n=e.map(o=>{const a=eo(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():eo(e[o],null)}}}}function ee(...e){return i.useCallback(to(...e),e)}function el(e,t){const r=i.createContext(t),n=a=>{const{children:s,...l}=a,u=i.useMemo(()=>l,Object.values(l));return c.jsx(r.Provider,{value:u,children:s})};n.displayName=e+"Provider";function o(a){const s=i.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function it(e,t=[]){let r=[];function n(a,s){const l=i.createContext(s),u=r.length;r=[...r,s];const d=h=>{var b;const{scope:v,children:m,...y}=h,p=((b=v==null?void 0:v[e])==null?void 0:b[u])||l,g=i.useMemo(()=>y,Object.values(y));return c.jsx(p.Provider,{value:g,children:m})};d.displayName=a+"Provider";function f(h,v){var p;const m=((p=v==null?void 0:v[e])==null?void 0:p[u])||l,y=i.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(s=>i.createContext(s));return function(l){const u=(l==null?void 0:l[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,tl(o,...t)]}function tl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((l,{useScope:u,scopeName:d})=>{const h=u(a)[`__scope${d}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ne=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},rl=i.useId||(()=>{}),nl=0;function yt(e){const[t,r]=i.useState(rl());return Ne(()=>{r(n=>n??String(nl++))},[e]),e||(t?`radix-${t}`:"")}function ce(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=ol({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,l=ce(r),u=i.useCallback(d=>{if(a){const h=typeof d=="function"?d(e):d;h!==e&&l(h)}else o(d)},[a,e,o,l]);return[s,u]}function ol({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,o=i.useRef(n),a=ce(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var ue=i.forwardRef((e,t)=>{const{children:r,...n}=e,o=i.Children.toArray(r),a=o.find(al);if(a){const s=a.props.children,l=o.map(u=>u===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:u);return c.jsx(mr,{...n,ref:t,children:i.isValidElement(s)?i.cloneElement(s,void 0,l):null})}return c.jsx(mr,{...n,ref:t,children:r})});ue.displayName="Slot";var mr=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const o=il(r),a=sl(n,r.props);return r.type!==i.Fragment&&(a.ref=t?to(t,o):o),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});mr.displayName="SlotClone";var ro=({children:e})=>c.jsx(c.Fragment,{children:e});function al(e){return i.isValidElement(e)&&e.type===ro}function sl(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function il(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ll=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=ll.reduce((e,t)=>{const r=i.forwardRef((n,o)=>{const{asChild:a,...s}=n,l=a?ue:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function no(e,t){e&&ir.flushSync(()=>e.dispatchEvent(t))}function cl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e);i.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var dl="DismissableLayer",vr="dismissableLayer.update",ul="dismissableLayer.pointerDownOutside",fl="dismissableLayer.focusOutside",oo,ao=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=i.useContext(ao),[f,h]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),y=ee(t,N=>h(N)),p=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=f?p.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,E=hl(N=>{const R=N.target,I=[...d.branches].some(z=>z.contains(R));!S||I||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},v),C=gl(N=>{const R=N.target;[...d.branches].some(z=>z.contains(R))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},v);return cl(N=>{w===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},v),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(oo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),io(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=oo)}},[f,v,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),io())},[f,d]),i.useEffect(()=>{const N=()=>m({});return document.addEventListener(vr,N),()=>document.removeEventListener(vr,N)},[]),c.jsx(K.div,{...u,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,C.onFocusCapture),onBlurCapture:U(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,E.onPointerDownCapture)})});wt.displayName=dl;var pl="DismissableLayerBranch",so=i.forwardRef((e,t)=>{const r=i.useContext(ao),n=i.useRef(null),o=ee(t,n);return i.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),c.jsx(K.div,{...e,ref:o})});so.displayName=pl;function hl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){lo(ul,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function gl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!n.current&&lo(fl,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function io(){const e=new CustomEvent(vr);document.dispatchEvent(e)}function lo(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?no(o,a):o.dispatchEvent(a)}var ml=wt,vl=so,br="focusScope.autoFocusOnMount",yr="focusScope.autoFocusOnUnmount",co={bubbles:!1,cancelable:!0},bl="FocusScope",uo=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,u]=i.useState(null),d=ce(o),f=ce(a),h=i.useRef(null),v=ee(t,p=>u(p)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let p=function(x){if(m.paused||!l)return;const S=x.target;l.contains(S)?h.current=S:Pe(h.current,{select:!0})},g=function(x){if(m.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||Pe(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Pe(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),w.disconnect()}}},[n,l,m.paused]),i.useEffect(()=>{if(l){ho.add(m);const p=document.activeElement;if(!l.contains(p)){const b=new CustomEvent(br,co);l.addEventListener(br,d),l.dispatchEvent(b),b.defaultPrevented||(yl(El(fo(l)),{select:!0}),document.activeElement===p&&Pe(l))}return()=>{l.removeEventListener(br,d),setTimeout(()=>{const b=new CustomEvent(yr,co);l.addEventListener(yr,f),l.dispatchEvent(b),b.defaultPrevented||Pe(p??document.body,{select:!0}),l.removeEventListener(yr,f),ho.remove(m)},0)}}},[l,d,f,m]);const y=i.useCallback(p=>{if(!r&&!n||m.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const w=p.currentTarget,[x,S]=wl(w);x&&S?!p.shiftKey&&b===S?(p.preventDefault(),r&&Pe(x,{select:!0})):p.shiftKey&&b===x&&(p.preventDefault(),r&&Pe(S,{select:!0})):b===w&&p.preventDefault()}},[r,n,m.paused]);return c.jsx(K.div,{tabIndex:-1,...s,ref:v,onKeyDown:y})});uo.displayName=bl;function yl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Pe(n,{select:t}),document.activeElement!==r)return}function wl(e){const t=fo(e),r=po(t,e),n=po(t.reverse(),e);return[r,n]}function fo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function po(e,t){for(const r of e)if(!xl(r,{upTo:t}))return r}function xl(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 Sl(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sl(e)&&t&&e.select()}}var ho=Cl();function Cl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=go(e,t),e.unshift(t)},remove(t){var r;e=go(e,t),(r=e[0])==null||r.resume()}}}function go(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function El(e){return e.filter(t=>t.tagName!=="A")}var Tl="Portal",xt=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=i.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Dn.createPortal(c.jsx(K.div,{...n,ref:t}),s):null});xt.displayName=Tl;function Nl(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Fe=e=>{const{present:t,children:r}=e,n=Pl(t),o=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),a=ee(n.ref,Al(o));return typeof r=="function"||n.isPresent?i.cloneElement(o,{ref:a}):null};Fe.displayName="Presence";function Pl(e){const[t,r]=i.useState(),n=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,u]=Nl(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=St(n.current);a.current=l==="mounted"?d:"none"},[l]),Ne(()=>{const d=n.current,f=o.current;if(f!==e){const v=a.current,m=St(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ne(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=m=>{const p=St(n.current).includes(m.animationName);if(m.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(a.current=St(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function St(e){return(e==null?void 0:e.animationName)||"none"}function Al(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var wr=0;function Ol(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mo()),document.body.insertAdjacentElement("beforeend",e[1]??mo()),wr++,()=>{wr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wr--}},[])}function mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ve=function(){return ve=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ve.apply(this,arguments)};function vo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ml(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ct="right-scroll-bar-position",Et="width-before-scroll-bar",kl="with-scroll-bars-hidden",Dl="--removed-body-scroll-bar-size";function xr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _l(e,t){var r=X.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Il=typeof window<"u"?i.useLayoutEffect:i.useEffect,bo=new WeakMap;function Ll(e,t){var r=_l(null,function(n){return e.forEach(function(o){return xr(o,n)})});return Il(function(){var n=bo.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(l){a.has(l)||xr(l,null)}),a.forEach(function(l){o.has(l)||xr(l,s)})}bo.set(r,e)},[e]),r}function Fl(e){return e}function $l(e,t){t===void 0&&(t=Fl);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var l=r;r=[],l.forEach(a),s=r}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),r}}}};return o}function Rl(e){e===void 0&&(e={});var t=$l(null);return t.options=ve({async:!0,ssr:!1},e),t}var yo=function(e){var t=e.sideCar,r=vo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,ve({},r))};yo.isSideCarExport=!0;function zl(e,t){return e.useMedium(t),yo}var wo=Rl(),Sr=function(){},Tt=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:Sr,onWheelCapture:Sr,onTouchMoveCapture:Sr}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=vo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=v,E=Ll([r,t]),C=ve(ve({},x),o);return i.createElement(i.Fragment,null,f&&i.createElement(S,{sideCar:wo,removeScrollBar:d,shards:h,noIsolation:m,inert:y,setCallbacks:a,allowPinchZoom:!!p,lockRef:r,gapMode:w}),s?i.cloneElement(i.Children.only(l),ve(ve({},C),{ref:E})):i.createElement(b,ve({},C,{className:u,ref:E}),l))});Tt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tt.classNames={fullWidth:Et,zeroRight:Ct};var Wl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Bl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wl();return t&&e.setAttribute("nonce",t),e}function Vl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var jl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Bl())&&(Vl(t,r),Hl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gl=function(){var e=jl();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},xo=function(){var e=Gl(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Ul={left:0,top:0,right:0,gap:0},Cr=function(e){return parseInt(e||"",10)||0},Kl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Cr(r),Cr(n),Cr(o)]},Yl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ul;var t=Kl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Xl=xo(),Ke="data-scroll-locked",ql=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
96
- .`.concat(kl,` {
95
+ */const lr=de("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Vn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Vn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Hn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vn(e))&&(n&&(n+=" "),n+=t);return n}const cr="-",ui=e=>{const t=pi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const l=s.split(cr);return l[0]===""&&l.length!==1&&l.shift(),jn(l,t)||fi(s)},getConflictingClassGroupIds:(s,l)=>{const u=r[s]||[];return l&&n[s]?[...u,...n[s]]:u}}},jn=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?jn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(cr);return(s=t.validators.find(({validator:l})=>l(a)))==null?void 0:s.classGroupId},Gn=/^\[(.+)\]$/,fi=e=>{if(Gn.test(e)){const t=Gn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},pi=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)dr(r[o],n,o,t);return n},dr=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Un(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(hi(o)){dr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,s])=>{dr(s,Un(t,a),r,n)})})},Un=(e,t)=>{let r=e;return t.split(cr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},hi=e=>e.isThemeGetter,gi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(a,s)=>{r.set(a,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set(a,s){r.has(a)?r.set(a,s):o(a,s)}}},ur="!",fr=":",mi=fr.length,vi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let s=0,l=0,u=0,d;for(let y=0;y<o.length;y++){let p=o[y];if(s===0&&l===0){if(p===fr){a.push(o.slice(u,y)),u=y+mi;continue}if(p==="/"){d=y;continue}}p==="["?s++:p==="]"?s--:p==="("?l++:p===")"&&l--}const f=a.length===0?o:o.substring(u),h=bi(f),v=h!==f,m=d&&d>u?d-u:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+fr,a=n;n=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},bi=e=>e.endsWith(ur)?e.substring(0,e.length-1):e.startsWith(ur)?e.substring(1):e,yi=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let a=[];return n.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},wi=e=>({cache:gi(e.cacheSize),parseClassName:vi(e),sortModifiers:yi(e),...ui(e)}),xi=/\s+/,Si=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],l=e.trim().split(xi);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:h,modifiers:v,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}=r(f);if(h){u=f+(u.length>0?" "+u:u);continue}let g=!!p,b=n(g?y.substring(0,p):y);if(!b){if(!g){u=f+(u.length>0?" "+u:u);continue}if(b=n(y),!b){u=f+(u.length>0?" "+u:u);continue}g=!1}const w=a(v).join(":"),x=m?w+ur:w,S=x+b;if(s.includes(S))continue;s.push(S);const E=o(b,g);for(let C=0;C<E.length;++C){const N=E[C];s.push(x+N)}u=f+(u.length>0?" "+u:u)}return u};function Ci(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Kn(t))&&(n&&(n+=" "),n+=r);return n}const Kn=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Kn(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ei(e,...t){let r,n,o,a=s;function s(u){const d=t.reduce((f,h)=>h(f),e());return r=wi(d),n=r.cache.get,o=r.cache.set,a=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=Si(u,r);return o(u,f),f}return function(){return a(Ci.apply(null,arguments))}}const q=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Yn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ti=/^\d+\/\d+$/,Ni=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ai=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Oi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,je=e=>Ti.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),qn=e=>e.endsWith("%")&&V(e.slice(0,-1)),Te=e=>Ni.test(e),ki=()=>!0,Di=e=>Pi.test(e)&&!Ai.test(e),pr=()=>!1,_i=e=>Oi.test(e),Ii=e=>Mi.test(e),Li=e=>!A(e)&&!O(e),Fi=e=>Ge(e,Jn,pr),A=e=>Yn.test(e),Le=e=>Ge(e,eo,Di),hr=e=>Ge(e,Ki,V),$i=e=>Ge(e,Zn,pr),Ri=e=>Ge(e,Qn,Ii),zi=e=>Ge(e,pr,_i),O=e=>Xn.test(e),bt=e=>Ue(e,eo),Wi=e=>Ue(e,Yi),Bi=e=>Ue(e,Zn),Vi=e=>Ue(e,Jn),Hi=e=>Ue(e,Qn),ji=e=>Ue(e,Xi,!0),Ge=(e,t,r)=>{const n=Yn.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ue=(e,t,r=!1)=>{const n=Xn.exec(e);return n?n[1]?t(n[1]):r:!1},Zn=e=>e==="position",Gi=new Set(["image","url"]),Qn=e=>Gi.has(e),Ui=new Set(["length","size","percentage"]),Jn=e=>Ui.has(e),eo=e=>e==="length",Ki=e=>e==="number",Yi=e=>e==="family-name",Xi=e=>e==="shadow",qi=Ei(()=>{const e=q("color"),t=q("font"),r=q("text"),n=q("font-weight"),o=q("tracking"),a=q("leading"),s=q("breakpoint"),l=q("container"),u=q("spacing"),d=q("radius"),f=q("shadow"),h=q("inset-shadow"),v=q("drop-shadow"),m=q("blur"),y=q("perspective"),p=q("aspect"),g=q("ease"),b=q("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],C=()=>[O,A,u],N=()=>[je,"full","auto",...C()],R=()=>[Ie,"none","subgrid",O,A],I=()=>["auto",{span:["full",Ie,O,A]},O,A],z=()=>[Ie,"auto",O,A],H=()=>["auto","min","max","fr",O,A],W=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...C()],B=()=>[je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],M=()=>[e,O,A],j=()=>[qn,Le],k=()=>["","none","full",d,O,A],F=()=>["",V,bt,Le],Y=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>["","none",m,O,A],J=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O,A],te=()=>["none",V,O,A],ie=()=>["none",V,O,A],ke=()=>[V,O,A],xe=()=>[je,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Te],breakpoint:[Te],color:[ki],container:[Te],"drop-shadow":[Te],ease:["in","out","in-out"],font:[Li],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Te],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Te],shadow:[Te],spacing:["px",V],text:[Te],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",je,A,O,p]}],container:["container"],columns:[{columns:[V,A,O,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),A,O]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",O,A]}],basis:[{basis:[je,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,je,"auto","initial","none",A]}],grow:[{grow:["",V,O,A]}],shrink:[{shrink:["",V,O,A]}],order:[{order:[Ie,"first","last","none",O,A]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,bt,Le]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,O,hr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qn,A]}],"font-family":[{font:[Wi,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,O,A]}],"line-clamp":[{"line-clamp":[V,"none",O,hr]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",O,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",O,Le]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[V,"auto",O,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",O,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Bi,$i]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Vi,Fi]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,O,A],radial:["",O,A],conic:[Ie,O,A]},Hi,Ri]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,O,A]}],"outline-w":[{outline:["",V,bt,Le]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,ji,zi]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",O,A,h]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[V,Le]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],opacity:[{opacity:[V,O,A]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none",O,A]}],blur:[{blur:re()}],brightness:[{brightness:[V,O,A]}],contrast:[{contrast:[V,O,A]}],"drop-shadow":[{"drop-shadow":["","none",v,O,A]}],grayscale:[{grayscale:["",V,O,A]}],"hue-rotate":[{"hue-rotate":[V,O,A]}],invert:[{invert:["",V,O,A]}],saturate:[{saturate:[V,O,A]}],sepia:[{sepia:["",V,O,A]}],"backdrop-filter":[{"backdrop-filter":["","none",O,A]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[V,O,A]}],"backdrop-contrast":[{"backdrop-contrast":[V,O,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,O,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,O,A]}],"backdrop-invert":[{"backdrop-invert":["",V,O,A]}],"backdrop-opacity":[{"backdrop-opacity":[V,O,A]}],"backdrop-saturate":[{"backdrop-saturate":[V,O,A]}],"backdrop-sepia":[{"backdrop-sepia":["",V,O,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",O,A]}],ease:[{ease:["linear","initial",g,O,A]}],delay:[{delay:[V,O,A]}],animate:[{animate:["none",b,O,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,O,A]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[O,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",O,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",O,A]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[V,bt,Le,hr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function D(...e){return qi(Hn(e))}function Zi({className:e,containerClassName:t,...r}){return c.jsx(Wn,{"data-slot":"input-otp",containerClassName:D("flex items-center gap-2 has-disabled:opacity-50",t),className:D("disabled:cursor-not-allowed",e),...r})}function Qi({className:e,...t}){return c.jsx("div",{"data-slot":"input-otp-group",className:D("flex items-center",e),...t})}function Ji({index:e,className:t,...r}){const n=i.useContext(zn),{char:o,hasFakeCaret:a,isActive:s}=(n==null?void 0:n.slots[e])??{};return c.jsxs("div",{"data-slot":"input-otp-slot","data-active":s,className:D("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...r,children:[o,a&&c.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:c.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function el({...e}){return c.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:c.jsx(si,{})})}function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function to(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ro(...e){return t=>{let r=!1;const n=e.map(o=>{const a=to(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():to(e[o],null)}}}}function ee(...e){return i.useCallback(ro(...e),e)}function tl(e,t){const r=i.createContext(t),n=a=>{const{children:s,...l}=a,u=i.useMemo(()=>l,Object.values(l));return c.jsx(r.Provider,{value:u,children:s})};n.displayName=e+"Provider";function o(a){const s=i.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function it(e,t=[]){let r=[];function n(a,s){const l=i.createContext(s),u=r.length;r=[...r,s];const d=h=>{var b;const{scope:v,children:m,...y}=h,p=((b=v==null?void 0:v[e])==null?void 0:b[u])||l,g=i.useMemo(()=>y,Object.values(y));return c.jsx(p.Provider,{value:g,children:m})};d.displayName=a+"Provider";function f(h,v){var p;const m=((p=v==null?void 0:v[e])==null?void 0:p[u])||l,y=i.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=r.map(s=>i.createContext(s));return function(l){const u=(l==null?void 0:l[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[n,rl(o,...t)]}function rl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((l,{useScope:u,scopeName:d})=>{const h=u(a)[`__scope${d}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ne=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},nl=i.useId||(()=>{}),ol=0;function yt(e){const[t,r]=i.useState(nl());return Ne(()=>{r(n=>n??String(ol++))},[e]),e||(t?`radix-${t}`:"")}function ce(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=al({defaultProp:t,onChange:r}),a=e!==void 0,s=a?e:n,l=ce(r),u=i.useCallback(d=>{if(a){const h=typeof d=="function"?d(e):d;h!==e&&l(h)}else o(d)},[a,e,o,l]);return[s,u]}function al({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,o=i.useRef(n),a=ce(t);return i.useEffect(()=>{o.current!==n&&(a(n),o.current=n)},[n,o,a]),r}var ue=i.forwardRef((e,t)=>{const{children:r,...n}=e,o=i.Children.toArray(r),a=o.find(sl);if(a){const s=a.props.children,l=o.map(u=>u===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:u);return c.jsx(mr,{...n,ref:t,children:i.isValidElement(s)?i.cloneElement(s,void 0,l):null})}return c.jsx(mr,{...n,ref:t,children:r})});ue.displayName="Slot";var mr=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const o=ll(r),a=il(n,r.props);return r.type!==i.Fragment&&(a.ref=t?ro(t,o):o),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});mr.displayName="SlotClone";var no=({children:e})=>c.jsx(c.Fragment,{children:e});function sl(e){return i.isValidElement(e)&&e.type===no}function il(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ll(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=cl.reduce((e,t)=>{const r=i.forwardRef((n,o)=>{const{asChild:a,...s}=n,l=a?ue:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oo(e,t){e&&ir.flushSync(()=>e.dispatchEvent(t))}function dl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e);i.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ul="DismissableLayer",vr="dismissableLayer.update",fl="dismissableLayer.pointerDownOutside",pl="dismissableLayer.focusOutside",ao,so=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=i.useContext(so),[f,h]=i.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),y=ee(t,N=>h(N)),p=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=p.indexOf(g),w=f?p.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,E=gl(N=>{const R=N.target,I=[...d.branches].some(z=>z.contains(R));!S||I||(o==null||o(N),s==null||s(N),N.defaultPrevented||l==null||l())},v),C=ml(N=>{const R=N.target;[...d.branches].some(z=>z.contains(R))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},v);return dl(N=>{w===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},v),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ao=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),lo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ao)}},[f,v,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),lo())},[f,d]),i.useEffect(()=>{const N=()=>m({});return document.addEventListener(vr,N),()=>document.removeEventListener(vr,N)},[]),c.jsx(K.div,{...u,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,C.onFocusCapture),onBlurCapture:U(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,E.onPointerDownCapture)})});wt.displayName=ul;var hl="DismissableLayerBranch",io=i.forwardRef((e,t)=>{const r=i.useContext(so),n=i.useRef(null),o=ee(t,n);return i.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),c.jsx(K.div,{...e,ref:o})});io.displayName=hl;function gl(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let u=function(){co(fl,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ml(e,t=globalThis==null?void 0:globalThis.document){const r=ce(e),n=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!n.current&&co(pl,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function lo(){const e=new CustomEvent(vr);document.dispatchEvent(e)}function co(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?oo(o,a):o.dispatchEvent(a)}var vl=wt,bl=io,br="focusScope.autoFocusOnMount",yr="focusScope.autoFocusOnUnmount",uo={bubbles:!1,cancelable:!0},yl="FocusScope",fo=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[l,u]=i.useState(null),d=ce(o),f=ce(a),h=i.useRef(null),v=ee(t,p=>u(p)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let p=function(x){if(m.paused||!l)return;const S=x.target;l.contains(S)?h.current=S:Pe(h.current,{select:!0})},g=function(x){if(m.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||Pe(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Pe(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),w.disconnect()}}},[n,l,m.paused]),i.useEffect(()=>{if(l){go.add(m);const p=document.activeElement;if(!l.contains(p)){const b=new CustomEvent(br,uo);l.addEventListener(br,d),l.dispatchEvent(b),b.defaultPrevented||(wl(Tl(po(l)),{select:!0}),document.activeElement===p&&Pe(l))}return()=>{l.removeEventListener(br,d),setTimeout(()=>{const b=new CustomEvent(yr,uo);l.addEventListener(yr,f),l.dispatchEvent(b),b.defaultPrevented||Pe(p??document.body,{select:!0}),l.removeEventListener(yr,f),go.remove(m)},0)}}},[l,d,f,m]);const y=i.useCallback(p=>{if(!r&&!n||m.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,b=document.activeElement;if(g&&b){const w=p.currentTarget,[x,S]=xl(w);x&&S?!p.shiftKey&&b===S?(p.preventDefault(),r&&Pe(x,{select:!0})):p.shiftKey&&b===x&&(p.preventDefault(),r&&Pe(S,{select:!0})):b===w&&p.preventDefault()}},[r,n,m.paused]);return c.jsx(K.div,{tabIndex:-1,...s,ref:v,onKeyDown:y})});fo.displayName=yl;function wl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Pe(n,{select:t}),document.activeElement!==r)return}function xl(e){const t=po(e),r=ho(t,e),n=ho(t.reverse(),e);return[r,n]}function po(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ho(e,t){for(const r of e)if(!Sl(r,{upTo:t}))return r}function Sl(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 Cl(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cl(e)&&t&&e.select()}}var go=El();function El(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=mo(e,t),e.unshift(t)},remove(t){var r;e=mo(e,t),(r=e[0])==null||r.resume()}}}function mo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Tl(e){return e.filter(t=>t.tagName!=="A")}var Nl="Portal",xt=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=i.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?_n.createPortal(c.jsx(K.div,{...n,ref:t}),s):null});xt.displayName=Nl;function Pl(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Fe=e=>{const{present:t,children:r}=e,n=Al(t),o=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),a=ee(n.ref,Ol(o));return typeof r=="function"||n.isPresent?i.cloneElement(o,{ref:a}):null};Fe.displayName="Presence";function Al(e){const[t,r]=i.useState(),n=i.useRef({}),o=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[l,u]=Pl(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=St(n.current);a.current=l==="mounted"?d:"none"},[l]),Ne(()=>{const d=n.current,f=o.current;if(f!==e){const v=a.current,m=St(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ne(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=m=>{const p=St(n.current).includes(m.animationName);if(m.target===t&&p&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(a.current=St(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function St(e){return(e==null?void 0:e.animationName)||"none"}function Ol(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var wr=0;function Ml(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vo()),document.body.insertAdjacentElement("beforeend",e[1]??vo()),wr++,()=>{wr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wr--}},[])}function vo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ve=function(){return ve=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ve.apply(this,arguments)};function bo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function kl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ct="right-scroll-bar-position",Et="width-before-scroll-bar",Dl="with-scroll-bars-hidden",_l="--removed-body-scroll-bar-size";function xr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Il(e,t){var r=X.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Ll=typeof window<"u"?i.useLayoutEffect:i.useEffect,yo=new WeakMap;function Fl(e,t){var r=Il(null,function(n){return e.forEach(function(o){return xr(o,n)})});return Ll(function(){var n=yo.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(l){a.has(l)||xr(l,null)}),a.forEach(function(l){o.has(l)||xr(l,s)})}yo.set(r,e)},[e]),r}function $l(e){return e}function Rl(e,t){t===void 0&&(t=$l);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(l){return l!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var l=r;r=[],l.forEach(a),s=r}var u=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),r}}}};return o}function zl(e){e===void 0&&(e={});var t=Rl(null);return t.options=ve({async:!0,ssr:!1},e),t}var wo=function(e){var t=e.sideCar,r=bo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,ve({},r))};wo.isSideCarExport=!0;function Wl(e,t){return e.useMedium(t),wo}var xo=zl(),Sr=function(){},Tt=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:Sr,onWheelCapture:Sr,onTouchMoveCapture:Sr}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,y=e.inert,p=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=bo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=v,E=Fl([r,t]),C=ve(ve({},x),o);return i.createElement(i.Fragment,null,f&&i.createElement(S,{sideCar:xo,removeScrollBar:d,shards:h,noIsolation:m,inert:y,setCallbacks:a,allowPinchZoom:!!p,lockRef:r,gapMode:w}),s?i.cloneElement(i.Children.only(l),ve(ve({},C),{ref:E})):i.createElement(b,ve({},C,{className:u,ref:E}),l))});Tt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tt.classNames={fullWidth:Et,zeroRight:Ct};var Bl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bl();return t&&e.setAttribute("nonce",t),e}function Hl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function jl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Gl=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Vl())&&(Hl(t,r),jl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ul=function(){var e=Gl();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},So=function(){var e=Ul(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Kl={left:0,top:0,right:0,gap:0},Cr=function(e){return parseInt(e||"",10)||0},Yl=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Cr(r),Cr(n),Cr(o)]},Xl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kl;var t=Yl(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ql=So(),Ke="data-scroll-locked",Zl=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,l=e.gap;return r===void 0&&(r="margin"),`
96
+ .`.concat(Dl,` {
97
97
  overflow: hidden `).concat(n,`;
98
98
  padding-right: `).concat(l,"px ").concat(n,`;
99
99
  }
@@ -127,13 +127,13 @@
127
127
  }
128
128
 
129
129
  body[`).concat(Ke,`] {
130
- `).concat(Dl,": ").concat(l,`px;
130
+ `).concat(_l,": ").concat(l,`px;
131
131
  }
132
- `)},So=function(){var e=parseInt(document.body.getAttribute(Ke)||"0",10);return isFinite(e)?e:0},Zl=function(){i.useEffect(function(){return document.body.setAttribute(Ke,(So()+1).toString()),function(){var e=So()-1;e<=0?document.body.removeAttribute(Ke):document.body.setAttribute(Ke,e.toString())}},[])},Ql=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Zl();var a=i.useMemo(function(){return Yl(o)},[o]);return i.createElement(Xl,{styles:ql(a,!t,o,r?"":"!important")})},Er=!1;if(typeof window<"u")try{var Nt=Object.defineProperty({},"passive",{get:function(){return Er=!0,!0}});window.addEventListener("test",Nt,Nt),window.removeEventListener("test",Nt,Nt)}catch{Er=!1}var Ye=Er?{passive:!1}:!1,Jl=function(e){return e.tagName==="TEXTAREA"},Co=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jl(e)&&r[t]==="visible")},ec=function(e){return Co(e,"overflowY")},tc=function(e){return Co(e,"overflowX")},Eo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=To(e,n);if(o){var a=No(e,n),s=a[1],l=a[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},rc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},nc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},To=function(e,t){return e==="v"?ec(t):tc(t)},No=function(e,t){return e==="v"?rc(t):nc(t)},oc=function(e,t){return e==="h"&&t==="rtl"?-1:1},ac=function(e,t,r,n,o){var a=oc(e,window.getComputedStyle(t).direction),s=a*n,l=r.target,u=t.contains(l),d=!1,f=s>0,h=0,v=0;do{var m=No(e,l),y=m[0],p=m[1],g=m[2],b=p-g-a*y;(y||b)&&To(e,l)&&(h+=b,v+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(h)<1||!f&&Math.abs(v)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Po=function(e){return[e.deltaX,e.deltaY]},Ao=function(e){return e&&"current"in e?e.current:e},sc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ic=function(e){return`
132
+ `)},Co=function(){var e=parseInt(document.body.getAttribute(Ke)||"0",10);return isFinite(e)?e:0},Ql=function(){i.useEffect(function(){return document.body.setAttribute(Ke,(Co()+1).toString()),function(){var e=Co()-1;e<=0?document.body.removeAttribute(Ke):document.body.setAttribute(Ke,e.toString())}},[])},Jl=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ql();var a=i.useMemo(function(){return Xl(o)},[o]);return i.createElement(ql,{styles:Zl(a,!t,o,r?"":"!important")})},Er=!1;if(typeof window<"u")try{var Nt=Object.defineProperty({},"passive",{get:function(){return Er=!0,!0}});window.addEventListener("test",Nt,Nt),window.removeEventListener("test",Nt,Nt)}catch{Er=!1}var Ye=Er?{passive:!1}:!1,ec=function(e){return e.tagName==="TEXTAREA"},Eo=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ec(e)&&r[t]==="visible")},tc=function(e){return Eo(e,"overflowY")},rc=function(e){return Eo(e,"overflowX")},To=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=No(e,n);if(o){var a=Po(e,n),s=a[1],l=a[2];if(s>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},nc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},oc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},No=function(e,t){return e==="v"?tc(t):rc(t)},Po=function(e,t){return e==="v"?nc(t):oc(t)},ac=function(e,t){return e==="h"&&t==="rtl"?-1:1},sc=function(e,t,r,n,o){var a=ac(e,window.getComputedStyle(t).direction),s=a*n,l=r.target,u=t.contains(l),d=!1,f=s>0,h=0,v=0;do{var m=Po(e,l),y=m[0],p=m[1],g=m[2],b=p-g-a*y;(y||b)&&No(e,l)&&(h+=b,v+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(h)<1||!f&&Math.abs(v)<1)&&(d=!0),d},Pt=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},ic=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lc=function(e){return`
133
133
  .block-interactivity-`.concat(e,` {pointer-events: none;}
134
134
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
135
- `)},lc=0,Xe=[];function cc(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(lc++)[0],a=i.useState(xo)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Ml([e.lockRef.current],(e.shards||[]).map(Ao),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var b=Pt(p),w=r.current,x="deltaX"in p?p.deltaX:w[0]-b[0],S="deltaY"in p?p.deltaY:w[1]-b[1],E,C=p.target,N=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in p&&N==="h"&&C.type==="range")return!1;var R=Eo(N,C);if(!R)return!0;if(R?E=N:(E=N==="v"?"h":"v",R=Eo(N,C)),!R)return!1;if(!n.current&&"changedTouches"in p&&(x||S)&&(n.current=E),!E)return!0;var I=n.current||E;return ac(I,g,p,I==="h"?x:S)},[]),u=i.useCallback(function(p){var g=p;if(!(!Xe.length||Xe[Xe.length-1]!==a)){var b="deltaY"in g?Po(g):Pt(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&sc(E.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(Ao).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=x.length>0?l(g,x[0]):!s.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),d=i.useCallback(function(p,g,b,w){var x={name:p,delta:g,target:b,should:w,shadowParent:dc(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=i.useCallback(function(p){r.current=Pt(p),n.current=void 0},[]),h=i.useCallback(function(p){d(p.type,Po(p),p.target,l(p,e.lockRef.current))},[]),v=i.useCallback(function(p){d(p.type,Pt(p),p.target,l(p,e.lockRef.current))},[]);i.useEffect(function(){return Xe.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ye),document.addEventListener("touchmove",u,Ye),document.addEventListener("touchstart",f,Ye),function(){Xe=Xe.filter(function(p){return p!==a}),document.removeEventListener("wheel",u,Ye),document.removeEventListener("touchmove",u,Ye),document.removeEventListener("touchstart",f,Ye)}},[]);var m=e.removeScrollBar,y=e.inert;return i.createElement(i.Fragment,null,y?i.createElement(a,{styles:ic(o)}):null,m?i.createElement(Ql,{gapMode:e.gapMode}):null)}function dc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uc=zl(wo,cc);var Oo=i.forwardRef(function(e,t){return i.createElement(Tt,ve({},e,{ref:t,sideCar:uc}))});Oo.classNames=Tt.classNames;var fc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qe=new WeakMap,At=new WeakMap,Ot={},Tr=0,Mo=function(e){return e&&(e.host||Mo(e.parentNode))},pc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Mo(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hc=function(e,t,r,n){var o=pc(t,Array.isArray(e)?e:[e]);Ot[r]||(Ot[r]=new WeakMap);var a=Ot[r],s=[],l=new Set,u=new Set(o),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};o.forEach(d);var f=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(l.has(v))f(v);else try{var m=v.getAttribute(n),y=m!==null&&m!=="false",p=(qe.get(v)||0)+1,g=(a.get(v)||0)+1;qe.set(v,p),a.set(v,g),s.push(v),p===1&&y&&At.set(v,!0),g===1&&v.setAttribute(r,"true"),y||v.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return f(t),l.clear(),Tr++,function(){s.forEach(function(h){var v=qe.get(h)-1,m=a.get(h)-1;qe.set(h,v),a.set(h,m),v||(At.has(h)||h.removeAttribute(n),At.delete(h)),m||h.removeAttribute(r)}),Tr--,Tr||(qe=new WeakMap,qe=new WeakMap,At=new WeakMap,Ot={})}},gc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=fc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),hc(n,o,r,"aria-hidden")):function(){return null}},Nr="Dialog",[ko,cf]=it(Nr),[mc,fe]=ko(Nr),Do=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=i.useRef(null),u=i.useRef(null),[d=!1,f]=gr({prop:n,defaultProp:o,onChange:a});return c.jsx(mc,{scope:t,triggerRef:l,contentRef:u,contentId:yt(),titleId:yt(),descriptionId:yt(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};Do.displayName=Nr;var _o="DialogTrigger",Io=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(_o,r),a=ee(t,o.triggerRef);return c.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Or(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)})});Io.displayName=_o;var Pr="DialogPortal",[vc,Lo]=ko(Pr,{forceMount:void 0}),Fo=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=fe(Pr,t);return c.jsx(vc,{scope:t,forceMount:r,children:i.Children.map(n,s=>c.jsx(Fe,{present:r||a.open,children:c.jsx(xt,{asChild:!0,container:o,children:s})}))})};Fo.displayName=Pr;var Mt="DialogOverlay",$o=i.forwardRef((e,t)=>{const r=Lo(Mt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=fe(Mt,e.__scopeDialog);return a.modal?c.jsx(Fe,{present:n||a.open,children:c.jsx(bc,{...o,ref:t})}):null});$o.displayName=Mt;var bc=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Mt,r);return c.jsx(Oo,{as:ue,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(K.div,{"data-state":Or(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),$e="DialogContent",Ro=i.forwardRef((e,t)=>{const r=Lo($e,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=fe($e,e.__scopeDialog);return c.jsx(Fe,{present:n||a.open,children:a.modal?c.jsx(yc,{...o,ref:t}):c.jsx(wc,{...o,ref:t})})});Ro.displayName=$e;var yc=i.forwardRef((e,t)=>{const r=fe($e,e.__scopeDialog),n=i.useRef(null),o=ee(t,r.contentRef,n);return i.useEffect(()=>{const a=n.current;if(a)return gc(a)},[]),c.jsx(zo,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:U(e.onFocusOutside,a=>a.preventDefault())})}),wc=i.forwardRef((e,t)=>{const r=fe($e,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return c.jsx(zo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),zo=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=fe($e,r),u=i.useRef(null),d=ee(t,u);return Ol(),c.jsxs(c.Fragment,{children:[c.jsx(uo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(wt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Or(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(xc,{titleId:l.titleId}),c.jsx(Cc,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Ar="DialogTitle",Wo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Ar,r);return c.jsx(K.h2,{id:o.titleId,...n,ref:t})});Wo.displayName=Ar;var Bo="DialogDescription",Vo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Bo,r);return c.jsx(K.p,{id:o.descriptionId,...n,ref:t})});Vo.displayName=Bo;var Ho="DialogClose",jo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Ho,r);return c.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});jo.displayName=Ho;function Or(e){return e?"open":"closed"}var Go="DialogTitleWarning",[df,Uo]=el(Go,{contentName:$e,titleName:Ar,docsSlug:"dialog"}),xc=({titleId:e})=>{const t=Uo(Go),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
135
+ `)},cc=0,Xe=[];function dc(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(cc++)[0],a=i.useState(So)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=kl([e.lockRef.current],(e.shards||[]).map(Oo),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var b=Pt(p),w=r.current,x="deltaX"in p?p.deltaX:w[0]-b[0],S="deltaY"in p?p.deltaY:w[1]-b[1],E,C=p.target,N=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in p&&N==="h"&&C.type==="range")return!1;var R=To(N,C);if(!R)return!0;if(R?E=N:(E=N==="v"?"h":"v",R=To(N,C)),!R)return!1;if(!n.current&&"changedTouches"in p&&(x||S)&&(n.current=E),!E)return!0;var I=n.current||E;return sc(I,g,p,I==="h"?x:S)},[]),u=i.useCallback(function(p){var g=p;if(!(!Xe.length||Xe[Xe.length-1]!==a)){var b="deltaY"in g?Ao(g):Pt(g),w=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&ic(E.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(Oo).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=x.length>0?l(g,x[0]):!s.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),d=i.useCallback(function(p,g,b,w){var x={name:p,delta:g,target:b,should:w,shadowParent:uc(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=i.useCallback(function(p){r.current=Pt(p),n.current=void 0},[]),h=i.useCallback(function(p){d(p.type,Ao(p),p.target,l(p,e.lockRef.current))},[]),v=i.useCallback(function(p){d(p.type,Pt(p),p.target,l(p,e.lockRef.current))},[]);i.useEffect(function(){return Xe.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ye),document.addEventListener("touchmove",u,Ye),document.addEventListener("touchstart",f,Ye),function(){Xe=Xe.filter(function(p){return p!==a}),document.removeEventListener("wheel",u,Ye),document.removeEventListener("touchmove",u,Ye),document.removeEventListener("touchstart",f,Ye)}},[]);var m=e.removeScrollBar,y=e.inert;return i.createElement(i.Fragment,null,y?i.createElement(a,{styles:lc(o)}):null,m?i.createElement(Jl,{gapMode:e.gapMode}):null)}function uc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fc=Wl(xo,dc);var Mo=i.forwardRef(function(e,t){return i.createElement(Tt,ve({},e,{ref:t,sideCar:fc}))});Mo.classNames=Tt.classNames;var pc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qe=new WeakMap,At=new WeakMap,Ot={},Tr=0,ko=function(e){return e&&(e.host||ko(e.parentNode))},hc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ko(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},gc=function(e,t,r,n){var o=hc(t,Array.isArray(e)?e:[e]);Ot[r]||(Ot[r]=new WeakMap);var a=Ot[r],s=[],l=new Set,u=new Set(o),d=function(h){!h||l.has(h)||(l.add(h),d(h.parentNode))};o.forEach(d);var f=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(l.has(v))f(v);else try{var m=v.getAttribute(n),y=m!==null&&m!=="false",p=(qe.get(v)||0)+1,g=(a.get(v)||0)+1;qe.set(v,p),a.set(v,g),s.push(v),p===1&&y&&At.set(v,!0),g===1&&v.setAttribute(r,"true"),y||v.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return f(t),l.clear(),Tr++,function(){s.forEach(function(h){var v=qe.get(h)-1,m=a.get(h)-1;qe.set(h,v),a.set(h,m),v||(At.has(h)||h.removeAttribute(n),At.delete(h)),m||h.removeAttribute(r)}),Tr--,Tr||(qe=new WeakMap,qe=new WeakMap,At=new WeakMap,Ot={})}},mc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=pc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),gc(n,o,r,"aria-hidden")):function(){return null}},Nr="Dialog",[Do,cf]=it(Nr),[vc,fe]=Do(Nr),_o=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=i.useRef(null),u=i.useRef(null),[d=!1,f]=gr({prop:n,defaultProp:o,onChange:a});return c.jsx(vc,{scope:t,triggerRef:l,contentRef:u,contentId:yt(),titleId:yt(),descriptionId:yt(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:s,children:r})};_o.displayName=Nr;var Io="DialogTrigger",Lo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Io,r),a=ee(t,o.triggerRef);return c.jsx(K.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Or(o.open),...n,ref:a,onClick:U(e.onClick,o.onOpenToggle)})});Lo.displayName=Io;var Pr="DialogPortal",[bc,Fo]=Do(Pr,{forceMount:void 0}),$o=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=fe(Pr,t);return c.jsx(bc,{scope:t,forceMount:r,children:i.Children.map(n,s=>c.jsx(Fe,{present:r||a.open,children:c.jsx(xt,{asChild:!0,container:o,children:s})}))})};$o.displayName=Pr;var Mt="DialogOverlay",Ro=i.forwardRef((e,t)=>{const r=Fo(Mt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=fe(Mt,e.__scopeDialog);return a.modal?c.jsx(Fe,{present:n||a.open,children:c.jsx(yc,{...o,ref:t})}):null});Ro.displayName=Mt;var yc=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Mt,r);return c.jsx(Mo,{as:ue,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(K.div,{"data-state":Or(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),$e="DialogContent",zo=i.forwardRef((e,t)=>{const r=Fo($e,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=fe($e,e.__scopeDialog);return c.jsx(Fe,{present:n||a.open,children:a.modal?c.jsx(wc,{...o,ref:t}):c.jsx(xc,{...o,ref:t})})});zo.displayName=$e;var wc=i.forwardRef((e,t)=>{const r=fe($e,e.__scopeDialog),n=i.useRef(null),o=ee(t,r.contentRef,n);return i.useEffect(()=>{const a=n.current;if(a)return mc(a)},[]),c.jsx(Wo,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=r.triggerRef.current)==null||s.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&a.preventDefault()}),onFocusOutside:U(e.onFocusOutside,a=>a.preventDefault())})}),xc=i.forwardRef((e,t)=>{const r=fe($e,e.__scopeDialog),n=i.useRef(!1),o=i.useRef(!1);return c.jsx(Wo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Wo=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,l=fe($e,r),u=i.useRef(null),d=ee(t,u);return Ml(),c.jsxs(c.Fragment,{children:[c.jsx(fo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(wt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Or(l.open),...s,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Sc,{titleId:l.titleId}),c.jsx(Ec,{contentRef:u,descriptionId:l.descriptionId})]})]})}),Ar="DialogTitle",Bo=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Ar,r);return c.jsx(K.h2,{id:o.titleId,...n,ref:t})});Bo.displayName=Ar;var Vo="DialogDescription",Ho=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(Vo,r);return c.jsx(K.p,{id:o.descriptionId,...n,ref:t})});Ho.displayName=Vo;var jo="DialogClose",Go=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=fe(jo,r);return c.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Go.displayName=jo;function Or(e){return e?"open":"closed"}var Uo="DialogTitleWarning",[df,Ko]=tl(Uo,{contentName:$e,titleName:Ar,docsSlug:"dialog"}),Sc=({titleId:e})=>{const t=Ko(Uo),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
136
136
 
137
137
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
138
138
 
139
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Sc="DialogDescriptionWarning",Cc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Uo(Sc).contentName}}.`;return i.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Mr=Do,Ko=Io,Yo=Fo,kt=$o,Dt=Ro,_t=Wo,It=Vo,Lt=jo;const Ft=({modal:e=!1,...t})=>c.jsx(Mr,{modal:e,...t});Ft.displayName=Mr.displayName;const Xo=Ko,Ec=Yo,kr=Lt,qo=i.forwardRef(({className:e,...t},r)=>c.jsx(kt,{ref:r,className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qo.displayName=kt.displayName;const $t=i.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Ec,{children:[c.jsx(qo,{}),c.jsxs(Dt,{ref:n,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,c.jsxs(Lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(lr,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$t.displayName=Dt.displayName;const Dr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Dr.displayName="DialogHeader";const _r=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_r.displayName="DialogFooter";const Ir=i.forwardRef(({className:e,...t},r)=>c.jsx(_t,{ref:r,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Ir.displayName=_t.displayName;const Lr=i.forwardRef(({className:e,...t},r)=>c.jsx(It,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));Lr.displayName=It.displayName;const Zo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Qo=Vn,Rt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Qo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],h=a==null?void 0:a[d];if(f===null)return null;const v=Zo(f)||Zo(h);return o[d][v]}),l=r&&Object.entries(r).reduce((d,f)=>{let[h,v]=f;return v===void 0||(d[h]=v),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:h,className:v,...m}=f;return Object.entries(m).every(y=>{let[p,g]=y;return Array.isArray(g)?g.includes({...a,...l}[p]):{...a,...l}[p]===g})?[...d,h,v]:d},[]);return Qo(e,s,u,r==null?void 0:r.class,r==null?void 0:r.className)},Fr=Rt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),pe=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:a,...s},l)=>{const u=n?ue:"button";if(!o)return c.jsx(u,{className:D(Fr({variant:t,size:r,className:e})),ref:l,onClick:a,...s});a&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:d,content:f,onConfirm:h,confirmText:v="Confirm",cancelText:m="Cancel"}=o,y=()=>{h()};return c.jsxs(Ft,{children:[c.jsx(Xo,{asChild:!0,children:c.jsx(u,{className:D(Fr({variant:t,size:r,className:e})),ref:l,...s})}),c.jsxs($t,{children:[c.jsxs(Dr,{children:[c.jsx(Ir,{children:d}),c.jsx(Lr,{children:f})]}),c.jsxs(_r,{className:"flex justify-end gap-2 pt-4",children:[c.jsx(kr,{asChild:!0,children:c.jsx(pe,{variant:"outline",children:m})}),c.jsx(kr,{asChild:!0,children:c.jsx(pe,{onClick:y,children:v})})]})]})]})});pe.displayName="Button";const Tc=["top","right","bottom","left"],Ae=Math.min,ae=Math.max,zt=Math.round,Wt=Math.floor,be=e=>({x:e,y:e}),Nc={left:"right",right:"left",bottom:"top",top:"bottom"},Pc={start:"end",end:"start"};function $r(e,t,r){return ae(e,Ae(t,r))}function Se(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Rr(e){return e==="x"?"y":"x"}function zr(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(Ce(e))?"y":"x"}function Wr(e){return Rr(Oe(e))}function Ac(e,t,r){r===void 0&&(r=!1);const n=Ze(e),o=Wr(e),a=zr(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bt(s)),[s,Bt(s)]}function Oc(e){const t=Bt(e);return[Br(e),t,Br(t)]}function Br(e){return e.replace(/start|end/g,t=>Pc[t])}function Mc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function kc(e,t,r,n){const o=Ze(e);let a=Mc(Ce(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Br)))),a}function Bt(e){return e.replace(/left|right|bottom|top/g,t=>Nc[t])}function Dc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jo(e){return typeof e!="number"?Dc(e):{top:e,right:e,bottom:e,left:e}}function Vt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ea(e,t,r){let{reference:n,floating:o}=e;const a=Oe(t),s=Wr(t),l=zr(s),u=Ce(t),d=a==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[l]/2-o[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}switch(Ze(t)){case"start":m[s]-=v*(r&&d?-1:1);break;case"end":m[s]+=v*(r&&d?-1:1);break}return m}const _c=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=ea(d,n,u),v=n,m={},y=0;for(let p=0;p<l.length;p++){const{name:g,fn:b}=l[p],{x:w,y:x,data:S,reset:E}=await b({x:f,y:h,initialPlacement:n,placement:v,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,h=x??h,m={...m,[g]:{...m[g],...S}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:h}=ea(d,v,u)),p=-1)}return{x:f,y:h,placement:v,strategy:o,middlewareData:m}};async function lt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Se(t,e),y=Jo(m),g=l[v?h==="floating"?"reference":"floating":h],b=Vt(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),w=h==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Vt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:u}):w);return{top:(b.top-E.top+y.top)/S.y,bottom:(E.bottom-b.bottom+y.bottom)/S.y,left:(b.left-E.left+y.left)/S.x,right:(E.right-b.right+y.right)/S.x}}const Ic=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=Se(e,t)||{};if(d==null)return{};const h=Jo(f),v={x:r,y:n},m=Wr(o),y=zr(m),p=await s.getDimensions(d),g=m==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[m]-v[m]-a.floating[y],E=v[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=C?C[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(C)))&&(N=l.floating[x]||a.floating[y]);const R=S/2-E/2,I=N/2-p[y]/2-1,z=Ae(h[b],I),H=Ae(h[w],I),W=z,_=N-p[y]-H,P=N/2-p[y]/2+R,B=$r(W,P,_),M=!u.arrow&&Ze(o)!=null&&P!==B&&a.reference[y]/2-(P<W?z:H)-p[y]/2<0,j=M?P<W?P-W:P-_:0;return{[m]:v[m]+j,data:{[m]:B,centerOffset:P-B-j,...M&&{alignmentOffset:j}},reset:M}}}),Lc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...g}=Se(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=Ce(o),w=Oe(l),x=Ce(l)===l,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=v||(x||!p?[Bt(l)]:Oc(l)),C=y!=="none";!v&&C&&E.push(...kc(l,p,y,S));const N=[l,...E],R=await lt(t,g),I=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&I.push(R[b]),h){const P=Ac(o,s,S);I.push(R[P[0]],R[P[1]])}if(z=[...z,{placement:o,overflows:I}],!I.every(P=>P<=0)){var H,W;const P=(((H=a.flip)==null?void 0:H.index)||0)+1,B=N[P];if(B)return{data:{index:P,overflows:z},reset:{placement:B}};let M=(W=z.filter(j=>j.overflows[0]<=0).sort((j,k)=>j.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!M)switch(m){case"bestFit":{var _;const j=(_=z.filter(k=>{if(C){const F=Oe(k.placement);return F===w||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,Y)=>F+Y,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:_[0];j&&(M=j);break}case"initialPlacement":M=l;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function ta(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ra(e){return Tc.some(t=>e[t]>=0)}const Fc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Se(e,t);switch(n){case"referenceHidden":{const a=await lt(t,{...o,elementContext:"reference"}),s=ta(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:ra(s)}}}case"escaped":{const a=await lt(t,{...o,altBoundary:!0}),s=ta(a,r.floating);return{data:{escapedOffsets:s,escaped:ra(s)}}}default:return{}}}}};async function $c(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ce(r),l=Ze(r),u=Oe(r)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,h=Se(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),u?{x:m*f,y:v*d}:{x:v*d,y:m*f}}const Rc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:l}=t,u=await $c(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},zc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Se(e,t),d={x:r,y:n},f=await lt(t,u),h=Oe(Ce(o)),v=Rr(h);let m=d[v],y=d[h];if(a){const g=v==="y"?"top":"left",b=v==="y"?"bottom":"right",w=m+f[g],x=m-f[b];m=$r(w,m,x)}if(s){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=y+f[g],x=y-f[b];y=$r(w,y,x)}const p=l.fn({...t,[v]:m,[h]:y});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[v]:a,[h]:s}}}}}},Wc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=Se(e,t),f={x:r,y:n},h=Oe(o),v=Rr(h);let m=f[v],y=f[h];const p=Se(l,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const x=v==="y"?"height":"width",S=a.reference[v]-a.floating[x]+g.mainAxis,E=a.reference[v]+a.reference[x]-g.mainAxis;m<S?m=S:m>E&&(m=E)}if(d){var b,w;const x=v==="y"?"width":"height",S=["top","left"].includes(Ce(o)),E=a.reference[h]-a.floating[x]+(S&&((b=s.offset)==null?void 0:b[h])||0)+(S?0:g.crossAxis),C=a.reference[h]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[h])||0)-(S?g.crossAxis:0);y<E?y=E:y>C&&(y=C)}return{[v]:m,[h]:y}}}},Bc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:u=()=>{},...d}=Se(e,t),f=await lt(t,d),h=Ce(o),v=Ze(o),m=Oe(o)==="y",{width:y,height:p}=a.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=v===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=h,g=v==="end"?"top":"bottom");const w=p-f.top-f.bottom,x=y-f.left-f.right,S=Ae(p-f[g],w),E=Ae(y-f[b],x),C=!t.middlewareData.shift;let N=S,R=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),C&&!v){const z=ae(f.left,0),H=ae(f.right,0),W=ae(f.top,0),_=ae(f.bottom,0);m?R=y-2*(z!==0||H!==0?z+H:ae(f.left,f.right)):N=p-2*(W!==0||_!==0?W+_:ae(f.top,f.bottom))}await u({...t,availableWidth:R,availableHeight:N});const I=await s.getDimensions(l.floating);return y!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function Ht(){return typeof window<"u"}function Qe(e){return na(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(na(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function na(e){return Ht()?e instanceof Node||e instanceof se(e).Node:!1}function he(e){return Ht()?e instanceof Element||e instanceof se(e).Element:!1}function we(e){return Ht()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function oa(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function ct(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Vc(e){return["table","td","th"].includes(Qe(e))}function jt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Vr(e){const t=Hr(),r=he(e)?ge(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Hc(e){let t=Me(e);for(;we(t)&&!Je(t);){if(Vr(t))return t;if(jt(t))return null;t=Me(t)}return null}function Hr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Je(e){return["html","body","#document"].includes(Qe(e))}function ge(e){return se(e).getComputedStyle(e)}function Gt(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(Qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oa(e)&&e.host||ye(e);return oa(t)?t.host:t}function aa(e){const t=Me(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&ct(t)?t:aa(t)}function dt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=aa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=se(o);if(a){const l=jr(s);return t.concat(s,s.visualViewport||[],ct(o)?o:[],l&&r?dt(l):[])}return t.concat(o,dt(o,[],r))}function jr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sa(e){const t=ge(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=we(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=zt(r)!==a||zt(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function Gr(e){return he(e)?e:e.contextElement}function et(e){const t=Gr(e);if(!we(t))return be(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=sa(t);let s=(a?zt(r.width):r.width)/n,l=(a?zt(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const jc=be(0);function ia(e){const t=se(e);return!Hr()||!t.visualViewport?jc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==se(e)?!1:t}function Re(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Gr(e);let s=be(1);t&&(n?he(n)&&(s=et(n)):s=et(e));const l=Gc(a,r,n)?ia(a):be(0);let u=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(a){const v=se(a),m=n&&he(n)?se(n):n;let y=v,p=jr(y);for(;p&&n&&m!==y;){const g=et(p),b=p.getBoundingClientRect(),w=ge(p),x=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*g.x,S=b.top+(p.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,f*=g.x,h*=g.y,u+=x,d+=S,y=se(p),p=jr(y)}}return Vt({width:f,height:h,x:u,y:d})}function Ur(e,t){const r=Gt(e).scrollLeft;return t?t.left+r:Re(ye(e)).left+r}function la(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Ur(e,n)),a=n.top+t.scrollTop;return{x:o,y:a}}function Uc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ye(n),l=t?jt(t.floating):!1;if(n===s||l&&a)return r;let u={scrollLeft:0,scrollTop:0},d=be(1);const f=be(0),h=we(n);if((h||!h&&!a)&&((Qe(n)!=="body"||ct(s))&&(u=Gt(n)),we(n))){const m=Re(n);d=et(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const v=s&&!h&&!a?la(s,u,!0):be(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:r.y*d.y-u.scrollTop*d.y+f.y+v.y}}function Kc(e){return Array.from(e.getClientRects())}function Yc(e){const t=ye(e),r=Gt(e),n=e.ownerDocument.body,o=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Ur(e);const l=-r.scrollTop;return ge(n).direction==="rtl"&&(s+=ae(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Xc(e,t){const r=se(e),n=ye(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;const d=Hr();(!d||d&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l,y:u}}function qc(e,t){const r=Re(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=we(e)?et(e):be(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,d=n*a.y;return{width:s,height:l,x:u,y:d}}function ca(e,t,r){let n;if(t==="viewport")n=Xc(e,r);else if(t==="document")n=Yc(ye(e));else if(he(t))n=qc(t,r);else{const o=ia(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vt(n)}function da(e,t){const r=Me(e);return r===t||!he(r)||Je(r)?!1:ge(r).position==="fixed"||da(r,t)}function Zc(e,t){const r=t.get(e);if(r)return r;let n=dt(e,[],!1).filter(l=>he(l)&&Qe(l)!=="body"),o=null;const a=ge(e).position==="fixed";let s=a?Me(e):e;for(;he(s)&&!Je(s);){const l=ge(s),u=Vr(s);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ct(s)&&!u&&da(e,s))?n=n.filter(f=>f!==s):o=l,s=Me(s)}return t.set(e,n),n}function Qc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?jt(t)?[]:Zc(t,this._c):[].concat(r),n],l=s[0],u=s.reduce((d,f)=>{const h=ca(t,f,o);return d.top=ae(h.top,d.top),d.right=Ae(h.right,d.right),d.bottom=Ae(h.bottom,d.bottom),d.left=ae(h.left,d.left),d},ca(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Jc(e){const{width:t,height:r}=sa(e);return{width:t,height:r}}function ed(e,t,r){const n=we(t),o=ye(t),a=r==="fixed",s=Re(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=be(0);if(n||!n&&!a)if((Qe(t)!=="body"||ct(o))&&(l=Gt(t)),n){const v=Re(t,!0,a,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Ur(o));const d=o&&!n&&!a?la(o,l):be(0),f=s.left+l.scrollLeft-u.x-d.x,h=s.top+l.scrollTop-u.y-d.y;return{x:f,y:h,width:s.width,height:s.height}}function Kr(e){return ge(e).position==="static"}function ua(e,t){if(!we(e)||ge(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ye(e)===r&&(r=r.ownerDocument.body),r}function fa(e,t){const r=se(e);if(jt(e))return r;if(!we(e)){let o=Me(e);for(;o&&!Je(o);){if(he(o)&&!Kr(o))return o;o=Me(o)}return r}let n=ua(e,t);for(;n&&Vc(n)&&Kr(n);)n=ua(n,t);return n&&Je(n)&&Kr(n)&&!Vr(n)?r:n||Hc(e)||r}const td=async function(e){const t=this.getOffsetParent||fa,r=this.getDimensions,n=await r(e.floating);return{reference:ed(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function rd(e){return ge(e).direction==="rtl"}const nd={convertOffsetParentRelativeRectToViewportRelativeRect:Uc,getDocumentElement:ye,getClippingRect:Qc,getOffsetParent:fa,getElementRects:td,getClientRects:Kc,getDimensions:Jc,getScale:et,isElement:he,isRTL:rd};function pa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function od(e,t){let r=null,n;const o=ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:h,width:v,height:m}=d;if(l||t(),!v||!m)return;const y=Wt(h),p=Wt(o.clientWidth-(f+v)),g=Wt(o.clientHeight-(h+m)),b=Wt(f),x={rootMargin:-y+"px "+-p+"px "+-g+"px "+-b+"px",threshold:ae(0,Ae(1,u))||1};let S=!0;function E(C){const N=C[0].intersectionRatio;if(N!==u){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!pa(d,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return s(!0),a}function ad(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Gr(e),f=o||a?[...d?dt(d):[],...dt(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const h=d&&l?od(d,r):null;let v=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let y,p=u?Re(e):null;u&&g();function g(){const b=Re(e);p&&!pa(p,b)&&r(),p=b,y=requestAnimationFrame(g)}return r(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const sd=Rc,id=zc,ld=Lc,cd=Bc,dd=Fc,ha=Ic,ud=Wc,fd=(e,t,r)=>{const n=new Map,o={platform:nd,...r},a={...o.platform,_c:n};return _c(e,t,{...o,platform:a})};var Ut=typeof document<"u"?X.useLayoutEffect:X.useEffect;function Kt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Kt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Kt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ga(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ma(e,t){const r=ga(e);return Math.round(t*r)/r}function Yr(e){const t=i.useRef(e);return Ut(()=>{t.current=e}),t}function pd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,h]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=i.useState(n);Kt(v,n)||m(n);const[y,p]=i.useState(null),[g,b]=i.useState(null),w=i.useCallback(k=>{k!==C.current&&(C.current=k,p(k))},[]),x=i.useCallback(k=>{k!==N.current&&(N.current=k,b(k))},[]),S=a||y,E=s||g,C=i.useRef(null),N=i.useRef(null),R=i.useRef(f),I=u!=null,z=Yr(u),H=Yr(o),W=Yr(d),_=i.useCallback(()=>{if(!C.current||!N.current)return;const k={placement:t,strategy:r,middleware:v};H.current&&(k.platform=H.current),fd(C.current,N.current,k).then(F=>{const Y={...F,isPositioned:W.current!==!1};P.current&&!Kt(R.current,Y)&&(R.current=Y,ir.flushSync(()=>{h(Y)}))})},[v,t,r,H,W]);Ut(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(k=>({...k,isPositioned:!1})))},[d]);const P=i.useRef(!1);Ut(()=>(P.current=!0,()=>{P.current=!1}),[]),Ut(()=>{if(S&&(C.current=S),E&&(N.current=E),S&&E){if(z.current)return z.current(S,E,_);_()}},[S,E,_,z,I]);const B=i.useMemo(()=>({reference:C,floating:N,setReference:w,setFloating:x}),[w,x]),M=i.useMemo(()=>({reference:S,floating:E}),[S,E]),j=i.useMemo(()=>{const k={position:r,left:0,top:0};if(!M.floating)return k;const F=ma(M.floating,f.x),Y=ma(M.floating,f.y);return l?{...k,transform:"translate("+F+"px, "+Y+"px)",...ga(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:Y}},[r,l,M.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:_,refs:B,elements:M,floatingStyles:j}),[f,_,B,M,j])}const hd=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ha({element:n.current,padding:o}).fn(r):{}:n?ha({element:n,padding:o}).fn(r):{}}}},gd=(e,t)=>({...sd(e),options:[e,t]}),md=(e,t)=>({...id(e),options:[e,t]}),vd=(e,t)=>({...ud(e),options:[e,t]}),bd=(e,t)=>({...ld(e),options:[e,t]}),yd=(e,t)=>({...cd(e),options:[e,t]}),wd=(e,t)=>({...dd(e),options:[e,t]}),xd=(e,t)=>({...hd(e),options:[e,t]});var Sd="Arrow",va=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return c.jsx(K.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});va.displayName=Sd;var Cd=va;function Ed(e){const[t,r]=i.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Xr="Popper",[ba,ya]=it(Xr),[Td,wa]=ba(Xr),xa=e=>{const{__scopePopper:t,children:r}=e,[n,o]=i.useState(null);return c.jsx(Td,{scope:t,anchor:n,onAnchorChange:o,children:r})};xa.displayName=Xr;var Sa="PopperAnchor",Ca=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=wa(Sa,r),s=i.useRef(null),l=ee(t,s);return i.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:c.jsx(K.div,{...o,ref:l})});Ca.displayName=Sa;var qr="PopperContent",[Nd,Pd]=ba(qr),Ea=i.forwardRef((e,t)=>{var xe,ht,or,gt,ar,at;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,g=wa(qr,r),[b,w]=i.useState(null),x=ee(t,We=>w(We)),[S,E]=i.useState(null),C=Ed(S),N=(C==null?void 0:C.width)??0,R=(C==null?void 0:C.height)??0,I=n+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],W=H.length>0,_={padding:z,boundary:H.filter(Od),altBoundary:W},{refs:P,floatingStyles:B,placement:M,isPositioned:j,middlewareData:k}=pd({strategy:"fixed",placement:I,whileElementsMounted:(...We)=>ad(...We,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[gd({mainAxis:o+R,alignmentAxis:s}),u&&md({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?vd():void 0,..._}),u&&bd({..._}),yd({..._,apply:({elements:We,rects:L,availableWidth:$,availableHeight:Q})=>{const{width:ne,height:oe}=L.reference,G=We.floating.style;G.setProperty("--radix-popper-available-width",`${$}px`),G.setProperty("--radix-popper-available-height",`${Q}px`),G.setProperty("--radix-popper-anchor-width",`${ne}px`),G.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),S&&xd({element:S,padding:l}),Md({arrowWidth:N,arrowHeight:R}),v&&wd({strategy:"referenceHidden",..._})]}),[F,Y]=Pa(M),Z=ce(y);Ne(()=>{j&&(Z==null||Z())},[j,Z]);const re=(xe=k.arrow)==null?void 0:xe.x,J=(ht=k.arrow)==null?void 0:ht.y,te=((or=k.arrow)==null?void 0:or.centerOffset)!==0,[ie,ke]=i.useState();return Ne(()=>{b&&ke(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:j?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(gt=k.transformOrigin)==null?void 0:gt.x,(ar=k.transformOrigin)==null?void 0:ar.y].join(" "),...((at=k.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Nd,{scope:r,placedSide:F,onArrowChange:E,arrowX:re,arrowY:J,shouldHideArrow:te,children:c.jsx(K.div,{"data-side":F,"data-align":Y,...p,ref:x,style:{...p.style,animation:j?void 0:"none"}})})})});Ea.displayName=qr;var Ta="PopperArrow",Ad={top:"bottom",right:"left",bottom:"top",left:"right"},Na=i.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Pd(Ta,n),s=Ad[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(Cd,{...o,ref:r,style:{...o.style,display:"block"}})})});Na.displayName=Ta;function Od(e){return e!==null}var Md=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,l=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=Pa(r),h={start:"0%",center:"50%",end:"100%"}[f],v=(((b=o.arrow)==null?void 0:b.x)??0)+l/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",p="";return d==="bottom"?(y=s?h:`${v}px`,p=`${-u}px`):d==="top"?(y=s?h:`${v}px`,p=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,p=s?h:`${m}px`):d==="left"&&(y=`${n.floating.width+u}px`,p=s?h:`${m}px`),{data:{x:y,y:p}}}});function Pa(e){const[t,r="center"]=e.split("-");return[t,r]}var kd=xa,Dd=Ca,_d=Ea,Id=Na,Ld="VisuallyHidden",Yt=i.forwardRef((e,t)=>c.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Yt.displayName=Ld;var Fd=Yt,[Xt,uf]=it("Tooltip",[ya]),qt=ya(),Aa="TooltipProvider",$d=700,Zr="tooltip.open",[Rd,Qr]=Xt(Aa),Oa=e=>{const{__scopeTooltip:t,delayDuration:r=$d,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),c.jsx(Rd,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};Oa.displayName=Aa;var Zt="Tooltip",[zd,ut]=Xt(Zt),Ma=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,u=Qr(Zt,e.__scopeTooltip),d=qt(t),[f,h]=i.useState(null),v=yt(),m=i.useRef(0),y=s??u.disableHoverableContent,p=l??u.delayDuration,g=i.useRef(!1),[b=!1,w]=gr({prop:n,defaultProp:o,onChange:N=>{N?(u.onOpen(),document.dispatchEvent(new CustomEvent(Zr))):u.onClose(),a==null||a(N)}}),x=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),S=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),E=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},p)},[p,w]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),c.jsx(kd,{...d,children:c.jsx(zd,{scope:t,contentId:v,open:b,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?C():S()},[u.isOpenDelayed,C,S]),onTriggerLeave:i.useCallback(()=>{y?E():(window.clearTimeout(m.current),m.current=0)},[E,y]),onOpen:S,onClose:E,disableHoverableContent:y,children:r})})};Ma.displayName=Zt;var Jr="TooltipTrigger",ka=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ut(Jr,r),a=Qr(Jr,r),s=qt(r),l=i.useRef(null),u=ee(t,l,o.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),h=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(Dd,{asChild:!0,...s,children:c.jsx(K.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:U(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:U(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});ka.displayName=Jr;var en="TooltipPortal",[Wd,Bd]=Xt(en,{forceMount:void 0}),Da=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=ut(en,t);return c.jsx(Wd,{scope:t,forceMount:r,children:c.jsx(Fe,{present:r||a.open,children:c.jsx(xt,{asChild:!0,container:o,children:n})})})};Da.displayName=en;var tt="TooltipContent",_a=i.forwardRef((e,t)=>{const r=Bd(tt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=ut(tt,e.__scopeTooltip);return c.jsx(Fe,{present:n||s.open,children:s.disableHoverableContent?c.jsx(Ia,{side:o,...a,ref:t}):c.jsx(Vd,{side:o,...a,ref:t})})}),Vd=i.forwardRef((e,t)=>{const r=ut(tt,e.__scopeTooltip),n=Qr(tt,e.__scopeTooltip),o=i.useRef(null),a=ee(t,o),[s,l]=i.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:h}=n,v=i.useCallback(()=>{l(null),h(!1)},[h]),m=i.useCallback((y,p)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=Ud(b,g.getBoundingClientRect()),x=Kd(b,w),S=Yd(p.getBoundingClientRect()),E=qd([...x,...S]);l(E),h(!0)},[h]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(u&&f){const y=g=>m(g,f),p=g=>m(g,u);return u.addEventListener("pointerleave",y),f.addEventListener("pointerleave",p),()=>{u.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",p)}}},[u,f,m,v]),i.useEffect(()=>{if(s){const y=p=>{const g=p.target,b={x:p.clientX,y:p.clientY},w=(u==null?void 0:u.contains(g))||(f==null?void 0:f.contains(g)),x=!Xd(b,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,f,s,d,v]),c.jsx(Ia,{...e,ref:a})}),[Hd,jd]=Xt(Zt,{isInside:!1}),Ia=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,u=ut(tt,r),d=qt(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(Zr,f),()=>document.removeEventListener(Zr,f)),[f]),i.useEffect(()=>{if(u.trigger){const h=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,f]),c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:c.jsxs(_d,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ro,{children:n}),c.jsx(Hd,{scope:r,isInside:!0,children:c.jsx(Fd,{id:u.contentId,role:"tooltip",children:o||n})})]})})});_a.displayName=tt;var La="TooltipArrow",Gd=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=qt(r);return jd(La,r).isInside?null:c.jsx(Id,{...o,...n,ref:t})});Gd.displayName=La;function Ud(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Kd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Yd(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Xd(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(o=!o)}return o}function qd(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Zd(t)}function Zd(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Qd=Oa,Jd=Ma,eu=ka,tu=Da,Fa=_a;const rt=Qd,nt=Jd,ot=eu,ze=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(tu,{children:c.jsx(Fa,{ref:n,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ze.displayName=Fa.displayName;const Qt=i.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:o,...a},s)=>{const[l,u]=i.useState(!1),d=i.useRef(null),h=o||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),v=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",m=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};i.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const y=p=>{if(r){const g=p.target.value;let b=g;if(g.length>0){const w=g[g.length-1];/[^a-zA-Z0-9]/.test(w)&&(console.log("Non-alphanumeric detected:",w),m())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let S=0;S<Math.min(w.length,6);S++){const E=w[S];S===0||S===2||S===4?/[A-Z]/.test(E)&&(x+=E):(S===1||S===3||S===5)&&/[0-9]/.test(E)&&(x+=E)}x.length<=3?b=x:b=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const w=g.replace(/\D/g,"");w.length<=5?b=w:b=`${w.slice(0,5)}-${w.slice(5,9)}`}p.target.value=b}n==null||n(p)};return c.jsx(rt,{children:c.jsxs(nt,{open:l&&!!r,children:[c.jsx(ot,{asChild:!0,children:c.jsx("input",{type:t,className:D("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:y,placeholder:h,ref:s,...a})}),c.jsx(ze,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:v()})]})})});Qt.displayName="Input";var ru="Separator",$a="horizontal",nu=["horizontal","vertical"],Ra=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=$a,...o}=e,a=ou(n)?n:$a,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return c.jsx(K.div,{"data-orientation":a,...l,...o,ref:t})});Ra.displayName=ru;function ou(e){return nu.includes(e)}var za=Ra;const tn=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>c.jsx(za,{ref:o,decorative:r,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));tn.displayName=za.displayName;const Wa=Mr,au=Ko,su=Lt,Ba=Yo,rn=i.forwardRef(({className:e,...t},r)=>c.jsx(kt,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));rn.displayName=kt.displayName;const iu=Rt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),nn=i.forwardRef(({side:e="right",className:t,children:r,...n},o)=>c.jsxs(Ba,{children:[c.jsx(rn,{}),c.jsxs(Dt,{ref:o,className:D(iu({side:e}),t),...n,children:[c.jsxs(Lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(lr,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));nn.displayName=Dt.displayName;const Va=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});Va.displayName="SheetHeader";const Ha=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ha.displayName="SheetFooter";const ja=i.forwardRef(({className:e,...t},r)=>c.jsx(_t,{ref:r,className:D("text-lg font-semibold text-foreground",e),...t}));ja.displayName=_t.displayName;const Ga=i.forwardRef(({className:e,...t},r)=>c.jsx(It,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));Ga.displayName=It.displayName;function lu({onClick:e,publicName:t,applicationName:r,partnerId:n}){const o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[a,s]=X.useState(!1),l=()=>{s(!0)};return c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:a?c.jsx(pe,{asChild:!0,size:"icon",onClick:e,children:c.jsx(ci,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):c.jsx(pe,{asChild:!0,size:"icon",onClick:e,children:c.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:l})})}),c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),c.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var cu="Label",Ua=i.forwardRef((e,t)=>c.jsx(K.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ua.displayName=cu;var du=Ua;function uu({className:e,...t}){return c.jsx(du,{"data-slot":"label",className:D("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const on=1024;function Ka(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${on-1}px)`),n=()=>{t(window.innerWidth<on)};return r.addEventListener("change",n),t(window.innerWidth<on),()=>r.removeEventListener("change",n)},[]),!!e}function an({className:e,...t}){return c.jsx("div",{className:D("animate-pulse rounded-md bg-primary/20",e),...t})}const fu="sidebar:state",pu=60*60*24*7,hu="16rem",gu="18rem",mu="3rem",vu="b",Ya=i.createContext(null);function ft(){const e=i.useContext(Ya);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const sn=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:a,...s},l)=>{const u=Ka(),[d,f]=i.useState(!1),[h,v]=i.useState(e),m=t??h,y=i.useCallback(w=>{const x=typeof w=="function"?w(m):w;r?r(x):v(x),document.cookie=`${fu}=${x}; path=/; max-age=${pu}`},[r,m]),p=i.useCallback(()=>u?f(w=>!w):y(w=>!w),[u,y,f]);i.useEffect(()=>{const w=x=>{x.key===vu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),p())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[p]);const g=m?"expanded":"collapsed",b=i.useMemo(()=>({state:g,open:m,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:p}),[g,m,y,u,d,f,p]);return c.jsx(Ya.Provider,{value:b,children:c.jsx(rt,{delayDuration:0,children:c.jsx("div",{style:{"--sidebar-width":hu,"--sidebar-width-icon":mu,...o},className:D("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...s,children:a})})})});sn.displayName="SidebarProvider";const ln=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...a},s)=>{const{isMobile:l,state:u,openMobile:d,setOpenMobile:f}=ft();return r==="none"?c.jsx("div",{className:D("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:s,...a,children:o}):l?c.jsx(Wa,{open:d,onOpenChange:f,...a,children:c.jsx(nn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":gu},side:e,children:c.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):c.jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[c.jsx("div",{className:D("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),c.jsx("div",{className:D("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:c.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});ln.displayName="Sidebar";const cn=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=ft();return c.jsxs(pe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:D("h-7 w-7 text-sidebar-foreground",e),onClick:a=>{t==null||t(a),o()},...r,children:[c.jsx(si,{}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});cn.displayName="SidebarTrigger";const Xa=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=ft();return c.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:D("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Xa.displayName="SidebarRail";const qa=i.forwardRef(({className:e,...t},r)=>c.jsx("main",{ref:r,className:D("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));qa.displayName="SidebarInset";const Za=i.forwardRef(({className:e,...t},r)=>c.jsx(Qt,{ref:r,"data-sidebar":"input",className:D("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Za.displayName="SidebarInput";const dn=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"header",className:D("flex flex-col gap-2 p-2",e),...t}));dn.displayName="SidebarHeader";const un=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"footer",className:D("flex flex-col gap-2 p-2",e),...t}));un.displayName="SidebarFooter";const Qa=i.forwardRef(({className:e,...t},r)=>c.jsx(tn,{ref:r,"data-sidebar":"separator",className:D("mx-2 w-auto bg-sidebar-border",e),...t}));Qa.displayName="SidebarSeparator";const fn=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"content",className:D("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));fn.displayName="SidebarContent";const Ja=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"group",className:D("relative flex w-full min-w-0 flex-col p-2",e),...t}));Ja.displayName="SidebarGroup";const es=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?ue:"div";return c.jsx(o,{ref:n,"data-sidebar":"group-label",className:D("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});es.displayName="SidebarGroupLabel";const ts=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?ue:"button";return c.jsx(o,{ref:n,"data-sidebar":"group-action",className:D("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});ts.displayName="SidebarGroupAction";const rs=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"group-content",className:D("w-full text-sm",e),...t}));rs.displayName="SidebarGroupContent";const pn=i.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,"data-sidebar":"menu",className:D("flex w-full min-w-0 flex-col gap-1",e),...t}));pn.displayName="SidebarMenu";const hn=i.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,"data-sidebar":"menu-item",className:D("group/menu-item relative",e),...t}));hn.displayName="SidebarMenuItem";const bu=Rt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),gn=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:o,className:a,...s},l)=>{const u=e?ue:"button",{isMobile:d,state:f}=ft(),h=c.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:D(bu({variant:r,size:n}),a),...s});return o?(typeof o=="string"&&(o={children:o}),c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:h}),c.jsx(ze,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):h});gn.displayName="SidebarMenuButton";const ns=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const a=t?ue:"button";return c.jsx(a,{ref:o,"data-sidebar":"menu-action",className:D("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});ns.displayName="SidebarMenuAction";const os=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:D("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));os.displayName="SidebarMenuBadge";const as=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return c.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:D("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&c.jsx(an,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),c.jsx(an,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});as.displayName="SidebarMenuSkeleton";const ss=i.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:D("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));ss.displayName="SidebarMenuSub";const is=i.forwardRef(({...e},t)=>c.jsx("li",{ref:t,...e}));is.displayName="SidebarMenuSubItem";const ls=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},a)=>{const s=e?ue:"a";return c.jsx(s,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:D("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});ls.displayName="SidebarMenuSubButton";function yu(e){const t=e+"CollectionProvider",[r,n]=it(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:p}=m,g=X.useRef(null),b=X.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:p})};s.displayName=t;const l=e+"CollectionSlot",u=X.forwardRef((m,y)=>{const{scope:p,children:g}=m,b=a(l,p),w=ee(y,b.collectionRef);return c.jsx(ue,{ref:w,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=X.forwardRef((m,y)=>{const{scope:p,children:g,...b}=m,w=X.useRef(null),x=ee(y,w),S=a(d,p);return X.useEffect(()=>(S.itemMap.set(w,{ref:w,...b}),()=>void S.itemMap.delete(w))),c.jsx(ue,{[f]:"",ref:x,children:g})});h.displayName=d;function v(m){const y=a(e+"CollectionConsumer",m);return X.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((S,E)=>b.indexOf(S.ref.current)-b.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},v,n]}var mn="ToastProvider",[vn,wu,xu]=yu("Toast"),[cs,ff]=it("Toast",[xu]),[Su,Jt]=cs(mn),ds=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),h=i.useRef(!1),v=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${mn}\`. Expected non-empty \`string\`.`),c.jsx(vn.Provider,{scope:t,children:c.jsx(Su,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(m=>m+1),[]),onToastRemove:i.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:s})})};ds.displayName=mn;var us="ToastViewport",Cu=["F8"],bn="toast.viewportPause",yn="toast.viewportResume",fs=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Cu,label:o="Notifications ({hotkey})",...a}=e,s=Jt(us,r),l=wu(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),h=i.useRef(null),v=ee(t,h,s.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=s.toastCount>0;i.useEffect(()=>{const g=b=>{var x;n.length!==0&&n.every(S=>b[S]||b.code===S)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),i.useEffect(()=>{const g=u.current,b=h.current;if(y&&g&&b){const w=()=>{if(!s.isClosePausedRef.current){const C=new CustomEvent(bn);b.dispatchEvent(C),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const C=new CustomEvent(yn);b.dispatchEvent(C),s.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&x()},E=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",S),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",E),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,s.isClosePausedRef]);const p=i.useCallback(({tabbingDirection:g})=>{const w=l().map(x=>{const S=x.ref.current,E=[S,...Fu(S)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?w.reverse():w).flat()},[l]);return i.useEffect(()=>{const g=h.current;if(g){const b=w=>{var E,C,N;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const R=document.activeElement,I=w.shiftKey;if(w.target===g&&I){(E=d.current)==null||E.focus();return}const W=p({tabbingDirection:I?"backwards":"forwards"}),_=W.findIndex(P=>P===R);Sn(W.slice(_+1))?w.preventDefault():I?(C=d.current)==null||C.focus():(N=f.current)==null||N.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[l,p]),c.jsxs(vl,{ref:u,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(wn,{ref:d,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});Sn(g)}}),c.jsx(vn.Slot,{scope:r,children:c.jsx(K.ol,{tabIndex:-1,...a,ref:v})}),y&&c.jsx(wn,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});Sn(g)}})]})});fs.displayName=us;var ps="ToastFocusProxy",wn=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=Jt(ps,r);return c.jsx(Yt,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var d;const l=s.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&n()}})});wn.displayName=ps;var er="Toast",Eu="toast.swipeStart",Tu="toast.swipeMove",Nu="toast.swipeCancel",Pu="toast.swipeEnd",hs=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...s}=e,[l=!0,u]=gr({prop:n,defaultProp:o,onChange:a});return c.jsx(Fe,{present:r||l,children:c.jsx(Mu,{open:l,...s,ref:t,onClose:()=>u(!1),onPause:ce(e.onPause),onResume:ce(e.onResume),onSwipeStart:U(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:U(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:U(e.onSwipeEnd,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});hs.displayName=er;var[Au,Ou]=cs(er,{onClose(){}}),Mu=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:m,...y}=e,p=Jt(er,r),[g,b]=i.useState(null),w=ee(t,P=>b(P)),x=i.useRef(null),S=i.useRef(null),E=o||p.duration,C=i.useRef(0),N=i.useRef(E),R=i.useRef(0),{onToastAdd:I,onToastRemove:z}=p,H=ce(()=>{var B;(g==null?void 0:g.contains(document.activeElement))&&((B=p.viewport)==null||B.focus()),s()}),W=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(R.current),C.current=new Date().getTime(),R.current=window.setTimeout(H,P))},[H]);i.useEffect(()=>{const P=p.viewport;if(P){const B=()=>{W(N.current),d==null||d()},M=()=>{const j=new Date().getTime()-C.current;N.current=N.current-j,window.clearTimeout(R.current),u==null||u()};return P.addEventListener(bn,M),P.addEventListener(yn,B),()=>{P.removeEventListener(bn,M),P.removeEventListener(yn,B)}}},[p.viewport,E,u,d,W]),i.useEffect(()=>{a&&!p.isClosePausedRef.current&&W(E)},[a,E,p.isClosePausedRef,W]),i.useEffect(()=>(I(),()=>z()),[I,z]);const _=i.useMemo(()=>g?xs(g):null,[g]);return p.viewport?c.jsxs(c.Fragment,{children:[_&&c.jsx(ku,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),c.jsx(Au,{scope:r,onClose:H,children:ir.createPortal(c.jsx(vn.ItemSlot,{scope:r,children:c.jsx(ml,{asChild:!0,onEscapeKeyDown:U(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||H(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(K.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:U(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:U(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,M=P.clientY-x.current.y,j=!!S.current,k=["left","right"].includes(p.swipeDirection),F=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Y=k?F(0,B):0,Z=k?0:F(0,M),re=P.pointerType==="touch"?10:2,J={x:Y,y:Z},te={originalEvent:P,delta:J};j?(S.current=J,tr(Tu,h,te,{discrete:!1})):Ss(J,p.swipeDirection,re)?(S.current=J,tr(Eu,f,te,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>re||Math.abs(M)>re)&&(x.current=null)}),onPointerUp:U(e.onPointerUp,P=>{const B=S.current,M=P.target;if(M.hasPointerCapture(P.pointerId)&&M.releasePointerCapture(P.pointerId),S.current=null,x.current=null,B){const j=P.currentTarget,k={originalEvent:P,delta:B};Ss(B,p.swipeDirection,p.swipeThreshold)?tr(Pu,m,k,{discrete:!0}):tr(Nu,v,k,{discrete:!0}),j.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),ku=e=>{const{__scopeToast:t,children:r,...n}=e,o=Jt(er,t),[a,s]=i.useState(!1),[l,u]=i.useState(!1);return Iu(()=>s(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:c.jsx(xt,{asChild:!0,children:c.jsx(Yt,{...n,children:a&&c.jsxs(c.Fragment,{children:[o.label," ",r]})})})},Du="ToastTitle",gs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(K.div,{...n,ref:t})});gs.displayName=Du;var _u="ToastDescription",ms=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(K.div,{...n,ref:t})});ms.displayName=_u;var vs="ToastAction",bs=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(ws,{altText:r,asChild:!0,children:c.jsx(xn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${vs}\`. Expected non-empty \`string\`.`),null)});bs.displayName=vs;var ys="ToastClose",xn=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Ou(ys,r);return c.jsx(ws,{asChild:!0,children:c.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});xn.displayName=ys;var ws=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return c.jsx(K.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function xs(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Lu(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...xs(n))}}),t}function tr(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?no(o,a):o.dispatchEvent(a)}var Ss=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function Iu(e=()=>{}){const t=ce(e);Ne(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Lu(e){return e.nodeType===e.ELEMENT_NODE}function Fu(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var $u=ds,Cs=fs,Es=hs,Ts=gs,Ns=ms,Ps=bs,As=xn;const Os=$u,Cn=i.forwardRef(({className:e,...t},r)=>c.jsx(Cs,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Cn.displayName=Cs.displayName;const Ru=Rt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),En=i.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(Es,{ref:n,className:D(Ru({variant:t}),e),...r}));En.displayName=Es.displayName;const Ms=i.forwardRef(({className:e,...t},r)=>c.jsx(Ps,{ref:r,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));Ms.displayName=Ps.displayName;const Tn=i.forwardRef(({className:e,...t},r)=>c.jsx(As,{ref:r,className:D("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(lr,{className:"h-4 w-4"})}));Tn.displayName=As.displayName;const Nn=i.forwardRef(({className:e,...t},r)=>c.jsx(Ts,{ref:r,className:D("text-sm font-semibold [&+div]:text-xs",e),...t}));Nn.displayName=Ts.displayName;const Pn=i.forwardRef(({className:e,...t},r)=>c.jsx(Ns,{ref:r,className:D("text-sm opacity-90",e),...t}));Pn.displayName=Ns.displayName;const zu=1,Wu=1e6;let An=0;function Bu(){return An=(An+1)%Number.MAX_SAFE_INTEGER,An.toString()}const On=new Map,ks=e=>{if(On.has(e))return;const t=setTimeout(()=>{On.delete(e),pt({type:"REMOVE_TOAST",toastId:e})},Wu);On.set(e,t)},Vu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,zu)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?ks(r):e.toasts.forEach(n=>ks(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},rr=[];let nr={toasts:[]};function pt(e){nr=Vu(nr,e),rr.forEach(t=>t(nr))}function Ds({...e}){const t=Bu(),r=o=>pt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>pt({type:"DISMISS_TOAST",toastId:t});return pt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function Mn(){const[e,t]=i.useState(nr);return i.useEffect(()=>(rr.push(t),()=>{const r=rr.indexOf(t);r>-1&&rr.splice(r,1)}),[]),{...e,toast:Ds,dismiss:r=>pt({type:"DISMISS_TOAST",toastId:r})}}function _s(){const{toasts:e}=Mn();return c.jsxs(Os,{children:[e.map(function({id:t,title:r,description:n,action:o,...a}){return c.jsxs(En,{...a,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(Nn,{children:r}),n&&c.jsx(Pn,{children:n})]}),o,c.jsx(Tn,{})]},t)}),c.jsx(Cn,{})]})}function Is({onSignOut:e,searchResultsRouteName:t,rightMenu:r}){const[n,o]=X.useState(""),a=mt.useNavigate(),s=mt.useLocation(),{toast:l}=Mn();X.useEffect(()=>{const h=new URLSearchParams(s.search).get("q");h&&o(h)},[s.search]);const u=()=>{const f=n.trim();if(!f||f.length<2){l({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}const h=new URLSearchParams({q:f});a({pathname:t,search:h.toString()})},d=f=>{f.key==="Enter"&&u()};return c.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[c.jsx(cn,{className:"lg:hidden",children:c.jsx(oi,{className:"h-6 w-6"})}),c.jsx("div",{className:"flex flex-1 items-center gap-4",children:c.jsx("div",{className:"relative w-full max-w-sm",children:c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:u,"aria-label":"Search",children:c.jsx(li,{className:"h-4 w-4 text-muted-foreground"})}),c.jsx(Qt,{placeholder:"Search...",className:"w-full pl-8 bg-white text-black",value:n,onChange:f=>o(f.target.value),onKeyDown:d})]})})}),r||c.jsx(c.Fragment,{}),e&&c.jsx("div",{className:"flex items-center gap-4",children:c.jsxs(pe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[c.jsx(ni,{className:"h-4 w-4 text-sidebar-foreground"}),c.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Ls({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=mt.useParams(),o=e.filter(a=>a.showInNav);return c.jsxs(ln,{className:"border-r border-sidebar-border",children:[c.jsx(dn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"flex items-center justify-center",children:c.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),c.jsx("span",{className:"font-semibold text-lg",children:r})]})}),c.jsx(fn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:c.jsx(pn,{children:o.map(a=>{const s=a.icon,l=`/${a.path.replace(":appID",n)}`;return c.jsx(hn,{children:c.jsx(gn,{asChild:!0,children:c.jsxs(mt.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[s&&c.jsx(s,{className:"h-4 w-4"}),c.jsx("span",{children:a.label})]})})},a.key)})})}),c.jsx(un,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function Hu({children:e,rightMenu:t,routes:r,footer:n,searchResultsRouteName:o,dashboardTitle:a,onSignOut:s}){return c.jsx(c.Fragment,{children:c.jsx(sn,{children:c.jsxs("div",{className:"flex grow",children:[c.jsx(Ls,{routes:r,footer:n,dashboardTitle:a}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx(Is,{onSignOut:s,rightMenu:t,searchResultsRouteName:o}),c.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),c.jsx(_s,{})]})]})})})}const ju={sm:100,md:200,lg:300,xl:400};function Gu({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[o,a]=i.useState(!1),[s,l]=i.useState(!1),[u,d]=i.useState(!1),[f,h]=i.useState(!1),v=`https://api.randmar.io/Product/${e}/Video`;i.useEffect(()=>{(async()=>{try{const x=await(await fetch(v+"/Exists")).json();l(x)}catch(w){console.error("Error checking for video:",w),l(!1)}})()},[e,v]);async function m(){if(s){h(!0);try{const w=await(await fetch(v)).blob(),x=window.URL.createObjectURL(w),S=document.createElement("a");S.href=x,S.download=`${e||"product"}-video.mp4`,document.body.appendChild(S),S.click(),document.body.removeChild(S),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{h(!1)}}}function y(){navigator.clipboard.writeText(v),d(!0),setTimeout(()=>{d(!1)},2e3)}function p(){a(!0)}const g=ju[t||"xl"];return c.jsxs(c.Fragment,{children:[c.jsx(Ft,{open:o,onOpenChange:a,children:c.jsx($t,{className:"max-w-4xl p-0 overflow-hidden",children:n?c.jsxs("div",{className:"flex flex-row",children:[c.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[c.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),c.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):c.jsxs("div",{className:"w-full relative",children:[c.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[c.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),c.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",onClick:y,children:u?c.jsx(ei,{className:"h-4 w-4"}):c.jsx(ti,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Copy video link"})})]})}),c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",onClick:m,disabled:f,children:c.jsx(ri,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Download video"})})]})})]})]})})}),c.jsxs("div",{className:"relative w-max h-max",children:[c.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${s?"cursor-pointer":""}`,onClick:s?p:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${g*1.5}&height=${g*1.5}`,width:g,height:g}),s&&c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:p,children:c.jsx(ii,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Play video"})})]})})]})]})}T.AvatarFooter=lu,T.Button=pe,T.Dialog=Ft,T.DialogClose=kr,T.DialogContent=$t,T.DialogDescription=Lr,T.DialogFooter=_r,T.DialogHeader=Dr,T.DialogTitle=Ir,T.DialogTrigger=Xo,T.Input=Qt,T.InputOTP=qi,T.InputOTPGroup=Zi,T.InputOTPSeparator=Ji,T.InputOTPSlot=Qi,T.Label=uu,T.Layout=Hu,T.Navbar=Ls,T.ProductImage=Gu,T.Separator=tn,T.Sheet=Wa,T.SheetClose=su,T.SheetContent=nn,T.SheetDescription=Ga,T.SheetFooter=Ha,T.SheetHeader=Va,T.SheetOverlay=rn,T.SheetPortal=Ba,T.SheetTitle=ja,T.SheetTrigger=au,T.Sidebar=ln,T.SidebarContent=fn,T.SidebarFooter=un,T.SidebarGroup=Ja,T.SidebarGroupAction=ts,T.SidebarGroupContent=rs,T.SidebarGroupLabel=es,T.SidebarHeader=dn,T.SidebarInput=Za,T.SidebarInset=qa,T.SidebarMenu=pn,T.SidebarMenuAction=ns,T.SidebarMenuBadge=os,T.SidebarMenuButton=gn,T.SidebarMenuItem=hn,T.SidebarMenuSkeleton=as,T.SidebarMenuSub=ss,T.SidebarMenuSubButton=ls,T.SidebarMenuSubItem=is,T.SidebarProvider=sn,T.SidebarRail=Xa,T.SidebarSeparator=Qa,T.SidebarTrigger=cn,T.Skeleton=an,T.Toast=En,T.ToastAction=Ms,T.ToastClose=Tn,T.ToastDescription=Pn,T.ToastProvider=Os,T.ToastTitle=Nn,T.ToastViewport=Cn,T.Toaster=_s,T.Tooltip=nt,T.TooltipContent=ze,T.TooltipProvider=rt,T.TooltipTrigger=ot,T.Topbar=Is,T.buttonVariants=Fr,T.toast=Ds,T.useIsMobile=Ka,T.useSidebar=ft,T.useToast=Mn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
139
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Cc="DialogDescriptionWarning",Ec=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ko(Cc).contentName}}.`;return i.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Mr=_o,Yo=Lo,Xo=$o,kt=Ro,Dt=zo,_t=Bo,It=Ho,Lt=Go;const Ft=({modal:e=!1,...t})=>c.jsx(Mr,{modal:e,...t});Ft.displayName=Mr.displayName;const qo=Yo,Zo=Xo,kr=Lt,Dr=i.forwardRef(({className:e,...t},r)=>c.jsx(kt,{ref:r,className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Dr.displayName=kt.displayName;const $t=i.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Zo,{children:[c.jsx(Dr,{}),c.jsxs(Dt,{ref:n,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,c.jsxs(Lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(lr,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$t.displayName=Dt.displayName;const _r=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_r.displayName="DialogHeader";const Ir=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ir.displayName="DialogFooter";const Lr=i.forwardRef(({className:e,...t},r)=>c.jsx(_t,{ref:r,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Lr.displayName=_t.displayName;const Fr=i.forwardRef(({className:e,...t},r)=>c.jsx(It,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));Fr.displayName=It.displayName;const Qo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Jo=Hn,Rt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Jo(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=r==null?void 0:r[d],h=a==null?void 0:a[d];if(f===null)return null;const v=Qo(f)||Qo(h);return o[d][v]}),l=r&&Object.entries(r).reduce((d,f)=>{let[h,v]=f;return v===void 0||(d[h]=v),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:h,className:v,...m}=f;return Object.entries(m).every(y=>{let[p,g]=y;return Array.isArray(g)?g.includes({...a,...l}[p]):{...a,...l}[p]===g})?[...d,h,v]:d},[]);return Jo(e,s,u,r==null?void 0:r.class,r==null?void 0:r.className)},$r=Rt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),pe=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:a,...s},l)=>{const u=n?ue:"button";if(!o)return c.jsx(u,{className:D($r({variant:t,size:r,className:e})),ref:l,onClick:a,...s});a&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:d,content:f,onConfirm:h,confirmText:v="Confirm",cancelText:m="Cancel"}=o,y=()=>{h()};return c.jsxs(Ft,{children:[c.jsx(qo,{asChild:!0,children:c.jsx(u,{className:D($r({variant:t,size:r,className:e})),ref:l,...s})}),c.jsxs($t,{children:[c.jsxs(_r,{children:[c.jsx(Lr,{children:d}),c.jsx(Fr,{children:f})]}),c.jsxs(Ir,{className:"flex justify-end gap-2 pt-4",children:[c.jsx(kr,{asChild:!0,children:c.jsx(pe,{variant:"outline",children:m})}),c.jsx(kr,{asChild:!0,children:c.jsx(pe,{onClick:y,children:v})})]})]})]})});pe.displayName="Button";const Tc=["top","right","bottom","left"],Ae=Math.min,ae=Math.max,zt=Math.round,Wt=Math.floor,be=e=>({x:e,y:e}),Nc={left:"right",right:"left",bottom:"top",top:"bottom"},Pc={start:"end",end:"start"};function Rr(e,t,r){return ae(e,Ae(t,r))}function Se(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function zr(e){return e==="x"?"y":"x"}function Wr(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(Ce(e))?"y":"x"}function Br(e){return zr(Oe(e))}function Ac(e,t,r){r===void 0&&(r=!1);const n=Ze(e),o=Br(e),a=Wr(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bt(s)),[s,Bt(s)]}function Oc(e){const t=Bt(e);return[Vr(e),t,Vr(t)]}function Vr(e){return e.replace(/start|end/g,t=>Pc[t])}function Mc(e,t,r){const n=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?a:s;default:return[]}}function kc(e,t,r,n){const o=Ze(e);let a=Mc(Ce(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Vr)))),a}function Bt(e){return e.replace(/left|right|bottom|top/g,t=>Nc[t])}function Dc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ea(e){return typeof e!="number"?Dc(e):{top:e,right:e,bottom:e,left:e}}function Vt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ta(e,t,r){let{reference:n,floating:o}=e;const a=Oe(t),s=Br(t),l=Wr(s),u=Ce(t),d=a==="y",f=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[l]/2-o[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}switch(Ze(t)){case"start":m[s]-=v*(r&&d?-1:1);break;case"end":m[s]+=v*(r&&d?-1:1);break}return m}const _c=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,l=a.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=ta(d,n,u),v=n,m={},y=0;for(let p=0;p<l.length;p++){const{name:g,fn:b}=l[p],{x:w,y:x,data:S,reset:E}=await b({x:f,y:h,initialPlacement:n,placement:v,strategy:o,middlewareData:m,rects:d,platform:s,elements:{reference:e,floating:t}});f=w??f,h=x??h,m={...m,[g]:{...m[g],...S}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:h}=ta(d,v,u)),p=-1)}return{x:f,y:h,placement:v,strategy:o,middlewareData:m}};async function lt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Se(t,e),y=ea(m),g=l[v?h==="floating"?"reference":"floating":h],b=Vt(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),w=h==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Vt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:u}):w);return{top:(b.top-E.top+y.top)/S.y,bottom:(E.bottom-b.bottom+y.bottom)/S.y,left:(b.left-E.left+y.left)/S.x,right:(E.right-b.right+y.right)/S.x}}const Ic=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=Se(e,t)||{};if(d==null)return{};const h=ea(f),v={x:r,y:n},m=Br(o),y=Wr(m),p=await s.getDimensions(d),g=m==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[m]-v[m]-a.floating[y],E=v[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=C?C[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(C)))&&(N=l.floating[x]||a.floating[y]);const R=S/2-E/2,I=N/2-p[y]/2-1,z=Ae(h[b],I),H=Ae(h[w],I),W=z,_=N-p[y]-H,P=N/2-p[y]/2+R,B=Rr(W,P,_),M=!u.arrow&&Ze(o)!=null&&P!==B&&a.reference[y]/2-(P<W?z:H)-p[y]/2<0,j=M?P<W?P-W:P-_:0;return{[m]:v[m]+j,data:{[m]:B,centerOffset:P-B-j,...M&&{alignmentOffset:j}},reset:M}}}),Lc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...g}=Se(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=Ce(o),w=Oe(l),x=Ce(l)===l,S=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=v||(x||!p?[Bt(l)]:Oc(l)),C=y!=="none";!v&&C&&E.push(...kc(l,p,y,S));const N=[l,...E],R=await lt(t,g),I=[];let z=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&I.push(R[b]),h){const P=Ac(o,s,S);I.push(R[P[0]],R[P[1]])}if(z=[...z,{placement:o,overflows:I}],!I.every(P=>P<=0)){var H,W;const P=(((H=a.flip)==null?void 0:H.index)||0)+1,B=N[P];if(B)return{data:{index:P,overflows:z},reset:{placement:B}};let M=(W=z.filter(j=>j.overflows[0]<=0).sort((j,k)=>j.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!M)switch(m){case"bestFit":{var _;const j=(_=z.filter(k=>{if(C){const F=Oe(k.placement);return F===w||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,Y)=>F+Y,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:_[0];j&&(M=j);break}case"initialPlacement":M=l;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function ra(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function na(e){return Tc.some(t=>e[t]>=0)}const Fc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Se(e,t);switch(n){case"referenceHidden":{const a=await lt(t,{...o,elementContext:"reference"}),s=ra(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:na(s)}}}case"escaped":{const a=await lt(t,{...o,altBoundary:!0}),s=ra(a,r.floating);return{data:{escapedOffsets:s,escaped:na(s)}}}default:return{}}}}};async function $c(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ce(r),l=Ze(r),u=Oe(r)==="y",d=["left","top"].includes(s)?-1:1,f=a&&u?-1:1,h=Se(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),u?{x:m*f,y:v*d}:{x:v*d,y:m*f}}const Rc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:l}=t,u=await $c(t,e);return s===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:s}}}}},zc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Se(e,t),d={x:r,y:n},f=await lt(t,u),h=Oe(Ce(o)),v=zr(h);let m=d[v],y=d[h];if(a){const g=v==="y"?"top":"left",b=v==="y"?"bottom":"right",w=m+f[g],x=m-f[b];m=Rr(w,m,x)}if(s){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=y+f[g],x=y-f[b];y=Rr(w,y,x)}const p=l.fn({...t,[v]:m,[h]:y});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[v]:a,[h]:s}}}}}},Wc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=Se(e,t),f={x:r,y:n},h=Oe(o),v=zr(h);let m=f[v],y=f[h];const p=Se(l,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const x=v==="y"?"height":"width",S=a.reference[v]-a.floating[x]+g.mainAxis,E=a.reference[v]+a.reference[x]-g.mainAxis;m<S?m=S:m>E&&(m=E)}if(d){var b,w;const x=v==="y"?"width":"height",S=["top","left"].includes(Ce(o)),E=a.reference[h]-a.floating[x]+(S&&((b=s.offset)==null?void 0:b[h])||0)+(S?0:g.crossAxis),C=a.reference[h]+a.reference[x]+(S?0:((w=s.offset)==null?void 0:w[h])||0)-(S?g.crossAxis:0);y<E?y=E:y>C&&(y=C)}return{[v]:m,[h]:y}}}},Bc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:l}=t,{apply:u=()=>{},...d}=Se(e,t),f=await lt(t,d),h=Ce(o),v=Ze(o),m=Oe(o)==="y",{width:y,height:p}=a.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=v===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=h,g=v==="end"?"top":"bottom");const w=p-f.top-f.bottom,x=y-f.left-f.right,S=Ae(p-f[g],w),E=Ae(y-f[b],x),C=!t.middlewareData.shift;let N=S,R=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),C&&!v){const z=ae(f.left,0),H=ae(f.right,0),W=ae(f.top,0),_=ae(f.bottom,0);m?R=y-2*(z!==0||H!==0?z+H:ae(f.left,f.right)):N=p-2*(W!==0||_!==0?W+_:ae(f.top,f.bottom))}await u({...t,availableWidth:R,availableHeight:N});const I=await s.getDimensions(l.floating);return y!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function Ht(){return typeof window<"u"}function Qe(e){return oa(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(oa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oa(e){return Ht()?e instanceof Node||e instanceof se(e).Node:!1}function he(e){return Ht()?e instanceof Element||e instanceof se(e).Element:!1}function we(e){return Ht()?e instanceof HTMLElement||e instanceof se(e).HTMLElement:!1}function aa(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function ct(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Vc(e){return["table","td","th"].includes(Qe(e))}function jt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Hr(e){const t=jr(),r=he(e)?ge(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Hc(e){let t=Me(e);for(;we(t)&&!Je(t);){if(Hr(t))return t;if(jt(t))return null;t=Me(t)}return null}function jr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Je(e){return["html","body","#document"].includes(Qe(e))}function ge(e){return se(e).getComputedStyle(e)}function Gt(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(Qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aa(e)&&e.host||ye(e);return aa(t)?t.host:t}function sa(e){const t=Me(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&ct(t)?t:sa(t)}function dt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=sa(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=se(o);if(a){const l=Gr(s);return t.concat(s,s.visualViewport||[],ct(o)?o:[],l&&r?dt(l):[])}return t.concat(o,dt(o,[],r))}function Gr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ia(e){const t=ge(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=we(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,l=zt(r)!==a||zt(n)!==s;return l&&(r=a,n=s),{width:r,height:n,$:l}}function Ur(e){return he(e)?e:e.contextElement}function et(e){const t=Ur(e);if(!we(t))return be(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ia(t);let s=(a?zt(r.width):r.width)/n,l=(a?zt(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const jc=be(0);function la(e){const t=se(e);return!jr()||!t.visualViewport?jc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gc(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==se(e)?!1:t}function Re(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ur(e);let s=be(1);t&&(n?he(n)&&(s=et(n)):s=et(e));const l=Gc(a,r,n)?la(a):be(0);let u=(o.left+l.x)/s.x,d=(o.top+l.y)/s.y,f=o.width/s.x,h=o.height/s.y;if(a){const v=se(a),m=n&&he(n)?se(n):n;let y=v,p=Gr(y);for(;p&&n&&m!==y;){const g=et(p),b=p.getBoundingClientRect(),w=ge(p),x=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*g.x,S=b.top+(p.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,f*=g.x,h*=g.y,u+=x,d+=S,y=se(p),p=Gr(y)}}return Vt({width:f,height:h,x:u,y:d})}function Kr(e,t){const r=Gt(e).scrollLeft;return t?t.left+r:Re(ye(e)).left+r}function ca(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Kr(e,n)),a=n.top+t.scrollTop;return{x:o,y:a}}function Uc(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=ye(n),l=t?jt(t.floating):!1;if(n===s||l&&a)return r;let u={scrollLeft:0,scrollTop:0},d=be(1);const f=be(0),h=we(n);if((h||!h&&!a)&&((Qe(n)!=="body"||ct(s))&&(u=Gt(n)),we(n))){const m=Re(n);d=et(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const v=s&&!h&&!a?ca(s,u,!0):be(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:r.y*d.y-u.scrollTop*d.y+f.y+v.y}}function Kc(e){return Array.from(e.getClientRects())}function Yc(e){const t=ye(e),r=Gt(e),n=e.ownerDocument.body,o=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Kr(e);const l=-r.scrollTop;return ge(n).direction==="rtl"&&(s+=ae(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:l}}function Xc(e,t){const r=se(e),n=ye(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,l=0,u=0;if(o){a=o.width,s=o.height;const d=jr();(!d||d&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:s,x:l,y:u}}function qc(e,t){const r=Re(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=we(e)?et(e):be(1),s=e.clientWidth*a.x,l=e.clientHeight*a.y,u=o*a.x,d=n*a.y;return{width:s,height:l,x:u,y:d}}function da(e,t,r){let n;if(t==="viewport")n=Xc(e,r);else if(t==="document")n=Yc(ye(e));else if(he(t))n=qc(t,r);else{const o=la(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vt(n)}function ua(e,t){const r=Me(e);return r===t||!he(r)||Je(r)?!1:ge(r).position==="fixed"||ua(r,t)}function Zc(e,t){const r=t.get(e);if(r)return r;let n=dt(e,[],!1).filter(l=>he(l)&&Qe(l)!=="body"),o=null;const a=ge(e).position==="fixed";let s=a?Me(e):e;for(;he(s)&&!Je(s);){const l=ge(s),u=Hr(s);!u&&l.position==="fixed"&&(o=null),(a?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ct(s)&&!u&&ua(e,s))?n=n.filter(f=>f!==s):o=l,s=Me(s)}return t.set(e,n),n}function Qc(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?jt(t)?[]:Zc(t,this._c):[].concat(r),n],l=s[0],u=s.reduce((d,f)=>{const h=da(t,f,o);return d.top=ae(h.top,d.top),d.right=Ae(h.right,d.right),d.bottom=Ae(h.bottom,d.bottom),d.left=ae(h.left,d.left),d},da(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Jc(e){const{width:t,height:r}=ia(e);return{width:t,height:r}}function ed(e,t,r){const n=we(t),o=ye(t),a=r==="fixed",s=Re(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=be(0);if(n||!n&&!a)if((Qe(t)!=="body"||ct(o))&&(l=Gt(t)),n){const v=Re(t,!0,a,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Kr(o));const d=o&&!n&&!a?ca(o,l):be(0),f=s.left+l.scrollLeft-u.x-d.x,h=s.top+l.scrollTop-u.y-d.y;return{x:f,y:h,width:s.width,height:s.height}}function Yr(e){return ge(e).position==="static"}function fa(e,t){if(!we(e)||ge(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ye(e)===r&&(r=r.ownerDocument.body),r}function pa(e,t){const r=se(e);if(jt(e))return r;if(!we(e)){let o=Me(e);for(;o&&!Je(o);){if(he(o)&&!Yr(o))return o;o=Me(o)}return r}let n=fa(e,t);for(;n&&Vc(n)&&Yr(n);)n=fa(n,t);return n&&Je(n)&&Yr(n)&&!Hr(n)?r:n||Hc(e)||r}const td=async function(e){const t=this.getOffsetParent||pa,r=this.getDimensions,n=await r(e.floating);return{reference:ed(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function rd(e){return ge(e).direction==="rtl"}const nd={convertOffsetParentRelativeRectToViewportRelativeRect:Uc,getDocumentElement:ye,getClippingRect:Qc,getOffsetParent:pa,getElementRects:td,getClientRects:Kc,getDimensions:Jc,getScale:et,isElement:he,isRTL:rd};function ha(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function od(e,t){let r=null,n;const o=ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:h,width:v,height:m}=d;if(l||t(),!v||!m)return;const y=Wt(h),p=Wt(o.clientWidth-(f+v)),g=Wt(o.clientHeight-(h+m)),b=Wt(f),x={rootMargin:-y+"px "+-p+"px "+-g+"px "+-b+"px",threshold:ae(0,Ae(1,u))||1};let S=!0;function E(C){const N=C[0].intersectionRatio;if(N!==u){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!ha(d,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return s(!0),a}function ad(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Ur(e),f=o||a?[...d?dt(d):[],...dt(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const h=d&&l?od(d,r):null;let v=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let y,p=u?Re(e):null;u&&g();function g(){const b=Re(e);p&&!ha(p,b)&&r(),p=b,y=requestAnimationFrame(g)}return r(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const sd=Rc,id=zc,ld=Lc,cd=Bc,dd=Fc,ga=Ic,ud=Wc,fd=(e,t,r)=>{const n=new Map,o={platform:nd,...r},a={...o.platform,_c:n};return _c(e,t,{...o,platform:a})};var Ut=typeof document<"u"?X.useLayoutEffect:X.useEffect;function Kt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Kt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Kt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ma(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function va(e,t){const r=ma(e);return Math.round(t*r)/r}function Xr(e){const t=i.useRef(e);return Ut(()=>{t.current=e}),t}function pd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,h]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=i.useState(n);Kt(v,n)||m(n);const[y,p]=i.useState(null),[g,b]=i.useState(null),w=i.useCallback(k=>{k!==C.current&&(C.current=k,p(k))},[]),x=i.useCallback(k=>{k!==N.current&&(N.current=k,b(k))},[]),S=a||y,E=s||g,C=i.useRef(null),N=i.useRef(null),R=i.useRef(f),I=u!=null,z=Xr(u),H=Xr(o),W=Xr(d),_=i.useCallback(()=>{if(!C.current||!N.current)return;const k={placement:t,strategy:r,middleware:v};H.current&&(k.platform=H.current),fd(C.current,N.current,k).then(F=>{const Y={...F,isPositioned:W.current!==!1};P.current&&!Kt(R.current,Y)&&(R.current=Y,ir.flushSync(()=>{h(Y)}))})},[v,t,r,H,W]);Ut(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(k=>({...k,isPositioned:!1})))},[d]);const P=i.useRef(!1);Ut(()=>(P.current=!0,()=>{P.current=!1}),[]),Ut(()=>{if(S&&(C.current=S),E&&(N.current=E),S&&E){if(z.current)return z.current(S,E,_);_()}},[S,E,_,z,I]);const B=i.useMemo(()=>({reference:C,floating:N,setReference:w,setFloating:x}),[w,x]),M=i.useMemo(()=>({reference:S,floating:E}),[S,E]),j=i.useMemo(()=>{const k={position:r,left:0,top:0};if(!M.floating)return k;const F=va(M.floating,f.x),Y=va(M.floating,f.y);return l?{...k,transform:"translate("+F+"px, "+Y+"px)",...ma(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:Y}},[r,l,M.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:_,refs:B,elements:M,floatingStyles:j}),[f,_,B,M,j])}const hd=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ga({element:n.current,padding:o}).fn(r):{}:n?ga({element:n,padding:o}).fn(r):{}}}},gd=(e,t)=>({...sd(e),options:[e,t]}),md=(e,t)=>({...id(e),options:[e,t]}),vd=(e,t)=>({...ud(e),options:[e,t]}),bd=(e,t)=>({...ld(e),options:[e,t]}),yd=(e,t)=>({...cd(e),options:[e,t]}),wd=(e,t)=>({...dd(e),options:[e,t]}),xd=(e,t)=>({...hd(e),options:[e,t]});var Sd="Arrow",ba=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return c.jsx(K.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});ba.displayName=Sd;var Cd=ba;function Ed(e){const[t,r]=i.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,l;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;s=d.inlineSize,l=d.blockSize}else s=e.offsetWidth,l=e.offsetHeight;r({width:s,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var qr="Popper",[ya,wa]=it(qr),[Td,xa]=ya(qr),Sa=e=>{const{__scopePopper:t,children:r}=e,[n,o]=i.useState(null);return c.jsx(Td,{scope:t,anchor:n,onAnchorChange:o,children:r})};Sa.displayName=qr;var Ca="PopperAnchor",Ea=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=xa(Ca,r),s=i.useRef(null),l=ee(t,s);return i.useEffect(()=>{a.onAnchorChange((n==null?void 0:n.current)||s.current)}),n?null:c.jsx(K.div,{...o,ref:l})});Ea.displayName=Ca;var Zr="PopperContent",[Nd,Pd]=ya(Zr),Ta=i.forwardRef((e,t)=>{var xe,ht,or,gt,ar,at;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,g=xa(Zr,r),[b,w]=i.useState(null),x=ee(t,We=>w(We)),[S,E]=i.useState(null),C=Ed(S),N=(C==null?void 0:C.width)??0,R=(C==null?void 0:C.height)??0,I=n+(a!=="center"?"-"+a:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],W=H.length>0,_={padding:z,boundary:H.filter(Od),altBoundary:W},{refs:P,floatingStyles:B,placement:M,isPositioned:j,middlewareData:k}=pd({strategy:"fixed",placement:I,whileElementsMounted:(...We)=>ad(...We,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[gd({mainAxis:o+R,alignmentAxis:s}),u&&md({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?vd():void 0,..._}),u&&bd({..._}),yd({..._,apply:({elements:We,rects:L,availableWidth:$,availableHeight:Q})=>{const{width:ne,height:oe}=L.reference,G=We.floating.style;G.setProperty("--radix-popper-available-width",`${$}px`),G.setProperty("--radix-popper-available-height",`${Q}px`),G.setProperty("--radix-popper-anchor-width",`${ne}px`),G.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),S&&xd({element:S,padding:l}),Md({arrowWidth:N,arrowHeight:R}),v&&wd({strategy:"referenceHidden",..._})]}),[F,Y]=Aa(M),Z=ce(y);Ne(()=>{j&&(Z==null||Z())},[j,Z]);const re=(xe=k.arrow)==null?void 0:xe.x,J=(ht=k.arrow)==null?void 0:ht.y,te=((or=k.arrow)==null?void 0:or.centerOffset)!==0,[ie,ke]=i.useState();return Ne(()=>{b&&ke(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:j?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(gt=k.transformOrigin)==null?void 0:gt.x,(ar=k.transformOrigin)==null?void 0:ar.y].join(" "),...((at=k.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Nd,{scope:r,placedSide:F,onArrowChange:E,arrowX:re,arrowY:J,shouldHideArrow:te,children:c.jsx(K.div,{"data-side":F,"data-align":Y,...p,ref:x,style:{...p.style,animation:j?void 0:"none"}})})})});Ta.displayName=Zr;var Na="PopperArrow",Ad={top:"bottom",right:"left",bottom:"top",left:"right"},Pa=i.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Pd(Na,n),s=Ad[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(Cd,{...o,ref:r,style:{...o.style,display:"block"}})})});Pa.displayName=Na;function Od(e){return e!==null}var Md=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,l=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[d,f]=Aa(r),h={start:"0%",center:"50%",end:"100%"}[f],v=(((b=o.arrow)==null?void 0:b.x)??0)+l/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",p="";return d==="bottom"?(y=s?h:`${v}px`,p=`${-u}px`):d==="top"?(y=s?h:`${v}px`,p=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,p=s?h:`${m}px`):d==="left"&&(y=`${n.floating.width+u}px`,p=s?h:`${m}px`),{data:{x:y,y:p}}}});function Aa(e){const[t,r="center"]=e.split("-");return[t,r]}var kd=Sa,Dd=Ea,_d=Ta,Id=Pa,Ld="VisuallyHidden",Yt=i.forwardRef((e,t)=>c.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Yt.displayName=Ld;var Fd=Yt,[Xt,uf]=it("Tooltip",[wa]),qt=wa(),Oa="TooltipProvider",$d=700,Qr="tooltip.open",[Rd,Jr]=Xt(Oa),Ma=e=>{const{__scopeTooltip:t,delayDuration:r=$d,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,[s,l]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),c.jsx(Rd,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),l(!1)},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:i.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:a})};Ma.displayName=Oa;var Zt="Tooltip",[zd,ut]=Xt(Zt),ka=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,u=Jr(Zt,e.__scopeTooltip),d=qt(t),[f,h]=i.useState(null),v=yt(),m=i.useRef(0),y=s??u.disableHoverableContent,p=l??u.delayDuration,g=i.useRef(!1),[b=!1,w]=gr({prop:n,defaultProp:o,onChange:N=>{N?(u.onOpen(),document.dispatchEvent(new CustomEvent(Qr))):u.onClose(),a==null||a(N)}}),x=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),S=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),E=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},p)},[p,w]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),c.jsx(kd,{...d,children:c.jsx(zd,{scope:t,contentId:v,open:b,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?C():S()},[u.isOpenDelayed,C,S]),onTriggerLeave:i.useCallback(()=>{y?E():(window.clearTimeout(m.current),m.current=0)},[E,y]),onOpen:S,onClose:E,disableHoverableContent:y,children:r})})};ka.displayName=Zt;var en="TooltipTrigger",Da=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ut(en,r),a=Jr(en,r),s=qt(r),l=i.useRef(null),u=ee(t,l,o.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),h=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(Dd,{asChild:!0,...s,children:c.jsx(K.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:U(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:U(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});Da.displayName=en;var tn="TooltipPortal",[Wd,Bd]=Xt(tn,{forceMount:void 0}),_a=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=ut(tn,t);return c.jsx(Wd,{scope:t,forceMount:r,children:c.jsx(Fe,{present:r||a.open,children:c.jsx(xt,{asChild:!0,container:o,children:n})})})};_a.displayName=tn;var tt="TooltipContent",Ia=i.forwardRef((e,t)=>{const r=Bd(tt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=ut(tt,e.__scopeTooltip);return c.jsx(Fe,{present:n||s.open,children:s.disableHoverableContent?c.jsx(La,{side:o,...a,ref:t}):c.jsx(Vd,{side:o,...a,ref:t})})}),Vd=i.forwardRef((e,t)=>{const r=ut(tt,e.__scopeTooltip),n=Jr(tt,e.__scopeTooltip),o=i.useRef(null),a=ee(t,o),[s,l]=i.useState(null),{trigger:u,onClose:d}=r,f=o.current,{onPointerInTransitChange:h}=n,v=i.useCallback(()=>{l(null),h(!1)},[h]),m=i.useCallback((y,p)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=Ud(b,g.getBoundingClientRect()),x=Kd(b,w),S=Yd(p.getBoundingClientRect()),E=qd([...x,...S]);l(E),h(!0)},[h]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(u&&f){const y=g=>m(g,f),p=g=>m(g,u);return u.addEventListener("pointerleave",y),f.addEventListener("pointerleave",p),()=>{u.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",p)}}},[u,f,m,v]),i.useEffect(()=>{if(s){const y=p=>{const g=p.target,b={x:p.clientX,y:p.clientY},w=(u==null?void 0:u.contains(g))||(f==null?void 0:f.contains(g)),x=!Xd(b,s);w?v():x&&(v(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,f,s,d,v]),c.jsx(La,{...e,ref:a})}),[Hd,jd]=Xt(Zt,{isInside:!1}),La=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=e,u=ut(tt,r),d=qt(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(Qr,f),()=>document.removeEventListener(Qr,f)),[f]),i.useEffect(()=>{if(u.trigger){const h=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,f]),c.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:c.jsxs(_d,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(no,{children:n}),c.jsx(Hd,{scope:r,isInside:!0,children:c.jsx(Fd,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Ia.displayName=tt;var Fa="TooltipArrow",Gd=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=qt(r);return jd(Fa,r).isInside?null:c.jsx(Id,{...o,...n,ref:t})});Gd.displayName=Fa;function Ud(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Kd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Yd(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Xd(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const l=t[a].x,u=t[a].y,d=t[s].x,f=t[s].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(o=!o)}return o}function qd(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Zd(t)}function Zd(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Qd=Ma,Jd=ka,eu=Da,tu=_a,$a=Ia;const rt=Qd,nt=Jd,ot=eu,ze=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(tu,{children:c.jsx($a,{ref:n,sideOffset:t,className:D("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ze.displayName=$a.displayName;const Qt=i.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:o,...a},s)=>{const[l,u]=i.useState(!1),d=i.useRef(null),h=o||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),v=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",m=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};i.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const y=p=>{if(r){const g=p.target.value;let b=g;if(g.length>0){const w=g[g.length-1];/[^a-zA-Z0-9]/.test(w)&&(console.log("Non-alphanumeric detected:",w),m())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let S=0;S<Math.min(w.length,6);S++){const E=w[S];S===0||S===2||S===4?/[A-Z]/.test(E)&&(x+=E):(S===1||S===3||S===5)&&/[0-9]/.test(E)&&(x+=E)}x.length<=3?b=x:b=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const w=g.replace(/\D/g,"");w.length<=5?b=w:b=`${w.slice(0,5)}-${w.slice(5,9)}`}p.target.value=b}n==null||n(p)};return c.jsx(rt,{children:c.jsxs(nt,{open:l&&!!r,children:[c.jsx(ot,{asChild:!0,children:c.jsx("input",{type:t,className:D("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onChange:y,placeholder:h,ref:s,...a})}),c.jsx(ze,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:v()})]})})});Qt.displayName="Input";var ru="Separator",Ra="horizontal",nu=["horizontal","vertical"],za=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ra,...o}=e,a=ou(n)?n:Ra,l=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return c.jsx(K.div,{"data-orientation":a,...l,...o,ref:t})});za.displayName=ru;function ou(e){return nu.includes(e)}var Wa=za;const rn=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>c.jsx(Wa,{ref:o,decorative:r,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));rn.displayName=Wa.displayName;const Ba=Mr,au=Yo,su=Lt,Va=Xo,nn=i.forwardRef(({className:e,...t},r)=>c.jsx(kt,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));nn.displayName=kt.displayName;const iu=Rt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),on=i.forwardRef(({side:e="right",className:t,children:r,...n},o)=>c.jsxs(Va,{children:[c.jsx(nn,{}),c.jsxs(Dt,{ref:o,className:D(iu({side:e}),t),...n,children:[c.jsxs(Lt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[c.jsx(lr,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));on.displayName=Dt.displayName;const Ha=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ha.displayName="SheetHeader";const ja=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ja.displayName="SheetFooter";const Ga=i.forwardRef(({className:e,...t},r)=>c.jsx(_t,{ref:r,className:D("text-lg font-semibold text-foreground",e),...t}));Ga.displayName=_t.displayName;const Ua=i.forwardRef(({className:e,...t},r)=>c.jsx(It,{ref:r,className:D("text-sm text-muted-foreground",e),...t}));Ua.displayName=It.displayName;function lu({onClick:e,publicName:t,applicationName:r,partnerId:n}){const o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[a,s]=X.useState(!1),l=()=>{s(!0)};return c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:a?c.jsx(pe,{asChild:!0,size:"icon",onClick:e,children:c.jsx(di,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):c.jsx(pe,{asChild:!0,size:"icon",onClick:e,children:c.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:l})})}),c.jsxs("div",{className:"flex flex-1 flex-col",children:[c.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),c.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var cu="Label",Ka=i.forwardRef((e,t)=>c.jsx(K.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ka.displayName=cu;var du=Ka;function uu({className:e,...t}){return c.jsx(du,{"data-slot":"label",className:D("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const an=1024;function Ya(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${an-1}px)`),n=()=>{t(window.innerWidth<an)};return r.addEventListener("change",n),t(window.innerWidth<an),()=>r.removeEventListener("change",n)},[]),!!e}function sn({className:e,...t}){return c.jsx("div",{className:D("animate-pulse rounded-md bg-primary/20",e),...t})}const fu="sidebar:state",pu=60*60*24*7,hu="16rem",gu="18rem",mu="3rem",vu="b",Xa=i.createContext(null);function ft(){const e=i.useContext(Xa);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const ln=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:o,children:a,...s},l)=>{const u=Ya(),[d,f]=i.useState(!1),[h,v]=i.useState(e),m=t??h,y=i.useCallback(w=>{const x=typeof w=="function"?w(m):w;r?r(x):v(x),document.cookie=`${fu}=${x}; path=/; max-age=${pu}`},[r,m]),p=i.useCallback(()=>u?f(w=>!w):y(w=>!w),[u,y,f]);i.useEffect(()=>{const w=x=>{x.key===vu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),p())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[p]);const g=m?"expanded":"collapsed",b=i.useMemo(()=>({state:g,open:m,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:p}),[g,m,y,u,d,f,p]);return c.jsx(Xa.Provider,{value:b,children:c.jsx(rt,{delayDuration:0,children:c.jsx("div",{style:{"--sidebar-width":hu,"--sidebar-width-icon":mu,...o},className:D("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...s,children:a})})})});ln.displayName="SidebarProvider";const cn=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:o,...a},s)=>{const{isMobile:l,state:u,openMobile:d,setOpenMobile:f}=ft();return r==="none"?c.jsx("div",{className:D("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:s,...a,children:o}):l?c.jsx(Ba,{open:d,onOpenChange:f,...a,children:c.jsx(on,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":gu},side:e,children:c.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):c.jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[c.jsx("div",{className:D("duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),c.jsx("div",{className:D("duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:c.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});cn.displayName="Sidebar";const dn=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=ft();return c.jsxs(pe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:D("h-7 w-7 text-sidebar-foreground",e),onClick:a=>{t==null||t(a),o()},...r,children:[c.jsx(ii,{}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});dn.displayName="SidebarTrigger";const qa=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=ft();return c.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:D("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});qa.displayName="SidebarRail";const Za=i.forwardRef(({className:e,...t},r)=>c.jsx("main",{ref:r,className:D("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",e),...t}));Za.displayName="SidebarInset";const Qa=i.forwardRef(({className:e,...t},r)=>c.jsx(Qt,{ref:r,"data-sidebar":"input",className:D("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Qa.displayName="SidebarInput";const un=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"header",className:D("flex flex-col gap-2 p-2",e),...t}));un.displayName="SidebarHeader";const fn=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"footer",className:D("flex flex-col gap-2 p-2",e),...t}));fn.displayName="SidebarFooter";const Ja=i.forwardRef(({className:e,...t},r)=>c.jsx(rn,{ref:r,"data-sidebar":"separator",className:D("mx-2 w-auto bg-sidebar-border",e),...t}));Ja.displayName="SidebarSeparator";const pn=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"content",className:D("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));pn.displayName="SidebarContent";const es=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"group",className:D("relative flex w-full min-w-0 flex-col p-2",e),...t}));es.displayName="SidebarGroup";const ts=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?ue:"div";return c.jsx(o,{ref:n,"data-sidebar":"group-label",className:D("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});ts.displayName="SidebarGroupLabel";const rs=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?ue:"button";return c.jsx(o,{ref:n,"data-sidebar":"group-action",className:D("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...r})});rs.displayName="SidebarGroupAction";const ns=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"group-content",className:D("w-full text-sm",e),...t}));ns.displayName="SidebarGroupContent";const hn=i.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,"data-sidebar":"menu",className:D("flex w-full min-w-0 flex-col gap-1",e),...t}));hn.displayName="SidebarMenu";const gn=i.forwardRef(({className:e,...t},r)=>c.jsx("li",{ref:r,"data-sidebar":"menu-item",className:D("group/menu-item relative",e),...t}));gn.displayName="SidebarMenuItem";const bu=Rt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),mn=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:o,className:a,...s},l)=>{const u=e?ue:"button",{isMobile:d,state:f}=ft(),h=c.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:D(bu({variant:r,size:n}),a),...s});return o?(typeof o=="string"&&(o={children:o}),c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:h}),c.jsx(ze,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):h});mn.displayName="SidebarMenuButton";const os=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const a=t?ue:"button";return c.jsx(a,{ref:o,"data-sidebar":"menu-action",className:D("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});os.displayName="SidebarMenuAction";const as=i.forwardRef(({className:e,...t},r)=>c.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:D("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));as.displayName="SidebarMenuBadge";const ss=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return c.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:D("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&c.jsx(sn,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),c.jsx(sn,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});ss.displayName="SidebarMenuSkeleton";const is=i.forwardRef(({className:e,...t},r)=>c.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:D("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));is.displayName="SidebarMenuSub";const ls=i.forwardRef(({...e},t)=>c.jsx("li",{ref:t,...e}));ls.displayName="SidebarMenuSubItem";const cs=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},a)=>{const s=e?ue:"a";return c.jsx(s,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:D("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});cs.displayName="SidebarMenuSubButton";function yu(e){const t=e+"CollectionProvider",[r,n]=it(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:p}=m,g=X.useRef(null),b=X.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:p})};s.displayName=t;const l=e+"CollectionSlot",u=X.forwardRef((m,y)=>{const{scope:p,children:g}=m,b=a(l,p),w=ee(y,b.collectionRef);return c.jsx(ue,{ref:w,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=X.forwardRef((m,y)=>{const{scope:p,children:g,...b}=m,w=X.useRef(null),x=ee(y,w),S=a(d,p);return X.useEffect(()=>(S.itemMap.set(w,{ref:w,...b}),()=>void S.itemMap.delete(w))),c.jsx(ue,{[f]:"",ref:x,children:g})});h.displayName=d;function v(m){const y=a(e+"CollectionConsumer",m);return X.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((S,E)=>b.indexOf(S.ref.current)-b.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},v,n]}var vn="ToastProvider",[bn,wu,xu]=yu("Toast"),[ds,ff]=it("Toast",[xu]),[Su,Jt]=ds(vn),us=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),h=i.useRef(!1),v=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${vn}\`. Expected non-empty \`string\`.`),c.jsx(bn.Provider,{scope:t,children:c.jsx(Su,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(m=>m+1),[]),onToastRemove:i.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:s})})};us.displayName=vn;var fs="ToastViewport",Cu=["F8"],yn="toast.viewportPause",wn="toast.viewportResume",ps=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Cu,label:o="Notifications ({hotkey})",...a}=e,s=Jt(fs,r),l=wu(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),h=i.useRef(null),v=ee(t,h,s.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=s.toastCount>0;i.useEffect(()=>{const g=b=>{var x;n.length!==0&&n.every(S=>b[S]||b.code===S)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),i.useEffect(()=>{const g=u.current,b=h.current;if(y&&g&&b){const w=()=>{if(!s.isClosePausedRef.current){const C=new CustomEvent(yn);b.dispatchEvent(C),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const C=new CustomEvent(wn);b.dispatchEvent(C),s.isClosePausedRef.current=!1}},S=C=>{!g.contains(C.relatedTarget)&&x()},E=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",S),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",E),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",S),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,s.isClosePausedRef]);const p=i.useCallback(({tabbingDirection:g})=>{const w=l().map(x=>{const S=x.ref.current,E=[S,...Fu(S)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?w.reverse():w).flat()},[l]);return i.useEffect(()=>{const g=h.current;if(g){const b=w=>{var E,C,N;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const R=document.activeElement,I=w.shiftKey;if(w.target===g&&I){(E=d.current)==null||E.focus();return}const W=p({tabbingDirection:I?"backwards":"forwards"}),_=W.findIndex(P=>P===R);Cn(W.slice(_+1))?w.preventDefault():I?(C=d.current)==null||C.focus():(N=f.current)==null||N.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[l,p]),c.jsxs(bl,{ref:u,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(xn,{ref:d,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});Cn(g)}}),c.jsx(bn.Slot,{scope:r,children:c.jsx(K.ol,{tabIndex:-1,...a,ref:v})}),y&&c.jsx(xn,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});Cn(g)}})]})});ps.displayName=fs;var hs="ToastFocusProxy",xn=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=Jt(hs,r);return c.jsx(Yt,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var d;const l=s.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&n()}})});xn.displayName=hs;var er="Toast",Eu="toast.swipeStart",Tu="toast.swipeMove",Nu="toast.swipeCancel",Pu="toast.swipeEnd",gs=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...s}=e,[l=!0,u]=gr({prop:n,defaultProp:o,onChange:a});return c.jsx(Fe,{present:r||l,children:c.jsx(Mu,{open:l,...s,ref:t,onClose:()=>u(!1),onPause:ce(e.onPause),onResume:ce(e.onResume),onSwipeStart:U(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:U(e.onSwipeMove,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:U(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:U(e.onSwipeEnd,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});gs.displayName=er;var[Au,Ou]=ds(er,{onClose(){}}),Mu=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:l,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:m,...y}=e,p=Jt(er,r),[g,b]=i.useState(null),w=ee(t,P=>b(P)),x=i.useRef(null),S=i.useRef(null),E=o||p.duration,C=i.useRef(0),N=i.useRef(E),R=i.useRef(0),{onToastAdd:I,onToastRemove:z}=p,H=ce(()=>{var B;(g==null?void 0:g.contains(document.activeElement))&&((B=p.viewport)==null||B.focus()),s()}),W=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(R.current),C.current=new Date().getTime(),R.current=window.setTimeout(H,P))},[H]);i.useEffect(()=>{const P=p.viewport;if(P){const B=()=>{W(N.current),d==null||d()},M=()=>{const j=new Date().getTime()-C.current;N.current=N.current-j,window.clearTimeout(R.current),u==null||u()};return P.addEventListener(yn,M),P.addEventListener(wn,B),()=>{P.removeEventListener(yn,M),P.removeEventListener(wn,B)}}},[p.viewport,E,u,d,W]),i.useEffect(()=>{a&&!p.isClosePausedRef.current&&W(E)},[a,E,p.isClosePausedRef,W]),i.useEffect(()=>(I(),()=>z()),[I,z]);const _=i.useMemo(()=>g?Ss(g):null,[g]);return p.viewport?c.jsxs(c.Fragment,{children:[_&&c.jsx(ku,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),c.jsx(Au,{scope:r,onClose:H,children:ir.createPortal(c.jsx(bn.ItemSlot,{scope:r,children:c.jsx(vl,{asChild:!0,onEscapeKeyDown:U(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||H(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(K.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:U(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:U(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:U(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,M=P.clientY-x.current.y,j=!!S.current,k=["left","right"].includes(p.swipeDirection),F=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Y=k?F(0,B):0,Z=k?0:F(0,M),re=P.pointerType==="touch"?10:2,J={x:Y,y:Z},te={originalEvent:P,delta:J};j?(S.current=J,tr(Tu,h,te,{discrete:!1})):Cs(J,p.swipeDirection,re)?(S.current=J,tr(Eu,f,te,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>re||Math.abs(M)>re)&&(x.current=null)}),onPointerUp:U(e.onPointerUp,P=>{const B=S.current,M=P.target;if(M.hasPointerCapture(P.pointerId)&&M.releasePointerCapture(P.pointerId),S.current=null,x.current=null,B){const j=P.currentTarget,k={originalEvent:P,delta:B};Cs(B,p.swipeDirection,p.swipeThreshold)?tr(Pu,m,k,{discrete:!0}):tr(Nu,v,k,{discrete:!0}),j.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),ku=e=>{const{__scopeToast:t,children:r,...n}=e,o=Jt(er,t),[a,s]=i.useState(!1),[l,u]=i.useState(!1);return Iu(()=>s(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:c.jsx(xt,{asChild:!0,children:c.jsx(Yt,{...n,children:a&&c.jsxs(c.Fragment,{children:[o.label," ",r]})})})},Du="ToastTitle",ms=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(K.div,{...n,ref:t})});ms.displayName=Du;var _u="ToastDescription",vs=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return c.jsx(K.div,{...n,ref:t})});vs.displayName=_u;var bs="ToastAction",ys=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?c.jsx(xs,{altText:r,asChild:!0,children:c.jsx(Sn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bs}\`. Expected non-empty \`string\`.`),null)});ys.displayName=bs;var ws="ToastClose",Sn=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Ou(ws,r);return c.jsx(xs,{asChild:!0,children:c.jsx(K.button,{type:"button",...n,ref:t,onClick:U(e.onClick,o.onClose)})})});Sn.displayName=ws;var xs=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return c.jsx(K.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Ss(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Lu(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=n.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Ss(n))}}),t}function tr(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?oo(o,a):o.dispatchEvent(a)}var Cs=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function Iu(e=()=>{}){const t=ce(e);Ne(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Lu(e){return e.nodeType===e.ELEMENT_NODE}function Fu(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Cn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var $u=us,Es=ps,Ts=gs,Ns=ms,Ps=vs,As=ys,Os=Sn;const Ms=$u,En=i.forwardRef(({className:e,...t},r)=>c.jsx(Es,{ref:r,className:D("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));En.displayName=Es.displayName;const Ru=Rt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-600 bg-green-600 text-white",warning:"border-yellow-500 bg-yellow-500 text-white",info:"border-blue-500 bg-blue-500 text-white",secondary:"border-secondary bg-secondary text-secondary-foreground",outline:"border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{variant:"default"}}),Tn=i.forwardRef(({className:e,variant:t,...r},n)=>c.jsx(Ts,{ref:n,className:D(Ru({variant:t}),e),...r}));Tn.displayName=Ts.displayName;const ks=i.forwardRef(({className:e,...t},r)=>c.jsx(As,{ref:r,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive",e),...t}));ks.displayName=As.displayName;const Nn=i.forwardRef(({className:e,...t},r)=>c.jsx(Os,{ref:r,className:D("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(lr,{className:"h-4 w-4"})}));Nn.displayName=Os.displayName;const Pn=i.forwardRef(({className:e,...t},r)=>c.jsx(Ns,{ref:r,className:D("text-sm font-semibold [&+div]:text-xs",e),...t}));Pn.displayName=Ns.displayName;const An=i.forwardRef(({className:e,...t},r)=>c.jsx(Ps,{ref:r,className:D("text-sm opacity-90",e),...t}));An.displayName=Ps.displayName;const zu=1,Wu=1e6;let On=0;function Bu(){return On=(On+1)%Number.MAX_SAFE_INTEGER,On.toString()}const Mn=new Map,Ds=e=>{if(Mn.has(e))return;const t=setTimeout(()=>{Mn.delete(e),pt({type:"REMOVE_TOAST",toastId:e})},Wu);Mn.set(e,t)},Vu=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,zu)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Ds(r):e.toasts.forEach(n=>Ds(n.id)),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return{...e,toasts:t.toastId?e.toasts.filter(r=>r.id!==t.toastId):[]}}},rr=[];let nr={toasts:[]};function pt(e){nr=Vu(nr,e),rr.forEach(t=>t(nr))}function _s({...e}){const t=Bu(),r=o=>pt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>pt({type:"DISMISS_TOAST",toastId:t});return pt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function kn(){const[e,t]=i.useState(nr);return i.useEffect(()=>(rr.push(t),()=>{const r=rr.indexOf(t);r>-1&&rr.splice(r,1)}),[]),{...e,toast:_s,dismiss:r=>pt({type:"DISMISS_TOAST",toastId:r})}}function Is(){const{toasts:e}=kn();return c.jsxs(Ms,{children:[e.map(function({id:t,title:r,description:n,action:o,...a}){return c.jsxs(Tn,{...a,children:[c.jsxs("div",{className:"grid gap-1",children:[r&&c.jsx(Pn,{children:r}),n&&c.jsx(An,{children:n})]}),o,c.jsx(Nn,{})]},t)}),c.jsx(En,{})]})}function Ls({onSignOut:e,searchResultsRouteName:t,rightMenu:r}){const[n,o]=X.useState(""),a=mt.useNavigate(),s=mt.useLocation(),{toast:l}=kn();X.useEffect(()=>{const h=new URLSearchParams(s.search).get("q");h&&o(h)},[s.search]);const u=()=>{const f=n.trim();if(!f||f.length<2){l({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}const h=new URLSearchParams({q:f});a({pathname:t,search:h.toString()})},d=f=>{f.key==="Enter"&&u()};return c.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[c.jsx(dn,{className:"lg:hidden",children:c.jsx(ai,{className:"h-6 w-6"})}),c.jsx("div",{className:"flex flex-1 items-center gap-4",children:c.jsx("div",{className:"relative w-full max-w-sm",children:c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:u,"aria-label":"Search",children:c.jsx(ci,{className:"h-4 w-4 text-muted-foreground"})}),c.jsx(Qt,{placeholder:"Search...",className:"w-full pl-8 bg-white text-black",value:n,onChange:f=>o(f.target.value),onKeyDown:d},"topbar-search")]})})}),r||c.jsx(c.Fragment,{}),e&&c.jsx("div",{className:"flex items-center gap-4",children:c.jsxs(pe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[c.jsx(oi,{className:"h-4 w-4 text-sidebar-foreground"}),c.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Fs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=mt.useParams(),o=e.filter(a=>a.showInNav);return c.jsxs(cn,{className:"border-r border-sidebar-border",children:[c.jsx(un,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"flex items-center justify-center",children:c.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),c.jsx("span",{className:"font-semibold text-lg",children:r})]})}),c.jsx(pn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:c.jsx(hn,{children:o.map(a=>{const s=a.icon,l=`/${a.path.replace(":appID",n)}`;return c.jsx(gn,{children:c.jsx(mn,{asChild:!0,children:c.jsxs(mt.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[s&&c.jsx(s,{className:"h-4 w-4"}),c.jsx("span",{children:a.label})]})})},a.key)})})}),c.jsx(fn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function Hu({children:e,rightMenu:t,routes:r,footer:n,searchResultsRouteName:o,dashboardTitle:a,onSignOut:s}){return c.jsx(c.Fragment,{children:c.jsx(ln,{children:c.jsxs("div",{className:"flex grow",children:[c.jsx(Fs,{routes:r,footer:n,dashboardTitle:a}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx(Ls,{onSignOut:s,rightMenu:t,searchResultsRouteName:o}),c.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),c.jsx(Is,{})]})]})})})}const ju={sm:100,md:200,lg:300,xl:400};function Gu({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[o,a]=i.useState(!1),[s,l]=i.useState(!1),[u,d]=i.useState(!1),[f,h]=i.useState(!1),v=`https://api.randmar.io/Product/${e}/Video`;i.useEffect(()=>{(async()=>{try{const x=await(await fetch(v+"/Exists")).json();l(x)}catch(w){console.error("Error checking for video:",w),l(!1)}})()},[e,v]);async function m(){if(s){h(!0);try{const w=await(await fetch(v)).blob(),x=window.URL.createObjectURL(w),S=document.createElement("a");S.href=x,S.download=`${e||"product"}-video.mp4`,document.body.appendChild(S),S.click(),document.body.removeChild(S),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{h(!1)}}}function y(){navigator.clipboard.writeText(v),d(!0),setTimeout(()=>{d(!1)},2e3)}function p(){a(!0)}const g=ju[t||"xl"];return c.jsxs(c.Fragment,{children:[c.jsx(Ft,{open:o,onOpenChange:a,children:c.jsx($t,{className:"max-w-4xl p-0 overflow-hidden",children:n?c.jsxs("div",{className:"flex flex-row",children:[c.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[c.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),c.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):c.jsxs("div",{className:"w-full relative",children:[c.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[c.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),c.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",onClick:y,children:u?c.jsx(ti,{className:"h-4 w-4"}):c.jsx(ri,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Copy video link"})})]})}),c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",onClick:m,disabled:f,children:c.jsx(ni,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Download video"})})]})})]})]})})}),c.jsxs("div",{className:"relative w-max h-max",children:[c.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${s?"cursor-pointer":""}`,onClick:s?p:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${g*1.5}&height=${g*1.5}`,width:g,height:g}),s&&c.jsx(rt,{children:c.jsxs(nt,{children:[c.jsx(ot,{asChild:!0,children:c.jsx(pe,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:p,children:c.jsx(li,{className:"h-4 w-4"})})}),c.jsx(ze,{children:c.jsx("p",{children:"Play video"})})]})})]})]})}T.AvatarFooter=lu,T.Button=pe,T.Dialog=Ft,T.DialogClose=kr,T.DialogContent=$t,T.DialogDescription=Fr,T.DialogFooter=Ir,T.DialogHeader=_r,T.DialogOverlay=Dr,T.DialogPortal=Zo,T.DialogTitle=Lr,T.DialogTrigger=qo,T.Input=Qt,T.InputOTP=Zi,T.InputOTPGroup=Qi,T.InputOTPSeparator=el,T.InputOTPSlot=Ji,T.Label=uu,T.Layout=Hu,T.Navbar=Fs,T.ProductImage=Gu,T.Separator=rn,T.Sheet=Ba,T.SheetClose=su,T.SheetContent=on,T.SheetDescription=Ua,T.SheetFooter=ja,T.SheetHeader=Ha,T.SheetOverlay=nn,T.SheetPortal=Va,T.SheetTitle=Ga,T.SheetTrigger=au,T.Sidebar=cn,T.SidebarContent=pn,T.SidebarFooter=fn,T.SidebarGroup=es,T.SidebarGroupAction=rs,T.SidebarGroupContent=ns,T.SidebarGroupLabel=ts,T.SidebarHeader=un,T.SidebarInput=Qa,T.SidebarInset=Za,T.SidebarMenu=hn,T.SidebarMenuAction=os,T.SidebarMenuBadge=as,T.SidebarMenuButton=mn,T.SidebarMenuItem=gn,T.SidebarMenuSkeleton=ss,T.SidebarMenuSub=is,T.SidebarMenuSubButton=cs,T.SidebarMenuSubItem=ls,T.SidebarProvider=ln,T.SidebarRail=qa,T.SidebarSeparator=Ja,T.SidebarTrigger=dn,T.Skeleton=sn,T.Toast=Tn,T.ToastAction=ks,T.ToastClose=Nn,T.ToastDescription=An,T.ToastProvider=Ms,T.ToastTitle=Pn,T.ToastViewport=En,T.Toaster=Is,T.Tooltip=nt,T.TooltipContent=ze,T.TooltipProvider=rt,T.TooltipTrigger=ot,T.Topbar=Ls,T.buttonVariants=$r,T.toast=_s,T.useIsMobile=Ya,T.useSidebar=ft,T.useToast=kn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.52.0",
4
+ "version": "1.56.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [
@@ -32,7 +32,10 @@
32
32
  "build": "vite build",
33
33
  "lint": "eslint .",
34
34
  "storybook": "storybook dev -p 6006",
35
- "build-storybook": "storybook build"
35
+ "build-storybook": "storybook build",
36
+ "knip": "knip --exclude devDependencies",
37
+ "knip-strict": "knip --strict",
38
+ "knip-fix": "knip --fix --allow-remove-files"
36
39
  },
37
40
  "peerDependencies": {
38
41
  "react": "^19.0.0",
@@ -46,12 +49,11 @@
46
49
  "@storybook/addon-essentials": "^8.6.7",
47
50
  "@storybook/addon-interactions": "^8.6.7",
48
51
  "@storybook/addon-onboarding": "^8.6.7",
49
- "@storybook/blocks": "^8.6.7",
50
52
  "@storybook/react": "^8.6.7",
51
53
  "@storybook/react-vite": "^8.6.7",
52
54
  "@storybook/test": "^8.6.7",
53
55
  "@tailwindcss/vite": "^4.0.12",
54
- "@types/node": "^22.13.10",
56
+ "@types/node": "^22.13.11",
55
57
  "@types/react": "^19.0.10",
56
58
  "@types/react-dom": "^19.0.4",
57
59
  "@vitejs/plugin-react": "^4.3.4",
@@ -60,38 +62,26 @@
60
62
  "eslint-plugin-react-refresh": "^0.4.19",
61
63
  "eslint-plugin-storybook": "^0.11.6",
62
64
  "globals": "^15.15.0",
65
+ "knip": "^5.46.0",
63
66
  "storybook": "^8.6.7",
64
- "tailwindcss": "^4.0.12",
65
67
  "typescript": "~5.7.2",
66
68
  "typescript-eslint": "^8.24.1",
67
69
  "vite": "^6.2.0",
68
- "vite-plugin-dts": "^4.5.3"
70
+ "vite-plugin-dts": "^4.5.3",
71
+ "tailwindcss-animate": "^1.0.7"
69
72
  },
70
73
  "dependencies": {
71
- "@radix-ui/react-alert-dialog": "^1.1.6",
72
- "@radix-ui/react-avatar": "^1.1.3",
73
- "@radix-ui/react-checkbox": "^1.1.4",
74
74
  "@radix-ui/react-dialog": "^1.1.6",
75
75
  "@radix-ui/react-label": "^2.1.2",
76
- "@radix-ui/react-popover": "^1.1.6",
77
- "@radix-ui/react-progress": "^1.1.2",
78
- "@radix-ui/react-radio-group": "^1.2.3",
79
- "@radix-ui/react-scroll-area": "^1.2.3",
80
- "@radix-ui/react-select": "^2.1.6",
81
76
  "@radix-ui/react-separator": "^1.1.2",
82
77
  "@radix-ui/react-slot": "^1.1.2",
83
- "@radix-ui/react-switch": "^1.1.3",
84
- "@radix-ui/react-tabs": "^1.1.3",
85
78
  "@radix-ui/react-toast": "^1.2.6",
86
79
  "@radix-ui/react-tooltip": "^1.1.8",
87
80
  "class-variance-authority": "^0.7.1",
88
81
  "clsx": "^2.1.1",
89
- "i": "^0.3.7",
90
82
  "input-otp": "^1.4.2",
91
83
  "lucide-react": "^0.479.0",
92
- "npm": "^11.2.0",
93
- "tailwind-merge": "^3.0.2",
94
- "tailwindcss-animate": "^1.0.7"
84
+ "tailwind-merge": "^3.0.2"
95
85
  },
96
86
  "eslintConfig": {
97
87
  "extends": [