randmarcomps 1.63.0 → 1.65.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.
- package/dist/randmarcomps.d.ts +59 -200
- package/dist/randmarcomps.js +1029 -1025
- package/dist/randmarcomps.umd.cjs +26 -26
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(E,a){typeof exports=="object"&&typeof module<"u"?a(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"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E.randmarcomps={},E.jsxRuntime,E.React,E.ReactDOM,E["react-router-dom"]))})(this,function(E,a,q,Fn,fr){"use strict";function zn(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=zn(q),pr=zn(Fn);var Zs=Object.defineProperty,Js=Object.defineProperties,Rs=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Vn=(e,t,r)=>t in e?Zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ei=(e,t)=>{for(var r in t||(t={}))Wn.call(t,r)&&Vn(e,r,t[r]);if(xt)for(var r of xt(t))Bn.call(t,r)&&Vn(e,r,t[r]);return e},ti=(e,t)=>Js(e,Rs(t)),ri=(e,t)=>{var r={};for(var n in e)Wn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xt)for(var n of xt(e))t.indexOf(n)<0&&Bn.call(e,n)&&(r[n]=e[n]);return r};function ni(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function oi(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var ai=18,jn=40,si=`${jn}px`,ii=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function li({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,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")&&o&&i,[o,i,r]),h=l.useCallback(()=>{let v=e.current,m=t.current;if(!v||!m||u||r==="none")return;let y=v,f=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=f-ai,w=g;document.querySelectorAll(ii).length===0&&document.elementFromPoint(b,w)===v||(s(!0),d(!0))},[e,t,u,r]);return l.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function m(){let f=window.innerWidth-v.getBoundingClientRect().right;c(f>=jn)}m();let y=setInterval(m,1e3);return()=>{clearInterval(y)}},[e,r]),l.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let m=setTimeout(h,0),y=setTimeout(h,2e3),f=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(y),clearTimeout(f),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:si}}var Hn=l.createContext({}),Un=l.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:s,textAlign:i="left",pattern:c,placeholder:u,inputMode:d="numeric",onComplete:p,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:m,noScriptCSSFallback:y=ci,render:f,children:g}=r,b=ri(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,N,S,C;let[T,
|
|
1
|
+
(function(E,a){typeof exports=="object"&&typeof module<"u"?a(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"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E.randmarcomps={},E.jsxRuntime,E.React,E.ReactDOM,E["react-router-dom"]))})(this,function(E,a,q,Fn,fr){"use strict";function zn(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=zn(q),pr=zn(Fn);var Zs=Object.defineProperty,Js=Object.defineProperties,Rs=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Vn=(e,t,r)=>t in e?Zs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ei=(e,t)=>{for(var r in t||(t={}))Wn.call(t,r)&&Vn(e,r,t[r]);if(xt)for(var r of xt(t))Bn.call(t,r)&&Vn(e,r,t[r]);return e},ti=(e,t)=>Js(e,Rs(t)),ri=(e,t)=>{var r={};for(var n in e)Wn.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xt)for(var n of xt(e))t.indexOf(n)<0&&Bn.call(e,n)&&(r[n]=e[n]);return r};function ni(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function oi(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var ai=18,jn=40,si=`${jn}px`,ii=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function li({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[o,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")&&o&&i,[o,i,r]),h=l.useCallback(()=>{let v=e.current,m=t.current;if(!v||!m||u||r==="none")return;let y=v,f=y.getBoundingClientRect().left+y.offsetWidth,g=y.getBoundingClientRect().top+y.offsetHeight/2,b=f-ai,w=g;document.querySelectorAll(ii).length===0&&document.elementFromPoint(b,w)===v||(s(!0),d(!0))},[e,t,u,r]);return l.useEffect(()=>{let v=e.current;if(!v||r==="none")return;function m(){let f=window.innerWidth-v.getBoundingClientRect().right;c(f>=jn)}m();let y=setInterval(m,1e3);return()=>{clearInterval(y)}},[e,r]),l.useEffect(()=>{let v=n||document.activeElement===t.current;if(r==="none"||!v)return;let m=setTimeout(h,0),y=setTimeout(h,2e3),f=setTimeout(h,5e3),g=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(y),clearTimeout(f),clearTimeout(g)}},[t,n,r,h]),{hasPWMBadge:o,willPushPWMBadge:p,PWM_BADGE_SPACE_WIDTH:si}}var Hn=l.createContext({}),Un=l.forwardRef((e,t)=>{var r=e,{value:n,onChange:o,maxLength:s,textAlign:i="left",pattern:c,placeholder:u,inputMode:d="numeric",onComplete:p,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:v,containerClassName:m,noScriptCSSFallback:y=ci,render:f,children:g}=r,b=ri(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,N,S,C;let[T,B]=l.useState(typeof b.defaultValue=="string"?b.defaultValue:""),I=n??T,V=oi(I),$=l.useCallback(L=>{o==null||o(L),B(L)},[o]),j=l.useMemo(()=>c?typeof c=="string"?new RegExp(c):c:null,[c]),_=l.useRef(null),P=l.useRef(null),H=l.useRef({value:I,onChange:$,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=_.current)==null?void 0:N.selectionStart,(S=_.current)==null?void 0:S.selectionEnd,(C=_.current)==null?void 0:C.selectionDirection]});l.useImperativeHandle(t,()=>_.current,[]),l.useEffect(()=>{let L=_.current,W=P.current;if(!L||!W)return;H.current.value!==L.value&&H.current.onChange(L.value),k.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function ae(){if(document.activeElement!==L){oe(null),K(null);return}let Y=L.selectionStart,ue=L.selectionEnd,ur=L.selectionDirection,ve=L.maxLength,He=L.value,Pe=k.current.prev,Ie=-1,Le=-1,Ue;if(He.length!==0&&Y!==null&&ue!==null){let pf=Y===ue,hf=Y===He.length&&He.length<ve;if(pf&&!hf){let Ge=Y;if(Ge===0)Ie=0,Le=1,Ue="forward";else if(Ge===ve)Ie=Ge-1,Le=Ge,Ue="backward";else if(ve>1&&He.length>1){let $n=0;if(Pe[0]!==null&&Pe[1]!==null){Ue=Ge<Pe[1]?"backward":"forward";let gf=Pe[0]===Pe[1]&&Pe[0]<ve;Ue==="backward"&&!gf&&($n=-1)}Ie=$n+Ge,Le=$n+Ge+1}}Ie!==-1&&Le!==-1&&Ie!==Le&&_.current.setSelectionRange(Ie,Le,Ue)}let Xs=Ie!==-1?Ie:Y,Qs=Le!==-1?Le:ue,ff=Ue??ur;oe(Xs),K(Qs),k.current.prev=[Xs,Qs,ff]}if(document.addEventListener("selectionchange",ae,{capture:!0}),ae(),document.activeElement===L&&Z(!0),!document.getElementById("input-otp-style")){let Y=document.createElement("style");if(Y.id="input-otp-style",document.head.appendChild(Y),Y.sheet){let ue="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;";lt(Y.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),lt(Y.sheet,`[data-input-otp]:autofill { ${ue} }`),lt(Y.sheet,`[data-input-otp]:-webkit-autofill { ${ue} }`),lt(Y.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; } }"),lt(Y.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ie=()=>{W&&W.style.setProperty("--root-height",`${L.clientHeight}px`)};ie();let le=new ResizeObserver(ie);return le.observe(L),()=>{document.removeEventListener("selectionchange",ae,{capture:!0}),le.disconnect()}},[]);let[G,D]=l.useState(!1),[F,Z]=l.useState(!1),[te,oe]=l.useState(null),[z,K]=l.useState(null);l.useEffect(()=>{ni(()=>{var L,W,ae,ie;(L=_.current)==null||L.dispatchEvent(new Event("input"));let le=(W=_.current)==null?void 0:W.selectionStart,Y=(ae=_.current)==null?void 0:ae.selectionEnd,ue=(ie=_.current)==null?void 0:ie.selectionDirection;le!==null&&Y!==null&&(oe(le),K(Y),k.current.prev=[le,Y,ue])})},[I,F]),l.useEffect(()=>{V!==void 0&&I!==V&&V.length<s&&I.length===s&&(p==null||p(I))},[s,p,V,I]);let R=li({containerRef:P,inputRef:_,pushPasswordManagerStrategy:h,isFocused:F}),Ce=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")),$(W)},[s,$,V,j]),Se=l.useCallback(()=>{var L;if(_.current){let W=Math.min(_.current.value.length,s-1),ae=_.current.value.length;(L=_.current)==null||L.setSelectionRange(W,ae),oe(W),K(ae)}Z(!0)},[s]),yt=l.useCallback(L=>{var W,ae;let ie=_.current;if(!v&&(!H.current.isIOS||!L.clipboardData||!ie))return;let le=L.clipboardData.getData("text/plain"),Y=v?v(le):le;L.preventDefault();let ue=(W=_.current)==null?void 0:W.selectionStart,ur=(ae=_.current)==null?void 0:ae.selectionEnd,ve=(ue!==ur?I.slice(0,ue)+Y+I.slice(ur):I.slice(0,ue)+Y+I.slice(ue)).slice(0,s);if(ve.length>0&&j&&!j.test(ve))return;ie.value=ve,$(ve);let He=Math.min(ve.length,s-1),Pe=ve.length;ie.setSelectionRange(He,Pe),oe(He),K(Pe)},[s,$,j,I]),cr=l.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),wt=l.useMemo(()=>({position:"absolute",inset:0,width:R.willPushPWMBadge?`calc(100% + ${R.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:R.willPushPWMBadge?`inset(0 ${R.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"}),[R.PWM_BADGE_SPACE_WIDTH,R.willPushPWMBadge,i]),dr=l.useMemo(()=>l.createElement("input",ti(ei({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":I.length===0||void 0,"data-input-otp-mss":te,"data-input-otp-mse":z,inputMode:d,pattern:j==null?void 0:j.source,"aria-placeholder":u,style:wt,maxLength:s,value:I,ref:_,onPaste:L=>{var W;yt(L),(W=b.onPaste)==null||W.call(b,L)},onChange:Ce,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;Se(),(W=b.onFocus)==null||W.call(b,L)},onBlur:L=>{var W;Z(!1),(W=b.onBlur)==null||W.call(b,L)}})),[Ce,Se,yt,d,wt,s,z,te,b,j==null?void 0:j.source,I]),it=l.useMemo(()=>({slots:Array.from({length:s}).map((L,W)=>{var ae;let ie=F&&te!==null&&z!==null&&(te===z&&W===te||W>=te&&W<z),le=I[W]!==void 0?I[W]:null,Y=I[0]!==void 0?null:(ae=u==null?void 0:u[W])!=null?ae:null;return{char:le,placeholderChar:Y,isActive:ie,hasFakeCaret:ie&&le===null}}),isFocused:F,isHovering:!b.disabled&&G}),[F,G,s,z,te,b.disabled,I]),je=l.useMemo(()=>f?f(it):l.createElement(Hn.Provider,{value:it},g),[g,it,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:cr,className:m},je,l.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},dr)))});Un.displayName="Input";function lt(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var ci=`
|
|
2
2
|
[data-input-otp] {
|
|
3
3
|
--nojs-bg: white !important;
|
|
4
4
|
--nojs-fg: black !important;
|
|
@@ -37,107 +37,107 @@
|
|
|
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
|
|
40
|
+
*/const ee=(e,t)=>{const r=q.forwardRef(({className:n,...o},s)=>q.createElement(fi,{ref:s,iconNode:t,className:Gn(`lucide-${di(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
41
41
|
* @license lucide-react v0.479.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const Kn=
|
|
45
|
+
*/const Kn=ee("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 pi=
|
|
50
|
+
*/const pi=ee("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"}]]);/**
|
|
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 hi=
|
|
55
|
+
*/const hi=ee("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"}]]);/**
|
|
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 gi=
|
|
60
|
+
*/const gi=ee("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"}]]);/**
|
|
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 mi=
|
|
65
|
+
*/const mi=ee("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"}]]);/**
|
|
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 qn=
|
|
70
|
+
*/const qn=ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 vi=
|
|
75
|
+
*/const vi=ee("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"}]]);/**
|
|
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 bi=
|
|
80
|
+
*/const bi=ee("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"}]]);/**
|
|
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 yi=
|
|
85
|
+
*/const yi=ee("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
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 wi=
|
|
90
|
+
*/const wi=ee("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
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 xi=
|
|
95
|
+
*/const xi=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
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 Ni=
|
|
100
|
+
*/const Ni=ee("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"}]]);/**
|
|
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 Ci=
|
|
105
|
+
*/const Ci=ee("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"}]]);/**
|
|
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 Si=
|
|
110
|
+
*/const Si=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 Ei=
|
|
115
|
+
*/const Ei=ee("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"}]]);/**
|
|
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 Yn=
|
|
120
|
+
*/const Yn=ee("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"}]]);/**
|
|
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 Ti=
|
|
125
|
+
*/const Ti=ee("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"}]]);/**
|
|
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 Pi=
|
|
130
|
+
*/const Pi=ee("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"}]]);/**
|
|
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 Xn=
|
|
135
|
+
*/const Xn=ee("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"}]]);/**
|
|
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 Qn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qn(e))&&(n&&(n+=" "),n+=t);return n}const gr="-",Ai=e=>{const t=ki(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const c=i.split(gr);return c[0]===""&&c.length!==1&&c.shift(),Jn(c,t)||Mi(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},Jn=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Jn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(gr);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},Rn=/^\[(.+)\]$/,Mi=e=>{if(Rn.test(e)){const t=Rn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ki=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)mr(r[o],n,o,t);return n},mr=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:eo(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Oi(o)){mr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,i])=>{mr(i,eo(t,s),r,n)})})},eo=(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},Oi=e=>e.isThemeGetter,Di=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(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 o(s,i),i},set(s,i){r.has(s)?r.set(s,i):o(s,i)}}},vr="!",br=":",_i=br.length,Ii=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,u=0,d;for(let y=0;y<o.length;y++){let f=o[y];if(i===0&&c===0){if(f===br){s.push(o.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?o:o.substring(u),h=Li(p),v=h!==p,m=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+br,s=n;n=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Li=e=>e.endsWith(vr)?e.substring(0,e.length-1):e.startsWith(vr)?e.substring(1):e,$i=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Fi=e=>({cache:Di(e.cacheSize),parseClassName:Ii(e),sortModifiers:$i(e),...Ai(e)}),zi=/\s+/,Wi=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(zi);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:h,modifiers:v,hasImportantModifier:m,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(v).join(":"),x=m?w+vr:w,N=x+b;if(i.includes(N))continue;i.push(N);const S=o(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 Bi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=to(t))&&(n&&(n+=" "),n+=r);return n}const to=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=to(e[n]))&&(r&&(r+=" "),r+=t);return r};function Vi(e,...t){let r,n,o,s=i;function i(u){const d=t.reduce((p,h)=>h(p),e());return r=Fi(d),n=r.cache.get,o=r.cache.set,s=c,c(u)}function c(u){const d=n(u);if(d)return d;const p=Wi(u,r);return o(u,p),p}return function(){return s(Bi.apply(null,arguments))}}const re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ro=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,no=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ji=/^\d+\/\d+$/,Hi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ui=/\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$/,Gi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ke=e=>ji.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>!!e&&Number.isInteger(Number(e)),oo=e=>e.endsWith("%")&&U(e.slice(0,-1)),Pe=e=>Hi.test(e),Yi=()=>!0,Xi=e=>Ui.test(e)&&!Gi.test(e),yr=()=>!1,Qi=e=>Ki.test(e),Zi=e=>qi.test(e),Ji=e=>!A(e)&&!M(e),Ri=e=>qe(e,io,yr),A=e=>ro.test(e),Fe=e=>qe(e,lo,Xi),wr=e=>qe(e,dl,U),el=e=>qe(e,ao,yr),tl=e=>qe(e,so,Zi),rl=e=>qe(e,yr,Qi),M=e=>no.test(e),Nt=e=>Ye(e,lo),nl=e=>Ye(e,ul),ol=e=>Ye(e,ao),al=e=>Ye(e,io),sl=e=>Ye(e,so),il=e=>Ye(e,fl,!0),qe=(e,t,r)=>{const n=ro.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ye=(e,t,r=!1)=>{const n=no.exec(e);return n?n[1]?t(n[1]):r:!1},ao=e=>e==="position",ll=new Set(["image","url"]),so=e=>ll.has(e),cl=new Set(["length","size","percentage"]),io=e=>cl.has(e),lo=e=>e==="length",dl=e=>e==="number",ul=e=>e==="family-name",fl=e=>e==="shadow",pl=Vi(()=>{const e=re("color"),t=re("font"),r=re("text"),n=re("font-weight"),o=re("tracking"),s=re("leading"),i=re("breakpoint"),c=re("container"),u=re("spacing"),d=re("radius"),p=re("shadow"),h=re("inset-shadow"),v=re("drop-shadow"),m=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=()=>[Ke,"full","auto",...C()],W=()=>[$e,"none","subgrid",M,A],I=()=>["auto",{span:["full",$e,M,A]},M,A],B=()=>[$e,"auto",M,A],$=()=>["auto","min","max","fr",M,A],V=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...C()],j=()=>[Ke,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,A],G=()=>[oo,Fe],D=()=>["","none","full",d,M,A],F=()=>["",U,Nt,Fe],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"],H=()=>["","none",m,M,A],K=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,A],te=()=>["none",U,M,A],de=()=>["none",U,M,A],_e=()=>[U,M,A],Ce=()=>[Ke,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[Yi],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[Ji],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",U],text:[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ke,A,M,f]}],container:["container"],columns:[{columns:[U,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:[$e,"auto",M,A]}],basis:[{basis:[Ke,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,Ke,"auto","initial","none",A]}],grow:[{grow:["",U,M,A]}],shrink:[{shrink:["",U,M,A]}],order:[{order:[$e,"first","last","none",M,A]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[c,"screen",...j()]}],"min-w":[{"min-w":[c,"screen","none",...j()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen",...j()]}],"min-h":[{"min-h":["screen","none",...j()]}],"max-h":[{"max-h":["screen",...j()]}],"font-size":[{text:["base",r,Nt,Fe]}],"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",oo,A]}],"font-family":[{font:[nl,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,M,A]}],"line-clamp":[{"line-clamp":[U,"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:[U,"from-font","auto",M,Fe]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[U,"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(),ol,el]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",al,Ri]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$e,M,A],radial:["",M,A],conic:[$e,M,A]},sl,tl]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"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:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...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":[U,M,A]}],"outline-w":[{outline:["",U,Nt,Fe]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,il,rl]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,A,h]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[U,Fe]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[U,M,A]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none",M,A]}],blur:[{blur:H()}],brightness:[{brightness:[U,M,A]}],contrast:[{contrast:[U,M,A]}],"drop-shadow":[{"drop-shadow":["","none",v,M,A]}],grayscale:[{grayscale:["",U,M,A]}],"hue-rotate":[{"hue-rotate":[U,M,A]}],invert:[{invert:["",U,M,A]}],saturate:[{saturate:[U,M,A]}],sepia:[{sepia:["",U,M,A]}],"backdrop-filter":[{"backdrop-filter":["","none",M,A]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[U,M,A]}],"backdrop-contrast":[{"backdrop-contrast":[U,M,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,M,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,M,A]}],"backdrop-invert":[{"backdrop-invert":["",U,M,A]}],"backdrop-opacity":[{"backdrop-opacity":[U,M,A]}],"backdrop-saturate":[{"backdrop-saturate":[U,M,A]}],"backdrop-sepia":[{"backdrop-sepia":["",U,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:[U,"initial",M,A]}],ease:[{ease:["linear","initial",g,M,A]}],delay:[{delay:[U,M,A]}],animate:[{animate:["none",b,M,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,M,A]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[M,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"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:[U,Nt,Fe,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 pl(Zn(e))}function hl({className:e,containerClassName:t,...r}){return a.jsx(Un,{"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 gl({className:e,...t}){return a.jsx("div",{"data-slot":"input-otp-group",className:O("flex items-center",e),...t})}function ml({index:e,className:t,...r}){const n=l.useContext(Hn),{char:o,hasFakeCaret:s,isActive:i}=(n==null?void 0:n.slots[e])??{};return a.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:[o,s&&a.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:a.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function vl({...e}){return a.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:a.jsx(yi,{})})}function Q(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function co(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1;const n=e.map(o=>{const s=co(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():co(e[o],null)}}}}function ae(...e){return l.useCallback(uo(...e),e)}function bl(e,t){const r=l.createContext(t),n=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return a.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(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,o]}function ct(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:v,children:m,...y}=h,f=((b=v==null?void 0:v[e])==null?void 0:b[u])||c,g=l.useMemo(()=>y,Object.values(y));return a.jsx(f.Provider,{value:g,children:m})};d.displayName=s+"Provider";function p(h,v){var f;const m=((f=v==null?void 0:v[e])==null?void 0:f[u])||c,y=l.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{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 o.scopeName=e,[n,yl(o,...t)]}function yl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(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 Ae=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},wl=l.useId||(()=>{}),xl=0;function Ct(e){const[t,r]=l.useState(wl());return Ae(()=>{r(n=>n??String(xl++))},[e]),e||(t?`radix-${t}`:"")}function fe(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,o]=Nl({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,c=fe(r),u=l.useCallback(d=>{if(s){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else o(d)},[s,e,o,c]);return[i,u]}function Nl({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,o=l.useRef(n),s=fe(t);return l.useEffect(()=>{o.current!==n&&(s(n),o.current=n)},[n,o,s]),r}var pe=l.forwardRef((e,t)=>{const{children:r,...n}=e,o=l.Children.toArray(r),s=o.find(Cl);if(s){const i=s.props.children,c=o.map(u=>u===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:u);return a.jsx(Nr,{...n,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,c):null})}return a.jsx(Nr,{...n,ref:t,children:r})});pe.displayName="Slot";var Nr=l.forwardRef((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const o=El(r),s=Sl(n,r.props);return r.type!==l.Fragment&&(s.ref=t?uo(t,o):o),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});Nr.displayName="SlotClone";var fo=({children:e})=>a.jsx(a.Fragment,{children:e});function Cl(e){return l.isValidElement(e)&&e.type===fo}function Sl(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...c)=>{s(...c),o(...c)}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function El(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Tl.reduce((e,t)=>{const r=l.forwardRef((n,o)=>{const{asChild:s,...i}=n,c=s?pe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function po(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function Pl(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Al="DismissableLayer",Cr="dismissableLayer.update",Ml="dismissableLayer.pointerDownOutside",kl="dismissableLayer.focusOutside",ho,go=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),St=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(go),[p,h]=l.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),y=ae(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=Dl(T=>{const W=T.target,I=[...d.branches].some(B=>B.contains(W));!N||I||(o==null||o(T),i==null||i(T),T.defaultPrevented||c==null||c())},v),C=_l(T=>{const W=T.target;[...d.branches].some(B=>B.contains(W))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},v);return Pl(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},v),l.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ho=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),vo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ho)}},[p,v,r,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),vo())},[p,d]),l.useEffect(()=>{const T=()=>m({});return document.addEventListener(Cr,T),()=>document.removeEventListener(Cr,T)},[]),a.jsx(J.div,{...u,ref:y,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,S.onPointerDownCapture)})});St.displayName=Al;var Ol="DismissableLayerBranch",mo=l.forwardRef((e,t)=>{const r=l.useContext(go),n=l.useRef(null),o=ae(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),a.jsx(J.div,{...e,ref:o})});mo.displayName=Ol;function Dl(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let u=function(){bo(Ml,r,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _l(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&bo(kl,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vo(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function bo(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?po(o,s):o.dispatchEvent(s)}var Il=St,Ll=mo,Sr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",yo={bubbles:!1,cancelable:!0},$l="FocusScope",wo=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=fe(o),p=fe(s),h=l.useRef(null),v=ae(t,f=>u(f)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let f=function(x){if(m.paused||!c)return;const N=x.target;c.contains(N)?h.current=N:Me(h.current,{select:!0})},g=function(x){if(m.paused||!c)return;const N=x.relatedTarget;N!==null&&(c.contains(N)||Me(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Me(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,m.paused]),l.useEffect(()=>{if(c){Co.add(m);const f=document.activeElement;if(!c.contains(f)){const b=new CustomEvent(Sr,yo);c.addEventListener(Sr,d),c.dispatchEvent(b),b.defaultPrevented||(Fl(jl(xo(c)),{select:!0}),document.activeElement===f&&Me(c))}return()=>{c.removeEventListener(Sr,d),setTimeout(()=>{const b=new CustomEvent(Er,yo);c.addEventListener(Er,p),c.dispatchEvent(b),b.defaultPrevented||Me(f??document.body,{select:!0}),c.removeEventListener(Er,p),Co.remove(m)},0)}}},[c,d,p,m]);const y=l.useCallback(f=>{if(!r&&!n||m.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]=zl(w);x&&N?!f.shiftKey&&b===N?(f.preventDefault(),r&&Me(x,{select:!0})):f.shiftKey&&b===x&&(f.preventDefault(),r&&Me(N,{select:!0})):b===w&&f.preventDefault()}},[r,n,m.paused]);return a.jsx(J.div,{tabIndex:-1,...i,ref:v,onKeyDown:y})});wo.displayName=$l;function Fl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Me(n,{select:t}),document.activeElement!==r)return}function zl(e){const t=xo(e),r=No(t,e),n=No(t.reverse(),e);return[r,n]}function xo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function No(e,t){for(const r of e)if(!Wl(r,{upTo:t}))return r}function Wl(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 Bl(e){return e instanceof HTMLInputElement&&"select"in e}function Me(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Bl(e)&&t&&e.select()}}var Co=Vl();function Vl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=So(e,t),e.unshift(t)},remove(t){var r;e=So(e,t),(r=e[0])==null||r.resume()}}}function So(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function jl(e){return e.filter(t=>t.tagName!=="A")}var Hl="Portal",Et=l.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[o,s]=l.useState(!1);Ae(()=>s(!0),[]);const i=r||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Fn.createPortal(a.jsx(J.div,{...n,ref:t}),i):null});Et.displayName=Hl;function Ul(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var ze=e=>{const{present:t,children:r}=e,n=Gl(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=ae(n.ref,Kl(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:s}):null};ze.displayName="Presence";function Gl(e){const[t,r]=l.useState(),n=l.useRef({}),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=Ul(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=Tt(n.current);s.current=c==="mounted"?d:"none"},[c]),Ae(()=>{const d=n.current,p=o.current;if(p!==e){const v=s.current,m=Tt(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Ae(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=m=>{const f=Tt(n.current).includes(m.animationName);if(m.target===t&&f&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(s.current=Tt(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",v),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 Tt(e){return(e==null?void 0:e.animationName)||"none"}function Kl(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tr=0;function ql(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Eo()),document.body.insertAdjacentElement("beforeend",e[1]??Eo()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}function Eo(){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 be=function(){return be=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},be.apply(this,arguments)};function To(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Yl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;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 Pt="right-scroll-bar-position",At="width-before-scroll-bar",Xl="with-scroll-bars-hidden",Ql="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zl(e,t){var r=q.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Jl=typeof window<"u"?l.useLayoutEffect:l.useEffect,Po=new WeakMap;function Rl(e,t){var r=Zl(null,function(n){return e.forEach(function(o){return Pr(o,n)})});return Jl(function(){var n=Po.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(c){s.has(c)||Pr(c,null)}),s.forEach(function(c){o.has(c)||Pr(c,i)})}Po.set(r,e)},[e]),r}function ec(e){return e}function tc(e,t){t===void 0&&(t=ec);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(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 o}function rc(e){e===void 0&&(e={});var t=tc(null);return t.options=be({async:!0,ssr:!1},e),t}var Ao=function(e){var t=e.sideCar,r=To(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,be({},r))};Ao.isSideCarExport=!0;function nc(e,t){return e.useMedium(t),Ao}var Mo=rc(),Ar=function(){},Mt=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),o=n[0],s=n[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,y=e.inert,f=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=To(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=v,S=Rl([r,t]),C=be(be({},x),o);return l.createElement(l.Fragment,null,p&&l.createElement(N,{sideCar:Mo,removeScrollBar:d,shards:h,noIsolation:m,inert:y,setCallbacks:s,allowPinchZoom:!!f,lockRef:r,gapMode:w}),i?l.cloneElement(l.Children.only(c),be(be({},C),{ref:S})):l.createElement(b,be({},C,{className:u,ref:S}),c))});Mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mt.classNames={fullWidth:At,zeroRight:Pt};var oc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ac(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oc();return t&&e.setAttribute("nonce",t),e}function sc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ac())&&(sc(t,r),ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cc=function(){var e=lc();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ko=function(){var e=cc(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},dc={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},uc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(r),Mr(n),Mr(o)]},fc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dc;var t=uc(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])}},pc=ko(),Xe="data-scroll-locked",hc=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
|
140
|
+
*/const hr=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Qn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Qn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Qn(e))&&(n&&(n+=" "),n+=t);return n}const gr="-",Ai=e=>{const t=ki(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const c=i.split(gr);return c[0]===""&&c.length!==1&&c.shift(),Jn(c,t)||Mi(i)},getConflictingClassGroupIds:(i,c)=>{const u=r[i]||[];return c&&n[i]?[...u,...n[i]]:u}}},Jn=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Jn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(gr);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId},Rn=/^\[(.+)\]$/,Mi=e=>{if(Rn.test(e)){const t=Rn.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ki=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)mr(r[o],n,o,t);return n},mr=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:eo(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Oi(o)){mr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,i])=>{mr(i,eo(t,s),r,n)})})},eo=(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},Oi=e=>e.isThemeGetter,Di=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(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 o(s,i),i},set(s,i){r.has(s)?r.set(s,i):o(s,i)}}},vr="!",br=":",_i=br.length,Ii=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,u=0,d;for(let y=0;y<o.length;y++){let f=o[y];if(i===0&&c===0){if(f===br){s.push(o.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?o:o.substring(u),h=Li(p),v=h!==p,m=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:h,maybePostfixModifierPosition:m}};if(t){const o=t+br,s=n;n=i=>i.startsWith(o)?s(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Li=e=>e.endsWith(vr)?e.substring(0,e.length-1):e.startsWith(vr)?e.substring(1):e,$i=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(o.push(...s.sort(),i),s=[]):s.push(i)}),o.push(...s.sort()),o}},Fi=e=>({cache:Di(e.cacheSize),parseClassName:Ii(e),sortModifiers:$i(e),...Ai(e)}),zi=/\s+/,Wi=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(zi);let u="";for(let d=c.length-1;d>=0;d-=1){const p=c[d],{isExternal:h,modifiers:v,hasImportantModifier:m,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(v).join(":"),x=m?w+vr:w,N=x+b;if(i.includes(N))continue;i.push(N);const S=o(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 Bi(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=to(t))&&(n&&(n+=" "),n+=r);return n}const to=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=to(e[n]))&&(r&&(r+=" "),r+=t);return r};function Vi(e,...t){let r,n,o,s=i;function i(u){const d=t.reduce((p,h)=>h(p),e());return r=Fi(d),n=r.cache.get,o=r.cache.set,s=c,c(u)}function c(u){const d=n(u);if(d)return d;const p=Wi(u,r);return o(u,p),p}return function(){return s(Bi.apply(null,arguments))}}const re=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ro=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,no=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ji=/^\d+\/\d+$/,Hi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ui=/\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$/,Gi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ke=e=>ji.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>!!e&&Number.isInteger(Number(e)),oo=e=>e.endsWith("%")&&U(e.slice(0,-1)),Ae=e=>Hi.test(e),Yi=()=>!0,Xi=e=>Ui.test(e)&&!Gi.test(e),yr=()=>!1,Qi=e=>Ki.test(e),Zi=e=>qi.test(e),Ji=e=>!A(e)&&!M(e),Ri=e=>qe(e,io,yr),A=e=>ro.test(e),Fe=e=>qe(e,lo,Xi),wr=e=>qe(e,dl,U),el=e=>qe(e,ao,yr),tl=e=>qe(e,so,Zi),rl=e=>qe(e,yr,Qi),M=e=>no.test(e),Nt=e=>Ye(e,lo),nl=e=>Ye(e,ul),ol=e=>Ye(e,ao),al=e=>Ye(e,io),sl=e=>Ye(e,so),il=e=>Ye(e,fl,!0),qe=(e,t,r)=>{const n=ro.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ye=(e,t,r=!1)=>{const n=no.exec(e);return n?n[1]?t(n[1]):r:!1},ao=e=>e==="position",ll=new Set(["image","url"]),so=e=>ll.has(e),cl=new Set(["length","size","percentage"]),io=e=>cl.has(e),lo=e=>e==="length",dl=e=>e==="number",ul=e=>e==="family-name",fl=e=>e==="shadow",pl=Vi(()=>{const e=re("color"),t=re("font"),r=re("text"),n=re("font-weight"),o=re("tracking"),s=re("leading"),i=re("breakpoint"),c=re("container"),u=re("spacing"),d=re("radius"),p=re("shadow"),h=re("inset-shadow"),v=re("drop-shadow"),m=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=()=>[Ke,"full","auto",...C()],B=()=>[$e,"none","subgrid",M,A],I=()=>["auto",{span:["full",$e,M,A]},M,A],V=()=>[$e,"auto",M,A],$=()=>["auto","min","max","fr",M,A],j=()=>["start","end","center","between","around","evenly","stretch","baseline"],_=()=>["start","end","center","stretch"],P=()=>["auto",...C()],H=()=>[Ke,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,M,A],G=()=>[oo,Fe],D=()=>["","none","full",d,M,A],F=()=>["",U,Nt,Fe],Z=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",m,M,A],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,A],K=()=>["none",U,M,A],R=()=>["none",U,M,A],Ce=()=>[U,M,A],Se=()=>[Ke,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ae],breakpoint:[Ae],color:[Yi],container:[Ae],"drop-shadow":[Ae],ease:["in","out","in-out"],font:[Ji],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ae],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ae],shadow:[Ae],spacing:["px",U],text:[Ae],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ke,A,M,f]}],container:["container"],columns:[{columns:[U,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:[$e,"auto",M,A]}],basis:[{basis:[Ke,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,Ke,"auto","initial","none",A]}],grow:[{grow:["",U,M,A]}],shrink:[{shrink:["",U,M,A]}],order:[{order:[$e,"first","last","none",M,A]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:I()}],"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":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[..._(),"baseline"]}],"align-self":[{self:["auto",..._(),"baseline"]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen",...H()]}],"min-h":[{"min-h":["screen","none",...H()]}],"max-h":[{"max-h":["screen",...H()]}],"font-size":[{text:["base",r,Nt,Fe]}],"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",oo,A]}],"font-family":[{font:[nl,A,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,M,A]}],"line-clamp":[{"line-clamp":[U,"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:[U,"from-font","auto",M,Fe]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[U,"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(),ol,el]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",al,Ri]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$e,M,A],radial:["",M,A],conic:[$e,M,A]},sl,tl]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"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:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...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":[U,M,A]}],"outline-w":[{outline:["",U,Nt,Fe]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",p,il,rl]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",M,A,h]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[U,Fe]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":k()}],opacity:[{opacity:[U,M,A]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none",M,A]}],blur:[{blur:oe()}],brightness:[{brightness:[U,M,A]}],contrast:[{contrast:[U,M,A]}],"drop-shadow":[{"drop-shadow":["","none",v,M,A]}],grayscale:[{grayscale:["",U,M,A]}],"hue-rotate":[{"hue-rotate":[U,M,A]}],invert:[{invert:["",U,M,A]}],saturate:[{saturate:[U,M,A]}],sepia:[{sepia:["",U,M,A]}],"backdrop-filter":[{"backdrop-filter":["","none",M,A]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[U,M,A]}],"backdrop-contrast":[{"backdrop-contrast":[U,M,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,M,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,M,A]}],"backdrop-invert":[{"backdrop-invert":["",U,M,A]}],"backdrop-opacity":[{"backdrop-opacity":[U,M,A]}],"backdrop-saturate":[{"backdrop-saturate":[U,M,A]}],"backdrop-sepia":[{"backdrop-sepia":["",U,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:[U,"initial",M,A]}],ease:[{ease:["linear","initial",g,M,A]}],delay:[{delay:[U,M,A]}],animate:[{animate:["none",b,M,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,M,A]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:R()}],"scale-x":[{"scale-x":R()}],"scale-y":[{"scale-y":R()}],"scale-z":[{"scale-z":R()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[M,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"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:[U,Nt,Fe,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 pl(Zn(e))}function hl({className:e,containerClassName:t,...r}){return a.jsx(Un,{"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 gl({className:e,...t}){return a.jsx("div",{"data-slot":"input-otp-group",className:O("flex items-center",e),...t})}function ml({index:e,className:t,...r}){const n=l.useContext(Hn),{char:o,hasFakeCaret:s,isActive:i}=(n==null?void 0:n.slots[e])??{};return a.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:[o,s&&a.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:a.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function vl({...e}){return a.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:a.jsx(yi,{})})}function Q(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function co(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1;const n=e.map(o=>{const s=co(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():co(e[o],null)}}}}function se(...e){return l.useCallback(uo(...e),e)}function bl(e,t){const r=l.createContext(t),n=s=>{const{children:i,...c}=s,u=l.useMemo(()=>c,Object.values(c));return a.jsx(r.Provider,{value:u,children:i})};n.displayName=e+"Provider";function o(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,o]}function ct(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:v,children:m,...y}=h,f=((b=v==null?void 0:v[e])==null?void 0:b[u])||c,g=l.useMemo(()=>y,Object.values(y));return a.jsx(f.Provider,{value:g,children:m})};d.displayName=s+"Provider";function p(h,v){var f;const m=((f=v==null?void 0:v[e])==null?void 0:f[u])||c,y=l.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,p]}const o=()=>{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 o.scopeName=e,[n,yl(o,...t)]}function yl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(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 Me=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},wl=l.useId||(()=>{}),xl=0;function Ct(e){const[t,r]=l.useState(wl());return Me(()=>{r(n=>n??String(xl++))},[e]),e||(t?`radix-${t}`:"")}function fe(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,o]=Nl({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,c=fe(r),u=l.useCallback(d=>{if(s){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else o(d)},[s,e,o,c]);return[i,u]}function Nl({defaultProp:e,onChange:t}){const r=l.useState(e),[n]=r,o=l.useRef(n),s=fe(t);return l.useEffect(()=>{o.current!==n&&(s(n),o.current=n)},[n,o,s]),r}var pe=l.forwardRef((e,t)=>{const{children:r,...n}=e,o=l.Children.toArray(r),s=o.find(Cl);if(s){const i=s.props.children,c=o.map(u=>u===s?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:u);return a.jsx(Nr,{...n,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,c):null})}return a.jsx(Nr,{...n,ref:t,children:r})});pe.displayName="Slot";var Nr=l.forwardRef((e,t)=>{const{children:r,...n}=e;if(l.isValidElement(r)){const o=El(r),s=Sl(n,r.props);return r.type!==l.Fragment&&(s.ref=t?uo(t,o):o),l.cloneElement(r,s)}return l.Children.count(r)>1?l.Children.only(null):null});Nr.displayName="SlotClone";var fo=({children:e})=>a.jsx(a.Fragment,{children:e});function Cl(e){return l.isValidElement(e)&&e.type===fo}function Sl(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...c)=>{s(...c),o(...c)}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function El(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Tl.reduce((e,t)=>{const r=l.forwardRef((n,o)=>{const{asChild:s,...i}=n,c=s?pe:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function po(e,t){e&&pr.flushSync(()=>e.dispatchEvent(t))}function Pl(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Al="DismissableLayer",Cr="dismissableLayer.update",Ml="dismissableLayer.pointerDownOutside",kl="dismissableLayer.focusOutside",ho,go=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),St=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...u}=e,d=l.useContext(go),[p,h]=l.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),y=se(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=Dl(T=>{const B=T.target,I=[...d.branches].some(V=>V.contains(B));!N||I||(o==null||o(T),i==null||i(T),T.defaultPrevented||c==null||c())},v),C=_l(T=>{const B=T.target;[...d.branches].some(V=>V.contains(B))||(s==null||s(T),i==null||i(T),T.defaultPrevented||c==null||c())},v);return Pl(T=>{w===d.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&c&&(T.preventDefault(),c()))},v),l.useEffect(()=>{if(p)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ho=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),vo(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=ho)}},[p,v,r,d]),l.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),vo())},[p,d]),l.useEffect(()=>{const T=()=>m({});return document.addEventListener(Cr,T),()=>document.removeEventListener(Cr,T)},[]),a.jsx(J.div,{...u,ref:y,style:{pointerEvents:x?N?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,S.onPointerDownCapture)})});St.displayName=Al;var Ol="DismissableLayerBranch",mo=l.forwardRef((e,t)=>{const r=l.useContext(go),n=l.useRef(null),o=se(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),a.jsx(J.div,{...e,ref:o})});mo.displayName=Ol;function Dl(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let u=function(){bo(Ml,r,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _l(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&bo(kl,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function vo(){const e=new CustomEvent(Cr);document.dispatchEvent(e)}function bo(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?po(o,s):o.dispatchEvent(s)}var Il=St,Ll=mo,Sr="focusScope.autoFocusOnMount",Er="focusScope.autoFocusOnUnmount",yo={bubbles:!1,cancelable:!0},$l="FocusScope",wo=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[c,u]=l.useState(null),d=fe(o),p=fe(s),h=l.useRef(null),v=se(t,f=>u(f)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let f=function(x){if(m.paused||!c)return;const N=x.target;c.contains(N)?h.current=N:ke(h.current,{select:!0})},g=function(x){if(m.paused||!c)return;const N=x.relatedTarget;N!==null&&(c.contains(N)||ke(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&ke(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,m.paused]),l.useEffect(()=>{if(c){Co.add(m);const f=document.activeElement;if(!c.contains(f)){const b=new CustomEvent(Sr,yo);c.addEventListener(Sr,d),c.dispatchEvent(b),b.defaultPrevented||(Fl(jl(xo(c)),{select:!0}),document.activeElement===f&&ke(c))}return()=>{c.removeEventListener(Sr,d),setTimeout(()=>{const b=new CustomEvent(Er,yo);c.addEventListener(Er,p),c.dispatchEvent(b),b.defaultPrevented||ke(f??document.body,{select:!0}),c.removeEventListener(Er,p),Co.remove(m)},0)}}},[c,d,p,m]);const y=l.useCallback(f=>{if(!r&&!n||m.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]=zl(w);x&&N?!f.shiftKey&&b===N?(f.preventDefault(),r&&ke(x,{select:!0})):f.shiftKey&&b===x&&(f.preventDefault(),r&&ke(N,{select:!0})):b===w&&f.preventDefault()}},[r,n,m.paused]);return a.jsx(J.div,{tabIndex:-1,...i,ref:v,onKeyDown:y})});wo.displayName=$l;function Fl(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(ke(n,{select:t}),document.activeElement!==r)return}function zl(e){const t=xo(e),r=No(t,e),n=No(t.reverse(),e);return[r,n]}function xo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function No(e,t){for(const r of e)if(!Wl(r,{upTo:t}))return r}function Wl(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 Bl(e){return e instanceof HTMLInputElement&&"select"in e}function ke(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Bl(e)&&t&&e.select()}}var Co=Vl();function Vl(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=So(e,t),e.unshift(t)},remove(t){var r;e=So(e,t),(r=e[0])==null||r.resume()}}}function So(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function jl(e){return e.filter(t=>t.tagName!=="A")}var Hl="Portal",Et=l.forwardRef((e,t)=>{var c;const{container:r,...n}=e,[o,s]=l.useState(!1);Me(()=>s(!0),[]);const i=r||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Fn.createPortal(a.jsx(J.div,{...n,ref:t}),i):null});Et.displayName=Hl;function Ul(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var ze=e=>{const{present:t,children:r}=e,n=Gl(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=se(n.ref,Kl(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:s}):null};ze.displayName="Presence";function Gl(e){const[t,r]=l.useState(),n=l.useRef({}),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[c,u]=Ul(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=Tt(n.current);s.current=c==="mounted"?d:"none"},[c]),Me(()=>{const d=n.current,p=o.current;if(p!==e){const v=s.current,m=Tt(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(p&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Me(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,h=m=>{const f=Tt(n.current).includes(m.animationName);if(m.target===t&&f&&(u("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(s.current=Tt(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",v),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 Tt(e){return(e==null?void 0:e.animationName)||"none"}function Kl(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Tr=0;function ql(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Eo()),document.body.insertAdjacentElement("beforeend",e[1]??Eo()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}function Eo(){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 be=function(){return be=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},be.apply(this,arguments)};function To(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Yl(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;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 Pt="right-scroll-bar-position",At="width-before-scroll-bar",Xl="with-scroll-bars-hidden",Ql="--removed-body-scroll-bar-size";function Pr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zl(e,t){var r=q.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Jl=typeof window<"u"?l.useLayoutEffect:l.useEffect,Po=new WeakMap;function Rl(e,t){var r=Zl(null,function(n){return e.forEach(function(o){return Pr(o,n)})});return Jl(function(){var n=Po.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(c){s.has(c)||Pr(c,null)}),s.forEach(function(c){o.has(c)||Pr(c,i)})}Po.set(r,e)},[e]),r}function ec(e){return e}function tc(e,t){t===void 0&&(t=ec);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(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 o}function rc(e){e===void 0&&(e={});var t=tc(null);return t.options=be({async:!0,ssr:!1},e),t}var Ao=function(e){var t=e.sideCar,r=To(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,be({},r))};Ao.isSideCarExport=!0;function nc(e,t){return e.useMedium(t),Ao}var Mo=rc(),Ar=function(){},Mt=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Ar,onWheelCapture:Ar,onTouchMoveCapture:Ar}),o=n[0],s=n[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,y=e.inert,f=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,w=e.gapMode,x=To(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=v,S=Rl([r,t]),C=be(be({},x),o);return l.createElement(l.Fragment,null,p&&l.createElement(N,{sideCar:Mo,removeScrollBar:d,shards:h,noIsolation:m,inert:y,setCallbacks:s,allowPinchZoom:!!f,lockRef:r,gapMode:w}),i?l.cloneElement(l.Children.only(c),be(be({},C),{ref:S})):l.createElement(b,be({},C,{className:u,ref:S}),c))});Mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mt.classNames={fullWidth:At,zeroRight:Pt};var oc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ac(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oc();return t&&e.setAttribute("nonce",t),e}function sc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var lc=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ac())&&(sc(t,r),ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cc=function(){var e=lc();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ko=function(){var e=cc(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},dc={left:0,top:0,right:0,gap:0},Mr=function(e){return parseInt(e||"",10)||0},uc=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Mr(r),Mr(n),Mr(o)]},fc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dc;var t=uc(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])}},pc=ko(),Xe="data-scroll-locked",hc=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,c=e.gap;return r===void 0&&(r="margin"),`
|
|
141
141
|
.`.concat(Xl,` {
|
|
142
142
|
overflow: hidden `).concat(n,`;
|
|
143
143
|
padding-right: `).concat(c,"px ").concat(n,`;
|
|
@@ -177,10 +177,10 @@
|
|
|
177
177
|
`)},Oo=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},gc=function(){l.useEffect(function(){return document.body.setAttribute(Xe,(Oo()+1).toString()),function(){var e=Oo()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},mc=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;gc();var s=l.useMemo(function(){return fc(o)},[o]);return l.createElement(pc,{styles:hc(s,!t,o,r?"":"!important")})},kr=!1;if(typeof window<"u")try{var kt=Object.defineProperty({},"passive",{get:function(){return kr=!0,!0}});window.addEventListener("test",kt,kt),window.removeEventListener("test",kt,kt)}catch{kr=!1}var Qe=kr?{passive:!1}:!1,vc=function(e){return e.tagName==="TEXTAREA"},Do=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!vc(e)&&r[t]==="visible")},bc=function(e){return Do(e,"overflowY")},yc=function(e){return Do(e,"overflowX")},_o=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Io(e,n);if(o){var s=Lo(e,n),i=s[1],c=s[2];if(i>c)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wc=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},xc=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Io=function(e,t){return e==="v"?bc(t):yc(t)},Lo=function(e,t){return e==="v"?wc(t):xc(t)},Nc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cc=function(e,t,r,n,o){var s=Nc(e,window.getComputedStyle(t).direction),i=s*n,c=r.target,u=t.contains(c),d=!1,p=i>0,h=0,v=0;do{var m=Lo(e,c),y=m[0],f=m[1],g=m[2],b=f-g-s*y;(y||b)&&Io(e,c)&&(h+=b,v+=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(v)<1)&&(d=!0),d},Ot=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$o=function(e){return[e.deltaX,e.deltaY]},Fo=function(e){return e&&"current"in e?e.current:e},Sc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ec=function(e){return`
|
|
178
178
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
179
179
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
180
|
-
`)},Tc=0,Ze=[];function Pc(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),o=l.useState(Tc++)[0],s=l.useState(ko)[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(o));var f=Yl([e.lockRef.current],(e.shards||[]).map(Fo),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[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=Ot(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
|
|
180
|
+
`)},Tc=0,Ze=[];function Pc(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),o=l.useState(Tc++)[0],s=l.useState(ko)[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(o));var f=Yl([e.lockRef.current],(e.shards||[]).map(Fo),!0).filter(Boolean);return f.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[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=Ot(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 B=_o(T,C);if(!B)return!0;if(B?S=T:(S=T==="v"?"h":"v",B=_o(T,C)),!B)return!1;if(!n.current&&"changedTouches"in f&&(x||N)&&(n.current=S),!S)return!0;var I=n.current||S;return Cc(I,g,f,I==="h"?x:N)},[]),u=l.useCallback(function(f){var g=f;if(!(!Ze.length||Ze[Ze.length-1]!==s)){var b="deltaY"in g?$o(g):Ot(g),w=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&Sc(S.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(Fo).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:Ac(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=Ot(f),n.current=void 0},[]),h=l.useCallback(function(f){d(f.type,$o(f),f.target,c(f,e.lockRef.current))},[]),v=l.useCallback(function(f){d(f.type,Ot(f),f.target,c(f,e.lockRef.current))},[]);l.useEffect(function(){return Ze.push(s),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Qe),document.addEventListener("touchmove",u,Qe),document.addEventListener("touchstart",p,Qe),function(){Ze=Ze.filter(function(f){return f!==s}),document.removeEventListener("wheel",u,Qe),document.removeEventListener("touchmove",u,Qe),document.removeEventListener("touchstart",p,Qe)}},[]);var m=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:Ec(o)}):null,m?l.createElement(mc,{gapMode:e.gapMode}):null)}function Ac(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mc=nc(Mo,Pc);var zo=l.forwardRef(function(e,t){return l.createElement(Mt,be({},e,{ref:t,sideCar:Mc}))});zo.classNames=Mt.classNames;var kc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Je=new WeakMap,Dt=new WeakMap,_t={},Or=0,Wo=function(e){return e&&(e.host||Wo(e.parentNode))},Oc=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Wo(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})},Dc=function(e,t,r,n){var o=Oc(t,Array.isArray(e)?e:[e]);_t[r]||(_t[r]=new WeakMap);var s=_t[r],i=[],c=new Set,u=new Set(o),d=function(h){!h||c.has(h)||(c.add(h),d(h.parentNode))};o.forEach(d);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(c.has(v))p(v);else try{var m=v.getAttribute(n),y=m!==null&&m!=="false",f=(Je.get(v)||0)+1,g=(s.get(v)||0)+1;Je.set(v,f),s.set(v,g),i.push(v),f===1&&y&&Dt.set(v,!0),g===1&&v.setAttribute(r,"true"),y||v.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return p(t),c.clear(),Or++,function(){i.forEach(function(h){var v=Je.get(h)-1,m=s.get(h)-1;Je.set(h,v),s.set(h,m),v||(Dt.has(h)||h.removeAttribute(n),Dt.delete(h)),m||h.removeAttribute(r)}),Or--,Or||(Je=new WeakMap,Je=new WeakMap,Dt=new WeakMap,_t={})}},_c=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=kc(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Dc(n,o,r,"aria-hidden")):function(){return null}},Dr="Dialog",[Bo,Ff]=ct(Dr),[Ic,he]=Bo(Dr),Vo=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,c=l.useRef(null),u=l.useRef(null),[d=!1,p]=xr({prop:n,defaultProp:o,onChange:s});return a.jsx(Ic,{scope:t,triggerRef:c,contentRef:u,contentId:Ct(),titleId:Ct(),descriptionId:Ct(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),modal:i,children:r})};Vo.displayName=Dr;var jo="DialogTrigger",Ho=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=he(jo,r),s=se(t,o.triggerRef);return a.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lr(o.open),...n,ref:s,onClick:Q(e.onClick,o.onOpenToggle)})});Ho.displayName=jo;var _r="DialogPortal",[Lc,Uo]=Bo(_r,{forceMount:void 0}),Go=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=he(_r,t);return a.jsx(Lc,{scope:t,forceMount:r,children:l.Children.map(n,i=>a.jsx(ze,{present:r||s.open,children:a.jsx(Et,{asChild:!0,container:o,children:i})}))})};Go.displayName=_r;var It="DialogOverlay",Ko=l.forwardRef((e,t)=>{const r=Uo(It,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=he(It,e.__scopeDialog);return s.modal?a.jsx(ze,{present:n||s.open,children:a.jsx($c,{...o,ref:t})}):null});Ko.displayName=It;var $c=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=he(It,r);return a.jsx(zo,{as:pe,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(J.div,{"data-state":Lr(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),We="DialogContent",qo=l.forwardRef((e,t)=>{const r=Uo(We,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=he(We,e.__scopeDialog);return a.jsx(ze,{present:n||s.open,children:s.modal?a.jsx(Fc,{...o,ref:t}):a.jsx(zc,{...o,ref:t})})});qo.displayName=We;var Fc=l.forwardRef((e,t)=>{const r=he(We,e.__scopeDialog),n=l.useRef(null),o=se(t,r.contentRef,n);return l.useEffect(()=>{const s=n.current;if(s)return _c(s)},[]),a.jsx(Yo,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Q(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Q(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&s.preventDefault()}),onFocusOutside:Q(e.onFocusOutside,s=>s.preventDefault())})}),zc=l.forwardRef((e,t)=>{const r=he(We,e.__scopeDialog),n=l.useRef(!1),o=l.useRef(!1);return a.jsx(Yo,{...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,o.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"&&(o.current=!0));const i=s.target;((d=r.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Yo=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,c=he(We,r),u=l.useRef(null),d=se(t,u);return ql(),a.jsxs(a.Fragment,{children:[a.jsx(wo,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:a.jsx(St,{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)})}),a.jsxs(a.Fragment,{children:[a.jsx(Wc,{titleId:c.titleId}),a.jsx(Vc,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Ir="DialogTitle",Xo=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=he(Ir,r);return a.jsx(J.h2,{id:o.titleId,...n,ref:t})});Xo.displayName=Ir;var Qo="DialogDescription",Zo=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=he(Qo,r);return a.jsx(J.p,{id:o.descriptionId,...n,ref:t})});Zo.displayName=Qo;var Jo="DialogClose",Ro=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=he(Jo,r);return a.jsx(J.button,{type:"button",...n,ref:t,onClick:Q(e.onClick,()=>o.onOpenChange(!1))})});Ro.displayName=Jo;function Lr(e){return e?"open":"closed"}var ea="DialogTitleWarning",[zf,ta]=bl(ea,{contentName:We,titleName:Ir,docsSlug:"dialog"}),Wc=({titleId:e})=>{const t=ta(ea),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
181
181
|
|
|
182
182
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
183
183
|
|
|
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},Bc="DialogDescriptionWarning",Vc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ta(Bc).contentName}}.`;return l.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$r=Vo,ra=Ho,na=Go,Lt=Ko,$t=qo,Ft=Xo,zt=Zo,Wt=Ro;const dt=({modal:e=!1,...t})=>a.jsx($r,{modal:e,...t});dt.displayName=$r.displayName;const Fr=ra,oa=na,zr=Wt,Wr=l.forwardRef(({className:e,...t},r)=>a.jsx(Lt,{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}));Wr.displayName=Lt.displayName;const ut=l.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(oa,{children:[a.jsx(Wr,{}),a.jsxs($t,{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,a.jsxs(Wt,{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:[a.jsx(hr,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ut.displayName=$t.displayName;const Bt=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bt.displayName="DialogHeader";const Br=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Br.displayName="DialogFooter";const Vt=l.forwardRef(({className:e,...t},r)=>a.jsx(Ft,{ref:r,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));Vt.displayName=Ft.displayName;const Vr=l.forwardRef(({className:e,...t},r)=>a.jsx(zt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Vr.displayName=zt.displayName;const aa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sa=Zn,ft=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return sa(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const p=r==null?void 0:r[d],h=s==null?void 0:s[d];if(p===null)return null;const v=aa(p)||aa(h);return o[d][v]}),c=r&&Object.entries(r).reduce((d,p)=>{let[h,v]=p;return v===void 0||(d[h]=v),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:v,...m}=p;return Object.entries(m).every(y=>{let[f,g]=y;return Array.isArray(g)?g.includes({...s,...c}[f]):{...s,...c}[f]===g})?[...d,h,v]:d},[]);return sa(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},jr=ft("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"}}),ne=l.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:s,...i},c)=>{const u=n?pe:"button";if(!o)return a.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:v="Confirm",cancelText:m="Cancel"}=o,y=()=>{h()};return a.jsxs(dt,{children:[a.jsx(Fr,{asChild:!0,children:a.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,...i})}),a.jsxs(ut,{children:[a.jsxs(Bt,{children:[a.jsx(Vt,{children:d}),a.jsx(Vr,{children:p})]}),a.jsxs(Br,{className:"flex justify-end gap-2 pt-4",children:[a.jsx(zr,{asChild:!0,children:a.jsx(ne,{variant:"outline",children:m})}),a.jsx(zr,{asChild:!0,children:a.jsx(ne,{onClick:y,children:v})})]})]})]})});ne.displayName="Button";const jc=["top","right","bottom","left"],ke=Math.min,le=Math.max,jt=Math.round,Ht=Math.floor,ye=e=>({x:e,y:e}),Hc={left:"right",right:"left",bottom:"top",top:"bottom"},Uc={start:"end",end:"start"};function Hr(e,t,r){return le(e,ke(t,r))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Ur(e){return e==="x"?"y":"x"}function Gr(e){return e==="y"?"height":"width"}function Oe(e){return["top","bottom"].includes(Ee(e))?"y":"x"}function Kr(e){return Ur(Oe(e))}function Gc(e,t,r){r===void 0&&(r=!1);const n=Re(e),o=Kr(e),s=Gr(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ut(i)),[i,Ut(i)]}function Kc(e){const t=Ut(e);return[qr(e),t,qr(t)]}function qr(e){return e.replace(/start|end/g,t=>Uc[t])}function qc(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:i;default:return[]}}function Yc(e,t,r,n){const o=Re(e);let s=qc(Ee(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(qr)))),s}function Ut(e){return e.replace(/left|right|bottom|top/g,t=>Hc[t])}function Xc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ia(e){return typeof e!="number"?Xc(e):{top:e,right:e,bottom:e,left:e}}function Gt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function la(e,t,r){let{reference:n,floating:o}=e;const s=Oe(t),i=Kr(t),c=Gr(i),u=Ee(t),d=s==="y",p=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[c]/2-o[c]/2;let m;switch(u){case"top":m={x:p,y:n.y-o.height};break;case"bottom":m={x:p,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}switch(Re(t)){case"start":m[i]-=v*(r&&d?-1:1);break;case"end":m[i]+=v*(r&&d?-1:1);break}return m}const Qc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="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:o}),{x:p,y:h}=la(d,n,u),v=n,m={},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:v,strategy:o,middlewareData:m,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,h=x??h,m={...m,[g]:{...m[g],...N}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:p,y:h}=la(d,v,u)),f=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:m}};async function pt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Se(t,e),y=ia(m),g=c[v?h==="floating"?"reference":"floating":h],b=Gt(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:o,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=Gt(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 Zc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Se(e,t)||{};if(d==null)return{};const h=ia(p),v={x:r,y:n},m=Kr(o),y=Gr(m),f=await i.getDimensions(d),g=m==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[m]-v[m]-s.floating[y],S=v[m]-s.reference[m],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 W=N/2-S/2,I=T/2-f[y]/2-1,B=ke(h[b],I),$=ke(h[w],I),V=B,_=T-f[y]-$,P=T/2-f[y]/2+W,j=Hr(V,P,_),k=!u.arrow&&Re(o)!=null&&P!==j&&s.reference[y]/2-(P<V?B:$)-f[y]/2<0,G=k?P<V?P-V:P-_:0;return{[m]:v[m]+G,data:{[m]:j,centerOffset:P-j-G,...k&&{alignmentOffset:G}},reset:k}}}),Jc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...g}=Se(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Ee(o),w=Oe(c),x=Ee(c)===c,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(x||!f?[Ut(c)]:Kc(c)),C=y!=="none";!v&&C&&S.push(...Yc(c,f,y,N));const T=[c,...S],W=await pt(t,g),I=[];let B=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&I.push(W[b]),h){const P=Gc(o,i,N);I.push(W[P[0]],W[P[1]])}if(B=[...B,{placement:o,overflows:I}],!I.every(P=>P<=0)){var $,V;const P=((($=s.flip)==null?void 0:$.index)||0)+1,j=T[P];if(j)return{data:{index:P,overflows:B},reset:{placement:j}};let k=(V=B.filter(G=>G.overflows[0]<=0).sort((G,D)=>G.overflows[1]-D.overflows[1])[0])==null?void 0:V.placement;if(!k)switch(m){case"bestFit":{var _;const G=(_=B.filter(D=>{if(C){const F=Oe(D.placement);return F===w||F==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(F=>F>0).reduce((F,Z)=>F+Z,0)]).sort((D,F)=>D[1]-F[1])[0])==null?void 0:_[0];G&&(k=G);break}case"initialPlacement":k=c;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function ca(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function da(e){return jc.some(t=>e[t]>=0)}const Rc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Se(e,t);switch(n){case"referenceHidden":{const s=await pt(t,{...o,elementContext:"reference"}),i=ca(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:da(i)}}}case"escaped":{const s=await pt(t,{...o,altBoundary:!0}),i=ca(s,r.floating);return{data:{escapedOffsets:i,escaped:da(i)}}}default:return{}}}}};async function ed(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Ee(r),c=Re(r),u=Oe(r)==="y",d=["left","top"].includes(i)?-1:1,p=s&&u?-1:1,h=Se(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(m=c==="end"?y*-1:y),u?{x:m*p,y:v*d}:{x:v*d,y:m*p}}const td=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await ed(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},rd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Se(e,t),d={x:r,y:n},p=await pt(t,u),h=Oe(Ee(o)),v=Ur(h);let m=d[v],y=d[h];if(s){const g=v==="y"?"top":"left",b=v==="y"?"bottom":"right",w=m+p[g],x=m-p[b];m=Hr(w,m,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,[v]:m,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[v]:s,[h]:i}}}}}},nd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Se(e,t),p={x:r,y:n},h=Oe(o),v=Ur(h);let m=p[v],y=p[h];const f=Se(c,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=v==="y"?"height":"width",N=s.reference[v]-s.floating[x]+g.mainAxis,S=s.reference[v]+s.reference[x]-g.mainAxis;m<N?m=N:m>S&&(m=S)}if(d){var b,w;const x=v==="y"?"width":"height",N=["top","left"].includes(Ee(o)),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{[v]:m,[h]:y}}}},od=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Se(e,t),p=await pt(t,d),h=Ee(o),v=Re(o),m=Oe(o)==="y",{width:y,height:f}=s.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,g=v==="end"?"top":"bottom");const w=f-p.top-p.bottom,x=y-p.left-p.right,N=ke(f-p[g],w),S=ke(y-p[b],x),C=!t.middlewareData.shift;let T=N,W=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(W=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),C&&!v){const B=le(p.left,0),$=le(p.right,0),V=le(p.top,0),_=le(p.bottom,0);m?W=y-2*(B!==0||$!==0?B+$:le(p.left,p.right)):T=f-2*(V!==0||_!==0?V+_:le(p.top,p.bottom))}await u({...t,availableWidth:W,availableHeight:T});const I=await i.getDimensions(c.floating);return y!==I.width||f!==I.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function et(e){return ua(e)?(e.nodeName||"").toLowerCase():"#document"}function ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(ua(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ua(e){return Kt()?e instanceof Node||e instanceof ce(e).Node:!1}function ge(e){return Kt()?e instanceof Element||e instanceof ce(e).Element:!1}function xe(e){return Kt()?e instanceof HTMLElement||e instanceof ce(e).HTMLElement:!1}function fa(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ce(e).ShadowRoot}function ht(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function ad(e){return["table","td","th"].includes(et(e))}function qt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yr(e){const t=Xr(),r=ge(e)?me(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 sd(e){let t=De(e);for(;xe(t)&&!tt(t);){if(Yr(t))return t;if(qt(t))return null;t=De(t)}return null}function Xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tt(e){return["html","body","#document"].includes(et(e))}function me(e){return ce(e).getComputedStyle(e)}function Yt(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fa(e)&&e.host||we(e);return fa(t)?t.host:t}function pa(e){const t=De(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&ht(t)?t:pa(t)}function gt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=pa(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=ce(o);if(s){const c=Qr(i);return t.concat(i,i.visualViewport||[],ht(o)?o:[],c&&r?gt(c):[])}return t.concat(o,gt(o,[],r))}function Qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ha(e){const t=me(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=xe(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,c=jt(r)!==s||jt(n)!==i;return c&&(r=s,n=i),{width:r,height:n,$:c}}function Zr(e){return ge(e)?e:e.contextElement}function rt(e){const t=Zr(e);if(!xe(t))return ye(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=ha(t);let i=(s?jt(r.width):r.width)/n,c=(s?jt(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const id=ye(0);function ga(e){const t=ce(e);return!Xr()||!t.visualViewport?id:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ld(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ce(e)?!1:t}function Be(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Zr(e);let i=ye(1);t&&(n?ge(n)&&(i=rt(n)):i=rt(e));const c=ld(s,r,n)?ga(s):ye(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,p=o.width/i.x,h=o.height/i.y;if(s){const v=ce(s),m=n&&ge(n)?ce(n):n;let y=v,f=Qr(y);for(;f&&n&&m!==y;){const g=rt(f),b=f.getBoundingClientRect(),w=me(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=ce(f),f=Qr(y)}}return Gt({width:p,height:h,x:u,y:d})}function Jr(e,t){const r=Yt(e).scrollLeft;return t?t.left+r:Be(we(e)).left+r}function ma(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Jr(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function cd(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=we(n),c=t?qt(t.floating):!1;if(n===i||c&&s)return r;let u={scrollLeft:0,scrollTop:0},d=ye(1);const p=ye(0),h=xe(n);if((h||!h&&!s)&&((et(n)!=="body"||ht(i))&&(u=Yt(n)),xe(n))){const m=Be(n);d=rt(n),p.x=m.x+n.clientLeft,p.y=m.y+n.clientTop}const v=i&&!h&&!s?ma(i,u,!0):ye(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+v.x,y:r.y*d.y-u.scrollTop*d.y+p.y+v.y}}function dd(e){return Array.from(e.getClientRects())}function ud(e){const t=we(e),r=Yt(e),n=e.ownerDocument.body,o=le(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=le(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return me(n).direction==="rtl"&&(i+=le(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:c}}function fd(e,t){const r=ce(e),n=we(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const d=Xr();(!d||d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:s,height:i,x:c,y:u}}function pd(e,t){const r=Be(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=xe(e)?rt(e):ye(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,d=n*s.y;return{width:i,height:c,x:u,y:d}}function va(e,t,r){let n;if(t==="viewport")n=fd(e,r);else if(t==="document")n=ud(we(e));else if(ge(t))n=pd(t,r);else{const o=ga(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gt(n)}function ba(e,t){const r=De(e);return r===t||!ge(r)||tt(r)?!1:me(r).position==="fixed"||ba(r,t)}function hd(e,t){const r=t.get(e);if(r)return r;let n=gt(e,[],!1).filter(c=>ge(c)&&et(c)!=="body"),o=null;const s=me(e).position==="fixed";let i=s?De(e):e;for(;ge(i)&&!tt(i);){const c=me(i),u=Yr(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ht(i)&&!u&&ba(e,i))?n=n.filter(p=>p!==i):o=c,i=De(i)}return t.set(e,n),n}function gd(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?qt(t)?[]:hd(t,this._c):[].concat(r),n],c=i[0],u=i.reduce((d,p)=>{const h=va(t,p,o);return d.top=le(h.top,d.top),d.right=ke(h.right,d.right),d.bottom=ke(h.bottom,d.bottom),d.left=le(h.left,d.left),d},va(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function md(e){const{width:t,height:r}=ha(e);return{width:t,height:r}}function vd(e,t,r){const n=xe(t),o=we(t),s=r==="fixed",i=Be(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=ye(0);if(n||!n&&!s)if((et(t)!=="body"||ht(o))&&(c=Yt(t)),n){const v=Be(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Jr(o));const d=o&&!n&&!s?ma(o,c):ye(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 me(e).position==="static"}function ya(e,t){if(!xe(e)||me(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return we(e)===r&&(r=r.ownerDocument.body),r}function wa(e,t){const r=ce(e);if(qt(e))return r;if(!xe(e)){let o=De(e);for(;o&&!tt(o);){if(ge(o)&&!Rr(o))return o;o=De(o)}return r}let n=ya(e,t);for(;n&&ad(n)&&Rr(n);)n=ya(n,t);return n&&tt(n)&&Rr(n)&&!Yr(n)?r:n||sd(e)||r}const bd=async function(e){const t=this.getOffsetParent||wa,r=this.getDimensions,n=await r(e.floating);return{reference:vd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function yd(e){return me(e).direction==="rtl"}const wd={convertOffsetParentRelativeRectToViewportRelativeRect:cd,getDocumentElement:we,getClippingRect:gd,getOffsetParent:wa,getElementRects:bd,getClientRects:dd,getDimensions:md,getScale:rt,isElement:ge,isRTL:yd};function xa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xd(e,t){let r=null,n;const o=we(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:v,height:m}=d;if(c||t(),!v||!m)return;const y=Ht(h),f=Ht(o.clientWidth-(p+v)),g=Ht(o.clientHeight-(h+m)),b=Ht(p),x={rootMargin:-y+"px "+-f+"px "+-g+"px "+-b+"px",threshold:le(0,ke(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&&!xa(d,e.getBoundingClientRect())&&i(),N=!1}try{r=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),s}function Nd(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Zr(e),p=o||s?[...d?gt(d):[],...gt(t)]:[];p.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=d&&c?xd(d,r):null;let v=-1,m=null;i&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let y,f=u?Be(e):null;u&&g();function g(){const b=Be(e);f&&!xa(f,b)&&r(),f=b,y=requestAnimationFrame(g)}return r(),()=>{var b;p.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const Cd=td,Sd=rd,Ed=Jc,Td=od,Pd=Rc,Na=Zc,Ad=nd,Md=(e,t,r)=>{const n=new Map,o={platform:wd,...r},s={...o.platform,_c:n};return Qc(e,t,{...o,platform:s})};var Xt=typeof document<"u"?q.useLayoutEffect:q.useEffect;function Qt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Qt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Qt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ca(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sa(e,t){const r=Ca(e);return Math.round(t*r)/r}function en(e){const t=l.useRef(e);return Xt(()=>{t.current=e}),t}function kd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,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}),[v,m]=l.useState(n);Qt(v,n)||m(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),W=l.useRef(p),I=u!=null,B=en(u),$=en(o),V=en(d),_=l.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:v};$.current&&(D.platform=$.current),Md(C.current,T.current,D).then(F=>{const Z={...F,isPositioned:V.current!==!1};P.current&&!Qt(W.current,Z)&&(W.current=Z,pr.flushSync(()=>{h(Z)}))})},[v,t,r,$,V]);Xt(()=>{d===!1&&W.current.isPositioned&&(W.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[d]);const P=l.useRef(!1);Xt(()=>(P.current=!0,()=>{P.current=!1}),[]),Xt(()=>{if(N&&(C.current=N),S&&(T.current=S),N&&S){if(B.current)return B.current(N,S,_);_()}},[N,S,_,B,I]);const j=l.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:x}),[w,x]),k=l.useMemo(()=>({reference:N,floating:S}),[N,S]),G=l.useMemo(()=>{const D={position:r,left:0,top:0};if(!k.floating)return D;const F=Sa(k.floating,p.x),Z=Sa(k.floating,p.y);return c?{...D,transform:"translate("+F+"px, "+Z+"px)",...Ca(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:Z}},[r,c,k.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:_,refs:j,elements:k,floatingStyles:G}),[p,_,j,k,G])}const Od=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Na({element:n.current,padding:o}).fn(r):{}:n?Na({element:n,padding:o}).fn(r):{}}}},Dd=(e,t)=>({...Cd(e),options:[e,t]}),_d=(e,t)=>({...Sd(e),options:[e,t]}),Id=(e,t)=>({...Ad(e),options:[e,t]}),Ld=(e,t)=>({...Ed(e),options:[e,t]}),$d=(e,t)=>({...Td(e),options:[e,t]}),Fd=(e,t)=>({...Pd(e),options:[e,t]}),zd=(e,t)=>({...Od(e),options:[e,t]});var Wd="Arrow",Ea=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return a.jsx(J.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ea.displayName=Wd;var Bd=Ea;function Vd(e){const[t,r]=l.useState(void 0);return Ae(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[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",[Ta,Pa]=ct(tn),[jd,Aa]=Ta(tn),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return a.jsx(jd,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=tn;var ka="PopperAnchor",Oa=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Aa(ka,r),i=l.useRef(null),c=ae(t,i);return l.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:a.jsx(J.div,{...o,ref:c})});Oa.displayName=ka;var rn="PopperContent",[Hd,Ud]=Ta(rn),Da=l.forwardRef((e,t)=>{var Ce,yt,cr,wt,dr,it;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...f}=e,g=Aa(rn,r),[b,w]=l.useState(null),x=ae(t,je=>w(je)),[N,S]=l.useState(null),C=Vd(N),T=(C==null?void 0:C.width)??0,W=(C==null?void 0:C.height)??0,I=n+(s!=="center"?"-"+s:""),B=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(d)?d:[d],V=$.length>0,_={padding:B,boundary:$.filter(Kd),altBoundary:V},{refs:P,floatingStyles:j,placement:k,isPositioned:G,middlewareData:D}=kd({strategy:"fixed",placement:I,whileElementsMounted:(...je)=>Nd(...je,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Dd({mainAxis:o+W,alignmentAxis:i}),u&&_d({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Id():void 0,..._}),u&&Ld({..._}),$d({..._,apply:({elements:je,rects:L,availableWidth:z,availableHeight:oe})=>{const{width:se,height:ie}=L.reference,Y=je.floating.style;Y.setProperty("--radix-popper-available-width",`${z}px`),Y.setProperty("--radix-popper-available-height",`${oe}px`),Y.setProperty("--radix-popper-anchor-width",`${se}px`),Y.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),N&&zd({element:N,padding:c}),qd({arrowWidth:T,arrowHeight:W}),v&&Fd({strategy:"referenceHidden",..._})]}),[F,Z]=La(k),ee=fe(y);Ae(()=>{G&&(ee==null||ee())},[G,ee]);const H=(Ce=D.arrow)==null?void 0:Ce.x,K=(yt=D.arrow)==null?void 0:yt.y,te=((cr=D.arrow)==null?void 0:cr.centerOffset)!==0,[de,_e]=l.useState();return Ae(()=>{b&&_e(window.getComputedStyle(b).zIndex)},[b]),a.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:G?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(wt=D.transformOrigin)==null?void 0:wt.x,(dr=D.transformOrigin)==null?void 0:dr.y].join(" "),...((it=D.hide)==null?void 0:it.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Hd,{scope:r,placedSide:F,onArrowChange:S,arrowX:H,arrowY:K,shouldHideArrow:te,children:a.jsx(J.div,{"data-side":F,"data-align":Z,...f,ref:x,style:{...f.style,animation:G?void 0:"none"}})})})});Da.displayName=rn;var _a="PopperArrow",Gd={top:"bottom",right:"left",bottom:"top",left:"right"},Ia=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Ud(_a,n),i=Gd[s.placedSide];return a.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:a.jsx(Bd,{...o,ref:r,style:{...o.style,display:"block"}})})});Ia.displayName=_a;function Kd(e){return e!==null}var qd=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=La(r),h={start:"0%",center:"50%",end:"100%"}[p],v=(((b=o.arrow)==null?void 0:b.x)??0)+c/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",f="";return d==="bottom"?(y=i?h:`${v}px`,f=`${-u}px`):d==="top"?(y=i?h:`${v}px`,f=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,f=i?h:`${m}px`):d==="left"&&(y=`${n.floating.width+u}px`,f=i?h:`${m}px`),{data:{x:y,y:f}}}});function La(e){const[t,r="center"]=e.split("-");return[t,r]}var Yd=Ma,Xd=Oa,Qd=Da,Zd=Ia,Jd="VisuallyHidden",Zt=l.forwardRef((e,t)=>a.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}}));Zt.displayName=Jd;var Rd=Zt,[Jt,Wf]=ct("Tooltip",[Pa]),Rt=Pa(),$a="TooltipProvider",eu=700,nn="tooltip.open",[tu,on]=Jt($a),Fa=e=>{const{__scopeTooltip:t,delayDuration:r=eu,skipDelayDuration:n=300,disableHoverableContent:o=!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)},[]),a.jsx(tu,{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:o,children:s})};Fa.displayName=$a;var er="Tooltip",[ru,mt]=Jt(er),za=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,u=on(er,e.__scopeTooltip),d=Rt(t),[p,h]=l.useState(null),v=Ct(),m=l.useRef(0),y=i??u.disableHoverableContent,f=c??u.delayDuration,g=l.useRef(!1),[b=!1,w]=xr({prop:n,defaultProp:o,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(m.current),m.current=0,g.current=!1,w(!0)},[w]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),C=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},f)},[f,w]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),a.jsx(Yd,{...d,children:a.jsx(ru,{scope:t,contentId:v,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(m.current),m.current=0)},[S,y]),onOpen:N,onClose:S,disableHoverableContent:y,children:r})})};za.displayName=er;var an="TooltipTrigger",Wa=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mt(an,r),s=on(an,r),i=Rt(r),c=l.useRef(null),u=ae(t,c,o.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Xd,{asChild:!0,...i,children:a.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:Q(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Wa.displayName=an;var sn="TooltipPortal",[nu,ou]=Jt(sn,{forceMount:void 0}),Ba=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=mt(sn,t);return a.jsx(nu,{scope:t,forceMount:r,children:a.jsx(ze,{present:r||s.open,children:a.jsx(Et,{asChild:!0,container:o,children:n})})})};Ba.displayName=sn;var nt="TooltipContent",Va=l.forwardRef((e,t)=>{const r=ou(nt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,i=mt(nt,e.__scopeTooltip);return a.jsx(ze,{present:n||i.open,children:i.disableHoverableContent?a.jsx(ja,{side:o,...s,ref:t}):a.jsx(au,{side:o,...s,ref:t})})}),au=l.forwardRef((e,t)=>{const r=mt(nt,e.__scopeTooltip),n=on(nt,e.__scopeTooltip),o=l.useRef(null),s=ae(t,o),[i,c]=l.useState(null),{trigger:u,onClose:d}=r,p=o.current,{onPointerInTransitChange:h}=n,v=l.useCallback(()=>{c(null),h(!1)},[h]),m=l.useCallback((y,f)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=cu(b,g.getBoundingClientRect()),x=du(b,w),N=uu(f.getBoundingClientRect()),S=pu([...x,...N]);c(S),h(!0)},[h]);return l.useEffect(()=>()=>v(),[v]),l.useEffect(()=>{if(u&&p){const y=g=>m(g,p),f=g=>m(g,u);return u.addEventListener("pointerleave",y),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",f)}}},[u,p,m,v]),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=!fu(b,i);w?v():x&&(v(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,p,i,d,v]),a.jsx(ja,{...e,ref:s})}),[su,iu]=Jt(er,{isInside:!1}),ja=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,u=mt(nt,r),d=Rt(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(nn,p),()=>document.removeEventListener(nn,p)),[p]),l.useEffect(()=>{if(u.trigger){const h=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),a.jsx(St,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:a.jsxs(Qd,{"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:[a.jsx(fo,{children:n}),a.jsx(su,{scope:r,isInside:!0,children:a.jsx(Rd,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Va.displayName=nt;var Ha="TooltipArrow",lu=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Rt(r);return iu(Ha,r).isInside?null:a.jsx(Zd,{...o,...n,ref:t})});lu.displayName=Ha;function cu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function du(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 uu(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function fu(e,t){const{x:r,y:n}=e;let o=!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&&(o=!o)}return o}function pu(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),hu(t)}function hu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var gu=Fa,mu=za,vu=Wa,bu=Ba,Ua=Va;const ot=gu,at=mu,st=vu,Ve=l.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(bu,{children:a.jsx(Ua,{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})}));Ve.displayName=Ua.displayName;const tr=l.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:o,...s},i)=>{const[c,u]=l.useState(!1),d=l.useRef(null),h=o||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),v=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",m=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};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),m())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let 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 a.jsx(ot,{children:a.jsxs(at,{open:c&&!!r,children:[a.jsx(st,{asChild:!0,children:a.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})}),a.jsx(Ve,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:v()})]})})});tr.displayName="Input";var yu="Separator",Ga="horizontal",wu=["horizontal","vertical"],Ka=l.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ga,...o}=e,s=xu(n)?n:Ga,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return a.jsx(J.div,{"data-orientation":s,...c,...o,ref:t})});Ka.displayName=yu;function xu(e){return wu.includes(e)}var qa=Ka;const ln=l.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>a.jsx(qa,{ref:o,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 Ya=$r,Nu=ra,Cu=Wt,Xa=na,cn=l.forwardRef(({className:e,...t},r)=>a.jsx(Lt,{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=Lt.displayName;const Su=ft("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},o)=>a.jsxs(Xa,{children:[a.jsx(cn,{}),a.jsxs($t,{ref:o,className:O(Su({side:e}),t),...n,children:[a.jsxs(Wt,{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:[a.jsx(hr,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));dn.displayName=$t.displayName;const Qa=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Qa.displayName="SheetHeader";const Za=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Za.displayName="SheetFooter";const Ja=l.forwardRef(({className:e,...t},r)=>a.jsx(Ft,{ref:r,className:O("text-lg font-semibold text-foreground",e),...t}));Ja.displayName=Ft.displayName;const Ra=l.forwardRef(({className:e,...t},r)=>a.jsx(zt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Ra.displayName=zt.displayName;function Eu({onClick:e,publicName:t,applicationName:r,partnerId:n}){const o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,i]=q.useState(!1),c=()=>{i(!0)};return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?a.jsx(ne,{asChild:!0,size:"icon",onClick:e,children:a.jsx(Pi,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):a.jsx(ne,{asChild:!0,size:"icon",onClick:e,children:a.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:c})})}),a.jsxs("div",{className:"flex flex-1 flex-col",children:[a.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),a.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Tu="Label",es=l.forwardRef((e,t)=>a.jsx(J.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));es.displayName=Tu;var Pu=es;function Au({className:e,...t}){return a.jsx(Pu,{"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 ts(){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 X({className:e,...t}){return a.jsx("div",{className:O("animate-pulse rounded-md bg-primary/20",e),...t})}const Mu="sidebar:state",ku=60*60*24*7,Ou="16rem",Du="18rem",_u="3rem",Iu="b",rs=l.createContext(null);function vt(){const e=l.useContext(rs);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:o,children:s,...i},c)=>{const u=ts(),[d,p]=l.useState(!1),[h,v]=l.useState(e),m=t??h,y=l.useCallback(w=>{const x=typeof w=="function"?w(m):w;r?r(x):v(x),document.cookie=`${Mu}=${x}; path=/; max-age=${ku}`},[r,m]),f=l.useCallback(()=>u?p(w=>!w):y(w=>!w),[u,y,p]);l.useEffect(()=>{const w=x=>{x.key===Iu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const g=m?"expanded":"collapsed",b=l.useMemo(()=>({state:g,open:m,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:p,toggleSidebar:f}),[g,m,y,u,d,p,f]);return a.jsx(rs.Provider,{value:b,children:a.jsx(ot,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Ou,"--sidebar-width-icon":_u,...o},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:o,...s},i)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:p}=vt();return r==="none"?a.jsx("div",{className:O("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...s,children:o}):c?a.jsx(Ya,{open:d,onOpenChange:p,...s,children:a.jsx(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Du},side:e,children:a.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):a.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:[a.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)")}),a.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:a.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});pn.displayName="Sidebar";const hn=l.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=vt();return a.jsxs(ne,{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),o()},...r,children:[a.jsx(wi,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hn.displayName="SidebarTrigger";const ns=l.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=vt();return a.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})});ns.displayName="SidebarRail";const os=l.forwardRef(({className:e,...t},r)=>a.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}));os.displayName="SidebarInset";const as=l.forwardRef(({className:e,...t},r)=>a.jsx(tr,{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}));as.displayName="SidebarInput";const gn=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"header",className:O("flex flex-col gap-2 p-2",e),...t}));gn.displayName="SidebarHeader";const mn=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"footer",className:O("flex flex-col gap-2 p-2",e),...t}));mn.displayName="SidebarFooter";const ss=l.forwardRef(({className:e,...t},r)=>a.jsx(ln,{ref:r,"data-sidebar":"separator",className:O("mx-2 w-auto bg-sidebar-border",e),...t}));ss.displayName="SidebarSeparator";const vn=l.forwardRef(({className:e,...t},r)=>a.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}));vn.displayName="SidebarContent";const is=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group",className:O("relative flex w-full min-w-0 flex-col p-2",e),...t}));is.displayName="SidebarGroup";const ls=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?pe:"div";return a.jsx(o,{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})});ls.displayName="SidebarGroupLabel";const cs=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?pe:"button";return a.jsx(o,{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})});cs.displayName="SidebarGroupAction";const ds=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group-content",className:O("w-full text-sm",e),...t}));ds.displayName="SidebarGroupContent";const bn=l.forwardRef(({className:e,...t},r)=>a.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)=>a.jsx("li",{ref:r,"data-sidebar":"menu-item",className:O("group/menu-item relative",e),...t}));yn.displayName="SidebarMenuItem";const Lu=ft("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:o,className:s,...i},c)=>{const u=e?pe:"button",{isMobile:d,state:p}=vt(),h=a.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:O(Lu({variant:r,size:n}),s),...i});return o?(typeof o=="string"&&(o={children:o}),a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:h}),a.jsx(Ve,{side:"right",align:"center",hidden:p!=="collapsed"||d,...o})]})):h});wn.displayName="SidebarMenuButton";const us=l.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const s=t?pe:"button";return a.jsx(s,{ref:o,"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})});us.displayName="SidebarMenuAction";const fs=l.forwardRef(({className:e,...t},r)=>a.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}));fs.displayName="SidebarMenuBadge";const ps=l.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.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&&a.jsx(X,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a.jsx(X,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});ps.displayName="SidebarMenuSkeleton";const hs=l.forwardRef(({className:e,...t},r)=>a.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}));hs.displayName="SidebarMenuSub";const gs=l.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));gs.displayName="SidebarMenuSubItem";const ms=l.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},s)=>{const i=e?pe:"a";return a.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),...o})});ms.displayName="SidebarMenuSubButton";function $u(e){const t=e+"CollectionProvider",[r,n]=ct(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:y,children:f}=m,g=q.useRef(null),b=q.useRef(new Map).current;return a.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:f})};i.displayName=t;const c=e+"CollectionSlot",u=q.forwardRef((m,y)=>{const{scope:f,children:g}=m,b=s(c,f),w=ae(y,b.collectionRef);return a.jsx(pe,{ref:w,children:g})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=q.forwardRef((m,y)=>{const{scope:f,children:g,...b}=m,w=q.useRef(null),x=ae(y,w),N=s(d,f);return q.useEffect(()=>(N.itemMap.set(w,{ref:w,...b}),()=>void N.itemMap.delete(w))),a.jsx(pe,{[p]:"",ref:x,children:g})});h.displayName=d;function v(m){const y=s(e+"CollectionConsumer",m);return q.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},v,n]}var xn="ToastProvider",[Nn,Fu,zu]=$u("Toast"),[vs,Bf]=ct("Toast",[zu]),[Wu,rr]=vs(xn),bs=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[c,u]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(!1),v=l.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xn}\`. Expected non-empty \`string\`.`),a.jsx(Nn.Provider,{scope:t,children:a.jsx(Wu,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(m=>m+1),[]),onToastRemove:l.useCallback(()=>p(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:i})})};bs.displayName=xn;var ys="ToastViewport",Bu=["F8"],Cn="toast.viewportPause",Sn="toast.viewportResume",ws=l.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Bu,label:o="Notifications ({hotkey})",...s}=e,i=rr(ys,r),c=Fu(r),u=l.useRef(null),d=l.useRef(null),p=l.useRef(null),h=l.useRef(null),v=ae(t,h,i.onViewportChange),m=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,...Ru(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 W=document.activeElement,I=w.shiftKey;if(w.target===g&&I){(S=d.current)==null||S.focus();return}const V=f({tabbingDirection:I?"backwards":"forwards"}),_=V.findIndex(P=>P===W);Pn(V.slice(_+1))?w.preventDefault():I?(C=d.current)==null||C.focus():(T=p.current)==null||T.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[c,f]),a.jsxs(Ll,{ref:u,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&a.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"forwards"});Pn(g)}}),a.jsx(Nn.Slot,{scope:r,children:a.jsx(J.ol,{tabIndex:-1,...s,ref:v})}),y&&a.jsx(En,{ref:p,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"backwards"});Pn(g)}})]})});ws.displayName=ys;var xs="ToastFocusProxy",En=l.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,s=rr(xs,r);return a.jsx(Zt,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&n()}})});En.displayName=xs;var nr="Toast",Vu="toast.swipeStart",ju="toast.swipeMove",Hu="toast.swipeCancel",Uu="toast.swipeEnd",Ns=l.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:s,...i}=e,[c=!0,u]=xr({prop:n,defaultProp:o,onChange:s});return a.jsx(ze,{present:r||c,children:a.jsx(qu,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:fe(e.onPause),onResume:fe(e.onResume),onSwipeStart:Q(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Q(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:Q(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:Q(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)})})})});Ns.displayName=nr;var[Gu,Ku]=vs(nr,{onClose(){}}),qu=l.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:p,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:m,...y}=e,f=rr(nr,r),[g,b]=l.useState(null),w=ae(t,P=>b(P)),x=l.useRef(null),N=l.useRef(null),S=o||f.duration,C=l.useRef(0),T=l.useRef(S),W=l.useRef(0),{onToastAdd:I,onToastRemove:B}=f,$=fe(()=>{var j;(g==null?void 0:g.contains(document.activeElement))&&((j=f.viewport)==null||j.focus()),i()}),V=l.useCallback(P=>{!P||P===1/0||(window.clearTimeout(W.current),C.current=new Date().getTime(),W.current=window.setTimeout($,P))},[$]);l.useEffect(()=>{const P=f.viewport;if(P){const j=()=>{V(T.current),d==null||d()},k=()=>{const G=new Date().getTime()-C.current;T.current=T.current-G,window.clearTimeout(W.current),u==null||u()};return P.addEventListener(Cn,k),P.addEventListener(Sn,j),()=>{P.removeEventListener(Cn,k),P.removeEventListener(Sn,j)}}},[f.viewport,S,u,d,V]),l.useEffect(()=>{s&&!f.isClosePausedRef.current&&V(S)},[s,S,f.isClosePausedRef,V]),l.useEffect(()=>(I(),()=>B()),[I,B]);const _=l.useMemo(()=>g?Ms(g):null,[g]);return f.viewport?a.jsxs(a.Fragment,{children:[_&&a.jsx(Yu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),a.jsx(Gu,{scope:r,onClose:$,children:pr.createPortal(a.jsx(Nn.ItemSlot,{scope:r,children:a.jsx(Il,{asChild:!0,onEscapeKeyDown:Q(c,()=>{f.isFocusedToastEscapeKeyDownRef.current||$(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.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:Q(e.onKeyDown,P=>{P.key==="Escape"&&(c==null||c(P.nativeEvent),P.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:Q(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:Q(e.onPointerMove,P=>{if(!x.current)return;const j=P.clientX-x.current.x,k=P.clientY-x.current.y,G=!!N.current,D=["left","right"].includes(f.swipeDirection),F=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,Z=D?F(0,j):0,ee=D?0:F(0,k),H=P.pointerType==="touch"?10:2,K={x:Z,y:ee},te={originalEvent:P,delta:K};G?(N.current=K,or(ju,h,te,{discrete:!1})):ks(K,f.swipeDirection,H)?(N.current=K,or(Vu,p,te,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(j)>H||Math.abs(k)>H)&&(x.current=null)}),onPointerUp:Q(e.onPointerUp,P=>{const j=N.current,k=P.target;if(k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),N.current=null,x.current=null,j){const G=P.currentTarget,D={originalEvent:P,delta:j};ks(j,f.swipeDirection,f.swipeThreshold)?or(Uu,m,D,{discrete:!0}):or(Hu,v,D,{discrete:!0}),G.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Yu=e=>{const{__scopeToast:t,children:r,...n}=e,o=rr(nr,t),[s,i]=l.useState(!1),[c,u]=l.useState(!1);return Zu(()=>i(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:a.jsx(Et,{asChild:!0,children:a.jsx(Zt,{...n,children:s&&a.jsxs(a.Fragment,{children:[o.label," ",r]})})})},Xu="ToastTitle",Cs=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(J.div,{...n,ref:t})});Cs.displayName=Xu;var Qu="ToastDescription",Ss=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(J.div,{...n,ref:t})});Ss.displayName=Qu;var Es="ToastAction",Ts=l.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?a.jsx(As,{altText:r,asChild:!0,children:a.jsx(Tn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Es}\`. Expected non-empty \`string\`.`),null)});Ts.displayName=Es;var Ps="ToastClose",Tn=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Ku(Ps,r);return a.jsx(As,{asChild:!0,children:a.jsx(J.button,{type:"button",...n,ref:t,onClick:Q(e.onClick,o.onClose)})})});Tn.displayName=Ps;var As=l.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return a.jsx(J.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Ms(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Ju(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Ms(n))}}),t}function or(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?po(o,s):o.dispatchEvent(s)}var ks=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return t==="left"||t==="right"?s&&n>r:!s&&o>r};function Zu(e=()=>{}){const t=fe(e);Ae(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Ju(e){return e.nodeType===e.ELEMENT_NODE}function Ru(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var ef=bs,Os=ws,Ds=Ns,_s=Cs,Is=Ss,Ls=Ts,$s=Tn;const Fs=ef,An=l.forwardRef(({className:e,...t},r)=>a.jsx(Os,{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=Os.displayName;const tf=ft("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)=>a.jsx(Ds,{ref:n,className:O(tf({variant:t}),e),...r}));Mn.displayName=Ds.displayName;const zs=l.forwardRef(({className:e,...t},r)=>a.jsx(Ls,{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}));zs.displayName=Ls.displayName;const kn=l.forwardRef(({className:e,...t},r)=>a.jsx($s,{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:a.jsx(hr,{className:"h-4 w-4"})}));kn.displayName=$s.displayName;const On=l.forwardRef(({className:e,...t},r)=>a.jsx(_s,{ref:r,className:O("text-sm font-semibold [&+div]:text-xs",e),...t}));On.displayName=_s.displayName;const Dn=l.forwardRef(({className:e,...t},r)=>a.jsx(Is,{ref:r,className:O("text-sm opacity-90",e),...t}));Dn.displayName=Is.displayName;const rf=1,nf=1e6;let _n=0;function of(){return _n=(_n+1)%Number.MAX_SAFE_INTEGER,_n.toString()}const In=new Map,Ws=e=>{if(In.has(e))return;const t=setTimeout(()=>{In.delete(e),bt({type:"REMOVE_TOAST",toastId:e})},nf);In.set(e,t)},af=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,rf)};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?Ws(r):e.toasts.forEach(n=>Ws(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):[]}}},ar=[];let sr={toasts:[]};function bt(e){sr=af(sr,e),ar.forEach(t=>t(sr))}function Bs({...e}){const t=of(),r=o=>bt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>bt({type:"DISMISS_TOAST",toastId:t});return bt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function Ln(){const[e,t]=l.useState(sr);return l.useEffect(()=>(ar.push(t),()=>{const r=ar.indexOf(t);r>-1&&ar.splice(r,1)}),[]),{...e,toast:Bs,dismiss:r=>bt({type:"DISMISS_TOAST",toastId:r})}}function Vs(){const{toasts:e}=Ln();return a.jsxs(Fs,{children:[e.map(function({id:t,title:r,description:n,action:o,...s}){return a.jsxs(Mn,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(On,{children:r}),n&&a.jsx(Dn,{children:n})]}),o,a.jsx(kn,{})]},t)}),a.jsx(An,{})]})}function js({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n}){const[o,s]=q.useState(""),i=fr.useLocation(),{toast:c}=Ln();q.useEffect(()=>{const h=new URLSearchParams(i.search).get("q");h&&s(h)},[i.search]);const u=()=>{const p=o.trim();if(!p||p.length<2){c({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(p)},d=p=>{p.key==="Enter"&&u()};return a.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:[a.jsx(hn,{className:"lg:hidden",children:a.jsx(bi,{className:"h-6 w-6"})}),a.jsx("div",{className:"flex flex-1 items-center gap-4",children:a.jsx("div",{className:"relative w-full max-w-sm",children:a.jsxs("div",{children:[a.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:u,"aria-label":"Search",children:a.jsx(Si,{className:"h-4 w-4 text-muted-foreground"})}),a.jsx(tr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:o,onChange:p=>s(p.target.value),onKeyDown:d},"topbar-search")]})})}),r||a.jsx(a.Fragment,{}),e&&a.jsx("div",{className:"flex items-center gap-4",children:a.jsxs(ne,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[a.jsx(vi,{className:"h-4 w-4 text-sidebar-foreground"}),a.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Hs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=fr.useParams(),o=e.filter(s=>s.showInNav);return a.jsxs(pn,{className:"border-r border-sidebar-border",children:[a.jsx(gn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex items-center justify-center",children:a.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),a.jsx("span",{className:"font-semibold text-lg",children:r})]})}),a.jsx(vn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:a.jsx(bn,{children:o.map(s=>{const i=s.icon,c=`/${s.path.replace(":appID",n)}`;return a.jsx(yn,{children:a.jsx(wn,{asChild:!0,children:a.jsxs(fr.Link,{to:c,className:"transition-colors hover:bg-muted px-6",children:[i&&a.jsx(i,{className:"h-4 w-4"}),a.jsx("span",{children:s.label})]})})},s.key)})})}),a.jsx(mn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function sf({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:o,dashboardTitle:s,onSignOut:i,searchPlaceholder:c}){return a.jsx(a.Fragment,{children:a.jsx(fn,{children:a.jsxs("div",{className:"flex grow",children:[a.jsx(Hs,{routes:r,footer:n,dashboardTitle:s}),a.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[a.jsx(js,{onSignOut:i,rightMenu:t,handleValidSearch:o,searchPlaceholder:c}),a.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),a.jsx(Vs,{})]})]})})})}const lf={sm:100,md:200,lg:300,xl:400};function Us({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[o,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,h]=l.useState(!1),v=`https://api.randmar.io/Product/${e}/Video`;l.useEffect(()=>{(async()=>{try{const x=await(await fetch(v+"/Exists")).json();c(x)}catch(w){console.error("Error checking for video:",w),c(!1)}})()},[e,v]);async function m(){if(i){h(!0);try{const w=await(await fetch(v)).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(v),d(!0),setTimeout(()=>{d(!1)},2e3)}function f(){s(!0)}const g=lf[t||"xl"];return a.jsxs(a.Fragment,{children:[a.jsx(dt,{open:o,onOpenChange:s,children:a.jsx(ut,{className:"max-w-4xl p-0 overflow-hidden",children:n?a.jsxs("div",{className:"flex flex-row",children:[a.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[a.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),a.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):a.jsxs("div",{className:"w-full relative",children:[a.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[a.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),a.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",onClick:y,children:u?a.jsx(Kn,{className:"h-4 w-4"}):a.jsx(hi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Copy video link"})})]})}),a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",onClick:m,disabled:p,children:a.jsx(gi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Download video"})})]})})]})]})})}),a.jsxs("div",{className:"relative w-max h-max",children:[a.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&&a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:f,children:a.jsx(xi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Play video"})})]})})]})]})}const ir=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));ir.displayName="Card";const Gs=l.forwardRef(({className:e,...t},r)=>a.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)=>a.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)=>a.jsx("div",{ref:r,className:O("text-sm text-muted-foreground",e),...t}));qs.displayName="CardDescription";const lr=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("p-6 pt-0",e),...t}));lr.displayName="CardContent";const Ys=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("flex items-center p-6 pt-0",e),...t}));Ys.displayName="CardFooter";const cf=ft("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"}}),Ne=l.forwardRef(({className:e,variant:t,size:r,icon:n,children:o,...s},i)=>a.jsxs("div",{ref:i,className:O(cf({variant:t,size:r}),e),...s,children:[n&&a.jsx("span",{className:"mr-1",children:n}),o]}));Ne.displayName="Badge";function df({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((f,g)=>(f.Name||"").localeCompare(g.Name||"")),o=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),v=d(i),m=d(o),y=p+m;return a.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&o.length>0&&a.jsxs("div",{className:"grid grid-cols-2 border-b",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"Total"}),a.jsx("span",{children:y})]}),a.jsx("div",{className:"p-3"})]}),s.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"Canada"}),a.jsx("span",{children:p})]}),a.jsx("div",{className:"p-3"})]}),a.jsxs("div",{className:"grid grid-cols-2",children:[a.jsxs("div",{className:"border-r",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"West"}),a.jsx("span",{children:v})]}),i.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`west-${g}`))]}),a.jsxs("div",{children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"East"}),a.jsx("span",{children:h})]}),c.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`east-${g}`))]})]}),u.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:a.jsx("span",{children:"Other"})}),a.jsx("div",{className:"grid grid-cols-2",children:u.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`other-${g}`))})]})]}),o.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"United States"}),a.jsx("span",{children:m})]}),a.jsx("div",{className:"p-3"})]}),a.jsx("div",{className:"grid grid-cols-2",children:o.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`usa-${g}`))})]}),e.length===0&&a.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function uf({product:e,addToCart:t=!1,syncToShopify:r=!1,defaultOpportunityNumber:n="",viewProductAction:o,addToCartAction:s,isAddToCartActionLoading:i=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var P,j,k,G,D,F,Z,ee;const[d,p]=q.useState(1),[h,v]=q.useState(null),[m,y]=q.useState(0),[f,g]=q.useState(!1),b=((P=e==null?void 0:e.Distribution)==null?void 0:P.RegularPrice)||0,w=((j=e==null?void 0:e.Distribution)==null?void 0:j.Price)||0,[x,N]=q.useState(null),[S,C]=q.useState(!1);if(q.useEffect(()=>{const H=async()=>{if(e!=null&&e.ManufacturerId){C(!0);try{const K=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(K.ok){const te=await K.blob();N(URL.createObjectURL(te))}}catch(K){console.error("Failed to load logo:",K)}finally{C(!1)}}};e!=null&&e.ManufacturerId&&H()},[e==null?void 0:e.ManufacturerId]),q.useEffect(()=>{if(!e)return;if(!h&&n){const K=e.Opportunities.find(te=>te.BidNumber==n);K&&v(K)}const H=h?h.Price:w;y(b>0?Math.round((b-H)/b*100):0)},[e,h,w,b]),q.useEffect(()=>{i||p(1)},[i]),!e)return a.jsx(ir,{className:"hover:shadow-lg transition-shadow",children:a.jsxs(lr,{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-start mb-3",children:[a.jsx(X,{className:"h-7 w-3/4"}),a.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:a.jsx(X,{className:"h-10 w-24 rounded-md"})})]}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx(X,{className:"h-6 w-20 rounded-full"}),a.jsx(X,{className:"h-6 w-24 rounded-full"}),a.jsx(X,{className:"h-6 w-28 rounded-full"})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-20"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-24"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-20 mb-1"}),a.jsx(X,{className:"h-5 w-16"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-20"})]})]}),a.jsx("div",{className:"flex flex-col",children:a.jsx("div",{className:"w-60 h-40",children:a.jsx(X,{className:"w-full h-full rounded-lg"})})})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsx("div",{className:"flex flex-1",children:a.jsxs("div",{className:"w-full",children:[a.jsx(X,{className:"h-4 w-24 mb-3"}),a.jsx(X,{className:"h-16 w-full rounded-md"})]})}),a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx(X,{className:"h-10 w-32 rounded-md"}),a.jsx(X,{className:"h-5 w-24 mt-4"})]})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[a.jsx(X,{className:"h-8 w-32"}),a.jsx(X,{className:"h-6 w-24"})]}),a.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[a.jsx(X,{className:"h-10 w-24 rounded-md"}),a.jsx(X,{className:"h-10 flex-1 rounded-md"})]})]})]})});const T=e.Opportunities||[],W=T.length>0,I=()=>{d>1&&p(d-1)},B=()=>{p(d+1)},$=((G=(k=e.Distribution)==null?void 0:k.Inventory)==null?void 0:G.reduce((H,K)=>H+(K.AvailableQuantity||0),0))||0,V=H=>{try{return new Date(H).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(K){return console.error(K),H.split("T")[0]||"N/A"}},_=()=>{s&&s({quantity:d,bidNumber:(h==null?void 0:h.BidNumber)??null})};return a.jsx(ir,{className:"hover:shadow-lg transition-shadow",children:a.jsxs(lr,{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-start mb-3",children:[a.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),a.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:S?a.jsx(X,{className:"h-10 w-24 rounded-md"}):x&&a.jsx("img",{src:x||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&a.jsxs(Ne,{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:[a.jsx(Kn,{size:"12",className:"mr-1.5"})," ",e.State]}),a.jsxs(Ne,{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:[a.jsx(Ni,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&a.jsxs(Ne,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[a.jsx(pi,{size:"12",className:"mr-1.5"})," Transparency Code"]}),a.jsxs(Ne,{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:[a.jsx(Ei,{size:"12",className:"mr-1.5"})," ",e.ManufacturerCategory.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&a.jsxs(Ne,{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:[a.jsx(Ci,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),a.jsxs(Ne,{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:[a.jsx(Ti,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),a.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),a.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),a.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),a.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]})]})]}),a.jsx("div",{className:"flex flex-col",children:a.jsx(Us,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsx("div",{className:"flex flex-1",children:e.Distribution&&a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"text-sm text-muted-foreground flex items-center",children:"Opportunities"}),W?a.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto pr-1 mt-1",children:T.map((H,K)=>a.jsxs("div",{className:`flex justify-between items-center border border-gray-100 rounded transition-colors py-2 px-4
|
|
185
|
-
${
|
|
186
|
-
`,onClick:()=>v(
|
|
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},Bc="DialogDescriptionWarning",Vc=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ta(Bc).contentName}}.`;return l.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},$r=Vo,ra=Ho,na=Go,Lt=Ko,$t=qo,Ft=Xo,zt=Zo,Wt=Ro;const dt=({modal:e=!1,...t})=>a.jsx($r,{modal:e,...t});dt.displayName=$r.displayName;const Fr=ra,oa=na,zr=Wt,Wr=l.forwardRef(({className:e,...t},r)=>a.jsx(Lt,{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}));Wr.displayName=Lt.displayName;const ut=l.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(oa,{children:[a.jsx(Wr,{}),a.jsxs($t,{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,a.jsxs(Wt,{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:[a.jsx(hr,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ut.displayName=$t.displayName;const Bt=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bt.displayName="DialogHeader";const Br=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Br.displayName="DialogFooter";const Vt=l.forwardRef(({className:e,...t},r)=>a.jsx(Ft,{ref:r,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));Vt.displayName=Ft.displayName;const Vr=l.forwardRef(({className:e,...t},r)=>a.jsx(zt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Vr.displayName=zt.displayName;const aa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sa=Zn,ft=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return sa(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(d=>{const p=r==null?void 0:r[d],h=s==null?void 0:s[d];if(p===null)return null;const v=aa(p)||aa(h);return o[d][v]}),c=r&&Object.entries(r).reduce((d,p)=>{let[h,v]=p;return v===void 0||(d[h]=v),d},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:h,className:v,...m}=p;return Object.entries(m).every(y=>{let[f,g]=y;return Array.isArray(g)?g.includes({...s,...c}[f]):{...s,...c}[f]===g})?[...d,h,v]:d},[]);return sa(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},jr=ft("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"}}),ne=l.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,confirmationDialog:o,onClick:s,...i},c)=>{const u=n?pe:"button";if(!o)return a.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:v="Confirm",cancelText:m="Cancel"}=o,y=()=>{h()};return a.jsxs(dt,{children:[a.jsx(Fr,{asChild:!0,children:a.jsx(u,{className:O(jr({variant:t,size:r,className:e})),ref:c,...i})}),a.jsxs(ut,{children:[a.jsxs(Bt,{children:[a.jsx(Vt,{children:d}),a.jsx(Vr,{children:p})]}),a.jsxs(Br,{className:"flex justify-end gap-2 pt-4",children:[a.jsx(zr,{asChild:!0,children:a.jsx(ne,{variant:"outline",children:m})}),a.jsx(zr,{asChild:!0,children:a.jsx(ne,{onClick:y,children:v})})]})]})]})});ne.displayName="Button";const jc=["top","right","bottom","left"],Oe=Math.min,ce=Math.max,jt=Math.round,Ht=Math.floor,ye=e=>({x:e,y:e}),Hc={left:"right",right:"left",bottom:"top",top:"bottom"},Uc={start:"end",end:"start"};function Hr(e,t,r){return ce(e,Oe(t,r))}function Ee(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Ur(e){return e==="x"?"y":"x"}function Gr(e){return e==="y"?"height":"width"}function De(e){return["top","bottom"].includes(Te(e))?"y":"x"}function Kr(e){return Ur(De(e))}function Gc(e,t,r){r===void 0&&(r=!1);const n=Re(e),o=Kr(e),s=Gr(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ut(i)),[i,Ut(i)]}function Kc(e){const t=Ut(e);return[qr(e),t,qr(t)]}function qr(e){return e.replace(/start|end/g,t=>Uc[t])}function qc(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:i;default:return[]}}function Yc(e,t,r,n){const o=Re(e);let s=qc(Te(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(qr)))),s}function Ut(e){return e.replace(/left|right|bottom|top/g,t=>Hc[t])}function Xc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ia(e){return typeof e!="number"?Xc(e):{top:e,right:e,bottom:e,left:e}}function Gt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function la(e,t,r){let{reference:n,floating:o}=e;const s=De(t),i=Kr(t),c=Gr(i),u=Te(t),d=s==="y",p=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,v=n[c]/2-o[c]/2;let m;switch(u){case"top":m={x:p,y:n.y-o.height};break;case"bottom":m={x:p,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}switch(Re(t)){case"start":m[i]-=v*(r&&d?-1:1);break;case"end":m[i]+=v*(r&&d?-1:1);break}return m}const Qc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="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:o}),{x:p,y:h}=la(d,n,u),v=n,m={},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:v,strategy:o,middlewareData:m,rects:d,platform:i,elements:{reference:e,floating:t}});p=w??p,h=x??h,m={...m,[g]:{...m[g],...N}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:p,y:h}=la(d,v,u)),f=-1)}return{x:p,y:h,placement:v,strategy:o,middlewareData:m}};async function pt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=Ee(t,e),y=ia(m),g=c[v?h==="floating"?"reference":"floating":h],b=Gt(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:o,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=Gt(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 Zc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:p=0}=Ee(e,t)||{};if(d==null)return{};const h=ia(p),v={x:r,y:n},m=Kr(o),y=Gr(m),f=await i.getDimensions(d),g=m==="y",b=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[m]-v[m]-s.floating[y],S=v[m]-s.reference[m],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 B=N/2-S/2,I=T/2-f[y]/2-1,V=Oe(h[b],I),$=Oe(h[w],I),j=V,_=T-f[y]-$,P=T/2-f[y]/2+B,H=Hr(j,P,_),k=!u.arrow&&Re(o)!=null&&P!==H&&s.reference[y]/2-(P<j?V:$)-f[y]/2<0,G=k?P<j?P-j:P-_:0;return{[m]:v[m]+G,data:{[m]:H,centerOffset:P-H-G,...k&&{alignmentOffset:G}},reset:k}}}),Jc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:f=!0,...g}=Ee(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=Te(o),w=De(c),x=Te(c)===c,N=await(u.isRTL==null?void 0:u.isRTL(d.floating)),S=v||(x||!f?[Ut(c)]:Kc(c)),C=y!=="none";!v&&C&&S.push(...Yc(c,f,y,N));const T=[c,...S],B=await pt(t,g),I=[];let V=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&I.push(B[b]),h){const P=Gc(o,i,N);I.push(B[P[0]],B[P[1]])}if(V=[...V,{placement:o,overflows:I}],!I.every(P=>P<=0)){var $,j;const P=((($=s.flip)==null?void 0:$.index)||0)+1,H=T[P];if(H)return{data:{index:P,overflows:V},reset:{placement:H}};let k=(j=V.filter(G=>G.overflows[0]<=0).sort((G,D)=>G.overflows[1]-D.overflows[1])[0])==null?void 0:j.placement;if(!k)switch(m){case"bestFit":{var _;const G=(_=V.filter(D=>{if(C){const F=De(D.placement);return F===w||F==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(F=>F>0).reduce((F,Z)=>F+Z,0)]).sort((D,F)=>D[1]-F[1])[0])==null?void 0:_[0];G&&(k=G);break}case"initialPlacement":k=c;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function ca(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function da(e){return jc.some(t=>e[t]>=0)}const Rc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Ee(e,t);switch(n){case"referenceHidden":{const s=await pt(t,{...o,elementContext:"reference"}),i=ca(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:da(i)}}}case"escaped":{const s=await pt(t,{...o,altBoundary:!0}),i=ca(s,r.floating);return{data:{escapedOffsets:i,escaped:da(i)}}}default:return{}}}}};async function ed(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Te(r),c=Re(r),u=De(r)==="y",d=["left","top"].includes(i)?-1:1,p=s&&u?-1:1,h=Ee(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(m=c==="end"?y*-1:y),u?{x:m*p,y:v*d}:{x:v*d,y:m*p}}const td=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:c}=t,u=await ed(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},rd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...u}=Ee(e,t),d={x:r,y:n},p=await pt(t,u),h=De(Te(o)),v=Ur(h);let m=d[v],y=d[h];if(s){const g=v==="y"?"top":"left",b=v==="y"?"bottom":"right",w=m+p[g],x=m-p[b];m=Hr(w,m,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,[v]:m,[h]:y});return{...f,data:{x:f.x-r,y:f.y-n,enabled:{[v]:s,[h]:i}}}}}},nd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ee(e,t),p={x:r,y:n},h=De(o),v=Ur(h);let m=p[v],y=p[h];const f=Ee(c,t),g=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(u){const x=v==="y"?"height":"width",N=s.reference[v]-s.floating[x]+g.mainAxis,S=s.reference[v]+s.reference[x]-g.mainAxis;m<N?m=N:m>S&&(m=S)}if(d){var b,w;const x=v==="y"?"width":"height",N=["top","left"].includes(Te(o)),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{[v]:m,[h]:y}}}},od=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ee(e,t),p=await pt(t,d),h=Te(o),v=Re(o),m=De(o)==="y",{width:y,height:f}=s.floating;let g,b;h==="top"||h==="bottom"?(g=h,b=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(b=h,g=v==="end"?"top":"bottom");const w=f-p.top-p.bottom,x=y-p.left-p.right,N=Oe(f-p[g],w),S=Oe(y-p[b],x),C=!t.middlewareData.shift;let T=N,B=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),C&&!v){const V=ce(p.left,0),$=ce(p.right,0),j=ce(p.top,0),_=ce(p.bottom,0);m?B=y-2*(V!==0||$!==0?V+$:ce(p.left,p.right)):T=f-2*(j!==0||_!==0?j+_:ce(p.top,p.bottom))}await u({...t,availableWidth:B,availableHeight:T});const I=await i.getDimensions(c.floating);return y!==I.width||f!==I.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function et(e){return ua(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(ua(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ua(e){return Kt()?e instanceof Node||e instanceof de(e).Node:!1}function ge(e){return Kt()?e instanceof Element||e instanceof de(e).Element:!1}function xe(e){return Kt()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function fa(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function ht(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function ad(e){return["table","td","th"].includes(et(e))}function qt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yr(e){const t=Xr(),r=ge(e)?me(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 sd(e){let t=_e(e);for(;xe(t)&&!tt(t);){if(Yr(t))return t;if(qt(t))return null;t=_e(t)}return null}function Xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tt(e){return["html","body","#document"].includes(et(e))}function me(e){return de(e).getComputedStyle(e)}function Yt(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _e(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fa(e)&&e.host||we(e);return fa(t)?t.host:t}function pa(e){const t=_e(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&ht(t)?t:pa(t)}function gt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=pa(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=de(o);if(s){const c=Qr(i);return t.concat(i,i.visualViewport||[],ht(o)?o:[],c&&r?gt(c):[])}return t.concat(o,gt(o,[],r))}function Qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ha(e){const t=me(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=xe(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,c=jt(r)!==s||jt(n)!==i;return c&&(r=s,n=i),{width:r,height:n,$:c}}function Zr(e){return ge(e)?e:e.contextElement}function rt(e){const t=Zr(e);if(!xe(t))return ye(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=ha(t);let i=(s?jt(r.width):r.width)/n,c=(s?jt(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const id=ye(0);function ga(e){const t=de(e);return!Xr()||!t.visualViewport?id:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ld(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==de(e)?!1:t}function Be(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Zr(e);let i=ye(1);t&&(n?ge(n)&&(i=rt(n)):i=rt(e));const c=ld(s,r,n)?ga(s):ye(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,p=o.width/i.x,h=o.height/i.y;if(s){const v=de(s),m=n&&ge(n)?de(n):n;let y=v,f=Qr(y);for(;f&&n&&m!==y;){const g=rt(f),b=f.getBoundingClientRect(),w=me(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=de(f),f=Qr(y)}}return Gt({width:p,height:h,x:u,y:d})}function Jr(e,t){const r=Yt(e).scrollLeft;return t?t.left+r:Be(we(e)).left+r}function ma(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Jr(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function cd(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=we(n),c=t?qt(t.floating):!1;if(n===i||c&&s)return r;let u={scrollLeft:0,scrollTop:0},d=ye(1);const p=ye(0),h=xe(n);if((h||!h&&!s)&&((et(n)!=="body"||ht(i))&&(u=Yt(n)),xe(n))){const m=Be(n);d=rt(n),p.x=m.x+n.clientLeft,p.y=m.y+n.clientTop}const v=i&&!h&&!s?ma(i,u,!0):ye(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+v.x,y:r.y*d.y-u.scrollTop*d.y+p.y+v.y}}function dd(e){return Array.from(e.getClientRects())}function ud(e){const t=we(e),r=Yt(e),n=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Jr(e);const c=-r.scrollTop;return me(n).direction==="rtl"&&(i+=ce(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:c}}function fd(e,t){const r=de(e),n=we(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,c=0,u=0;if(o){s=o.width,i=o.height;const d=Xr();(!d||d&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:s,height:i,x:c,y:u}}function pd(e,t){const r=Be(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=xe(e)?rt(e):ye(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,u=o*s.x,d=n*s.y;return{width:i,height:c,x:u,y:d}}function va(e,t,r){let n;if(t==="viewport")n=fd(e,r);else if(t==="document")n=ud(we(e));else if(ge(t))n=pd(t,r);else{const o=ga(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gt(n)}function ba(e,t){const r=_e(e);return r===t||!ge(r)||tt(r)?!1:me(r).position==="fixed"||ba(r,t)}function hd(e,t){const r=t.get(e);if(r)return r;let n=gt(e,[],!1).filter(c=>ge(c)&&et(c)!=="body"),o=null;const s=me(e).position==="fixed";let i=s?_e(e):e;for(;ge(i)&&!tt(i);){const c=me(i),u=Yr(i);!u&&c.position==="fixed"&&(o=null),(s?!u&&!o:!u&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ht(i)&&!u&&ba(e,i))?n=n.filter(p=>p!==i):o=c,i=_e(i)}return t.set(e,n),n}function gd(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?qt(t)?[]:hd(t,this._c):[].concat(r),n],c=i[0],u=i.reduce((d,p)=>{const h=va(t,p,o);return d.top=ce(h.top,d.top),d.right=Oe(h.right,d.right),d.bottom=Oe(h.bottom,d.bottom),d.left=ce(h.left,d.left),d},va(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function md(e){const{width:t,height:r}=ha(e);return{width:t,height:r}}function vd(e,t,r){const n=xe(t),o=we(t),s=r==="fixed",i=Be(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const u=ye(0);if(n||!n&&!s)if((et(t)!=="body"||ht(o))&&(c=Yt(t)),n){const v=Be(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Jr(o));const d=o&&!n&&!s?ma(o,c):ye(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 me(e).position==="static"}function ya(e,t){if(!xe(e)||me(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return we(e)===r&&(r=r.ownerDocument.body),r}function wa(e,t){const r=de(e);if(qt(e))return r;if(!xe(e)){let o=_e(e);for(;o&&!tt(o);){if(ge(o)&&!Rr(o))return o;o=_e(o)}return r}let n=ya(e,t);for(;n&&ad(n)&&Rr(n);)n=ya(n,t);return n&&tt(n)&&Rr(n)&&!Yr(n)?r:n||sd(e)||r}const bd=async function(e){const t=this.getOffsetParent||wa,r=this.getDimensions,n=await r(e.floating);return{reference:vd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function yd(e){return me(e).direction==="rtl"}const wd={convertOffsetParentRelativeRectToViewportRelativeRect:cd,getDocumentElement:we,getClippingRect:gd,getOffsetParent:wa,getElementRects:bd,getClientRects:dd,getDimensions:md,getScale:rt,isElement:ge,isRTL:yd};function xa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xd(e,t){let r=null,n;const o=we(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:v,height:m}=d;if(c||t(),!v||!m)return;const y=Ht(h),f=Ht(o.clientWidth-(p+v)),g=Ht(o.clientHeight-(h+m)),b=Ht(p),x={rootMargin:-y+"px "+-f+"px "+-g+"px "+-b+"px",threshold:ce(0,Oe(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&&!xa(d,e.getBoundingClientRect())&&i(),N=!1}try{r=new IntersectionObserver(S,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),s}function Nd(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,d=Zr(e),p=o||s?[...d?gt(d):[],...gt(t)]:[];p.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const h=d&&c?xd(d,r):null;let v=-1,m=null;i&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),r()}),d&&!u&&m.observe(d),m.observe(t));let y,f=u?Be(e):null;u&&g();function g(){const b=Be(e);f&&!xa(f,b)&&r(),f=b,y=requestAnimationFrame(g)}return r(),()=>{var b;p.forEach(w=>{o&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),h==null||h(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const Cd=td,Sd=rd,Ed=Jc,Td=od,Pd=Rc,Na=Zc,Ad=nd,Md=(e,t,r)=>{const n=new Map,o={platform:wd,...r},s={...o.platform,_c:n};return Qc(e,t,{...o,platform:s})};var Xt=typeof document<"u"?q.useLayoutEffect:q.useEffect;function Qt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Qt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Qt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ca(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sa(e,t){const r=Ca(e);return Math.round(t*r)/r}function en(e){const t=l.useRef(e);return Xt(()=>{t.current=e}),t}function kd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,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}),[v,m]=l.useState(n);Qt(v,n)||m(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),B=l.useRef(p),I=u!=null,V=en(u),$=en(o),j=en(d),_=l.useCallback(()=>{if(!C.current||!T.current)return;const D={placement:t,strategy:r,middleware:v};$.current&&(D.platform=$.current),Md(C.current,T.current,D).then(F=>{const Z={...F,isPositioned:j.current!==!1};P.current&&!Qt(B.current,Z)&&(B.current=Z,pr.flushSync(()=>{h(Z)}))})},[v,t,r,$,j]);Xt(()=>{d===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[d]);const P=l.useRef(!1);Xt(()=>(P.current=!0,()=>{P.current=!1}),[]),Xt(()=>{if(N&&(C.current=N),S&&(T.current=S),N&&S){if(V.current)return V.current(N,S,_);_()}},[N,S,_,V,I]);const H=l.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:x}),[w,x]),k=l.useMemo(()=>({reference:N,floating:S}),[N,S]),G=l.useMemo(()=>{const D={position:r,left:0,top:0};if(!k.floating)return D;const F=Sa(k.floating,p.x),Z=Sa(k.floating,p.y);return c?{...D,transform:"translate("+F+"px, "+Z+"px)",...Ca(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:Z}},[r,c,k.floating,p.x,p.y]);return l.useMemo(()=>({...p,update:_,refs:H,elements:k,floatingStyles:G}),[p,_,H,k,G])}const Od=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Na({element:n.current,padding:o}).fn(r):{}:n?Na({element:n,padding:o}).fn(r):{}}}},Dd=(e,t)=>({...Cd(e),options:[e,t]}),_d=(e,t)=>({...Sd(e),options:[e,t]}),Id=(e,t)=>({...Ad(e),options:[e,t]}),Ld=(e,t)=>({...Ed(e),options:[e,t]}),$d=(e,t)=>({...Td(e),options:[e,t]}),Fd=(e,t)=>({...Pd(e),options:[e,t]}),zd=(e,t)=>({...Od(e),options:[e,t]});var Wd="Arrow",Ea=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return a.jsx(J.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ea.displayName=Wd;var Bd=Ea;function Vd(e){const[t,r]=l.useState(void 0);return Me(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[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",[Ta,Pa]=ct(tn),[jd,Aa]=Ta(tn),Ma=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return a.jsx(jd,{scope:t,anchor:n,onAnchorChange:o,children:r})};Ma.displayName=tn;var ka="PopperAnchor",Oa=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=Aa(ka,r),i=l.useRef(null),c=se(t,i);return l.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:a.jsx(J.div,{...o,ref:c})});Oa.displayName=ka;var rn="PopperContent",[Hd,Ud]=Ta(rn),Da=l.forwardRef((e,t)=>{var Se,yt,cr,wt,dr,it;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...f}=e,g=Aa(rn,r),[b,w]=l.useState(null),x=se(t,je=>w(je)),[N,S]=l.useState(null),C=Vd(N),T=(C==null?void 0:C.width)??0,B=(C==null?void 0:C.height)??0,I=n+(s!=="center"?"-"+s:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(d)?d:[d],j=$.length>0,_={padding:V,boundary:$.filter(Kd),altBoundary:j},{refs:P,floatingStyles:H,placement:k,isPositioned:G,middlewareData:D}=kd({strategy:"fixed",placement:I,whileElementsMounted:(...je)=>Nd(...je,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Dd({mainAxis:o+B,alignmentAxis:i}),u&&_d({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Id():void 0,..._}),u&&Ld({..._}),$d({..._,apply:({elements:je,rects:L,availableWidth:W,availableHeight:ae})=>{const{width:ie,height:le}=L.reference,Y=je.floating.style;Y.setProperty("--radix-popper-available-width",`${W}px`),Y.setProperty("--radix-popper-available-height",`${ae}px`),Y.setProperty("--radix-popper-anchor-width",`${ie}px`),Y.setProperty("--radix-popper-anchor-height",`${le}px`)}}),N&&zd({element:N,padding:c}),qd({arrowWidth:T,arrowHeight:B}),v&&Fd({strategy:"referenceHidden",..._})]}),[F,Z]=La(k),te=fe(y);Me(()=>{G&&(te==null||te())},[G,te]);const oe=(Se=D.arrow)==null?void 0:Se.x,z=(yt=D.arrow)==null?void 0:yt.y,K=((cr=D.arrow)==null?void 0:cr.centerOffset)!==0,[R,Ce]=l.useState();return Me(()=>{b&&Ce(window.getComputedStyle(b).zIndex)},[b]),a.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:G?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:R,"--radix-popper-transform-origin":[(wt=D.transformOrigin)==null?void 0:wt.x,(dr=D.transformOrigin)==null?void 0:dr.y].join(" "),...((it=D.hide)==null?void 0:it.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Hd,{scope:r,placedSide:F,onArrowChange:S,arrowX:oe,arrowY:z,shouldHideArrow:K,children:a.jsx(J.div,{"data-side":F,"data-align":Z,...f,ref:x,style:{...f.style,animation:G?void 0:"none"}})})})});Da.displayName=rn;var _a="PopperArrow",Gd={top:"bottom",right:"left",bottom:"top",left:"right"},Ia=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=Ud(_a,n),i=Gd[s.placedSide];return a.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:a.jsx(Bd,{...o,ref:r,style:{...o.style,display:"block"}})})});Ia.displayName=_a;function Kd(e){return e!==null}var qd=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:r,rects:n,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,p]=La(r),h={start:"0%",center:"50%",end:"100%"}[p],v=(((b=o.arrow)==null?void 0:b.x)??0)+c/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+u/2;let y="",f="";return d==="bottom"?(y=i?h:`${v}px`,f=`${-u}px`):d==="top"?(y=i?h:`${v}px`,f=`${n.floating.height+u}px`):d==="right"?(y=`${-u}px`,f=i?h:`${m}px`):d==="left"&&(y=`${n.floating.width+u}px`,f=i?h:`${m}px`),{data:{x:y,y:f}}}});function La(e){const[t,r="center"]=e.split("-");return[t,r]}var Yd=Ma,Xd=Oa,Qd=Da,Zd=Ia,Jd="VisuallyHidden",Zt=l.forwardRef((e,t)=>a.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}}));Zt.displayName=Jd;var Rd=Zt,[Jt,Wf]=ct("Tooltip",[Pa]),Rt=Pa(),$a="TooltipProvider",eu=700,nn="tooltip.open",[tu,on]=Jt($a),Fa=e=>{const{__scopeTooltip:t,delayDuration:r=eu,skipDelayDuration:n=300,disableHoverableContent:o=!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)},[]),a.jsx(tu,{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:o,children:s})};Fa.displayName=$a;var er="Tooltip",[ru,mt]=Jt(er),za=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,u=on(er,e.__scopeTooltip),d=Rt(t),[p,h]=l.useState(null),v=Ct(),m=l.useRef(0),y=i??u.disableHoverableContent,f=c??u.delayDuration,g=l.useRef(!1),[b=!1,w]=xr({prop:n,defaultProp:o,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(m.current),m.current=0,g.current=!1,w(!0)},[w]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),C=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},f)},[f,w]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),a.jsx(Yd,{...d,children:a.jsx(ru,{scope:t,contentId:v,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(m.current),m.current=0)},[S,y]),onOpen:N,onClose:S,disableHoverableContent:y,children:r})})};za.displayName=er;var an="TooltipTrigger",Wa=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=mt(an,r),s=on(an,r),i=Rt(r),c=l.useRef(null),u=se(t,c,o.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Xd,{asChild:!0,...i,children:a.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:Q(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Q(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Wa.displayName=an;var sn="TooltipPortal",[nu,ou]=Jt(sn,{forceMount:void 0}),Ba=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=mt(sn,t);return a.jsx(nu,{scope:t,forceMount:r,children:a.jsx(ze,{present:r||s.open,children:a.jsx(Et,{asChild:!0,container:o,children:n})})})};Ba.displayName=sn;var nt="TooltipContent",Va=l.forwardRef((e,t)=>{const r=ou(nt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,i=mt(nt,e.__scopeTooltip);return a.jsx(ze,{present:n||i.open,children:i.disableHoverableContent?a.jsx(ja,{side:o,...s,ref:t}):a.jsx(au,{side:o,...s,ref:t})})}),au=l.forwardRef((e,t)=>{const r=mt(nt,e.__scopeTooltip),n=on(nt,e.__scopeTooltip),o=l.useRef(null),s=se(t,o),[i,c]=l.useState(null),{trigger:u,onClose:d}=r,p=o.current,{onPointerInTransitChange:h}=n,v=l.useCallback(()=>{c(null),h(!1)},[h]),m=l.useCallback((y,f)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=cu(b,g.getBoundingClientRect()),x=du(b,w),N=uu(f.getBoundingClientRect()),S=pu([...x,...N]);c(S),h(!0)},[h]);return l.useEffect(()=>()=>v(),[v]),l.useEffect(()=>{if(u&&p){const y=g=>m(g,p),f=g=>m(g,u);return u.addEventListener("pointerleave",y),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",f)}}},[u,p,m,v]),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=!fu(b,i);w?v():x&&(v(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,p,i,d,v]),a.jsx(ja,{...e,ref:s})}),[su,iu]=Jt(er,{isInside:!1}),ja=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,u=mt(nt,r),d=Rt(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(nn,p),()=>document.removeEventListener(nn,p)),[p]),l.useEffect(()=>{if(u.trigger){const h=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),a.jsx(St,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:a.jsxs(Qd,{"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:[a.jsx(fo,{children:n}),a.jsx(su,{scope:r,isInside:!0,children:a.jsx(Rd,{id:u.contentId,role:"tooltip",children:o||n})})]})})});Va.displayName=nt;var Ha="TooltipArrow",lu=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Rt(r);return iu(Ha,r).isInside?null:a.jsx(Zd,{...o,...n,ref:t})});lu.displayName=Ha;function cu(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function du(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 uu(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function fu(e,t){const{x:r,y:n}=e;let o=!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&&(o=!o)}return o}function pu(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),hu(t)}function hu(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var gu=Fa,mu=za,vu=Wa,bu=Ba,Ua=Va;const ot=gu,at=mu,st=vu,Ve=l.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(bu,{children:a.jsx(Ua,{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})}));Ve.displayName=Ua.displayName;const tr=l.forwardRef(({className:e,type:t,mask:r,onChange:n,placeholder:o,...s},i)=>{const[c,u]=l.useState(!1),d=l.useRef(null),h=o||(r==="phone"?"(999) 999-9999":r==="postal-code-ca"?"A9A 9A9":r==="zip-code-us"?"99999":""),v=()=>r==="phone"?"Only enter numbers. Formatting will be added automatically.":r==="postal-code-ca"?"Enter letters and numbers only. Spacing will be applied automatically.":r==="zip-code-us"?"Only enter numbers. Formatting will be added automatically.":"",m=()=>{u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},3e3)};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),m())}if(r==="phone"){const w=g.replace(/\D/g,"");w.length<=3?b=w:w.length<=6?b=`(${w.slice(0,3)}) ${w.slice(3)}`:b=`(${w.slice(0,3)}) ${w.slice(3,6)}-${w.slice(6,10)}`}else if(r==="postal-code-ca"){const w=g.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();let x="";for(let 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 a.jsx(ot,{children:a.jsxs(at,{open:c&&!!r,children:[a.jsx(st,{asChild:!0,children:a.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})}),a.jsx(Ve,{side:"top",className:"bg-sidebar text-sidebar-foreground",children:v()})]})})});tr.displayName="Input";var yu="Separator",Ga="horizontal",wu=["horizontal","vertical"],Ka=l.forwardRef((e,t)=>{const{decorative:r,orientation:n=Ga,...o}=e,s=xu(n)?n:Ga,c=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return a.jsx(J.div,{"data-orientation":s,...c,...o,ref:t})});Ka.displayName=yu;function xu(e){return wu.includes(e)}var qa=Ka;const ln=l.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>a.jsx(qa,{ref:o,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 Ya=$r,Nu=ra,Cu=Wt,Xa=na,cn=l.forwardRef(({className:e,...t},r)=>a.jsx(Lt,{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=Lt.displayName;const Su=ft("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},o)=>a.jsxs(Xa,{children:[a.jsx(cn,{}),a.jsxs($t,{ref:o,className:O(Su({side:e}),t),...n,children:[a.jsxs(Wt,{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:[a.jsx(hr,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));dn.displayName=$t.displayName;const Qa=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Qa.displayName="SheetHeader";const Za=({className:e,...t})=>a.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Za.displayName="SheetFooter";const Ja=l.forwardRef(({className:e,...t},r)=>a.jsx(Ft,{ref:r,className:O("text-lg font-semibold text-foreground",e),...t}));Ja.displayName=Ft.displayName;const Ra=l.forwardRef(({className:e,...t},r)=>a.jsx(zt,{ref:r,className:O("text-sm text-muted-foreground",e),...t}));Ra.displayName=zt.displayName;function Eu({onClick:e,publicName:t,applicationName:r,partnerId:n}){const o=`https://api.randmar.io/v4/Partner/${n}/Account/Logo?height=72&width=72`,[s,i]=q.useState(!1),c=()=>{i(!0)};return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-muted "+(e!==void 0?"cursor-pointer":""),children:s?a.jsx(ne,{asChild:!0,size:"icon",onClick:e,children:a.jsx(Pi,{className:"h-5 w-5 text-muted-foreground !bg-sidebar"})}):a.jsx(ne,{asChild:!0,size:"icon",onClick:e,children:a.jsx("img",{src:o,alt:"Partner logo",className:"h-9 w-9 object-cover !bg-sidebar",onError:c})})}),a.jsxs("div",{className:"flex flex-1 flex-col",children:[a.jsx("span",{className:"text-sm font-medium",children:t||"Partner"}),a.jsx("span",{className:"text-xs text-neutral-400",children:r})]})]})}var Tu="Label",es=l.forwardRef((e,t)=>a.jsx(J.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));es.displayName=Tu;var Pu=es;function Au({className:e,...t}){return a.jsx(Pu,{"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 ts(){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 X({className:e,...t}){return a.jsx("div",{className:O("animate-pulse rounded-md bg-primary/20",e),...t})}const Mu="sidebar:state",ku=60*60*24*7,Ou="16rem",Du="18rem",_u="3rem",Iu="b",rs=l.createContext(null);function vt(){const e=l.useContext(rs);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:o,children:s,...i},c)=>{const u=ts(),[d,p]=l.useState(!1),[h,v]=l.useState(e),m=t??h,y=l.useCallback(w=>{const x=typeof w=="function"?w(m):w;r?r(x):v(x),document.cookie=`${Mu}=${x}; path=/; max-age=${ku}`},[r,m]),f=l.useCallback(()=>u?p(w=>!w):y(w=>!w),[u,y,p]);l.useEffect(()=>{const w=x=>{x.key===Iu&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),f())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[f]);const g=m?"expanded":"collapsed",b=l.useMemo(()=>({state:g,open:m,setOpen:y,isMobile:u,openMobile:d,setOpenMobile:p,toggleSidebar:f}),[g,m,y,u,d,p,f]);return a.jsx(rs.Provider,{value:b,children:a.jsx(ot,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Ou,"--sidebar-width-icon":_u,...o},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:o,...s},i)=>{const{isMobile:c,state:u,openMobile:d,setOpenMobile:p}=vt();return r==="none"?a.jsx("div",{className:O("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",n),ref:i,...s,children:o}):c?a.jsx(Ya,{open:d,onOpenChange:p,...s,children:a.jsx(dn,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Du},side:e,children:a.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):a.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:[a.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)")}),a.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:a.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})});pn.displayName="Sidebar";const hn=l.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:o}=vt();return a.jsxs(ne,{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),o()},...r,children:[a.jsx(wi,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hn.displayName="SidebarTrigger";const ns=l.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=vt();return a.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})});ns.displayName="SidebarRail";const os=l.forwardRef(({className:e,...t},r)=>a.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}));os.displayName="SidebarInset";const as=l.forwardRef(({className:e,...t},r)=>a.jsx(tr,{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}));as.displayName="SidebarInput";const gn=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"header",className:O("flex flex-col gap-2 p-2",e),...t}));gn.displayName="SidebarHeader";const mn=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"footer",className:O("flex flex-col gap-2 p-2",e),...t}));mn.displayName="SidebarFooter";const ss=l.forwardRef(({className:e,...t},r)=>a.jsx(ln,{ref:r,"data-sidebar":"separator",className:O("mx-2 w-auto bg-sidebar-border",e),...t}));ss.displayName="SidebarSeparator";const vn=l.forwardRef(({className:e,...t},r)=>a.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}));vn.displayName="SidebarContent";const is=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group",className:O("relative flex w-full min-w-0 flex-col p-2",e),...t}));is.displayName="SidebarGroup";const ls=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?pe:"div";return a.jsx(o,{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})});ls.displayName="SidebarGroupLabel";const cs=l.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const o=t?pe:"button";return a.jsx(o,{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})});cs.displayName="SidebarGroupAction";const ds=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group-content",className:O("w-full text-sm",e),...t}));ds.displayName="SidebarGroupContent";const bn=l.forwardRef(({className:e,...t},r)=>a.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)=>a.jsx("li",{ref:r,"data-sidebar":"menu-item",className:O("group/menu-item relative",e),...t}));yn.displayName="SidebarMenuItem";const Lu=ft("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:o,className:s,...i},c)=>{const u=e?pe:"button",{isMobile:d,state:p}=vt(),h=a.jsx(u,{ref:c,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:O(Lu({variant:r,size:n}),s),...i});return o?(typeof o=="string"&&(o={children:o}),a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:h}),a.jsx(Ve,{side:"right",align:"center",hidden:p!=="collapsed"||d,...o})]})):h});wn.displayName="SidebarMenuButton";const us=l.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},o)=>{const s=t?pe:"button";return a.jsx(s,{ref:o,"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})});us.displayName="SidebarMenuAction";const fs=l.forwardRef(({className:e,...t},r)=>a.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}));fs.displayName="SidebarMenuBadge";const ps=l.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const o=l.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.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&&a.jsx(X,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a.jsx(X,{className:"h-4 flex-1 max-w-(--skeleton-width)","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});ps.displayName="SidebarMenuSkeleton";const hs=l.forwardRef(({className:e,...t},r)=>a.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}));hs.displayName="SidebarMenuSub";const gs=l.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));gs.displayName="SidebarMenuSubItem";const ms=l.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...o},s)=>{const i=e?pe:"a";return a.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),...o})});ms.displayName="SidebarMenuSubButton";function $u(e){const t=e+"CollectionProvider",[r,n]=ct(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:y,children:f}=m,g=q.useRef(null),b=q.useRef(new Map).current;return a.jsx(o,{scope:y,itemMap:b,collectionRef:g,children:f})};i.displayName=t;const c=e+"CollectionSlot",u=q.forwardRef((m,y)=>{const{scope:f,children:g}=m,b=s(c,f),w=se(y,b.collectionRef);return a.jsx(pe,{ref:w,children:g})});u.displayName=c;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=q.forwardRef((m,y)=>{const{scope:f,children:g,...b}=m,w=q.useRef(null),x=se(y,w),N=s(d,f);return q.useEffect(()=>(N.itemMap.set(w,{ref:w,...b}),()=>void N.itemMap.delete(w))),a.jsx(pe,{[p]:"",ref:x,children:g})});h.displayName=d;function v(m){const y=s(e+"CollectionConsumer",m);return q.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},v,n]}var xn="ToastProvider",[Nn,Fu,zu]=$u("Toast"),[vs,Bf]=ct("Toast",[zu]),[Wu,rr]=vs(xn),bs=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[c,u]=l.useState(null),[d,p]=l.useState(0),h=l.useRef(!1),v=l.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xn}\`. Expected non-empty \`string\`.`),a.jsx(Nn.Provider,{scope:t,children:a.jsx(Wu,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:l.useCallback(()=>p(m=>m+1),[]),onToastRemove:l.useCallback(()=>p(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:i})})};bs.displayName=xn;var ys="ToastViewport",Bu=["F8"],Cn="toast.viewportPause",Sn="toast.viewportResume",ws=l.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Bu,label:o="Notifications ({hotkey})",...s}=e,i=rr(ys,r),c=Fu(r),u=l.useRef(null),d=l.useRef(null),p=l.useRef(null),h=l.useRef(null),v=se(t,h,i.onViewportChange),m=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,...Ru(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 B=document.activeElement,I=w.shiftKey;if(w.target===g&&I){(S=d.current)==null||S.focus();return}const j=f({tabbingDirection:I?"backwards":"forwards"}),_=j.findIndex(P=>P===B);Pn(j.slice(_+1))?w.preventDefault():I?(C=d.current)==null||C.focus():(T=p.current)==null||T.focus()}};return g.addEventListener("keydown",b),()=>g.removeEventListener("keydown",b)}},[c,f]),a.jsxs(Ll,{ref:u,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&a.jsx(En,{ref:d,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"forwards"});Pn(g)}}),a.jsx(Nn.Slot,{scope:r,children:a.jsx(J.ol,{tabIndex:-1,...s,ref:v})}),y&&a.jsx(En,{ref:p,onFocusFromOutsideViewport:()=>{const g=f({tabbingDirection:"backwards"});Pn(g)}})]})});ws.displayName=ys;var xs="ToastFocusProxy",En=l.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,s=rr(xs,r);return a.jsx(Zt,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const c=i.relatedTarget;!((d=s.viewport)!=null&&d.contains(c))&&n()}})});En.displayName=xs;var nr="Toast",Vu="toast.swipeStart",ju="toast.swipeMove",Hu="toast.swipeCancel",Uu="toast.swipeEnd",Ns=l.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:s,...i}=e,[c=!0,u]=xr({prop:n,defaultProp:o,onChange:s});return a.jsx(ze,{present:r||c,children:a.jsx(qu,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:fe(e.onPause),onResume:fe(e.onResume),onSwipeStart:Q(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Q(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:Q(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:Q(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)})})})});Ns.displayName=nr;var[Gu,Ku]=vs(nr,{onClose(){}}),qu=l.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:p,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:m,...y}=e,f=rr(nr,r),[g,b]=l.useState(null),w=se(t,P=>b(P)),x=l.useRef(null),N=l.useRef(null),S=o||f.duration,C=l.useRef(0),T=l.useRef(S),B=l.useRef(0),{onToastAdd:I,onToastRemove:V}=f,$=fe(()=>{var H;(g==null?void 0:g.contains(document.activeElement))&&((H=f.viewport)==null||H.focus()),i()}),j=l.useCallback(P=>{!P||P===1/0||(window.clearTimeout(B.current),C.current=new Date().getTime(),B.current=window.setTimeout($,P))},[$]);l.useEffect(()=>{const P=f.viewport;if(P){const H=()=>{j(T.current),d==null||d()},k=()=>{const G=new Date().getTime()-C.current;T.current=T.current-G,window.clearTimeout(B.current),u==null||u()};return P.addEventListener(Cn,k),P.addEventListener(Sn,H),()=>{P.removeEventListener(Cn,k),P.removeEventListener(Sn,H)}}},[f.viewport,S,u,d,j]),l.useEffect(()=>{s&&!f.isClosePausedRef.current&&j(S)},[s,S,f.isClosePausedRef,j]),l.useEffect(()=>(I(),()=>V()),[I,V]);const _=l.useMemo(()=>g?Ms(g):null,[g]);return f.viewport?a.jsxs(a.Fragment,{children:[_&&a.jsx(Yu,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:_}),a.jsx(Gu,{scope:r,onClose:$,children:pr.createPortal(a.jsx(Nn.ItemSlot,{scope:r,children:a.jsx(Il,{asChild:!0,onEscapeKeyDown:Q(c,()=>{f.isFocusedToastEscapeKeyDownRef.current||$(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.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:Q(e.onKeyDown,P=>{P.key==="Escape"&&(c==null||c(P.nativeEvent),P.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:Q(e.onPointerDown,P=>{P.button===0&&(x.current={x:P.clientX,y:P.clientY})}),onPointerMove:Q(e.onPointerMove,P=>{if(!x.current)return;const H=P.clientX-x.current.x,k=P.clientY-x.current.y,G=!!N.current,D=["left","right"].includes(f.swipeDirection),F=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,Z=D?F(0,H):0,te=D?0:F(0,k),oe=P.pointerType==="touch"?10:2,z={x:Z,y:te},K={originalEvent:P,delta:z};G?(N.current=z,or(ju,h,K,{discrete:!1})):ks(z,f.swipeDirection,oe)?(N.current=z,or(Vu,p,K,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(H)>oe||Math.abs(k)>oe)&&(x.current=null)}),onPointerUp:Q(e.onPointerUp,P=>{const H=N.current,k=P.target;if(k.hasPointerCapture(P.pointerId)&&k.releasePointerCapture(P.pointerId),N.current=null,x.current=null,H){const G=P.currentTarget,D={originalEvent:P,delta:H};ks(H,f.swipeDirection,f.swipeThreshold)?or(Uu,m,D,{discrete:!0}):or(Hu,v,D,{discrete:!0}),G.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Yu=e=>{const{__scopeToast:t,children:r,...n}=e,o=rr(nr,t),[s,i]=l.useState(!1),[c,u]=l.useState(!1);return Zu(()=>i(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:a.jsx(Et,{asChild:!0,children:a.jsx(Zt,{...n,children:s&&a.jsxs(a.Fragment,{children:[o.label," ",r]})})})},Xu="ToastTitle",Cs=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(J.div,{...n,ref:t})});Cs.displayName=Xu;var Qu="ToastDescription",Ss=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(J.div,{...n,ref:t})});Ss.displayName=Qu;var Es="ToastAction",Ts=l.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?a.jsx(As,{altText:r,asChild:!0,children:a.jsx(Tn,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Es}\`. Expected non-empty \`string\`.`),null)});Ts.displayName=Es;var Ps="ToastClose",Tn=l.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=Ku(Ps,r);return a.jsx(As,{asChild:!0,children:a.jsx(J.button,{type:"button",...n,ref:t,onClick:Q(e.onClick,o.onClose)})})});Tn.displayName=Ps;var As=l.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return a.jsx(J.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Ms(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Ju(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Ms(n))}}),t}function or(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?po(o,s):o.dispatchEvent(s)}var ks=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return t==="left"||t==="right"?s&&n>r:!s&&o>r};function Zu(e=()=>{}){const t=fe(e);Me(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Ju(e){return e.nodeType===e.ELEMENT_NODE}function Ru(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Pn(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var ef=bs,Os=ws,Ds=Ns,_s=Cs,Is=Ss,Ls=Ts,$s=Tn;const Fs=ef,An=l.forwardRef(({className:e,...t},r)=>a.jsx(Os,{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=Os.displayName;const tf=ft("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)=>a.jsx(Ds,{ref:n,className:O(tf({variant:t}),e),...r}));Mn.displayName=Ds.displayName;const zs=l.forwardRef(({className:e,...t},r)=>a.jsx(Ls,{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}));zs.displayName=Ls.displayName;const kn=l.forwardRef(({className:e,...t},r)=>a.jsx($s,{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:a.jsx(hr,{className:"h-4 w-4"})}));kn.displayName=$s.displayName;const On=l.forwardRef(({className:e,...t},r)=>a.jsx(_s,{ref:r,className:O("text-sm font-semibold [&+div]:text-xs",e),...t}));On.displayName=_s.displayName;const Dn=l.forwardRef(({className:e,...t},r)=>a.jsx(Is,{ref:r,className:O("text-sm opacity-90",e),...t}));Dn.displayName=Is.displayName;const rf=1,nf=1e6;let _n=0;function of(){return _n=(_n+1)%Number.MAX_SAFE_INTEGER,_n.toString()}const In=new Map,Ws=e=>{if(In.has(e))return;const t=setTimeout(()=>{In.delete(e),bt({type:"REMOVE_TOAST",toastId:e})},nf);In.set(e,t)},af=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,rf)};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?Ws(r):e.toasts.forEach(n=>Ws(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):[]}}},ar=[];let sr={toasts:[]};function bt(e){sr=af(sr,e),ar.forEach(t=>t(sr))}function Bs({...e}){const t=of(),r=o=>bt({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>bt({type:"DISMISS_TOAST",toastId:t});return bt({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function Ln(){const[e,t]=l.useState(sr);return l.useEffect(()=>(ar.push(t),()=>{const r=ar.indexOf(t);r>-1&&ar.splice(r,1)}),[]),{...e,toast:Bs,dismiss:r=>bt({type:"DISMISS_TOAST",toastId:r})}}function Vs(){const{toasts:e}=Ln();return a.jsxs(Fs,{children:[e.map(function({id:t,title:r,description:n,action:o,...s}){return a.jsxs(Mn,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(On,{children:r}),n&&a.jsx(Dn,{children:n})]}),o,a.jsx(kn,{})]},t)}),a.jsx(An,{})]})}function js({onSignOut:e,handleValidSearch:t,rightMenu:r,searchPlaceholder:n}){const[o,s]=q.useState(""),i=fr.useLocation(),{toast:c}=Ln();q.useEffect(()=>{const h=new URLSearchParams(i.search).get("q");h&&s(h)},[i.search]);const u=()=>{const p=o.trim();if(!p||p.length<2){c({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}t(p)},d=p=>{p.key==="Enter"&&u()};return a.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:[a.jsx(hn,{className:"lg:hidden",children:a.jsx(bi,{className:"h-6 w-6"})}),a.jsx("div",{className:"flex flex-1 items-center gap-4",children:a.jsx("div",{className:"relative w-full max-w-sm",children:a.jsxs("div",{children:[a.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:u,"aria-label":"Search",children:a.jsx(Si,{className:"h-4 w-4 text-muted-foreground"})}),a.jsx(tr,{placeholder:n??"Search...",className:"w-full pl-8 bg-white text-black",value:o,onChange:p=>s(p.target.value),onKeyDown:d},"topbar-search")]})})}),r||a.jsx(a.Fragment,{}),e&&a.jsx("div",{className:"flex items-center gap-4",children:a.jsxs(ne,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:e,children:[a.jsx(vi,{className:"h-4 w-4 text-sidebar-foreground"}),a.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})}function Hs({routes:e,footer:t,dashboardTitle:r}){const{appID:n}=fr.useParams(),o=e.filter(s=>s.showInNav);return a.jsxs(pn,{className:"border-r border-sidebar-border",children:[a.jsx(gn,{className:"border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex items-center justify-center",children:a.jsx("img",{src:"https://api.randmar.io/images/RandmarIcon.svg",alt:"Randmar Icon",className:"h-4 w-4 filter brightness-0 saturate-100 invert"})}),a.jsx("span",{className:"font-semibold text-lg",children:r})]})}),a.jsx(vn,{className:"py-4 bg-sidebar text-sidebar-foreground",children:a.jsx(bn,{children:o.map(s=>{const i=s.icon,c=`/${s.path.replace(":appID",n)}`;return a.jsx(yn,{children:a.jsx(wn,{asChild:!0,children:a.jsxs(fr.Link,{to:c,className:"transition-colors hover:bg-muted px-6",children:[i&&a.jsx(i,{className:"h-4 w-4"}),a.jsx("span",{children:s.label})]})})},s.key)})})}),a.jsx(mn,{className:"border-t border-sidebar-border p-4 bg-sidebar-background text-sidebar-foreground",children:t})]})}function sf({children:e,rightMenu:t,routes:r,footer:n,handleValidSearch:o,dashboardTitle:s,onSignOut:i,searchPlaceholder:c}){return a.jsx(a.Fragment,{children:a.jsx(fn,{children:a.jsxs("div",{className:"flex grow",children:[a.jsx(Hs,{routes:r,footer:n,dashboardTitle:s}),a.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[a.jsx(js,{onSignOut:i,rightMenu:t,handleValidSearch:o,searchPlaceholder:c}),a.jsx("main",{className:"flex-1 overflow-auto mt-16",children:e}),a.jsx(Vs,{})]})]})})})}const lf={sm:100,md:200,lg:300,xl:400};function Us({randmarSKU:e,size:t="md",alt:r,secondaryContent:n}){const[o,s]=l.useState(!1),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,h]=l.useState(!1),v=`https://api.randmar.io/Product/${e}/Video`;l.useEffect(()=>{(async()=>{try{const x=await(await fetch(v+"/Exists")).json();c(x)}catch(w){console.error("Error checking for video:",w),c(!1)}})()},[e,v]);async function m(){if(i){h(!0);try{const w=await(await fetch(v)).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(v),d(!0),setTimeout(()=>{d(!1)},2e3)}function f(){s(!0)}const g=lf[t||"xl"];return a.jsxs(a.Fragment,{children:[a.jsx(dt,{open:o,onOpenChange:s,children:a.jsx(ut,{className:"max-w-4xl p-0 overflow-hidden",children:n?a.jsxs("div",{className:"flex flex-row",children:[a.jsxs("video",{className:"w-full rounded-l-lg max-h-[720px] object-contain",controls:!0,autoPlay:!0,muted:!0,loop:!0,children:[a.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),a.jsx("div",{className:"flex-grow min-w-[400px] h-[70vh] p-6",children:n})]}):a.jsxs("div",{className:"w-full relative",children:[a.jsxs("video",{className:"w-full max-h-[720px] object-contain",controls:!0,autoPlay:!0,children:[a.jsx("source",{src:v,type:"video/mp4"}),"Your browser does not support the video tag."]}),a.jsxs("div",{className:"absolute top-2 right-12 flex gap-1",children:[a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",onClick:y,children:u?a.jsx(Kn,{className:"h-4 w-4"}):a.jsx(hi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Copy video link"})})]})}),a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",onClick:m,disabled:p,children:a.jsx(gi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Download video"})})]})})]})]})})}),a.jsxs("div",{className:"relative w-max h-max",children:[a.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&&a.jsx(ot,{children:a.jsxs(at,{children:[a.jsx(st,{asChild:!0,children:a.jsx(ne,{variant:"secondary",size:"icon",className:"absolute top-2 right-2",onClick:f,children:a.jsx(xi,{className:"h-4 w-4"})})}),a.jsx(Ve,{children:a.jsx("p",{children:"Play video"})})]})})]})]})}const ir=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("rounded-md border bg-card text-card-foreground shadow-sm",e),...t}));ir.displayName="Card";const Gs=l.forwardRef(({className:e,...t},r)=>a.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)=>a.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)=>a.jsx("div",{ref:r,className:O("text-sm text-muted-foreground",e),...t}));qs.displayName="CardDescription";const lr=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("p-6 pt-0",e),...t}));lr.displayName="CardContent";const Ys=l.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:O("flex items-center p-6 pt-0",e),...t}));Ys.displayName="CardFooter";const cf=ft("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"}}),Ne=l.forwardRef(({className:e,variant:t,size:r,icon:n,children:o,...s},i)=>a.jsxs("div",{ref:i,className:O(cf({variant:t,size:r}),e),...s,children:[n&&a.jsx("span",{className:"mr-1",children:n}),o]}));Ne.displayName="Badge";function df({inventory:e}){const t=["MTL","TOR"],r=["VAN","EDM"],n=[...e].sort((f,g)=>(f.Name||"").localeCompare(g.Name||"")),o=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),v=d(i),m=d(o),y=p+m;return a.jsxs("div",{className:"border rounded-md overflow-hidden",children:[s.length>0&&o.length>0&&a.jsxs("div",{className:"grid grid-cols-2 border-b",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"Total"}),a.jsx("span",{children:y})]}),a.jsx("div",{className:"p-3"})]}),s.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 border-b bg-gray-50",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"Canada"}),a.jsx("span",{children:p})]}),a.jsx("div",{className:"p-3"})]}),a.jsxs("div",{className:"grid grid-cols-2",children:[a.jsxs("div",{className:"border-r",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"West"}),a.jsx("span",{children:v})]}),i.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`west-${g}`))]}),a.jsxs("div",{children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"East"}),a.jsx("span",{children:h})]}),c.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm ${g>0?"border-t":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`east-${g}`))]})]}),u.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"border-t p-3 font-semibold text-sm",children:a.jsx("span",{children:"Other"})}),a.jsx("div",{className:"grid grid-cols-2",children:u.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`other-${g}`))})]})]}),o.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 border-t bg-gray-50",children:[a.jsxs("div",{className:"p-3 font-semibold text-sm flex justify-between",children:[a.jsx("span",{children:"United States"}),a.jsx("span",{children:m})]}),a.jsx("div",{className:"p-3"})]}),a.jsx("div",{className:"grid grid-cols-2",children:o.map((f,g)=>a.jsxs("div",{className:`p-3 text-sm border-t ${g%2===0?"border-r":""}`,children:[a.jsxs("div",{className:"flex justify-between font-medium",children:[a.jsx("span",{children:f.Name}),a.jsx("span",{children:f.AvailableQuantity})]}),a.jsxs("div",{className:"flex justify-between mt-1 text-xs text-gray-600",children:[a.jsx("span",{children:"Expecting"}),a.jsx("span",{children:f.PurchaseOrderQuantity||"-"})]})]},`usa-${g}`))})]}),e.length===0&&a.jsx("div",{className:"p-6 text-center text-gray-500",children:"No inventory information available"})]})}function uf({item:e,addToCart:t=!1,syncToShopify:r=!1,defaultOpportunityNumber:n="",viewProductAction:o,addToCartAction:s,isAddToCartActionLoading:i=!1,syncToShopifyAction:c,isSyncToShopifyActionLoading:u=!1}){var P,H,k,G,D,F,Z,te,oe;const[d,p]=q.useState(1),[h,v]=q.useState(null),[m,y]=q.useState(0),[f,g]=q.useState(!1),b=((P=e==null?void 0:e.Distribution)==null?void 0:P.RegularPrice)||0,w=((H=e==null?void 0:e.Distribution)==null?void 0:H.Price)||0,[x,N]=q.useState(null),[S,C]=q.useState(!1);if(q.useEffect(()=>{const z=async()=>{if(e!=null&&e.ManufacturerId){C(!0);try{const K=await fetch(`https://api.randmar.io/V4/Partner/${e.ManufacturerId}/Account/Logo?width=60&height=40`);if(K.ok){const R=await K.blob();N(URL.createObjectURL(R))}}catch(K){console.error("Failed to load logo:",K)}finally{C(!1)}}};e!=null&&e.ManufacturerId&&z()},[e==null?void 0:e.ManufacturerId]),q.useEffect(()=>{var K;if(!e)return;if(!h&&n){const R=(K=e.Opportunities)==null?void 0:K.find(Ce=>Ce.BidNumber==n);R&&v(R)}const z=h!=null&&h.Price?h.Price:w;y(b>0?Math.round((b-z)/b*100):0)},[e,h,w,b]),q.useEffect(()=>{i||p(1)},[i]),!e)return a.jsx(ir,{className:"hover:shadow-lg transition-shadow",children:a.jsxs(lr,{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-start mb-3",children:[a.jsx(X,{className:"h-7 w-3/4"}),a.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:a.jsx(X,{className:"h-10 w-24 rounded-md"})})]}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[a.jsx(X,{className:"h-6 w-20 rounded-full"}),a.jsx(X,{className:"h-6 w-24 rounded-full"}),a.jsx(X,{className:"h-6 w-28 rounded-full"})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-6 flex-1",children:[a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-20"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-24"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-20 mb-1"}),a.jsx(X,{className:"h-5 w-16"})]}),a.jsxs("div",{children:[a.jsx(X,{className:"h-4 w-12 mb-1"}),a.jsx(X,{className:"h-5 w-20"})]})]}),a.jsx("div",{className:"flex flex-col",children:a.jsx("div",{className:"w-60 h-40",children:a.jsx(X,{className:"w-full h-full rounded-lg"})})})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsx("div",{className:"flex flex-1",children:a.jsxs("div",{className:"w-full",children:[a.jsx(X,{className:"h-4 w-24 mb-3"}),a.jsx(X,{className:"h-16 w-full rounded-md"})]})}),a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx(X,{className:"h-10 w-32 rounded-md"}),a.jsx(X,{className:"h-5 w-24 mt-4"})]})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsxs("div",{className:"flex flex-col items-start gap-1 mb-2",children:[a.jsx(X,{className:"h-8 w-32"}),a.jsx(X,{className:"h-6 w-24"})]}),a.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[a.jsx(X,{className:"h-10 w-24 rounded-md"}),a.jsx(X,{className:"h-10 flex-1 rounded-md"})]})]})]})});const T=(e==null?void 0:e.Opportunities)||[],B=T.length>0,I=()=>{d>1&&p(d-1)},V=()=>{p(d+1)},$=((G=(k=e.Distribution)==null?void 0:k.Inventory)==null?void 0:G.reduce((z,K)=>z+(K.AvailableQuantity||0),0))||0,j=z=>{try{return new Date(z).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(K){return console.error(K),z.split("T")[0]||"N/A"}},_=()=>{s&&s({quantity:d,bidNumber:(h==null?void 0:h.BidNumber)??null})};return a.jsx(ir,{className:"hover:shadow-lg transition-shadow",children:a.jsxs(lr,{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-start mb-3",children:[a.jsx("h3",{className:"font-semibold text-xl",children:e.Title||e.RandmarTitle}),a.jsx("div",{className:"h-10 w-24 flex items-center justify-end ml-4",children:S?a.jsx(X,{className:"h-10 w-24 rounded-md"}):x&&a.jsx("img",{src:x||"/placeholder.svg",alt:e.ManufacturerName,className:"max-h-10 max-w-24 object-contain"})})]}),a.jsxs("div",{className:"flex gap-6",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.State&&a.jsxs(Ne,{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:[a.jsx(Kn,{size:"12",className:"mr-1.5"})," ",e.State]}),a.jsxs(Ne,{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:[a.jsx(Ni,{size:"12",className:"mr-1.5"})," ",e.SerialNumber?"Serialized":"Unserialized"]}),e.TransparencyCode&&a.jsxs(Ne,{variant:"outline",className:"rounded-full px-3 bg-green-50 text-green-700 hover:bg-green-50",children:[a.jsx(pi,{size:"12",className:"mr-1.5"})," Transparency Code"]}),a.jsxs(Ne,{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:[a.jsx(Ei,{size:"12",className:"mr-1.5"})," ",(D=e.ManufacturerCategory)!=null&&D.QualificationRequired?e.AvailableToBuy?"Qualified":"Not Qualified":"No Qualification Required"]}),e.ManufacturerId&&a.jsxs(Ne,{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:[a.jsx(Ci,{size:"12",className:"mr-1.5"})," ",e.AutoUpdate?`Automatic Reorder (${e.MasterCarton})`:"Manually Reorders"]}),a.jsxs(Ne,{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:[a.jsx(Ti,{size:"12",className:"mr-1.5"})," ",e.BodyHTML&&e.Title&&e.MAP?"Shopify Ready":"Not Shopify Ready"]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4 flex-1",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"MPN"}),a.jsx("div",{className:"font-medium",children:e.MPN||"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"UPC"}),a.jsx("div",{className:"font-medium",children:e.UPC||"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"Unit Weight"}),a.jsx("div",{className:"font-medium",children:e.UnitWeight?`${e.UnitWeight} lbs`:"N/A"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-muted-foreground",children:"MAP"}),a.jsx("div",{className:"font-medium",children:e.MAP?"$"+e.MAP.toFixed(2):"N/A"})]})]})]}),a.jsx("div",{className:"flex flex-col",children:a.jsx(Us,{randmarSKU:e.RandmarSKU||"",alt:e.RandmarTitle||""})})]}),a.jsxs("div",{className:"flex gap-6 mt-4",children:[a.jsx("div",{className:"flex flex-1",children:e.Distribution&&a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"text-sm text-muted-foreground flex items-center",children:"Opportunities"}),B?a.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto pr-1 mt-1",children:T.map((z,K)=>{var R;return a.jsxs("div",{className:`flex justify-between items-center border border-gray-100 rounded transition-colors py-2 px-4
|
|
185
|
+
${z.BidNumber==(h==null?void 0:h.BidNumber)?"bg-primary/10 cursor-pointer":z.Active?"hover:bg-primary/5 cursor-pointer":""}
|
|
186
|
+
`,onClick:()=>v(z.BidNumber!=(h==null?void 0:h.BidNumber)?z:null),children:[a.jsx("div",{className:"flex items-center",children:a.jsxs("div",{className:"flex flex-col",children:[a.jsx("span",{className:"font-medium text-sm",children:z.Opportunity}),a.jsx("span",{className:"text-xs text-gray-500",children:z.BidNumber})]})}),a.jsxs("div",{className:"flex flex-col items-end",children:[a.jsxs("span",{className:"font-semibold",children:["$",(R=z.Price)==null?void 0:R.toFixed(2)]}),z.Rebate&&z.Rebate>0&&a.jsxs("span",{className:"text-xs text-green-600",children:["Rebate: $",z.Rebate.toFixed(2)]}),z.EndDate&&a.jsxs("span",{className:"text-xs text-gray-500",children:["Ends: ",j(z.EndDate)]}),!z.Active&&a.jsx(Ne,{variant:"outline",className:"text-xs px-2 py-0 h-5 mt-1 bg-gray-100",children:"Inactive"})]})]},K)})}):a.jsx("div",{className:"w-full flex flex-col items-start justify-center py-2",children:a.jsx("p",{className:"font-medium",children:"No opportunities available"})})]})}),a.jsxs("div",{className:"flex flex-col items-center",children:[o&&a.jsxs(ne,{variant:"secondary",onClick:o,children:[a.jsx(mi,{className:"mr-2"}),"View Product"]}),((F=e.Distribution)==null?void 0:F.Inventory)&&a.jsx("div",{className:"mt-4",children:a.jsxs(dt,{open:f,onOpenChange:g,children:[a.jsx(Fr,{asChild:!0,children:a.jsxs(ne,{variant:"ghost",className:`flex items-center text-sm ${$>0?"text-green-700":"text-red-700"}`,children:[a.jsx(Xn,{size:"16",className:"mr-2"}),$>0?a.jsxs(a.Fragment,{children:[$," in stock"]}):a.jsx(a.Fragment,{children:"Out of stock"})]})}),a.jsxs(ut,{className:"sm:max-w-md",children:[a.jsx(Bt,{children:a.jsxs(Vt,{className:"flex items-center",children:[a.jsx(Xn,{className:"mr-2",size:18}),"Inventory Information"]})}),a.jsx(df,{inventory:e.Distribution.Inventory})]})]})})]})]}),e.Distribution&&a.jsxs("div",{className:"flex justify-between items-end mt-4",children:[a.jsxs("div",{className:"flex-shrink-1 flex flex-col items-start gap-1",children:[a.jsxs("div",{className:"flex items-center flex-wrap",children:[a.jsxs("span",{className:"text-2xl font-bold whitespace-nowrap",children:[a.jsx("span",{children:"$"}),h?(te=(Z=e.Opportunities)==null?void 0:Z.find(z=>z.BidNumber==h.BidNumber))==null?void 0:te.Price:w.toFixed(2),a.jsx("span",{children:" CAD"})]}),m>0&&a.jsxs("span",{className:"text-muted-foreground line-through ml-2 whitespace-nowrap",children:["$",b.toFixed(2)]})]}),m>0&&a.jsx("div",{className:"flex items-center",children:a.jsxs(Ne,{variant:"outline",className:"bg-red-50 text-red-700 rounded-full px-3 whitespace-nowrap",children:[a.jsxs("span",{children:[m,"% OFF"]}),((oe=e.InstantRebate)==null?void 0:oe.EndDate)&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",e.InstantRebate.EndDate.split("T")[0]]}),(h==null?void 0:h.EndDate)&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mx-1.5",children:"●"})," Ends ",h.EndDate.split("T")[0]]})]})})]}),a.jsxs("div",{className:"flex flex-shrink-0 gap-2 ml-4",children:[typeof t<"u"&&t&&a.jsxs("div",{className:"flex items-center border rounded-md",children:[a.jsx(ne,{variant:"ghost",size:"icon",className:"rounded-r-none",onClick:I,disabled:typeof $<"u"&&typeof d<"u"&&($<=0||d<=1||i||!s),children:"-"}),a.jsx("div",{className:`px-4 ${typeof $<"u"&&($<=0||i||!s)?"text-gray-400":""}`,children:d}),a.jsx(ne,{variant:"ghost",size:"icon",className:"rounded-l-none",onClick:V,disabled:typeof $<"u"&&($<=0||i||!s),children:"+"})]}),typeof t<"u"&&t&&a.jsx(ne,{className:"gap-2 whitespace-nowrap",onClick:_,disabled:typeof $<"u"&&($<=0||i||!s),children:i?a.jsxs(a.Fragment,{children:[a.jsx(qn,{className:"h-4 w-4 animate-spin"}),"Adding..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Yn,{className:"mr-2"}),"Add to Cart"]})}),r&&a.jsx(ne,{className:"gap-2 whitespace-nowrap bg-green-600 hover:bg-green-700",onClick:c,disabled:$<=0||u||!c,children:u?a.jsxs(a.Fragment,{children:[a.jsx(qn,{className:"h-4 w-4 animate-spin"}),"Syncing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Yn,{className:"mr-2"}),"Sync to Shopify"]})})]})]})]})})}E.AvatarFooter=Eu,E.Badge=Ne,E.Button=ne,E.Card=ir,E.CardContent=lr,E.CardDescription=qs,E.CardFooter=Ys,E.CardHeader=Gs,E.CardTitle=Ks,E.Dialog=dt,E.DialogClose=zr,E.DialogContent=ut,E.DialogDescription=Vr,E.DialogFooter=Br,E.DialogHeader=Bt,E.DialogOverlay=Wr,E.DialogPortal=oa,E.DialogTitle=Vt,E.DialogTrigger=Fr,E.Input=tr,E.InputOTP=hl,E.InputOTPGroup=gl,E.InputOTPSeparator=vl,E.InputOTPSlot=ml,E.Label=Au,E.Layout=sf,E.Navbar=Hs,E.ProductCard=uf,E.ProductImage=Us,E.Separator=ln,E.Sheet=Ya,E.SheetClose=Cu,E.SheetContent=dn,E.SheetDescription=Ra,E.SheetFooter=Za,E.SheetHeader=Qa,E.SheetOverlay=cn,E.SheetPortal=Xa,E.SheetTitle=Ja,E.SheetTrigger=Nu,E.Sidebar=pn,E.SidebarContent=vn,E.SidebarFooter=mn,E.SidebarGroup=is,E.SidebarGroupAction=cs,E.SidebarGroupContent=ds,E.SidebarGroupLabel=ls,E.SidebarHeader=gn,E.SidebarInput=as,E.SidebarInset=os,E.SidebarMenu=bn,E.SidebarMenuAction=us,E.SidebarMenuBadge=fs,E.SidebarMenuButton=wn,E.SidebarMenuItem=yn,E.SidebarMenuSkeleton=ps,E.SidebarMenuSub=hs,E.SidebarMenuSubButton=ms,E.SidebarMenuSubItem=gs,E.SidebarProvider=fn,E.SidebarRail=ns,E.SidebarSeparator=ss,E.SidebarTrigger=hn,E.Skeleton=X,E.Toast=Mn,E.ToastAction=zs,E.ToastClose=kn,E.ToastDescription=Dn,E.ToastProvider=Fs,E.ToastTitle=On,E.ToastViewport=An,E.Toaster=Vs,E.Tooltip=at,E.TooltipContent=Ve,E.TooltipProvider=ot,E.TooltipTrigger=st,E.Topbar=js,E.buttonVariants=jr,E.toast=Bs,E.useIsMobile=ts,E.useSidebar=vt,E.useToast=Ln,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|