randmarcomps 1.77.0 → 1.78.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.
@@ -1,4 +1,4 @@
1
- (function(E,o){typeof exports=="object"&&typeof module<"u"?o(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"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E.randmarcomps={},E.jsxRuntime,E.React,E.ReactDOM,E["react-router-dom"]))})(this,function(E,o,U,zn,fr){"use strict";function Bn(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 l=Bn(U),pr=Bn(zn);var ti=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,jn=(e,t,r)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oi=(e,t)=>{for(var r in t||(t={}))Wn.call(t,r)&&jn(e,r,t[r]);if(Ct)for(var r of Ct(t))Vn.call(t,r)&&jn(e,r,t[r]);return e},ai=(e,t)=>ri(e,ni(t)),si=(e,t)=>{var r={};for(var n in e)Wn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ct)for(var n of Ct(e))t.indexOf(n)<0&&Vn.call(e,n)&&(r[n]=e[n]);return r};function ii(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function li(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var ci=18,Hn=40,di=`${Hn}px`,ui=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function fi({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),p=l.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&i,[a,i,r]),h=l.useCallback(()=>{let m=e.current,v=t.current;if(!m||!v||u||r==="none")return;let y=m,f=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=f-ci,w=g;document.querySelectorAll(ui).length===0&&document.elementFromPoint(b,w)===m||(s(!0),d(!0))},[e,t,u,r]);return l.useEffect(()=>{let m=e.current;if(!m||r==="none")return;function v(){let f=window.innerWidth-m.getBoundingClientRect().right;c(f>=Hn)}v();let y=setInterval(v,1e3);return()=>{clearInterval(y)}},[e,r]),l.useEffect(()=>{let m=n||document.activeElement===t.current;if(r==="none"||!m)return;let v=setTimeout(h,0),y=setTimeout(h,2e3),f=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(v),clearTimeout(y),clearTimeout(f),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:a,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:di}}var Un=l.createContext({}),Gn=l.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:s,textAlign:i="left",pattern:c,placeholder:u,inputMode:d="numeric",onComplete:p,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:m,containerClassName:v,noScriptCSSFallback:y=pi,render:f,children:g}=r,b=si(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,N,S,C;let[T,z]=l.useState(typeof b.defaultValue=="string"?b.defaultValue:""),_=n??T,V=li(_),G=l.useCallback(L=>{a==null||a(L),z(L)},[a]),j=l.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),I=l.useRef(null),P=l.useRef(null),B=l.useRef({value:_,onChange:G,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"))}),k=l.useRef({prev:[(N=I.current)==null?void 0:N.selectionStart,(S=I.current)==null?void 0:S.selectionEnd,(C=I.current)==null?void 0:C.selectionDirection]});l.useImperativeHandle(t,()=>I.current,[]),l.useEffect(()=>{let L=I.current,W=P.current;if(!L||!W)return;B.current.value!==L.value&&B.current.onChange(L.value),k.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function se(){if(document.activeElement!==L){ae(null),ne(null);return}let q=L.selectionStart,ge=L.selectionEnd,ur=L.selectionDirection,Ce=L.maxLength,Ye=L.value,ke=k.current.prev,ze=-1,Be=-1,Qe;if(Ye.length!==0&&q!==null&&ge!==null){let hf=q===ge,gf=q===Ye.length&&Ye.length<Ce;if(hf&&!gf){let Xe=q;if(Xe===0)ze=0,Be=1,Qe="forward";else if(Xe===Ce)ze=Xe-1,Be=Xe,Qe="backward";else if(Ce>1&&Ye.length>1){let Fn=0;if(ke[0]!==null&&ke[1]!==null){Qe=Xe<ke[1]?"backward":"forward";let vf=ke[0]===ke[1]&&ke[0]<Ce;Qe==="backward"&&!vf&&(Fn=-1)}ze=Fn+Xe,Be=Fn+Xe+1}}ze!==-1&&Be!==-1&&ze!==Be&&I.current.setSelectionRange(ze,Be,Qe)}let Rs=ze!==-1?ze:q,ei=Be!==-1?Be:ge,pf=Qe??ur;ae(Rs),ne(ei),k.current.prev=[Rs,ei,pf]}if(document.addEventListener("selectionchange",se,{capture:!0}),se(),document.activeElement===L&&Z(!0),!document.getElementById("input-otp-style")){let q=document.createElement("style");if(q.id="input-otp-style",document.head.appendChild(q),q.sheet){let ge="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;";ft(q.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ft(q.sheet,`[data-input-otp]:autofill { ${ge} }`),ft(q.sheet,`[data-input-otp]:-webkit-autofill { ${ge} }`),ft(q.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; } }"),ft(q.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ce=()=>{W&&W.style.setProperty("--root-height",`${L.clientHeight}px`)};ce();let de=new ResizeObserver(ce);return de.observe(L),()=>{document.removeEventListener("selectionchange",se,{capture:!0}),de.disconnect()}},[]);let[K,D]=l.useState(!1),[$,Z]=l.useState(!1),[ee,ae]=l.useState(null),[te,ne]=l.useState(null);l.useEffect(()=>{ii(()=>{var L,W,se,ce;(L=I.current)==null||L.dispatchEvent(new Event("input"));let de=(W=I.current)==null?void 0:W.selectionStart,q=(se=I.current)==null?void 0:se.selectionEnd,ge=(ce=I.current)==null?void 0:ce.selectionDirection;de!==null&&q!==null&&(ae(de),ne(q),k.current.prev=[de,q,ge])})},[_,$]),l.useEffect(()=>{V!==void 0&&_!==V&&V.length<s&&_.length===s&&(p==null||p(_))},[s,p,V,_]);let ie=fi({containerRef:P,inputRef:I,pushPasswordManagerStrategy:h,isFocused:$}),Ne=l.useCallback(L=>{let W=L.currentTarget.value.slice(0,s);if(W.length>0&&j&&!j.test(W)){L.preventDefault();return}typeof V=="string"&&W.length<V.length&&document.dispatchEvent(new Event("selectionchange")),G(W)},[s,G,V,j]),pe=l.useCallback(()=>{var L;if(I.current){let W=Math.min(I.current.value.length,s-1),se=I.current.value.length;(L=I.current)==null||L.setSelectionRange(W,se),ae(W),ne(se)}Z(!0)},[s]),Fe=l.useCallback(L=>{var W,se;let ce=I.current;if(!m&&(!B.current.isIOS||!L.clipboardData||!ce))return;let de=L.clipboardData.getData("text/plain"),q=m?m(de):de;L.preventDefault();let ge=(W=I.current)==null?void 0:W.selectionStart,ur=(se=I.current)==null?void 0:se.selectionEnd,Ce=(ge!==ur?_.slice(0,ge)+q+_.slice(ur):_.slice(0,ge)+q+_.slice(ge)).slice(0,s);if(Ce.length>0&&j&&!j.test(Ce))return;ce.value=Ce,G(Ce);let Ye=Math.min(Ce.length,s-1),ke=Ce.length;ce.setSelectionRange(Ye,ke),ae(Ye),ne(ke)},[s,G,j,_]),Ke=l.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),F=l.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:i,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,i]),Q=l.useMemo(()=>l.createElement("input",ai(oi({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":ee,"data-input-otp-mse":te,inputMode:d,pattern:j==null?void 0:j.source,"aria-placeholder":u,style:F,maxLength:s,value:_,ref:I,onPaste:L=>{var W;Fe(L),(W=b.onPaste)==null||W.call(b,L)},onChange:Ne,onMouseOver:L=>{var W;D(!0),(W=b.onMouseOver)==null||W.call(b,L)},onMouseLeave:L=>{var W;D(!1),(W=b.onMouseLeave)==null||W.call(b,L)},onFocus:L=>{var W;pe(),(W=b.onFocus)==null||W.call(b,L)},onBlur:L=>{var W;Z(!1),(W=b.onBlur)==null||W.call(b,L)}})),[Ne,pe,Fe,d,F,s,te,ee,b,j==null?void 0:j.source,_]),he=l.useMemo(()=>({slots:Array.from({length:s}).map((L,W)=>{var se;let ce=$&&ee!==null&&te!==null&&(ee===te&&W===ee||W>=ee&&W<te),de=_[W]!==void 0?_[W]:null,q=_[0]!==void 0?null:(se=u==null?void 0:u[W])!=null?se:null;return{char:de,placeholderChar:q,isActive:ce,hasFakeCaret:ce&&de===null}}),isFocused:$,isHovering:!b.disabled&&K}),[$,K,s,te,ee,b.disabled,_]),qe=l.useMemo(()=>f?f(he):l.createElement(Un.Provider,{value:he},g),[g,he,f]);return l.createElement(l.Fragment,null,y!==null&&l.createElement("noscript",null,l.createElement("style",null,y)),l.createElement("div",{ref:P,"data-input-otp-container":!0,style:Ke,className:v},qe,l.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Q)))});Gn.displayName="Input";function ft(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var pi=`
1
+ (function(S,o){typeof exports=="object"&&typeof module<"u"?o(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"],o):(S=typeof globalThis<"u"?globalThis:S||self,o(S.randmarcomps={},S.jsxRuntime,S.React,S.ReactDOM,S["react-router-dom"]))})(this,function(S,o,q,wo,Ar){"use strict";function yo(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=yo(q),_r=yo(wo);var Xc=Object.defineProperty,Rc=Object.defineProperties,Qc=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,xo=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable,No=(e,t,r)=>t in e?Xc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zc=(e,t)=>{for(var r in t||(t={}))xo.call(t,r)&&No(e,r,t[r]);if($t)for(var r of $t(t))Co.call(t,r)&&No(e,r,t[r]);return e},Jc=(e,t)=>Rc(e,Qc(t)),el=(e,t)=>{var r={};for(var n in e)xo.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$t)for(var n of $t(e))t.indexOf(n)<0&&Co.call(e,n)&&(r[n]=e[n]);return r};function tl(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function rl(e){let t=i.useRef();return i.useEffect(()=>{t.current=e}),t.current}var nl=18,So=40,ol=`${So}px`,al=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function sl({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,s]=i.useState(!1),[c,l]=i.useState(!1),[u,d]=i.useState(!1),f=i.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&c,[a,c,r]),p=i.useCallback(()=>{let g=e.current,m=t.current;if(!g||!m||u||r==="none")return;let b=g,h=b.getBoundingClientRect().left+b.offsetWidth,v=b.getBoundingClientRect().top+b.offsetHeight/2,w=h-nl,y=v;document.querySelectorAll(al).length===0&&document.elementFromPoint(w,y)===g||(s(!0),d(!0))},[e,t,u,r]);return i.useEffect(()=>{let g=e.current;if(!g||r==="none")return;function m(){let h=window.innerWidth-g.getBoundingClientRect().right;l(h>=So)}m();let b=setInterval(m,1e3);return()=>{clearInterval(b)}},[e,r]),i.useEffect(()=>{let g=n||document.activeElement===t.current;if(r==="none"||!g)return;let m=setTimeout(p,0),b=setTimeout(p,2e3),h=setTimeout(p,5e3),v=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(b),clearTimeout(h),clearTimeout(v)}},[t,n,r,p]),{hasPWMBadge:a,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:ol}}var Eo=i.createContext({}),To=i.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:s,textAlign:c="left",pattern:l,placeholder:u,inputMode:d="numeric",onComplete:f,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:m,noScriptCSSFallback:b=il,render:h,children:v}=r,w=el(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,x,C,E,N;let[T,F]=i.useState(typeof w.defaultValue=="string"?w.defaultValue:""),k=n??T,z=rl(k),H=i.useCallback(W=>{a==null||a(W),F(W)},[a]),B=i.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),L=i.useRef(null),P=i.useRef(null),V=i.useRef({value:k,onChange:H,isIOS:typeof window<"u"&&((x=(y=window==null?void 0:window.CSS)==null?void 0:y.supports)==null?void 0:x.call(y,"-webkit-touch-callout","none"))}),A=i.useRef({prev:[(C=L.current)==null?void 0:C.selectionStart,(E=L.current)==null?void 0:E.selectionEnd,(N=L.current)==null?void 0:N.selectionDirection]});i.useImperativeHandle(t,()=>L.current,[]),i.useEffect(()=>{let W=L.current,j=P.current;if(!W||!j)return;V.current.value!==W.value&&V.current.onChange(W.value),A.current.prev=[W.selectionStart,W.selectionEnd,W.selectionDirection];function ue(){if(document.activeElement!==W){ee(null),ne(null);return}let Z=W.selectionStart,we=W.selectionEnd,Pr=W.selectionDirection,Ae=W.maxLength,et=W.value,$e=A.current.prev,Ke=-1,Ye=-1,tt;if(et.length!==0&&Z!==null&&we!==null){let Dg=Z===we,Og=Z===et.length&&et.length<Ae;if(Dg&&!Og){let rt=Z;if(rt===0)Ke=0,Ye=1,tt="forward";else if(rt===Ae)Ke=rt-1,Ye=rt,tt="backward";else if(Ae>1&&et.length>1){let bo=0;if($e[0]!==null&&$e[1]!==null){tt=rt<$e[1]?"backward":"forward";let Ig=$e[0]===$e[1]&&$e[0]<Ae;tt==="backward"&&!Ig&&(bo=-1)}Ke=bo+rt,Ye=bo+rt+1}}Ke!==-1&&Ye!==-1&&Ke!==Ye&&L.current.setSelectionRange(Ke,Ye,tt)}let Yc=Ke!==-1?Ke:Z,qc=Ye!==-1?Ye:we,_g=tt??Pr;ee(Yc),ne(qc),A.current.prev=[Yc,qc,_g]}if(document.addEventListener("selectionchange",ue,{capture:!0}),ue(),document.activeElement===W&&U(!0),!document.getElementById("input-otp-style")){let Z=document.createElement("style");if(Z.id="input-otp-style",document.head.appendChild(Z),Z.sheet){let we="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;";wt(Z.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),wt(Z.sheet,`[data-input-otp]:autofill { ${we} }`),wt(Z.sheet,`[data-input-otp]:-webkit-autofill { ${we} }`),wt(Z.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; } }"),wt(Z.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ge=()=>{j&&j.style.setProperty("--root-height",`${W.clientHeight}px`)};ge();let ve=new ResizeObserver(ge);return ve.observe(W),()=>{document.removeEventListener("selectionchange",ue,{capture:!0}),ve.disconnect()}},[]);let[Y,D]=i.useState(!1),[M,U]=i.useState(!1),[X,ee]=i.useState(null),[te,ne]=i.useState(null);i.useEffect(()=>{tl(()=>{var W,j,ue,ge;(W=L.current)==null||W.dispatchEvent(new Event("input"));let ve=(j=L.current)==null?void 0:j.selectionStart,Z=(ue=L.current)==null?void 0:ue.selectionEnd,we=(ge=L.current)==null?void 0:ge.selectionDirection;ve!==null&&Z!==null&&(ee(ve),ne(Z),A.current.prev=[ve,Z,we])})},[k,M]),i.useEffect(()=>{z!==void 0&&k!==z&&z.length<s&&k.length===s&&(f==null||f(k))},[s,f,z,k]);let se=sl({containerRef:P,inputRef:L,pushPasswordManagerStrategy:p,isFocused:M}),le=i.useCallback(W=>{let j=W.currentTarget.value.slice(0,s);if(j.length>0&&B&&!B.test(j)){W.preventDefault();return}typeof z=="string"&&j.length<z.length&&document.dispatchEvent(new Event("selectionchange")),H(j)},[s,H,z,B]),ae=i.useCallback(()=>{var W;if(L.current){let j=Math.min(L.current.value.length,s-1),ue=L.current.value.length;(W=L.current)==null||W.setSelectionRange(j,ue),ee(j),ne(ue)}U(!0)},[s]),Me=i.useCallback(W=>{var j,ue;let ge=L.current;if(!g&&(!V.current.isIOS||!W.clipboardData||!ge))return;let ve=W.clipboardData.getData("text/plain"),Z=g?g(ve):ve;W.preventDefault();let we=(j=L.current)==null?void 0:j.selectionStart,Pr=(ue=L.current)==null?void 0:ue.selectionEnd,Ae=(we!==Pr?k.slice(0,we)+Z+k.slice(Pr):k.slice(0,we)+Z+k.slice(we)).slice(0,s);if(Ae.length>0&&B&&!B.test(Ae))return;ge.value=Ae,H(Ae);let et=Math.min(Ae.length,s-1),$e=Ae.length;ge.setSelectionRange(et,$e),ee(et),ne($e)},[s,H,B,k]),de=i.useMemo(()=>({position:"relative",cursor:w.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[w.disabled]),Pe=i.useMemo(()=>({position:"absolute",inset:0,width:se.willPushPWMBadge?`calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:se.willPushPWMBadge?`inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,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"}),[se.PWM_BADGE_SPACE_WIDTH,se.willPushPWMBadge,c]),G=i.useMemo(()=>i.createElement("input",Jc(Zc({autoComplete:w.autoComplete||"one-time-code"},w),{"data-input-otp":!0,"data-input-otp-placeholder-shown":k.length===0||void 0,"data-input-otp-mss":X,"data-input-otp-mse":te,inputMode:d,pattern:B==null?void 0:B.source,"aria-placeholder":u,style:Pe,maxLength:s,value:k,ref:L,onPaste:W=>{var j;Me(W),(j=w.onPaste)==null||j.call(w,W)},onChange:le,onMouseOver:W=>{var j;D(!0),(j=w.onMouseOver)==null||j.call(w,W)},onMouseLeave:W=>{var j;D(!1),(j=w.onMouseLeave)==null||j.call(w,W)},onFocus:W=>{var j;ae(),(j=w.onFocus)==null||j.call(w,W)},onBlur:W=>{var j;U(!1),(j=w.onBlur)==null||j.call(w,W)}})),[le,ae,Me,d,Pe,s,te,X,w,B==null?void 0:B.source,k]),Q=i.useMemo(()=>({slots:Array.from({length:s}).map((W,j)=>{var ue;let ge=M&&X!==null&&te!==null&&(X===te&&j===X||j>=X&&j<te),ve=k[j]!==void 0?k[j]:null,Z=k[0]!==void 0?null:(ue=u==null?void 0:u[j])!=null?ue:null;return{char:ve,placeholderChar:Z,isActive:ge,hasFakeCaret:ge&&ve===null}}),isFocused:M,isHovering:!w.disabled&&Y}),[M,Y,s,te,X,w.disabled,k]),he=i.useMemo(()=>h?h(Q):i.createElement(Eo.Provider,{value:Q},v),[v,Q,h]);return i.createElement(i.Fragment,null,b!==null&&i.createElement("noscript",null,i.createElement("style",null,b)),i.createElement("div",{ref:P,"data-input-otp-container":!0,style:de,className:m},he,i.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},G)))});To.displayName="Input";function wt(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var il=`
2
2
  [data-input-otp] {
3
3
  --nojs-bg: white !important;
4
4
  --nojs-fg: black !important;
@@ -22,165 +22,175 @@
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 hi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
25
+ */const cl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mo=(...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 gi={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 ll={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 vi=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:i,...c},u)=>U.createElement("svg",{ref:u,...gi,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Kn("lucide",a),...c},[...i.map(([d,p])=>U.createElement(d,p)),...Array.isArray(s)?s:[s]]));/**
35
+ */const dl=q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:c,...l},u)=>q.createElement("svg",{ref:u,...ll,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Mo("lucide",a),...l},[...c.map(([d,f])=>q.createElement(d,f)),...Array.isArray(s)?s:[s]]));/**
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 R=(e,t)=>{const r=U.forwardRef(({className:n,...a},s)=>U.createElement(vi,{ref:s,iconNode:t,className:Kn(`lucide-${hi(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
40
+ */const re=(e,t)=>{const r=q.forwardRef(({className:n,...a},s)=>q.createElement(dl,{ref:s,iconNode:t,className:Mo(`lucide-${cl(e)}`,n),...a}));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 qn=R("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
45
+ */const Dr=re("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 mi=R("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
50
+ */const ul=re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 bi=R("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"}]]);/**
55
+ */const fl=re("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
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 yi=R("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"}]]);/**
60
+ */const pl=re("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
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 wi=R("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
65
+ */const hl=re("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"}]]);/**
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 Yn=R("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
70
+ */const gl=re("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"}]]);/**
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 xi=R("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"}]]);/**
75
+ */const vl=re("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
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 Ni=R("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"}]]);/**
80
+ */const Po=re("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 Ci=R("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
85
+ */const ml=re("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"}]]);/**
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 Si=R("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
90
+ */const bl=re("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"}]]);/**
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 Ei=R("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
95
+ */const wl=re("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
96
96
  * @license lucide-react v0.479.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const Ti=R("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
100
+ */const yl=re("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
101
101
  * @license lucide-react v0.479.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
- */const Pi=R("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
105
+ */const xl=re("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
106
106
  * @license lucide-react v0.479.0 - ISC
107
107
  *
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
- */const Ai=R("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
110
+ */const Cl=re("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
111
111
  * @license lucide-react v0.479.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
- */const Qn=R("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
115
+ */const Nl=re("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
116
116
  * @license lucide-react v0.479.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const Xn=R("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
120
+ */const Sl=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
121
121
  * @license lucide-react v0.479.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */const Mi=R("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
125
+ */const Ao=re("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
126
126
  * @license lucide-react v0.479.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const ki=R("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"}]]);/**
130
+ */const _o=re("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
131
131
  * @license lucide-react v0.479.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const Zn=R("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
135
+ */const El=re("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
136
136
  * @license lucide-react v0.479.0 - ISC
137
137
  *
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
- */const hr=R("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Jn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Jn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rn(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Jn(e))&&(n&&(n+=" "),n+=t);return n}const gr="-",Oi=e=>{const t=_i(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const c=i.split(gr);return c[0]===""&&c.length!==1&&c.shift(),eo(c,t)||Di(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},eo=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?eo(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(gr);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},to=/^\[(.+)\]$/,Di=e=>{if(to.test(e)){const t=to.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_i=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)vr(r[a],n,a,t);return n},vr=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:ro(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(Ii(a)){vr(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,i])=>{vr(i,ro(t,s),r,n)})})},ro=(e,t)=>{let r=e;return t.split(gr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Ii=e=>e.isThemeGetter,Li=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return a(s,i),i},set(s,i){r.has(s)?r.set(s,i):a(s,i)}}},mr="!",br=":",$i=br.length,Fi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,c=0,u=0,d;for(let y=0;y<a.length;y++){let f=a[y];if(i===0&&c===0){if(f===br){s.push(a.slice(u,y)),u=y+$i;continue}if(f==="/"){d=y;continue}}f==="["?i++:f==="]"?i--:f==="("?c++:f===")"&&c--}const p=s.length===0?a:a.substring(u),h=zi(p),m=h!==p,v=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:v}};if(t){const a=t+br,s=n;n=i=>i.startsWith(a)?s(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},zi=e=>e.endsWith(mr)?e.substring(0,e.length-1):e.startsWith(mr)?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 a=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...s.sort(),i),s=[]):s.push(i)}),a.push(...s.sort()),a}},Wi=e=>({cache:Li(e.cacheSize),parseClassName:Fi(e),sortModifiers:Bi(e),...Oi(e)}),Vi=/\s+/,ji=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],c=e.trim().split(Vi);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:h,modifiers:m,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:f}=r(p);if(h){u=p+(u.length>0?" "+u:u);continue}let g=!!f,b=n(g?y.substring(0,f):y);if(!b){if(!g){u=p+(u.length>0?" "+u:u);continue}if(b=n(y),!b){u=p+(u.length>0?" "+u:u);continue}g=!1}const w=s(m).join(":"),x=v?w+mr:w,N=x+b;if(i.includes(N))continue;i.push(N);const S=a(b,g);for(let C=0;C<S.length;++C){const T=S[C];i.push(x+T)}u=p+(u.length>0?" "+u:u)}return u};function Hi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=no(t))&&(n&&(n+=" "),n+=r);return n}const no=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=no(e[n]))&&(r&&(r+=" "),r+=t);return r};function Ui(e,...t){let r,n,a,s=i;function i(u){const d=t.reduce((p,h)=>h(p),e());return r=Wi(d),n=r.cache.get,a=r.cache.set,s=c,c(u)}function c(u){const d=n(u);if(d)return d;const p=ji(u,r);return a(u,p),p}return function(){return s(Hi.apply(null,arguments))}}const re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},oo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ao=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Gi=/^\d+\/\d+$/,Ki=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qi=/\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$/,Yi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>Gi.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),so=e=>e.endsWith("%")&&H(e.slice(0,-1)),Oe=e=>Ki.test(e),Zi=()=>!0,Ji=e=>qi.test(e)&&!Yi.test(e),yr=()=>!1,Ri=e=>Qi.test(e),el=e=>Xi.test(e),tl=e=>!A(e)&&!M(e),rl=e=>Je(e,co,yr),A=e=>oo.test(e),Ve=e=>Je(e,uo,Ji),wr=e=>Je(e,pl,H),nl=e=>Je(e,io,yr),ol=e=>Je(e,lo,el),al=e=>Je(e,yr,Ri),M=e=>ao.test(e),St=e=>Re(e,uo),sl=e=>Re(e,hl),il=e=>Re(e,io),ll=e=>Re(e,co),cl=e=>Re(e,lo),dl=e=>Re(e,gl,!0),Je=(e,t,r)=>{const n=oo.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Re=(e,t,r=!1)=>{const n=ao.exec(e);return n?n[1]?t(n[1]):r:!1},io=e=>e==="position",ul=new Set(["image","url"]),lo=e=>ul.has(e),fl=new Set(["length","size","percentage"]),co=e=>fl.has(e),uo=e=>e==="length",pl=e=>e==="number",hl=e=>e==="family-name",gl=e=>e==="shadow",vl=Ui(()=>{const e=re("color"),t=re("font"),r=re("text"),n=re("font-weight"),a=re("tracking"),s=re("leading"),i=re("breakpoint"),c=re("container"),u=re("spacing"),d=re("radius"),p=re("shadow"),h=re("inset-shadow"),m=re("drop-shadow"),v=re("blur"),y=re("perspective"),f=re("aspect"),g=re("ease"),b=re("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"],N=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[M,A,u],T=()=>[Ze,"full","auto",...C()],z=()=>[We,"none","subgrid",M,A],_=()=>["auto",{span:["full",We,M,A]},M,A],V=()=>[We,"auto",M,A],G=()=>["auto","min","max","fr",M,A],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],I=()=>["start","end","center","stretch"],P=()=>["auto",...C()],B=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,A],K=()=>[so,Ve],D=()=>["","none","full",d,M,A],$=()=>["",H,St,Ve],Z=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["","none",v,M,A],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,A],ne=()=>["none",H,M,A],ie=()=>["none",H,M,A],Ne=()=>[H,M,A],pe=()=>[Ze,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oe],breakpoint:[Oe],color:[Zi],container:[Oe],"drop-shadow":[Oe],ease:["in","out","in-out"],font:[tl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oe],shadow:[Oe],spacing:["px",H],text:[Oe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,A,M,f]}],container:["container"],columns:[{columns:[H,A,M,c]}],"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,M]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",M,A]}],basis:[{basis:[Ze,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Ze,"auto","initial","none",A]}],grow:[{grow:["",H,M,A]}],shrink:[{shrink:["",H,M,A]}],order:[{order:[We,"first","last","none",M,A]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...I(),"baseline"]}],"align-self":[{self:["auto",...I(),"baseline"]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],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:[c,"screen",...B()]}],"min-w":[{"min-w":[c,"screen","none",...B()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen",...B()]}],"min-h":[{"min-h":["screen","none",...B()]}],"max-h":[{"max-h":["screen",...B()]}],"font-size":[{text:["base",r,St,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,wr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",so,A]}],"font-family":[{font:[sl,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:[a,M,A]}],"line-clamp":[{"line-clamp":[H,"none",M,wr]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",M,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",M,Ve]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[H,"auto",M,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",M,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",M,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(),il,nl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ll,rl]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,M,A],radial:["",M,A],conic:[We,M,A]},cl,ol]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,M,A]}],"outline-w":[{outline:["",H,St,Ve]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,dl,al]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,A,h]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[H,Ve]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[H,M,A]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none",M,A]}],blur:[{blur:ae()}],brightness:[{brightness:[H,M,A]}],contrast:[{contrast:[H,M,A]}],"drop-shadow":[{"drop-shadow":["","none",m,M,A]}],grayscale:[{grayscale:["",H,M,A]}],"hue-rotate":[{"hue-rotate":[H,M,A]}],invert:[{invert:["",H,M,A]}],saturate:[{saturate:[H,M,A]}],sepia:[{sepia:["",H,M,A]}],"backdrop-filter":[{"backdrop-filter":["","none",M,A]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[H,M,A]}],"backdrop-contrast":[{"backdrop-contrast":[H,M,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,M,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,M,A]}],"backdrop-invert":[{"backdrop-invert":["",H,M,A]}],"backdrop-opacity":[{"backdrop-opacity":[H,M,A]}],"backdrop-saturate":[{"backdrop-saturate":[H,M,A]}],"backdrop-sepia":[{"backdrop-sepia":["",H,M,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",M,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",M,A]}],ease:[{ease:["linear","initial",g,M,A]}],delay:[{delay:[H,M,A]}],animate:[{animate:["none",b,M,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,M,A]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[M,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",M,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",M,A]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[H,St,Ve,wr]}],stroke:[{stroke:["none",...k()]}],"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 O(...e){return vl(Rn(e))}function ml({className:e,containerClassName:t,...r}){return o.jsx(Gn,{"data-slot":"input-otp",containerClassName:O("flex items-center gap-2 has-disabled:opacity-50",t),className:O("disabled:cursor-not-allowed",e),...r})}function bl({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:O("flex items-center",e),...t})}function yl({index:e,className:t,...r}){const n=l.useContext(Un),{char:a,hasFakeCaret:s,isActive:i}=(n==null?void 0:n.slots[e])??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":i,className:O("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:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function wl({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o.jsx(Ci,{})})}function X(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function fo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function po(...e){return t=>{let r=!1;const n=e.map(a=>{const s=fo(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():fo(e[a],null)}}}}function le(...e){return l.useCallback(po(...e),e)}function xl(e,t){const r=l.createContext(t),n=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return o.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function a(s){const i=l.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,a]}function pt(e,t=[]){let r=[];function n(s,i){const c=l.createContext(i),u=r.length;r=[...r,i];const d=h=>{var b;const{scope:m,children:v,...y}=h,f=((b=m==null?void 0:m[e])==null?void 0:b[u])||c,g=l.useMemo(()=>y,Object.values(y));return o.jsx(f.Provider,{value:g,children:v})};d.displayName=s+"Provider";function p(h,m){var f;const v=((f=m==null?void 0:m[e])==null?void 0:f[u])||c,y=l.useContext(v);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,p]}const a=()=>{const s=r.map(i=>l.createContext(i));return function(c){const u=(c==null?void 0:c[e])||s;return l.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[n,Nl(a,...t)]}function Nl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=n.reduce((c,{useScope:u,scopeName:d})=>{const h=u(s)[`__scope${d}`];return{...c,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var De=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Cl=l.useId||(()=>{}),Sl=0;function Et(e){const[t,r]=l.useState(Cl());return De(()=>{r(n=>n??String(Sl++))},[e]),e||(t?`radix-${t}`:"")}function ve(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function xr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=El({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,c=ve(r),u=l.useCallback(d=>{if(s){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else a(d)},[s,e,a,c]);return[i,u]}function El({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,a=l.useRef(n),s=ve(t);return l.useEffect(()=>{a.current!==n&&(s(n),a.current=n)},[n,a,s]),r}var me=l.forwardRef((e,t)=>{const{children:r,...n}=e,a=l.Children.toArray(r),s=a.find(Tl);if(s){const i=s.props.children,c=a.map(u=>u===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:u);return o.jsx(Nr,{...n,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,c):null})}return o.jsx(Nr,{...n,ref:t,children:r})});me.displayName="Slot";var Nr=l.forwardRef((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const a=Al(r),s=Pl(n,r.props);return r.type!==l.Fragment&&(s.ref=t?po(t,a):a),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});Nr.displayName="SlotClone";var ho=({children:e})=>o.jsx(o.Fragment,{children:e});function Tl(e){return l.isValidElement(e)&&e.type===ho}function Pl(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{s(...c),a(...c)}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function Al(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ml=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Ml.reduce((e,t)=>{const r=l.forwardRef((n,a)=>{const{asChild:s,...i}=n,c=s?me:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function go(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function kl(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e);l.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Ol="DismissableLayer",Cr="dismissableLayer.update",Dl="dismissableLayer.pointerDownOutside",_l="dismissableLayer.focusOutside",vo,mo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(mo),[p,h]=l.useState(null),m=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=l.useState({}),y=le(t,T=>h(T)),f=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=f.indexOf(g),w=p?f.indexOf(p):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=b,S=Ll(T=>{const z=T.target,_=[...d.branches].some(V=>V.contains(z));!N||_||(a==null||a(T),i==null||i(T),T.defaultPrevented||c==null||c())},m),C=$l(T=>{const z=T.target;[...d.branches].some(V=>V.contains(z))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},m);return kl(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},m),l.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(vo=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),yo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=vo)}},[p,m,r,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),yo())},[p,d]),l.useEffect(()=>{const T=()=>v({});return document.addEventListener(Cr,T),()=>document.removeEventListener(Cr,T)},[]),o.jsx(J.div,{...u,ref:y,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,C.onFocusCapture),onBlurCapture:X(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,S.onPointerDownCapture)})});Tt.displayName=Ol;var Il="DismissableLayerBranch",bo=l.forwardRef((e,t)=>{const r=l.useContext(mo),n=l.useRef(null),a=le(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(J.div,{...e,ref:a})});bo.displayName=Il;function Ll(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e),n=l.useRef(!1),a=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let u=function(){wo(Dl,r,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function $l(e,t=globalThis==null?void 0:globalThis.document){const r=ve(e),n=l.useRef(!1);return l.useEffect(()=>{const a=s=>{s.target&&!n.current&&wo(_l,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yo(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function wo(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?go(a,s):a.dispatchEvent(s)}var Fl=Tt,zl=bo,Sr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",xo={bubbles:!1,cancelable:!0},Bl="FocusScope",No=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=ve(a),p=ve(s),h=l.useRef(null),m=le(t,f=>u(f)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let f=function(x){if(v.paused||!c)return;const N=x.target;c.contains(N)?h.current=N:_e(h.current,{select:!0})},g=function(x){if(v.paused||!c)return;const N=x.relatedTarget;N!==null&&(c.contains(N)||_e(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",f),document.addEventListener("focusout",g);const w=new MutationObserver(b);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",g),w.disconnect()}}},[n,c,v.paused]),l.useEffect(()=>{if(c){Eo.add(v);const f=document.activeElement;if(!c.contains(f)){const b=new CustomEvent(Sr,xo);c.addEventListener(Sr,d),c.dispatchEvent(b),b.defaultPrevented||(Wl(Gl(Co(c)),{select:!0}),document.activeElement===f&&_e(c))}return()=>{c.removeEventListener(Sr,d),setTimeout(()=>{const b=new CustomEvent(Er,xo);c.addEventListener(Er,p),c.dispatchEvent(b),b.defaultPrevented||_e(f??document.body,{select:!0}),c.removeEventListener(Er,p),Eo.remove(v)},0)}}},[c,d,p,v]);const y=l.useCallback(f=>{if(!r&&!n||v.paused)return;const g=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,b=document.activeElement;if(g&&b){const w=f.currentTarget,[x,N]=Vl(w);x&&N?!f.shiftKey&&b===N?(f.preventDefault(),r&&_e(x,{select:!0})):f.shiftKey&&b===x&&(f.preventDefault(),r&&_e(N,{select:!0})):b===w&&f.preventDefault()}},[r,n,v.paused]);return o.jsx(J.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});No.displayName=Bl;function Wl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(_e(n,{select:t}),document.activeElement!==r)return}function Vl(e){const t=Co(e),r=So(t,e),n=So(t.reverse(),e);return[r,n]}function Co(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function So(e,t){for(const r of e)if(!jl(r,{upTo:t}))return r}function jl(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 Hl(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Hl(e)&&t&&e.select()}}var Eo=Ul();function Ul(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=To(e,t),e.unshift(t)},remove(t){var r;e=To(e,t),(r=e[0])==null||r.resume()}}}function To(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Gl(e){return e.filter(t=>t.tagName!=="A")}var Kl="Portal",Pt=l.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[a,s]=l.useState(!1);De(()=>s(!0),[]);const i=r||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?zn.createPortal(o.jsx(J.div,{...n,ref:t}),i):null});Pt.displayName=Kl;function ql(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var je=e=>{const{present:t,children:r}=e,n=Yl(t),a=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=le(n.ref,Ql(a));return typeof r=="function"||n.isPresent?l.cloneElement(a,{ref:s}):null};je.displayName="Presence";function Yl(e){const[t,r]=l.useState(),n=l.useRef({}),a=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=ql(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=At(n.current);s.current=c==="mounted"?d:"none"},[c]),De(()=>{const d=n.current,p=a.current;if(p!==e){const m=s.current,v=At(d);e?u("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),De(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=v=>{const f=At(n.current).includes(v.animationName);if(v.target===t&&f&&(u("ANIMATION_END"),!a.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},m=v=>{v.target===t&&(s.current=At(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:l.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function At(e){return(e==null?void 0:e.animationName)||"none"}function Ql(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tr=0;function Xl(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}function Po(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Se=function(){return Se=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Se.apply(this,arguments)};function Ao(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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Zl(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Mt="right-scroll-bar-position",kt="width-before-scroll-bar",Jl="with-scroll-bars-hidden",Rl="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ec(e,t){var r=U.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var tc=typeof window<"u"?l.useLayoutEffect:l.useEffect,Mo=new WeakMap;function rc(e,t){var r=ec(null,function(n){return e.forEach(function(a){return Pr(a,n)})});return tc(function(){var n=Mo.get(r);if(n){var a=new Set(n),s=new Set(e),i=r.current;a.forEach(function(c){s.has(c)||Pr(c,null)}),s.forEach(function(c){a.has(c)||Pr(c,i)})}Mo.set(r,e)},[e]),r}function nc(e){return e}function oc(e,t){t===void 0&&(t=nc);var r=[],n=!1,a={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(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(c){return c!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var c=r;r=[],c.forEach(s),i=r}var u=function(){var p=i;i=[],p.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(p){i.push(p),d()},filter:function(p){return i=i.filter(p),r}}}};return a}function ac(e){e===void 0&&(e={});var t=oc(null);return t.options=Se({async:!0,ssr:!1},e),t}var ko=function(e){var t=e.sideCar,r=Ao(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 l.createElement(n,Se({},r))};ko.isSideCarExport=!0;function sc(e,t){return e.useMedium(t),ko}var Oo=ac(),Ar=function(){},Ot=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),a=n[0],s=n[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,m=e.sideCar,v=e.noIsolation,y=e.inert,f=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=Ao(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=m,S=rc([r,t]),C=Se(Se({},x),a);return l.createElement(l.Fragment,null,p&&l.createElement(N,{sideCar:Oo,removeScrollBar:d,shards:h,noIsolation:v,inert:y,setCallbacks:s,allowPinchZoom:!!f,lockRef:r,gapMode:w}),i?l.cloneElement(l.Children.only(c),Se(Se({},C),{ref:S})):l.createElement(b,Se({},C,{className:u,ref:S}),c))});Ot.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ot.classNames={fullWidth:kt,zeroRight:Mt};var ic=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ic();return t&&e.setAttribute("nonce",t),e}function cc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lc())&&(cc(t,r),dc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fc=function(){var e=uc();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Do=function(){var e=fc(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},pc={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},hc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(r),Mr(n),Mr(a)]},gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pc;var t=hc(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])}},vc=Do(),et="data-scroll-locked",mc=function(e,t,r,n){var a=e.left,s=e.top,i=e.right,c=e.gap;return r===void 0&&(r="margin"),`
141
- .`.concat(Jl,` {
140
+ */const Tl=re("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"}]]);/**
141
+ * @license lucide-react v0.479.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Do=re("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
146
+ * @license lucide-react v0.479.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Or=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Oo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Oo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Io(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Oo(e))&&(n&&(n+=" "),n+=t);return n}const Ir="-",Ml=e=>{const t=Al(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:c=>{const l=c.split(Ir);return l[0]===""&&l.length!==1&&l.shift(),ko(l,t)||Pl(c)},getConflictingClassGroupIds:(c,l)=>{const u=r[c]||[];return l&&n[c]?[...u,...n[c]]:u}}},ko=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?ko(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(Ir);return(c=t.validators.find(({validator:l})=>l(s)))==null?void 0:c.classGroupId},Lo=/^\[(.+)\]$/,Pl=e=>{if(Lo.test(e)){const t=Lo.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Al=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)kr(r[a],n,a,t);return n},kr=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:Fo(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(_l(a)){kr(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,c])=>{kr(c,Fo(t,s),r,n)})})},Fo=(e,t)=>{let r=e;return t.split(Ir).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},_l=e=>e.isThemeGetter,Dl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,c)=>{r.set(s,c),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let c=r.get(s);if(c!==void 0)return c;if((c=n.get(s))!==void 0)return a(s,c),c},set(s,c){r.has(s)?r.set(s,c):a(s,c)}}},Lr="!",Fr=":",Ol=Fr.length,Il=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let c=0,l=0,u=0,d;for(let b=0;b<a.length;b++){let h=a[b];if(c===0&&l===0){if(h===Fr){s.push(a.slice(u,b)),u=b+Ol;continue}if(h==="/"){d=b;continue}}h==="["?c++:h==="]"?c--:h==="("?l++:h===")"&&l--}const f=s.length===0?a:a.substring(u),p=kl(f),g=p!==f,m=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:m}};if(t){const a=t+Fr,s=n;n=c=>c.startsWith(a)?s(c.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},kl=e=>e.endsWith(Lr)?e.substring(0,e.length-1):e.startsWith(Lr)?e.substring(1):e,Ll=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(c=>{c[0]==="["||t[c]?(a.push(...s.sort(),c),s=[]):s.push(c)}),a.push(...s.sort()),a}},Fl=e=>({cache:Dl(e.cacheSize),parseClassName:Il(e),sortModifiers:Ll(e),...Ml(e)}),$l=/\s+/,zl=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,c=[],l=e.trim().split($l);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:h}=r(f);if(p){u=f+(u.length>0?" "+u:u);continue}let v=!!h,w=n(v?b.substring(0,h):b);if(!w){if(!v){u=f+(u.length>0?" "+u:u);continue}if(w=n(b),!w){u=f+(u.length>0?" "+u:u);continue}v=!1}const y=s(g).join(":"),x=m?y+Lr:y,C=x+w;if(c.includes(C))continue;c.push(C);const E=a(w,v);for(let N=0;N<E.length;++N){const T=E[N];c.push(x+T)}u=f+(u.length>0?" "+u:u)}return u};function Bl(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$o(t))&&(n&&(n+=" "),n+=r);return n}const $o=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$o(e[n]))&&(r&&(r+=" "),r+=t);return r};function Wl(e,...t){let r,n,a,s=c;function c(u){const d=t.reduce((f,p)=>p(f),e());return r=Fl(d),n=r.cache.get,a=r.cache.set,s=l,l(u)}function l(u){const d=n(u);if(d)return d;const f=zl(u,r);return a(u,f),f}return function(){return s(Bl.apply(null,arguments))}}const ie=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vl=/^\d+\/\d+$/,Gl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jl=/\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$/,Hl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ul=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Vl.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),qe=e=>!!e&&Number.isInteger(Number(e)),Wo=e=>e.endsWith("%")&&K(e.slice(0,-1)),ze=e=>Gl.test(e),Yl=()=>!0,ql=e=>jl.test(e)&&!Hl.test(e),$r=()=>!1,Xl=e=>Ul.test(e),Rl=e=>Kl.test(e),Ql=e=>!O(e)&&!I(e),Zl=e=>ot(e,jo,$r),O=e=>zo.test(e),Xe=e=>ot(e,Ho,ql),zr=e=>ot(e,ld,K),Jl=e=>ot(e,Vo,$r),ed=e=>ot(e,Go,Rl),td=e=>ot(e,$r,Xl),I=e=>Bo.test(e),zt=e=>at(e,Ho),rd=e=>at(e,dd),nd=e=>at(e,Vo),od=e=>at(e,jo),ad=e=>at(e,Go),sd=e=>at(e,ud,!0),ot=(e,t,r)=>{const n=zo.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},at=(e,t,r=!1)=>{const n=Bo.exec(e);return n?n[1]?t(n[1]):r:!1},Vo=e=>e==="position",id=new Set(["image","url"]),Go=e=>id.has(e),cd=new Set(["length","size","percentage"]),jo=e=>cd.has(e),Ho=e=>e==="length",ld=e=>e==="number",dd=e=>e==="family-name",ud=e=>e==="shadow",fd=Wl(()=>{const e=ie("color"),t=ie("font"),r=ie("text"),n=ie("font-weight"),a=ie("tracking"),s=ie("leading"),c=ie("breakpoint"),l=ie("container"),u=ie("spacing"),d=ie("radius"),f=ie("shadow"),p=ie("inset-shadow"),g=ie("drop-shadow"),m=ie("blur"),b=ie("perspective"),h=ie("aspect"),v=ie("ease"),w=ie("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],N=()=>[I,O,u],T=()=>[nt,"full","auto",...N()],F=()=>[qe,"none","subgrid",I,O],k=()=>["auto",{span:["full",qe,I,O]},I,O],z=()=>[qe,"auto",I,O],H=()=>["auto","min","max","fr",I,O],B=()=>["start","end","center","between","around","evenly","stretch","baseline"],L=()=>["start","end","center","stretch"],P=()=>["auto",...N()],V=()=>[nt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],A=()=>[e,I,O],Y=()=>[Wo,Xe],D=()=>["","none","full",d,I,O],M=()=>["",K,zt,Xe],U=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["","none",m,I,O],te=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I,O],ne=()=>["none",K,I,O],se=()=>["none",K,I,O],le=()=>[K,I,O],ae=()=>[nt,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ze],breakpoint:[ze],color:[Yl],container:[ze],"drop-shadow":[ze],ease:["in","out","in-out"],font:[Ql],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ze],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ze],shadow:[ze],spacing:["px",K],text:[ze],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nt,O,I,h]}],container:["container"],columns:[{columns:[K,O,I,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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(),O,I]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[qe,"auto",I,O]}],basis:[{basis:[nt,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,nt,"auto","initial","none",O]}],grow:[{grow:["",K,I,O]}],shrink:[{shrink:["",K,I,O]}],order:[{order:[qe,"first","last","none",I,O]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:k()}],"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:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...L(),"baseline"]}],"align-self":[{self:["auto",...L(),"baseline"]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],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":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[l,"screen",...V()]}],"min-w":[{"min-w":[l,"screen","none",...V()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[c]},...V()]}],h:[{h:["screen",...V()]}],"min-h":[{"min-h":["screen","none",...V()]}],"max-h":[{"max-h":["screen",...V()]}],"font-size":[{text:["base",r,zt,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,I,zr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wo,O]}],"font-family":[{font:[rd,O,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:[a,I,O]}],"line-clamp":[{"line-clamp":[K,"none",I,zr]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",I,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",I,Xe]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",I,O]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,O]}],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",I,O]}],"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(),nd,Jl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",od,Zl]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qe,I,O],radial:["",I,O],conic:[qe,I,O]},ad,ed]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,I,O]}],"outline-w":[{outline:["",K,zt,Xe]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,sd,td]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",I,O,p]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,Xe]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":A()}],opacity:[{opacity:[K,I,O]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none",I,O]}],blur:[{blur:ee()}],brightness:[{brightness:[K,I,O]}],contrast:[{contrast:[K,I,O]}],"drop-shadow":[{"drop-shadow":["","none",g,I,O]}],grayscale:[{grayscale:["",K,I,O]}],"hue-rotate":[{"hue-rotate":[K,I,O]}],invert:[{invert:["",K,I,O]}],saturate:[{saturate:[K,I,O]}],sepia:[{sepia:["",K,I,O]}],"backdrop-filter":[{"backdrop-filter":["","none",I,O]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[K,I,O]}],"backdrop-contrast":[{"backdrop-contrast":[K,I,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,I,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,I,O]}],"backdrop-invert":[{"backdrop-invert":["",K,I,O]}],"backdrop-opacity":[{"backdrop-opacity":[K,I,O]}],"backdrop-saturate":[{"backdrop-saturate":[K,I,O]}],"backdrop-sepia":[{"backdrop-sepia":["",K,I,O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",I,O]}],ease:[{ease:["linear","initial",v,I,O]}],delay:[{delay:[K,I,O]}],animate:[{animate:["none",w,I,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,I,O]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[I,O,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",I,O]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",I,O]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,zt,Xe,zr]}],stroke:[{stroke:["none",...A()]}],"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 _(...e){return fd(Io(e))}function pd({className:e,containerClassName:t,...r}){return o.jsx(To,{"data-slot":"input-otp",containerClassName:_("flex items-center gap-2 has-disabled:opacity-50",t),className:_("disabled:cursor-not-allowed",e),...r})}function hd({className:e,...t}){return o.jsx("div",{"data-slot":"input-otp-group",className:_("flex items-center",e),...t})}function gd({index:e,className:t,...r}){const n=i.useContext(Eo),{char:a,hasFakeCaret:s,isActive:c}=(n==null?void 0:n.slots[e])??{};return o.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:_("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:[a,s&&o.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:o.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function vd({...e}){return o.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:o.jsx(wl,{})})}function $(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Uo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bt(...e){return t=>{let r=!1;const n=e.map(a=>{const s=Uo(a,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():Uo(e[a],null)}}}}function oe(...e){return i.useCallback(Bt(...e),e)}function md(e,t){const r=i.createContext(t),n=s=>{const{children:c,...l}=s,u=i.useMemo(()=>l,Object.values(l));return o.jsx(r.Provider,{value:u,children:c})};n.displayName=e+"Provider";function a(s){const c=i.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,a]}function Be(e,t=[]){let r=[];function n(s,c){const l=i.createContext(c),u=r.length;r=[...r,c];const d=p=>{var w;const{scope:g,children:m,...b}=p,h=((w=g==null?void 0:g[e])==null?void 0:w[u])||l,v=i.useMemo(()=>b,Object.values(b));return o.jsx(h.Provider,{value:v,children:m})};d.displayName=s+"Provider";function f(p,g){var h;const m=((h=g==null?void 0:g[e])==null?void 0:h[u])||l,b=i.useContext(m);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,f]}const a=()=>{const s=r.map(c=>i.createContext(c));return function(l){const u=(l==null?void 0:l[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return a.scopeName=e,[n,bd(a,...t)]}function bd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const c=n.reduce((l,{useScope:u,scopeName:d})=>{const p=u(s)[`__scope${d}`];return{...l,...p}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}var We=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},wd=i.useId||(()=>{}),yd=0;function ke(e){const[t,r]=i.useState(wd());return We(()=>{r(n=>n??String(yd++))},[e]),t?`radix-${t}`:""}function fe(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 st({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=xd({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:n,l=fe(r),u=i.useCallback(d=>{if(s){const p=typeof d=="function"?d(e):d;p!==e&&l(p)}else a(d)},[s,e,a,l]);return[c,u]}function xd({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,a=i.useRef(n),s=fe(t);return i.useEffect(()=>{a.current!==n&&(s(n),a.current=n)},[n,a,s]),r}var ye=i.forwardRef((e,t)=>{const{children:r,...n}=e,a=i.Children.toArray(r),s=a.find(Cd);if(s){const c=s.props.children,l=a.map(u=>u===s?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:u);return o.jsx(Br,{...n,ref:t,children:i.isValidElement(c)?i.cloneElement(c,void 0,l):null})}return o.jsx(Br,{...n,ref:t,children:r})});ye.displayName="Slot";var Br=i.forwardRef((e,t)=>{const{children:r,...n}=e;if(i.isValidElement(r)){const a=Sd(r),s=Nd(n,r.props);return r.type!==i.Fragment&&(s.ref=t?Bt(t,a):a),i.cloneElement(r,s)}return i.Children.count(r)>1?i.Children.only(null):null});Br.displayName="SlotClone";var Ko=({children:e})=>o.jsx(o.Fragment,{children:e});function Cd(e){return i.isValidElement(e)&&e.type===Ko}function Nd(e,t){const r={...t};for(const n in t){const a=e[n],s=t[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...l)=>{s(...l),a(...l)}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...e,...r}}function Sd(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ed=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=Ed.reduce((e,t)=>{const r=i.forwardRef((n,a)=>{const{asChild:s,...c}=n,l=s?ye:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(l,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Wr(e,t){e&&_r.flushSync(()=>e.dispatchEvent(t))}function Td(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);i.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Md="DismissableLayer",Vr="dismissableLayer.update",Pd="dismissableLayer.pointerDownOutside",Ad="dismissableLayer.focusOutside",Yo,qo=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=i.useContext(qo),[f,p]=i.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),b=oe(t,T=>p(T)),h=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(v),y=f?h.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,C=y>=w,E=Dd(T=>{const F=T.target,k=[...d.branches].some(z=>z.contains(F));!C||k||(a==null||a(T),c==null||c(T),T.defaultPrevented||l==null||l())},g),N=Od(T=>{const F=T.target;[...d.branches].some(z=>z.contains(F))||(s==null||s(T),c==null||c(T),T.defaultPrevented||l==null||l())},g);return Td(T=>{y===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),i.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Yo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ro(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Yo)}},[f,g,r,d]),i.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ro())},[f,d]),i.useEffect(()=>{const T=()=>m({});return document.addEventListener(Vr,T),()=>document.removeEventListener(Vr,T)},[]),o.jsx(R.div,{...u,ref:b,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,N.onFocusCapture),onBlurCapture:$(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,E.onPointerDownCapture)})});yt.displayName=Md;var _d="DismissableLayerBranch",Xo=i.forwardRef((e,t)=>{const r=i.useContext(qo),n=i.useRef(null),a=oe(t,n);return i.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(R.div,{...e,ref:a})});Xo.displayName=_d;function Dd(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{const s=l=>{if(l.target&&!n.current){let u=function(){Qo(Pd,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);n.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Od(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=i.useRef(!1);return i.useEffect(()=>{const a=s=>{s.target&&!n.current&&Qo(Ad,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ro(){const e=new CustomEvent(Vr);document.dispatchEvent(e)}function Qo(e,t,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Wr(a,s):a.dispatchEvent(s)}var Id=yt,kd=Xo,Gr="focusScope.autoFocusOnMount",jr="focusScope.autoFocusOnUnmount",Zo={bubbles:!1,cancelable:!0},Ld="FocusScope",Hr=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...c}=e,[l,u]=i.useState(null),d=fe(a),f=fe(s),p=i.useRef(null),g=oe(t,h=>u(h)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let h=function(x){if(m.paused||!l)return;const C=x.target;l.contains(C)?p.current=C:Ve(p.current,{select:!0})},v=function(x){if(m.paused||!l)return;const C=x.relatedTarget;C!==null&&(l.contains(C)||Ve(p.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Ve(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const y=new MutationObserver(w);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),y.disconnect()}}},[n,l,m.paused]),i.useEffect(()=>{if(l){ta.add(m);const h=document.activeElement;if(!l.contains(h)){const w=new CustomEvent(Gr,Zo);l.addEventListener(Gr,d),l.dispatchEvent(w),w.defaultPrevented||(Fd(Vd(Jo(l)),{select:!0}),document.activeElement===h&&Ve(l))}return()=>{l.removeEventListener(Gr,d),setTimeout(()=>{const w=new CustomEvent(jr,Zo);l.addEventListener(jr,f),l.dispatchEvent(w),w.defaultPrevented||Ve(h??document.body,{select:!0}),l.removeEventListener(jr,f),ta.remove(m)},0)}}},[l,d,f,m]);const b=i.useCallback(h=>{if(!r&&!n||m.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(v&&w){const y=h.currentTarget,[x,C]=$d(y);x&&C?!h.shiftKey&&w===C?(h.preventDefault(),r&&Ve(x,{select:!0})):h.shiftKey&&w===x&&(h.preventDefault(),r&&Ve(C,{select:!0})):w===y&&h.preventDefault()}},[r,n,m.paused]);return o.jsx(R.div,{tabIndex:-1,...c,ref:g,onKeyDown:b})});Hr.displayName=Ld;function Fd(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ve(n,{select:t}),document.activeElement!==r)return}function $d(e){const t=Jo(e),r=ea(t,e),n=ea(t.reverse(),e);return[r,n]}function Jo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ea(e,t){for(const r of e)if(!zd(r,{upTo:t}))return r}function zd(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 Bd(e){return e instanceof HTMLInputElement&&"select"in e}function Ve(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Bd(e)&&t&&e.select()}}var ta=Wd();function Wd(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ra(e,t),e.unshift(t)},remove(t){var r;e=ra(e,t),(r=e[0])==null||r.resume()}}}function ra(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Vd(e){return e.filter(t=>t.tagName!=="A")}var Gd="Portal",xt=i.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,s]=i.useState(!1);We(()=>s(!0),[]);const c=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return c?wo.createPortal(o.jsx(R.div,{...n,ref:t}),c):null});xt.displayName=Gd;function jd(e,t){return i.useReducer((r,n)=>t[r][n]??r,e)}var Ce=e=>{const{present:t,children:r}=e,n=Hd(t),a=typeof r=="function"?r({present:n.isPresent}):i.Children.only(r),s=oe(n.ref,Ud(a));return typeof r=="function"||n.isPresent?i.cloneElement(a,{ref:s}):null};Ce.displayName="Presence";function Hd(e){const[t,r]=i.useState(),n=i.useRef({}),a=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[l,u]=jd(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=Wt(n.current);s.current=l==="mounted"?d:"none"},[l]),We(()=>{const d=n.current,f=a.current;if(f!==e){const g=s.current,m=Wt(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),We(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=Wt(n.current).includes(m.animationName);if(m.target===t&&h&&(u("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=m=>{m.target===t&&(s.current=Wt(n.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Wt(e){return(e==null?void 0:e.animationName)||"none"}function Ud(e){var n,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ur=0;function na(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oa()),document.body.insertAdjacentElement("beforeend",e[1]??oa()),Ur++,()=>{Ur===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ur--}},[])}function oa(){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 _e=function(){return _e=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},_e.apply(this,arguments)};function aa(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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Kd(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Vt="right-scroll-bar-position",Gt="width-before-scroll-bar",Yd="with-scroll-bars-hidden",qd="--removed-body-scroll-bar-size";function Kr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Xd(e,t){var r=q.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var Rd=typeof window<"u"?i.useLayoutEffect:i.useEffect,sa=new WeakMap;function Qd(e,t){var r=Xd(null,function(n){return e.forEach(function(a){return Kr(a,n)})});return Rd(function(){var n=sa.get(r);if(n){var a=new Set(n),s=new Set(e),c=r.current;a.forEach(function(l){s.has(l)||Kr(l,null)}),s.forEach(function(l){a.has(l)||Kr(l,c)})}sa.set(r,e)},[e]),r}function Zd(e){return e}function Jd(e,t){t===void 0&&(t=Zd);var r=[],n=!1,a={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(s){var c=t(s,n);return r.push(c),function(){r=r.filter(function(l){return l!==c})}},assignSyncMedium:function(s){for(n=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){n=!0;var c=[];if(r.length){var l=r;r=[],l.forEach(s),c=r}var u=function(){var f=c;c=[],f.forEach(s)},d=function(){return Promise.resolve().then(u)};d(),r={push:function(f){c.push(f),d()},filter:function(f){return c=c.filter(f),r}}}};return a}function eu(e){e===void 0&&(e={});var t=Jd(null);return t.options=_e({async:!0,ssr:!1},e),t}var ia=function(e){var t=e.sideCar,r=aa(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,_e({},r))};ia.isSideCarExport=!0;function tu(e,t){return e.useMedium(t),ia}var ca=eu(),Yr=function(){},jt=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:Yr,onWheelCapture:Yr,onTouchMoveCapture:Yr}),a=n[0],s=n[1],c=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noIsolation,b=e.inert,h=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,y=e.gapMode,x=aa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,E=Qd([r,t]),N=_e(_e({},x),a);return i.createElement(i.Fragment,null,f&&i.createElement(C,{sideCar:ca,removeScrollBar:d,shards:p,noIsolation:m,inert:b,setCallbacks:s,allowPinchZoom:!!h,lockRef:r,gapMode:y}),c?i.cloneElement(i.Children.only(l),_e(_e({},N),{ref:E})):i.createElement(w,_e({},N,{className:u,ref:E}),l))});jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},jt.classNames={fullWidth:Gt,zeroRight:Vt};var ru=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ru();return t&&e.setAttribute("nonce",t),e}function ou(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function au(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var su=function(){var e=0,t=null;return{add:function(r){e==0&&(t=nu())&&(ou(t,r),au(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iu=function(){var e=su();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},la=function(){var e=iu(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},cu={left:0,top:0,right:0,gap:0},qr=function(e){return parseInt(e||"",10)||0},lu=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[qr(r),qr(n),qr(a)]},du=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cu;var t=lu(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])}},uu=la(),it="data-scroll-locked",fu=function(e,t,r,n){var a=e.left,s=e.top,c=e.right,l=e.gap;return r===void 0&&(r="margin"),`
151
+ .`.concat(Yd,` {
142
152
  overflow: hidden `).concat(n,`;
143
- padding-right: `).concat(c,"px ").concat(n,`;
153
+ padding-right: `).concat(l,"px ").concat(n,`;
144
154
  }
145
- body[`).concat(et,`] {
155
+ body[`).concat(it,`] {
146
156
  overflow: hidden `).concat(n,`;
147
157
  overscroll-behavior: contain;
148
158
  `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
149
159
  padding-left: `.concat(a,`px;
150
160
  padding-top: `).concat(s,`px;
151
- padding-right: `).concat(i,`px;
161
+ padding-right: `).concat(c,`px;
152
162
  margin-left:0;
153
163
  margin-top:0;
154
- margin-right: `).concat(c,"px ").concat(n,`;
155
- `),r==="padding"&&"padding-right: ".concat(c,"px ").concat(n,";")].filter(Boolean).join(""),`
164
+ margin-right: `).concat(l,"px ").concat(n,`;
165
+ `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
156
166
  }
157
167
 
158
- .`).concat(Mt,` {
159
- right: `).concat(c,"px ").concat(n,`;
168
+ .`).concat(Vt,` {
169
+ right: `).concat(l,"px ").concat(n,`;
160
170
  }
161
171
 
162
- .`).concat(kt,` {
163
- margin-right: `).concat(c,"px ").concat(n,`;
172
+ .`).concat(Gt,` {
173
+ margin-right: `).concat(l,"px ").concat(n,`;
164
174
  }
165
175
 
166
- .`).concat(Mt," .").concat(Mt,` {
176
+ .`).concat(Vt," .").concat(Vt,` {
167
177
  right: 0 `).concat(n,`;
168
178
  }
169
179
 
170
- .`).concat(kt," .").concat(kt,` {
180
+ .`).concat(Gt," .").concat(Gt,` {
171
181
  margin-right: 0 `).concat(n,`;
172
182
  }
173
183
 
174
- body[`).concat(et,`] {
175
- `).concat(Rl,": ").concat(c,`px;
184
+ body[`).concat(it,`] {
185
+ `).concat(qd,": ").concat(l,`px;
176
186
  }
177
- `)},_o=function(){var e=parseInt(document.body.getAttribute(et)||"0",10);return isFinite(e)?e:0},bc=function(){l.useEffect(function(){return document.body.setAttribute(et,(_o()+1).toString()),function(){var e=_o()-1;e<=0?document.body.removeAttribute(et):document.body.setAttribute(et,e.toString())}},[])},yc=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;bc();var s=l.useMemo(function(){return gc(a)},[a]);return l.createElement(vc,{styles:mc(s,!t,a,r?"":"!important")})},kr=!1;if(typeof window<"u")try{var Dt=Object.defineProperty({},"passive",{get:function(){return kr=!0,!0}});window.addEventListener("test",Dt,Dt),window.removeEventListener("test",Dt,Dt)}catch{kr=!1}var tt=kr?{passive:!1}:!1,wc=function(e){return e.tagName==="TEXTAREA"},Io=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!wc(e)&&r[t]==="visible")},xc=function(e){return Io(e,"overflowY")},Nc=function(e){return Io(e,"overflowX")},Lo=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=$o(e,n);if(a){var s=Fo(e,n),i=s[1],c=s[2];if(i>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Cc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Sc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},$o=function(e,t){return e==="v"?xc(t):Nc(t)},Fo=function(e,t){return e==="v"?Cc(t):Sc(t)},Ec=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tc=function(e,t,r,n,a){var s=Ec(e,window.getComputedStyle(t).direction),i=s*n,c=r.target,u=t.contains(c),d=!1,p=i>0,h=0,m=0;do{var v=Fo(e,c),y=v[0],f=v[1],g=v[2],b=f-g-s*y;(y||b)&&$o(e,c)&&(h+=b,m+=y),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(p&&Math.abs(h)<1||!p&&Math.abs(m)<1)&&(d=!0),d},_t=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zo=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},Pc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ac=function(e){return`
187
+ `)},da=function(){var e=parseInt(document.body.getAttribute(it)||"0",10);return isFinite(e)?e:0},pu=function(){i.useEffect(function(){return document.body.setAttribute(it,(da()+1).toString()),function(){var e=da()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},hu=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;pu();var s=i.useMemo(function(){return du(a)},[a]);return i.createElement(uu,{styles:fu(s,!t,a,r?"":"!important")})},Xr=!1;if(typeof window<"u")try{var Ht=Object.defineProperty({},"passive",{get:function(){return Xr=!0,!0}});window.addEventListener("test",Ht,Ht),window.removeEventListener("test",Ht,Ht)}catch{Xr=!1}var ct=Xr?{passive:!1}:!1,gu=function(e){return e.tagName==="TEXTAREA"},ua=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!gu(e)&&r[t]==="visible")},vu=function(e){return ua(e,"overflowY")},mu=function(e){return ua(e,"overflowX")},fa=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=pa(e,n);if(a){var s=ha(e,n),c=s[1],l=s[2];if(c>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},bu=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},wu=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},pa=function(e,t){return e==="v"?vu(t):mu(t)},ha=function(e,t){return e==="v"?bu(t):wu(t)},yu=function(e,t){return e==="h"&&t==="rtl"?-1:1},xu=function(e,t,r,n,a){var s=yu(e,window.getComputedStyle(t).direction),c=s*n,l=r.target,u=t.contains(l),d=!1,f=c>0,p=0,g=0;do{var m=ha(e,l),b=m[0],h=m[1],v=m[2],w=h-v-s*b;(b||w)&&pa(e,l)&&(p+=w,g+=b),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},Ut=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ga=function(e){return[e.deltaX,e.deltaY]},va=function(e){return e&&"current"in e?e.current:e},Cu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nu=function(e){return`
178
188
  .block-interactivity-`.concat(e,` {pointer-events: none;}
179
189
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
180
- `)},Mc=0,rt=[];function kc(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),a=l.useState(Mc++)[0],s=l.useState(Do)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var f=Zl([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=l.useCallback(function(f,g){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var b=_t(f),w=r.current,x="deltaX"in f?f.deltaX:w[0]-b[0],N="deltaY"in f?f.deltaY:w[1]-b[1],S,C=f.target,T=Math.abs(x)>Math.abs(N)?"h":"v";if("touches"in f&&T==="h"&&C.type==="range")return!1;var z=Lo(T,C);if(!z)return!0;if(z?S=T:(S=T==="v"?"h":"v",z=Lo(T,C)),!z)return!1;if(!n.current&&"changedTouches"in f&&(x||N)&&(n.current=S),!S)return!0;var _=n.current||S;return Tc(_,g,f,_==="h"?x:N)},[]),u=l.useCallback(function(f){var g=f;if(!(!rt.length||rt[rt.length-1]!==s)){var b="deltaY"in g?zo(g):_t(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&Pc(S.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(S){return S.contains(g.target)}),N=x.length>0?c(g,x[0]):!i.current.noIsolation;N&&g.cancelable&&g.preventDefault()}}},[]),d=l.useCallback(function(f,g,b,w){var x={name:f,delta:g,target:b,should:w,shadowParent:Oc(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(N){return N!==x})},1)},[]),p=l.useCallback(function(f){r.current=_t(f),n.current=void 0},[]),h=l.useCallback(function(f){d(f.type,zo(f),f.target,c(f,e.lockRef.current))},[]),m=l.useCallback(function(f){d(f.type,_t(f),f.target,c(f,e.lockRef.current))},[]);l.useEffect(function(){return rt.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,tt),document.addEventListener("touchmove",u,tt),document.addEventListener("touchstart",p,tt),function(){rt=rt.filter(function(f){return f!==s}),document.removeEventListener("wheel",u,tt),document.removeEventListener("touchmove",u,tt),document.removeEventListener("touchstart",p,tt)}},[]);var v=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:Ac(a)}):null,v?l.createElement(yc,{gapMode:e.gapMode}):null)}function Oc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Dc=sc(Oo,kc);var Wo=l.forwardRef(function(e,t){return l.createElement(Ot,Se({},e,{ref:t,sideCar:Dc}))});Wo.classNames=Ot.classNames;var _c=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nt=new WeakMap,It=new WeakMap,Lt={},Or=0,Vo=function(e){return e&&(e.host||Vo(e.parentNode))},Ic=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Vo(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})},Lc=function(e,t,r,n){var a=Ic(t,Array.isArray(e)?e:[e]);Lt[r]||(Lt[r]=new WeakMap);var s=Lt[r],i=[],c=new Set,u=new Set(a),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};a.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(m){if(c.has(m))p(m);else try{var v=m.getAttribute(n),y=v!==null&&v!=="false",f=(nt.get(m)||0)+1,g=(s.get(m)||0)+1;nt.set(m,f),s.set(m,g),i.push(m),f===1&&y&&It.set(m,!0),g===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return p(t),c.clear(),Or++,function(){i.forEach(function(h){var m=nt.get(h)-1,v=s.get(h)-1;nt.set(h,m),s.set(h,v),m||(It.has(h)||h.removeAttribute(n),It.delete(h)),v||h.removeAttribute(r)}),Or--,Or||(nt=new WeakMap,nt=new WeakMap,It=new WeakMap,Lt={})}},$c=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=_c(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),Lc(n,a,r,"aria-hidden")):function(){return null}},Dr="Dialog",[jo,zf]=pt(Dr),[Fc,be]=jo(Dr),Ho=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),u=l.useRef(null),[d=!1,p]=xr({prop:n,defaultProp:a,onChange:s});return o.jsx(Fc,{scope:t,triggerRef:c,contentRef:u,contentId:Et(),titleId:Et(),descriptionId:Et(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),modal:i,children:r})};Ho.displayName=Dr;var Uo="DialogTrigger",Go=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Uo,r),s=le(t,a.triggerRef);return o.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Lr(a.open),...n,ref:s,onClick:X(e.onClick,a.onOpenToggle)})});Go.displayName=Uo;var _r="DialogPortal",[zc,Ko]=jo(_r,{forceMount:void 0}),qo=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,s=be(_r,t);return o.jsx(zc,{scope:t,forceMount:r,children:l.Children.map(n,i=>o.jsx(je,{present:r||s.open,children:o.jsx(Pt,{asChild:!0,container:a,children:i})}))})};qo.displayName=_r;var $t="DialogOverlay",Yo=l.forwardRef((e,t)=>{const r=Ko($t,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=be($t,e.__scopeDialog);return s.modal?o.jsx(je,{present:n||s.open,children:o.jsx(Bc,{...a,ref:t})}):null});Yo.displayName=$t;var Bc=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be($t,r);return o.jsx(Wo,{as:me,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx(J.div,{"data-state":Lr(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),He="DialogContent",Qo=l.forwardRef((e,t)=>{const r=Ko(He,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=be(He,e.__scopeDialog);return o.jsx(je,{present:n||s.open,children:s.modal?o.jsx(Wc,{...a,ref:t}):o.jsx(Vc,{...a,ref:t})})});Qo.displayName=He;var Wc=l.forwardRef((e,t)=>{const r=be(He,e.__scopeDialog),n=l.useRef(null),a=le(t,r.contentRef,n);return l.useEffect(()=>{const s=n.current;if(s)return $c(s)},[]),o.jsx(Xo,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),Vc=l.forwardRef((e,t)=>{const r=be(He,e.__scopeDialog),n=l.useRef(!1),a=l.useRef(!1);return o.jsx(Xo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(c=r.triggerRef.current)==null||c.focus(),s.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),Xo=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,...i}=e,c=be(He,r),u=l.useRef(null),d=le(t,u);return Xl(),o.jsxs(o.Fragment,{children:[o.jsx(No,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:o.jsx(Tt,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Lr(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(jc,{titleId:c.titleId}),o.jsx(Uc,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Ir="DialogTitle",Zo=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Ir,r);return o.jsx(J.h2,{id:a.titleId,...n,ref:t})});Zo.displayName=Ir;var Jo="DialogDescription",Ro=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(Jo,r);return o.jsx(J.p,{id:a.descriptionId,...n,ref:t})});Ro.displayName=Jo;var ea="DialogClose",ta=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=be(ea,r);return o.jsx(J.button,{type:"button",...n,ref:t,onClick:X(e.onClick,()=>a.onOpenChange(!1))})});ta.displayName=ea;function Lr(e){return e?"open":"closed"}var ra="DialogTitleWarning",[Bf,na]=xl(ra,{contentName:He,titleName:Ir,docsSlug:"dialog"}),jc=({titleId:e})=>{const t=na(ra),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
190
+ `)},Su=0,lt=[];function Eu(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),a=i.useState(Su++)[0],s=i.useState(la)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var h=Kd([e.lockRef.current],(e.shards||[]).map(va),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!c.current.allowPinchZoom;var w=Ut(h),y=r.current,x="deltaX"in h?h.deltaX:y[0]-w[0],C="deltaY"in h?h.deltaY:y[1]-w[1],E,N=h.target,T=Math.abs(x)>Math.abs(C)?"h":"v";if("touches"in h&&T==="h"&&N.type==="range")return!1;var F=fa(T,N);if(!F)return!0;if(F?E=T:(E=T==="v"?"h":"v",F=fa(T,N)),!F)return!1;if(!n.current&&"changedTouches"in h&&(x||C)&&(n.current=E),!E)return!0;var k=n.current||E;return xu(k,v,h,k==="h"?x:C)},[]),u=i.useCallback(function(h){var v=h;if(!(!lt.length||lt[lt.length-1]!==s)){var w="deltaY"in v?ga(v):Ut(v),y=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Cu(E.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(c.current.shards||[]).map(va).filter(Boolean).filter(function(E){return E.contains(v.target)}),C=x.length>0?l(v,x[0]):!c.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),d=i.useCallback(function(h,v,w,y){var x={name:h,delta:v,target:w,should:y,shadowParent:Tu(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(C){return C!==x})},1)},[]),f=i.useCallback(function(h){r.current=Ut(h),n.current=void 0},[]),p=i.useCallback(function(h){d(h.type,ga(h),h.target,l(h,e.lockRef.current))},[]),g=i.useCallback(function(h){d(h.type,Ut(h),h.target,l(h,e.lockRef.current))},[]);i.useEffect(function(){return lt.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ct),document.addEventListener("touchmove",u,ct),document.addEventListener("touchstart",f,ct),function(){lt=lt.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,ct),document.removeEventListener("touchmove",u,ct),document.removeEventListener("touchstart",f,ct)}},[]);var m=e.removeScrollBar,b=e.inert;return i.createElement(i.Fragment,null,b?i.createElement(s,{styles:Nu(a)}):null,m?i.createElement(hu,{gapMode:e.gapMode}):null)}function Tu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mu=tu(ca,Eu);var Rr=i.forwardRef(function(e,t){return i.createElement(jt,_e({},e,{ref:t,sideCar:Mu}))});Rr.classNames=jt.classNames;var Pu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dt=new WeakMap,Kt=new WeakMap,Yt={},Qr=0,ma=function(e){return e&&(e.host||ma(e.parentNode))},Au=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=ma(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})},_u=function(e,t,r,n){var a=Au(t,Array.isArray(e)?e:[e]);Yt[r]||(Yt[r]=new WeakMap);var s=Yt[r],c=[],l=new Set,u=new Set(a),d=function(p){!p||l.has(p)||(l.add(p),d(p.parentNode))};a.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",h=(dt.get(g)||0)+1,v=(s.get(g)||0)+1;dt.set(g,h),s.set(g,v),c.push(g),h===1&&b&&Kt.set(g,!0),v===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return f(t),l.clear(),Qr++,function(){c.forEach(function(p){var g=dt.get(p)-1,m=s.get(p)-1;dt.set(p,g),s.set(p,m),g||(Kt.has(p)||p.removeAttribute(n),Kt.delete(p)),m||p.removeAttribute(r)}),Qr--,Qr||(dt=new WeakMap,dt=new WeakMap,Kt=new WeakMap,Yt={})}},ba=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=Pu(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),_u(n,a,r,"aria-hidden")):function(){return null}},Zr="Dialog",[wa,nv]=Be(Zr),[Du,Ne]=wa(Zr),ya=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=i.useRef(null),u=i.useRef(null),[d=!1,f]=st({prop:n,defaultProp:a,onChange:s});return o.jsx(Du,{scope:t,triggerRef:l,contentRef:u,contentId:ke(),titleId:ke(),descriptionId:ke(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(p=>!p),[f]),modal:c,children:r})};ya.displayName=Zr;var xa="DialogTrigger",Ca=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ne(xa,r),s=oe(t,a.triggerRef);return o.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":tn(a.open),...n,ref:s,onClick:$(e.onClick,a.onOpenToggle)})});Ca.displayName=xa;var Jr="DialogPortal",[Ou,Na]=wa(Jr,{forceMount:void 0}),Sa=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,s=Ne(Jr,t);return o.jsx(Ou,{scope:t,forceMount:r,children:i.Children.map(n,c=>o.jsx(Ce,{present:r||s.open,children:o.jsx(xt,{asChild:!0,container:a,children:c})}))})};Sa.displayName=Jr;var qt="DialogOverlay",Ea=i.forwardRef((e,t)=>{const r=Na(qt,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=Ne(qt,e.__scopeDialog);return s.modal?o.jsx(Ce,{present:n||s.open,children:o.jsx(Iu,{...a,ref:t})}):null});Ea.displayName=qt;var Iu=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ne(qt,r);return o.jsx(Rr,{as:ye,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx(R.div,{"data-state":tn(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Re="DialogContent",Ta=i.forwardRef((e,t)=>{const r=Na(Re,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=Ne(Re,e.__scopeDialog);return o.jsx(Ce,{present:n||s.open,children:s.modal?o.jsx(ku,{...a,ref:t}):o.jsx(Lu,{...a,ref:t})})});Ta.displayName=Re;var ku=i.forwardRef((e,t)=>{const r=Ne(Re,e.__scopeDialog),n=i.useRef(null),a=oe(t,r.contentRef,n);return i.useEffect(()=>{const s=n.current;if(s)return ba(s)},[]),o.jsx(Ma,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault())})}),Lu=i.forwardRef((e,t)=>{const r=Ne(Re,e.__scopeDialog),n=i.useRef(!1),a=i.useRef(!1);return o.jsx(Ma,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,l;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),Ma=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,...c}=e,l=Ne(Re,r),u=i.useRef(null),d=oe(t,u);return na(),o.jsxs(o.Fragment,{children:[o.jsx(Hr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:o.jsx(yt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":tn(l.open),...c,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(Fu,{titleId:l.titleId}),o.jsx(zu,{contentRef:u,descriptionId:l.descriptionId})]})]})}),en="DialogTitle",Pa=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ne(en,r);return o.jsx(R.h2,{id:a.titleId,...n,ref:t})});Pa.displayName=en;var Aa="DialogDescription",_a=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ne(Aa,r);return o.jsx(R.p,{id:a.descriptionId,...n,ref:t})});_a.displayName=Aa;var Da="DialogClose",Oa=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ne(Da,r);return o.jsx(R.button,{type:"button",...n,ref:t,onClick:$(e.onClick,()=>a.onOpenChange(!1))})});Oa.displayName=Da;function tn(e){return e?"open":"closed"}var Ia="DialogTitleWarning",[ov,ka]=md(Ia,{contentName:Re,titleName:en,docsSlug:"dialog"}),Fu=({titleId:e})=>{const t=ka(Ia),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
181
191
 
182
192
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
183
193
 
184
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Hc="DialogDescriptionWarning",Uc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${na(Hc).contentName}}.`;return l.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$r=Ho,oa=Go,aa=qo,Ft=Yo,zt=Qo,Bt=Zo,Wt=Ro,Vt=ta;const ht=({modal:e=!1,...t})=>o.jsx($r,{modal:e,...t});ht.displayName=$r.displayName;const Fr=oa,sa=aa,zr=Vt,Br=l.forwardRef(({className:e,...t},r)=>o.jsx(Ft,{ref:r,className:O("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}));Br.displayName=Ft.displayName;const gt=l.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(sa,{children:[o.jsx(Br,{}),o.jsxs(zt,{ref:n,className:O("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,o.jsxs(Vt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gt.displayName=zt.displayName;const jt=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});jt.displayName="DialogHeader";const Wr=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wr.displayName="DialogFooter";const Ht=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));Ht.displayName=Bt.displayName;const Vr=l.forwardRef(({className:e,...t},r)=>o.jsx(Wt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Vr.displayName=Wt.displayName;const ia=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,la=Rn,vt=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return la(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:s}=t,i=Object.keys(a).map(d=>{const p=r==null?void 0:r[d],h=s==null?void 0:s[d];if(p===null)return null;const m=ia(p)||ia(h);return a[d][m]}),c=r&&Object.entries(r).reduce((d,p)=>{let[h,m]=p;return m===void 0||(d[h]=m),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:m,...v}=p;return Object.entries(v).every(y=>{let[f,g]=y;return Array.isArray(g)?g.includes({...s,...c}[f]):{...s,...c}[f]===g})?[...d,h,m]:d},[]);return la(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},jr=vt("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 cursor-pointer",{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"}}),oe=l.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:s,...i},c)=>{const u=n?me:"button";if(!a)return o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,onClick:s,...i});s&&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:p,onConfirm:h,confirmText:m="Confirm",cancelText:v="Cancel"}=a,y=()=>{h()};return o.jsxs(ht,{children:[o.jsx(Fr,{asChild:!0,children:o.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,...i})}),o.jsxs(gt,{children:[o.jsxs(jt,{children:[o.jsx(Ht,{children:d}),o.jsx(Vr,{children:p})]}),o.jsxs(Wr,{className:"flex justify-end gap-2 pt-4",children:[o.jsx(zr,{asChild:!0,children:o.jsx(oe,{variant:"outline",children:v})}),o.jsx(zr,{asChild:!0,children:o.jsx(oe,{onClick:y,children:m})})]})]})]})});oe.displayName="Button";const Gc=["top","right","bottom","left"],Ie=Math.min,ue=Math.max,Ut=Math.round,Gt=Math.floor,Ee=e=>({x:e,y:e}),Kc={left:"right",right:"left",bottom:"top",top:"bottom"},qc={start:"end",end:"start"};function Hr(e,t,r){return ue(e,Ie(t,r))}function Ae(e,t){return typeof e=="function"?e(t):e}function Me(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function Ur(e){return e==="x"?"y":"x"}function Gr(e){return e==="y"?"height":"width"}function Le(e){return["top","bottom"].includes(Me(e))?"y":"x"}function Kr(e){return Ur(Le(e))}function Yc(e,t,r){r===void 0&&(r=!1);const n=ot(e),a=Kr(e),s=Gr(a);let i=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Kt(i)),[i,Kt(i)]}function Qc(e){const t=Kt(e);return[qr(e),t,qr(t)]}function qr(e){return e.replace(/start|end/g,t=>qc[t])}function Xc(e,t,r){const n=["left","right"],a=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?s:i;default:return[]}}function Zc(e,t,r,n){const a=ot(e);let s=Xc(Me(e),r==="start",n);return a&&(s=s.map(i=>i+"-"+a),t&&(s=s.concat(s.map(qr)))),s}function Kt(e){return e.replace(/left|right|bottom|top/g,t=>Kc[t])}function Jc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ca(e){return typeof e!="number"?Jc(e):{top:e,right:e,bottom:e,left:e}}function qt(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function da(e,t,r){let{reference:n,floating:a}=e;const s=Le(t),i=Kr(t),c=Gr(i),u=Me(t),d=s==="y",p=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,m=n[c]/2-a[c]/2;let v;switch(u){case"top":v={x:p,y:n.y-a.height};break;case"bottom":v={x:p,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-a.width,y:h};break;default:v={x:n.x,y:n.y}}switch(ot(t)){case"start":v[i]-=m*(r&&d?-1:1);break;case"end":v[i]+=m*(r&&d?-1:1);break}return v}const Rc=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:i}=r,c=s.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:h}=da(d,n,u),m=n,v={},y=0;for(let f=0;f<c.length;f++){const{name:g,fn:b}=c[f],{x:w,y:x,data:N,reset:S}=await b({x:p,y:h,initialPlacement:n,placement:m,strategy:a,middlewareData:v,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,h=x??h,v={...v,[g]:{...v[g],...N}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):S.rects),{x:p,y:h}=da(d,m,u)),f=-1)}return{x:p,y:h,placement:m,strategy:a,middlewareData:v}};async function mt(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:v=0}=Ae(t,e),y=ca(v),g=c[m?h==="floating"?"reference":"floating":h],b=qt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:p,strategy:u})),w=h==="floating"?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),N=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=qt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:u}):w);return{top:(b.top-S.top+y.top)/N.y,bottom:(S.bottom-b.bottom+y.bottom)/N.y,left:(b.left-S.left+y.left)/N.x,right:(S.right-b.right+y.right)/N.x}}const ed=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Ae(e,t)||{};if(d==null)return{};const h=ca(p),m={x:r,y:n},v=Kr(a),y=Gr(v),f=await i.getDimensions(d),g=v==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[v]-m[v]-s.floating[y],S=m[v]-s.reference[v],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let T=C?C[x]:0;(!T||!await(i.isElement==null?void 0:i.isElement(C)))&&(T=c.floating[x]||s.floating[y]);const z=N/2-S/2,_=T/2-f[y]/2-1,V=Ie(h[b],_),G=Ie(h[w],_),j=V,I=T-f[y]-G,P=T/2-f[y]/2+z,B=Hr(j,P,I),k=!u.arrow&&ot(a)!=null&&P!==B&&s.reference[y]/2-(P<j?V:G)-f[y]/2<0,K=k?P<j?P-j:P-I:0;return{[v]:m[v]+K,data:{[v]:B,centerOffset:P-B-K,...k&&{alignmentOffset:K}},reset:k}}}),td=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...g}=Ae(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Me(a),w=Le(c),x=Me(c)===c,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=m||(x||!f?[Kt(c)]:Qc(c)),C=y!=="none";!m&&C&&S.push(...Zc(c,f,y,N));const T=[c,...S],z=await mt(t,g),_=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&_.push(z[b]),h){const P=Yc(a,i,N);_.push(z[P[0]],z[P[1]])}if(V=[...V,{placement:a,overflows:_}],!_.every(P=>P<=0)){var G,j;const P=(((G=s.flip)==null?void 0:G.index)||0)+1,B=T[P];if(B)return{data:{index:P,overflows:V},reset:{placement:B}};let k=(j=V.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!k)switch(v){case"bestFit":{var I;const K=(I=V.filter(D=>{if(C){const $=Le(D.placement);return $===w||$==="y"}return!0}).map(D=>[D.placement,D.overflows.filter($=>$>0).reduce(($,Z)=>$+Z,0)]).sort((D,$)=>D[1]-$[1])[0])==null?void 0:I[0];K&&(k=K);break}case"initialPlacement":k=c;break}if(a!==k)return{reset:{placement:k}}}return{}}}};function ua(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fa(e){return Gc.some(t=>e[t]>=0)}const rd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Ae(e,t);switch(n){case"referenceHidden":{const s=await mt(t,{...a,elementContext:"reference"}),i=ua(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:fa(i)}}}case"escaped":{const s=await mt(t,{...a,altBoundary:!0}),i=ua(s,r.floating);return{data:{escapedOffsets:i,escaped:fa(i)}}}default:return{}}}}};async function nd(e,t){const{placement:r,platform:n,elements:a}=e,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),i=Me(r),c=ot(r),u=Le(r)==="y",d=["left","top"].includes(i)?-1:1,p=s&&u?-1:1,h=Ae(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(v=c==="end"?y*-1:y),u?{x:v*p,y:m*d}:{x:m*d,y:v*p}}const od=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:s,placement:i,middlewareData:c}=t,u=await nd(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:i}}}}},ad=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Ae(e,t),d={x:r,y:n},p=await mt(t,u),h=Le(Me(a)),m=Ur(h);let v=d[m],y=d[h];if(s){const g=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=v+p[g],x=v-p[b];v=Hr(w,v,x)}if(i){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=y+p[g],x=y-p[b];y=Hr(w,y,x)}const f=c.fn({...t,[m]:v,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[m]:s,[h]:i}}}}}},sd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ae(e,t),p={x:r,y:n},h=Le(a),m=Ur(h);let v=p[m],y=p[h];const f=Ae(c,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=m==="y"?"height":"width",N=s.reference[m]-s.floating[x]+g.mainAxis,S=s.reference[m]+s.reference[x]-g.mainAxis;v<N?v=N:v>S&&(v=S)}if(d){var b,w;const x=m==="y"?"width":"height",N=["top","left"].includes(Me(a)),S=s.reference[h]-s.floating[x]+(N&&((b=i.offset)==null?void 0:b[h])||0)+(N?0:g.crossAxis),C=s.reference[h]+s.reference[x]+(N?0:((w=i.offset)==null?void 0:w[h])||0)-(N?g.crossAxis:0);y<S?y=S:y>C&&(y=C)}return{[m]:v,[h]:y}}}},id=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ae(e,t),p=await mt(t,d),h=Me(a),m=ot(a),v=Le(a)==="y",{width:y,height:f}=s.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,g=m==="end"?"top":"bottom");const w=f-p.top-p.bottom,x=y-p.left-p.right,N=Ie(f-p[g],w),S=Ie(y-p[b],x),C=!t.middlewareData.shift;let T=N,z=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(z=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),C&&!m){const V=ue(p.left,0),G=ue(p.right,0),j=ue(p.top,0),I=ue(p.bottom,0);v?z=y-2*(V!==0||G!==0?V+G:ue(p.left,p.right)):T=f-2*(j!==0||I!==0?j+I:ue(p.top,p.bottom))}await u({...t,availableWidth:z,availableHeight:T});const _=await i.getDimensions(c.floating);return y!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function at(e){return pa(e)?(e.nodeName||"").toLowerCase():"#document"}function fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Te(e){var t;return(t=(pa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pa(e){return Yt()?e instanceof Node||e instanceof fe(e).Node:!1}function ye(e){return Yt()?e instanceof Element||e instanceof fe(e).Element:!1}function Pe(e){return Yt()?e instanceof HTMLElement||e instanceof fe(e).HTMLElement:!1}function ha(e){return!Yt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fe(e).ShadowRoot}function bt(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function ld(e){return["table","td","th"].includes(at(e))}function Qt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yr(e){const t=Qr(),r=ye(e)?we(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 cd(e){let t=$e(e);for(;Pe(t)&&!st(t);){if(Yr(t))return t;if(Qt(t))return null;t=$e(t)}return null}function Qr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function st(e){return["html","body","#document"].includes(at(e))}function we(e){return fe(e).getComputedStyle(e)}function Xt(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $e(e){if(at(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ha(e)&&e.host||Te(e);return ha(t)?t.host:t}function ga(e){const t=$e(e);return st(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&bt(t)?t:ga(t)}function yt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=ga(e),s=a===((n=e.ownerDocument)==null?void 0:n.body),i=fe(a);if(s){const c=Xr(i);return t.concat(i,i.visualViewport||[],bt(a)?a:[],c&&r?yt(c):[])}return t.concat(a,yt(a,[],r))}function Xr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function va(e){const t=we(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Pe(e),s=a?e.offsetWidth:r,i=a?e.offsetHeight:n,c=Ut(r)!==s||Ut(n)!==i;return c&&(r=s,n=i),{width:r,height:n,$:c}}function Zr(e){return ye(e)?e:e.contextElement}function it(e){const t=Zr(e);if(!Pe(t))return Ee(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:s}=va(t);let i=(s?Ut(r.width):r.width)/n,c=(s?Ut(r.height):r.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const dd=Ee(0);function ma(e){const t=fe(e);return!Qr()||!t.visualViewport?dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ud(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==fe(e)?!1:t}function Ue(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=Zr(e);let i=Ee(1);t&&(n?ye(n)&&(i=it(n)):i=it(e));const c=ud(s,r,n)?ma(s):Ee(0);let u=(a.left+c.x)/i.x,d=(a.top+c.y)/i.y,p=a.width/i.x,h=a.height/i.y;if(s){const m=fe(s),v=n&&ye(n)?fe(n):n;let y=m,f=Xr(y);for(;f&&n&&v!==y;){const g=it(f),b=f.getBoundingClientRect(),w=we(f),x=b.left+(f.clientLeft+parseFloat(w.paddingLeft))*g.x,N=b.top+(f.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,p*=g.x,h*=g.y,u+=x,d+=N,y=fe(f),f=Xr(y)}}return qt({width:p,height:h,x:u,y:d})}function Jr(e,t){const r=Xt(e).scrollLeft;return t?t.left+r:Ue(Te(e)).left+r}function ba(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:Jr(e,n)),s=n.top+t.scrollTop;return{x:a,y:s}}function fd(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const s=a==="fixed",i=Te(n),c=t?Qt(t.floating):!1;if(n===i||c&&s)return r;let u={scrollLeft:0,scrollTop:0},d=Ee(1);const p=Ee(0),h=Pe(n);if((h||!h&&!s)&&((at(n)!=="body"||bt(i))&&(u=Xt(n)),Pe(n))){const v=Ue(n);d=it(n),p.x=v.x+n.clientLeft,p.y=v.y+n.clientTop}const m=i&&!h&&!s?ba(i,u,!0):Ee(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+m.x,y:r.y*d.y-u.scrollTop*d.y+p.y+m.y}}function pd(e){return Array.from(e.getClientRects())}function hd(e){const t=Te(e),r=Xt(e),n=e.ownerDocument.body,a=ue(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ue(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return we(n).direction==="rtl"&&(i+=ue(t.clientWidth,n.clientWidth)-a),{width:a,height:s,x:i,y:c}}function gd(e,t){const r=fe(e),n=Te(e),a=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,c=0,u=0;if(a){s=a.width,i=a.height;const d=Qr();(!d||d&&t==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}return{width:s,height:i,x:c,y:u}}function vd(e,t){const r=Ue(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,s=Pe(e)?it(e):Ee(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=a*s.x,d=n*s.y;return{width:i,height:c,x:u,y:d}}function ya(e,t,r){let n;if(t==="viewport")n=gd(e,r);else if(t==="document")n=hd(Te(e));else if(ye(t))n=vd(t,r);else{const a=ma(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return qt(n)}function wa(e,t){const r=$e(e);return r===t||!ye(r)||st(r)?!1:we(r).position==="fixed"||wa(r,t)}function md(e,t){const r=t.get(e);if(r)return r;let n=yt(e,[],!1).filter(c=>ye(c)&&at(c)!=="body"),a=null;const s=we(e).position==="fixed";let i=s?$e(e):e;for(;ye(i)&&!st(i);){const c=we(i),u=Yr(i);!u&&c.position==="fixed"&&(a=null),(s?!u&&!a:!u&&c.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||bt(i)&&!u&&wa(e,i))?n=n.filter(p=>p!==i):a=c,i=$e(i)}return t.set(e,n),n}function bd(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const i=[...r==="clippingAncestors"?Qt(t)?[]:md(t,this._c):[].concat(r),n],c=i[0],u=i.reduce((d,p)=>{const h=ya(t,p,a);return d.top=ue(h.top,d.top),d.right=Ie(h.right,d.right),d.bottom=Ie(h.bottom,d.bottom),d.left=ue(h.left,d.left),d},ya(t,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function yd(e){const{width:t,height:r}=va(e);return{width:t,height:r}}function wd(e,t,r){const n=Pe(t),a=Te(t),s=r==="fixed",i=Ue(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=Ee(0);if(n||!n&&!s)if((at(t)!=="body"||bt(a))&&(c=Xt(t)),n){const m=Ue(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else a&&(u.x=Jr(a));const d=a&&!n&&!s?ba(a,c):Ee(0),p=i.left+c.scrollLeft-u.x-d.x,h=i.top+c.scrollTop-u.y-d.y;return{x:p,y:h,width:i.width,height:i.height}}function Rr(e){return we(e).position==="static"}function xa(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Te(e)===r&&(r=r.ownerDocument.body),r}function Na(e,t){const r=fe(e);if(Qt(e))return r;if(!Pe(e)){let a=$e(e);for(;a&&!st(a);){if(ye(a)&&!Rr(a))return a;a=$e(a)}return r}let n=xa(e,t);for(;n&&ld(n)&&Rr(n);)n=xa(n,t);return n&&st(n)&&Rr(n)&&!Yr(n)?r:n||cd(e)||r}const xd=async function(e){const t=this.getOffsetParent||Na,r=this.getDimensions,n=await r(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nd(e){return we(e).direction==="rtl"}const Cd={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:Te,getClippingRect:bd,getOffsetParent:Na,getElementRects:xd,getClientRects:pd,getDimensions:yd,getScale:it,isElement:ye,isRTL:Nd};function Ca(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sd(e,t){let r=null,n;const a=Te(e);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:v}=d;if(c||t(),!m||!v)return;const y=Gt(h),f=Gt(a.clientWidth-(p+m)),g=Gt(a.clientHeight-(h+v)),b=Gt(p),x={rootMargin:-y+"px "+-f+"px "+-g+"px "+-b+"px",threshold:ue(0,Ie(1,u))||1};let N=!0;function S(C){const T=C[0].intersectionRatio;if(T!==u){if(!N)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!Ca(d,e.getBoundingClientRect())&&i(),N=!1}try{r=new IntersectionObserver(S,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),s}function Ed(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Zr(e),p=a||s?[...d?yt(d):[],...yt(t)]:[];p.forEach(b=>{a&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=d&&c?Sd(d,r):null;let m=-1,v=null;i&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(t)})),r()}),d&&!u&&v.observe(d),v.observe(t));let y,f=u?Ue(e):null;u&&g();function g(){const b=Ue(e);f&&!Ca(f,b)&&r(),f=b,y=requestAnimationFrame(g)}return r(),()=>{var b;p.forEach(w=>{a&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const Td=od,Pd=ad,Ad=td,Md=id,kd=rd,Sa=ed,Od=sd,Dd=(e,t,r)=>{const n=new Map,a={platform:Cd,...r},s={...a.platform,_c:n};return Rc(e,t,{...a,platform:s})};var Zt=typeof document<"u"?U.useLayoutEffect:U.useEffect;function Jt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;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(!Jt(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&e.$$typeof)&&!Jt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ea(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ta(e,t){const r=Ea(e);return Math.round(t*r)/r}function en(e){const t=l.useRef(e);return Zt(()=>{t.current=e}),t}function _d(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=l.useState(n);Jt(m,n)||v(n);const[y,f]=l.useState(null),[g,b]=l.useState(null),w=l.useCallback(D=>{D!==C.current&&(C.current=D,f(D))},[]),x=l.useCallback(D=>{D!==T.current&&(T.current=D,b(D))},[]),N=s||y,S=i||g,C=l.useRef(null),T=l.useRef(null),z=l.useRef(p),_=u!=null,V=en(u),G=en(a),j=en(d),I=l.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:m};G.current&&(D.platform=G.current),Dd(C.current,T.current,D).then($=>{const Z={...$,isPositioned:j.current!==!1};P.current&&!Jt(z.current,Z)&&(z.current=Z,pr.flushSync(()=>{h(Z)}))})},[m,t,r,G,j]);Zt(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[d]);const P=l.useRef(!1);Zt(()=>(P.current=!0,()=>{P.current=!1}),[]),Zt(()=>{if(N&&(C.current=N),S&&(T.current=S),N&&S){if(V.current)return V.current(N,S,I);I()}},[N,S,I,V,_]);const B=l.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:x}),[w,x]),k=l.useMemo(()=>({reference:N,floating:S}),[N,S]),K=l.useMemo(()=>{const D={position:r,left:0,top:0};if(!k.floating)return D;const $=Ta(k.floating,p.x),Z=Ta(k.floating,p.y);return c?{...D,transform:"translate("+$+"px, "+Z+"px)",...Ea(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:$,top:Z}},[r,c,k.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:I,refs:B,elements:k,floatingStyles:K}),[p,I,B,k,K])}const Id=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Sa({element:n.current,padding:a}).fn(r):{}:n?Sa({element:n,padding:a}).fn(r):{}}}},Ld=(e,t)=>({...Td(e),options:[e,t]}),$d=(e,t)=>({...Pd(e),options:[e,t]}),Fd=(e,t)=>({...Od(e),options:[e,t]}),zd=(e,t)=>({...Ad(e),options:[e,t]}),Bd=(e,t)=>({...Md(e),options:[e,t]}),Wd=(e,t)=>({...kd(e),options:[e,t]}),Vd=(e,t)=>({...Id(e),options:[e,t]});var jd="Arrow",Pa=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...s}=e;return o.jsx(J.svg,{...s,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pa.displayName=jd;var Hd=Pa;function Ud(e){const[t,r]=l.useState(void 0);return De(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let i,c;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;r({width:i,height:c})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var tn="Popper",[Aa,Ma]=pt(tn),[Gd,ka]=Aa(tn),Oa=e=>{const{__scopePopper:t,children:r}=e,[n,a]=l.useState(null);return o.jsx(Gd,{scope:t,anchor:n,onAnchorChange:a,children:r})};Oa.displayName=tn;var Da="PopperAnchor",_a=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,s=ka(Da,r),i=l.useRef(null),c=le(t,i);return l.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:o.jsx(J.div,{...a,ref:c})});_a.displayName=Da;var rn="PopperContent",[Kd,qd]=Aa(rn),Ia=l.forwardRef((e,t)=>{var pe,Fe,Ke,F,Q,he;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:y,...f}=e,g=ka(rn,r),[b,w]=l.useState(null),x=le(t,qe=>w(qe)),[N,S]=l.useState(null),C=Ud(N),T=(C==null?void 0:C.width)??0,z=(C==null?void 0:C.height)??0,_=n+(s!=="center"?"-"+s:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},G=Array.isArray(d)?d:[d],j=G.length>0,I={padding:V,boundary:G.filter(Qd),altBoundary:j},{refs:P,floatingStyles:B,placement:k,isPositioned:K,middlewareData:D}=_d({strategy:"fixed",placement:_,whileElementsMounted:(...qe)=>Ed(...qe,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ld({mainAxis:a+z,alignmentAxis:i}),u&&$d({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fd():void 0,...I}),u&&zd({...I}),Bd({...I,apply:({elements:qe,rects:L,availableWidth:W,availableHeight:se})=>{const{width:ce,height:de}=L.reference,q=qe.floating.style;q.setProperty("--radix-popper-available-width",`${W}px`),q.setProperty("--radix-popper-available-height",`${se}px`),q.setProperty("--radix-popper-anchor-width",`${ce}px`),q.setProperty("--radix-popper-anchor-height",`${de}px`)}}),N&&Vd({element:N,padding:c}),Xd({arrowWidth:T,arrowHeight:z}),m&&Wd({strategy:"referenceHidden",...I})]}),[$,Z]=Fa(k),ee=ve(y);De(()=>{K&&(ee==null||ee())},[K,ee]);const ae=(pe=D.arrow)==null?void 0:pe.x,te=(Fe=D.arrow)==null?void 0:Fe.y,ne=((Ke=D.arrow)==null?void 0:Ke.centerOffset)!==0,[ie,Ne]=l.useState();return De(()=>{b&&Ne(window.getComputedStyle(b).zIndex)},[b]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:K?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ie,"--radix-popper-transform-origin":[(F=D.transformOrigin)==null?void 0:F.x,(Q=D.transformOrigin)==null?void 0:Q.y].join(" "),...((he=D.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Kd,{scope:r,placedSide:$,onArrowChange:S,arrowX:ae,arrowY:te,shouldHideArrow:ne,children:o.jsx(J.div,{"data-side":$,"data-align":Z,...f,ref:x,style:{...f.style,animation:K?void 0:"none"}})})})});Ia.displayName=rn;var La="PopperArrow",Yd={top:"bottom",right:"left",bottom:"top",left:"right"},$a=l.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,s=qd(La,n),i=Yd[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Hd,{...a,ref:r,style:{...a.style,display:"block"}})})});$a.displayName=La;function Qd(e){return e!==null}var Xd=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:a}=t,i=((g=a.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=Fa(r),h={start:"0%",center:"50%",end:"100%"}[p],m=(((b=a.arrow)==null?void 0:b.x)??0)+c/2,v=(((w=a.arrow)==null?void 0:w.y)??0)+u/2;let y="",f="";return d==="bottom"?(y=i?h:`${m}px`,f=`${-u}px`):d==="top"?(y=i?h:`${m}px`,f=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,f=i?h:`${v}px`):d==="left"&&(y=`${n.floating.width+u}px`,f=i?h:`${v}px`),{data:{x:y,y:f}}}});function Fa(e){const[t,r="center"]=e.split("-");return[t,r]}var Zd=Oa,Jd=_a,Rd=Ia,eu=$a,tu="VisuallyHidden",Rt=l.forwardRef((e,t)=>o.jsx(J.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}}));Rt.displayName=tu;var ru=Rt,[er,Wf]=pt("Tooltip",[Ma]),tr=Ma(),za="TooltipProvider",nu=700,nn="tooltip.open",[ou,on]=er(za),Ba=e=>{const{__scopeTooltip:t,delayDuration:r=nu,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=e,[i,c]=l.useState(!0),u=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const p=d.current;return()=>window.clearTimeout(p)},[]),o.jsx(ou,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(d.current),c(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c(!0),n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:l.useCallback(p=>{u.current=p},[]),disableHoverableContent:a,children:s})};Ba.displayName=za;var rr="Tooltip",[au,wt]=er(rr),Wa=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,u=on(rr,e.__scopeTooltip),d=tr(t),[p,h]=l.useState(null),m=Et(),v=l.useRef(0),y=i??u.disableHoverableContent,f=c??u.delayDuration,g=l.useRef(!1),[b=!1,w]=xr({prop:n,defaultProp:a,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(nn))):u.onClose(),s==null||s(T)}}),x=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),N=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,w(!0)},[w]),S=l.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w(!1)},[w]),C=l.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,w(!0),v.current=0},f)},[f,w]);return l.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),o.jsx(Zd,{...d,children:o.jsx(au,{scope:t,contentId:m,open:b,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayed?C():N()},[u.isOpenDelayed,C,N]),onTriggerLeave:l.useCallback(()=>{y?S():(window.clearTimeout(v.current),v.current=0)},[S,y]),onOpen:N,onClose:S,disableHoverableContent:y,children:r})})};Wa.displayName=rr;var an="TooltipTrigger",Va=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=wt(an,r),s=on(an,r),i=tr(r),c=l.useRef(null),u=le(t,c,a.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(Jd,{asChild:!0,...i,children:o.jsx(J.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:X(e.onPointerMove,m=>{m.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:X(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:X(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})});Va.displayName=an;var sn="TooltipPortal",[su,iu]=er(sn,{forceMount:void 0}),ja=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,s=wt(sn,t);return o.jsx(su,{scope:t,forceMount:r,children:o.jsx(je,{present:r||s.open,children:o.jsx(Pt,{asChild:!0,container:a,children:n})})})};ja.displayName=sn;var lt="TooltipContent",Ha=l.forwardRef((e,t)=>{const r=iu(lt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=e,i=wt(lt,e.__scopeTooltip);return o.jsx(je,{present:n||i.open,children:i.disableHoverableContent?o.jsx(Ua,{side:a,...s,ref:t}):o.jsx(lu,{side:a,...s,ref:t})})}),lu=l.forwardRef((e,t)=>{const r=wt(lt,e.__scopeTooltip),n=on(lt,e.__scopeTooltip),a=l.useRef(null),s=le(t,a),[i,c]=l.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:h}=n,m=l.useCallback(()=>{c(null),h(!1)},[h]),v=l.useCallback((y,f)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=fu(b,g.getBoundingClientRect()),x=pu(b,w),N=hu(f.getBoundingClientRect()),S=vu([...x,...N]);c(S),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(u&&p){const y=g=>v(g,p),f=g=>v(g,u);return u.addEventListener("pointerleave",y),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",f)}}},[u,p,v,m]),l.useEffect(()=>{if(i){const y=f=>{const g=f.target,b={x:f.clientX,y:f.clientY},w=(u==null?void 0:u.contains(g))||(p==null?void 0:p.contains(g)),x=!gu(b,i);w?m():x&&(m(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,p,i,d,m]),o.jsx(Ua,{...e,ref:s})}),[cu,du]=er(rr,{isInside:!1}),Ua=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,u=wt(lt,r),d=tr(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(nn,p),()=>document.removeEventListener(nn,p)),[p]),l.useEffect(()=>{if(u.trigger){const h=m=>{const v=m.target;v!=null&&v.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),o.jsx(Tt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:o.jsxs(Rd,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(ho,{children:n}),o.jsx(cu,{scope:r,isInside:!0,children:o.jsx(ru,{id:u.contentId,role:"tooltip",children:a||n})})]})})});Ha.displayName=lt;var Ga="TooltipArrow",uu=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=tr(r);return du(Ga,r).isInside?null:o.jsx(eu,{...a,...n,ref:t})});uu.displayName=Ga;function fu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pu(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 hu(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function gu(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s].x,u=t[s].y,d=t[i].x,p=t[i].y;u>n!=p>n&&r<(d-c)*(n-u)/(p-u)+c&&(a=!a)}return a}function vu(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),mu(t)}function mu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(a.y-i.y)>=(s.y-i.y)*(a.x-i.x))r.pop();else break}r.push(a)}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 bu=Ba,yu=Wa,wu=Va,xu=ja,Ka=Ha;const ct=bu,dt=yu,ut=wu,Ge=l.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(xu,{children:o.jsx(Ka,{ref:n,sideOffset:t,className:O("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})}));Ge.displayName=Ka.displayName;const nr=l.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...s},i)=>{const[c,u]=l.useState(!1),d=l.useRef(null),h=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),m=()=>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.":"",v=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};l.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const y=f=>{if(r){const g=f.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),v())}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 N=0;N<Math.min(w.length,6);N++){const S=w[N];N===0||N===2||N===4?/[A-Z]/.test(S)&&(x+=S):(N===1||N===3||N===5)&&/[0-9]/.test(S)&&(x+=S)}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)}`}f.target.value=b}n==null||n(f)};return o.jsx(ct,{children:o.jsxs(dt,{open:c&&!!r,children:[o.jsx(ut,{asChild:!0,children:o.jsx("input",{type:t,className:O("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:i,...s})}),o.jsx(Ge,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:m()})]})})});nr.displayName="Input";var Nu="Separator",qa="horizontal",Cu=["horizontal","vertical"],Ya=l.forwardRef((e,t)=>{const{decorative:r,orientation:n=qa,...a}=e,s=Su(n)?n:qa,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(J.div,{"data-orientation":s,...c,...a,ref:t})});Ya.displayName=Nu;function Su(e){return Cu.includes(e)}var Qa=Ya;const ln=l.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(Qa,{ref:a,decorative:r,orientation:t,className:O("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ln.displayName=Qa.displayName;const Xa=$r,Eu=oa,Tu=Vt,Za=aa,cn=l.forwardRef(({className:e,...t},r)=>o.jsx(Ft,{className:O("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}));cn.displayName=Ft.displayName;const Pu=vt("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"}}),dn=l.forwardRef(({side:e="right",className:t,children:r,...n},a)=>o.jsxs(Za,{children:[o.jsx(cn,{}),o.jsxs(zt,{ref:a,className:O(Pu({side:e}),t),...n,children:[o.jsxs(Vt,{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:[o.jsx(hr,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));dn.displayName=zt.displayName;const Ja=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ja.displayName="SheetHeader";const Ra=({className:e,...t})=>o.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ra.displayName="SheetFooter";const es=l.forwardRef(({className:e,...t},r)=>o.jsx(Bt,{ref:r,className:O("text-lg font-semibold text-foreground",e),...t}));es.displayName=Bt.displayName;const ts=l.forwardRef(({className:e,...t},r)=>o.jsx(Wt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));ts.displayName=Wt.displayName;function Au({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,i]=U.useState(!1),c=()=>{i(!0)};return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx(ki,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):o.jsx(oe,{asChild:!0,size:"icon",onClick:e,children:o.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:c})})}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Mu="Label",rs=l.forwardRef((e,t)=>o.jsx(J.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));rs.displayName=Mu;var ku=rs;function Ou({className:e,...t}){return o.jsx(ku,{"data-slot":"label",className:O("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 un=1024;function ns(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const r=window.matchMedia(`(max-width: ${un-1}px)`),n=()=>{t(window.innerWidth<un)};return r.addEventListener("change",n),t(window.innerWidth<un),()=>r.removeEventListener("change",n)},[]),!!e}function Y({className:e,...t}){return o.jsx("div",{className:O("animate-pulse rounded-md bg-primary/20",e),...t})}const Du="sidebar:state",_u=60*60*24*7,Iu="16rem",Lu="18rem",$u="3rem",Fu="b",os=l.createContext(null);function xt(){const e=l.useContext(os);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fn=l.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...i},c)=>{const u=ns(),[d,p]=l.useState(!1),[h,m]=l.useState(e),v=t??h,y=l.useCallback(w=>{const x=typeof w=="function"?w(v):w;r?r(x):m(x),document.cookie=`${Du}=${x}; path=/; max-age=${_u}`},[r,v]),f=l.useCallback(()=>u?p(w=>!w):y(w=>!w),[u,y,p]);l.useEffect(()=>{const w=x=>{x.key===Fu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const g=v?"expanded":"collapsed",b=l.useMemo(()=>({state:g,open:v,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:p,toggleSidebar:f}),[g,v,y,u,d,p,f]);return o.jsx(os.Provider,{value:b,children:o.jsx(ct,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Iu,"--sidebar-width-icon":$u,...a},className:O("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:c,...i,children:s})})})});fn.displayName="SidebarProvider";const pn=l.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},i)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:p}=xt();return r==="none"?o.jsx("div",{className:O("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...s,children:a}):c?o.jsx(Xa,{open:d,onOpenChange:p,...s,children:o.jsx(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Lu},side:e,children:o.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):o.jsxs("div",{ref:i,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:O("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)")}),o.jsx("div",{className:O("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),...s,children:o.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:a})})]})});pn.displayName="Sidebar";const hn=l.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=xt();return o.jsxs(oe,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:O("h-7 w-7 text-sidebar-foreground",e),onClick:s=>{t==null||t(s),a()},...r,children:[o.jsx(Si,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hn.displayName="SidebarTrigger";const as=l.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=xt();return o.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:O("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})});as.displayName="SidebarRail";const ss=l.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:O("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}));ss.displayName="SidebarInset";const is=l.forwardRef(({className:e,...t},r)=>o.jsx(nr,{ref:r,"data-sidebar":"input",className:O("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));is.displayName="SidebarInput";const gn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:O("flex flex-col gap-2 p-2",e),...t}));gn.displayName="SidebarHeader";const vn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:O("flex flex-col gap-2 p-2",e),...t}));vn.displayName="SidebarFooter";const ls=l.forwardRef(({className:e,...t},r)=>o.jsx(ln,{ref:r,"data-sidebar":"separator",className:O("mx-2 w-auto bg-sidebar-border",e),...t}));ls.displayName="SidebarSeparator";const mn=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:O("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));mn.displayName="SidebarContent";const cs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:O("relative flex w-full min-w-0 flex-col p-2",e),...t}));cs.displayName="SidebarGroup";const ds=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:O("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})});ds.displayName="SidebarGroupLabel";const us=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?me:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:O("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})});us.displayName="SidebarGroupAction";const fs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:O("w-full text-sm",e),...t}));fs.displayName="SidebarGroupContent";const bn=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:O("flex w-full min-w-0 flex-col gap-1",e),...t}));bn.displayName="SidebarMenu";const yn=l.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:O("group/menu-item relative",e),...t}));yn.displayName="SidebarMenuItem";const zu=vt("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"}}),wn=l.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...i},c)=>{const u=e?me:"button",{isMobile:d,state:p}=xt(),h=o.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:O(zu({variant:r,size:n}),s),...i});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:h}),o.jsx(Ge,{side:"right",align:"center",hidden:p!=="collapsed"||d,...a})]})):h});wn.displayName="SidebarMenuButton";const ps=l.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?me:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:O("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})});ps.displayName="SidebarMenuAction";const hs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:O("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}));hs.displayName="SidebarMenuBadge";const gs=l.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:O("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&o.jsx(Y,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(Y,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});gs.displayName="SidebarMenuSkeleton";const vs=l.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:O("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}));vs.displayName="SidebarMenuSub";const ms=l.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));ms.displayName="SidebarMenuSubItem";const bs=l.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const i=e?me:"a";return o.jsx(i,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:O("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),...a})});bs.displayName="SidebarMenuSubButton";function Bu(e){const t=e+"CollectionProvider",[r,n]=pt(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:y,children:f}=v,g=U.useRef(null),b=U.useRef(new Map).current;return o.jsx(a,{scope:y,itemMap:b,collectionRef:g,children:f})};i.displayName=t;const c=e+"CollectionSlot",u=U.forwardRef((v,y)=>{const{scope:f,children:g}=v,b=s(c,f),w=le(y,b.collectionRef);return o.jsx(me,{ref:w,children:g})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=U.forwardRef((v,y)=>{const{scope:f,children:g,...b}=v,w=U.useRef(null),x=le(y,w),N=s(d,f);return U.useEffect(()=>(N.itemMap.set(w,{ref:w,...b}),()=>void N.itemMap.delete(w))),o.jsx(me,{[p]:"",ref:x,children:g})});h.displayName=d;function m(v){const y=s(e+"CollectionConsumer",v);return U.useCallback(()=>{const g=y.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(y.itemMap.values()).sort((N,S)=>b.indexOf(N.ref.current)-b.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},m,n]}var xn="ToastProvider",[Nn,Wu,Vu]=Bu("Toast"),[ys,Vf]=pt("Toast",[Vu]),[ju,or]=ys(xn),ws=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:i}=e,[c,u]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(!1),m=l.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xn}\`. Expected non-empty \`string\`.`),o.jsx(Nn.Provider,{scope:t,children:o.jsx(ju,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(v=>v+1),[]),onToastRemove:l.useCallback(()=>p(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:i})})};ws.displayName=xn;var xs="ToastViewport",Hu=["F8"],Cn="toast.viewportPause",Sn="toast.viewportResume",Ns=l.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Hu,label:a="Notifications ({hotkey})",...s}=e,i=or(xs,r),c=Wu(r),u=l.useRef(null),d=l.useRef(null),p=l.useRef(null),h=l.useRef(null),m=le(t,h,i.onViewportChange),v=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;l.useEffect(()=>{const g=b=>{var x;n.length!==0&&n.every(N=>b[N]||b.code===N)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),l.useEffect(()=>{const g=u.current,b=h.current;if(y&&g&&b){const w=()=>{if(!i.isClosePausedRef.current){const C=new CustomEvent(Cn);b.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const C=new CustomEvent(Sn);b.dispatchEvent(C),i.isClosePausedRef.current=!1}},N=C=>{!g.contains(C.relatedTarget)&&x()},S=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",N),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",N),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,i.isClosePausedRef]);const f=l.useCallback(({tabbingDirection:g})=>{const w=c().map(x=>{const N=x.ref.current,S=[N,...rf(N)];return g==="forwards"?S:S.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return l.useEffect(()=>{const g=h.current;if(g){const b=w=>{var S,C,T;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const z=document.activeElement,_=w.shiftKey;if(w.target===g&&_){(S=d.current)==null||S.focus();return}const j=f({tabbingDirection:_?"backwards":"forwards"}),I=j.findIndex(P=>P===z);Pn(j.slice(I+1))?w.preventDefault():_?(C=d.current)==null||C.focus():(T=p.current)==null||T.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[c,f]),o.jsxs(zl,{ref:u,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&o.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"forwards"});Pn(g)}}),o.jsx(Nn.Slot,{scope:r,children:o.jsx(J.ol,{tabIndex:-1,...s,ref:m})}),y&&o.jsx(En,{ref:p,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"backwards"});Pn(g)}})]})});Ns.displayName=xs;var Cs="ToastFocusProxy",En=l.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,s=or(Cs,r);return o.jsx(Rt,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&n()}})});En.displayName=Cs;var ar="Toast",Uu="toast.swipeStart",Gu="toast.swipeMove",Ku="toast.swipeCancel",qu="toast.swipeEnd",Ss=l.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:s,...i}=e,[c=!0,u]=xr({prop:n,defaultProp:a,onChange:s});return o.jsx(je,{present:r||c,children:o.jsx(Xu,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ve(e.onPause),onResume:ve(e.onResume),onSwipeStart:X(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:X(e.onSwipeMove,d=>{const{x:p,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:X(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:X(e.onSwipeEnd,d=>{const{x:p,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",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});Ss.displayName=ar;var[Yu,Qu]=ys(ar,{onClose(){}}),Xu=l.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:s,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:p,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:v,...y}=e,f=or(ar,r),[g,b]=l.useState(null),w=le(t,P=>b(P)),x=l.useRef(null),N=l.useRef(null),S=a||f.duration,C=l.useRef(0),T=l.useRef(S),z=l.useRef(0),{onToastAdd:_,onToastRemove:V}=f,G=ve(()=>{var B;(g==null?void 0:g.contains(document.activeElement))&&((B=f.viewport)==null||B.focus()),i()}),j=l.useCallback(P=>{!P||P===1/0||(window.clearTimeout(z.current),C.current=new Date().getTime(),z.current=window.setTimeout(G,P))},[G]);l.useEffect(()=>{const P=f.viewport;if(P){const B=()=>{j(T.current),d==null||d()},k=()=>{const K=new Date().getTime()-C.current;T.current=T.current-K,window.clearTimeout(z.current),u==null||u()};return P.addEventListener(Cn,k),P.addEventListener(Sn,B),()=>{P.removeEventListener(Cn,k),P.removeEventListener(Sn,B)}}},[f.viewport,S,u,d,j]),l.useEffect(()=>{s&&!f.isClosePausedRef.current&&j(S)},[s,S,f.isClosePausedRef,j]),l.useEffect(()=>(_(),()=>V()),[_,V]);const I=l.useMemo(()=>g?Os(g):null,[g]);return f.viewport?o.jsxs(o.Fragment,{children:[I&&o.jsx(Zu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),o.jsx(Yu,{scope:r,onClose:G,children:pr.createPortal(o.jsx(Nn.ItemSlot,{scope:r,children:o.jsx(Fl,{asChild:!0,onEscapeKeyDown:X(c,()=>{f.isFocusedToastEscapeKeyDownRef.current||G(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(J.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":f.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:X(e.onKeyDown,P=>{P.key==="Escape"&&(c==null||c(P.nativeEvent),P.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:X(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:X(e.onPointerMove,P=>{if(!x.current)return;const B=P.clientX-x.current.x,k=P.clientY-x.current.y,K=!!N.current,D=["left","right"].includes(f.swipeDirection),$=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,Z=D?$(0,B):0,ee=D?0:$(0,k),ae=P.pointerType==="touch"?10:2,te={x:Z,y:ee},ne={originalEvent:P,delta:te};K?(N.current=te,sr(Gu,h,ne,{discrete:!1})):Ds(te,f.swipeDirection,ae)?(N.current=te,sr(Uu,p,ne,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(B)>ae||Math.abs(k)>ae)&&(x.current=null)}),onPointerUp:X(e.onPointerUp,P=>{const B=N.current,k=P.target;if(k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),N.current=null,x.current=null,B){const K=P.currentTarget,D={originalEvent:P,delta:B};Ds(B,f.swipeDirection,f.swipeThreshold)?sr(qu,v,D,{discrete:!0}):sr(Ku,m,D,{discrete:!0}),K.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Zu=e=>{const{__scopeToast:t,children:r,...n}=e,a=or(ar,t),[s,i]=l.useState(!1),[c,u]=l.useState(!1);return ef(()=>i(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:o.jsx(Pt,{asChild:!0,children:o.jsx(Rt,{...n,children:s&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},Ju="ToastTitle",Es=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Es.displayName=Ju;var Ru="ToastDescription",Ts=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(J.div,{...n,ref:t})});Ts.displayName=Ru;var Ps="ToastAction",As=l.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(ks,{altText:r,asChild:!0,children:o.jsx(Tn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ps}\`. Expected non-empty \`string\`.`),null)});As.displayName=Ps;var Ms="ToastClose",Tn=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=Qu(Ms,r);return o.jsx(ks,{asChild:!0,children:o.jsx(J.button,{type:"button",...n,ref:t,onClick:X(e.onClick,a.onClose)})})});Tn.displayName=Ms;var ks=l.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx(J.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function Os(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),tf(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Os(n))}}),t}function sr(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?go(a,s):a.dispatchEvent(s)}var Ds=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),s=n>a;return t==="left"||t==="right"?s&&n>r:!s&&a>r};function ef(e=()=>{}){const t=ve(e);De(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function tf(e){return e.nodeType===e.ELEMENT_NODE}function rf(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var nf=ws,_s=Ns,Is=Ss,Ls=Es,$s=Ts,Fs=As,zs=Tn;const Bs=nf,An=l.forwardRef(({className:e,...t},r)=>o.jsx(_s,{ref:r,className:O("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}));An.displayName=_s.displayName;const of=vt("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"}}),Mn=l.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(Is,{ref:n,className:O(of({variant:t}),e),...r}));Mn.displayName=Is.displayName;const Ws=l.forwardRef(({className:e,...t},r)=>o.jsx(Fs,{ref:r,className:O("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}));Ws.displayName=Fs.displayName;const kn=l.forwardRef(({className:e,...t},r)=>o.jsx(zs,{ref:r,className:O("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:o.jsx(hr,{className:"h-4 w-4"})}));kn.displayName=zs.displayName;const On=l.forwardRef(({className:e,...t},r)=>o.jsx(Ls,{ref:r,className:O("text-sm font-semibold [&+div]:text-xs",e),...t}));On.displayName=Ls.displayName;const Dn=l.forwardRef(({className:e,...t},r)=>o.jsx($s,{ref:r,className:O("text-sm opacity-90",e),...t}));Dn.displayName=$s.displayName;const af=1,sf=1e6;let _n=0;function lf(){return _n=(_n+1)%Number.MAX_SAFE_INTEGER,_n.toString()}const In=new Map,Vs=e=>{if(In.has(e))return;const t=setTimeout(()=>{In.delete(e),Nt({type:"REMOVE_TOAST",toastId:e})},sf);In.set(e,t)},cf=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,af)};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?Vs(r):e.toasts.forEach(n=>Vs(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):[]}}},ir=[];let lr={toasts:[]};function Nt(e){lr=cf(lr,e),ir.forEach(t=>t(lr))}function js({...e}){const t=lf(),r=a=>Nt({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Nt({type:"DISMISS_TOAST",toastId:t});return Nt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function Ln(){const[e,t]=l.useState(lr);return l.useEffect(()=>(ir.push(t),()=>{const r=ir.indexOf(t);r>-1&&ir.splice(r,1)}),[]),{...e,toast:js,dismiss:r=>Nt({type:"DISMISS_TOAST",toastId:r})}}function Hs(){const{toasts:e}=Ln();return o.jsxs(Bs,{children:[e.map(function({id:t,title:r,description:n,action:a,...s}){return o.jsxs(Mn,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(On,{children:r}),n&&o.jsx(Dn,{children:n})]}),a,o.jsx(kn,{})]},t)}),o.jsx(An,{})]})}const $n=U.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[s,i]=U.useState(""),c=fr.useLocation(),{toast:u}=Ln();U.useEffect(()=>{const m=new URLSearchParams(c.search).get("q");m&&i(m)},[c.search]);const d=()=>{const h=s.trim();if(!h||h.length<2){u({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(h)},p=h=>{h.key==="Enter"&&d()};return o.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:[o.jsx(hn,{className:"lg:hidden",children:o.jsx(Ni,{className:"h-6 w-6"})}),o.jsx("div",{className:"flex flex-1 items-center gap-4",children:o.jsx("div",{className:"relative w-full max-w-sm",children:o.jsxs("div",{children:[o.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:d,"aria-label":"Search",children:o.jsx(Ai,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(nr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:s,onChange:h=>i(h.target.value),onKeyDown:p,ref:a},"topbar-search")]})})}),r||o.jsx(o.Fragment,{}),e&&o.jsx("div",{className:"flex items-center gap-4",children:o.jsxs(oe,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[o.jsx(xi,{className:"h-4 w-4 text-sidebar-foreground"}),o.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});$n.displayName="Topbar";const Us=vt("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),xe=l.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...s},i)=>o.jsxs("div",{ref:i,className:O(Us({variant:t,size:r}),e),...s,children:[n&&o.jsx("span",{className:"mr-1",children:n}),a]}));xe.displayName="Badge";const cr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));cr.displayName="Card";const Gs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex flex-col space-y-1.5 p-6",e),...t}));Gs.displayName="CardHeader";const Ks=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("font-semibold leading-none tracking-tight",e),...t}));Ks.displayName="CardTitle";const qs=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("text-sm text-muted-foreground",e),...t}));qs.displayName="CardDescription";const dr=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("p-6 pt-0",e),...t}));dr.displayName="CardContent";const Ys=l.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:O("flex items-center p-6 pt-0",e),...t}));Ys.displayName="CardFooter";const Qs=({countryCode:e,className:t=""})=>{const[r,n]=U.useState(null),[a,s]=U.useState(!1);return U.useEffect(()=>{if(!e)return;const c=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(c,{method:"HEAD"}).then(u=>{u.ok?(n(c),s(!1)):s(!0)}).catch(()=>{s(!0)})},[e]),a||!r?o.jsx("span",{className:t,children:e}):o.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function Xs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=fr.useParams(),a=e.filter(s=>s.showInNav);return o.jsxs(pn,{className:"border-r border-sidebar-border",children:[o.jsx(gn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),o.jsx("span",{className:"font-semibold text-lg",children:r})]})}),o.jsx(mn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:o.jsx(bn,{children:a.map(s=>{const i=s.icon,c=`/${s.path.replace(":appID",n)}`;return o.jsx(yn,{children:o.jsx(wn,{asChild:!0,children:o.jsxs(fr.Link,{to:c,className:"transition-colors hover:bg-muted px-6",children:[i&&o.jsx(i,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]})})},s.key)})})}),o.jsx(vn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const Zs=U.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:s,onSignOut:i,searchPlaceholder:c},u)=>o.jsx(o.Fragment,{children:o.jsx(fn,{children:o.jsxs("div",{className:"flex grow",children:[o.jsx(Xs,{routes:r,footer:n,dashboardTitle:s}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsx($n,{ref:u,onSignOut:i,rightMenu:t,handleValidSearch:a,searchPlaceholder:c}),o.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),o.jsx(Hs,{})]})]})})}));Zs.displayName="Layout";const df={sm:100,md:200,lg:300,xl:400};function Js({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,h]=l.useState(!1),m=`https://api.randmar.io/Product/${e}/Video`;l.useEffect(()=>{(async()=>{try{const x=await(await fetch(m+"/Exists")).json();c(x)}catch(w){console.error("Error checking for video:",w),c(!1)}})()},[e,m]);async function v(){if(i){h(!0);try{const w=await(await fetch(m)).blob(),x=window.URL.createObjectURL(w),N=document.createElement("a");N.href=x,N.download=`${e||"product"}-video.mp4`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(x)}catch(b){console.error("Error downloading video:",b)}finally{h(!1)}}}function y(){navigator.clipboard.writeText(m),d(!0),setTimeout(()=>{d(!1)},2e3)}function f(){s(!0)}const g=df[t||"xl"];return o.jsxs(o.Fragment,{children:[o.jsx(ht,{open:a,onOpenChange:s,children:o.jsx(gt,{className:"max-w-4xl p-0 overflow-hidden",children:n?o.jsxs("div",{className:"flex flex-row",children:[o.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):o.jsxs("div",{className:"w-full relative",children:[o.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[o.jsx("source",{src:m,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:y,children:u?o.jsx(qn,{className:"h-4 w-4"}):o.jsx(bi,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Copy video link"})})]})}),o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",onClick:v,disabled:p,children:o.jsx(yi,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Download video"})})]})})]})]})})}),o.jsxs("div",{className:"relative w-max h-max",children:[o.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${i?"cursor-pointer":""}`,onClick:i?f:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${g*1.5}&height=${g*1.5}`,width:g,height:g}),i&&o.jsx(ct,{children:o.jsxs(dt,{children:[o.jsx(ut,{asChild:!0,children:o.jsx(oe,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:f,children:o.jsx(Ei,{className:"h-4 w-4"})})}),o.jsx(Ge,{children:o.jsx("p",{children:"Play video"})})]})})]})]})}function uf({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((f,g)=>(f.Name||"").localeCompare(g.Name||"")),a=n.filter(f=>f.Country==="US"),s=n.filter(f=>f.Country==="CA"),i=n.filter(f=>r.includes(f.WarehouseId||"")),c=n.filter(f=>t.includes(f.WarehouseId||"")),u=s.filter(f=>!t.includes(f.WarehouseId||"")&&!r.includes(f.WarehouseId||"")),d=f=>f.reduce((g,b)=>g+(b.AvailableQuantity||0),0),p=d(s),h=d(c),m=d(i),v=d(a),y=p+v;return o.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&a.length>0&&o.jsxs("div",{className:"grid grid-cols-2 border-b",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Total"}),o.jsx("span",{children:y})]}),o.jsx("div",{className:"p-3"})]}),s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Canada"}),o.jsx("span",{children:p})]}),o.jsx("div",{className:"p-3"})]}),o.jsxs("div",{className:"grid grid-cols-2",children:[o.jsxs("div",{className:"border-r",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"West"}),o.jsx("span",{children:m})]}),i.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`west-${g}`))]}),o.jsxs("div",{children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"East"}),o.jsx("span",{children:h})]}),c.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`east-${g}`))]})]}),u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:o.jsx("span",{children:"Other"})}),o.jsx("div",{className:"grid grid-cols-2",children:u.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`other-${g}`))})]})]}),a.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"United States"}),o.jsx("span",{children:v})]}),o.jsx("div",{className:"p-3"})]}),o.jsx("div",{className:"grid grid-cols-2",children:a.map((f,g)=>o.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:f.Name}),o.jsx("span",{children:f.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`usa-${g}`))})]}),e.length===0&&o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function ff({item:e,addToCart:t=!1,syncToShopify:r=!1,defaultOpportunityNumber:n="",viewProductAction:a,addToCartAction:s,isAddToCartActionLoading:i=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var D,$,Z,ee,ae,te,ne,ie,Ne,pe,Fe,Ke;const[d,p]=U.useState(1),[h,m]=U.useState(null),[v,y]=U.useState(0),[f,g]=U.useState(!1),b=((D=e==null?void 0:e.Distribution)==null?void 0:D.Cost)||0,w=(($=e==null?void 0:e.Distribution)==null?void 0:$.RegularPrice)||0,x=((Z=e==null?void 0:e.Distribution)==null?void 0:Z.Price)||0,[N,S]=U.useState(null),[C,T]=U.useState(!1);U.useEffect(()=>{const F=async()=>{if(e!=null&&e.ManufacturerId){T(!0);try{const Q=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(Q.ok){const he=await Q.blob();S(URL.createObjectURL(he))}}catch(Q){console.error("Failed to load logo:",Q)}finally{T(!1)}}};e!=null&&e.ManufacturerId&&F()},[e==null?void 0:e.ManufacturerId]),U.useEffect(()=>{var F;if(e&&n){const Q=(F=e.Opportunities)==null?void 0:F.find(he=>he.BidNumber==n);Q&&m(Q)}},[e,n]),U.useEffect(()=>{if(!e)return;const F=h!=null&&h.Price?h.Price:x;y(w>0?Math.round((w-F)/w*100):0)},[e,h,x,w]),U.useEffect(()=>{i||p(1)},[i]);const z=F=>{if(F.Active!==!0)return!1;const Q=new Date().toISOString().split("T")[0];return!(F.EndDate&&F.EndDate<Q||F.StartDate&&F.StartDate>Q)};if(!e)return o.jsx(cr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(dr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx(Y,{className:"h-7 w-3/4"}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:o.jsx(Y,{className:"h-10 w-24 rounded-md"})})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[o.jsx(Y,{className:"h-6 w-20 rounded-full"}),o.jsx(Y,{className:"h-6 w-24 rounded-full"}),o.jsx(Y,{className:"h-6 w-28 rounded-full"})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-20 mb-1"}),o.jsx(Y,{className:"h-5 w-16"})]}),o.jsxs("div",{children:[o.jsx(Y,{className:"h-4 w-12 mb-1"}),o.jsx(Y,{className:"h-5 w-20"})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx("div",{className:"w-60 h-40",children:o.jsx(Y,{className:"w-full h-full rounded-lg"})})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:o.jsxs("div",{className:"w-full",children:[o.jsx(Y,{className:"h-4 w-24 mb-3"}),o.jsx(Y,{className:"h-16 w-full rounded-md"})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(Y,{className:"h-10 w-32 rounded-md"}),o.jsx(Y,{className:"h-5 w-24 mt-4"})]})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[o.jsx(Y,{className:"h-8 w-32"}),o.jsx(Y,{className:"h-6 w-24"})]}),o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(Y,{className:"h-10 w-24 rounded-md"}),o.jsx(Y,{className:"h-10 flex-1 rounded-md"})]})]})]})});const _=(e==null?void 0:e.Opportunities)||[],V=_.length>0,G=()=>{if(d==null){p(1);return}d>1&&p(d-1)},j=()=>{if(d==null){p(1);return}p(d+1)},I=F=>{const Q=parseInt(F.target.value,10);if(!isNaN(Q)&&Q>0){p(Q);return}p(void 0)},P=()=>{(d==null||d<1)&&p(1)},B=((ae=(ee=e.Distribution)==null?void 0:ee.Inventory)==null?void 0:ae.reduce((F,Q)=>F+(Q.AvailableQuantity||0),0))||0,k=F=>{try{return new Date(F).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(Q){return console.error(Q),F.split("T")[0]||"N/A"}},K=()=>{s&&s({quantity:d??1,bidNumber:(h==null?void 0:h.BidNumber)??null})};return o.jsx(cr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(dr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:C?o.jsx(Y,{className:"h-10 w-24 rounded-md"}):N&&o.jsx("img",{src:N||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(qn,{size:"12",className:"mr-1.5"})," ",e.State]}),o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[o.jsx(Ti,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&o.jsxs(xe,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[o.jsx(mi,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${(te=e.ManufacturerCategory)!=null&&te.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[o.jsx(Qn,{size:"12",className:"mr-1.5"})," ",(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Qn,{size:"12",className:"mr-1.5"})," ",(ie=e.ManufacturerCategory)!=null&&ie.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Pi,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),o.jsxs(xe,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Mi,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),o.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),o.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),o.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),o.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),o.jsxs("div",{className:"font-medium flex items-center",children:[o.jsx(Qs,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx(Js,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:V&&e.Distribution&&o.jsxs("div",{className:"w-full",children:[o.jsx("div",{className:"flex items-center",children:"You have "+_.length+(_.length>1?" opportunities":" opportunity")+" for this product:"}),o.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:_.map((F,Q)=>{var he;return o.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
185
- ${F.BidNumber==(h==null?void 0:h.BidNumber)?"cursor-pointer border-2 border-purple-900":z(F)?"hover:bg-purple-200 cursor-pointer":"!bg-neutral-50"}
186
- `,onClick:()=>{z(F)&&m(F.BidNumber!=(h==null?void 0:h.BidNumber)?F:null)},children:[o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"font-medium text-sm",children:F.Opportunity}),o.jsxs("span",{className:"text-xs text-neutral-900",children:[F.BidNumber," ",!z(F)&&o.jsx(xe,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),o.jsxs("div",{className:"flex flex-col items-end",children:[o.jsxs("span",{className:"font-semibold",children:["$",(he=F.Price)==null?void 0:he.toFixed(2)]}),F.Rebate&&F.Rebate>0&&o.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",F.Rebate.toFixed(2)]}),F.EndDate&&o.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",k(F.EndDate)]})]})]},Q)})})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[a&&o.jsxs(oe,{variant:"secondary",onClick:a,children:[o.jsx(wi,{className:"mr-2"}),"View Product"]}),((Ne=e.Distribution)==null?void 0:Ne.Inventory)&&o.jsx("div",{className:"mt-4",children:o.jsxs(ht,{open:f,onOpenChange:g,children:[o.jsx(Fr,{asChild:!0,children:o.jsxs(oe,{variant:"ghost",className:`flex items-center text-sm ${B>0?"text-green-700":"text-red-700"}`,children:[o.jsx(Zn,{size:"16",className:"mr-2"}),B>0?o.jsxs(o.Fragment,{children:[B," in stock"]}):o.jsx(o.Fragment,{children:"Out of stock"})]})}),o.jsxs(gt,{className:"max-w-4xl",children:[o.jsx(jt,{children:o.jsxs(Ht,{className:"flex items-center",children:[o.jsx(Zn,{className:"mr-2",size:18}),"Inventory Information"]})}),o.jsx(uf,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&o.jsxs("div",{className:"flex justify-between items-end mt-4",children:[o.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:b>0?o.jsx("div",{className:"flex items-center",children:o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"Cost: $"}),b.toFixed(2),o.jsx("span",{children:" CAD"})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center flex-wrap",children:[o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"$"}),h?(Fe=(pe=e.Opportunities)==null?void 0:pe.find(F=>F.BidNumber==h.BidNumber))==null?void 0:Fe.Price:x.toFixed(2),o.jsx("span",{children:" CAD"})]}),v>0&&o.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",w.toFixed(2)]})]}),v>0&&o.jsx("div",{className:"flex items-center",children:o.jsxs(xe,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[o.jsxs("span",{children:[v,"% OFF"]}),((Ke=e.InstantRebate)==null?void 0:Ke.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(h==null?void 0:h.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",h.EndDate.split("T")[0]]})]})})]})}),o.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&o.jsxs("div",{className:"flex items-center border rounded-md",children:[o.jsx(oe,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:G,disabled:typeof d<"u"&&(d<=1||!e.AvailableToBuy||i||!s),children:"-"}),o.jsx("input",{value:d,onChange:I,onBlur:P,onClick:F=>F.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||i||!s?"text-gray-400":""}`,disabled:!e.AvailableToBuy||i||!s}),o.jsx(oe,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:j,disabled:!e.AvailableToBuy||i||!s,children:"+"})]}),typeof t<"u"&&t&&o.jsx(oe,{className:"gap-2 whitespace-nowrap",onClick:K,disabled:!e.AvailableToBuy||i||!s,children:i?o.jsxs(o.Fragment,{children:[o.jsx(Yn,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Xn,{className:"mr-2"}),"Add to Cart"]})}),r&&o.jsx(oe,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:c,disabled:u||!c,children:u?o.jsxs(o.Fragment,{children:[o.jsx(Yn,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Xn,{className:"mr-2"}),"Sync to Shopify"]})})]})]})]})})}E.AvatarFooter=Au,E.Badge=xe,E.Button=oe,E.Card=cr,E.CardContent=dr,E.CardDescription=qs,E.CardFooter=Ys,E.CardHeader=Gs,E.CardTitle=Ks,E.CountryFlag=Qs,E.Dialog=ht,E.DialogClose=zr,E.DialogContent=gt,E.DialogDescription=Vr,E.DialogFooter=Wr,E.DialogHeader=jt,E.DialogOverlay=Br,E.DialogPortal=sa,E.DialogTitle=Ht,E.DialogTrigger=Fr,E.Input=nr,E.InputOTP=ml,E.InputOTPGroup=bl,E.InputOTPSeparator=wl,E.InputOTPSlot=yl,E.Label=Ou,E.Layout=Zs,E.Navbar=Xs,E.ProductCard=ff,E.ProductImage=Js,E.Separator=ln,E.Sheet=Xa,E.SheetClose=Tu,E.SheetContent=dn,E.SheetDescription=ts,E.SheetFooter=Ra,E.SheetHeader=Ja,E.SheetOverlay=cn,E.SheetPortal=Za,E.SheetTitle=es,E.SheetTrigger=Eu,E.Sidebar=pn,E.SidebarContent=mn,E.SidebarFooter=vn,E.SidebarGroup=cs,E.SidebarGroupAction=us,E.SidebarGroupContent=fs,E.SidebarGroupLabel=ds,E.SidebarHeader=gn,E.SidebarInput=is,E.SidebarInset=ss,E.SidebarMenu=bn,E.SidebarMenuAction=ps,E.SidebarMenuBadge=hs,E.SidebarMenuButton=wn,E.SidebarMenuItem=yn,E.SidebarMenuSkeleton=gs,E.SidebarMenuSub=vs,E.SidebarMenuSubButton=bs,E.SidebarMenuSubItem=ms,E.SidebarProvider=fn,E.SidebarRail=as,E.SidebarSeparator=ls,E.SidebarTrigger=hn,E.Skeleton=Y,E.Toast=Mn,E.ToastAction=Ws,E.ToastClose=kn,E.ToastDescription=Dn,E.ToastProvider=Bs,E.ToastTitle=On,E.ToastViewport=An,E.Toaster=Hs,E.Tooltip=dt,E.TooltipContent=Ge,E.TooltipProvider=ct,E.TooltipTrigger=ut,E.Topbar=$n,E.badgeVariants=Us,E.buttonVariants=jr,E.toast=js,E.useIsMobile=ns,E.useSidebar=xt,E.useToast=Ln,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
194
+ 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},$u="DialogDescriptionWarning",zu=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ka($u).contentName}}.`;return i.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},rn=ya,La=Ca,Fa=Sa,Xt=Ea,Rt=Ta,Qt=Pa,Zt=_a,Jt=Oa;const Ct=({modal:e=!1,...t})=>o.jsx(rn,{modal:e,...t});Ct.displayName=rn.displayName;const nn=La,$a=Fa,on=Jt,an=i.forwardRef(({className:e,...t},r)=>o.jsx(Xt,{ref:r,className:_("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}));an.displayName=Xt.displayName;const Nt=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs($a,{children:[o.jsx(an,{}),o.jsxs(Rt,{ref:n,className:_("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,o.jsxs(Jt,{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:[o.jsx(Or,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Nt.displayName=Rt.displayName;const er=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});er.displayName="DialogHeader";const sn=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});sn.displayName="DialogFooter";const tr=i.forwardRef(({className:e,...t},r)=>o.jsx(Qt,{ref:r,className:_("text-lg font-semibold leading-none tracking-tight",e),...t}));tr.displayName=Qt.displayName;const cn=i.forwardRef(({className:e,...t},r)=>o.jsx(Zt,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));cn.displayName=Zt.displayName;function ln(e){const t=e+"CollectionProvider",[r,n]=Be(t),[a,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:b,children:h}=m,v=q.useRef(null),w=q.useRef(new Map).current;return o.jsx(a,{scope:b,itemMap:w,collectionRef:v,children:h})};c.displayName=t;const l=e+"CollectionSlot",u=q.forwardRef((m,b)=>{const{scope:h,children:v}=m,w=s(l,h),y=oe(b,w.collectionRef);return o.jsx(ye,{ref:y,children:v})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=q.forwardRef((m,b)=>{const{scope:h,children:v,...w}=m,y=q.useRef(null),x=oe(b,y),C=s(d,h);return q.useEffect(()=>(C.itemMap.set(y,{ref:y,...w}),()=>void C.itemMap.delete(y))),o.jsx(ye,{[f]:"",ref:x,children:v})});p.displayName=d;function g(m){const b=s(e+"CollectionConsumer",m);return q.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((C,E)=>w.indexOf(C.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:u,ItemSlot:p},g,n]}var Bu=i.createContext(void 0);function za(e){const t=i.useContext(Bu);return e||t||"ltr"}const Wu=["top","right","bottom","left"],Ge=Math.min,me=Math.max,rr=Math.round,nr=Math.floor,De=e=>({x:e,y:e}),Vu={left:"right",right:"left",bottom:"top",top:"bottom"},Gu={start:"end",end:"start"};function dn(e,t,r){return me(e,Ge(t,r))}function Le(e,t){return typeof e=="function"?e(t):e}function Fe(e){return e.split("-")[0]}function ut(e){return e.split("-")[1]}function un(e){return e==="x"?"y":"x"}function fn(e){return e==="y"?"height":"width"}function je(e){return["top","bottom"].includes(Fe(e))?"y":"x"}function pn(e){return un(je(e))}function ju(e,t,r){r===void 0&&(r=!1);const n=ut(e),a=pn(e),s=fn(a);let c=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=or(c)),[c,or(c)]}function Hu(e){const t=or(e);return[hn(e),t,hn(t)]}function hn(e){return e.replace(/start|end/g,t=>Gu[t])}function Uu(e,t,r){const n=["left","right"],a=["right","left"],s=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?s:c;default:return[]}}function Ku(e,t,r,n){const a=ut(e);let s=Uu(Fe(e),r==="start",n);return a&&(s=s.map(c=>c+"-"+a),t&&(s=s.concat(s.map(hn)))),s}function or(e){return e.replace(/left|right|bottom|top/g,t=>Vu[t])}function Yu(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ba(e){return typeof e!="number"?Yu(e):{top:e,right:e,bottom:e,left:e}}function ar(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Wa(e,t,r){let{reference:n,floating:a}=e;const s=je(t),c=pn(t),l=fn(c),u=Fe(t),d=s==="y",f=n.x+n.width/2-a.width/2,p=n.y+n.height/2-a.height/2,g=n[l]/2-a[l]/2;let m;switch(u){case"top":m={x:f,y:n.y-a.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-a.width,y:p};break;default:m={x:n.x,y:n.y}}switch(ut(t)){case"start":m[c]-=g*(r&&d?-1:1);break;case"end":m[c]+=g*(r&&d?-1:1);break}return m}const qu=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:c}=r,l=s.filter(Boolean),u=await(c.isRTL==null?void 0:c.isRTL(t));let d=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:f,y:p}=Wa(d,n,u),g=n,m={},b=0;for(let h=0;h<l.length;h++){const{name:v,fn:w}=l[h],{x:y,y:x,data:C,reset:E}=await w({x:f,y:p,initialPlacement:n,placement:g,strategy:a,middlewareData:m,rects:d,platform:c,elements:{reference:e,floating:t}});f=y??f,p=x??p,m={...m,[v]:{...m[v],...C}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):E.rects),{x:f,y:p}=Wa(d,g,u)),h=-1)}return{x:f,y:p,placement:g,strategy:a,middlewareData:m}};async function St(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:s,rects:c,elements:l,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=Le(t,e),b=Ba(m),v=l[g?p==="floating"?"reference":"floating":p],w=ar(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:u})),y=p==="floating"?{x:n,y:a,width:c.floating.width,height:c.floating.height}:c.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=ar(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:x,strategy:u}):y);return{top:(w.top-E.top+b.top)/C.y,bottom:(E.bottom-w.bottom+b.bottom)/C.y,left:(w.left-E.left+b.left)/C.x,right:(E.right-w.right+b.right)/C.x}}const Xu=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:s,platform:c,elements:l,middlewareData:u}=t,{element:d,padding:f=0}=Le(e,t)||{};if(d==null)return{};const p=Ba(f),g={x:r,y:n},m=pn(a),b=fn(m),h=await c.getDimensions(d),v=m==="y",w=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[m]-g[m]-s.floating[b],E=g[m]-s.reference[m],N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let T=N?N[x]:0;(!T||!await(c.isElement==null?void 0:c.isElement(N)))&&(T=l.floating[x]||s.floating[b]);const F=C/2-E/2,k=T/2-h[b]/2-1,z=Ge(p[w],k),H=Ge(p[y],k),B=z,L=T-h[b]-H,P=T/2-h[b]/2+F,V=dn(B,P,L),A=!u.arrow&&ut(a)!=null&&P!==V&&s.reference[b]/2-(P<B?z:H)-h[b]/2<0,Y=A?P<B?P-B:P-L:0;return{[m]:g[m]+Y,data:{[m]:V,centerOffset:P-V-Y,...A&&{alignmentOffset:Y}},reset:A}}}),Ru=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:s,rects:c,initialPlacement:l,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...v}=Le(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Fe(a),y=je(l),x=Fe(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=g||(x||!h?[or(l)]:Hu(l)),N=b!=="none";!g&&N&&E.push(...Ku(l,h,b,C));const T=[l,...E],F=await St(t,v),k=[];let z=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&k.push(F[w]),p){const P=ju(a,c,C);k.push(F[P[0]],F[P[1]])}if(z=[...z,{placement:a,overflows:k}],!k.every(P=>P<=0)){var H,B;const P=(((H=s.flip)==null?void 0:H.index)||0)+1,V=T[P];if(V)return{data:{index:P,overflows:z},reset:{placement:V}};let A=(B=z.filter(Y=>Y.overflows[0]<=0).sort((Y,D)=>Y.overflows[1]-D.overflows[1])[0])==null?void 0:B.placement;if(!A)switch(m){case"bestFit":{var L;const Y=(L=z.filter(D=>{if(N){const M=je(D.placement);return M===y||M==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(M=>M>0).reduce((M,U)=>M+U,0)]).sort((D,M)=>D[1]-M[1])[0])==null?void 0:L[0];Y&&(A=Y);break}case"initialPlacement":A=l;break}if(a!==A)return{reset:{placement:A}}}return{}}}};function Va(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ga(e){return Wu.some(t=>e[t]>=0)}const Qu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Le(e,t);switch(n){case"referenceHidden":{const s=await St(t,{...a,elementContext:"reference"}),c=Va(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Ga(c)}}}case"escaped":{const s=await St(t,{...a,altBoundary:!0}),c=Va(s,r.floating);return{data:{escapedOffsets:c,escaped:Ga(c)}}}default:return{}}}}};async function Zu(e,t){const{placement:r,platform:n,elements:a}=e,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),c=Fe(r),l=ut(r),u=je(r)==="y",d=["left","top"].includes(c)?-1:1,f=s&&u?-1:1,p=Le(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),u?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const Ju=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:s,placement:c,middlewareData:l}=t,u=await Zu(t,e);return c===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:c}}}}},ef=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:v=>{let{x:w,y}=v;return{x:w,y}}},...u}=Le(e,t),d={x:r,y:n},f=await St(t,u),p=je(Fe(a)),g=un(p);let m=d[g],b=d[p];if(s){const v=g==="y"?"top":"left",w=g==="y"?"bottom":"right",y=m+f[v],x=m-f[w];m=dn(y,m,x)}if(c){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=b+f[v],x=b-f[w];b=dn(y,b,x)}const h=l.fn({...t,[g]:m,[p]:b});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[g]:s,[p]:c}}}}}},tf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:s,middlewareData:c}=t,{offset:l=0,mainAxis:u=!0,crossAxis:d=!0}=Le(e,t),f={x:r,y:n},p=je(a),g=un(p);let m=f[g],b=f[p];const h=Le(l,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const x=g==="y"?"height":"width",C=s.reference[g]-s.floating[x]+v.mainAxis,E=s.reference[g]+s.reference[x]-v.mainAxis;m<C?m=C:m>E&&(m=E)}if(d){var w,y;const x=g==="y"?"width":"height",C=["top","left"].includes(Fe(a)),E=s.reference[p]-s.floating[x]+(C&&((w=c.offset)==null?void 0:w[p])||0)+(C?0:v.crossAxis),N=s.reference[p]+s.reference[x]+(C?0:((y=c.offset)==null?void 0:y[p])||0)-(C?v.crossAxis:0);b<E?b=E:b>N&&(b=N)}return{[g]:m,[p]:b}}}},rf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:s,platform:c,elements:l}=t,{apply:u=()=>{},...d}=Le(e,t),f=await St(t,d),p=Fe(a),g=ut(a),m=je(a)==="y",{width:b,height:h}=s.floating;let v,w;p==="top"||p==="bottom"?(v=p,w=g===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?"start":"end")?"left":"right"):(w=p,v=g==="end"?"top":"bottom");const y=h-f.top-f.bottom,x=b-f.left-f.right,C=Ge(h-f[v],y),E=Ge(b-f[w],x),N=!t.middlewareData.shift;let T=C,F=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(F=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=y),N&&!g){const z=me(f.left,0),H=me(f.right,0),B=me(f.top,0),L=me(f.bottom,0);m?F=b-2*(z!==0||H!==0?z+H:me(f.left,f.right)):T=h-2*(B!==0||L!==0?B+L:me(f.top,f.bottom))}await u({...t,availableWidth:F,availableHeight:T});const k=await c.getDimensions(l.floating);return b!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function sr(){return typeof window<"u"}function ft(e){return ja(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oe(e){var t;return(t=(ja(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ja(e){return sr()?e instanceof Node||e instanceof be(e).Node:!1}function Se(e){return sr()?e instanceof Element||e instanceof be(e).Element:!1}function Ie(e){return sr()?e instanceof HTMLElement||e instanceof be(e).HTMLElement:!1}function Ha(e){return!sr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof be(e).ShadowRoot}function Et(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function nf(e){return["table","td","th"].includes(ft(e))}function ir(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function gn(e){const t=vn(),r=Se(e)?Ee(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 of(e){let t=He(e);for(;Ie(t)&&!pt(t);){if(gn(t))return t;if(ir(t))return null;t=He(t)}return null}function vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(e){return["html","body","#document"].includes(ft(e))}function Ee(e){return be(e).getComputedStyle(e)}function cr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(ft(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ha(e)&&e.host||Oe(e);return Ha(t)?t.host:t}function Ua(e){const t=He(e);return pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ie(t)&&Et(t)?t:Ua(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=Ua(e),s=a===((n=e.ownerDocument)==null?void 0:n.body),c=be(a);if(s){const l=mn(c);return t.concat(c,c.visualViewport||[],Et(a)?a:[],l&&r?Tt(l):[])}return t.concat(a,Tt(a,[],r))}function mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ka(e){const t=Ee(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Ie(e),s=a?e.offsetWidth:r,c=a?e.offsetHeight:n,l=rr(r)!==s||rr(n)!==c;return l&&(r=s,n=c),{width:r,height:n,$:l}}function bn(e){return Se(e)?e:e.contextElement}function ht(e){const t=bn(e);if(!Ie(t))return De(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:s}=Ka(t);let c=(s?rr(r.width):r.width)/n,l=(s?rr(r.height):r.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const af=De(0);function Ya(e){const t=be(e);return!vn()||!t.visualViewport?af:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==be(e)?!1:t}function Qe(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=bn(e);let c=De(1);t&&(n?Se(n)&&(c=ht(n)):c=ht(e));const l=sf(s,r,n)?Ya(s):De(0);let u=(a.left+l.x)/c.x,d=(a.top+l.y)/c.y,f=a.width/c.x,p=a.height/c.y;if(s){const g=be(s),m=n&&Se(n)?be(n):n;let b=g,h=mn(b);for(;h&&n&&m!==b;){const v=ht(h),w=h.getBoundingClientRect(),y=Ee(h),x=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,C=w.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,p*=v.y,u+=x,d+=C,b=be(h),h=mn(b)}}return ar({width:f,height:p,x:u,y:d})}function wn(e,t){const r=cr(e).scrollLeft;return t?t.left+r:Qe(Oe(e)).left+r}function qa(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:wn(e,n)),s=n.top+t.scrollTop;return{x:a,y:s}}function cf(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const s=a==="fixed",c=Oe(n),l=t?ir(t.floating):!1;if(n===c||l&&s)return r;let u={scrollLeft:0,scrollTop:0},d=De(1);const f=De(0),p=Ie(n);if((p||!p&&!s)&&((ft(n)!=="body"||Et(c))&&(u=cr(n)),Ie(n))){const m=Qe(n);d=ht(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=c&&!p&&!s?qa(c,u,!0):De(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:r.y*d.y-u.scrollTop*d.y+f.y+g.y}}function lf(e){return Array.from(e.getClientRects())}function df(e){const t=Oe(e),r=cr(e),n=e.ownerDocument.body,a=me(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=me(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let c=-r.scrollLeft+wn(e);const l=-r.scrollTop;return Ee(n).direction==="rtl"&&(c+=me(t.clientWidth,n.clientWidth)-a),{width:a,height:s,x:c,y:l}}function uf(e,t){const r=be(e),n=Oe(e),a=r.visualViewport;let s=n.clientWidth,c=n.clientHeight,l=0,u=0;if(a){s=a.width,c=a.height;const d=vn();(!d||d&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}return{width:s,height:c,x:l,y:u}}function ff(e,t){const r=Qe(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,s=Ie(e)?ht(e):De(1),c=e.clientWidth*s.x,l=e.clientHeight*s.y,u=a*s.x,d=n*s.y;return{width:c,height:l,x:u,y:d}}function Xa(e,t,r){let n;if(t==="viewport")n=uf(e,r);else if(t==="document")n=df(Oe(e));else if(Se(t))n=ff(t,r);else{const a=Ya(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ar(n)}function Ra(e,t){const r=He(e);return r===t||!Se(r)||pt(r)?!1:Ee(r).position==="fixed"||Ra(r,t)}function pf(e,t){const r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(l=>Se(l)&&ft(l)!=="body"),a=null;const s=Ee(e).position==="fixed";let c=s?He(e):e;for(;Se(c)&&!pt(c);){const l=Ee(c),u=gn(c);!u&&l.position==="fixed"&&(a=null),(s?!u&&!a:!u&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Et(c)&&!u&&Ra(e,c))?n=n.filter(f=>f!==c):a=l,c=He(c)}return t.set(e,n),n}function hf(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const c=[...r==="clippingAncestors"?ir(t)?[]:pf(t,this._c):[].concat(r),n],l=c[0],u=c.reduce((d,f)=>{const p=Xa(t,f,a);return d.top=me(p.top,d.top),d.right=Ge(p.right,d.right),d.bottom=Ge(p.bottom,d.bottom),d.left=me(p.left,d.left),d},Xa(t,l,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function gf(e){const{width:t,height:r}=Ka(e);return{width:t,height:r}}function vf(e,t,r){const n=Ie(t),a=Oe(t),s=r==="fixed",c=Qe(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const u=De(0);if(n||!n&&!s)if((ft(t)!=="body"||Et(a))&&(l=cr(t)),n){const g=Qe(t,!0,s,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else a&&(u.x=wn(a));const d=a&&!n&&!s?qa(a,l):De(0),f=c.left+l.scrollLeft-u.x-d.x,p=c.top+l.scrollTop-u.y-d.y;return{x:f,y:p,width:c.width,height:c.height}}function yn(e){return Ee(e).position==="static"}function Qa(e,t){if(!Ie(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Oe(e)===r&&(r=r.ownerDocument.body),r}function Za(e,t){const r=be(e);if(ir(e))return r;if(!Ie(e)){let a=He(e);for(;a&&!pt(a);){if(Se(a)&&!yn(a))return a;a=He(a)}return r}let n=Qa(e,t);for(;n&&nf(n)&&yn(n);)n=Qa(n,t);return n&&pt(n)&&yn(n)&&!gn(n)?r:n||of(e)||r}const mf=async function(e){const t=this.getOffsetParent||Za,r=this.getDimensions,n=await r(e.floating);return{reference:vf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bf(e){return Ee(e).direction==="rtl"}const wf={convertOffsetParentRelativeRectToViewportRelativeRect:cf,getDocumentElement:Oe,getClippingRect:hf,getOffsetParent:Za,getElementRects:mf,getClientRects:lf,getDimensions:gf,getScale:ht,isElement:Se,isRTL:bf};function Ja(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yf(e,t){let r=null,n;const a=Oe(e);function s(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function c(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=d;if(l||t(),!g||!m)return;const b=nr(p),h=nr(a.clientWidth-(f+g)),v=nr(a.clientHeight-(p+m)),w=nr(f),x={rootMargin:-b+"px "+-h+"px "+-v+"px "+-w+"px",threshold:me(0,Ge(1,u))||1};let C=!0;function E(N){const T=N[0].intersectionRatio;if(T!==u){if(!C)return c();T?c(!1,T):n=setTimeout(()=>{c(!1,1e-7)},1e3)}T===1&&!Ja(d,e.getBoundingClientRect())&&c(),C=!1}try{r=new IntersectionObserver(E,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(E,x)}r.observe(e)}return c(!0),s}function xf(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=bn(e),f=a||s?[...d?Tt(d):[],...Tt(t)]:[];f.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const p=d&&l?yf(d,r):null;let g=-1,m=null;c&&(m=new ResizeObserver(w=>{let[y]=w;y&&y.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let b,h=u?Qe(e):null;u&&v();function v(){const w=Qe(e);h&&!Ja(h,w)&&r(),h=w,b=requestAnimationFrame(v)}return r(),()=>{var w;f.forEach(y=>{a&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),p==null||p(),(w=m)==null||w.disconnect(),m=null,u&&cancelAnimationFrame(b)}}const Cf=Ju,Nf=ef,Sf=Ru,Ef=rf,Tf=Qu,es=Xu,Mf=tf,Pf=(e,t,r)=>{const n=new Map,a={platform:wf,...r},s={...a.platform,_c:n};return qu(e,t,{...a,platform:s})};var lr=typeof document<"u"?q.useLayoutEffect:q.useEffect;function dr(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,a;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(!dr(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&e.$$typeof)&&!dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ts(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rs(e,t){const r=ts(e);return Math.round(t*r)/r}function xn(e){const t=i.useRef(e);return lr(()=>{t.current=e}),t}function Af(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=i.useState(n);dr(g,n)||m(n);const[b,h]=i.useState(null),[v,w]=i.useState(null),y=i.useCallback(D=>{D!==N.current&&(N.current=D,h(D))},[]),x=i.useCallback(D=>{D!==T.current&&(T.current=D,w(D))},[]),C=s||b,E=c||v,N=i.useRef(null),T=i.useRef(null),F=i.useRef(f),k=u!=null,z=xn(u),H=xn(a),B=xn(d),L=i.useCallback(()=>{if(!N.current||!T.current)return;const D={placement:t,strategy:r,middleware:g};H.current&&(D.platform=H.current),Pf(N.current,T.current,D).then(M=>{const U={...M,isPositioned:B.current!==!1};P.current&&!dr(F.current,U)&&(F.current=U,_r.flushSync(()=>{p(U)}))})},[g,t,r,H,B]);lr(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p(D=>({...D,isPositioned:!1})))},[d]);const P=i.useRef(!1);lr(()=>(P.current=!0,()=>{P.current=!1}),[]),lr(()=>{if(C&&(N.current=C),E&&(T.current=E),C&&E){if(z.current)return z.current(C,E,L);L()}},[C,E,L,z,k]);const V=i.useMemo(()=>({reference:N,floating:T,setReference:y,setFloating:x}),[y,x]),A=i.useMemo(()=>({reference:C,floating:E}),[C,E]),Y=i.useMemo(()=>{const D={position:r,left:0,top:0};if(!A.floating)return D;const M=rs(A.floating,f.x),U=rs(A.floating,f.y);return l?{...D,transform:"translate("+M+"px, "+U+"px)",...ts(A.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:U}},[r,l,A.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:L,refs:V,elements:A,floatingStyles:Y}),[f,L,V,A,Y])}const _f=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?es({element:n.current,padding:a}).fn(r):{}:n?es({element:n,padding:a}).fn(r):{}}}},Df=(e,t)=>({...Cf(e),options:[e,t]}),Of=(e,t)=>({...Nf(e),options:[e,t]}),If=(e,t)=>({...Mf(e),options:[e,t]}),kf=(e,t)=>({...Sf(e),options:[e,t]}),Lf=(e,t)=>({...Ef(e),options:[e,t]}),Ff=(e,t)=>({...Tf(e),options:[e,t]}),$f=(e,t)=>({..._f(e),options:[e,t]});var zf="Arrow",ns=i.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...s}=e;return o.jsx(R.svg,{...s,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});ns.displayName=zf;var Bf=ns;function Wf(e){const[t,r]=i.useState(void 0);return We(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let c,l;if("borderBoxSize"in s){const u=s.borderBoxSize,d=Array.isArray(u)?u[0]:u;c=d.inlineSize,l=d.blockSize}else c=e.offsetWidth,l=e.offsetHeight;r({width:c,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Cn="Popper",[os,ur]=Be(Cn),[Vf,as]=os(Cn),ss=e=>{const{__scopePopper:t,children:r}=e,[n,a]=i.useState(null);return o.jsx(Vf,{scope:t,anchor:n,onAnchorChange:a,children:r})};ss.displayName=Cn;var is="PopperAnchor",cs=i.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,s=as(is,r),c=i.useRef(null),l=oe(t,c);return i.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||c.current)}),n?null:o.jsx(R.div,{...a,ref:l})});cs.displayName=is;var Nn="PopperContent",[Gf,jf]=os(Nn),ls=i.forwardRef((e,t)=>{var ae,Me,de,Pe,G,Q;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...h}=e,v=as(Nn,r),[w,y]=i.useState(null),x=oe(t,he=>y(he)),[C,E]=i.useState(null),N=Wf(C),T=(N==null?void 0:N.width)??0,F=(N==null?void 0:N.height)??0,k=n+(s!=="center"?"-"+s:""),z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],B=H.length>0,L={padding:z,boundary:H.filter(Uf),altBoundary:B},{refs:P,floatingStyles:V,placement:A,isPositioned:Y,middlewareData:D}=Af({strategy:"fixed",placement:k,whileElementsMounted:(...he)=>xf(...he,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[Df({mainAxis:a+F,alignmentAxis:c}),u&&Of({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?If():void 0,...L}),u&&kf({...L}),Lf({...L,apply:({elements:he,rects:W,availableWidth:j,availableHeight:ue})=>{const{width:ge,height:ve}=W.reference,Z=he.floating.style;Z.setProperty("--radix-popper-available-width",`${j}px`),Z.setProperty("--radix-popper-available-height",`${ue}px`),Z.setProperty("--radix-popper-anchor-width",`${ge}px`),Z.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),C&&$f({element:C,padding:l}),Kf({arrowWidth:T,arrowHeight:F}),g&&Ff({strategy:"referenceHidden",...L})]}),[M,U]=fs(A),X=fe(b);We(()=>{Y&&(X==null||X())},[Y,X]);const ee=(ae=D.arrow)==null?void 0:ae.x,te=(Me=D.arrow)==null?void 0:Me.y,ne=((de=D.arrow)==null?void 0:de.centerOffset)!==0,[se,le]=i.useState();return We(()=>{w&&le(window.getComputedStyle(w).zIndex)},[w]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:Y?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Pe=D.transformOrigin)==null?void 0:Pe.x,(G=D.transformOrigin)==null?void 0:G.y].join(" "),...((Q=D.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Gf,{scope:r,placedSide:M,onArrowChange:E,arrowX:ee,arrowY:te,shouldHideArrow:ne,children:o.jsx(R.div,{"data-side":M,"data-align":U,...h,ref:x,style:{...h.style,animation:Y?void 0:"none"}})})})});ls.displayName=Nn;var ds="PopperArrow",Hf={top:"bottom",right:"left",bottom:"top",left:"right"},us=i.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,s=jf(ds,n),c=Hf[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(Bf,{...a,ref:r,style:{...a.style,display:"block"}})})});us.displayName=ds;function Uf(e){return e!==null}var Kf=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:r,rects:n,middlewareData:a}=t,c=((v=a.arrow)==null?void 0:v.centerOffset)!==0,l=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,f]=fs(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((w=a.arrow)==null?void 0:w.x)??0)+l/2,m=(((y=a.arrow)==null?void 0:y.y)??0)+u/2;let b="",h="";return d==="bottom"?(b=c?p:`${g}px`,h=`${-u}px`):d==="top"?(b=c?p:`${g}px`,h=`${n.floating.height+u}px`):d==="right"?(b=`${-u}px`,h=c?p:`${m}px`):d==="left"&&(b=`${n.floating.width+u}px`,h=c?p:`${m}px`),{data:{x:b,y:h}}}});function fs(e){const[t,r="center"]=e.split("-");return[t,r]}var Sn=ss,ps=cs,hs=ls,gs=us,En="rovingFocusGroup.onEntryFocus",Yf={bubbles:!1,cancelable:!0},fr="RovingFocusGroup",[Tn,vs,qf]=ln(fr),[Xf,ms]=Be(fr,[qf]),[Rf,Qf]=Xf(fr),bs=i.forwardRef((e,t)=>o.jsx(Tn.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(Tn.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(Zf,{...e,ref:t})})}));bs.displayName=fr;var Zf=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=i.useRef(null),m=oe(t,g),b=za(s),[h=null,v]=st({prop:c,defaultProp:l,onChange:u}),[w,y]=i.useState(!1),x=fe(d),C=vs(r),E=i.useRef(!1),[N,T]=i.useState(0);return i.useEffect(()=>{const F=g.current;if(F)return F.addEventListener(En,x),()=>F.removeEventListener(En,x)},[x]),o.jsx(Rf,{scope:r,orientation:n,dir:b,loop:a,currentTabStopId:h,onItemFocus:i.useCallback(F=>v(F),[v]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>T(F=>F+1),[]),onFocusableItemRemove:i.useCallback(()=>T(F=>F-1),[]),children:o.jsx(R.div,{tabIndex:w||N===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{E.current=!0}),onFocus:$(e.onFocus,F=>{const k=!E.current;if(F.target===F.currentTarget&&k&&!w){const z=new CustomEvent(En,Yf);if(F.currentTarget.dispatchEvent(z),!z.defaultPrevented){const H=C().filter(A=>A.focusable),B=H.find(A=>A.active),L=H.find(A=>A.id===h),V=[B,L,...H].filter(Boolean).map(A=>A.ref.current);xs(V,f)}}E.current=!1}),onBlur:$(e.onBlur,()=>y(!1))})})}),ws="RovingFocusGroupItem",ys=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:s,...c}=e,l=ke(),u=s||l,d=Qf(ws,r),f=d.currentTabStopId===u,p=vs(r),{onFocusableItemAdd:g,onFocusableItemRemove:m}=d;return i.useEffect(()=>{if(n)return g(),()=>m()},[n,g,m]),o.jsx(Tn.ItemSlot,{scope:r,id:u,focusable:n,active:a,children:o.jsx(R.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:$(e.onMouseDown,b=>{n?d.onItemFocus(u):b.preventDefault()}),onFocus:$(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:$(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const h=tp(b,d.orientation,d.dir);if(h!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=p().filter(y=>y.focusable).map(y=>y.ref.current);if(h==="last")w.reverse();else if(h==="prev"||h==="next"){h==="prev"&&w.reverse();const y=w.indexOf(b.currentTarget);w=d.loop?rp(w,y+1):w.slice(y+1)}setTimeout(()=>xs(w))}})})})});ys.displayName=ws;var Jf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ep(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tp(e,t,r){const n=ep(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Jf[n]}function xs(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function rp(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var np=bs,op=ys,Mn=["Enter"," "],ap=["ArrowDown","PageUp","Home"],Cs=["ArrowUp","PageDown","End"],sp=[...ap,...Cs],ip={ltr:[...Mn,"ArrowRight"],rtl:[...Mn,"ArrowLeft"]},cp={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Mt="Menu",[Pt,lp,dp]=ln(Mt),[Ze,Ns]=Be(Mt,[dp,ur,ms]),At=ur(),Ss=ms(),[Es,Ue]=Ze(Mt),[up,_t]=Ze(Mt),Ts=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:s,modal:c=!0}=e,l=At(t),[u,d]=i.useState(null),f=i.useRef(!1),p=fe(s),g=za(a);return i.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),o.jsx(Sn,{...l,children:o.jsx(Es,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d,children:o.jsx(up,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:g,modal:c,children:n})})})};Ts.displayName=Mt;var fp="MenuAnchor",Pn=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=At(r);return o.jsx(ps,{...a,...n,ref:t})});Pn.displayName=fp;var An="MenuPortal",[pp,Ms]=Ze(An,{forceMount:void 0}),Ps=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,s=Ue(An,t);return o.jsx(pp,{scope:t,forceMount:r,children:o.jsx(Ce,{present:r||s.open,children:o.jsx(xt,{asChild:!0,container:a,children:n})})})};Ps.displayName=An;var xe="MenuContent",[hp,_n]=Ze(xe),As=i.forwardRef((e,t)=>{const r=Ms(xe,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Ue(xe,e.__scopeMenu),c=_t(xe,e.__scopeMenu);return o.jsx(Pt.Provider,{scope:e.__scopeMenu,children:o.jsx(Ce,{present:n||s.open,children:o.jsx(Pt.Slot,{scope:e.__scopeMenu,children:c.modal?o.jsx(gp,{...a,ref:t}):o.jsx(vp,{...a,ref:t})})})})}),gp=i.forwardRef((e,t)=>{const r=Ue(xe,e.__scopeMenu),n=i.useRef(null),a=oe(t,n);return i.useEffect(()=>{const s=n.current;if(s)return ba(s)},[]),o.jsx(Dn,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),vp=i.forwardRef((e,t)=>{const r=Ue(xe,e.__scopeMenu);return o.jsx(Dn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Dn=i.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,disableOutsideScroll:b,...h}=e,v=Ue(xe,r),w=_t(xe,r),y=At(r),x=Ss(r),C=lp(r),[E,N]=i.useState(null),T=i.useRef(null),F=oe(t,T,v.onContentChange),k=i.useRef(0),z=i.useRef(""),H=i.useRef(0),B=i.useRef(null),L=i.useRef("right"),P=i.useRef(0),V=b?Rr:i.Fragment,A=b?{as:ye,allowPinchZoom:!0}:void 0,Y=M=>{var ae,Me;const U=z.current+M,X=C().filter(de=>!de.disabled),ee=document.activeElement,te=(ae=X.find(de=>de.ref.current===ee))==null?void 0:ae.textValue,ne=X.map(de=>de.textValue),se=Pp(ne,U,te),le=(Me=X.find(de=>de.textValue===se))==null?void 0:Me.ref.current;(function de(Pe){z.current=Pe,window.clearTimeout(k.current),Pe!==""&&(k.current=window.setTimeout(()=>de(""),1e3))})(U),le&&setTimeout(()=>le.focus())};i.useEffect(()=>()=>window.clearTimeout(k.current),[]),na();const D=i.useCallback(M=>{var X,ee;return L.current===((X=B.current)==null?void 0:X.side)&&_p(M,(ee=B.current)==null?void 0:ee.area)},[]);return o.jsx(hp,{scope:r,searchRef:z,onItemEnter:i.useCallback(M=>{D(M)&&M.preventDefault()},[D]),onItemLeave:i.useCallback(M=>{var U;D(M)||((U=T.current)==null||U.focus(),N(null))},[D]),onTriggerLeave:i.useCallback(M=>{D(M)&&M.preventDefault()},[D]),pointerGraceTimerRef:H,onPointerGraceIntentChange:i.useCallback(M=>{B.current=M},[]),children:o.jsx(V,{...A,children:o.jsx(Hr,{asChild:!0,trapped:a,onMountAutoFocus:$(s,M=>{var U;M.preventDefault(),(U=T.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:o.jsx(yt,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:g,onDismiss:m,children:o.jsx(np,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:N,onEntryFocus:$(u,M=>{w.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(hs,{role:"menu","aria-orientation":"vertical","data-state":Ys(v.open),"data-radix-menu-content":"",dir:w.dir,...y,...h,ref:F,style:{outline:"none",...h.style},onKeyDown:$(h.onKeyDown,M=>{const X=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ee=M.ctrlKey||M.altKey||M.metaKey,te=M.key.length===1;X&&(M.key==="Tab"&&M.preventDefault(),!ee&&te&&Y(M.key));const ne=T.current;if(M.target!==ne||!sp.includes(M.key))return;M.preventDefault();const le=C().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Cs.includes(M.key)&&le.reverse(),Tp(le)}),onBlur:$(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(k.current),z.current="")}),onPointerMove:$(e.onPointerMove,Ot(M=>{const U=M.target,X=P.current!==M.clientX;if(M.currentTarget.contains(U)&&X){const ee=M.clientX>P.current?"right":"left";L.current=ee,P.current=M.clientX}}))})})})})})})});As.displayName=xe;var mp="MenuGroup",On=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(R.div,{role:"group",...n,ref:t})});On.displayName=mp;var bp="MenuLabel",_s=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(R.div,{...n,ref:t})});_s.displayName=bp;var pr="MenuItem",Ds="menu.itemSelect",hr=i.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,s=i.useRef(null),c=_t(pr,e.__scopeMenu),l=_n(pr,e.__scopeMenu),u=oe(t,s),d=i.useRef(!1),f=()=>{const p=s.current;if(!r&&p){const g=new CustomEvent(Ds,{bubbles:!0,cancelable:!0});p.addEventListener(Ds,m=>n==null?void 0:n(m),{once:!0}),Wr(p,g),g.defaultPrevented?d.current=!1:c.onClose()}};return o.jsx(Os,{...a,ref:u,disabled:r,onClick:$(e.onClick,f),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),d.current=!0},onPointerUp:$(e.onPointerUp,p=>{var g;d.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:$(e.onKeyDown,p=>{const g=l.searchRef.current!=="";r||g&&p.key===" "||Mn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});hr.displayName=pr;var Os=i.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...s}=e,c=_n(pr,r),l=Ss(r),u=i.useRef(null),d=oe(t,u),[f,p]=i.useState(!1),[g,m]=i.useState("");return i.useEffect(()=>{const b=u.current;b&&m((b.textContent??"").trim())},[s.children]),o.jsx(Pt.ItemSlot,{scope:r,disabled:n,textValue:a??g,children:o.jsx(op,{asChild:!0,...l,focusable:!n,children:o.jsx(R.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:d,onPointerMove:$(e.onPointerMove,Ot(b=>{n?c.onItemLeave(b):(c.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,Ot(b=>c.onItemLeave(b))),onFocus:$(e.onFocus,()=>p(!0)),onBlur:$(e.onBlur,()=>p(!1))})})})}),wp="MenuCheckboxItem",Is=i.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return o.jsx(zs,{scope:e.__scopeMenu,checked:r,children:o.jsx(hr,{role:"menuitemcheckbox","aria-checked":gr(r)?"mixed":r,...a,ref:t,"data-state":Ln(r),onSelect:$(a.onSelect,()=>n==null?void 0:n(gr(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Is.displayName=wp;var ks="MenuRadioGroup",[yp,xp]=Ze(ks,{value:void 0,onValueChange:()=>{}}),Ls=i.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,s=fe(n);return o.jsx(yp,{scope:e.__scopeMenu,value:r,onValueChange:s,children:o.jsx(On,{...a,ref:t})})});Ls.displayName=ks;var Fs="MenuRadioItem",$s=i.forwardRef((e,t)=>{const{value:r,...n}=e,a=xp(Fs,e.__scopeMenu),s=r===a.value;return o.jsx(zs,{scope:e.__scopeMenu,checked:s,children:o.jsx(hr,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":Ln(s),onSelect:$(n.onSelect,()=>{var c;return(c=a.onValueChange)==null?void 0:c.call(a,r)},{checkForDefaultPrevented:!1})})})});$s.displayName=Fs;var In="MenuItemIndicator",[zs,Cp]=Ze(In,{checked:!1}),Bs=i.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,s=Cp(In,r);return o.jsx(Ce,{present:n||gr(s.checked)||s.checked===!0,children:o.jsx(R.span,{...a,ref:t,"data-state":Ln(s.checked)})})});Bs.displayName=In;var Np="MenuSeparator",Ws=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return o.jsx(R.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ws.displayName=Np;var Sp="MenuArrow",Vs=i.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=At(r);return o.jsx(gs,{...a,...n,ref:t})});Vs.displayName=Sp;var kn="MenuSub",[Ep,Gs]=Ze(kn),js=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,s=Ue(kn,t),c=At(t),[l,u]=i.useState(null),[d,f]=i.useState(null),p=fe(a);return i.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),o.jsx(Sn,{...c,children:o.jsx(Es,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:o.jsx(Ep,{scope:t,contentId:ke(),triggerId:ke(),trigger:l,onTriggerChange:u,children:r})})})};js.displayName=kn;var Dt="MenuSubTrigger",Hs=i.forwardRef((e,t)=>{const r=Ue(Dt,e.__scopeMenu),n=_t(Dt,e.__scopeMenu),a=Gs(Dt,e.__scopeMenu),s=_n(Dt,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>f,[f]),i.useEffect(()=>{const p=l.current;return()=>{window.clearTimeout(p),u(null)}},[l,u]),o.jsx(Pn,{asChild:!0,...d,children:o.jsx(Os,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Ys(r.open),...e,ref:Bt(t,a.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:$(e.onPointerMove,Ot(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:$(e.onPointerLeave,Ot(p=>{var m,b;f();const g=(m=r.content)==null?void 0:m.getBoundingClientRect();if(g){const h=(b=r.content)==null?void 0:b.dataset.side,v=h==="right",w=v?-5:5,y=g[v?"left":"right"],x=g[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:y,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:y,y:g.bottom}],side:h}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:$(e.onKeyDown,p=>{var m;const g=s.searchRef.current!=="";e.disabled||g&&p.key===" "||ip[n.dir].includes(p.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),p.preventDefault())})})})});Hs.displayName=Dt;var Us="MenuSubContent",Ks=i.forwardRef((e,t)=>{const r=Ms(xe,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,s=Ue(xe,e.__scopeMenu),c=_t(xe,e.__scopeMenu),l=Gs(Us,e.__scopeMenu),u=i.useRef(null),d=oe(t,u);return o.jsx(Pt.Provider,{scope:e.__scopeMenu,children:o.jsx(Ce,{present:n||s.open,children:o.jsx(Pt.Slot,{scope:e.__scopeMenu,children:o.jsx(Dn,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;c.isUsingKeyboardRef.current&&((p=u.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:$(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:$(e.onEscapeKeyDown,f=>{c.onClose(),f.preventDefault()}),onKeyDown:$(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),g=cp[c.dir].includes(f.key);p&&g&&(s.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});Ks.displayName=Us;function Ys(e){return e?"open":"closed"}function gr(e){return e==="indeterminate"}function Ln(e){return gr(e)?"indeterminate":e?"checked":"unchecked"}function Tp(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Mp(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Pp(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let c=Mp(e,Math.max(s,0));a.length===1&&(c=c.filter(d=>d!==r));const u=c.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return u!==r?u:void 0}function Ap(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s].x,u=t[s].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(a=!a)}return a}function _p(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return Ap(r,t)}function Ot(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Dp=Ts,Op=Pn,Ip=Ps,kp=As,Lp=On,Fp=_s,$p=hr,zp=Is,Bp=Ls,Wp=$s,Vp=Bs,Gp=Ws,jp=Vs,Hp=js,Up=Hs,Kp=Ks,Fn="DropdownMenu",[Yp,av]=Be(Fn,[Ns]),pe=Ns(),[qp,qs]=Yp(Fn),Xs=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=pe(t),d=i.useRef(null),[f=!1,p]=st({prop:a,defaultProp:s,onChange:c});return o.jsx(qp,{scope:t,triggerId:ke(),triggerRef:d,contentId:ke(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(g=>!g),[p]),modal:l,children:o.jsx(Dp,{...u,open:f,onOpenChange:p,dir:n,modal:l,children:r})})};Xs.displayName=Fn;var Rs="DropdownMenuTrigger",Qs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,s=qs(Rs,r),c=pe(r);return o.jsx(Op,{asChild:!0,...c,children:o.jsx(R.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:Bt(t,s.triggerRef),onPointerDown:$(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:$(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Qs.displayName=Rs;var Xp="DropdownMenuPortal",Zs=e=>{const{__scopeDropdownMenu:t,...r}=e,n=pe(t);return o.jsx(Ip,{...n,...r})};Zs.displayName=Xp;var Js="DropdownMenuContent",ei=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=qs(Js,r),s=pe(r),c=i.useRef(!1);return o.jsx(kp,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...n,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,l=>{var u;c.current||(u=a.triggerRef.current)==null||u.focus(),c.current=!1,l.preventDefault()}),onInteractOutside:$(e.onInteractOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!a.modal||f)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ei.displayName=Js;var Rp="DropdownMenuGroup",ti=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Lp,{...a,...n,ref:t})});ti.displayName=Rp;var Qp="DropdownMenuLabel",ri=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Fp,{...a,...n,ref:t})});ri.displayName=Qp;var Zp="DropdownMenuItem",ni=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx($p,{...a,...n,ref:t})});ni.displayName=Zp;var Jp="DropdownMenuCheckboxItem",oi=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(zp,{...a,...n,ref:t})});oi.displayName=Jp;var eh="DropdownMenuRadioGroup",ai=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Bp,{...a,...n,ref:t})});ai.displayName=eh;var th="DropdownMenuRadioItem",si=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Wp,{...a,...n,ref:t})});si.displayName=th;var rh="DropdownMenuItemIndicator",ii=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Vp,{...a,...n,ref:t})});ii.displayName=rh;var nh="DropdownMenuSeparator",ci=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Gp,{...a,...n,ref:t})});ci.displayName=nh;var oh="DropdownMenuArrow",ah=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(jp,{...a,...n,ref:t})});ah.displayName=oh;var sh=e=>{const{__scopeDropdownMenu:t,children:r,open:n,onOpenChange:a,defaultOpen:s}=e,c=pe(t),[l=!1,u]=st({prop:n,defaultProp:s,onChange:a});return o.jsx(Hp,{...c,open:l,onOpenChange:u,children:r})},ih="DropdownMenuSubTrigger",li=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Up,{...a,...n,ref:t})});li.displayName=ih;var ch="DropdownMenuSubContent",di=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=pe(r);return o.jsx(Kp,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});di.displayName=ch;var lh=Xs,dh=Qs,ui=Zs,fi=ei,uh=ti,pi=ri,hi=ni,gi=oi,fh=ai,vi=si,mi=ii,bi=ci,ph=sh,wi=li,yi=di;const hh=lh,gh=dh,vh=uh,mh=ui,bh=ph,wh=fh,xi=i.forwardRef(({className:e,inset:t,children:r,...n},a)=>o.jsxs(wi,{ref:a,className:_("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,o.jsx(ul,{className:"ml-auto"})]}));xi.displayName=wi.displayName;const Ci=i.forwardRef(({className:e,...t},r)=>o.jsx(yi,{ref:r,className:_("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Ci.displayName=yi.displayName;const Ni=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(ui,{children:o.jsx(fi,{ref:n,sideOffset:t,className:_("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));Ni.displayName=fi.displayName;const Si=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(hi,{ref:n,className:_("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));Si.displayName=hi.displayName;const Ei=i.forwardRef(({className:e,children:t,checked:r,...n},a)=>o.jsxs(gi,{ref:a,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(mi,{children:o.jsx(Dr,{className:"h-4 w-4"})})}),t]}));Ei.displayName=gi.displayName;const Ti=i.forwardRef(({className:e,children:t,...r},n)=>o.jsxs(vi,{ref:n,className:_("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(mi,{children:o.jsx(pl,{className:"h-2 w-2 fill-current"})})}),t]}));Ti.displayName=vi.displayName;const Mi=i.forwardRef(({className:e,inset:t,...r},n)=>o.jsx(pi,{ref:n,className:_("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Mi.displayName=pi.displayName;const Pi=i.forwardRef(({className:e,...t},r)=>o.jsx(bi,{ref:r,className:_("-mx-1 my-1 h-px bg-muted",e),...t}));Pi.displayName=bi.displayName;const Ai=({className:e,...t})=>o.jsx("span",{className:_("ml-auto text-xs tracking-widest opacity-60",e),...t});Ai.displayName="DropdownMenuShortcut";const _i=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Di=Io,It=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Di(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:s}=t,c=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=s==null?void 0:s[d];if(f===null)return null;const g=_i(f)||_i(p);return a[d][g]}),l=r&&Object.entries(r).reduce((d,f)=>{let[p,g]=f;return g===void 0||(d[p]=g),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,f)=>{let{class:p,className:g,...m}=f;return Object.entries(m).every(b=>{let[h,v]=b;return Array.isArray(v)?v.includes({...s,...l}[h]):{...s,...l}[h]===v})?[...d,p,g]:d},[]);return Di(e,c,u,r==null?void 0:r.class,r==null?void 0:r.className)},$n=It("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 cursor-pointer",{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"}}),ce=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:a,onClick:s,...c},l)=>{const u=n?ye:"button";if(!a)return o.jsx(u,{className:_($n({variant:t,size:r,className:e})),ref:l,onClick:s,...c});s&&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:p,confirmText:g="Confirm",cancelText:m="Cancel"}=a,b=()=>{p()};return o.jsxs(Ct,{children:[o.jsx(nn,{asChild:!0,children:o.jsx(u,{className:_($n({variant:t,size:r,className:e})),ref:l,...c})}),o.jsxs(Nt,{children:[o.jsxs(er,{children:[o.jsx(tr,{children:d}),o.jsx(cn,{children:f})]}),o.jsxs(sn,{className:"flex justify-end gap-2 pt-4",children:[o.jsx(on,{asChild:!0,children:o.jsx(ce,{variant:"outline",children:m})}),o.jsx(on,{asChild:!0,children:o.jsx(ce,{onClick:b,children:g})})]})]})]})});ce.displayName="Button";var yh="VisuallyHidden",vr=i.forwardRef((e,t)=>o.jsx(R.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}}));vr.displayName=yh;var xh=vr,[mr,sv]=Be("Tooltip",[ur]),br=ur(),Oi="TooltipProvider",Ch=700,zn="tooltip.open",[Nh,Bn]=mr(Oi),Ii=e=>{const{__scopeTooltip:t,delayDuration:r=Ch,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=e,[c,l]=i.useState(!0),u=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),o.jsx(Nh,{scope:t,isOpenDelayed:c,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:a,children:s})};Ii.displayName=Oi;var wr="Tooltip",[Sh,kt]=mr(wr),ki=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a=!1,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=Bn(wr,e.__scopeTooltip),d=br(t),[f,p]=i.useState(null),g=ke(),m=i.useRef(0),b=c??u.disableHoverableContent,h=l??u.delayDuration,v=i.useRef(!1),[w=!1,y]=st({prop:n,defaultProp:a,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),s==null||s(T)}}),x=i.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),N=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,y(!0),m.current=0},h)},[h,y]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),o.jsx(Sn,{...d,children:o.jsx(Sh,{scope:t,contentId:g,open:w,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{u.isOpenDelayed?N():C()},[u.isOpenDelayed,N,C]),onTriggerLeave:i.useCallback(()=>{b?E():(window.clearTimeout(m.current),m.current=0)},[E,b]),onOpen:C,onClose:E,disableHoverableContent:b,children:r})})};ki.displayName=wr;var Wn="TooltipTrigger",Li=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=kt(Wn,r),s=Bn(Wn,r),c=br(r),l=i.useRef(null),u=oe(t,l,a.onTriggerChange),d=i.useRef(!1),f=i.useRef(!1),p=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),o.jsx(ps,{asChild:!0,...c,children:o.jsx(R.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:$(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:$(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:$(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:$(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:$(e.onBlur,a.onClose),onClick:$(e.onClick,a.onClose)})})});Li.displayName=Wn;var Vn="TooltipPortal",[Eh,Th]=mr(Vn,{forceMount:void 0}),Fi=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,s=kt(Vn,t);return o.jsx(Eh,{scope:t,forceMount:r,children:o.jsx(Ce,{present:r||s.open,children:o.jsx(xt,{asChild:!0,container:a,children:n})})})};Fi.displayName=Vn;var gt="TooltipContent",$i=i.forwardRef((e,t)=>{const r=Th(gt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=e,c=kt(gt,e.__scopeTooltip);return o.jsx(Ce,{present:n||c.open,children:c.disableHoverableContent?o.jsx(zi,{side:a,...s,ref:t}):o.jsx(Mh,{side:a,...s,ref:t})})}),Mh=i.forwardRef((e,t)=>{const r=kt(gt,e.__scopeTooltip),n=Bn(gt,e.__scopeTooltip),a=i.useRef(null),s=oe(t,a),[c,l]=i.useState(null),{trigger:u,onClose:d}=r,f=a.current,{onPointerInTransitChange:p}=n,g=i.useCallback(()=>{l(null),p(!1)},[p]),m=i.useCallback((b,h)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Dh(w,v.getBoundingClientRect()),x=Oh(w,y),C=Ih(h.getBoundingClientRect()),E=Lh([...x,...C]);l(E),p(!0)},[p]);return i.useEffect(()=>()=>g(),[g]),i.useEffect(()=>{if(u&&f){const b=v=>m(v,f),h=v=>m(v,u);return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",h)}}},[u,f,m,g]),i.useEffect(()=>{if(c){const b=h=>{const v=h.target,w={x:h.clientX,y:h.clientY},y=(u==null?void 0:u.contains(v))||(f==null?void 0:f.contains(v)),x=!kh(w,c);y?g():x&&(g(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,c,d,g]),o.jsx(zi,{...e,ref:s})}),[Ph,Ah]=mr(wr,{isInside:!1}),zi=i.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=kt(gt,r),d=br(r),{onClose:f}=u;return i.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),i.useEffect(()=>{if(u.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),o.jsx(yt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:o.jsxs(hs,{"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:[o.jsx(Ko,{children:n}),o.jsx(Ph,{scope:r,isInside:!0,children:o.jsx(xh,{id:u.contentId,role:"tooltip",children:a||n})})]})})});$i.displayName=gt;var Bi="TooltipArrow",_h=i.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=br(r);return Ah(Bi,r).isInside?null:o.jsx(gs,{...a,...n,ref:t})});_h.displayName=Bi;function Dh(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Oh(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 Ih(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function kh(e,t){const{x:r,y:n}=e;let a=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const l=t[s].x,u=t[s].y,d=t[c].x,f=t[c].y;u>n!=f>n&&r<(d-l)*(n-u)/(f-u)+l&&(a=!a)}return a}function Lh(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),Fh(t)}function Fh(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(a.y-c.y)>=(s.y-c.y)*(a.x-c.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(a.y-c.y)>=(s.y-c.y)*(a.x-c.x))r.pop();else break}r.push(a)}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 $h=Ii,zh=ki,Bh=Li,Wh=Fi,Wi=$i;const vt=$h,mt=zh,bt=Bh,Je=i.forwardRef(({className:e,sideOffset:t=4,...r},n)=>o.jsx(Wh,{children:o.jsx(Wi,{ref:n,sideOffset:t,className:_("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})}));Je.displayName=Wi.displayName;const yr=i.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:a,...s},c)=>{const[l,u]=i.useState(!1),d=i.useRef(null),p=a||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),g=()=>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 b=h=>{if(r){const v=h.target.value;let w=v;if(v.length>0){const y=v[v.length-1];/[^a-zA-Z0-9]/.test(y)&&(console.log("Non-alphanumeric detected:",y),m())}if(r==="phone"){const y=v.replace(/\D/g,"");y.length<=3?w=y:y.length<=6?w=`(${y.slice(0,3)}) ${y.slice(3)}`:w=`(${y.slice(0,3)}) ${y.slice(3,6)}-${y.slice(6,10)}`}else if(r==="postal-code-ca"){const y=v.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let C=0;C<Math.min(y.length,6);C++){const E=y[C];C===0||C===2||C===4?/[A-Z]/.test(E)&&(x+=E):(C===1||C===3||C===5)&&/[0-9]/.test(E)&&(x+=E)}x.length<=3?w=x:w=`${x.slice(0,3)} ${x.slice(3,6)}`}else if(r==="zip-code-us"){const y=v.replace(/\D/g,"");y.length<=5?w=y:w=`${y.slice(0,5)}-${y.slice(5,9)}`}h.target.value=w}n==null||n(h)};return o.jsx(vt,{children:o.jsxs(mt,{open:l&&!!r,children:[o.jsx(bt,{asChild:!0,children:o.jsx("input",{type:t,className:_("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:b,placeholder:p,ref:c,...s})}),o.jsx(Je,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:g()})]})})});yr.displayName="Input";var Vh="Separator",Vi="horizontal",Gh=["horizontal","vertical"],Gi=i.forwardRef((e,t)=>{const{decorative:r,orientation:n=Vi,...a}=e,s=jh(n)?n:Vi,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return o.jsx(R.div,{"data-orientation":s,...l,...a,ref:t})});Gi.displayName=Vh;function jh(e){return Gh.includes(e)}var ji=Gi;const Gn=i.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>o.jsx(ji,{ref:a,decorative:r,orientation:t,className:_("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Gn.displayName=ji.displayName;const Hi=rn,Hh=La,Uh=Jt,Ui=Fa,jn=i.forwardRef(({className:e,...t},r)=>o.jsx(Xt,{className:_("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}));jn.displayName=Xt.displayName;const Kh=It("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"}}),Hn=i.forwardRef(({side:e="right",className:t,children:r,...n},a)=>o.jsxs(Ui,{children:[o.jsx(jn,{}),o.jsxs(Rt,{ref:a,className:_(Kh({side:e}),t),...n,children:[o.jsxs(Jt,{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:[o.jsx(Or,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));Hn.displayName=Rt.displayName;const Ki=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ki.displayName="SheetHeader";const Yi=({className:e,...t})=>o.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yi.displayName="SheetFooter";const qi=i.forwardRef(({className:e,...t},r)=>o.jsx(Qt,{ref:r,className:_("text-lg font-semibold text-foreground",e),...t}));qi.displayName=Qt.displayName;const Xi=i.forwardRef(({className:e,...t},r)=>o.jsx(Zt,{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Xi.displayName=Zt.displayName;function Yh({onClick:e,publicName:t,applicationName:r,partnerId:n}){const a=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,c]=q.useState(!1),l=()=>{c(!0)};return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?o.jsx(ce,{asChild:!0,size:"icon",onClick:e,children:o.jsx(Tl,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):o.jsx(ce,{asChild:!0,size:"icon",onClick:e,children:o.jsx("img",{src:a,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:l})})}),o.jsxs("div",{className:"flex flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),o.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var qh="Label",Ri=i.forwardRef((e,t)=>o.jsx(R.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ri.displayName=qh;var Xh=Ri;function Rh({className:e,...t}){return o.jsx(Xh,{"data-slot":"label",className:_("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 Un=1024;function Qi(){const[e,t]=i.useState(void 0);return i.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Un-1}px)`),n=()=>{t(window.innerWidth<Un)};return r.addEventListener("change",n),t(window.innerWidth<Un),()=>r.removeEventListener("change",n)},[]),!!e}function J({className:e,...t}){return o.jsx("div",{className:_("animate-pulse rounded-md bg-primary/20",e),...t})}const Qh="sidebar:state",Zh=60*60*24*7,Jh="16rem",eg="18rem",tg="3rem",rg="b",Zi=i.createContext(null);function Lt(){const e=i.useContext(Zi);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Kn=i.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:s,...c},l)=>{const u=Qi(),[d,f]=i.useState(!1),[p,g]=i.useState(e),m=t??p,b=i.useCallback(y=>{const x=typeof y=="function"?y(m):y;r?r(x):g(x),document.cookie=`${Qh}=${x}; path=/; max-age=${Zh}`},[r,m]),h=i.useCallback(()=>u?f(y=>!y):b(y=>!y),[u,b,f]);i.useEffect(()=>{const y=x=>{x.key===rg&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),h())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[h]);const v=m?"expanded":"collapsed",w=i.useMemo(()=>({state:v,open:m,setOpen:b,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:h}),[v,m,b,u,d,f,h]);return o.jsx(Zi.Provider,{value:w,children:o.jsx(vt,{delayDuration:0,children:o.jsx("div",{style:{"--sidebar-width":Jh,"--sidebar-width-icon":tg,...a},className:_("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",n),ref:l,...c,children:s})})})});Kn.displayName="SidebarProvider";const Yn=i.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...s},c)=>{const{isMobile:l,state:u,openMobile:d,setOpenMobile:f}=Lt();return r==="none"?o.jsx("div",{className:_("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:c,...s,children:a}):l?o.jsx(Hi,{open:d,onOpenChange:f,...s,children:o.jsx(Hn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":eg},side:e,children:o.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):o.jsxs("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[o.jsx("div",{className:_("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)")}),o.jsx("div",{className:_("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),...s,children:o.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:a})})]})});Yn.displayName="Sidebar";const qn=i.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=Lt();return o.jsxs(ce,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_("h-7 w-7 text-sidebar-foreground",e),onClick:s=>{t==null||t(s),a()},...r,children:[o.jsx(yl,{}),o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});qn.displayName="SidebarTrigger";const Ji=i.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=Lt();return o.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:_("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})});Ji.displayName="SidebarRail";const ec=i.forwardRef(({className:e,...t},r)=>o.jsx("main",{ref:r,className:_("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}));ec.displayName="SidebarInset";const tc=i.forwardRef(({className:e,...t},r)=>o.jsx(yr,{ref:r,"data-sidebar":"input",className:_("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));tc.displayName="SidebarInput";const Xn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"header",className:_("flex flex-col gap-2 p-2",e),...t}));Xn.displayName="SidebarHeader";const Rn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"footer",className:_("flex flex-col gap-2 p-2",e),...t}));Rn.displayName="SidebarFooter";const rc=i.forwardRef(({className:e,...t},r)=>o.jsx(Gn,{ref:r,"data-sidebar":"separator",className:_("mx-2 w-auto bg-sidebar-border",e),...t}));rc.displayName="SidebarSeparator";const Qn=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"content",className:_("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Qn.displayName="SidebarContent";const nc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group",className:_("relative flex w-full min-w-0 flex-col p-2",e),...t}));nc.displayName="SidebarGroup";const oc=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?ye:"div";return o.jsx(a,{ref:n,"data-sidebar":"group-label",className:_("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})});oc.displayName="SidebarGroupLabel";const ac=i.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?ye:"button";return o.jsx(a,{ref:n,"data-sidebar":"group-action",className:_("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})});ac.displayName="SidebarGroupAction";const sc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"group-content",className:_("w-full text-sm",e),...t}));sc.displayName="SidebarGroupContent";const Zn=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu",className:_("flex w-full min-w-0 flex-col gap-1",e),...t}));Zn.displayName="SidebarMenu";const Jn=i.forwardRef(({className:e,...t},r)=>o.jsx("li",{ref:r,"data-sidebar":"menu-item",className:_("group/menu-item relative",e),...t}));Jn.displayName="SidebarMenuItem";const ng=It("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"}}),eo=i.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:s,...c},l)=>{const u=e?ye:"button",{isMobile:d,state:f}=Lt(),p=o.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:_(ng({variant:r,size:n}),s),...c});return a?(typeof a=="string"&&(a={children:a}),o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:p}),o.jsx(Je,{side:"right",align:"center",hidden:f!=="collapsed"||d,...a})]})):p});eo.displayName="SidebarMenuButton";const ic=i.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const s=t?ye:"button";return o.jsx(s,{ref:a,"data-sidebar":"menu-action",className:_("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})});ic.displayName="SidebarMenuAction";const cc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:_("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}));cc.displayName="SidebarMenuBadge";const lc=i.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return o.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:_("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&o.jsx(J,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o.jsx(J,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});lc.displayName="SidebarMenuSkeleton";const dc=i.forwardRef(({className:e,...t},r)=>o.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:_("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}));dc.displayName="SidebarMenuSub";const uc=i.forwardRef(({...e},t)=>o.jsx("li",{ref:t,...e}));uc.displayName="SidebarMenuSubItem";const fc=i.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},s)=>{const c=e?ye:"a";return o.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:_("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),...a})});fc.displayName="SidebarMenuSubButton";var to="ToastProvider",[ro,og,ag]=ln("Toast"),[pc,iv]=Be("Toast",[ag]),[sg,xr]=pc(to),hc=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:s=50,children:c}=e,[l,u]=i.useState(null),[d,f]=i.useState(0),p=i.useRef(!1),g=i.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${to}\`. Expected non-empty \`string\`.`),o.jsx(ro.Provider,{scope:t,children:o.jsx(sg,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:s,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i.useCallback(()=>f(m=>m+1),[]),onToastRemove:i.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:g,children:c})})};hc.displayName=to;var gc="ToastViewport",ig=["F8"],no="toast.viewportPause",oo="toast.viewportResume",vc=i.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=ig,label:a="Notifications ({hotkey})",...s}=e,c=xr(gc,r),l=og(r),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),p=i.useRef(null),g=oe(t,p,c.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=c.toastCount>0;i.useEffect(()=>{const v=w=>{var x;n.length!==0&&n.every(C=>w[C]||w.code===C)&&((x=p.current)==null||x.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),i.useEffect(()=>{const v=u.current,w=p.current;if(b&&v&&w){const y=()=>{if(!c.isClosePausedRef.current){const N=new CustomEvent(no);w.dispatchEvent(N),c.isClosePausedRef.current=!0}},x=()=>{if(c.isClosePausedRef.current){const N=new CustomEvent(oo);w.dispatchEvent(N),c.isClosePausedRef.current=!1}},C=N=>{!v.contains(N.relatedTarget)&&x()},E=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",y),v.addEventListener("focusout",C),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",C),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[b,c.isClosePausedRef]);const h=i.useCallback(({tabbingDirection:v})=>{const y=l().map(x=>{const C=x.ref.current,E=[C,...yg(C)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?y.reverse():y).flat()},[l]);return i.useEffect(()=>{const v=p.current;if(v){const w=y=>{var E,N,T;const x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){const F=document.activeElement,k=y.shiftKey;if(y.target===v&&k){(E=d.current)==null||E.focus();return}const B=h({tabbingDirection:k?"backwards":"forwards"}),L=B.findIndex(P=>P===F);io(B.slice(L+1))?y.preventDefault():k?(N=d.current)==null||N.focus():(T=f.current)==null||T.focus()}};return v.addEventListener("keydown",w),()=>v.removeEventListener("keydown",w)}},[l,h]),o.jsxs(kd,{ref:u,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&o.jsx(ao,{ref:d,onFocusFromOutsideViewport:()=>{const v=h({tabbingDirection:"forwards"});io(v)}}),o.jsx(ro.Slot,{scope:r,children:o.jsx(R.ol,{tabIndex:-1,...s,ref:g})}),b&&o.jsx(ao,{ref:f,onFocusFromOutsideViewport:()=>{const v=h({tabbingDirection:"backwards"});io(v)}})]})});vc.displayName=gc;var mc="ToastFocusProxy",ao=i.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,s=xr(mc,r);return o.jsx(vr,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:c=>{var d;const l=c.relatedTarget;!((d=s.viewport)!=null&&d.contains(l))&&n()}})});ao.displayName=mc;var Cr="Toast",cg="toast.swipeStart",lg="toast.swipeMove",dg="toast.swipeCancel",ug="toast.swipeEnd",bc=i.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:s,...c}=e,[l=!0,u]=st({prop:n,defaultProp:a,onChange:s});return o.jsx(Ce,{present:r||l,children:o.jsx(hg,{open:l,...c,ref:t,onClose:()=>u(!1),onPause:fe(e.onPause),onResume:fe(e.onResume),onSwipeStart:$(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:$(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:$(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:$(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});bc.displayName=Cr;var[fg,pg]=pc(Cr,{onClose(){}}),hg=i.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:s,onClose:c,onEscapeKeyDown:l,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:g,onSwipeEnd:m,...b}=e,h=xr(Cr,r),[v,w]=i.useState(null),y=oe(t,P=>w(P)),x=i.useRef(null),C=i.useRef(null),E=a||h.duration,N=i.useRef(0),T=i.useRef(E),F=i.useRef(0),{onToastAdd:k,onToastRemove:z}=h,H=fe(()=>{var V;(v==null?void 0:v.contains(document.activeElement))&&((V=h.viewport)==null||V.focus()),c()}),B=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(F.current),N.current=new Date().getTime(),F.current=window.setTimeout(H,P))},[H]);i.useEffect(()=>{const P=h.viewport;if(P){const V=()=>{B(T.current),d==null||d()},A=()=>{const Y=new Date().getTime()-N.current;T.current=T.current-Y,window.clearTimeout(F.current),u==null||u()};return P.addEventListener(no,A),P.addEventListener(oo,V),()=>{P.removeEventListener(no,A),P.removeEventListener(oo,V)}}},[h.viewport,E,u,d,B]),i.useEffect(()=>{s&&!h.isClosePausedRef.current&&B(E)},[s,E,h.isClosePausedRef,B]),i.useEffect(()=>(k(),()=>z()),[k,z]);const L=i.useMemo(()=>v?Ec(v):null,[v]);return h.viewport?o.jsxs(o.Fragment,{children:[L&&o.jsx(gg,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:L}),o.jsx(fg,{scope:r,onClose:H,children:_r.createPortal(o.jsx(ro.ItemSlot,{scope:r,children:o.jsx(Id,{asChild:!0,onEscapeKeyDown:$(l,()=>{h.isFocusedToastEscapeKeyDownRef.current||H(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(R.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":h.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:$(e.onKeyDown,P=>{P.key==="Escape"&&(l==null||l(P.nativeEvent),P.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:$(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:$(e.onPointerMove,P=>{if(!x.current)return;const V=P.clientX-x.current.x,A=P.clientY-x.current.y,Y=!!C.current,D=["left","right"].includes(h.swipeDirection),M=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,U=D?M(0,V):0,X=D?0:M(0,A),ee=P.pointerType==="touch"?10:2,te={x:U,y:X},ne={originalEvent:P,delta:te};Y?(C.current=te,Nr(lg,p,ne,{discrete:!1})):Tc(te,h.swipeDirection,ee)?(C.current=te,Nr(cg,f,ne,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(V)>ee||Math.abs(A)>ee)&&(x.current=null)}),onPointerUp:$(e.onPointerUp,P=>{const V=C.current,A=P.target;if(A.hasPointerCapture(P.pointerId)&&A.releasePointerCapture(P.pointerId),C.current=null,x.current=null,V){const Y=P.currentTarget,D={originalEvent:P,delta:V};Tc(V,h.swipeDirection,h.swipeThreshold)?Nr(ug,m,D,{discrete:!0}):Nr(dg,g,D,{discrete:!0}),Y.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),gg=e=>{const{__scopeToast:t,children:r,...n}=e,a=xr(Cr,t),[s,c]=i.useState(!1),[l,u]=i.useState(!1);return bg(()=>c(!0)),i.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:o.jsx(xt,{asChild:!0,children:o.jsx(vr,{...n,children:s&&o.jsxs(o.Fragment,{children:[a.label," ",r]})})})},vg="ToastTitle",wc=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(R.div,{...n,ref:t})});wc.displayName=vg;var mg="ToastDescription",yc=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return o.jsx(R.div,{...n,ref:t})});yc.displayName=mg;var xc="ToastAction",Cc=i.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?o.jsx(Sc,{altText:r,asChild:!0,children:o.jsx(so,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${xc}\`. Expected non-empty \`string\`.`),null)});Cc.displayName=xc;var Nc="ToastClose",so=i.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=pg(Nc,r);return o.jsx(Sc,{asChild:!0,children:o.jsx(R.button,{type:"button",...n,ref:t,onClick:$(e.onClick,a.onClose)})})});so.displayName=Nc;var Sc=i.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return o.jsx(R.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function Ec(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),wg(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!a)if(s){const c=n.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Ec(n))}}),t}function Nr(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Wr(a,s):a.dispatchEvent(s)}var Tc=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),s=n>a;return t==="left"||t==="right"?s&&n>r:!s&&a>r};function bg(e=()=>{}){const t=fe(e);We(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function wg(e){return e.nodeType===e.ELEMENT_NODE}function yg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function io(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var xg=hc,Mc=vc,Pc=bc,Ac=wc,_c=yc,Dc=Cc,Oc=so;const Ic=xg,co=i.forwardRef(({className:e,...t},r)=>o.jsx(Mc,{ref:r,className:_("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}));co.displayName=Mc.displayName;const Cg=It("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"}}),lo=i.forwardRef(({className:e,variant:t,...r},n)=>o.jsx(Pc,{ref:n,className:_(Cg({variant:t}),e),...r}));lo.displayName=Pc.displayName;const kc=i.forwardRef(({className:e,...t},r)=>o.jsx(Dc,{ref:r,className:_("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}));kc.displayName=Dc.displayName;const uo=i.forwardRef(({className:e,...t},r)=>o.jsx(Oc,{ref:r,className:_("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:o.jsx(Or,{className:"h-4 w-4"})}));uo.displayName=Oc.displayName;const fo=i.forwardRef(({className:e,...t},r)=>o.jsx(Ac,{ref:r,className:_("text-sm font-semibold [&+div]:text-xs",e),...t}));fo.displayName=Ac.displayName;const po=i.forwardRef(({className:e,...t},r)=>o.jsx(_c,{ref:r,className:_("text-sm opacity-90",e),...t}));po.displayName=_c.displayName;const Ng=1,Sg=1e6;let ho=0;function Eg(){return ho=(ho+1)%Number.MAX_SAFE_INTEGER,ho.toString()}const go=new Map,Lc=e=>{if(go.has(e))return;const t=setTimeout(()=>{go.delete(e),Ft({type:"REMOVE_TOAST",toastId:e})},Sg);go.set(e,t)},Tg=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Ng)};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?Lc(r):e.toasts.forEach(n=>Lc(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):[]}}},Sr=[];let Er={toasts:[]};function Ft(e){Er=Tg(Er,e),Sr.forEach(t=>t(Er))}function Fc({...e}){const t=Eg(),r=a=>Ft({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Ft({type:"DISMISS_TOAST",toastId:t});return Ft({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function vo(){const[e,t]=i.useState(Er);return i.useEffect(()=>(Sr.push(t),()=>{const r=Sr.indexOf(t);r>-1&&Sr.splice(r,1)}),[]),{...e,toast:Fc,dismiss:r=>Ft({type:"DISMISS_TOAST",toastId:r})}}function $c(){const{toasts:e}=vo();return o.jsxs(Ic,{children:[e.map(function({id:t,title:r,description:n,action:a,...s}){return o.jsxs(lo,{...s,children:[o.jsxs("div",{className:"grid gap-1",children:[r&&o.jsx(fo,{children:r}),n&&o.jsx(po,{children:n})]}),a,o.jsx(uo,{})]},t)}),o.jsx(co,{})]})}const mo=q.forwardRef(({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n},a)=>{const[s,c]=q.useState(""),l=Ar.useLocation(),{toast:u}=vo();q.useEffect(()=>{const g=new URLSearchParams(l.search).get("q");g&&c(g)},[l.search]);const d=()=>{const p=s.trim();if(!p||p.length<2){u({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(p)},f=p=>{p.key==="Enter"&&d()};return o.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:[o.jsx(qn,{className:"lg:hidden",children:o.jsx(bl,{className:"h-6 w-6"})}),o.jsx("div",{className:"flex flex-1 items-center gap-4",children:o.jsx("div",{className:"relative w-full max-w-sm",children:o.jsxs("div",{children:[o.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:d,"aria-label":"Search",children:o.jsx(Sl,{className:"h-4 w-4 text-muted-foreground"})}),o.jsx(yr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:s,onChange:p=>c(p.target.value),onKeyDown:f,ref:a},"topbar-search")]})})}),r||o.jsx(o.Fragment,{}),e&&o.jsx("div",{className:"flex items-center gap-4",children:o.jsxs(ce,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[o.jsx(ml,{className:"h-4 w-4 text-sidebar-foreground"}),o.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});mo.displayName="Topbar";const zc=It("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border border-input hover:bg-accent hover:text-accent-foreground",success:"bg-green-600 text-white hover:bg-green-700",warning:"bg-yellow-500 text-white hover:bg-yellow-600",info:"bg-blue-500 text-white hover:bg-blue-600",ghost:"bg-background hover:bg-accent hover:text-accent-foreground",randmarRed:"bg-randmar-red text-white hover:bg-randmar-red/80",randmarBlue:"bg-randmar-blue text-white hover:bg-randmar-blue/80",randmarPurple:"bg-randmar-purple text-white hover:bg-randmar-purple/80",randmarGreen:"bg-randmar-green text-black hover:bg-randmar-green/80",randmarBlack:"bg-randmar-black text-white hover:bg-randmar-black/80",randmarYellow:"bg-randmar-yellow text-black hover:bg-randmar-yellow/80"},size:{default:"h-6",sm:"h-5 text-[10px]",lg:"h-7 px-3"}},defaultVariants:{variant:"default",size:"default"}}),Te=i.forwardRef(({className:e,variant:t,size:r,icon:n,children:a,...s},c)=>o.jsxs("div",{ref:c,className:_(zc({variant:t,size:r}),e),...s,children:[n&&o.jsx("span",{className:"mr-1",children:n}),a]}));Te.displayName="Badge";const Tr=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));Tr.displayName="Card";const Bc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("flex flex-col space-y-1.5 p-6",e),...t}));Bc.displayName="CardHeader";const Wc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("font-semibold leading-none tracking-tight",e),...t}));Wc.displayName="CardTitle";const Vc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("text-sm text-muted-foreground",e),...t}));Vc.displayName="CardDescription";const Mr=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("p-6 pt-0",e),...t}));Mr.displayName="CardContent";const Gc=i.forwardRef(({className:e,...t},r)=>o.jsx("div",{ref:r,className:_("flex items-center p-6 pt-0",e),...t}));Gc.displayName="CardFooter";const jc=({countryCode:e,className:t=""})=>{const[r,n]=q.useState(null),[a,s]=q.useState(!1);return q.useEffect(()=>{if(!e)return;const l=`https://purecatamphetamine.github.io/country-flag-icons/3x2/${e.toUpperCase()}.svg`;fetch(l,{method:"HEAD"}).then(u=>{u.ok?(n(l),s(!1)):s(!0)}).catch(()=>{s(!0)})},[e]),a||!r?o.jsx("span",{className:t,children:e}):o.jsx("img",{src:r,alt:`${e} flag`,className:`inline-block ${t}`,style:{width:"24px",height:"auto"}})};function Hc({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=Ar.useParams(),a=e.filter(s=>s.showInNav);return o.jsxs(Yn,{className:"border-r border-sidebar-border",children:[o.jsx(Xn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center justify-center",children:o.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),o.jsx("span",{className:"font-semibold text-lg",children:r})]})}),o.jsx(Qn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:o.jsx(Zn,{children:a.map(s=>{const c=s.icon,l=`/${s.path.replace(":appID",n)}`;return o.jsx(Jn,{children:o.jsx(eo,{asChild:!0,children:o.jsxs(Ar.Link,{to:l,className:"transition-colors hover:bg-muted px-6",children:[c&&o.jsx(c,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]})})},s.key)})})}),o.jsx(Rn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}const Uc=q.forwardRef(({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:a,dashboardTitle:s,onSignOut:c,searchPlaceholder:l},u)=>o.jsx(o.Fragment,{children:o.jsx(Kn,{children:o.jsxs("div",{className:"flex grow",children:[o.jsx(Hc,{routes:r,footer:n,dashboardTitle:s}),o.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[o.jsx(mo,{ref:u,onSignOut:c,rightMenu:t,handleValidSearch:a,searchPlaceholder:l}),o.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),o.jsx($c,{})]})]})})}));Uc.displayName="Layout";const Mg={sm:100,md:200,lg:300,xl:400};function Kc({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[a,s]=i.useState(!1),[c,l]=i.useState(!1),[u,d]=i.useState(!1),[f,p]=i.useState(!1),g=`https://api.randmar.io/Product/${e}/Video`;i.useEffect(()=>{(async()=>{try{const x=await(await fetch(g+"/Exists")).json();l(x)}catch(y){console.error("Error checking for video:",y),l(!1)}})()},[e,g]);async function m(){if(c){p(!0);try{const y=await(await fetch(g)).blob(),x=window.URL.createObjectURL(y),C=document.createElement("a");C.href=x,C.download=`${e||"product"}-video.mp4`,document.body.appendChild(C),C.click(),document.body.removeChild(C),window.URL.revokeObjectURL(x)}catch(w){console.error("Error downloading video:",w)}finally{p(!1)}}}function b(){navigator.clipboard.writeText(g),d(!0),setTimeout(()=>{d(!1)},2e3)}function h(){s(!0)}const v=Mg[t||"xl"];return o.jsxs(o.Fragment,{children:[o.jsx(Ct,{open:a,onOpenChange:s,children:o.jsx(Nt,{className:"max-w-4xl p-0 overflow-hidden",children:n?o.jsxs("div",{className:"flex flex-row",children:[o.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[o.jsx("source",{src:g,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):o.jsxs("div",{className:"w-full relative",children:[o.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[o.jsx("source",{src:g,type:"video/mp4"}),"Your browser does not support the video tag."]}),o.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",onClick:b,children:u?o.jsx(Dr,{className:"h-4 w-4"}):o.jsx(hl,{className:"h-4 w-4"})})}),o.jsx(Je,{children:o.jsx("p",{children:"Copy video link"})})]})}),o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",onClick:m,disabled:f,children:o.jsx(gl,{className:"h-4 w-4"})})}),o.jsx(Je,{children:o.jsx("p",{children:"Download video"})})]})})]})]})})}),o.jsxs("div",{className:"relative w-max h-max",children:[o.jsx("img",{alt:r||`Product ${e}`,className:`rounded-md ${c?"cursor-pointer":""}`,onClick:c?h:void 0,src:`https://api.randmar.io/Product/${e}/Image?width=${v*1.5}&height=${v*1.5}`,width:v,height:v}),c&&o.jsx(vt,{children:o.jsxs(mt,{children:[o.jsx(bt,{asChild:!0,children:o.jsx(ce,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:h,children:o.jsx(xl,{className:"h-4 w-4"})})}),o.jsx(Je,{children:o.jsx("p",{children:"Play video"})})]})})]})]})}function Pg({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((h,v)=>(h.Name||"").localeCompare(v.Name||"")),a=n.filter(h=>h.Country==="US"),s=n.filter(h=>h.Country==="CA"),c=n.filter(h=>r.includes(h.WarehouseId||"")),l=n.filter(h=>t.includes(h.WarehouseId||"")),u=s.filter(h=>!t.includes(h.WarehouseId||"")&&!r.includes(h.WarehouseId||"")),d=h=>h.reduce((v,w)=>v+(w.AvailableQuantity||0),0),f=d(s),p=d(l),g=d(c),m=d(a),b=f+m;return o.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&a.length>0&&o.jsxs("div",{className:"grid grid-cols-2 border-b",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Total"}),o.jsx("span",{children:b})]}),o.jsx("div",{className:"p-3"})]}),s.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"Canada"}),o.jsx("span",{children:f})]}),o.jsx("div",{className:"p-3"})]}),o.jsxs("div",{className:"grid grid-cols-2",children:[o.jsxs("div",{className:"border-r",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"West"}),o.jsx("span",{children:g})]}),c.map((h,v)=>o.jsxs("div",{className:`p-3 text-sm ${v>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:h.Name}),o.jsx("span",{children:h.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:h.PurchaseOrderQuantity||"-"})]})]},`west-${v}`))]}),o.jsxs("div",{children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"East"}),o.jsx("span",{children:p})]}),l.map((h,v)=>o.jsxs("div",{className:`p-3 text-sm ${v>0?"border-t":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:h.Name}),o.jsx("span",{children:h.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:h.PurchaseOrderQuantity||"-"})]})]},`east-${v}`))]})]}),u.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:o.jsx("span",{children:"Other"})}),o.jsx("div",{className:"grid grid-cols-2",children:u.map((h,v)=>o.jsxs("div",{className:`p-3 text-sm border-t ${v%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:h.Name}),o.jsx("span",{children:h.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:h.PurchaseOrderQuantity||"-"})]})]},`other-${v}`))})]})]}),a.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[o.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[o.jsx("span",{children:"United States"}),o.jsx("span",{children:m})]}),o.jsx("div",{className:"p-3"})]}),o.jsx("div",{className:"grid grid-cols-2",children:a.map((h,v)=>o.jsxs("div",{className:`p-3 text-sm border-t ${v%2===0?"border-r":""}`,children:[o.jsxs("div",{className:"flex justify-between font-medium",children:[o.jsx("span",{children:h.Name}),o.jsx("span",{children:h.AvailableQuantity})]}),o.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[o.jsx("span",{children:"Expecting"}),o.jsx("span",{children:h.PurchaseOrderQuantity||"-"})]})]},`usa-${v}`))})]}),e.length===0&&o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function Ag({item:e,addToCart:t=!1,syncToShopify:r=!1,customAction:n=o.jsx(o.Fragment,{}),defaultOpportunityNumber:a="",viewProductAction:s,addToCartAction:c,isAddToCartActionLoading:l=!1,syncToShopifyAction:u,isSyncToShopifyActionLoading:d=!1}){var M,U,X,ee,te,ne,se,le,ae,Me,de,Pe;const[f,p]=q.useState(1),[g,m]=q.useState(null),[b,h]=q.useState(0),[v,w]=q.useState(!1),y=((M=e==null?void 0:e.Distribution)==null?void 0:M.Cost)||0,x=((U=e==null?void 0:e.Distribution)==null?void 0:U.RegularPrice)||0,C=((X=e==null?void 0:e.Distribution)==null?void 0:X.Price)||0,[E,N]=q.useState(null),[T,F]=q.useState(!1);q.useEffect(()=>{const G=async()=>{if(e!=null&&e.ManufacturerId){F(!0);try{const Q=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(Q.ok){const he=await Q.blob();N(URL.createObjectURL(he))}}catch(Q){console.error("Failed to load logo:",Q)}finally{F(!1)}}};e!=null&&e.ManufacturerId&&G()},[e==null?void 0:e.ManufacturerId]),q.useEffect(()=>{var G;if(e&&a){const Q=(G=e.Opportunities)==null?void 0:G.find(he=>he.BidNumber==a);Q&&m(Q)}},[e,a]),q.useEffect(()=>{if(!e)return;const G=g!=null&&g.Price?g.Price:C;h(x>0?Math.round((x-G)/x*100):0)},[e,g,C,x]),q.useEffect(()=>{l||p(1)},[l]);const k=G=>{if(G.Active!==!0)return!1;const Q=new Date().toISOString().split("T")[0];return!(G.EndDate&&G.EndDate<Q||G.StartDate&&G.StartDate>Q)};if(!e)return o.jsx(Tr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(Mr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx(J,{className:"h-7 w-3/4"}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:o.jsx(J,{className:"h-10 w-24 rounded-md"})})]}),o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[o.jsx(J,{className:"h-6 w-20 rounded-full"}),o.jsx(J,{className:"h-6 w-24 rounded-full"}),o.jsx(J,{className:"h-6 w-28 rounded-full"})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[o.jsxs("div",{children:[o.jsx(J,{className:"h-4 w-12 mb-1"}),o.jsx(J,{className:"h-5 w-20"})]}),o.jsxs("div",{children:[o.jsx(J,{className:"h-4 w-12 mb-1"}),o.jsx(J,{className:"h-5 w-24"})]}),o.jsxs("div",{children:[o.jsx(J,{className:"h-4 w-20 mb-1"}),o.jsx(J,{className:"h-5 w-16"})]}),o.jsxs("div",{children:[o.jsx(J,{className:"h-4 w-12 mb-1"}),o.jsx(J,{className:"h-5 w-20"})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx("div",{className:"w-60 h-40",children:o.jsx(J,{className:"w-full h-full rounded-lg"})})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:o.jsxs("div",{className:"w-full",children:[o.jsx(J,{className:"h-4 w-24 mb-3"}),o.jsx(J,{className:"h-16 w-full rounded-md"})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx(J,{className:"h-10 w-32 rounded-md"}),o.jsx(J,{className:"h-5 w-24 mt-4"})]})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[o.jsx(J,{className:"h-8 w-32"}),o.jsx(J,{className:"h-6 w-24"})]}),o.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[o.jsx(J,{className:"h-10 w-24 rounded-md"}),o.jsx(J,{className:"h-10 flex-1 rounded-md"})]})]})]})});const z=(e==null?void 0:e.Opportunities)||[],H=z.length>0,B=()=>{if(f==null){p(1);return}f>1&&p(f-1)},L=()=>{if(f==null){p(1);return}p(f+1)},P=G=>{const Q=parseInt(G.target.value,10);if(!isNaN(Q)&&Q>0){p(Q);return}p(void 0)},V=()=>{(f==null||f<1)&&p(1)},A=((te=(ee=e.Distribution)==null?void 0:ee.Inventory)==null?void 0:te.reduce((G,Q)=>G+(Q.AvailableQuantity||0),0))||0,Y=G=>{try{return new Date(G).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(Q){return console.error(Q),G.split("T")[0]||"N/A"}},D=()=>{c&&c({quantity:f??1,bidNumber:(g==null?void 0:g.BidNumber)??null})};return o.jsx(Tr,{className:"hover:shadow-lg transition-shadow",children:o.jsxs(Mr,{className:"p-6",children:[o.jsxs("div",{className:"flex justify-between items-start mb-3",children:[o.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),o.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:T?o.jsx(J,{className:"h-10 w-24 rounded-md"}):E&&o.jsx("img",{src:E||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),o.jsxs("div",{className:"flex gap-6",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.State==="Active"?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Dr,{size:"12",className:"mr-1.5"})," ",e.State]}),o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.SerialNumber?"bg-green-50 text-green-700 hover:bg-green-50":"bg-yellow-50 text-yellow-700 hover:bg-yellow-50"}`,children:[o.jsx(Cl,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&o.jsxs(Te,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[o.jsx(fl,{size:"12",className:"mr-1.5"})," Transparency Code"]}),e.AvailableToBuy===void 0?o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${(ne=e.ManufacturerCategory)!=null&&ne.QualificationRequired?"bg-blue-50 text-blue-700 hover:bg-blue-50":"bg-neutral-50 text-neutral-700 hover:bg-neutral-50"}`,children:[o.jsx(Ao,{size:"12",className:"mr-1.5"})," ",(se=e.ManufacturerCategory)!=null&&se.QualificationRequired?"Qualification Enforced":"No Qualification Needed"]}):o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.AvailableToBuy?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Ao,{size:"12",className:"mr-1.5"})," ",(le=e.ManufacturerCategory)!=null&&le.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.AutoUpdate?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(Nl,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),o.jsxs(Te,{variant:"outline",className:`rounded-full px-3 ${e.BodyHTML&&e.Title&&e.MAP?"bg-green-50 text-green-700 hover:bg-green-50":"bg-red-50 text-red-700 hover:bg-red-50"}`,children:[o.jsx(El,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),o.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),o.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),o.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),o.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]}),e.CountryCodeOfOrigin&&o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-muted-foreground",children:"Origin"}),o.jsxs("div",{className:"font-medium flex items-center",children:[o.jsx(jc,{countryCode:e.CountryCodeOfOrigin,className:"mr-2"}),e.CountryCodeOfOrigin]})]})]})]}),o.jsx("div",{className:"flex flex-col",children:o.jsx(Kc,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),o.jsxs("div",{className:"flex gap-6 mt-4",children:[o.jsx("div",{className:"flex flex-1",children:H&&e.Distribution&&o.jsxs("div",{className:"w-full",children:[o.jsx("div",{className:"flex items-center",children:"You have "+z.length+(z.length>1?" opportunities":" opportunity")+" for this product:"}),o.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1",children:z.map((G,Q)=>{var he;return o.jsxs("div",{className:`flex justify-between items-center rounded-lg transition-colors py-2 px-4 bg-purple-100 border border-muted
195
+ ${G.BidNumber==(g==null?void 0:g.BidNumber)?"cursor-pointer border-2 border-purple-900":k(G)?"hover:bg-purple-200 cursor-pointer":"!bg-neutral-50"}
196
+ `,onClick:()=>{k(G)&&m(G.BidNumber!=(g==null?void 0:g.BidNumber)?G:null)},children:[o.jsx("div",{className:"flex items-center",children:o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"font-medium text-sm",children:G.Opportunity}),o.jsxs("span",{className:"text-xs text-neutral-900",children:[G.BidNumber," ",!k(G)&&o.jsx(Te,{variant:"outline",className:"text-xs mx-1 h-5 bg-gray-100",children:"Currently unavailable"})]})]})}),o.jsxs("div",{className:"flex flex-col items-end",children:[o.jsxs("span",{className:"font-semibold",children:["$",(he=G.Price)==null?void 0:he.toFixed(2)]}),G.Rebate&&G.Rebate>0&&o.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",G.Rebate.toFixed(2)]}),G.EndDate&&o.jsxs("span",{className:"text-xs text-neutral-600",children:["Ends: ",Y(G.EndDate)]})]})]},Q)})})]})}),o.jsxs("div",{className:"flex flex-col items-center",children:[s&&o.jsxs(ce,{variant:"secondary",onClick:s,children:[o.jsx(vl,{className:"mr-2"}),"View Product"]}),((ae=e.Distribution)==null?void 0:ae.Inventory)&&o.jsx("div",{className:"mt-4",children:o.jsxs(Ct,{open:v,onOpenChange:w,children:[o.jsx(nn,{asChild:!0,children:o.jsxs(ce,{variant:"ghost",className:`flex items-center text-sm ${A>0?"text-green-700":"text-red-700"}`,children:[o.jsx(Do,{size:"16",className:"mr-2"}),A>0?o.jsxs(o.Fragment,{children:[A," in stock"]}):o.jsx(o.Fragment,{children:"Out of stock"})]})}),o.jsxs(Nt,{className:"max-w-4xl",children:[o.jsx(er,{children:o.jsxs(tr,{className:"flex items-center",children:[o.jsx(Do,{className:"mr-2",size:18}),"Inventory Information"]})}),o.jsx(Pg,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&o.jsxs("div",{className:"flex justify-between items-end mt-4",children:[o.jsx("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:y>0?o.jsx("div",{className:"flex items-center",children:o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"Cost: $"}),y.toFixed(2),o.jsx("span",{children:" CAD"})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center flex-wrap",children:[o.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[o.jsx("span",{children:"$"}),g?(de=(Me=e.Opportunities)==null?void 0:Me.find(G=>G.BidNumber==g.BidNumber))==null?void 0:de.Price:C.toFixed(2),o.jsx("span",{children:" CAD"})]}),b>0&&o.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",x.toFixed(2)]})]}),b>0&&o.jsx("div",{className:"flex items-center",children:o.jsxs(Te,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[o.jsxs("span",{children:[b,"% OFF"]}),((Pe=e.InstantRebate)==null?void 0:Pe.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(g==null?void 0:g.EndDate)&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",g.EndDate.split("T")[0]]})]})})]})}),o.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&o.jsxs("div",{className:"flex items-center border rounded-md",children:[o.jsx(ce,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:B,disabled:typeof f<"u"&&(f<=1||!e.AvailableToBuy||l||!c),children:"-"}),o.jsx("input",{value:f,onChange:P,onBlur:V,onClick:G=>G.currentTarget.select(),className:`w-12 text-center border-0 focus:ring-0 focus:outline-none ${!e.AvailableToBuy||l||!c?"text-gray-400":""}`,disabled:!e.AvailableToBuy||l||!c}),o.jsx(ce,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:L,disabled:!e.AvailableToBuy||l||!c,children:"+"})]}),typeof t<"u"&&t&&o.jsx(ce,{className:"gap-2 whitespace-nowrap",onClick:D,disabled:!e.AvailableToBuy||l||!c,children:l?o.jsxs(o.Fragment,{children:[o.jsx(Po,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_o,{className:"mr-2"}),"Add to Cart"]})}),r&&o.jsx(ce,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:u,disabled:d||!u,children:d?o.jsxs(o.Fragment,{children:[o.jsx(Po,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(_o,{className:"mr-2"}),"Sync to Shopify"]})}),n]})]})]})})}S.AvatarFooter=Yh,S.Badge=Te,S.Button=ce,S.Card=Tr,S.CardContent=Mr,S.CardDescription=Vc,S.CardFooter=Gc,S.CardHeader=Bc,S.CardTitle=Wc,S.CountryFlag=jc,S.Dialog=Ct,S.DialogClose=on,S.DialogContent=Nt,S.DialogDescription=cn,S.DialogFooter=sn,S.DialogHeader=er,S.DialogOverlay=an,S.DialogPortal=$a,S.DialogTitle=tr,S.DialogTrigger=nn,S.DropdownMenu=hh,S.DropdownMenuCheckboxItem=Ei,S.DropdownMenuContent=Ni,S.DropdownMenuGroup=vh,S.DropdownMenuItem=Si,S.DropdownMenuLabel=Mi,S.DropdownMenuPortal=mh,S.DropdownMenuRadioGroup=wh,S.DropdownMenuRadioItem=Ti,S.DropdownMenuSeparator=Pi,S.DropdownMenuShortcut=Ai,S.DropdownMenuSub=bh,S.DropdownMenuSubContent=Ci,S.DropdownMenuSubTrigger=xi,S.DropdownMenuTrigger=gh,S.Input=yr,S.InputOTP=pd,S.InputOTPGroup=hd,S.InputOTPSeparator=vd,S.InputOTPSlot=gd,S.Label=Rh,S.Layout=Uc,S.Navbar=Hc,S.ProductCard=Ag,S.ProductImage=Kc,S.Separator=Gn,S.Sheet=Hi,S.SheetClose=Uh,S.SheetContent=Hn,S.SheetDescription=Xi,S.SheetFooter=Yi,S.SheetHeader=Ki,S.SheetOverlay=jn,S.SheetPortal=Ui,S.SheetTitle=qi,S.SheetTrigger=Hh,S.Sidebar=Yn,S.SidebarContent=Qn,S.SidebarFooter=Rn,S.SidebarGroup=nc,S.SidebarGroupAction=ac,S.SidebarGroupContent=sc,S.SidebarGroupLabel=oc,S.SidebarHeader=Xn,S.SidebarInput=tc,S.SidebarInset=ec,S.SidebarMenu=Zn,S.SidebarMenuAction=ic,S.SidebarMenuBadge=cc,S.SidebarMenuButton=eo,S.SidebarMenuItem=Jn,S.SidebarMenuSkeleton=lc,S.SidebarMenuSub=dc,S.SidebarMenuSubButton=fc,S.SidebarMenuSubItem=uc,S.SidebarProvider=Kn,S.SidebarRail=Ji,S.SidebarSeparator=rc,S.SidebarTrigger=qn,S.Skeleton=J,S.Toast=lo,S.ToastAction=kc,S.ToastClose=uo,S.ToastDescription=po,S.ToastProvider=Ic,S.ToastTitle=fo,S.ToastViewport=co,S.Toaster=$c,S.Tooltip=mt,S.TooltipContent=Je,S.TooltipProvider=vt,S.TooltipTrigger=bt,S.Topbar=mo,S.badgeVariants=zc,S.buttonVariants=$n,S.toast=Fc,S.useIsMobile=Qi,S.useSidebar=Lt,S.useToast=vo,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});