@re-venue/ui-core-react 0.1.2 → 0.2.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/index.d.ts +416 -0
- package/dist/ui-core-react.css +1 -1
- package/dist/ui-core-react.js +10072 -178
- package/dist/ui-core-react.umd.cjs +47 -1
- package/package.json +26 -1
- package/src/components/AppShell.tsx +14 -0
- package/src/components/common/ConfirmationModal.tsx +65 -0
- package/src/components/common/Container.tsx +15 -0
- package/src/components/common/DangerZoneSection.tsx +62 -0
- package/src/components/common/DetailPanel.tsx +115 -0
- package/src/components/common/DetailSheet.tsx +98 -0
- package/src/components/common/EditableTitle.tsx +119 -0
- package/src/components/common/EmptyState.tsx +36 -0
- package/src/components/common/FormModal.tsx +64 -0
- package/src/components/common/NavigationListItem.tsx +24 -0
- package/src/components/common/PanelEmptyState.tsx +17 -0
- package/src/components/ui/alert-dialog.tsx +104 -0
- package/src/components/ui/avatar.tsx +38 -0
- package/src/components/ui/badge.tsx +31 -0
- package/src/components/ui/button.tsx +47 -0
- package/src/components/ui/card.tsx +43 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/dialog.tsx +95 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +17 -0
- package/src/components/ui/multi-select.tsx +109 -0
- package/src/components/ui/popover.tsx +29 -0
- package/src/components/ui/progress.tsx +23 -0
- package/src/components/ui/scroll-area.tsx +38 -0
- package/src/components/ui/select.tsx +143 -0
- package/src/components/ui/separator.tsx +20 -0
- package/src/components/ui/sheet.tsx +107 -0
- package/src/components/ui/skeleton.tsx +7 -0
- package/src/components/ui/sonner.tsx +27 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +72 -0
- package/src/components/ui/toast.tsx +111 -0
- package/src/components/ui/toaster.tsx +24 -0
- package/src/components/ui/tooltip.tsx +28 -0
- package/src/components/ui/use-toast.ts +3 -0
- package/src/hooks/use-toast.ts +186 -0
- package/src/hooks/useDetailPanel.ts +21 -0
- package/src/hooks/useDetailSheetControls.ts +16 -0
- package/src/hooks/useTheme.ts +42 -0
- package/src/index.ts +49 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/shell.css +3 -0
- package/src/styles/utilities.css +1 -0
|
@@ -1 +1,47 @@
|
|
|
1
|
-
(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.ReVenueUiCoreReact={},d.jsxRuntime,d.React,d.ReactDOM))})(this,(function(d,e,l,_){"use strict";function k({open:s,title:a="Are you sure?",message:t="This action cannot be undone.",confirmLabel:n="Confirm",loading:h=!1,onConfirm:u,onCancel:p}){const[g,f]=l.useState(!1),[w,o]=l.useState(!1),i=l.useRef(`rv-confirm-${Math.random().toString(36).slice(2)}`).current;return l.useEffect(()=>{if(s)o(!0),requestAnimationFrame(()=>f(!0));else{f(!1);const v=setTimeout(()=>o(!1),200);return()=>clearTimeout(v)}},[s]),w?_.createPortal(e.jsx("div",{className:`rv-modal-backdrop${g?" rv-modal-visible":""}`,onClick:v=>{v.target===v.currentTarget&&p()},children:e.jsxs("div",{className:"rv-modal-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,children:[e.jsx("h2",{id:i,className:"rv-modal-title",children:a}),e.jsx("p",{className:"rv-modal-body",children:t}),e.jsxs("div",{className:"rv-modal-actions",children:[e.jsx("button",{className:"rv-modal-btn rv-modal-btn-ghost",onClick:p,disabled:h,children:"Cancel"}),e.jsx("button",{className:"rv-modal-btn rv-modal-btn-danger",onClick:u,disabled:h,children:n})]})]})}),document.body):null}function N({value:s,venues:a,onChange:t}){const[n,h]=l.useState(!1),u=l.useRef(null),p=l.useMemo(()=>a.find(o=>o.id===s),[a,s]),g=l.useMemo(()=>{const o=new Map;for(const i of a){const v=i.workspace?.id??"__none__",c=i.workspace?.name??"";o.has(v)||o.set(v,{workspaceName:c,venues:[]}),o.get(v).venues.push(i)}return[...o.values()]},[a]),f=g.length>1;l.useEffect(()=>{if(!n)return;function o(i){u.current&&!u.current.contains(i.target)&&h(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[n]);function w(o){t(o),h(!1)}return e.jsxs("div",{ref:u,className:"rv-venue-switcher",children:[e.jsxs("button",{className:`rv-vs-trigger${n?" rv-open":""}`,onClick:()=>h(o=>!o),children:[e.jsxs("span",{className:"rv-vs-label",children:[e.jsx("span",{className:"rv-vs-venue",children:p?.name??"Select venue"}),p?.workspace&&f&&e.jsx("span",{className:"rv-vs-workspace",children:p.workspace.name})]}),e.jsx("svg",{className:"rv-vs-chevron",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),n&&e.jsx("div",{className:"rv-vs-dropdown",children:g.map(o=>e.jsxs("div",{children:[f&&e.jsx("div",{className:"rv-vs-workspace-header",children:o.workspaceName}),o.venues.map(i=>e.jsx("button",{className:`rv-vs-venue-option${i.id===s?" rv-active":""}`,onClick:()=>w(i.id),children:i.name},i.id))]},o.workspaceName))})]})}function V(){const s=window;if(s.__rvHistoryPatched)return;s.__rvHistoryPatched=!0;const a=history.pushState.bind(history);history.pushState=(...n)=>{a(...n),window.dispatchEvent(new Event("locationchange"))};const t=history.replaceState.bind(history);history.replaceState=(...n)=>{t(...n),window.dispatchEvent(new Event("locationchange"))}}const L="rv_sidebar_collapsed",$=3600*24*365;function H(){const s=`${L}=`;for(const a of document.cookie.split(";")){const t=a.trim();if(t.startsWith(s))return decodeURIComponent(t.slice(s.length))==="true"}return!1}function P(s,a){const t=a?`; Domain=${a}`:"";document.cookie=`${L}=${s}; Path=/; Max-Age=${$}; SameSite=Lax${t}`}function j({user:s,isAdmin:a,venues:t,activeVenueId:n,navItems:h,cookieDomain:u,onSwitchVenue:p,onLogout:g,accountSettingsUrl:f,headerSlot:w,sidebarPanel:o,scrollable:i=!0,children:v}){const[c,Z]=l.useState(()=>H()),[A,y]=l.useState(!1),[M,T]=l.useState(()=>window.location.href);l.useEffect(()=>{V();function r(){T(window.location.href)}return window.addEventListener("popstate",r),window.addEventListener("locationchange",r),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",r)}},[]);function W(){const r=!c;Z(r),P(r,u)}const b=l.useMemo(()=>t.find(r=>r.id===n),[t,n]),S=b?.workspace?.name??"",B=l.useMemo(()=>s?.email?s.email.slice(0,2).toUpperCase():"?",[s?.email]),m=l.useMemo(()=>{const r=b?.workspace?.id;return h.filter(C=>C.hidden?!1:!!(!C.permission||a||s?.globalPermissions.includes(C.permission)||r&&s?.workspacePermissions?.[r]?.includes(C.permission)||n&&s?.venuePermissions?.[n]?.includes(C.permission)))},[h,a,s,b,n]),O=l.useMemo(()=>m.filter(r=>!r.pinned),[m]),x=l.useMemo(()=>m.filter(r=>r.pinned),[m]),E=l.useMemo(()=>h.filter(C=>C.url&&M.startsWith(C.url)).sort((C,q)=>q.url.length-C.url.length)[0]?.url??null,[h,M]),I=t.length>0||w!==void 0;return e.jsxs("div",{className:"rv-app-shell",children:[e.jsxs("aside",{className:`rv-sidebar${c?" rv-collapsed":""}`,children:[e.jsxs("div",{className:"rv-sidebar-top",children:[!c&&e.jsxs("div",{className:"rv-sidebar-brand",children:[e.jsxs("svg",{className:"rv-sidebar-logo",viewBox:"0 0 429 50",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Re-venue",children:[e.jsxs("g",{clipPath:"url(#rv-logo-clip)",children:[e.jsx("path",{d:"M24.946 0.60506C24.6367 1.30638 24.2289 3.01155 24.2289 7.32948V8.73212L23.5117 9.22717C22.3867 8.12706 20.2212 7.61826 18.4775 7.61826C11.9105 7.61826 8.0013 13.6414 8.0013 21.3696V35.0247C8.0013 41.0479 8.09974 45.6683 8.4091 48.9824C6.86228 48.6799 5.54045 48.4736 4.303 48.4736C2.96711 48.4736 1.63122 48.6799 -0.0140381 48.9824C0.295326 46.2734 0.39376 42.9593 0.39376 38.2426V15.8691C0.407822 11.5512 0.309388 4.0154 2.39182e-05 1.00385C1.95464 1.40264 3.0796 1.4989 4.31706 1.4989C5.55452 1.4989 6.89041 1.29263 8.42316 1.00385L8.01537 6.0231C7.91693 7.12321 7.91693 8.73212 7.91693 10.7398L8.12786 10.8361C12.1215 3.61661 16.8322 0 21.768 0C23.0055 0 23.7226 0.206271 24.946 0.60506Z",fill:"currentColor"}),e.jsx("path",{d:"M74.7396 20.5858V22.291L74.5287 24.3949C68.3695 24.2987 61.6901 24.0924 54.4059 24.0924C49.4842 24.0924 44.3376 24.2987 39.1065 24.3949C39.0081 24.9037 39.0081 26.3064 39.0081 26.6089C39.0081 39.0539 46.4047 45.7921 56.6699 45.7921C61.901 45.7921 68.1727 42.9868 72.1663 38.6689L72.6866 38.9714L72.0678 43.8944C66.7243 47.9098 60.2557 50.0137 54.8137 50.0137C40.5408 50.0137 29.9662 40.0715 29.9662 26.3201C29.9802 9.84598 38.6003 0 53.4919 0C66.6399 0 74.7396 8.12706 74.7396 20.5858ZM52.6623 20.8883C56.2621 20.8883 62.3088 20.5858 66.3165 20.5858C66.218 9.03465 61.9994 3.21782 53.6888 3.21782C45.3781 3.21782 40.4424 9.74972 39.3174 20.5858C43.3251 20.5858 51.017 20.8883 52.6623 20.8883Z",fill:"currentColor"}),e.jsx("path",{d:"M164.989 22.9923V27.709H82.8533V22.9923H164.989Z",fill:"currentColor"}),e.jsx("path",{d:"M172.274 1.51265C173.82 1.51265 175.142 1.30638 176.788 1.0176C180.992 14.1639 185.928 26.8152 192.087 40.1815C195.687 32.852 198.148 26.8289 207.794 1.0176C208.821 1.32013 209.847 1.51265 210.972 1.51265C212.21 1.51265 213.025 1.30638 214.15 1.0176L203.477 24.615C199.779 32.9483 196.502 40.9791 193.521 49.0099C192.495 48.7074 191.468 48.5011 190.343 48.5011C189.106 48.5011 188.6 48.5974 187.053 49.0099C180.486 32.5495 174.636 17.1755 167.141 1.0176C169.292 1.41639 170.741 1.51265 172.274 1.51265Z",fill:"currentColor"}),e.jsx("path",{d:"M263.452 20.5858V22.291L263.241 24.3949C257.082 24.2987 250.402 24.0924 243.118 24.0924C238.196 24.0924 233.05 24.2987 227.819 24.3949C227.72 24.9037 227.72 26.3064 227.72 26.6089C227.72 39.0539 235.117 45.7921 245.382 45.7921C250.613 45.7921 256.885 42.9868 260.878 38.6689L261.399 38.9714L260.78 43.8944C255.436 47.9098 248.968 50.0138 243.526 50.0138C229.253 50.0138 218.678 40.0715 218.678 26.3201C218.678 9.85973 227.298 0.0137513 242.19 0.0137513C255.338 0.0137513 263.438 8.14081 263.438 20.5996L263.452 20.5858ZM241.374 20.8883C244.974 20.8883 251.021 20.5858 255.029 20.5858C254.93 9.03465 250.711 3.21782 242.401 3.21782C234.09 3.21782 229.154 9.74972 228.029 20.5858C232.037 20.5858 239.729 20.8883 241.374 20.8883Z",fill:"currentColor"}),e.jsx("path",{d:"M315.706 17.7668C315.706 23.0886 315.298 28.9054 315.298 36.5374C315.298 45.3795 315.509 47.181 315.509 48.9824C313.765 48.5836 312.528 48.4736 311.192 48.4736C309.856 48.4736 308.619 48.5699 306.988 48.9824C306.988 43.2618 307.705 34.2272 307.705 27.6953V19.967C307.705 11.6337 303.908 5.21177 296.413 5.21177C287.371 5.21177 282.66 10.8361 282.66 21.2734V33.3196C282.66 37.6375 282.97 44.4582 283.476 48.9824C281.831 48.6799 280.396 48.4736 278.85 48.4736C277.303 48.4736 275.868 48.6799 274.223 48.9824C275.039 42.6568 275.039 35.3273 275.039 31.3119V17.753C275.039 11.7299 274.729 6.20187 274.223 0.990099C275.967 1.38889 277.514 1.48515 278.85 1.48515C279.876 1.48515 281.212 1.27888 282.956 0.990099C282.857 2.69527 282.646 6.61441 282.646 9.0209H282.857C286.654 3.30033 291.787 -0.0137513 299.183 -0.0137513C309.448 -0.0137513 315.72 5.70682 315.72 17.753L315.706 17.7668Z",fill:"currentColor"}),e.jsx("path",{d:"M331.413 1.00385C333.157 1.30638 334.591 1.4989 335.73 1.4989C336.968 1.4989 338.304 1.29263 339.935 1.00385C339.218 9.43344 338.908 19.6782 338.908 28.9191C338.908 31.4356 338.908 37.6513 341.889 40.7728C343.844 43.0831 346.924 44.7882 350.931 44.7882C356.584 44.7882 359.861 42.3817 361.815 39.2602C364.276 35.2448 364.487 32.2332 364.487 21.3834C364.487 11.2486 364.389 3.10781 364.276 1.00385C366.02 1.40264 367.257 1.4989 368.593 1.4989C370.14 1.4989 371.265 1.40264 372.798 1.00385C372.39 7.42574 372.081 17.368 372.081 31.1194C372.081 38.8476 372.179 44.2657 372.488 48.9961C370.942 48.6936 369.62 48.4873 368.481 48.4873C367.342 48.4873 366.02 48.6936 364.473 48.9961C364.571 47.6898 364.684 45.4758 364.684 43.9769V40.3603H364.473C360.873 46.7822 355.023 50 348.456 50C337.783 50 331.315 44.3757 331.315 33.1271C331.315 29.0154 331.624 19.7745 331.624 16.5567C331.624 11.3311 331.526 6.21562 331.413 0.990099V1.00385Z",fill:"currentColor"}),e.jsx("path",{d:"M428.947 20.5858V22.291L428.736 24.3949C422.577 24.2987 415.898 24.0924 408.614 24.0924C403.692 24.0924 398.545 24.2987 393.314 24.3949C393.216 24.9037 393.216 26.3064 393.216 26.6089C393.216 39.0539 400.612 45.7921 410.878 45.7921C416.109 45.7921 422.38 42.9868 426.374 38.6689L426.894 38.9714L426.276 43.8944C420.932 47.9098 414.463 50.0138 409.021 50.0138C394.749 50.0138 384.174 40.0715 384.174 26.3201C384.174 9.85973 392.794 0.0137513 407.686 0.0137513C420.834 0.0137513 428.933 8.14081 428.933 20.5996L428.947 20.5858ZM406.87 20.8883C410.47 20.8883 416.517 20.5858 420.524 20.5858C420.426 9.03465 416.207 3.21782 407.897 3.21782C399.586 3.21782 394.65 9.74972 393.525 20.5858C397.533 20.5858 405.225 20.8883 406.87 20.8883Z",fill:"currentColor"})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"rv-logo-clip",children:e.jsx("rect",{width:"428.947",height:"50",fill:"white"})})})]}),S&&e.jsx("span",{className:"rv-sidebar-workspace",children:S})]}),e.jsx("button",{className:"rv-collapse-toggle",title:c?"Expand sidebar":"Collapse sidebar",onClick:W,children:c?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"13 17 18 12 13 7"}),e.jsx("polyline",{points:"6 17 11 12 6 7"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"11 17 6 12 11 7"}),e.jsx("polyline",{points:"18 17 13 12 18 7"})]})})]}),o&&e.jsx("div",{className:"rv-sidebar-panel",children:o}),e.jsx("nav",{className:"rv-sidebar-nav",children:O.map(r=>e.jsxs("a",{href:r.url,className:`rv-nav-item${r.url===E?" rv-active":""}`,title:c?r.label:void 0,children:[e.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:r.icon}}),!c&&e.jsx("span",{className:"rv-nav-label",children:r.label})]},r.url))}),x.length>0&&e.jsx("nav",{className:"rv-sidebar-pinned",children:x.map(r=>e.jsxs("a",{href:r.url,className:`rv-nav-item${r.url===E?" rv-active":""}`,title:c?r.label:void 0,children:[e.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:r.icon}}),!c&&e.jsx("span",{className:"rv-nav-label",children:r.label})]},r.url))}),e.jsxs("div",{className:"rv-sidebar-user",children:[e.jsx("div",{className:"rv-user-avatar",children:B}),!c&&e.jsx("div",{className:"rv-user-info",children:e.jsx("span",{className:"rv-user-email",title:s?.email??"",children:s?.email})}),f&&e.jsx("a",{className:"rv-account-settings-btn",href:f,title:"Account settings",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),e.jsx("button",{className:"rv-logout-btn",title:"Sign out",onClick:()=>y(!0),children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e.jsx("polyline",{points:"16 17 21 12 16 7"}),e.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})})]})]}),e.jsxs("div",{className:"rv-shell-body",children:[I&&e.jsx("header",{className:"rv-shell-header",children:w!==void 0?w:e.jsx(N,{value:n??"",venues:t,onChange:p??(()=>{})})}),e.jsx("main",{className:`rv-shell-content${i?" rv-shell-content--scroll":" rv-shell-content--fill"}`,children:v})]}),e.jsx(k,{open:A,title:"Sign out",message:"Are you sure you want to sign out?",confirmLabel:"Sign out",onConfirm:g,onCancel:()=>y(!1)})]})}d.AppShell=j,d.ConfirmModal=k,d.VenueSwitcher=N,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(E,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],c):(E=typeof globalThis<"u"?globalThis:E||self,c(E.ReVenueUiCoreReact={},E.jsxRuntime,E.React,E.ReactDOM))})(this,(function(E,c,C,Xt){"use strict";function Jn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const l=Jn(C),lt=Jn(Xt);function ea({open:e,title:t="Are you sure?",message:o="This action cannot be undone.",confirmLabel:r="Confirm",loading:n=!1,onConfirm:a,onCancel:s}){const[i,d]=C.useState(!1),[u,f]=C.useState(!1),h=C.useRef(`rv-confirm-${Math.random().toString(36).slice(2)}`).current;return C.useEffect(()=>{if(e)f(!0),requestAnimationFrame(()=>d(!0));else{d(!1);const m=setTimeout(()=>f(!1),200);return()=>clearTimeout(m)}},[e]),u?Xt.createPortal(c.jsx("div",{className:`rv-modal-backdrop${i?" rv-modal-visible":""}`,onClick:m=>{m.target===m.currentTarget&&s()},children:c.jsxs("div",{className:"rv-modal-dialog",role:"dialog","aria-modal":"true","aria-labelledby":h,children:[c.jsx("h2",{id:h,className:"rv-modal-title",children:t}),c.jsx("p",{className:"rv-modal-body",children:o}),c.jsxs("div",{className:"rv-modal-actions",children:[c.jsx("button",{className:"rv-modal-btn rv-modal-btn-ghost",onClick:s,disabled:n,children:"Cancel"}),c.jsx("button",{className:"rv-modal-btn rv-modal-btn-danger",onClick:a,disabled:n,children:r})]})]})}),document.body):null}function ta({value:e,venues:t,onChange:o}){const[r,n]=C.useState(!1),a=C.useRef(null),s=C.useMemo(()=>t.find(f=>f.id===e),[t,e]),i=C.useMemo(()=>{const f=new Map;for(const h of t){const m=h.workspace?.id??"__none__",p=h.workspace?.name??"";f.has(m)||f.set(m,{workspaceName:p,venues:[]}),f.get(m).venues.push(h)}return[...f.values()]},[t]),d=i.length>1;C.useEffect(()=>{if(!r)return;function f(h){a.current&&!a.current.contains(h.target)&&n(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[r]);function u(f){o(f),n(!1)}return c.jsxs("div",{ref:a,className:"rv-venue-switcher",children:[c.jsxs("button",{className:`rv-vs-trigger${r?" rv-open":""}`,onClick:()=>n(f=>!f),children:[c.jsxs("span",{className:"rv-vs-label",children:[c.jsx("span",{className:"rv-vs-venue",children:s?.name??"Select venue"}),s?.workspace&&d&&c.jsx("span",{className:"rv-vs-workspace",children:s.workspace.name})]}),c.jsx("svg",{className:"rv-vs-chevron",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),r&&c.jsx("div",{className:"rv-vs-dropdown",children:i.map(f=>c.jsxs("div",{children:[d&&c.jsx("div",{className:"rv-vs-workspace-header",children:f.workspaceName}),f.venues.map(h=>c.jsx("button",{className:`rv-vs-venue-option${h.id===e?" rv-active":""}`,onClick:()=>u(h.id),children:h.name},h.id))]},f.workspaceName))})]})}const oa="rv-theme";function rd(){return document.cookie.split("; ").find(o=>o.startsWith(`${oa}=`))?.split("=")[1]==="dark"?"dark":"light"}function nd(e){const t=[`${oa}=${e}`,"path=/","max-age=31536000","SameSite=Lax"];document.cookie=t.join("; ")}function ad(e){document.documentElement.setAttribute("data-theme",e)}function Xo(){const[e,t]=C.useState(()=>rd());C.useEffect(()=>{ad(e)},[e]);const o=C.useCallback(()=>{t(r=>{const n=r==="light"?"dark":"light";return nd(n),n})},[]);return{theme:e,toggleTheme:o}}function sd(){const e=window;if(e.__rvHistoryPatched)return;e.__rvHistoryPatched=!0;const t=history.pushState.bind(history);history.pushState=(...r)=>{t(...r),window.dispatchEvent(new Event("locationchange"))};const o=history.replaceState.bind(history);history.replaceState=(...r)=>{o(...r),window.dispatchEvent(new Event("locationchange"))}}const ra="rv_sidebar_collapsed",id=3600*24*365;function ld(){const e=`${ra}=`;for(const t of document.cookie.split(";")){const o=t.trim();if(o.startsWith(e))return decodeURIComponent(o.slice(e.length))==="true"}return!1}function cd(e,t){const o=t?`; Domain=${t}`:"";document.cookie=`${ra}=${e}; Path=/; Max-Age=${id}; SameSite=Lax${o}`}function dd({user:e,isAdmin:t,venues:o,activeVenueId:r,navItems:n,cookieDomain:a,onSwitchVenue:s,onLogout:i,accountSettingsUrl:d,headerSlot:u,sidebarPanel:f,scrollable:h=!0,children:m}){const{theme:p,toggleTheme:w}=Xo(),[g,v]=C.useState(()=>ld()),[y,b]=C.useState(!1),[x,S]=C.useState(()=>window.location.href);C.useEffect(()=>{sd();function N(){S(window.location.href)}return window.addEventListener("popstate",N),window.addEventListener("locationchange",N),()=>{window.removeEventListener("popstate",N),window.removeEventListener("locationchange",N)}},[]);function T(){const N=!g;v(N),cd(N,a)}const P=C.useMemo(()=>o.find(N=>N.id===r),[o,r]),A=P?.workspace?.name??"",B=C.useMemo(()=>e?.email?e.email.slice(0,2).toUpperCase():"?",[e?.email]),k=C.useMemo(()=>{const N=P?.workspace?.id;return n.filter(V=>V.hidden?!1:!!(!V.permission||t||e?.globalPermissions.includes(V.permission)||N&&e?.workspacePermissions?.[N]?.includes(V.permission)||r&&e?.venuePermissions?.[r]?.includes(V.permission)))},[n,t,e,P,r]),M=C.useMemo(()=>k.filter(N=>!N.pinned),[k]),L=C.useMemo(()=>k.filter(N=>N.pinned),[k]),O=C.useMemo(()=>n.filter(V=>V.url&&x.startsWith(V.url)).sort((V,H)=>H.url.length-V.url.length)[0]?.url??null,[n,x]),Y=o.length>0||u!==void 0;return c.jsxs("div",{className:"rv-app-shell",children:[c.jsxs("aside",{className:`rv-sidebar${g?" rv-collapsed":""}`,children:[c.jsxs("div",{className:"rv-sidebar-top",children:[!g&&c.jsxs("div",{className:"rv-sidebar-brand",children:[c.jsxs("svg",{className:"rv-sidebar-logo",viewBox:"0 0 429 50",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Re-venue",children:[c.jsxs("g",{clipPath:"url(#rv-logo-clip)",children:[c.jsx("path",{d:"M24.946 0.60506C24.6367 1.30638 24.2289 3.01155 24.2289 7.32948V8.73212L23.5117 9.22717C22.3867 8.12706 20.2212 7.61826 18.4775 7.61826C11.9105 7.61826 8.0013 13.6414 8.0013 21.3696V35.0247C8.0013 41.0479 8.09974 45.6683 8.4091 48.9824C6.86228 48.6799 5.54045 48.4736 4.303 48.4736C2.96711 48.4736 1.63122 48.6799 -0.0140381 48.9824C0.295326 46.2734 0.39376 42.9593 0.39376 38.2426V15.8691C0.407822 11.5512 0.309388 4.0154 2.39182e-05 1.00385C1.95464 1.40264 3.0796 1.4989 4.31706 1.4989C5.55452 1.4989 6.89041 1.29263 8.42316 1.00385L8.01537 6.0231C7.91693 7.12321 7.91693 8.73212 7.91693 10.7398L8.12786 10.8361C12.1215 3.61661 16.8322 0 21.768 0C23.0055 0 23.7226 0.206271 24.946 0.60506Z",fill:"currentColor"}),c.jsx("path",{d:"M74.7396 20.5858V22.291L74.5287 24.3949C68.3695 24.2987 61.6901 24.0924 54.4059 24.0924C49.4842 24.0924 44.3376 24.2987 39.1065 24.3949C39.0081 24.9037 39.0081 26.3064 39.0081 26.6089C39.0081 39.0539 46.4047 45.7921 56.6699 45.7921C61.901 45.7921 68.1727 42.9868 72.1663 38.6689L72.6866 38.9714L72.0678 43.8944C66.7243 47.9098 60.2557 50.0137 54.8137 50.0137C40.5408 50.0137 29.9662 40.0715 29.9662 26.3201C29.9802 9.84598 38.6003 0 53.4919 0C66.6399 0 74.7396 8.12706 74.7396 20.5858ZM52.6623 20.8883C56.2621 20.8883 62.3088 20.5858 66.3165 20.5858C66.218 9.03465 61.9994 3.21782 53.6888 3.21782C45.3781 3.21782 40.4424 9.74972 39.3174 20.5858C43.3251 20.5858 51.017 20.8883 52.6623 20.8883Z",fill:"currentColor"}),c.jsx("path",{d:"M164.989 22.9923V27.709H82.8533V22.9923H164.989Z",fill:"currentColor"}),c.jsx("path",{d:"M172.274 1.51265C173.82 1.51265 175.142 1.30638 176.788 1.0176C180.992 14.1639 185.928 26.8152 192.087 40.1815C195.687 32.852 198.148 26.8289 207.794 1.0176C208.821 1.32013 209.847 1.51265 210.972 1.51265C212.21 1.51265 213.025 1.30638 214.15 1.0176L203.477 24.615C199.779 32.9483 196.502 40.9791 193.521 49.0099C192.495 48.7074 191.468 48.5011 190.343 48.5011C189.106 48.5011 188.6 48.5974 187.053 49.0099C180.486 32.5495 174.636 17.1755 167.141 1.0176C169.292 1.41639 170.741 1.51265 172.274 1.51265Z",fill:"currentColor"}),c.jsx("path",{d:"M263.452 20.5858V22.291L263.241 24.3949C257.082 24.2987 250.402 24.0924 243.118 24.0924C238.196 24.0924 233.05 24.2987 227.819 24.3949C227.72 24.9037 227.72 26.3064 227.72 26.6089C227.72 39.0539 235.117 45.7921 245.382 45.7921C250.613 45.7921 256.885 42.9868 260.878 38.6689L261.399 38.9714L260.78 43.8944C255.436 47.9098 248.968 50.0138 243.526 50.0138C229.253 50.0138 218.678 40.0715 218.678 26.3201C218.678 9.85973 227.298 0.0137513 242.19 0.0137513C255.338 0.0137513 263.438 8.14081 263.438 20.5996L263.452 20.5858ZM241.374 20.8883C244.974 20.8883 251.021 20.5858 255.029 20.5858C254.93 9.03465 250.711 3.21782 242.401 3.21782C234.09 3.21782 229.154 9.74972 228.029 20.5858C232.037 20.5858 239.729 20.8883 241.374 20.8883Z",fill:"currentColor"}),c.jsx("path",{d:"M315.706 17.7668C315.706 23.0886 315.298 28.9054 315.298 36.5374C315.298 45.3795 315.509 47.181 315.509 48.9824C313.765 48.5836 312.528 48.4736 311.192 48.4736C309.856 48.4736 308.619 48.5699 306.988 48.9824C306.988 43.2618 307.705 34.2272 307.705 27.6953V19.967C307.705 11.6337 303.908 5.21177 296.413 5.21177C287.371 5.21177 282.66 10.8361 282.66 21.2734V33.3196C282.66 37.6375 282.97 44.4582 283.476 48.9824C281.831 48.6799 280.396 48.4736 278.85 48.4736C277.303 48.4736 275.868 48.6799 274.223 48.9824C275.039 42.6568 275.039 35.3273 275.039 31.3119V17.753C275.039 11.7299 274.729 6.20187 274.223 0.990099C275.967 1.38889 277.514 1.48515 278.85 1.48515C279.876 1.48515 281.212 1.27888 282.956 0.990099C282.857 2.69527 282.646 6.61441 282.646 9.0209H282.857C286.654 3.30033 291.787 -0.0137513 299.183 -0.0137513C309.448 -0.0137513 315.72 5.70682 315.72 17.753L315.706 17.7668Z",fill:"currentColor"}),c.jsx("path",{d:"M331.413 1.00385C333.157 1.30638 334.591 1.4989 335.73 1.4989C336.968 1.4989 338.304 1.29263 339.935 1.00385C339.218 9.43344 338.908 19.6782 338.908 28.9191C338.908 31.4356 338.908 37.6513 341.889 40.7728C343.844 43.0831 346.924 44.7882 350.931 44.7882C356.584 44.7882 359.861 42.3817 361.815 39.2602C364.276 35.2448 364.487 32.2332 364.487 21.3834C364.487 11.2486 364.389 3.10781 364.276 1.00385C366.02 1.40264 367.257 1.4989 368.593 1.4989C370.14 1.4989 371.265 1.40264 372.798 1.00385C372.39 7.42574 372.081 17.368 372.081 31.1194C372.081 38.8476 372.179 44.2657 372.488 48.9961C370.942 48.6936 369.62 48.4873 368.481 48.4873C367.342 48.4873 366.02 48.6936 364.473 48.9961C364.571 47.6898 364.684 45.4758 364.684 43.9769V40.3603H364.473C360.873 46.7822 355.023 50 348.456 50C337.783 50 331.315 44.3757 331.315 33.1271C331.315 29.0154 331.624 19.7745 331.624 16.5567C331.624 11.3311 331.526 6.21562 331.413 0.990099V1.00385Z",fill:"currentColor"}),c.jsx("path",{d:"M428.947 20.5858V22.291L428.736 24.3949C422.577 24.2987 415.898 24.0924 408.614 24.0924C403.692 24.0924 398.545 24.2987 393.314 24.3949C393.216 24.9037 393.216 26.3064 393.216 26.6089C393.216 39.0539 400.612 45.7921 410.878 45.7921C416.109 45.7921 422.38 42.9868 426.374 38.6689L426.894 38.9714L426.276 43.8944C420.932 47.9098 414.463 50.0138 409.021 50.0138C394.749 50.0138 384.174 40.0715 384.174 26.3201C384.174 9.85973 392.794 0.0137513 407.686 0.0137513C420.834 0.0137513 428.933 8.14081 428.933 20.5996L428.947 20.5858ZM406.87 20.8883C410.47 20.8883 416.517 20.5858 420.524 20.5858C420.426 9.03465 416.207 3.21782 407.897 3.21782C399.586 3.21782 394.65 9.74972 393.525 20.5858C397.533 20.5858 405.225 20.8883 406.87 20.8883Z",fill:"currentColor"})]}),c.jsx("defs",{children:c.jsx("clipPath",{id:"rv-logo-clip",children:c.jsx("rect",{width:"428.947",height:"50",fill:"white"})})})]}),A&&c.jsx("span",{className:"rv-sidebar-workspace",children:A})]}),c.jsx("button",{className:"rv-collapse-toggle",title:g?"Expand sidebar":"Collapse sidebar",onClick:T,children:g?c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"13 17 18 12 13 7"}),c.jsx("polyline",{points:"6 17 11 12 6 7"})]}):c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"11 17 6 12 11 7"}),c.jsx("polyline",{points:"18 17 13 12 18 7"})]})})]}),f&&c.jsx("div",{className:"rv-sidebar-panel",children:f}),c.jsx("nav",{className:"rv-sidebar-nav",children:M.map(N=>c.jsxs("a",{href:N.url,className:`rv-nav-item${N.url===O?" rv-active":""}`,title:g?N.label:void 0,children:[c.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:N.icon}}),!g&&c.jsx("span",{className:"rv-nav-label",children:N.label})]},N.url))}),L.length>0&&c.jsx("nav",{className:"rv-sidebar-pinned",children:L.map(N=>c.jsxs("a",{href:N.url,className:`rv-nav-item${N.url===O?" rv-active":""}`,title:g?N.label:void 0,children:[c.jsx("span",{className:"rv-nav-icon",dangerouslySetInnerHTML:{__html:N.icon}}),!g&&c.jsx("span",{className:"rv-nav-label",children:N.label})]},N.url))}),c.jsxs("div",{className:"rv-sidebar-user",children:[c.jsx("div",{className:"rv-user-avatar",children:B}),!g&&c.jsx("div",{className:"rv-user-info",children:c.jsx("span",{className:"rv-user-email",title:e?.email??"",children:e?.email})}),c.jsx("button",{className:"rv-theme-toggle-btn",title:`Switch to ${p==="light"?"dark":"light"} mode`,"aria-label":`Switch to ${p==="light"?"dark":"light"} mode`,onClick:w,children:p==="light"?c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"5"}),c.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),c.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),c.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),c.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),c.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),c.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),c.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),c.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})}),d&&c.jsx("a",{className:"rv-account-settings-btn",href:d,title:"Account settings",children:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),c.jsx("button",{className:"rv-logout-btn",title:"Sign out",onClick:()=>b(!0),children:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),c.jsx("polyline",{points:"16 17 21 12 16 7"}),c.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})})]})]}),c.jsxs("div",{className:"rv-shell-body",children:[Y&&c.jsx("header",{className:"rv-shell-header",children:u!==void 0?u:c.jsx(ta,{value:r??"",venues:o,onChange:s??(()=>{})})}),c.jsx("main",{className:`rv-shell-content${h?" rv-shell-content--scroll":" rv-shell-content--fill"}`,children:m})]}),c.jsx(ea,{open:y,title:"Sign out",message:"Are you sure you want to sign out?",confirmLabel:"Sign out",onConfirm:i,onCancel:()=>b(!1)})]})}function pe(e,t=[]){let o=[];function r(a,s){const i=l.createContext(s);i.displayName=a+"Context";const d=o.length;o=[...o,s];const u=h=>{const{scope:m,children:p,...w}=h,g=m?.[e]?.[d]||i,v=l.useMemo(()=>w,Object.values(w));return c.jsx(g.Provider,{value:v,children:p})};u.displayName=a+"Provider";function f(h,m){const p=m?.[e]?.[d]||i,w=l.useContext(p);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[u,f]}const n=()=>{const a=o.map(s=>l.createContext(s));return function(i){const d=i?.[e]||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return n.scopeName=e,[r,ud(n,...t)]}function ud(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=r.reduce((i,{useScope:d,scopeName:u})=>{const h=d(a)[`__scope${u}`];return{...i,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function na(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function fd(...e){return t=>{let o=!1;const r=e.map(n=>{const a=na(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){const a=r[n];typeof a=="function"?a():na(e[n],null)}}}}function K(...e){return l.useCallback(fd(...e),e)}function F(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e?.(n),o===!1||!n.defaultPrevented)return t?.(n)}}var se=globalThis?.document?l.useLayoutEffect:()=>{},pd=l[" useId ".trim().toString()]||(()=>{}),hd=0;function Be(e){const[t,o]=l.useState(pd());return se(()=>{o(r=>r??String(hd++))},[e]),t?`radix-${t}`:""}var gd=l[" useInsertionEffect ".trim().toString()]||se;function He({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){const[n,a,s]=md({defaultProp:t,onChange:o}),i=e!==void 0,d=i?e:n;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const h=f.current;h!==i&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const u=l.useCallback(f=>{if(i){const h=vd(f)?f(e):f;h!==e&&s.current?.(h)}else a(f)},[i,e,a,s]);return[d,u]}function md({defaultProp:e,onChange:t}){const[o,r]=l.useState(e),n=l.useRef(o),a=l.useRef(t);return gd(()=>{a.current=t},[t]),l.useEffect(()=>{n.current!==o&&(a.current?.(o),n.current=o)},[o,n]),[o,r,a]}function vd(e){return typeof e=="function"}function et(e){const t=l.forwardRef((o,r)=>{let{children:n,...a}=o,s=null,i=!1;const d=[];sa(n)&&typeof qt=="function"&&(n=qt(n._payload)),l.Children.forEach(n,m=>{if(Sd(m)){i=!0;const p=m;let w="child"in p.props?p.props.child:p.props.children;sa(w)&&typeof qt=="function"&&(w=qt(w._payload)),s=yd(p,w),d.push(s?.props?.children)}else d.push(m)}),s?s=l.cloneElement(s,void 0,d):!i&&l.Children.count(n)===1&&l.isValidElement(n)&&(s=n);const u=s?Cd(s):void 0,f=K(r,u);if(!s){if(n||n===0)throw new Error(i?Pd(e):Nd(e));return n}const h=xd(a,s.props??{});return s.type!==l.Fragment&&(h.ref=r?f:u),l.cloneElement(s,h)});return t.displayName=`${e}.Slot`,t}var bd=et("Slot"),aa=Symbol.for("radix.slottable");function wd(e){const t=o=>"child"in o?o.children(o.child):o.children;return t.displayName=`${e}.Slottable`,t.__radixId=aa,t}var yd=(e,t)=>{if("child"in e.props){const o=e.props.child;return l.isValidElement(o)?l.cloneElement(o,void 0,e.props.children(o.props.children)):null}return l.isValidElement(t)?t:null};function xd(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...i)=>{const d=a(...i);return n(...i),d}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function Cd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function Sd(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aa}var Ed=Symbol.for("react.lazy");function sa(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Ed&&"_payload"in e&&Td(e._payload)}function Td(e){return typeof e=="object"&&e!==null&&"then"in e}var Nd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Pd=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,qt=l[" use ".trim().toString()],Ad=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],R=Ad.reduce((e,t)=>{const o=et(`Primitive.${t}`),r=l.forwardRef((n,a)=>{const{asChild:s,...i}=n,d=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(d,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ia(e,t){e&<.flushSync(()=>e.dispatchEvent(t))}function le(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>((...o)=>t.current?.(...o)),[])}function kd(e,t=globalThis?.document){const o=le(e);l.useEffect(()=>{const r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var Dd="DismissableLayer",qo="dismissableLayer.update",Od="dismissableLayer.pointerDownOutside",_d="dismissableLayer.focusOutside",la,Zo=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ct=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:i,onDismiss:d,...u}=e,f=l.useContext(Zo),[h,m]=l.useState(null),p=h?.ownerDocument??globalThis?.document,[,w]=l.useState({}),g=K(t,k=>m(k)),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=h?v.indexOf(h):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,T=x>=b,P=l.useRef(!1),A=Ld(k=>{const M=k.target;if(!(M instanceof Node))return;const L=[...f.branches].some(O=>O.contains(M));!T||L||(a?.(k),i?.(k),k.defaultPrevented||d?.())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:f.dismissableSurfaces}),B=$d(k=>{if(r&&P.current)return;const M=k.target;[...f.branches].some(O=>O.contains(M))||(s?.(k),i?.(k),k.defaultPrevented||d?.())},p);return kd(k=>{x===f.layers.size-1&&(n?.(k),!k.defaultPrevented&&d&&(k.preventDefault(),d()))},p),l.useEffect(()=>{if(h)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(la=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),da(),()=>{o&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=la))}},[h,p,o,f]),l.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),da())},[h,f]),l.useEffect(()=>{const k=()=>w({});return document.addEventListener(qo,k),()=>document.removeEventListener(qo,k)},[]),c.jsx(R.div,{...u,ref:g,style:{pointerEvents:S?T?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,B.onFocusCapture),onBlurCapture:F(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,A.onPointerDownCapture)})});ct.displayName=Dd;var Id="DismissableLayerBranch",ca=l.forwardRef((e,t)=>{const o=l.useContext(Zo),r=l.useRef(null),n=K(t,r);return l.useEffect(()=>{const a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),c.jsx(R.div,{...e,ref:n})});ca.displayName=Id;function Md(){const e=l.useContext(Zo),[t,o]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),o}function Ld(e,t){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:n,dismissableSurfaces:a}=t,s=le(e),i=l.useRef(!1),d=l.useRef(!1),u=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function h(){d.current=!1,n.current=!1,u.current.clear()}function m(){return Array.from(u.current.values()).some(Boolean)}function p(b){if(!d.current)return;const x=b.target;x instanceof Node&&[...a].some(T=>T.contains(x))||u.current.set(b.type,!0),b.type==="click"&&window.setTimeout(()=>{d.current&&f.current()},0)}function w(b){d.current&&u.current.set(b.type,!1)}const g=b=>{if(b.target&&!i.current){let x=function(){o.removeEventListener("click",f.current);const T=m();h(),T||ua(Od,s,S,{discrete:!0})};const S={originalEvent:b};d.current=!0,n.current=r&&b.button===0,u.current.clear(),!r||b.button!==0?x():(o.removeEventListener("click",f.current),f.current=x,o.addEventListener("click",f.current,{once:!0}))}else o.removeEventListener("click",f.current),h();i.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const b of v)o.addEventListener(b,p,!0),o.addEventListener(b,w);const y=window.setTimeout(()=>{o.addEventListener("pointerdown",g)},0);return()=>{window.clearTimeout(y),o.removeEventListener("pointerdown",g),o.removeEventListener("click",f.current);for(const b of v)o.removeEventListener(b,p,!0),o.removeEventListener(b,w)}},[o,s,r,n,a]),{onPointerDownCapture:()=>i.current=!0}}function $d(e,t=globalThis?.document){const o=le(e),r=l.useRef(!1);return l.useEffect(()=>{const n=a=>{a.target&&!r.current&&ua(_d,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function da(){const e=new CustomEvent(qo);document.dispatchEvent(e)}function ua(e,t,o,{discrete:r}){const n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?ia(n,a):n.dispatchEvent(a)}var Fd=ct,Bd=ca,Qo="focusScope.autoFocusOnMount",Jo="focusScope.autoFocusOnUnmount",fa={bubbles:!1,cancelable:!0},Hd="FocusScope",Zt=l.forwardRef((e,t)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,d]=l.useState(null),u=le(n),f=le(a),h=l.useRef(null),m=K(t,g=>d(g)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(x){if(p.paused||!i)return;const S=x.target;i.contains(S)?h.current=S:Re(h.current,{select:!0})},v=function(x){if(p.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Re(h.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const T of x)T.removedNodes.length>0&&Re(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),b.disconnect()}}},[r,i,p.paused]),l.useEffect(()=>{if(i){ga.add(p);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(Qo,fa);i.addEventListener(Qo,u),i.dispatchEvent(y),y.defaultPrevented||(Rd(jd(pa(i)),{select:!0}),document.activeElement===g&&Re(i))}return()=>{i.removeEventListener(Qo,u),setTimeout(()=>{const y=new CustomEvent(Jo,fa);i.addEventListener(Jo,f),i.dispatchEvent(y),y.defaultPrevented||Re(g??document.body,{select:!0}),i.removeEventListener(Jo,f),ga.remove(p)},0)}}},[i,u,f,p]);const w=l.useCallback(g=>{if(!o&&!r||p.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const b=g.currentTarget,[x,S]=Vd(b);x&&S?!g.shiftKey&&y===S?(g.preventDefault(),o&&Re(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),o&&Re(S,{select:!0})):y===b&&g.preventDefault()}},[o,r,p.paused]);return c.jsx(R.div,{tabIndex:-1,...s,ref:m,onKeyDown:w})});Zt.displayName=Hd;function Rd(e,{select:t=!1}={}){const o=document.activeElement;for(const r of e)if(Re(r,{select:t}),document.activeElement!==o)return}function Vd(e){const t=pa(e),o=ha(t,e),r=ha(t.reverse(),e);return[o,r]}function pa(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ha(e,t){for(const o of e)if(!zd(o,{upTo:t}))return o}function zd(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wd(e){return e instanceof HTMLInputElement&&"select"in e}function Re(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&Wd(e)&&t&&e.select()}}var ga=Ud();function Ud(){let e=[];return{add(t){const o=e[0];t!==o&&o?.pause(),e=ma(e,t),e.unshift(t)},remove(t){e=ma(e,t),e[0]?.resume()}}}function ma(e,t){const o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function jd(e){return e.filter(t=>t.tagName!=="A")}var Yd="Portal",Mt=l.forwardRef((e,t)=>{const{container:o,...r}=e,[n,a]=l.useState(!1);se(()=>a(!0),[]);const s=o||n&&globalThis?.document?.body;return s?lt.createPortal(c.jsx(R.div,{...r,ref:t}),s):null});Mt.displayName=Yd;function Kd(e,t){return l.useReducer((o,r)=>t[o][r]??o,e)}var ce=e=>{const{present:t,children:o}=e,r=Gd(t),n=typeof o=="function"?o({present:r.isPresent}):l.Children.only(o),a=Xd(r.ref,qd(n));return typeof o=="function"||r.isPresent?l.cloneElement(n,{ref:a}):null};ce.displayName="Presence";function Gd(e){const[t,o]=l.useState(),r=l.useRef(null),n=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,d]=Kd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Qt(r.current);a.current=i==="mounted"?u:"none"},[i]),se(()=>{const u=r.current,f=n.current;if(f!==e){const m=a.current,p=Qt(u);e?d("MOUNT"):p==="none"||u?.display==="none"?d("UNMOUNT"):d(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,d]),se(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,h=p=>{const g=Qt(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(d("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(a.current=Qt(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function va(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xd(...e){const t=l.useRef(e);return t.current=e,l.useCallback(o=>{const r=t.current;let n=!1;const a=r.map(s=>{const i=va(s,o);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<a.length;s++){const i=a[s];typeof i=="function"?i():va(r[s],null)}}},[])}function Qt(e){return e?.animationName||"none"}function qd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Jt=0,dt=null;function er(){l.useEffect(()=>{dt||(dt={start:ba(),end:ba()});const{start:e,end:t}=dt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Jt++,()=>{Jt===1&&(dt?.start.remove(),dt?.end.remove(),dt=null),Jt=Math.max(0,Jt-1)}},[])}function ba(){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 Pe=function(){return Pe=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Pe.apply(this,arguments)};function wa(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function Zd(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var eo="right-scroll-bar-position",to="width-before-scroll-bar",Qd="with-scroll-bars-hidden",Jd="--removed-body-scroll-bar-size";function tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eu(e,t){var o=C.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var tu=typeof window<"u"?l.useLayoutEffect:l.useEffect,ya=new WeakMap;function ou(e,t){var o=eu(null,function(r){return e.forEach(function(n){return tr(n,r)})});return tu(function(){var r=ya.get(o);if(r){var n=new Set(r),a=new Set(e),s=o.current;n.forEach(function(i){a.has(i)||tr(i,null)}),a.forEach(function(i){n.has(i)||tr(i,s)})}ya.set(o,e)},[e]),o}function ru(e){return e}function nu(e,t){t===void 0&&(t=ru);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var s=t(a,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var d=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),o={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),o}}}};return n}function au(e){e===void 0&&(e={});var t=nu(null);return t.options=Pe({async:!0,ssr:!1},e),t}var xa=function(e){var t=e.sideCar,o=wa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Pe({},o))};xa.isSideCarExport=!0;function su(e,t){return e.useMedium(t),xa}var Ca=au(),or=function(){},oo=l.forwardRef(function(e,t){var o=l.useRef(null),r=l.useState({onScrollCapture:or,onWheelCapture:or,onTouchMoveCapture:or}),n=r[0],a=r[1],s=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,w=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,S=wa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,P=ou([o,t]),A=Pe(Pe({},S),n);return l.createElement(l.Fragment,null,f&&l.createElement(T,{sideCar:Ca,removeScrollBar:u,shards:h,noRelative:p,noIsolation:w,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:x}),s?l.cloneElement(l.Children.only(i),Pe(Pe({},A),{ref:P})):l.createElement(b,Pe({},A,{className:d,ref:P}),i))});oo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oo.classNames={fullWidth:to,zeroRight:eo};var iu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iu();return t&&e.setAttribute("nonce",t),e}function cu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function du(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uu=function(){var e=0,t=null;return{add:function(o){e==0&&(t=lu())&&(cu(t,o),du(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fu=function(){var e=uu();return function(t,o){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},Sa=function(){var e=fu(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t},pu={left:0,top:0,right:0,gap:0},rr=function(e){return parseInt(e||"",10)||0},hu=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[rr(o),rr(r),rr(n)]},gu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pu;var t=hu(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}},mu=Sa(),ut="data-scroll-locked",vu=function(e,t,o,r){var n=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
|
|
2
|
+
.`.concat(Qd,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(ut,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
|
|
10
|
+
padding-left: `.concat(n,`px;
|
|
11
|
+
padding-top: `).concat(a,`px;
|
|
12
|
+
padding-right: `).concat(s,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
16
|
+
`),o==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(eo,` {
|
|
20
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(to,` {
|
|
24
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(eo," .").concat(eo,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(to," .").concat(to,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(ut,`] {
|
|
36
|
+
`).concat(Jd,": ").concat(i,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Ea=function(){var e=parseInt(document.body.getAttribute(ut)||"0",10);return isFinite(e)?e:0},bu=function(){l.useEffect(function(){return document.body.setAttribute(ut,(Ea()+1).toString()),function(){var e=Ea()-1;e<=0?document.body.removeAttribute(ut):document.body.setAttribute(ut,e.toString())}},[])},wu=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;bu();var a=l.useMemo(function(){return gu(n)},[n]);return l.createElement(mu,{styles:vu(a,!t,n,o?"":"!important")})},nr=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return nr=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{nr=!1}var ft=nr?{passive:!1}:!1,yu=function(e){return e.tagName==="TEXTAREA"},Ta=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!yu(e)&&o[t]==="visible")},xu=function(e){return Ta(e,"overflowY")},Cu=function(e){return Ta(e,"overflowX")},Na=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Pa(e,r);if(n){var a=Aa(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},Su=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},Eu=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},Pa=function(e,t){return e==="v"?xu(t):Cu(t)},Aa=function(e,t){return e==="v"?Su(t):Eu(t)},Tu=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nu=function(e,t,o,r,n){var a=Tu(e,window.getComputedStyle(t).direction),s=a*r,i=o.target,d=t.contains(i),u=!1,f=s>0,h=0,m=0;do{if(!i)break;var p=Aa(e,i),w=p[0],g=p[1],v=p[2],y=g-v-a*w;(w||y)&&Pa(e,i)&&(h+=y,m+=w);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&Math.abs(h)<1||!f&&Math.abs(m)<1)&&(u=!0),u},no=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ka=function(e){return[e.deltaX,e.deltaY]},Da=function(e){return e&&"current"in e?e.current:e},Pu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Au=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},ku=0,pt=[];function Du(e){var t=l.useRef([]),o=l.useRef([0,0]),r=l.useRef(),n=l.useState(ku++)[0],a=l.useState(Sa)[0],s=l.useRef(e);l.useEffect(function(){s.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=Zd([e.lockRef.current],(e.shards||[]).map(Da),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var y=no(g),b=o.current,x="deltaX"in g?g.deltaX:b[0]-y[0],S="deltaY"in g?g.deltaY:b[1]-y[1],T,P=g.target,A=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&P.type==="range")return!1;var B=window.getSelection(),k=B&&B.anchorNode,M=k?k===P||k.contains(P):!1;if(M)return!1;var L=Na(A,P);if(!L)return!0;if(L?T=A:(T=A==="v"?"h":"v",L=Na(A,P)),!L)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=T),!T)return!0;var O=r.current||T;return Nu(O,v,g,O==="h"?x:S)},[]),d=l.useCallback(function(g){var v=g;if(!(!pt.length||pt[pt.length-1]!==a)){var y="deltaY"in v?ka(v):no(v),b=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Pu(T.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(Da).filter(Boolean).filter(function(T){return T.contains(v.target)}),S=x.length>0?i(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=l.useCallback(function(g,v,y,b){var x={name:g,delta:v,target:y,should:b,shadowParent:Ou(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=l.useCallback(function(g){o.current=no(g),r.current=void 0},[]),h=l.useCallback(function(g){u(g.type,ka(g),g.target,i(g,e.lockRef.current))},[]),m=l.useCallback(function(g){u(g.type,no(g),g.target,i(g,e.lockRef.current))},[]);l.useEffect(function(){return pt.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",d,ft),document.addEventListener("touchmove",d,ft),document.addEventListener("touchstart",f,ft),function(){pt=pt.filter(function(g){return g!==a}),document.removeEventListener("wheel",d,ft),document.removeEventListener("touchmove",d,ft),document.removeEventListener("touchstart",f,ft)}},[]);var p=e.removeScrollBar,w=e.inert;return l.createElement(l.Fragment,null,w?l.createElement(a,{styles:Au(n)}):null,p?l.createElement(wu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ou(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _u=su(Ca,Du);var ao=l.forwardRef(function(e,t){return l.createElement(oo,Pe({},e,{ref:t,sideCar:_u}))});ao.classNames=oo.classNames;var Iu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ht=new WeakMap,so=new WeakMap,io={},ar=0,Oa=function(e){return e&&(e.host||Oa(e.parentNode))},Mu=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=Oa(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},Lu=function(e,t,o,r){var n=Mu(t,Array.isArray(e)?e:[e]);io[o]||(io[o]=new WeakMap);var a=io[o],s=[],i=new Set,d=new Set(n),u=function(h){!h||i.has(h)||(i.add(h),u(h.parentNode))};n.forEach(u);var f=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(m){if(i.has(m))f(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",g=(ht.get(m)||0)+1,v=(a.get(m)||0)+1;ht.set(m,g),a.set(m,v),s.push(m),g===1&&w&&so.set(m,!0),v===1&&m.setAttribute(o,"true"),w||m.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",m,y)}})};return f(t),i.clear(),ar++,function(){s.forEach(function(h){var m=ht.get(h)-1,p=a.get(h)-1;ht.set(h,m),a.set(h,p),m||(so.has(h)||h.removeAttribute(r),so.delete(h)),p||h.removeAttribute(o)}),ar--,ar||(ht=new WeakMap,ht=new WeakMap,so=new WeakMap,io={})}},sr=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=Iu(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),Lu(r,n,o,"aria-hidden")):function(){return null}},lo="Dialog",[_a,Ia]=pe(lo),[$u,we]=_a(lo),co=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!0}=e,i=l.useRef(null),d=l.useRef(null),[u,f]=He({prop:r,defaultProp:n??!1,onChange:a,caller:lo});return c.jsx($u,{scope:t,triggerRef:i,contentRef:d,contentId:Be(),titleId:Be(),descriptionId:Be(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(h=>!h),[f]),modal:s,children:o})};co.displayName=lo;var Ma="DialogTrigger",uo=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ma,o),a=K(t,n.triggerRef);return c.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":lr(n.open),...r,ref:a,onClick:F(e.onClick,n.onOpenToggle)})});uo.displayName=Ma;var ir="DialogPortal",[Fu,La]=_a(ir,{forceMount:void 0}),fo=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:n}=e,a=we(ir,t);return c.jsx(Fu,{scope:t,forceMount:o,children:l.Children.map(r,s=>c.jsx(ce,{present:o||a.open,children:c.jsx(Mt,{asChild:!0,container:n,children:s})}))})};fo.displayName=ir;var po="DialogOverlay",gt=l.forwardRef((e,t)=>{const o=La(po,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=we(po,e.__scopeDialog);return a.modal?c.jsx(ce,{present:r||a.open,children:c.jsx(Hu,{...n,ref:t})}):null});gt.displayName=po;var Bu=et("DialogOverlay.RemoveScroll"),Hu=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(po,o),a=Md(),s=K(t,a);return c.jsx(ao,{as:Bu,allowPinchZoom:!0,shards:[n.contentRef],children:c.jsx(R.div,{"data-state":lr(n.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),mt="DialogContent",vt=l.forwardRef((e,t)=>{const o=La(mt,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,a=we(mt,e.__scopeDialog);return c.jsx(ce,{present:r||a.open,children:a.modal?c.jsx(Ru,{...n,ref:t}):c.jsx(Vu,{...n,ref:t})})});vt.displayName=mt;var Ru=l.forwardRef((e,t)=>{const o=we(mt,e.__scopeDialog),r=l.useRef(null),n=K(t,o.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return sr(a)},[]),c.jsx($a,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:F(e.onCloseAutoFocus,a=>{a.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault())})}),Vu=l.forwardRef((e,t)=>{const o=we(mt,e.__scopeDialog),r=l.useRef(!1),n=l.useRef(!1);return c.jsx($a,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),$a=l.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,...s}=e,i=we(mt,o);return er(),c.jsx(c.Fragment,{children:c.jsx(Zt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(ct,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":lr(i.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})}),Fa="DialogTitle",bt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Fa,o);return c.jsx(R.h2,{id:n.titleId,...r,ref:t})});bt.displayName=Fa;var Ba="DialogDescription",wt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ba,o);return c.jsx(R.p,{id:n.descriptionId,...r,ref:t})});wt.displayName=Ba;var Ha="DialogClose",tt=l.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=we(Ha,o);return c.jsx(R.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>n.onOpenChange(!1))})});tt.displayName=Ha;function lr(e){return e?"open":"closed"}var Ra="AlertDialog",[zu]=pe(Ra,[Ia]),_e=Ia(),Va=e=>{const{__scopeAlertDialog:t,...o}=e,r=_e(t);return c.jsx(co,{...r,...o,modal:!0})};Va.displayName=Ra;var Wu="AlertDialogTrigger",za=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(uo,{...n,...r,ref:t})});za.displayName=Wu;var Uu="AlertDialogPortal",Wa=e=>{const{__scopeAlertDialog:t,...o}=e,r=_e(t);return c.jsx(fo,{...r,...o})};Wa.displayName=Uu;var ju="AlertDialogOverlay",Ua=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(gt,{...n,...r,ref:t})});Ua.displayName=ju;var ja="AlertDialogContent",[Yu,Ku]=zu(ja),Ya=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...n}=e,a=_e(o),s=l.useRef(null),i=K(t,s),d=l.useRef(null);return c.jsx(Yu,{scope:o,cancelRef:d,children:c.jsx(vt,{role:"alertdialog",...a,...n,ref:i,onOpenAutoFocus:F(n.onOpenAutoFocus,u=>{u.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:r})})});Ya.displayName=ja;var Gu="AlertDialogTitle",Ka=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(bt,{...n,...r,ref:t})});Ka.displayName=Gu;var Xu="AlertDialogDescription",Ga=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(wt,{...n,...r,ref:t})});Ga.displayName=Xu;var qu="AlertDialogAction",Xa=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,n=_e(o);return c.jsx(tt,{...n,...r,ref:t})});Xa.displayName=qu;var qa="AlertDialogCancel",Za=l.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:n}=Ku(qa,o),a=_e(o),s=K(t,n);return c.jsx(tt,{...a,...r,ref:s})});Za.displayName=qa;var Zu=Va,Qu=za,Ju=Wa,Qa=Ua,Ja=Ya,es=Xa,ts=Za,os=Ka,rs=Ga;function ns(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=ns(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function as(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=ns(e))&&(r&&(r+=" "),r+=t);return r}const cr="-",ef=e=>{const t=of(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(cr);return i[0]===""&&i.length!==1&&i.shift(),ss(i,t)||tf(s)},getConflictingClassGroupIds:(s,i)=>{const d=o[s]||[];return i&&r[s]?[...d,...r[s]]:d}}},ss=(e,t)=>{if(e.length===0)return t.classGroupId;const o=e[0],r=t.nextPart.get(o),n=r?ss(e.slice(1),r):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(cr);return t.validators.find(({validator:s})=>s(a))?.classGroupId},is=/^\[(.+)\]$/,tf=e=>{if(is.test(e)){const t=is.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},of=e=>{const{theme:t,prefix:o}=e,r={nextPart:new Map,validators:[]};return nf(Object.entries(e.classGroups),o).forEach(([a,s])=>{dr(s,r,a,t)}),r},dr=(e,t,o,r)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:ls(t,n);a.classGroupId=o;return}if(typeof n=="function"){if(rf(n)){dr(n(r),t,o,r);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([a,s])=>{dr(s,ls(t,a),o,r)})})},ls=(e,t)=>{let o=e;return t.split(cr).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},rf=e=>e.isThemeGetter,nf=(e,t)=>t?e.map(([o,r])=>{const n=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[o,n]}):e,af=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map;const n=(a,s)=>{o.set(a,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(a){let s=o.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return n(a,s),s},set(a,s){o.has(a)?o.set(a,s):n(a,s)}}},cs="!",sf=e=>{const{separator:t,experimentalParseClassName:o}=e,r=t.length===1,n=t[0],a=t.length,s=i=>{const d=[];let u=0,f=0,h;for(let v=0;v<i.length;v++){let y=i[v];if(u===0){if(y===n&&(r||i.slice(v,v+a)===t)){d.push(i.slice(f,v)),f=v+a;continue}if(y==="/"){h=v;continue}}y==="["?u++:y==="]"&&u--}const m=d.length===0?i:i.substring(f),p=m.startsWith(cs),w=p?m.substring(1):m,g=h&&h>f?h-f:void 0;return{modifiers:d,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:g}};return o?i=>o({className:i,parseClassName:s}):s},lf=e=>{if(e.length<=1)return e;const t=[];let o=[];return e.forEach(r=>{r[0]==="["?(t.push(...o.sort(),r),o=[]):o.push(r)}),t.push(...o.sort()),t},cf=e=>({cache:af(e.cacheSize),parseClassName:sf(e),...ef(e)}),df=/\s+/,uf=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n}=t,a=[],s=e.trim().split(df);let i="";for(let d=s.length-1;d>=0;d-=1){const u=s[d],{modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=o(u);let w=!!p,g=r(w?m.substring(0,p):m);if(!g){if(!w){i=u+(i.length>0?" "+i:i);continue}if(g=r(m),!g){i=u+(i.length>0?" "+i:i);continue}w=!1}const v=lf(f).join(":"),y=h?v+cs:v,b=y+g;if(a.includes(b))continue;a.push(b);const x=n(g,w);for(let S=0;S<x.length;++S){const T=x[S];a.push(y+T)}i=u+(i.length>0?" "+i:i)}return i};function ff(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=ds(t))&&(r&&(r+=" "),r+=o);return r}const ds=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=ds(e[r]))&&(o&&(o+=" "),o+=t);return o};function pf(e,...t){let o,r,n,a=s;function s(d){const u=t.reduce((f,h)=>h(f),e());return o=cf(u),r=o.cache.get,n=o.cache.set,a=i,i(d)}function i(d){const u=r(d);if(u)return u;const f=uf(d,o);return n(d,f),f}return function(){return a(ff.apply(null,arguments))}}const oe=e=>{const t=o=>o[e]||[];return t.isThemeGetter=!0,t},us=/^\[(?:([a-z-]+):)?(.+)\]$/i,hf=/^\d+\/\d+$/,gf=new Set(["px","full","screen"]),mf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vf=/\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$/,bf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ie=e=>yt(e)||gf.has(e)||hf.test(e),Ve=e=>xt(e,"length",Af),yt=e=>!!e&&!Number.isNaN(Number(e)),ur=e=>xt(e,"number",yt),Lt=e=>!!e&&Number.isInteger(Number(e)),xf=e=>e.endsWith("%")&&yt(e.slice(0,-1)),j=e=>us.test(e),ze=e=>mf.test(e),Cf=new Set(["length","size","percentage"]),Sf=e=>xt(e,Cf,fs),Ef=e=>xt(e,"position",fs),Tf=new Set(["image","url"]),Nf=e=>xt(e,Tf,Df),Pf=e=>xt(e,"",kf),$t=()=>!0,xt=(e,t,o)=>{const r=us.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):o(r[2]):!1},Af=e=>vf.test(e)&&!bf.test(e),fs=()=>!1,kf=e=>wf.test(e),Df=e=>yf.test(e),Of=pf(()=>{const e=oe("colors"),t=oe("spacing"),o=oe("blur"),r=oe("brightness"),n=oe("borderColor"),a=oe("borderRadius"),s=oe("borderSpacing"),i=oe("borderWidth"),d=oe("contrast"),u=oe("grayscale"),f=oe("hueRotate"),h=oe("invert"),m=oe("gap"),p=oe("gradientColorStops"),w=oe("gradientColorStopPositions"),g=oe("inset"),v=oe("margin"),y=oe("opacity"),b=oe("padding"),x=oe("saturate"),S=oe("scale"),T=oe("sepia"),P=oe("skew"),A=oe("space"),B=oe("translate"),k=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",j,t],O=()=>[j,t],Y=()=>["",Ie,Ve],N=()=>["auto",yt,j],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",j],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[yt,j];return{cacheSize:500,separator:":",theme:{colors:[$t],spacing:[Ie,Ve],blur:["none","",ze,j],brightness:J(),borderColor:[e],borderRadius:["none","","full",ze,j],borderSpacing:O(),borderWidth:Y(),contrast:J(),grayscale:_(),hueRotate:J(),invert:_(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[xf,Ve],inset:L(),margin:L(),opacity:J(),padding:O(),saturate:J(),scale:J(),sepia:_(),skew:J(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",j]}],container:["container"],columns:[{columns:[ze]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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"],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:[...V(),j]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lt,j]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",j]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Lt,j]}],"grid-cols":[{"grid-cols":[$t]}],"col-start-end":[{col:["auto",{span:["full",Lt,j]},j]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[$t]}],"row-start-end":[{row:["auto",{span:[Lt,j]},j]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",j]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",j]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",j,t]}],"min-w":[{"min-w":[j,t,"min","max","fit"]}],"max-w":[{"max-w":[j,t,"none","full","min","max","fit","prose",{screen:[ze]},ze]}],h:[{h:[j,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[j,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[j,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ze,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ur]}],"font-family":[{font:[$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:["tighter","tight","normal","wide","wider","widest",j]}],"line-clamp":[{"line-clamp":["none",yt,ur]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ie,j]}],"list-image":[{"list-image":["none",j]}],"list-style-type":[{list:["none","disc","decimal",j]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ie,Ve]}],"underline-offset":[{"underline-offset":["auto",Ie,j]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",j]}],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",j]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),Ef]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:H()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[Ie,j]}],"outline-w":[{outline:[Ie,Ve]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Ie,Ve]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ze,Pf]}],"shadow-color":[{shadow:[$t]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ze,j]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",j]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",j]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",j]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Lt,j]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",j]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",j]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",j]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ie,Ve,ur]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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"],"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"]}}});function D(...e){return Of(as(e))}const ps=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hs=as,Ft=(e,t)=>o=>{var r;if(t?.variants==null)return hs(e,o?.class,o?.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const f=o?.[u],h=a?.[u];if(f===null)return null;const m=ps(f)||ps(h);return n[u][m]}),i=o&&Object.entries(o).reduce((u,f)=>{let[h,m]=f;return m===void 0||(u[h]=m),u},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:h,className:m,...p}=f;return Object.entries(p).every(w=>{let[g,v]=w;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,h,m]:u},[]);return hs(e,s,d,o?.class,o?.className)},ho=Ft("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 active:scale-95",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:shadow-md",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 hover:shadow-sm",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),We=l.forwardRef(({className:e,variant:t,size:o,asChild:r=!1,...n},a)=>{const s=r?bd:"button";return c.jsx(s,{className:D(ho({variant:t,size:o,className:e})),ref:a,...n})});We.displayName="Button";const gs=Zu,_f=Qu,ms=Ju,fr=l.forwardRef(({className:e,...t},o)=>c.jsx(Qa,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));fr.displayName=Qa.displayName;const pr=l.forwardRef(({className:e,...t},o)=>c.jsxs(ms,{children:[c.jsx(fr,{}),c.jsx(Ja,{ref:o,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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),...t})]}));pr.displayName=Ja.displayName;const hr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});hr.displayName="AlertDialogHeader";const gr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gr.displayName="AlertDialogFooter";const mr=l.forwardRef(({className:e,...t},o)=>c.jsx(os,{ref:o,className:D("text-lg font-semibold",e),...t}));mr.displayName=os.displayName;const vr=l.forwardRef(({className:e,...t},o)=>c.jsx(rs,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));vr.displayName=rs.displayName;const br=l.forwardRef(({className:e,...t},o)=>c.jsx(es,{ref:o,className:D(ho(),e),...t}));br.displayName=es.displayName;const wr=l.forwardRef(({className:e,...t},o)=>c.jsx(ts,{ref:o,className:D(ho({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));wr.displayName=ts.displayName;var yr="Avatar",[If]=pe(yr),Mf=[0,()=>{}],[Lf,vs]=If(yr),xr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,...r}=e,[n,a]=l.useState("idle"),[s,i]=Ff();return c.jsx(Lf,{scope:o,imageLoadingStatus:n,setImageLoadingStatus:a,imageCount:s,setImageCount:i,children:c.jsx(R.span,{...r,ref:t})})});xr.displayName=yr;var bs="AvatarImage",Cr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,src:r,onLoadingStatusChange:n,...a}=e,s=vs(bs,o);Bf(s.setImageCount);const i=$f(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:s.imageLoadingStatus,setLoadingStatus:s.setImageLoadingStatus}),d=le(f=>{n?.(f)}),u=l.useRef(i);return se(()=>{const f=u.current;u.current=i,i!==f&&d(i)},[i,d]),i==="loaded"?c.jsx(R.img,{...a,ref:t,src:r}):null});Cr.displayName=bs;var ws="AvatarFallback",Sr=l.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:r,...n}=e,a=vs(ws,o),[s,i]=l.useState(r===void 0);return l.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(d)}},[r]),s&&a.imageLoadingStatus!=="loaded"?c.jsx(R.span,{...n,ref:t}):null});Sr.displayName=ws;function $f(e,{loadingStatus:t,setLoadingStatus:o,referrerPolicy:r,crossOrigin:n}){return se(()=>{if(!e){o("error");return}const a=new window.Image,s=d=>{const u=d.currentTarget;o(ys(u))},i=()=>o("error");return a.addEventListener("load",s),a.addEventListener("error",i),r&&(a.referrerPolicy=r),a.crossOrigin=n??null,a.src=e,o(ys(a)),()=>{a.removeEventListener("load",s),a.removeEventListener("error",i),o("idle")}},[e,n,r,o]),t}function ys(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function Ff(){let e=Mf;{e=l.useState(0);const[t]=e,o=l.useRef(!1);l.useEffect(()=>{t>1&&!o.current&&(o.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function Bf(e){l.useEffect(()=>(e(t=>t+1),()=>{e(t=>t-1)}),[e])}const xs=l.forwardRef(({className:e,...t},o)=>c.jsx(xr,{ref:o,className:D("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));xs.displayName=xr.displayName;const Cs=l.forwardRef(({className:e,...t},o)=>c.jsx(Cr,{ref:o,className:D("aspect-square h-full w-full",e),...t}));Cs.displayName=Cr.displayName;const Ss=l.forwardRef(({className:e,...t},o)=>c.jsx(Sr,{ref:o,className:D("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ss.displayName=Sr.displayName;const Es=Ft("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ts=l.forwardRef(({className:e,variant:t,...o},r)=>c.jsx("div",{ref:r,className:D(Es({variant:t}),e),...o})),Ns=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",e),...t}));Ns.displayName="Card";const Ps=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("flex flex-col space-y-1.5 p-6",e),...t}));Ps.displayName="CardHeader";const As=l.forwardRef(({className:e,...t},o)=>c.jsx("h3",{ref:o,className:D("text-2xl font-semibold leading-none tracking-tight",e),...t}));As.displayName="CardTitle";const ks=l.forwardRef(({className:e,...t},o)=>c.jsx("p",{ref:o,className:D("text-sm text-muted-foreground",e),...t}));ks.displayName="CardDescription";const Ds=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("p-6 pt-0",e),...t}));Ds.displayName="CardContent";const Os=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{ref:o,className:D("flex items-center p-6 pt-0",e),...t}));Os.displayName="CardFooter";function Er(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Tr(e){const[t,o]=l.useState(void 0);return se(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var go="Checkbox",[Hf]=pe(go),[Rf,Nr]=Hf(go);function Vf(e){const{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=He({prop:o,defaultProp:n??!1,onChange:d,caller:go}),[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,disabled:a,setChecked:p,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:Ue(n)?!1:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return c.jsx(Rf,{scope:t,...S,children:zf(h)?h(S):r})}var _s="CheckboxTrigger",Is=l.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{const{control:a,value:s,disabled:i,checked:d,required:u,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:w}=Nr(_s,e),g=K(n,f),v=l.useRef(d);return l.useEffect(()=>{const y=a?.form;if(y){const b=()=>h(v.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[a,h]),c.jsx(R.button,{type:"button",role:"checkbox","aria-checked":Ue(d)?"mixed":d,"aria-required":u,"data-state":Bs(d),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:F(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:F(o,y=>{h(b=>Ue(b)?!0:!b),w&&p&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})});Is.displayName=_s;var Pr=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return c.jsx(Vf,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(Is,{...h,ref:t,__scopeCheckbox:o}),m&&c.jsx(Fs,{__scopeCheckbox:o})]})})});Pr.displayName=go;var Ms="CheckboxIndicator",Ls=l.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=Nr(Ms,o);return c.jsx(ce,{present:r||Ue(a.checked)||a.checked===!0,children:c.jsx(R.span,{"data-state":Bs(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Ls.displayName=Ms;var $s="CheckboxBubbleInput",Fs=l.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Nr($s,e),w=K(o,p),g=Er(a),v=Tr(r);l.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,P=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:P});b.indeterminate=Ue(a),T.call(b,Ue(a)?!1:a),b.dispatchEvent(A)}},[m,g,a,n]);const y=l.useRef(Ue(a)?!1:a);return c.jsx(R.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Fs.displayName=$s;function zf(e){return typeof e=="function"}function Ue(e){return e==="indeterminate"}function Bs(e){return Ue(e)?"indeterminate":e?"checked":"unchecked"}const Wf=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hs=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim();var Uf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jf=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:s,...i},d)=>C.createElement("svg",{ref:d,...Uf,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:Hs("lucide",n),...i},[...s.map(([u,f])=>C.createElement(u,f)),...Array.isArray(a)?a:[a]]));const Me=(e,t)=>{const o=C.forwardRef(({className:r,...n},a)=>C.createElement(jf,{ref:a,iconNode:t,className:Hs(`lucide-${Wf(e)}`,r),...n}));return o.displayName=`${e}`,o};const Ar=Me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const kr=Me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Yf=Me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Kf=Me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Rs=Me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Gf=Me("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const Xf=Me("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);const qf=Me("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);const Bt=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Dr=l.forwardRef(({className:e,...t},o)=>c.jsx(Pr,{ref:o,className:D("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:c.jsx(Ls,{className:D("flex items-center justify-center text-current"),children:c.jsx(Ar,{className:"h-4 w-4"})})}));Dr.displayName=Pr.displayName;const Vs=co,Zf=uo,zs=fo,Qf=tt,Or=l.forwardRef(({className:e,...t},o)=>c.jsx(gt,{ref:o,className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Or.displayName=gt.displayName;const _r=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(zs,{children:[c.jsx(Or,{}),c.jsxs(vt,{ref:r,className:D("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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),...o,children:[t,c.jsxs(tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Bt,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_r.displayName=vt.displayName;const Ir=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ir.displayName="DialogHeader";const Mr=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Mr.displayName="DialogFooter";const Lr=l.forwardRef(({className:e,...t},o)=>c.jsx(bt,{ref:o,className:D("text-lg font-semibold leading-none tracking-tight",e),...t}));Lr.displayName=bt.displayName;const $r=l.forwardRef(({className:e,...t},o)=>c.jsx(wt,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));$r.displayName=wt.displayName;const Fr=l.forwardRef(({className:e,type:t,...o},r)=>c.jsx("input",{type:t,className:D("flex h-10 w-full rounded-md border border-input bg-white px-3 py-2 text-base ring-offset-background transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...o}));Fr.displayName="Input";var Jf="Label",Ws=l.forwardRef((e,t)=>c.jsx(R.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Ws.displayName=Jf;var Us=Ws;const ep=Ft("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),js=l.forwardRef(({className:e,...t},o)=>c.jsx(Us,{ref:o,className:D(ep(),e),...t}));js.displayName=Us.displayName;const tp=["top","right","bottom","left"],je=Math.min,he=Math.max,mo=Math.round,vo=Math.floor,Ae=e=>({x:e,y:e}),op={left:"right",right:"left",bottom:"top",top:"bottom"};function Br(e,t,o){return he(e,je(t,o))}function Le(e,t){return typeof e=="function"?e(t):e}function $e(e){return e.split("-")[0]}function Ct(e){return e.split("-")[1]}function Hr(e){return e==="x"?"y":"x"}function Rr(e){return e==="y"?"height":"width"}function ke(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Vr(e){return Hr(ke(e))}function rp(e,t,o){o===void 0&&(o=!1);const r=Ct(e),n=Vr(e),a=Rr(n);let s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=bo(s)),[s,bo(s)]}function np(e){const t=bo(e);return[zr(e),t,zr(t)]}function zr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ys=["left","right"],Ks=["right","left"],ap=["top","bottom"],sp=["bottom","top"];function ip(e,t,o){switch(e){case"top":case"bottom":return o?t?Ks:Ys:t?Ys:Ks;case"left":case"right":return t?ap:sp;default:return[]}}function lp(e,t,o,r){const n=Ct(e);let a=ip($e(e),o==="start",r);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(zr)))),a}function bo(e){const t=$e(e);return op[t]+e.slice(t.length)}function cp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gs(e){return typeof e!="number"?cp(e):{top:e,right:e,bottom:e,left:e}}function wo(e){const{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Xs(e,t,o){let{reference:r,floating:n}=e;const a=ke(t),s=Vr(t),i=Rr(s),d=$e(t),u=a==="y",f=r.x+r.width/2-n.width/2,h=r.y+r.height/2-n.height/2,m=r[i]/2-n[i]/2;let p;switch(d){case"top":p={x:f,y:r.y-n.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-n.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Ct(t)){case"start":p[s]-=m*(o&&u?-1:1);break;case"end":p[s]+=m*(o&&u?-1:1);break}return p}async function dp(e,t){var o;t===void 0&&(t={});const{x:r,y:n,platform:a,rects:s,elements:i,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:p=0}=Le(t,e),w=Gs(p),v=i[m?h==="floating"?"reference":"floating":h],y=wo(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:d})),b=h==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},T=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:x,strategy:d}):b);return{top:(y.top-T.top+w.top)/S.y,bottom:(T.bottom-y.bottom+w.bottom)/S.y,left:(y.left-T.left+w.left)/S.x,right:(T.right-y.right+w.right)/S.x}}const up=50,fp=async(e,t,o)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:dp},d=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:f,y:h}=Xs(u,r,d),m=r,p=0;const w={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:y,fn:b}=v,{x,y:S,data:T,reset:P}=await b({x:f,y:h,initialPlacement:r,placement:m,strategy:n,middlewareData:w,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,h=S??h,w[y]={...w[y],...T},P&&p<up&&(p++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):P.rects),{x:f,y:h}=Xs(u,m,d)),g=-1)}return{x:f,y:h,placement:m,strategy:n,middlewareData:w}},pp=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:n,rects:a,platform:s,elements:i,middlewareData:d}=t,{element:u,padding:f=0}=Le(e,t)||{};if(u==null)return{};const h=Gs(f),m={x:o,y:r},p=Vr(n),w=Rr(p),g=await s.getDimensions(u),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[w]+a.reference[p]-m[p]-a.floating[w],T=m[p]-a.reference[p],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=P?P[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(P)))&&(A=i.floating[x]||a.floating[w]);const B=S/2-T/2,k=A/2-g[w]/2-1,M=je(h[y],k),L=je(h[b],k),O=M,Y=A-g[w]-L,N=A/2-g[w]/2+B,V=Br(O,N,Y),H=!d.arrow&&Ct(n)!=null&&N!==V&&a.reference[w]/2-(N<O?M:L)-g[w]/2<0,z=H?N<O?N-O:N-Y:0;return{[p]:m[p]+z,data:{[p]:V,centerOffset:N-V-z,...H&&{alignmentOffset:z}},reset:H}}}),hp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:g=!0,...v}=Le(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const y=$e(n),b=ke(i),x=$e(i)===i,S=await(d.isRTL==null?void 0:d.isRTL(u.floating)),T=m||(x||!g?[bo(i)]:np(i)),P=w!=="none";!m&&P&&T.push(...lp(i,g,w,S));const A=[i,...T],B=await d.detectOverflow(t,v),k=[];let M=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&k.push(B[y]),h){const N=rp(n,s,S);k.push(B[N[0]],B[N[1]])}if(M=[...M,{placement:n,overflows:k}],!k.every(N=>N<=0)){var L,O;const N=(((L=a.flip)==null?void 0:L.index)||0)+1,V=A[N];if(V&&(!(h==="alignment"?b!==ke(V):!1)||M.every($=>ke($.placement)===b?$.overflows[0]>0:!0)))return{data:{index:N,overflows:M},reset:{placement:V}};let H=(O=M.filter(z=>z.overflows[0]<=0).sort((z,$)=>z.overflows[1]-$.overflows[1])[0])==null?void 0:O.placement;if(!H)switch(p){case"bestFit":{var Y;const z=(Y=M.filter($=>{if(P){const _=ke($.placement);return _===b||_==="y"}return!0}).map($=>[$.placement,$.overflows.filter(_=>_>0).reduce((_,X)=>_+X,0)]).sort(($,_)=>$[1]-_[1])[0])==null?void 0:Y[0];z&&(H=z);break}case"initialPlacement":H=i;break}if(n!==H)return{reset:{placement:H}}}return{}}}};function qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zs(e){return tp.some(t=>e[t]>=0)}const gp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:r}=t,{strategy:n="referenceHidden",...a}=Le(e,t);switch(n){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=qs(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Zs(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=qs(s,o.floating);return{data:{escapedOffsets:i,escaped:Zs(i)}}}default:return{}}}}},Qs=new Set(["left","top"]);async function mp(e,t){const{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=$e(o),i=Ct(o),d=ke(o)==="y",u=Qs.has(s)?-1:1,f=a&&d?-1:1,h=Le(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof w=="number"&&(p=i==="end"?w*-1:w),d?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const vp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:n,y:a,placement:s,middlewareData:i}=t,d=await mp(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},bp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:d={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=Le(e,t),f={x:o,y:r},h=await a.detectOverflow(t,u),m=ke($e(n)),p=Hr(m);let w=f[p],g=f[m];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=w+h[y],S=w-h[b];w=Br(x,w,S)}if(i){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=g+h[y],S=g-h[b];g=Br(x,g,S)}const v=d.fn({...t,[p]:w,[m]:g});return{...v,data:{x:v.x-o,y:v.y-r,enabled:{[p]:s,[m]:i}}}}}},wp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:r,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:d=!0,crossAxis:u=!0}=Le(e,t),f={x:o,y:r},h=ke(n),m=Hr(h);let p=f[m],w=f[h];const g=Le(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){const x=m==="y"?"height":"width",S=a.reference[m]-a.floating[x]+v.mainAxis,T=a.reference[m]+a.reference[x]-v.mainAxis;p<S?p=S:p>T&&(p=T)}if(u){var y,b;const x=m==="y"?"width":"height",S=Qs.has($e(n)),T=a.reference[h]-a.floating[x]+(S&&((y=s.offset)==null?void 0:y[h])||0)+(S?0:v.crossAxis),P=a.reference[h]+a.reference[x]+(S?0:((b=s.offset)==null?void 0:b[h])||0)-(S?v.crossAxis:0);w<T?w=T:w>P&&(w=P)}return{[m]:p,[h]:w}}}},yp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:d=()=>{},...u}=Le(e,t),f=await s.detectOverflow(t,u),h=$e(n),m=Ct(n),p=ke(n)==="y",{width:w,height:g}=a.floating;let v,y;h==="top"||h==="bottom"?(v=h,y=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=h,v=m==="end"?"top":"bottom");const b=g-f.top-f.bottom,x=w-f.left-f.right,S=je(g-f[v],b),T=je(w-f[y],x),P=!t.middlewareData.shift;let A=S,B=T;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(B=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),P&&!m){const M=he(f.left,0),L=he(f.right,0),O=he(f.top,0),Y=he(f.bottom,0);p?B=w-2*(M!==0||L!==0?M+L:he(f.left,f.right)):A=g-2*(O!==0||Y!==0?O+Y:he(f.top,f.bottom))}await d({...t,availableWidth:B,availableHeight:A});const k=await s.getDimensions(i.floating);return w!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function yo(){return typeof window<"u"}function St(e){return Js(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Js(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Js(e){return yo()?e instanceof Node||e instanceof ge(e).Node:!1}function ye(e){return yo()?e instanceof Element||e instanceof ge(e).Element:!1}function Fe(e){return yo()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function ei(e){return!yo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}function Ht(e){const{overflow:t,overflowX:o,overflowY:r,display:n}=xe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function xp(e){return/^(table|td|th)$/.test(St(e))}function xo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Cp=/transform|translate|scale|rotate|perspective|filter/,Sp=/paint|layout|strict|content/,ot=e=>!!e&&e!=="none";let Wr;function Ur(e){const t=ye(e)?xe(e):e;return ot(t.transform)||ot(t.translate)||ot(t.scale)||ot(t.rotate)||ot(t.perspective)||!jr()&&(ot(t.backdropFilter)||ot(t.filter))||Cp.test(t.willChange||"")||Sp.test(t.contain||"")}function Ep(e){let t=Ye(e);for(;Fe(t)&&!Et(t);){if(Ur(t))return t;if(xo(t))return null;t=Ye(t)}return null}function jr(){return Wr==null&&(Wr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wr}function Et(e){return/^(html|body|#document)$/.test(St(e))}function xe(e){return ge(e).getComputedStyle(e)}function Co(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if(St(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||De(e);return ei(t)?t.host:t}function ti(e){const t=Ye(e);return Et(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&Ht(t)?t:ti(t)}function Rt(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=ti(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),s=ge(n);if(a){const i=Yr(s);return t.concat(s,s.visualViewport||[],Ht(n)?n:[],i&&o?Rt(i):[])}else return t.concat(n,Rt(n,[],o))}function Yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oi(e){const t=xe(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=Fe(e),a=n?e.offsetWidth:o,s=n?e.offsetHeight:r,i=mo(o)!==a||mo(r)!==s;return i&&(o=a,r=s),{width:o,height:r,$:i}}function Kr(e){return ye(e)?e:e.contextElement}function Tt(e){const t=Kr(e);if(!Fe(t))return Ae(1);const o=t.getBoundingClientRect(),{width:r,height:n,$:a}=oi(t);let s=(a?mo(o.width):o.width)/r,i=(a?mo(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Tp=Ae(0);function ri(e){const t=ge(e);return!jr()||!t.visualViewport?Tp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Np(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ge(e)?!1:t}function rt(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),a=Kr(e);let s=Ae(1);t&&(r?ye(r)&&(s=Tt(r)):s=Tt(e));const i=Np(a,o,r)?ri(a):Ae(0);let d=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,f=n.width/s.x,h=n.height/s.y;if(a){const m=ge(a),p=r&&ye(r)?ge(r):r;let w=m,g=Yr(w);for(;g&&r&&p!==w;){const v=Tt(g),y=g.getBoundingClientRect(),b=xe(g),x=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;d*=v.x,u*=v.y,f*=v.x,h*=v.y,d+=x,u+=S,w=ge(g),g=Yr(w)}}return wo({width:f,height:h,x:d,y:u})}function So(e,t){const o=Co(e).scrollLeft;return t?t.left+o:rt(De(e)).left+o}function ni(e,t){const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-So(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Pp(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e;const a=n==="fixed",s=De(r),i=t?xo(t.floating):!1;if(r===s||i&&a)return o;let d={scrollLeft:0,scrollTop:0},u=Ae(1);const f=Ae(0),h=Fe(r);if((h||!h&&!a)&&((St(r)!=="body"||Ht(s))&&(d=Co(r)),h)){const p=rt(r);u=Tt(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=s&&!h&&!a?ni(s,d):Ae(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-d.scrollLeft*u.x+f.x+m.x,y:o.y*u.y-d.scrollTop*u.y+f.y+m.y}}function Ap(e){return Array.from(e.getClientRects())}function kp(e){const t=De(e),o=Co(e),r=e.ownerDocument.body,n=he(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=he(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+So(e);const i=-o.scrollTop;return xe(r).direction==="rtl"&&(s+=he(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:s,y:i}}const ai=25;function Dp(e,t){const o=ge(e),r=De(e),n=o.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,d=0;if(n){a=n.width,s=n.height;const f=jr();(!f||f&&t==="fixed")&&(i=n.offsetLeft,d=n.offsetTop)}const u=So(r);if(u<=0){const f=r.ownerDocument,h=f.body,m=getComputedStyle(h),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-p);w<=ai&&(a-=w)}else u<=ai&&(a+=u);return{width:a,height:s,x:i,y:d}}function Op(e,t){const o=rt(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=Fe(e)?Tt(e):Ae(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,d=n*a.x,u=r*a.y;return{width:s,height:i,x:d,y:u}}function si(e,t,o){let r;if(t==="viewport")r=Dp(e,o);else if(t==="document")r=kp(De(e));else if(ye(t))r=Op(t,o);else{const n=ri(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wo(r)}function ii(e,t){const o=Ye(e);return o===t||!ye(o)||Et(o)?!1:xe(o).position==="fixed"||ii(o,t)}function _p(e,t){const o=t.get(e);if(o)return o;let r=Rt(e,[],!1).filter(i=>ye(i)&&St(i)!=="body"),n=null;const a=xe(e).position==="fixed";let s=a?Ye(e):e;for(;ye(s)&&!Et(s);){const i=xe(s),d=Ur(s);!d&&i.position==="fixed"&&(n=null),(a?!d&&!n:!d&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Ht(s)&&!d&&ii(e,s))?r=r.filter(f=>f!==s):n=i,s=Ye(s)}return t.set(e,r),r}function Ip(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e;const s=[...o==="clippingAncestors"?xo(t)?[]:_p(t,this._c):[].concat(o),r],i=si(t,s[0],n);let d=i.top,u=i.right,f=i.bottom,h=i.left;for(let m=1;m<s.length;m++){const p=si(t,s[m],n);d=he(p.top,d),u=je(p.right,u),f=je(p.bottom,f),h=he(p.left,h)}return{width:u-h,height:f-d,x:h,y:d}}function Mp(e){const{width:t,height:o}=oi(e);return{width:t,height:o}}function Lp(e,t,o){const r=Fe(t),n=De(t),a=o==="fixed",s=rt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const d=Ae(0);function u(){d.x=So(n)}if(r||!r&&!a)if((St(t)!=="body"||Ht(n))&&(i=Co(t)),r){const p=rt(t,!0,a,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else n&&u();a&&!r&&n&&u();const f=n&&!r&&!a?ni(n,i):Ae(0),h=s.left+i.scrollLeft-d.x-f.x,m=s.top+i.scrollTop-d.y-f.y;return{x:h,y:m,width:s.width,height:s.height}}function Gr(e){return xe(e).position==="static"}function li(e,t){if(!Fe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return De(e)===o&&(o=o.ownerDocument.body),o}function ci(e,t){const o=ge(e);if(xo(e))return o;if(!Fe(e)){let n=Ye(e);for(;n&&!Et(n);){if(ye(n)&&!Gr(n))return n;n=Ye(n)}return o}let r=li(e,t);for(;r&&xp(r)&&Gr(r);)r=li(r,t);return r&&Et(r)&&Gr(r)&&!Ur(r)?o:r||Ep(e)||o}const $p=async function(e){const t=this.getOffsetParent||ci,o=this.getDimensions,r=await o(e.floating);return{reference:Lp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fp(e){return xe(e).direction==="rtl"}const Bp={convertOffsetParentRelativeRectToViewportRelativeRect:Pp,getDocumentElement:De,getClippingRect:Ip,getOffsetParent:ci,getElementRects:$p,getClientRects:Ap,getDimensions:Mp,getScale:Tt,isElement:ye,isRTL:Fp};function di(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hp(e,t){let o=null,r;const n=De(e);function a(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,d){i===void 0&&(i=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:h,width:m,height:p}=u;if(i||t(),!m||!p)return;const w=vo(h),g=vo(n.clientWidth-(f+m)),v=vo(n.clientHeight-(h+p)),y=vo(f),x={rootMargin:-w+"px "+-g+"px "+-v+"px "+-y+"px",threshold:he(0,je(1,d))||1};let S=!0;function T(P){const A=P[0].intersectionRatio;if(A!==d){if(!S)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!di(u,e.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(T,{...x,root:n.ownerDocument})}catch{o=new IntersectionObserver(T,x)}o.observe(e)}return s(!0),a}function Rp(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,u=Kr(e),f=n||a?[...u?Rt(u):[],...t?Rt(t):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",o,{passive:!0}),a&&y.addEventListener("resize",o)});const h=u&&i?Hp(u,o):null;let m=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),o()}),u&&!d&&p.observe(u),t&&p.observe(t));let w,g=d?rt(e):null;d&&v();function v(){const y=rt(e);g&&!di(g,y)&&o(),g=y,w=requestAnimationFrame(v)}return o(),()=>{var y;f.forEach(b=>{n&&b.removeEventListener("scroll",o),a&&b.removeEventListener("resize",o)}),h?.(),(y=p)==null||y.disconnect(),p=null,d&&cancelAnimationFrame(w)}}const Vp=vp,zp=bp,Wp=hp,Up=yp,jp=gp,ui=pp,Yp=wp,Kp=(e,t,o)=>{const r=new Map,n={platform:Bp,...o},a={...n.platform,_c:r};return fp(e,t,{...n,platform:a})};var Gp=typeof document<"u",Xp=function(){},Eo=Gp?C.useLayoutEffect:Xp;function To(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 o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!To(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){const a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!To(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function fi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pi(e,t){const o=fi(e);return Math.round(t*o)/o}function Xr(e){const t=l.useRef(e);return Eo(()=>{t.current=e}),t}function qp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:d,open:u}=e,[f,h]=l.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=l.useState(r);To(m,r)||p(r);const[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback($=>{$!==P.current&&(P.current=$,g($))},[]),x=l.useCallback($=>{$!==A.current&&(A.current=$,y($))},[]),S=a||w,T=s||v,P=l.useRef(null),A=l.useRef(null),B=l.useRef(f),k=d!=null,M=Xr(d),L=Xr(n),O=Xr(u),Y=l.useCallback(()=>{if(!P.current||!A.current)return;const $={placement:t,strategy:o,middleware:m};L.current&&($.platform=L.current),Kp(P.current,A.current,$).then(_=>{const X={..._,isPositioned:O.current!==!1};N.current&&!To(B.current,X)&&(B.current=X,lt.flushSync(()=>{h(X)}))})},[m,t,o,L,O]);Eo(()=>{u===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h($=>({...$,isPositioned:!1})))},[u]);const N=l.useRef(!1);Eo(()=>(N.current=!0,()=>{N.current=!1}),[]),Eo(()=>{if(S&&(P.current=S),T&&(A.current=T),S&&T){if(M.current)return M.current(S,T,Y);Y()}},[S,T,Y,M,k]);const V=l.useMemo(()=>({reference:P,floating:A,setReference:b,setFloating:x}),[b,x]),H=l.useMemo(()=>({reference:S,floating:T}),[S,T]),z=l.useMemo(()=>{const $={position:o,left:0,top:0};if(!H.floating)return $;const _=pi(H.floating,f.x),X=pi(H.floating,f.y);return i?{...$,transform:"translate("+_+"px, "+X+"px)",...fi(H.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:X}},[o,i,H.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:V,elements:H,floatingStyles:z}),[f,Y,V,H,z])}const Zp=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?ui({element:r.current,padding:n}).fn(o):{}:r?ui({element:r,padding:n}).fn(o):{}}}},Qp=(e,t)=>{const o=Vp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Jp=(e,t)=>{const o=zp(e);return{name:o.name,fn:o.fn,options:[e,t]}},eh=(e,t)=>({fn:Yp(e).fn,options:[e,t]}),th=(e,t)=>{const o=Wp(e);return{name:o.name,fn:o.fn,options:[e,t]}},oh=(e,t)=>{const o=Up(e);return{name:o.name,fn:o.fn,options:[e,t]}},rh=(e,t)=>{const o=jp(e);return{name:o.name,fn:o.fn,options:[e,t]}},nh=(e,t)=>{const o=Zp(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ah="Arrow",hi=l.forwardRef((e,t)=>{const{children:o,width:r=10,height:n=5,...a}=e;return c.jsx(R.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});hi.displayName=ah;var sh=hi,qr="Popper",[gi,Nt]=pe(qr),[ih,mi]=gi(qr),vi=e=>{const{__scopePopper:t,children:o}=e,[r,n]=l.useState(null),[a,s]=l.useState(void 0);return c.jsx(ih,{scope:t,anchor:r,onAnchorChange:n,placementState:a,setPlacementState:s,children:o})};vi.displayName=qr;var bi="PopperAnchor",wi=l.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:r,...n}=e,a=mi(bi,o),s=l.useRef(null),i=a.onAnchorChange,d=l.useCallback(w=>{s.current=w,w&&i(w)},[i]),u=K(t,d),f=l.useRef(null);l.useEffect(()=>{if(!r)return;const w=f.current;f.current=r.current,w!==f.current&&i(f.current)});const h=a.placementState&&Qr(a.placementState),m=h?.[0],p=h?.[1];return r?null:c.jsx(R.div,{"data-radix-popper-side":m,"data-radix-popper-align":p,...n,ref:u})});wi.displayName=bi;var Zr="PopperContent",[lh,ch]=gi(Zr),yi=l.forwardRef((e,t)=>{const{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:w,...g}=e,v=mi(Zr,o),[y,b]=l.useState(null),x=K(t,ee=>b(ee)),[S,T]=l.useState(null),P=Tr(S),A=P?.width??0,B=P?.height??0,k=r+(a!=="center"?"-"+a:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],O=L.length>0,Y={padding:M,boundary:L.filter(uh),altBoundary:O},{refs:N,floatingStyles:V,placement:H,isPositioned:z,middlewareData:$}=qp({strategy:"fixed",placement:k,whileElementsMounted:(...ee)=>Rp(...ee,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Qp({mainAxis:n+B,alignmentAxis:s}),d&&Jp({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?eh():void 0,...Y}),d&&th({...Y}),oh({...Y,apply:({elements:ee,rects:ae,availableWidth:Z,availableHeight:Q})=>{const{width:re,height:ve}=ae.reference,fe=ee.floating.style;fe.setProperty("--radix-popper-available-width",`${Z}px`),fe.setProperty("--radix-popper-available-height",`${Q}px`),fe.setProperty("--radix-popper-anchor-width",`${re}px`),fe.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),S&&nh({element:S,padding:i}),fh({arrowWidth:A,arrowHeight:B}),m&&rh({strategy:"referenceHidden",...Y,boundary:O?Y.boundary:void 0})]}),_=v.setPlacementState;se(()=>(_(H),()=>{_(void 0)}),[H,_]);const[X,J]=Qr(H),U=le(w);se(()=>{z&&U?.()},[z,U]);const G=$.arrow?.x,q=$.arrow?.y,ie=$.arrow?.centerOffset!==0,[ue,I]=l.useState();return se(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:z?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(lh,{scope:o,placedSide:X,placedAlign:J,onArrowChange:T,arrowX:G,arrowY:q,shouldHideArrow:ie,children:c.jsx(R.div,{"data-side":X,"data-align":J,...g,ref:x,style:{...g.style,animation:z?void 0:"none"}})})})});yi.displayName=Zr;var xi="PopperArrow",dh={top:"bottom",right:"left",bottom:"top",left:"right"},Ci=l.forwardRef(function(t,o){const{__scopePopper:r,...n}=t,a=ch(xi,r),s=dh[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(sh,{...n,ref:o,style:{...n.style,display:"block"}})})});Ci.displayName=xi;function uh(e){return e!==null}var fh=e=>({name:"transformOrigin",options:e,fn(t){const{placement:o,rects:r,middlewareData:n}=t,s=n.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[u,f]=Qr(o),h={start:"0%",center:"50%",end:"100%"}[f],m=(n.arrow?.x??0)+i/2,p=(n.arrow?.y??0)+d/2;let w="",g="";return u==="bottom"?(w=s?h:`${m}px`,g=`${-d}px`):u==="top"?(w=s?h:`${m}px`,g=`${r.floating.height+d}px`):u==="right"?(w=`${-d}px`,g=s?h:`${p}px`):u==="left"&&(w=`${r.floating.width+d}px`,g=s?h:`${p}px`),{data:{x:w,y:g}}}});function Qr(e){const[t,o="center"]=e.split("-");return[t,o]}var Jr=vi,No=wi,en=yi,tn=Ci,Po="Popover",[Si]=pe(Po,[Nt]),Vt=Nt(),[ph,Ke]=Si(Po),Ei=e=>{const{__scopePopover:t,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!1}=e,i=Vt(t),d=l.useRef(null),[u,f]=l.useState(!1),[h,m]=He({prop:r,defaultProp:n??!1,onChange:a,caller:Po});return c.jsx(Jr,{...i,children:c.jsx(ph,{scope:t,contentId:Be(),triggerRef:d,open:h,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:s,children:o})})};Ei.displayName=Po;var Ti="PopoverAnchor",hh=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Ti,o),a=Vt(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=n;return l.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(No,{...a,...r,ref:t})});hh.displayName=Ti;var Ni="PopoverTrigger",Pi=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Ni,o),a=Vt(o),s=K(t,n.triggerRef),i=c.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":_i(n.open),...r,ref:s,onClick:F(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?i:c.jsx(No,{asChild:!0,...a,children:i})});Pi.displayName=Ni;var on="PopoverPortal",[gh,mh]=Si(on,{forceMount:void 0}),Ai=e=>{const{__scopePopover:t,forceMount:o,children:r,container:n}=e,a=Ke(on,t);return c.jsx(gh,{scope:t,forceMount:o,children:c.jsx(ce,{present:o||a.open,children:c.jsx(Mt,{asChild:!0,container:n,children:r})})})};Ai.displayName=on;var Pt="PopoverContent",ki=l.forwardRef((e,t)=>{const o=mh(Pt,e.__scopePopover),{forceMount:r=o.forceMount,...n}=e,a=Ke(Pt,e.__scopePopover);return c.jsx(ce,{present:r||a.open,children:a.modal?c.jsx(bh,{...n,ref:t}):c.jsx(wh,{...n,ref:t})})});ki.displayName=Pt;var vh=et("PopoverContent.RemoveScroll"),bh=l.forwardRef((e,t)=>{const o=Ke(Pt,e.__scopePopover),r=l.useRef(null),n=K(t,r),a=l.useRef(!1);return l.useEffect(()=>{const s=r.current;if(s)return sr(s)},[]),c.jsx(ao,{as:vh,allowPinchZoom:!0,children:c.jsx(Di,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,d=i.button===0&&i.ctrlKey===!0,u=i.button===2||d;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),wh=l.forwardRef((e,t)=>{const o=Ke(Pt,e.__scopePopover),r=l.useRef(!1),n=l.useRef(!1);return c.jsx(Di,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),Di=l.forwardRef((e,t)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,...h}=e,m=Ke(Pt,o),p=Vt(o);return er(),c.jsx(Zt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:c.jsx(en,{"data-state":_i(m.open),role:"dialog",id:m.contentId,...p,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Oi="PopoverClose",yh=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Ke(Oi,o);return c.jsx(R.button,{type:"button",...r,ref:t,onClick:F(e.onClick,()=>n.onOpenChange(!1))})});yh.displayName=Oi;var xh="PopoverArrow",Ch=l.forwardRef((e,t)=>{const{__scopePopover:o,...r}=e,n=Vt(o);return c.jsx(tn,{...n,...r,ref:t})});Ch.displayName=xh;function _i(e){return e?"open":"closed"}var Sh=Ei,Eh=Pi,Th=Ai,Ii=ki;const Mi=Sh,Li=Eh,rn=l.forwardRef(({className:e,align:t="start",sideOffset:o=4,...r},n)=>c.jsx(Th,{children:c.jsx(Ii,{ref:n,align:t,sideOffset:o,className:D("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));rn.displayName=Ii.displayName;function Nh({options:e,value:t,onValueChange:o,placeholder:r="Select options"}){const[n,a]=C.useState(!1),s=e.filter(u=>t.includes(u.value)),i=u=>{t.includes(u)?o(t.filter(f=>f!==u)):o([...t,u])},d=(u,f)=>{f.stopPropagation(),o(t.filter(h=>h!==u))};return c.jsxs(Mi,{open:n,onOpenChange:a,children:[c.jsx(Li,{asChild:!0,children:c.jsxs("button",{type:"button",className:D("flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50",!s.length&&"text-muted-foreground"),children:[c.jsx("div",{className:"flex flex-wrap gap-1 flex-1",children:s.length>0?s.map(u=>c.jsxs(Ts,{variant:"secondary",className:"gap-1 pr-1",children:[u.label,c.jsx("span",{role:"button",tabIndex:0,className:"rounded-full hover:bg-muted-foreground/20 p-0.5",onClick:f=>d(u.value,f),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&d(u.value,f)},children:c.jsx(Bt,{className:"h-3 w-3"})})]},u.value)):c.jsx("span",{children:r})}),c.jsx(kr,{className:"h-4 w-4 shrink-0 opacity-50 ml-2"})]})}),c.jsx(rn,{className:"max-h-60 overflow-y-auto p-1",children:e.length===0?c.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:"No options available"}):e.map(u=>{const f=t.includes(u.value);return c.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-all duration-150 hover:bg-accent/50 focus:bg-accent focus:text-accent-foreground",onClick:()=>i(u.value),children:[c.jsx(Dr,{checked:f,tabIndex:-1}),u.label]},u.value)})})]})}var nn="Progress",an=100,[Ph]=pe(nn),[Ah,kh]=Ph(nn),$i=l.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:n,getValueLabel:a=Dh,...s}=e;(n||n===0)&&!Ri(n)&&console.error(Oh(`${n}`,"Progress"));const i=Ri(n)?n:an;r!==null&&!Vi(r,i)&&console.error(_h(`${r}`,"Progress"));const d=Vi(r,i)?r:null,u=Ao(d)?a(d,i):void 0;return c.jsx(Ah,{scope:o,value:d,max:i,children:c.jsx(R.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Ao(d)?d:void 0,"aria-valuetext":u,role:"progressbar","data-state":Hi(d,i),"data-value":d??void 0,"data-max":i,...s,ref:t})})});$i.displayName=nn;var Fi="ProgressIndicator",Bi=l.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,n=kh(Fi,o);return c.jsx(R.div,{"data-state":Hi(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});Bi.displayName=Fi;function Dh(e,t){return`${Math.round(e/t*100)}%`}function Hi(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ao(e){return typeof e=="number"}function Ri(e){return Ao(e)&&!isNaN(e)&&e>0}function Vi(e,t){return Ao(e)&&!isNaN(e)&&e<=t&&e>=0}function Oh(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${an}\`.`}function _h(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
42
|
+
- a positive number
|
|
43
|
+
- less than the value passed to \`max\` (or ${an} if no \`max\` prop is set)
|
|
44
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
45
|
+
|
|
46
|
+
Defaulting to \`null\`.`}var zi=$i,Ih=Bi;const Wi=l.forwardRef(({className:e,value:t,...o},r)=>c.jsx(zi,{ref:r,className:D("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o,children:c.jsx(Ih,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Wi.displayName=zi.displayName;var Mh=l.createContext(void 0);function Ui(e){const t=l.useContext(Mh);return e||t||"ltr"}function sn(e,[t,o]){return Math.min(o,Math.max(t,e))}function Lh(e,t){return l.useReducer((o,r)=>t[o][r]??o,e)}var ln="ScrollArea",[ji]=pe(ln),[$h,me]=ji(ln),Yi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,d]=l.useState(null),[u,f]=l.useState(null),[h,m]=l.useState(null),[p,w]=l.useState(null),[g,v]=l.useState(null),[y,b]=l.useState(0),[x,S]=l.useState(0),[T,P]=l.useState(!1),[A,B]=l.useState(!1),k=K(t,L=>d(L)),M=Ui(n);return c.jsx($h,{scope:o,type:r,dir:M,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:f,content:h,onContentChange:m,scrollbarX:p,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:P,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:B,onCornerWidthChange:b,onCornerHeightChange:S,children:c.jsx(R.div,{dir:M,...s,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Yi.displayName=ln;var Ki="ScrollAreaViewport",Gi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...a}=e,s=me(Ki,o),i=l.useRef(null),d=K(t,i,s.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx(Fh,{nonce:n}),c.jsx(R.div,{"data-radix-scroll-area-viewport":"",...a,ref:d,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Gi.displayName=Ki;var Fh=l.memo(({nonce:e})=>c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),Oe="ScrollAreaScrollbar",cn=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return l.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?c.jsx(Bh,{...r,ref:t,forceMount:o}):n.type==="scroll"?c.jsx(Hh,{...r,ref:t,forceMount:o}):n.type==="auto"?c.jsx(Xi,{...r,ref:t,forceMount:o}):n.type==="always"?c.jsx(dn,{...r,ref:t,"data-state":"visible"}):null});cn.displayName=Oe;var Bh=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),[a,s]=l.useState(!1);return l.useEffect(()=>{const i=n.scrollArea;let d=0;if(i){const u=()=>{window.clearTimeout(d),s(!0)},f=()=>{d=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",f)}}},[n.scrollArea,n.scrollHideDelay]),c.jsx(ce,{present:o||a,children:c.jsx(Xi,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Hh=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=me(Oe,e.__scopeScrollArea),a=e.orientation==="horizontal",s=_o(()=>d("SCROLL_END"),100),[i,d]=Lh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return l.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>d("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,d]),l.useEffect(()=>{const u=n.viewport,f=a?"scrollLeft":"scrollTop";if(u){let h=u[f];const m=()=>{const p=u[f];h!==p&&(d("SCROLL"),s()),h=p};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[n.viewport,a,d,s]),c.jsx(ce,{present:o||i!=="hidden",children:c.jsx(dn,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:F(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Xi=l.forwardRef((e,t)=>{const o=me(Oe,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,s]=l.useState(!1),i=e.orientation==="horizontal",d=_o(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,f=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:f)}},10);return At(o.viewport,d),At(o.content,d),c.jsx(ce,{present:r||a,children:c.jsx(dn,{"data-state":a?"visible":"hidden",...n,ref:t})})}),dn=l.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=me(Oe,e.__scopeScrollArea),a=l.useRef(null),s=l.useRef(0),[i,d]=l.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=el(i.viewport,i.content),f={...r,sizes:i,onSizesChange:d,hasThumb:u>0&&u<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,p){return jh(m,s.current,i,p)}return o==="horizontal"?c.jsx(Rh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollLeft,p=tl(m,i,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollLeft=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollLeft=h(m,n.dir))}}):o==="vertical"?c.jsx(Vh,{...f,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const m=n.viewport.scrollTop,p=tl(m,i);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{n.viewport&&(n.viewport.scrollTop=m)},onDragScroll:m=>{n.viewport&&(n.viewport.scrollTop=h(m))}}):null}),Rh=l.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=me(Oe,e.__scopeScrollArea),[s,i]=l.useState(),d=l.useRef(null),u=K(t,d,a.onScrollbarXChange);return l.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(Zi,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oo(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),rl(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Do(s.paddingLeft),paddingEnd:Do(s.paddingRight)}})}})}),Vh=l.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=me(Oe,e.__scopeScrollArea),[s,i]=l.useState(),d=l.useRef(null),u=K(t,d,a.onScrollbarYChange);return l.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(Zi,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oo(o)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(a.viewport){const m=a.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),rl(m,h)&&f.preventDefault()}},onResize:()=>{d.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Do(s.paddingTop),paddingEnd:Do(s.paddingBottom)}})}})}),[zh,qi]=ji(Oe),Zi=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:f,onResize:h,...m}=e,p=me(Oe,o),[w,g]=l.useState(null),v=K(t,k=>g(k)),y=l.useRef(null),b=l.useRef(""),x=p.viewport,S=r.content-r.viewport,T=le(f),P=le(d),A=_o(h,10);function B(k){if(y.current){const M=k.clientX-y.current.left,L=k.clientY-y.current.top;u({x:M,y:L})}}return l.useEffect(()=>{const k=M=>{const L=M.target;w?.contains(L)&&T(M,S)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[x,w,S,T]),l.useEffect(P,[r,P]),At(w,A),At(p.content,A),c.jsx(zh,{scope:o,scrollbar:w,hasThumb:n,onThumbChange:le(a),onThumbPointerUp:le(s),onThumbPositionChange:P,onThumbPointerDown:le(i),children:c.jsx(R.div,{...m,ref:v,style:{position:"absolute",...m.style},onPointerDown:F(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),y.current=w.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),B(k))}),onPointerMove:F(e.onPointerMove,B),onPointerUp:F(e.onPointerUp,k=>{const M=k.target;M.hasPointerCapture(k.pointerId)&&M.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),y.current=null})})})}),ko="ScrollAreaThumb",Qi=l.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=qi(ko,e.__scopeScrollArea);return c.jsx(ce,{present:o||n.hasThumb,children:c.jsx(Wh,{ref:t,...r})})}),Wh=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,a=me(ko,o),s=qi(ko,o),{onThumbPositionChange:i}=s,d=K(t,h=>s.onThumbChange(h)),u=l.useRef(void 0),f=_o(()=>{u.current&&(u.current(),u.current=void 0)},100);return l.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(f(),!u.current){const p=Yh(h,i);u.current=p,i()}};return i(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,f,i]),c.jsx(R.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:F(e.onPointerDownCapture,h=>{const p=h.target.getBoundingClientRect(),w=h.clientX-p.left,g=h.clientY-p.top;s.onThumbPointerDown({x:w,y:g})}),onPointerUp:F(e.onPointerUp,s.onThumbPointerUp)})});Qi.displayName=ko;var un="ScrollAreaCorner",Ji=l.forwardRef((e,t)=>{const o=me(un,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?c.jsx(Uh,{...e,ref:t}):null});Ji.displayName=un;var Uh=l.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=me(un,o),[a,s]=l.useState(0),[i,d]=l.useState(0),u=!!(a&&i);return At(n.scrollbarX,()=>{const f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),d(f)}),At(n.scrollbarY,()=>{const f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),s(f)}),u?c.jsx(R.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Do(e){return e?parseInt(e,10):0}function el(e,t){const o=e/t;return isNaN(o)?0:o}function Oo(e){const t=el(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function jh(e,t,o,r="ltr"){const n=Oo(o),a=n/2,s=t||a,i=n-s,d=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,f=o.content-o.viewport,h=r==="ltr"?[0,f]:[f*-1,0];return ol([d,u],h)(e)}function tl(e,t,o="ltr"){const r=Oo(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-r,d=o==="ltr"?[0,s]:[s*-1,0],u=sn(e,d);return ol([0,s],[0,i])(u)}function ol(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function rl(e,t){return e>0&&e<t}var Yh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,r=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(r)};function _o(e,t){const o=le(e),r=l.useRef(0);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),l.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function At(e,t){const o=le(t);se(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var nl=Yi,Kh=Gi,Gh=Ji;const al=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(nl,{ref:r,className:D("relative overflow-hidden",e),...o,children:[c.jsx(Kh,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(fn,{}),c.jsx(Gh,{})]}));al.displayName=nl.displayName;const fn=l.forwardRef(({className:e,orientation:t="vertical",...o},r)=>c.jsx(cn,{ref:r,orientation:t,className:D("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:c.jsx(Qi,{className:"relative flex-1 rounded-full bg-border"})}));fn.displayName=cn.displayName;function sl(e){const t=e+"CollectionProvider",[o,r]=pe(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:y}=g,b=l.useRef(null),x=l.useRef(new Map).current;return c.jsx(n,{scope:v,itemMap:x,collectionRef:b,children:y})};s.displayName=t;const i=e+"CollectionSlot",d=et(i),u=l.forwardRef((g,v)=>{const{scope:y,children:b}=g,x=a(i,y),S=K(v,x.collectionRef);return c.jsx(d,{ref:S,children:b})});u.displayName=i;const f=e+"CollectionItemSlot",h="data-radix-collection-item",m=et(f),p=l.forwardRef((g,v)=>{const{scope:y,children:b,...x}=g,S=l.useRef(null),T=K(v,S),P=a(f,y);return l.useEffect(()=>(P.itemMap.set(S,{ref:S,...x}),()=>{P.itemMap.delete(S)})),c.jsx(m,{[h]:"",ref:T,children:b})});p.displayName=f;function w(g){const v=a(e+"CollectionConsumer",g);return l.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((P,A)=>x.indexOf(P.ref.current)-x.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},w,r]}var il=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Xh="VisuallyHidden",Io=l.forwardRef((e,t)=>c.jsx(R.span,{...e,ref:t,style:{...il,...e.style}}));Io.displayName=Xh;var qh=Io,Zh=[" ","Enter","ArrowUp","ArrowDown"],Qh=[" ","Enter"],nt="Select",[Mo,Lo,Jh]=sl(nt),[at]=pe(nt,[Jh,Nt]),$o=Nt(),[eg,Ge]=at(nt),[tg,og]=at(nt),rg="SelectProvider";function ll(e){const{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:d,dir:u,name:f,autoComplete:h,disabled:m,required:p,form:w,internal_do_not_use_render:g}=e,v=$o(t),[y,b]=l.useState(null),[x,S]=l.useState(null),[T,P]=l.useState(!1),A=Ui(u),[B,k]=He({prop:r,defaultProp:n??!1,onChange:a,caller:nt}),[M,L]=He({prop:s,defaultProp:i,onChange:d,caller:nt}),O=l.useRef(null),Y=y?!!w||!!y.closest("form"):!0,[N,V]=l.useState(new Set),H=Be(),z=Array.from(N).map(J=>J.props.value).join(";"),$=l.useCallback(J=>{V(U=>new Set(U).add(J))},[]),_=l.useCallback(J=>{V(U=>{const G=new Set(U);return G.delete(J),G})},[]),X={required:p,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:T,onValueNodeHasChildrenChange:P,contentId:H,value:M,onValueChange:L,open:B,onOpenChange:k,dir:A,triggerPointerDownPosRef:O,disabled:m,name:f,autoComplete:h,form:w,nativeOptions:N,nativeSelectKey:z,isFormControl:Y};return c.jsx(Jr,{...v,children:c.jsx(eg,{scope:t,...X,children:c.jsx(Mo.Provider,{scope:t,children:c.jsx(tg,{scope:t,onNativeOptionAdd:$,onNativeOptionRemove:_,children:vg(g)?g(X):o})})})})}ll.displayName=rg;var cl=e=>{const{__scopeSelect:t,children:o,...r}=e;return c.jsx(ll,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:n})=>c.jsxs(c.Fragment,{children:[o,n?c.jsx(Ol,{__scopeSelect:t}):null]})})};cl.displayName=nt;var dl="SelectTrigger",pn=l.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...n}=e,a=$o(o),s=Ge(dl,o),i=s.disabled||r,d=K(t,s.onTriggerChange),u=Lo(o),f=l.useRef("touch"),[h,m,p]=_l(g=>{const v=u().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),b=Il(v,g,y);b!==void 0&&s.onValueChange(b.value)}),w=g=>{i||(s.onOpenChange(!0),p()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(No,{asChild:!0,...a,children:c.jsx(R.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Bo(s.value)?"":void 0,...n,ref:d,onClick:F(n.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&w(g)}),onPointerDown:F(n.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(w(g),g.preventDefault())}),onKeyDown:F(n.onKeyDown,g=>{const v=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&m(g.key),!(v&&g.key===" ")&&Zh.includes(g.key)&&(w(),g.preventDefault())})})})});pn.displayName=dl;var ul="SelectValue",fl=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,children:a,placeholder:s="",...i}=e,d=Ge(ul,o),{onValueNodeHasChildrenChange:u}=d,f=a!==void 0,h=K(t,d.onValueNodeChange);se(()=>{u(f)},[u,f]);const m=Bo(d.value);return c.jsx(R.span,{...i,asChild:m?!1:i.asChild,ref:h,style:{pointerEvents:"none"},children:c.jsx(l.Fragment,{children:m?s:a},m?"placeholder":"value")})});fl.displayName=ul;var ng="SelectIcon",pl=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,...n}=e;return c.jsx(R.span,{"aria-hidden":!0,...n,ref:t,children:r||"▼"})});pl.displayName=ng;var hl="SelectPortal",[ag,sg]=at(hl,{forceMount:void 0}),gl=e=>{const{__scopeSelect:t,forceMount:o,...r}=e;return c.jsx(ag,{scope:e.__scopeSelect,forceMount:o,children:c.jsx(Mt,{asChild:!0,...r})})};gl.displayName=hl;var Xe="SelectContent",hn=l.forwardRef((e,t)=>{const o=sg(Xe,e.__scopeSelect),{forceMount:r=o.forceMount,...n}=e,a=Ge(Xe,e.__scopeSelect),[s,i]=l.useState();return se(()=>{i(new DocumentFragment)},[]),c.jsx(ce,{present:r||a.open,children:({present:d})=>d?c.jsx(bl,{...n,ref:t}):c.jsx(ml,{...n,fragment:s})})});hn.displayName=Xe;var ml=l.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,fragment:n}=e;return n?lt.createPortal(c.jsx(vl,{scope:o,children:c.jsx(Mo.Slot,{scope:o,children:c.jsx("div",{ref:t,children:r})})}),n):null});ml.displayName="SelectContentFragment";var Ce=10,[vl,qe]=at(Xe),ig="SelectContentImpl",lg=et("SelectContent.RemoveScroll"),bl=l.forwardRef((e,t)=>{const{__scopeSelect:o}=e,{position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v,...y}=e,b=Ge(Xe,o),[x,S]=l.useState(null),[T,P]=l.useState(null),A=K(t,I=>S(I)),[B,k]=l.useState(null),[M,L]=l.useState(null),O=Lo(o),[Y,N]=l.useState(!1),V=l.useRef(!1);l.useEffect(()=>{if(x)return sr(x)},[x]),er();const H=l.useCallback(I=>{const[ee,...ae]=O().map(re=>re.ref.current),[Z]=ae.slice(-1),Q=document.activeElement;for(const re of I)if(re===Q||(re?.scrollIntoView({block:"nearest"}),re===ee&&T&&(T.scrollTop=0),re===Z&&T&&(T.scrollTop=T.scrollHeight),re?.focus(),document.activeElement!==Q))return},[O,T]),z=l.useCallback(()=>H([B,x]),[H,B,x]);l.useEffect(()=>{Y&&z()},[Y,z]);const{onOpenChange:$,triggerPointerDownPosRef:_}=b;l.useEffect(()=>{if(x){let I={x:0,y:0};const ee=Z=>{I={x:Math.abs(Math.round(Z.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(Z.pageY)-(_.current?.y??0))}},ae=Z=>{I.x<=10&&I.y<=10?Z.preventDefault():Z.composedPath().includes(x)||$(!1),document.removeEventListener("pointermove",ee),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ae,{capture:!0})}}},[x,$,_]),l.useEffect(()=>{const I=()=>$(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[$]);const[X,J]=_l(I=>{const ee=O().filter(Q=>!Q.disabled),ae=ee.find(Q=>Q.ref.current===document.activeElement),Z=Il(ee,I,ae);Z&&setTimeout(()=>Z.ref.current?.focus())}),U=l.useCallback((I,ee,ae)=>{const Z=!V.current&&!ae;(b.value!==void 0&&b.value===ee||Z)&&(k(I),Z&&(V.current=!0))},[b.value]),G=l.useCallback(()=>x?.focus(),[x]),q=l.useCallback((I,ee,ae)=>{const Z=!V.current&&!ae;(b.value!==void 0&&b.value===ee||Z)&&L(I)},[b.value]),ie=r==="popper"?gn:wl,ue=ie===gn?{side:i,sideOffset:d,align:u,alignOffset:f,arrowPadding:h,collisionBoundary:m,collisionPadding:p,sticky:w,hideWhenDetached:g,avoidCollisions:v}:{};return c.jsx(vl,{scope:o,content:x,viewport:T,onViewportChange:P,itemRefCallback:U,selectedItem:B,onItemLeave:G,itemTextRefCallback:q,focusSelectedItem:z,selectedItemText:M,position:r,isPositioned:Y,searchRef:X,children:c.jsx(ao,{as:lg,allowPinchZoom:!0,children:c.jsx(Zt,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:F(n,I=>{b.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...y,...ue,onPlaced:()=>N(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:F(y.onKeyDown,I=>{const ee=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!ee&&I.key.length===1&&J(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let Z=O().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(I.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const Q=I.target,re=Z.indexOf(Q);Z=Z.slice(re+1)}setTimeout(()=>H(Z)),I.preventDefault()}})})})})})})});bl.displayName=ig;var cg="SelectItemAlignedPosition",wl=l.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:r,...n}=e,a=Ge(Xe,o),s=qe(Xe,o),[i,d]=l.useState(null),[u,f]=l.useState(null),h=K(t,A=>f(A)),m=Lo(o),p=l.useRef(!1),w=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=s,x=l.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&y){const A=a.trigger.getBoundingClientRect(),B=u.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(a.dir!=="rtl"){const Q=M.left-B.left,re=k.left-Q,ve=A.left-re,fe=A.width+ve,Yt=Math.max(fe,B.width),Dt=window.innerWidth-Ce,Kt=sn(re,[Ce,Math.max(Ce,Dt-Yt)]);i.style.minWidth=fe+"px",i.style.left=Kt+"px"}else{const Q=B.right-M.right,re=window.innerWidth-k.right-Q,ve=window.innerWidth-A.right-re,fe=A.width+ve,Yt=Math.max(fe,B.width),Dt=window.innerWidth-Ce,Kt=sn(re,[Ce,Math.max(Ce,Dt-Yt)]);i.style.minWidth=fe+"px",i.style.right=Kt+"px"}const L=m(),O=window.innerHeight-Ce*2,Y=g.scrollHeight,N=window.getComputedStyle(u),V=parseInt(N.borderTopWidth,10),H=parseInt(N.paddingTop,10),z=parseInt(N.borderBottomWidth,10),$=parseInt(N.paddingBottom,10),_=V+H+Y+$+z,X=Math.min(v.offsetHeight*5,_),J=window.getComputedStyle(g),U=parseInt(J.paddingTop,10),G=parseInt(J.paddingBottom,10),q=A.top+A.height/2-Ce,ie=O-q,ue=v.offsetHeight/2,I=v.offsetTop+ue,ee=V+H+I,ae=_-ee;if(ee<=q){const Q=L.length>0&&v===L[L.length-1].ref.current;i.style.bottom="0px";const re=u.clientHeight-g.offsetTop-g.offsetHeight,ve=Math.max(ie,ue+(Q?G:0)+re+z),fe=ee+ve;i.style.height=fe+"px"}else{const Q=L.length>0&&v===L[0].ref.current;i.style.top="0px";const ve=Math.max(q,V+g.offsetTop+(Q?U:0)+ue)+ae;i.style.height=ve+"px",g.scrollTop=ee-q+g.offsetTop}i.style.margin=`${Ce}px 0`,i.style.minHeight=X+"px",i.style.maxHeight=O+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[m,a.trigger,a.valueNode,i,u,g,v,y,a.dir,r]);se(()=>x(),[x]);const[S,T]=l.useState();se(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const P=l.useCallback(A=>{A&&w.current===!0&&(x(),b?.(),w.current=!1)},[x,b]);return c.jsx(ug,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:P,children:c.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(R.div,{...n,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});wl.displayName=cg;var dg="SelectPopperPosition",gn=l.forwardRef((e,t)=>{const{__scopeSelect:o,align:r="start",collisionPadding:n=Ce,...a}=e,s=$o(o);return c.jsx(en,{...s,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gn.displayName=dg;var[ug,mn]=at(Xe,{}),vn="SelectViewport",yl=l.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:r,...n}=e,a=qe(vn,o),s=mn(vn,o),i=K(t,a.onViewportChange),d=l.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(Mo.Slot,{scope:o,children:c.jsx(R.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:F(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const p=Math.abs(d.current-f.scrollTop);if(p>0){const w=window.innerHeight-Ce*2,g=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),y=Math.max(g,v);if(y<w){const b=y+p,x=Math.min(w,b),S=b-x;h.style.height=x+"px",h.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}d.current=f.scrollTop})})})]})});yl.displayName=vn;var xl="SelectGroup",[fg,pg]=at(xl),Cl=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Be();return c.jsx(fg,{scope:o,id:n,children:c.jsx(R.div,{role:"group","aria-labelledby":n,...r,ref:t})})});Cl.displayName=xl;var Sl="SelectLabel",bn=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=pg(Sl,o);return c.jsx(R.div,{id:n.id,...r,ref:t})});bn.displayName=Sl;var Fo="SelectItem",[hg,El]=at(Fo),wn=l.forwardRef((e,t)=>{const{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...s}=e,i=Ge(Fo,o),d=qe(Fo,o),u=i.value===r,[f,h]=l.useState(a??""),[m,p]=l.useState(!1),w=K(t,b=>d.itemRefCallback?.(b,r,n)),g=Be(),v=l.useRef("touch"),y=()=>{n||(i.onValueChange(r),i.onOpenChange(!1))};return c.jsx(hg,{scope:o,value:r,disabled:n,textId:g,isSelected:u,onItemTextChange:l.useCallback(b=>{h(x=>x||(b?.textContent??"").trim())},[]),children:c.jsx(Mo.ItemSlot,{scope:o,value:r,disabled:n,textValue:f,children:c.jsx(R.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:w,onFocus:F(s.onFocus,()=>p(!0)),onBlur:F(s.onBlur,()=>p(!1)),onClick:F(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:F(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:F(s.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:F(s.onPointerMove,b=>{v.current=b.pointerType,n?d.onItemLeave?.():v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(s.onPointerLeave,b=>{b.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:F(s.onKeyDown,b=>{d.searchRef?.current!==""&&b.key===" "||(Qh.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});wn.displayName=Fo;var zt="SelectItemText",Tl=l.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,...a}=e,s=Ge(zt,o),i=qe(zt,o),d=El(zt,o),u=og(zt,o),[f,h]=l.useState(null),m=K(t,y=>h(y),d.onItemTextChange,y=>i.itemTextRefCallback?.(y,d.value,d.disabled)),p=f?.textContent,w=l.useMemo(()=>c.jsx("option",{value:d.value,disabled:d.disabled,children:p},d.value),[d.disabled,d.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return se(()=>(g(w),()=>v(w)),[g,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(R.span,{id:d.textId,...a,ref:m}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!Bo(s.value)?lt.createPortal(a.children,s.valueNode):null]})});Tl.displayName=zt;var Nl="SelectItemIndicator",Pl=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return El(Nl,o).isSelected?c.jsx(R.span,{"aria-hidden":!0,...r,ref:t}):null});Pl.displayName=Nl;var yn="SelectScrollUpButton",xn=l.forwardRef((e,t)=>{const o=qe(yn,e.__scopeSelect),r=mn(yn,e.__scopeSelect),[n,a]=l.useState(!1),s=K(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=d.scrollTop>0;a(u)};const d=o.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?c.jsx(Al,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=o;i&&d&&(i.scrollTop=i.scrollTop-d.offsetHeight)}}):null});xn.displayName=yn;var Cn="SelectScrollDownButton",Sn=l.forwardRef((e,t)=>{const o=qe(Cn,e.__scopeSelect),r=mn(Cn,e.__scopeSelect),[n,a]=l.useState(!1),s=K(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=d.scrollHeight-d.clientHeight,f=Math.ceil(d.scrollTop)<u;a(f)};const d=o.viewport;return i(),d.addEventListener("scroll",i),()=>d.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?c.jsx(Al,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:d}=o;i&&d&&(i.scrollTop=i.scrollTop+d.offsetHeight)}}):null});Sn.displayName=Cn;var Al=l.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:r,...n}=e,a=qe("SelectScrollButton",o),s=l.useRef(null),i=Lo(o),d=l.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return l.useEffect(()=>()=>d(),[d]),se(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),c.jsx(R.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:F(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:F(n.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:F(n.onPointerLeave,()=>{d()})})}),gg="SelectSeparator",En=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return c.jsx(R.div,{"aria-hidden":!0,...r,ref:t})});En.displayName=gg;var kl="SelectArrow",mg=l.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=$o(o);return qe(kl,o).position==="popper"?c.jsx(tn,{...n,...r,ref:t}):null});mg.displayName=kl;var Dl="SelectBubbleInput",Ol=l.forwardRef(({__scopeSelect:e,...t},o)=>{const r=Ge(Dl,e),{value:n,onValueChange:a,required:s,disabled:i,name:d,autoComplete:u,form:f}=r,{nativeOptions:h,nativeSelectKey:m}=r,p=l.useRef(null),w=K(o,p),g=n??"",v=Er(g),y=Array.from(h).some(b=>(b.props.value??"")==="");return l.useEffect(()=>{const b=p.current;if(!b)return;const x=window.HTMLSelectElement.prototype,T=Object.getOwnPropertyDescriptor(x,"value").set;if(v!==g&&T){const P=new Event("change",{bubbles:!0});T.call(b,g),b.dispatchEvent(P)}},[v,g]),c.jsxs(R.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:d,autoComplete:u,disabled:i,form:f,onChange:b=>a(b.target.value),...t,style:{...il,...t.style},ref:w,defaultValue:g,children:[Bo(n)&&!y?c.jsx("option",{value:""}):null,Array.from(h)]},m)});Ol.displayName=Dl;function vg(e){return typeof e=="function"}function Bo(e){return e===""||e===void 0}function _l(e){const t=le(e),o=l.useRef(""),r=l.useRef(0),n=l.useCallback(s=>{const i=o.current+s;t(i),(function d(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(i)},[t]),a=l.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function Il(e,t,o){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=bg(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==o));const d=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return d!==o?d:void 0}function bg(e,t){return e.map((o,r)=>e[(t+r)%e.length])}const wg=cl,yg=Cl,xg=fl,Ml=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(pn,{ref:r,className:D("flex h-10 w-full items-center justify-between rounded-md border border-input bg-white px-3 py-2 text-sm ring-offset-background transition-all duration-200 placeholder:text-muted-foreground hover:border-primary/50 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...o,children:[t,c.jsx(pl,{asChild:!0,children:c.jsx(kr,{className:"h-4 w-4 opacity-50"})})]}));Ml.displayName=pn.displayName;const Tn=l.forwardRef(({className:e,...t},o)=>c.jsx(xn,{ref:o,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Kf,{className:"h-4 w-4"})}));Tn.displayName=xn.displayName;const Nn=l.forwardRef(({className:e,...t},o)=>c.jsx(Sn,{ref:o,className:D("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(kr,{className:"h-4 w-4"})}));Nn.displayName=Sn.displayName;const Ll=l.forwardRef(({className:e,children:t,position:o="popper",...r},n)=>c.jsx(gl,{children:c.jsxs(hn,{ref:n,className:D("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r,children:[c.jsx(Tn,{}),c.jsx(yl,{className:D("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(Nn,{})]})}));Ll.displayName=hn.displayName;const $l=l.forwardRef(({className:e,...t},o)=>c.jsx(bn,{ref:o,className:D("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$l.displayName=bn.displayName;const Fl=l.forwardRef(({className:e,children:t,...o},r)=>c.jsxs(wn,{ref:r,className:D("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-all duration-150 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent/50",e),...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Pl,{children:c.jsx(Ar,{className:"h-4 w-4"})})}),c.jsx(Tl,{children:t})]}));Fl.displayName=wn.displayName;const Bl=l.forwardRef(({className:e,...t},o)=>c.jsx(En,{ref:o,className:D("-mx-1 my-1 h-px bg-muted",e),...t}));Bl.displayName=En.displayName;var Cg="Separator",Hl="horizontal",Sg=["horizontal","vertical"],Rl=l.forwardRef((e,t)=>{const{decorative:o,orientation:r=Hl,...n}=e,a=Eg(r)?r:Hl,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return c.jsx(R.div,{"data-orientation":a,...i,...n,ref:t})});Rl.displayName=Cg;function Eg(e){return Sg.includes(e)}var Vl=Rl;const zl=l.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...r},n)=>c.jsx(Vl,{ref:n,decorative:o,orientation:t,className:D("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));zl.displayName=Vl.displayName;const Wl=co,Tg=uo,Ng=tt,Ul=fo,Pn=l.forwardRef(({className:e,...t},o)=>c.jsx(gt,{className:D("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Pn.displayName=gt.displayName;const Pg=Ft("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{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"}}),An=l.forwardRef(({side:e="right",className:t,children:o,...r},n)=>c.jsxs(Ul,{children:[c.jsx(Pn,{}),c.jsxs(vt,{ref:n,className:D(Pg({side:e}),t),...r,children:[o,c.jsxs(tt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Bt,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));An.displayName=vt.displayName;const jl=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col space-y-2 text-center sm:text-left",e),...t});jl.displayName="SheetHeader";const Yl=({className:e,...t})=>c.jsx("div",{className:D("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yl.displayName="SheetFooter";const Kl=l.forwardRef(({className:e,...t},o)=>c.jsx(bt,{ref:o,className:D("text-lg font-semibold text-foreground",e),...t}));Kl.displayName=bt.displayName;const Gl=l.forwardRef(({className:e,...t},o)=>c.jsx(wt,{ref:o,className:D("text-sm text-muted-foreground",e),...t}));Gl.displayName=wt.displayName;function Ag({className:e,...t}){return c.jsx("div",{className:D("animate-pulse rounded-md bg-muted",e),...t})}var kg=e=>{switch(e){case"success":return _g;case"info":return Mg;case"warning":return Ig;case"error":return Lg;default:return null}},Dg=Array(12).fill(0),Og=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},Dg.map((o,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_g=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Ig=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Mg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Lg=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$g=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Fg=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e},kn=1,Bg=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:o,...r}=e,n=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:kn++,a=this.toasts.find(i=>i.id===n),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),a?this.toasts=this.toasts.map(i=>i.id===n?(this.publish({...i,...e,id:n,title:o}),{...i,...e,id:n,dismissible:s,title:o}):i):this.addToast({title:o,...r,dismissible:s,id:n}),n},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),n=o!==void 0,a,s=r.then(async d=>{if(a=["resolve",d],C.isValidElement(d))n=!1,this.create({id:o,type:"default",message:d});else if(Rg(d)&&!d.ok){n=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:o,type:"error",message:u,description:f})}else if(t.success!==void 0){n=!1;let u=typeof t.success=="function"?await t.success(d):t.success,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"success",message:u,description:f})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){n=!1;let u=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description;this.create({id:o,type:"error",message:u,description:f})}}).finally(()=>{var d;n&&(this.dismiss(o),o=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof o!="string"&&typeof o!="number"?{unwrap:i}:Object.assign(o,{unwrap:i})},this.custom=(e,t)=>{let o=t?.id||kn++;return this.create({jsx:e(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},de=new Bg,Hg=(e,t)=>{let o=t?.id||kn++;return de.addToast({title:e,...t,id:o}),o},Rg=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Vg=Hg,zg=()=>de.toasts,Wg=()=>de.getActiveToasts(),Ug=Object.assign(Vg,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:zg,getToasts:Wg});function jg(e,{insertAt:t}={}){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}jg(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
47
|
+
`);function Ho(e){return e.label!==void 0}var Yg=3,Kg="32px",Gg="16px",Xl=4e3,Xg=356,qg=14,Zg=20,Qg=200;function Se(...e){return e.filter(Boolean).join(" ")}function Jg(e){let[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}var em=e=>{var t,o,r,n,a,s,i,d,u,f,h;let{invert:m,toast:p,unstyled:w,interacting:g,setHeights:v,visibleToasts:y,heights:b,index:x,toasts:S,expanded:T,removeToast:P,defaultRichColors:A,closeButton:B,style:k,cancelButtonStyle:M,actionButtonStyle:L,className:O="",descriptionClassName:Y="",duration:N,position:V,gap:H,loadingIcon:z,expandByDefault:$,classNames:_,icons:X,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:U}=e,[G,q]=C.useState(null),[ie,ue]=C.useState(null),[I,ee]=C.useState(!1),[ae,Z]=C.useState(!1),[Q,re]=C.useState(!1),[ve,fe]=C.useState(!1),[Yt,Dt]=C.useState(!1),[Kt,qn]=C.useState(0),[dv,Zc]=C.useState(0),Gt=C.useRef(p.duration||N||Xl),Qc=C.useRef(null),st=C.useRef(null),uv=x===0,fv=x+1<=y,be=p.type,Ot=p.dismissible!==!1,pv=p.className||"",hv=p.descriptionClassName||"",Go=C.useMemo(()=>b.findIndex(W=>W.toastId===p.id)||0,[b,p.id]),gv=C.useMemo(()=>{var W;return(W=p.closeButton)!=null?W:B},[p.closeButton,B]),Jc=C.useMemo(()=>p.duration||N||Xl,[p.duration,N]),Zn=C.useRef(0),_t=C.useRef(0),ed=C.useRef(0),It=C.useRef(null),[mv,vv]=V.split("-"),td=C.useMemo(()=>b.reduce((W,te,ne)=>ne>=Go?W:W+te.height,0),[b,Go]),od=Fg(),bv=p.invert||m,Qn=be==="loading";_t.current=C.useMemo(()=>Go*H+td,[Go,td]),C.useEffect(()=>{Gt.current=Jc},[Jc]),C.useEffect(()=>{ee(!0)},[]),C.useEffect(()=>{let W=st.current;if(W){let te=W.getBoundingClientRect().height;return Zc(te),v(ne=>[{toastId:p.id,height:te,position:p.position},...ne]),()=>v(ne=>ne.filter(Ee=>Ee.toastId!==p.id))}},[v,p.id]),C.useLayoutEffect(()=>{if(!I)return;let W=st.current,te=W.style.height;W.style.height="auto";let ne=W.getBoundingClientRect().height;W.style.height=te,Zc(ne),v(Ee=>Ee.find(Te=>Te.toastId===p.id)?Ee.map(Te=>Te.toastId===p.id?{...Te,height:ne}:Te):[{toastId:p.id,height:ne,position:p.position},...Ee])},[I,p.title,p.description,v,p.id]);let Ze=C.useCallback(()=>{Z(!0),qn(_t.current),v(W=>W.filter(te=>te.toastId!==p.id)),setTimeout(()=>{P(p)},Qg)},[p,P,v,_t]);C.useEffect(()=>{if(p.promise&&be==="loading"||p.duration===1/0||p.type==="loading")return;let W;return T||g||U&&od?(()=>{if(ed.current<Zn.current){let te=new Date().getTime()-Zn.current;Gt.current=Gt.current-te}ed.current=new Date().getTime()})():Gt.current!==1/0&&(Zn.current=new Date().getTime(),W=setTimeout(()=>{var te;(te=p.onAutoClose)==null||te.call(p,p),Ze()},Gt.current)),()=>clearTimeout(W)},[T,g,p,be,U,od,Ze]),C.useEffect(()=>{p.delete&&Ze()},[Ze,p.delete]);function wv(){var W,te,ne;return X!=null&&X.loading?C.createElement("div",{className:Se(_?.loader,(W=p?.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":be==="loading"},X.loading):z?C.createElement("div",{className:Se(_?.loader,(te=p?.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":be==="loading"},z):C.createElement(Og,{className:Se(_?.loader,(ne=p?.classNames)==null?void 0:ne.loader),visible:be==="loading"})}return C.createElement("li",{tabIndex:0,ref:st,className:Se(O,pv,_?.toast,(t=p?.classNames)==null?void 0:t.toast,_?.default,_?.[be],(o=p?.classNames)==null?void 0:o[be]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:A,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":I,"data-promise":!!p.promise,"data-swiped":Yt,"data-removed":ae,"data-visible":fv,"data-y-position":mv,"data-x-position":vv,"data-index":x,"data-front":uv,"data-swiping":Q,"data-dismissible":Ot,"data-type":be,"data-invert":bv,"data-swipe-out":ve,"data-swipe-direction":ie,"data-expanded":!!(T||$&&I),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${ae?Kt:_t.current}px`,"--initial-height":$?"auto":`${dv}px`,...k,...p.style},onDragEnd:()=>{re(!1),q(null),It.current=null},onPointerDown:W=>{Qn||!Ot||(Qc.current=new Date,qn(_t.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(re(!0),It.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,te,ne,Ee;if(ve||!Ot)return;It.current=null;let Te=Number(((W=st.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((te=st.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),it=new Date().getTime()-((ne=Qc.current)==null?void 0:ne.getTime()),Ne=G==="x"?Te:Qe,Je=Math.abs(Ne)/it;if(Math.abs(Ne)>=Zg||Je>.11){qn(_t.current),(Ee=p.onDismiss)==null||Ee.call(p,p),ue(G==="x"?Te>0?"right":"left":Qe>0?"down":"up"),Ze(),fe(!0),Dt(!1);return}re(!1),q(null)},onPointerMove:W=>{var te,ne,Ee,Te;if(!It.current||!Ot||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;let Qe=W.clientY-It.current.y,it=W.clientX-It.current.x,Ne=(ne=e.swipeDirections)!=null?ne:Jg(V);!G&&(Math.abs(it)>1||Math.abs(Qe)>1)&&q(Math.abs(it)>Math.abs(Qe)?"x":"y");let Je={x:0,y:0};G==="y"?(Ne.includes("top")||Ne.includes("bottom"))&&(Ne.includes("top")&&Qe<0||Ne.includes("bottom")&&Qe>0)&&(Je.y=Qe):G==="x"&&(Ne.includes("left")||Ne.includes("right"))&&(Ne.includes("left")&&it<0||Ne.includes("right")&&it>0)&&(Je.x=it),(Math.abs(Je.x)>0||Math.abs(Je.y)>0)&&Dt(!0),(Ee=st.current)==null||Ee.style.setProperty("--swipe-amount-x",`${Je.x}px`),(Te=st.current)==null||Te.style.setProperty("--swipe-amount-y",`${Je.y}px`)}},gv&&!p.jsx?C.createElement("button",{"aria-label":J,"data-disabled":Qn,"data-close-button":!0,onClick:Qn||!Ot?()=>{}:()=>{var W;Ze(),(W=p.onDismiss)==null||W.call(p,p)},className:Se(_?.closeButton,(n=p?.classNames)==null?void 0:n.closeButton)},(a=X?.close)!=null?a:$g):null,p.jsx||C.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,be||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:Se(_?.icon,(s=p?.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||wv():null,p.type!=="loading"?p.icon||X?.[be]||kg(be):null):null,C.createElement("div",{"data-content":"",className:Se(_?.content,(i=p?.classNames)==null?void 0:i.content)},C.createElement("div",{"data-title":"",className:Se(_?.title,(d=p?.classNames)==null?void 0:d.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:Se(Y,hv,_?.description,(u=p?.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),C.isValidElement(p.cancel)?p.cancel:p.cancel&&Ho(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||M,onClick:W=>{var te,ne;Ho(p.cancel)&&Ot&&((ne=(te=p.cancel).onClick)==null||ne.call(te,W),Ze())},className:Se(_?.cancelButton,(f=p?.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,C.isValidElement(p.action)?p.action:p.action&&Ho(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||L,onClick:W=>{var te,ne;Ho(p.action)&&((ne=(te=p.action).onClick)==null||ne.call(te,W),!W.defaultPrevented&&Ze())},className:Se(_?.actionButton,(h=p?.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function ql(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tm(e,t){let o={};return[e,t].forEach((r,n)=>{let a=n===1,s=a?"--mobile-offset":"--offset",i=a?Gg:Kg;function d(u){["top","right","bottom","left"].forEach(f=>{o[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):d(i)}),o}var om=C.forwardRef(function(e,t){let{invert:o,position:r="bottom-right",hotkey:n=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:f="light",richColors:h,duration:m,style:p,visibleToasts:w=Yg,toastOptions:g,dir:v=ql(),gap:y=qg,loadingIcon:b,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:T}=e,[P,A]=C.useState([]),B=C.useMemo(()=>Array.from(new Set([r].concat(P.filter(U=>U.position).map(U=>U.position)))),[P,r]),[k,M]=C.useState([]),[L,O]=C.useState(!1),[Y,N]=C.useState(!1),[V,H]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=C.useRef(null),$=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=C.useRef(null),X=C.useRef(!1),J=C.useCallback(U=>{A(G=>{var q;return(q=G.find(ie=>ie.id===U.id))!=null&&q.delete||de.dismiss(U.id),G.filter(({id:ie})=>ie!==U.id)})},[]);return C.useEffect(()=>de.subscribe(U=>{if(U.dismiss){A(G=>G.map(q=>q.id===U.id?{...q,delete:!0}:q));return}setTimeout(()=>{Xt.flushSync(()=>{A(G=>{let q=G.findIndex(ie=>ie.id===U.id);return q!==-1?[...G.slice(0,q),{...G[q],...U},...G.slice(q+1)]:[U,...G]})})})}),[]),C.useEffect(()=>{if(f!=="system"){H(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:G})=>{H(G?"dark":"light")})}catch{U.addListener(({matches:q})=>{try{H(q?"dark":"light")}catch(ie){console.error(ie)}})}},[f]),C.useEffect(()=>{P.length<=1&&O(!1)},[P]),C.useEffect(()=>{let U=G=>{var q,ie;n.every(ue=>G[ue]||G.code===ue)&&(O(!0),(q=z.current)==null||q.focus()),G.code==="Escape"&&(document.activeElement===z.current||(ie=z.current)!=null&&ie.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[n]),C.useEffect(()=>{if(z.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,X.current=!1)}},[z.current]),C.createElement("section",{ref:t,"aria-label":`${S} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((U,G)=>{var q;let[ie,ue]=U.split("-");return P.length?C.createElement("ol",{key:U,dir:v==="auto"?ql():v,tabIndex:-1,ref:z,className:i,"data-sonner-toaster":!0,"data-theme":V,"data-y-position":ie,"data-lifted":L&&P.length>1&&!a,"data-x-position":ue,style:{"--front-toast-height":`${((q=k[0])==null?void 0:q.height)||0}px`,"--width":`${Xg}px`,"--gap":`${y}px`,...p,...tm(d,u)},onBlur:I=>{X.current&&!I.currentTarget.contains(I.relatedTarget)&&(X.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||X.current||(X.current=!0,_.current=I.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{Y||O(!1)},onDragEnd:()=>O(!1),onPointerDown:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},P.filter(I=>!I.position&&G===0||I.position===U).map((I,ee)=>{var ae,Z;return C.createElement(em,{key:I.id,icons:x,index:ee,toast:I,defaultRichColors:h,duration:(ae=g?.duration)!=null?ae:m,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:o,visibleToasts:w,closeButton:(Z=g?.closeButton)!=null?Z:s,interacting:Y,position:U,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,removeToast:J,toasts:P.filter(Q=>Q.position==I.position),heights:k.filter(Q=>Q.position==I.position),setHeights:M,expandByDefault:a,gap:y,loadingIcon:b,expanded:L,pauseWhenPageIsHidden:T,swipeDirections:e.swipeDirections})})):null}))});const rm=({...e})=>{const{theme:t="system"}=Xo();return c.jsx(om,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var Ro="Switch",[nm]=pe(Ro),[am,Dn]=nm(Ro);function sm(e){const{__scopeSwitch:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:d,required:u,value:f="on",internal_do_not_use_render:h}=e,[m,p]=He({prop:o,defaultProp:n??!1,onChange:d,caller:Ro}),[w,g]=l.useState(null),[v,y]=l.useState(null),b=l.useRef(!1),x=w?!!s||!!w.closest("form"):!0,S={checked:m,setChecked:p,disabled:a,control:w,setControl:g,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:n,isFormControl:x,bubbleInput:v,setBubbleInput:y};return c.jsx(am,{scope:t,...S,children:im(h)?h(S):r})}var Zl="SwitchTrigger",Ql=l.forwardRef(({__scopeSwitch:e,onClick:t,...o},r)=>{const{value:n,disabled:a,checked:s,required:i,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:m}=Dn(Zl,e),p=K(r,d);return c.jsx(R.button,{type:"button",role:"switch","aria-checked":s,"aria-required":i,"data-state":rc(s),"data-disabled":a?"":void 0,disabled:a,value:n,...o,ref:p,onClick:F(t,w=>{u(g=>!g),m&&h&&(f.current=w.isPropagationStopped(),f.current||w.stopPropagation())})})});Ql.displayName=Zl;var On=l.forwardRef((e,t)=>{const{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:d,onCheckedChange:u,form:f,...h}=e;return c.jsx(sm,{__scopeSwitch:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:f,value:d,internal_do_not_use_render:({isFormControl:m})=>c.jsxs(c.Fragment,{children:[c.jsx(Ql,{...h,ref:t,__scopeSwitch:o}),m&&c.jsx(oc,{__scopeSwitch:o})]})})});On.displayName=Ro;var Jl="SwitchThumb",ec=l.forwardRef((e,t)=>{const{__scopeSwitch:o,...r}=e,n=Dn(Jl,o);return c.jsx(R.span,{"data-state":rc(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});ec.displayName=Jl;var tc="SwitchBubbleInput",oc=l.forwardRef(({__scopeSwitch:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:d,name:u,value:f,form:h,bubbleInput:m,setBubbleInput:p}=Dn(tc,e),w=K(o,p),g=Er(a),v=Tr(r);l.useEffect(()=>{const b=m;if(!b)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,P=!n.current;if(g!==a&&T){const A=new Event("click",{bubbles:P});T.call(b,a),b.dispatchEvent(A)}},[m,g,a,n]);const y=l.useRef(a);return c.jsx(R.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:i,disabled:d,name:u,value:f,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});oc.displayName=tc;function im(e){return typeof e=="function"}function rc(e){return e?"checked":"unchecked"}const nc=l.forwardRef(({className:e,...t},o)=>c.jsx(On,{className:D("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:o,children:c.jsx(ec,{className:D("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));nc.displayName=On.displayName;const ac=l.forwardRef(({className:e,...t},o)=>c.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-border",children:c.jsx("table",{ref:o,className:D("w-full caption-bottom text-sm",e),...t})}));ac.displayName="Table";const sc=l.forwardRef(({className:e,...t},o)=>c.jsx("thead",{ref:o,className:D("bg-muted [&_tr]:border-b",e),...t}));sc.displayName="TableHeader";const ic=l.forwardRef(({className:e,...t},o)=>c.jsx("tbody",{ref:o,className:D("[&_tr:last-child]:border-0",e),...t}));ic.displayName="TableBody";const lc=l.forwardRef(({className:e,...t},o)=>c.jsx("tfoot",{ref:o,className:D("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));lc.displayName="TableFooter";const cc=l.forwardRef(({className:e,...t},o)=>c.jsx("tr",{ref:o,className:D("border-b bg-white transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));cc.displayName="TableRow";const dc=l.forwardRef(({className:e,...t},o)=>c.jsx("th",{ref:o,className:D("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));dc.displayName="TableHead";const uc=l.forwardRef(({className:e,...t},o)=>c.jsx("td",{ref:o,className:D("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));uc.displayName="TableCell";const fc=l.forwardRef(({className:e,...t},o)=>c.jsx("caption",{ref:o,className:D("mt-4 text-sm text-muted-foreground",e),...t}));fc.displayName="TableCaption";var _n="ToastProvider",[In,lm,cm]=sl("Toast"),[pc]=pe("Toast",[cm]),[dm,Vo]=pc(_n),hc=e=>{const{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:n="right",swipeThreshold:a=50,announcerContainer:s,children:i}=e,[d,u]=l.useState(null),[f,h]=l.useState(0),m=l.useRef(!1),p=l.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${_n}\`. Expected non-empty \`string\`.`),c.jsx(In.Provider,{scope:t,children:c.jsx(dm,{scope:t,label:o,duration:r,swipeDirection:n,swipeThreshold:a,toastCount:f,viewport:d,onViewportChange:u,onToastAdd:l.useCallback(()=>h(w=>w+1),[]),onToastRemove:l.useCallback(()=>h(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:p,announcerContainer:s,children:i})})};hc.displayName=_n;var gc="ToastViewport",um=["F8"],Mn="toast.viewportPause",Ln="toast.viewportResume",mc=l.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:r=um,label:n="Notifications ({hotkey})",...a}=e,s=Vo(gc,o),i=lm(o),d=l.useRef(null),u=l.useRef(null),f=l.useRef(null),h=l.useRef(null),m=K(t,h,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;l.useEffect(()=>{const v=y=>{r.length!==0&&r.every(x=>y[x]||y.code===x)&&h.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),l.useEffect(()=>{const v=d.current,y=h.current;if(w&&v&&y){const b=()=>{if(!s.isClosePausedRef.current){const P=new CustomEvent(Mn);y.dispatchEvent(P),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const P=new CustomEvent(Ln);y.dispatchEvent(P),s.isClosePausedRef.current=!1}},S=P=>{!v.contains(P.relatedTarget)&&x()},T=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",T),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",T),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[w,s.isClosePausedRef]);const g=l.useCallback(({tabbingDirection:v})=>{const b=i().map(x=>{const S=x.ref.current,T=[S,...Em(S)];return v==="forwards"?T:T.reverse()});return(v==="forwards"?b.reverse():b).flat()},[i]);return l.useEffect(()=>{const v=h.current;if(v){const y=b=>{const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const T=document.activeElement,P=b.shiftKey;if(b.target===v&&P){u.current?.focus();return}const k=g({tabbingDirection:P?"backwards":"forwards"}),M=k.findIndex(L=>L===T);Bn(k.slice(M+1))?b.preventDefault():P?u.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[i,g]),c.jsxs(Bd,{ref:d,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&c.jsx($n,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});Bn(v)}}),c.jsx(In.Slot,{scope:o,children:c.jsx(R.ol,{tabIndex:-1,...a,ref:m})}),w&&c.jsx($n,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});Bn(v)}})]})});mc.displayName=gc;var vc="ToastFocusProxy",$n=l.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:r,...n}=e,a=Vo(vc,o);return c.jsx(Io,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:s=>{const i=s.relatedTarget;!a.viewport?.contains(i)&&r()}})});$n.displayName=vc;var Wt="Toast",fm="toast.swipeStart",pm="toast.swipeMove",hm="toast.swipeCancel",gm="toast.swipeEnd",bc=l.forwardRef((e,t)=>{const{forceMount:o,open:r,defaultOpen:n,onOpenChange:a,...s}=e,[i,d]=He({prop:r,defaultProp:n??!0,onChange:a,caller:Wt});return c.jsx(ce,{present:o||i,children:c.jsx(bm,{open:i,...s,ref:t,onClose:()=>d(!1),onPause:le(e.onPause),onResume:le(e.onResume),onSwipeStart:F(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:F(e.onSwipeMove,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:F(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:F(e.onSwipeEnd,u=>{const{x:f,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),d(!1)})})})});bc.displayName=Wt;var[mm,vm]=pc(Wt,{onClose(){}}),bm=l.forwardRef((e,t)=>{const{__scopeToast:o,type:r="foreground",duration:n,open:a,onClose:s,onEscapeKeyDown:i,onPause:d,onResume:u,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:p,...w}=e,g=Vo(Wt,o),[v,y]=l.useState(null),b=K(t,N=>y(N)),x=l.useRef(null),S=l.useRef(null),T=n||g.duration,P=l.useRef(0),A=l.useRef(T),B=l.useRef(0),{onToastAdd:k,onToastRemove:M}=g,L=le(()=>{v?.contains(document.activeElement)&&g.viewport?.focus(),s()}),O=l.useCallback(N=>{!N||N===1/0||(window.clearTimeout(B.current),P.current=new Date().getTime(),B.current=window.setTimeout(L,N))},[L]);l.useEffect(()=>{const N=g.viewport;if(N){const V=()=>{O(A.current),u?.()},H=()=>{const z=new Date().getTime()-P.current;A.current=A.current-z,window.clearTimeout(B.current),d?.()};return N.addEventListener(Mn,H),N.addEventListener(Ln,V),()=>{N.removeEventListener(Mn,H),N.removeEventListener(Ln,V)}}},[g.viewport,T,d,u,O]),l.useEffect(()=>{a&&!g.isClosePausedRef.current&&O(T)},[a,T,g.isClosePausedRef,O]),l.useEffect(()=>(k(),()=>M()),[k,M]);const Y=l.useMemo(()=>v?Tc(v):null,[v]);return g.viewport?c.jsxs(c.Fragment,{children:[Y&&c.jsx(wm,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:Y}),c.jsx(mm,{scope:o,onClose:L,children:lt.createPortal(c.jsx(In.ItemSlot,{scope:o,children:c.jsx(Fd,{asChild:!0,onEscapeKeyDown:F(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(R.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...w,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:F(e.onKeyDown,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:F(e.onPointerDown,N=>{N.button===0&&(x.current={x:N.clientX,y:N.clientY})}),onPointerMove:F(e.onPointerMove,N=>{if(!x.current)return;const V=N.clientX-x.current.x,H=N.clientY-x.current.y,z=!!S.current,$=["left","right"].includes(g.swipeDirection),_=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,X=$?_(0,V):0,J=$?0:_(0,H),U=N.pointerType==="touch"?10:2,G={x:X,y:J},q={originalEvent:N,delta:G};z?(S.current=G,zo(pm,h,q,{discrete:!1})):Nc(G,g.swipeDirection,U)?(S.current=G,zo(fm,f,q,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(V)>U||Math.abs(H)>U)&&(x.current=null)}),onPointerUp:F(e.onPointerUp,N=>{const V=S.current,H=N.target;if(H.hasPointerCapture(N.pointerId)&&H.releasePointerCapture(N.pointerId),S.current=null,x.current=null,V){const z=N.currentTarget,$={originalEvent:N,delta:V};Nc(V,g.swipeDirection,g.swipeThreshold)?zo(gm,p,$,{discrete:!0}):zo(hm,m,$,{discrete:!0}),z.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),wm=e=>{const{__scopeToast:t,children:o,...r}=e,n=Vo(Wt,t),[a,s]=l.useState(!1),[i,d]=l.useState(!1);return Cm(()=>s(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:c.jsx(Mt,{asChild:!0,container:n.announcerContainer||void 0,children:c.jsx(Io,{...r,children:a&&c.jsxs(c.Fragment,{children:[n.label," ",o]})})})},ym="ToastTitle",wc=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e;return c.jsx(R.div,{...r,ref:t})});wc.displayName=ym;var xm="ToastDescription",yc=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e;return c.jsx(R.div,{...r,ref:t})});yc.displayName=xm;var xc="ToastAction",Cc=l.forwardRef((e,t)=>{const{altText:o,...r}=e;return o.trim()?c.jsx(Ec,{altText:o,asChild:!0,children:c.jsx(Fn,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${xc}\`. Expected non-empty \`string\`.`),null)});Cc.displayName=xc;var Sc="ToastClose",Fn=l.forwardRef((e,t)=>{const{__scopeToast:o,...r}=e,n=vm(Sc,o);return c.jsx(Ec,{asChild:!0,children:c.jsx(R.button,{type:"button",...r,ref:t,onClick:F(e.onClick,n.onClose)})})});Fn.displayName=Sc;var Ec=l.forwardRef((e,t)=>{const{__scopeToast:o,altText:r,...n}=e;return c.jsx(R.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...n,ref:t})});function Tc(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Sm(r)){const n=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!n)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Tc(r))}}),t}function zo(e,t,o,{discrete:r}){const n=o.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?ia(n,a):n.dispatchEvent(a)}var Nc=(e,t,o=0)=>{const r=Math.abs(e.x),n=Math.abs(e.y),a=r>n;return t==="left"||t==="right"?a&&r>o:!a&&n>o};function Cm(e=()=>{}){const t=le(e);se(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function Sm(e){return e.nodeType===e.ELEMENT_NODE}function Em(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Bn(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var Tm=hc,Pc=mc,Ac=bc,kc=wc,Dc=yc,Oc=Cc,_c=Fn;const Ic=Tm,Hn=l.forwardRef(({className:e,...t},o)=>c.jsx(Pc,{ref:o,className:D("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Hn.displayName=Pc.displayName;const Nm=Ft("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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 data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Rn=l.forwardRef(({className:e,variant:t,...o},r)=>c.jsx(Ac,{ref:r,className:D(Nm({variant:t}),e),...o}));Rn.displayName=Ac.displayName;const Mc=l.forwardRef(({className:e,...t},o)=>c.jsx(Oc,{ref:o,className:D("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));Mc.displayName=Oc.displayName;const Vn=l.forwardRef(({className:e,...t},o)=>c.jsx(_c,{ref:o,className:D("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Bt,{className:"h-4 w-4"})}));Vn.displayName=_c.displayName;const zn=l.forwardRef(({className:e,...t},o)=>c.jsx(kc,{ref:o,className:D("text-sm font-semibold",e),...t}));zn.displayName=kc.displayName;const Wn=l.forwardRef(({className:e,...t},o)=>c.jsx(Dc,{ref:o,className:D("text-sm opacity-90",e),...t}));Wn.displayName=Dc.displayName;const Pm=1,Am=1e6;let Un=0;function km(){return Un=(Un+1)%Number.MAX_SAFE_INTEGER,Un.toString()}const jn=new Map,Lc=e=>{if(jn.has(e))return;const t=setTimeout(()=>{jn.delete(e),Ut({type:"REMOVE_TOAST",toastId:e})},Am);jn.set(e,t)},Dm=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pm)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?Lc(o):e.toasts.forEach(r=>{Lc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},Wo=[];let Uo={toasts:[]};function Ut(e){Uo=Dm(Uo,e),Wo.forEach(t=>{t(Uo)})}function $c({...e}){const t=km(),o=n=>Ut({type:"UPDATE_TOAST",toast:{...n,id:t}}),r=()=>Ut({type:"DISMISS_TOAST",toastId:t});return Ut({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||r()}}}),{id:t,dismiss:r,update:o}}function Fc(){const[e,t]=l.useState(Uo);return l.useEffect(()=>(Wo.push(t),()=>{const o=Wo.indexOf(t);o>-1&&Wo.splice(o,1)}),[e]),{...e,toast:$c,dismiss:o=>Ut({type:"DISMISS_TOAST",toastId:o})}}function Om(){const{toasts:e}=Fc();return c.jsxs(Ic,{children:[e.map(function({id:t,title:o,description:r,action:n,...a}){return c.jsxs(Rn,{...a,children:[c.jsxs("div",{className:"grid gap-1",children:[o&&c.jsx(zn,{children:o}),r&&c.jsx(Wn,{children:r})]}),n,c.jsx(Vn,{})]},t)}),c.jsx(Hn,{})]})}var[jo]=pe("Tooltip",[Nt]),Yo=Nt(),Bc="TooltipProvider",_m=700,Yn="tooltip.open",[Im,Kn]=jo(Bc),Hc=e=>{const{__scopeTooltip:t,delayDuration:o=_m,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,s=l.useRef(!0),i=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),c.jsx(Im,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:l.useCallback(()=>{r<=0||(window.clearTimeout(d.current),s.current=!1)},[r]),onClose:l.useCallback(()=>{r<=0||(window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Hc.displayName=Bc;var jt="Tooltip",[Mm,Ko]=jo(jt),Rc=e=>{const{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,d=Kn(jt,e.__scopeTooltip),u=Yo(t),[f,h]=l.useState(null),m=Be(),p=l.useRef(0),w=s??d.disableHoverableContent,g=i??d.delayDuration,v=l.useRef(!1),[y,b]=He({prop:r,defaultProp:n??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(Yn))):d.onClose(),a?.(A)},caller:jt}),x=l.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),T=l.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),P=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},g)},[g,b]);return l.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),c.jsx(Jr,{...u,children:c.jsx(Mm,{scope:t,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{d.isOpenDelayedRef.current?P():S()},[d.isOpenDelayedRef,P,S]),onTriggerLeave:l.useCallback(()=>{w?T():(window.clearTimeout(p.current),p.current=0)},[T,w]),onOpen:S,onClose:T,disableHoverableContent:w,children:o})})};Rc.displayName=jt;var Gn="TooltipTrigger",Vc=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Ko(Gn,o),a=Kn(Gn,o),s=Yo(o),i=l.useRef(null),d=K(t,i,n.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),h=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(No,{asChild:!0,...s,children:c.jsx(R.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:d,onPointerMove:F(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{n.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:F(e.onBlur,n.onClose),onClick:F(e.onClick,n.onClose)})})});Vc.displayName=Gn;var Lm="TooltipPortal",[xv,$m]=jo(Lm,{forceMount:void 0}),kt="TooltipContent",zc=l.forwardRef((e,t)=>{const o=$m(kt,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,s=Ko(kt,e.__scopeTooltip);return c.jsx(ce,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Wc,{side:n,...a,ref:t}):c.jsx(Fm,{side:n,...a,ref:t})})}),Fm=l.forwardRef((e,t)=>{const o=Ko(kt,e.__scopeTooltip),r=Kn(kt,e.__scopeTooltip),n=l.useRef(null),a=K(t,n),[s,i]=l.useState(null),{trigger:d,onClose:u}=o,f=n.current,{onPointerInTransitChange:h}=r,m=l.useCallback(()=>{i(null),h(!1)},[h]),p=l.useCallback((w,g)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},b=zm(y,v.getBoundingClientRect()),x=Wm(y,b),S=Um(g.getBoundingClientRect()),T=Ym([...x,...S]);i(T),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(d&&f){const w=v=>p(v,f),g=v=>p(v,d);return d.addEventListener("pointerleave",w),f.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",g)}}},[d,f,p,m]),l.useEffect(()=>{if(s){const w=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=d?.contains(v)||f?.contains(v),x=!jm(y,s);b?m():x&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,f,s,u,m]),c.jsx(Wc,{...e,ref:a})}),[Bm,Hm]=jo(jt,{isInside:!1}),Rm=wd("TooltipContent"),Wc=l.forwardRef((e,t)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,d=Ko(kt,o),u=Yo(o),{onClose:f}=d;return l.useEffect(()=>(document.addEventListener(Yn,f),()=>document.removeEventListener(Yn,f)),[f]),l.useEffect(()=>{if(d.trigger){const h=m=>{m.target instanceof Node&&m.target.contains(d.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,f]),c.jsx(ct,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:c.jsxs(en,{"data-state":d.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Rm,{children:r}),c.jsx(Bm,{scope:o,isInside:!0,children:c.jsx(qh,{id:d.contentId,role:"tooltip",children:n||r})})]})})});zc.displayName=kt;var Uc="TooltipArrow",Vm=l.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Yo(o);return Hm(Uc,o).isInside?null:c.jsx(tn,{...n,...r,ref:t})});Vm.displayName=Uc;function zm(e,t){const o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Wm(e,t,o=5){const r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function Um(e){const{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function jm(e,t){const{x:o,y:r}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],d=t[s],u=i.x,f=i.y,h=d.x,m=d.y;f>r!=m>r&&o<(h-u)*(r-f)/(m-f)+u&&(n=!n)}return n}function Ym(e){const t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Km(t)}function Km(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var Gm=Hc,Xm=Rc,qm=Vc,jc=zc;const Zm=Gm,Qm=Xm,Jm=qm,Yc=l.forwardRef(({className:e,sideOffset:t=4,...o},r)=>c.jsx(jc,{ref:r,sideOffset:t,className:D("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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),...o}));Yc.displayName=jc.displayName;function ev({children:e,className:t}){return c.jsx("main",{className:D("p-6 space-y-6 pb-24",t),children:e})}function tv({title:e="No users found",description:t="Try adjusting your filters or invite a new user.",showCTA:o=!0,onCTA:r,ctaLabel:n="Invite"}){return c.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[c.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:c.jsx(qf,{className:"h-8 w-8 text-muted-foreground"})}),c.jsx("h3",{className:"text-lg font-semibold text-foreground mb-1",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-6",children:t}),o&&r&&c.jsxs(We,{onClick:r,className:"gap-2",children:[c.jsx(Xf,{className:"h-4 w-4"}),n]})]})}function ov({open:e,onOpenChange:t,title:o,description:r,submitLabel:n="Create",isSubmitting:a=!1,onSubmit:s,children:i}){return c.jsx(Vs,{open:e,onOpenChange:t,children:c.jsxs(_r,{className:"sm:max-w-[425px]",children:[c.jsxs(Ir,{children:[c.jsx(Lr,{children:o}),r&&c.jsx($r,{children:r})]}),i,c.jsxs(Mr,{children:[c.jsx(We,{variant:"ghost",onClick:()=>t(!1),disabled:a,children:"Cancel"}),c.jsx(We,{onClick:s,disabled:a,children:a?c.jsxs(c.Fragment,{children:[c.jsx(Rs,{className:"h-4 w-4 mr-2 animate-spin"}),"Submitting..."]}):n})]})]})})}function Kc({open:e,onOpenChange:t,title:o,description:r,confirmLabel:n="Confirm",cancelLabel:a="Cancel",variant:s="default",isLoading:i=!1,onConfirm:d}){const u=()=>{d()};return c.jsx(gs,{open:e,onOpenChange:t,children:c.jsxs(pr,{children:[c.jsxs(hr,{children:[c.jsx(mr,{children:o}),c.jsx(vr,{children:r})]}),c.jsxs(gr,{children:[c.jsx(wr,{disabled:i,children:a}),c.jsx(br,{onClick:u,disabled:i,className:s==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"",children:i?"Processing...":n})]})]})})}const Xn=C.createContext(null),Gc=C.forwardRef(({onClose:e,children:t},o)=>{const[r,n]=C.useState([]),[a,s]=C.useState(null),i=C.useRef(!1),d=C.useRef([]),u=r.length>0;r.length>0&&(d.current=r);const f=u?r:d.current;!u&&a===null&&(i.current=!1);const h=C.useCallback(g=>{n(v=>[...v,g])},[]),m=C.useCallback(()=>{n(g=>{const v=g.slice(0,-1);return v.length===0&&(i.current=!0,e()),v})},[e]);C.useImperativeHandle(o,()=>({push:h,pop:m}),[h,m]);const p=C.useCallback(g=>{g||(i.current=!0,n([]),e())},[e]),w=C.useMemo(()=>({displayStack:f,portalTarget:a,isDismissingRef:i}),[f,a]);return c.jsxs(Xn.Provider,{value:w,children:[t,c.jsx(Wl,{open:u,onOpenChange:p,children:c.jsx(An,{className:"w-full sm:max-w-md !p-0",children:c.jsx("div",{ref:s,className:"relative h-full overflow-hidden isolate"})})})]})});Gc.displayName="DetailSheet";function Xc(){const e=C.useContext(Xn);if(!e)throw new Error("useDetailSheet must be used within a DetailSheet");return e}function qc(e){const{displayStack:t,portalTarget:o,isDismissingRef:r}=Xc(),n=t.includes(e),a=t.length>0&&t[t.length-1]===e,s=t.indexOf(e);return{isActive:n,isTopPanel:a,depth:s,portalTarget:o,isDismissingRef:r}}function rv({panelKey:e,children:t}){const{isActive:o,isTopPanel:r,depth:n,portalTarget:a,isDismissingRef:s}=qc(e),i=C.useRef(null),[d,u]=C.useState(!1),[f,h]=C.useState(!1),m=C.useRef(!1),p=m.current;m.current=o,o&&!s.current&&(i.current=t),C.useEffect(()=>{a||(m.current=!1,h(!1),u(!1))},[a]),C.useEffect(()=>{p&&!o&&(s.current||h(!0)),!p&&o&&(h(!1),u(n===0))},[o,p,n,s]);const w=o||f||p&&!o&&!s.current,g=C.useCallback(S=>{S.animationName==="enter"&&u(!0)},[]),v=C.useCallback(S=>{f&&S.target===S.currentTarget&&S.propertyName==="transform"&&h(!1)},[f]);if(!w||!a)return null;const y=o&&!s.current?t:i.current,b=o&&!r&&!f,x=!d&&!f&&o;return Xt.createPortal(c.jsx("div",{className:D("absolute inset-0 overflow-y-auto p-6 pt-10",x&&"animate-in slide-in-from-right duration-300",d&&"transition-[transform,opacity] duration-300 ease-in-out",d&&r&&!f&&"translate-x-0 opacity-100",b&&"-translate-x-8 scale-[0.97] opacity-0",f&&"transition-[transform,opacity] duration-300 ease-in-out translate-x-full opacity-0"),style:{zIndex:Math.max(n,0)},onAnimationEnd:g,onTransitionEnd:v,children:y}),a)}function nv({value:e,onSave:t,className:o,readOnly:r}){const[n,a]=C.useState(!1),[s,i]=C.useState(e),[d,u]=C.useState(!1),f=C.useRef(null),h=s.trim().length>0&&s.trim()!==e,m=C.useCallback(()=>{i(e),a(!0)},[e]),p=C.useCallback(()=>{a(!1),i(e)},[e]),w=C.useCallback(async()=>{if(h){u(!0);try{await t(s.trim()),a(!1)}catch(y){console.error("Failed to save:",y)}finally{u(!1)}}},[h,s,t]),g=C.useCallback(y=>{y.key==="Escape"?p():y.key==="Enter"&&h&&w()},[p,w,h]),v=C.useCallback(y=>{f.current?.contains(y.relatedTarget)||p()},[p]);return r?c.jsx("h2",{className:D("text-lg font-semibold truncate",o),children:e}):n?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Fr,{value:s,onChange:y=>i(y.target.value),onKeyDown:g,onBlur:v,autoFocus:!0,disabled:d,className:D("h-8 text-lg font-semibold",o)}),c.jsx(We,{ref:f,size:"icon",onClick:h?w:p,disabled:d,className:D("h-8 w-8 shrink-0 text-white hover:translate-y-0 hover:shadow-none disabled:opacity-40",h?"bg-green-500 hover:bg-green-600 disabled:bg-green-500":"bg-red-500 hover:bg-red-600"),children:c.jsxs("div",{className:"relative h-4 w-4",children:[c.jsx(Rs,{className:D("h-4 w-4 absolute transition-opacity duration-200 animate-spin",d?"opacity-100":"opacity-0")}),c.jsx(Ar,{className:D("h-4 w-4 absolute transition-opacity duration-200",!d&&h?"opacity-100":"opacity-0")}),c.jsx(Bt,{className:D("h-4 w-4 absolute transition-opacity duration-200",!d&&!h?"opacity-100":"opacity-0")})]})})]}):c.jsxs("div",{className:"group flex items-center gap-2",children:[c.jsx("h2",{onClick:m,className:D("text-lg font-semibold truncate cursor-text transition-colors group-hover:text-primary/80",o),children:e}),c.jsx(We,{size:"icon",variant:"ghost",onClick:m,className:"h-8 w-8 shrink-0 text-muted-foreground hover:bg-transparent hover:text-muted-foreground group-hover:bg-accent group-hover:text-foreground",children:c.jsx(Gf,{className:"h-3.5 w-3.5"})})]})}function av({buttonLabel:e,confirmLabel:t="Confirm",modalTitle:o,modalDescription:r,isLoading:n,onConfirm:a}){const[s,i]=C.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx(We,{variant:"outline",size:"sm",className:"border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground w-full",onClick:()=>i(!0),children:e}),c.jsx(Kc,{open:s,onOpenChange:i,title:o,description:r,confirmLabel:t,variant:"destructive",isLoading:n,onConfirm:a})]})}function sv({actions:e}){return c.jsxs("div",{className:"space-y-2",children:[c.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Danger Zone"}),e.map((t,o)=>c.jsx(av,{...t},o))]})}function iv({icon:e,label:t,badge:o,onClick:r}){return c.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2 p-2 bg-muted/30 rounded-lg w-full text-left hover:bg-muted/50 transition-colors cursor-pointer",children:[c.jsx("span",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:e}),c.jsx("span",{className:"text-sm text-foreground flex-1",children:t}),o,c.jsx(Yf,{className:"h-4 w-4 text-muted-foreground"})]})}function lv({icon:e,message:t}){return c.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg text-center",children:[c.jsx("div",{className:"h-8 w-8 text-muted-foreground mx-auto mb-2 [&>svg]:h-8 [&>svg]:w-8 [&>svg]:mx-auto",children:e}),c.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})}function cv(){const e=C.useRef(null),t=C.useCallback(r=>{e.current?.push(r)},[]),o=C.useCallback(()=>{e.current?.pop()},[]);return{ref:e,push:t,pop:o}}E.AlertDialog=gs,E.AlertDialogAction=br,E.AlertDialogCancel=wr,E.AlertDialogContent=pr,E.AlertDialogDescription=vr,E.AlertDialogFooter=gr,E.AlertDialogHeader=hr,E.AlertDialogOverlay=fr,E.AlertDialogPortal=ms,E.AlertDialogTitle=mr,E.AlertDialogTrigger=_f,E.AppShell=dd,E.Avatar=xs,E.AvatarFallback=Ss,E.AvatarImage=Cs,E.Badge=Ts,E.Button=We,E.Card=Ns,E.CardContent=Ds,E.CardDescription=ks,E.CardFooter=Os,E.CardHeader=Ps,E.CardTitle=As,E.Checkbox=Dr,E.ConfirmModal=ea,E.ConfirmationModal=Kc,E.Container=ev,E.DangerZoneSection=sv,E.DetailPanel=rv,E.DetailSheet=Gc,E.DetailSheetContext=Xn,E.Dialog=Vs,E.DialogClose=Qf,E.DialogContent=_r,E.DialogDescription=$r,E.DialogFooter=Mr,E.DialogHeader=Ir,E.DialogOverlay=Or,E.DialogPortal=zs,E.DialogTitle=Lr,E.DialogTrigger=Zf,E.EditableTitle=nv,E.EmptyState=tv,E.FormModal=ov,E.Input=Fr,E.Label=js,E.MultiSelect=Nh,E.NavigationListItem=iv,E.PanelEmptyState=lv,E.Popover=Mi,E.PopoverContent=rn,E.PopoverTrigger=Li,E.Progress=Wi,E.RadixToaster=Om,E.ScrollArea=al,E.ScrollBar=fn,E.Select=wg,E.SelectContent=Ll,E.SelectGroup=yg,E.SelectItem=Fl,E.SelectLabel=$l,E.SelectScrollDownButton=Nn,E.SelectScrollUpButton=Tn,E.SelectSeparator=Bl,E.SelectTrigger=Ml,E.SelectValue=xg,E.Separator=zl,E.Sheet=Wl,E.SheetClose=Ng,E.SheetContent=An,E.SheetDescription=Gl,E.SheetFooter=Yl,E.SheetHeader=jl,E.SheetOverlay=Pn,E.SheetPortal=Ul,E.SheetTitle=Kl,E.SheetTrigger=Tg,E.Skeleton=Ag,E.SonnerToaster=rm,E.Switch=nc,E.Table=ac,E.TableBody=ic,E.TableCaption=fc,E.TableCell=uc,E.TableFooter=lc,E.TableHead=dc,E.TableHeader=sc,E.TableRow=cc,E.Toast=Rn,E.ToastAction=Mc,E.ToastClose=Vn,E.ToastDescription=Wn,E.ToastProvider=Ic,E.ToastTitle=zn,E.ToastViewport=Hn,E.Tooltip=Qm,E.TooltipContent=Yc,E.TooltipProvider=Zm,E.TooltipTrigger=Jm,E.VenueSwitcher=ta,E.badgeVariants=Es,E.buttonVariants=ho,E.cn=D,E.sonnerToast=Ug,E.toast=$c,E.useDetailPanel=qc,E.useDetailSheet=Xc,E.useDetailSheetControls=cv,E.useTheme=Xo,E.useToast=Fc,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|