@ryanodd/design-system 0.1.0-dev9 → 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/cjs/index.js +14 -14
- package/dist/esm/index.d.ts +68 -1
- package/dist/esm/index.js +3615 -2460
- package/dist/index.css +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),k=require("react"),mo=require("react-dom");function ho(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=ho(k),sn=ho(mo),ai="_button_1k08m_1",ci="_buttonNotificationDot_1k08m_143",Fn={button:ai,buttonNotificationDot:ci},li=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ui=k.forwardRef(li),di=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),fi=k.forwardRef(di),pi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),mi=k.forwardRef(pi),hi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),vi=k.forwardRef(hi),gi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),wi=k.forwardRef(gi),xi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),yi=k.forwardRef(xi),bi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),Ci=k.forwardRef(bi),Ei=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),Ri=k.forwardRef(Ei),Si=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Ti=k.forwardRef(Si),Pi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Mi=k.forwardRef(Pi),_i=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),Ai=k.forwardRef(_i),ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),Oi=k.forwardRef(ki),Di=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),Ni=k.forwardRef(Di),Ii=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),Li=k.forwardRef(Ii),ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),Fi=k.forwardRef(ji),$i=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),Bi=k.forwardRef($i),Wi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),Hi=k.forwardRef(Wi),Vi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),Ki=k.forwardRef(Vi),Ui=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),Gi=k.forwardRef(Ui),zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),Yi=k.forwardRef(zi),Xi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),qi=k.forwardRef(Xi),Zi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Qi=k.forwardRef(Zi),Ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),ea=k.forwardRef(Ji),ta=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),na=k.forwardRef(ta),oa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),ra=k.forwardRef(oa),sa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),ia=k.forwardRef(sa),aa=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),ca=k.forwardRef(aa),la=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),ua=k.forwardRef(la),da="_icon_178c1_1",fa={icon:da},pa=["xs","sm","md","lg","xl","2xl","3xl","4xl"],j=(e,t)=>{const n=k.forwardRef(({size:o="lg",className:r,...i},a)=>p.jsx(e,{className:`${r} ${fa.icon}`,"data-size":o,ref:a,alt:t,...i}));return n.displayName=t,n},vo=j(ui,"Left"),go=j(fi,"Right"),wo=j(mi,"Calendar"),an=j(vi,"Check"),ma=j(wi,"Chevron Down"),ha=j(yi,"Chevron Left"),va=j(Ci,"Chevron Right"),ga=j(Ri,"Chevron Up"),xo=j(Ti,"Circle"),cn=j(Mi,"Close"),yo=j(Ai,"Coffee"),bo=j(Oi,"External Link"),Co=j(Ni,"Gear"),Eo=j(Li,"Hammer"),Ro=j(Fi,"Heart"),So=j(Bi,"Inbox"),To=j(Ki,"Lamp"),Po=j(Hi,"Kebab"),Mo=j(Gi,"Lightning"),_o=j(Yi,"Log In"),Ao=j(qi,"Log Out"),ko=j(Qi,"Mail"),Oo=j(ea,"Menu"),Do=j(na,"No Mobile Devices"),No=j(ra,"Pencil"),Io=j(ia,"Plus"),Lo=j(ca,"Signpost"),jo=j(ua,"Sun Moon"),ut={ArrowLeft:vo,ArrowRight:go,Calendar:wo,Check:an,Circle:xo,Close:cn,Coffee:yo,ExternalLink:bo,Gear:Co,Hammer:Eo,Heart:Ro,Inbox:So,Kebab:Po,Lamp:To,Lightning:Mo,LogIn:_o,LogOut:Ao,Mail:ko,Menu:Oo,NoMobile:Do,Pencil:No,Plus:Io,Signpost:Lo,SunMoon:jo},wa="_spinnerWrapper_1mfc7_1",xa="_spinner_1mfc7_1",$n={spinnerWrapper:wa,spinner:xa},ln=k.forwardRef(({className:e,size:t="lg",...n},o)=>p.jsx("div",{ref:o,className:$n.spinnerWrapper,"data-size":t,...n,children:p.jsx("div",{className:$n.spinner})}));ln.displayName="Spinner";const wt=k.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:i="medium",variant:a,loading:c,iconOnly:d,...l},u)=>{const f=o?ut[o]:void 0,h=r?ut[r]:void 0,v=i==="small"?"sm":i==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":i,"data-variant":a,"data-icon-only":d,children:[f&&p.jsx(f,{size:v}),c&&p.jsx(ln,{size:v}),n,h&&p.jsx(h,{size:v}),t&&p.jsx("span",{className:Fn.buttonNotificationDot,children:t})]})});wt.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xt(...e){return t=>{let n=!1;const o=e.map(r=>{const i=Bn(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():Bn(e[r],null)}}}}function H(...e){return s.useCallback(xt(...e),e)}function ya(e,t){const n=s.createContext(t),o=i=>{const{children:a,...c}=i,d=s.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:d,children:a})};o.displayName=e+"Provider";function r(i){const a=s.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(i,a){const c=s.createContext(a),d=n.length;n=[...n,a];const l=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[d]||c,g=s.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};l.displayName=i+"Provider";function u(f,h){const v=h?.[e]?.[d]||c,w=s.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(a=>s.createContext(a));return function(c){const d=c?.[e]||i;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,ba(r,...t)]}function ba(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((c,{useScope:d,scopeName:l})=>{const f=d(i)[`__scope${l}`];return{...c,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ce=globalThis?.document?s.useLayoutEffect:()=>{},Ca=s[" useInsertionEffect ".trim().toString()]||ce;function ke({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,a]=Ea({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:r;{const u=s.useRef(e!==void 0);s.useEffect(()=>{const f=u.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),u.current=c},[c,o])}const l=s.useCallback(u=>{if(c){const f=Ra(u)?u(e):u;f!==e&&a.current?.(f)}else i(u)},[c,e,i,a]);return[d,l]}function Ea({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),i=s.useRef(t);return Ca(()=>{i.current=t},[t]),s.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}function Ra(e){return typeof e=="function"}function Sa(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Fo(e){const[t,n]=s.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,c;if("borderBoxSize"in i){const d=i.borderBoxSize,l=Array.isArray(d)?d[0]:d;a=l.inlineSize,c=l.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Ta(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Pa(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),i=H(o.ref,Ma(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:i}):null};Z.displayName="Presence";function Pa(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),i=s.useRef("none"),a=e?"mounted":"unmounted",[c,d]=Ta(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=Je(o.current);i.current=c==="mounted"?l:"none"},[c]),ce(()=>{const l=o.current,u=r.current;if(u!==e){const h=i.current,v=Je(l);e?d("MOUNT"):v==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ce(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=v=>{const m=Je(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(d("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(i.current=Je(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function Je(e){return e?.animationName||"none"}function Ma(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=_a(e),n=s.forwardRef((o,r)=>{const{children:i,...a}=o,c=s.Children.toArray(i),d=c.find(ka);if(d){const l=d.props.children,u=c.map(f=>f===d?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...a,ref:r,children:s.isValidElement(l)?s.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function _a(e){const t=s.forwardRef((n,o)=>{const{children:r,...i}=n;if(s.isValidElement(r)){const a=Da(r),c=Oa(i,r.props);return r.type!==s.Fragment&&(c.ref=o?xt(o,a):a),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $o=Symbol("radix.slottable");function Aa(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$o,t}function ka(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$o}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{const d=i(...c);return r(...c),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Da(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Na=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Na.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=s.forwardRef((r,i)=>{const{asChild:a,...c}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...c,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var yt="Checkbox",[Ia]=de(yt),[La,dn]=Ia(yt);function ja(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:i,form:a,name:c,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[h,v]=ke({prop:n,defaultProp:r??!1,onChange:d,caller:yt}),[w,m]=s.useState(null),[g,x]=s.useState(null),y=s.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:i,setChecked:v,control:w,setControl:m,name:c,form:a,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:me(r)?!1:r,isFormControl:b,bubbleInput:g,setBubbleInput:x};return p.jsx(La,{scope:t,...C,children:Fa(f)?f(C):o})}var Bo="CheckboxTrigger",Wo=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:i,value:a,disabled:c,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=dn(Bo,e),m=H(r,u),g=s.useRef(d);return s.useEffect(()=>{const x=i?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[i,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":zo(d),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:M(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:M(n,x=>{f(y=>me(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Wo.displayName=Bo;var Ho=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:i,required:a,disabled:c,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(ja,{__scopeCheckbox:n,checked:r,defaultChecked:i,disabled:c,required:a,onCheckedChange:l,name:o,form:u,value:d,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(Wo,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(Go,{__scopeCheckbox:n})]})})});Ho.displayName=yt;var Vo="CheckboxIndicator",Ko=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,i=dn(Vo,n);return p.jsx(Z,{present:o||me(i.checked)||i.checked===!0,children:p.jsx(I.span,{"data-state":zo(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});Ko.displayName=Vo;var Uo="CheckboxBubbleInput",Go=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:a,required:c,disabled:d,name:l,value:u,form:f,bubbleInput:h,setBubbleInput:v}=dn(Uo,e),w=H(n,v),m=Sa(i),g=Fo(o);s.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,S=!r.current;if(m!==i&&E){const R=new Event("click",{bubbles:S});y.indeterminate=me(i),E.call(y,me(i)?!1:i),y.dispatchEvent(R)}},[h,m,i,r]);const x=s.useRef(me(i)?!1:i);return p.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??x.current,required:c,disabled:d,name:l,value:u,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Go.displayName=Uo;function Fa(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function zo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const $a="_checkboxRow_aw0oa_1",Ba="_checkboxRoot_aw0oa_7",Wa="_checkboxIndicator_aw0oa_19",Ha="_checkboxCheckmarkIcon_aw0oa_29",Va="_checkboxLabel_aw0oa_35",Ie={checkboxRow:$a,checkboxRoot:Ba,checkboxIndicator:Wa,checkboxCheckmarkIcon:Ha,checkboxLabel:Va},Ka=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:Ie.checkboxRow,children:[p.jsx(Ho,{checked:n,onCheckedChange:r=>{o(r===!0)},className:Ie.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(Ko,{className:Ie.checkboxIndicator,children:p.jsx(an,{className:Ie.checkboxCheckmarkIcon})})}),p.jsx("label",{className:Ie.checkboxLabel,htmlFor:e,children:t})]});var Ua=s[" useId ".trim().toString()]||(()=>{}),Ga=0;function we(e){const[t,n]=s.useState(Ua());return ce(()=>{n(o=>o??String(Ga++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function za(e,t=globalThis?.document){const n=Y(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Ya="DismissableLayer",Gt="dismissableLayer.update",Xa="dismissableLayer.pointerDownOutside",qa="dismissableLayer.focusOutside",Wn,Yo=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ve=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...d}=e,l=s.useContext(Yo),[u,f]=s.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=s.useState({}),w=H(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=u?m.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,C=y>=x,E=Qa(R=>{const _=R.target,N=[...l.branches].some(D=>D.contains(_));!C||N||(r?.(R),a?.(R),R.defaultPrevented||c?.())},h),S=Ja(R=>{const _=R.target;[...l.branches].some(D=>D.contains(_))||(i?.(R),a?.(R),R.defaultPrevented||c?.())},h);return za(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),s.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Wn)}},[u,h,n,l]),s.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),s.useEffect(()=>{const R=()=>v({});return document.addEventListener(Gt,R),()=>document.removeEventListener(Gt,R)},[]),p.jsx(I.div,{...d,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,S.onFocusCapture),onBlurCapture:M(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,E.onPointerDownCapture)})});Ve.displayName=Ya;var Za="DismissableLayerBranch",Xo=s.forwardRef((e,t)=>{const n=s.useContext(Yo),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Xo.displayName=Za;function Qa(e,t=globalThis?.document){const n=Y(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let d=function(){qo(Xa,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ja(e,t=globalThis?.document){const n=Y(e),o=s.useRef(!1);return s.useEffect(()=>{const r=i=>{i.target&&!o.current&&qo(qa,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hn(){const e=new CustomEvent(Gt);document.dispatchEvent(e)}function qo(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var ec=Ve,tc=Xo,It="focusScope.autoFocusOnMount",Lt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},nc="FocusScope",fn=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[c,d]=s.useState(null),l=Y(r),u=Y(i),f=s.useRef(null),h=H(t,m=>d(m)),v=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(b){if(v.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:pe(f.current,{select:!0})},g=function(b){if(v.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||pe(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&pe(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,c,v.paused]),s.useEffect(()=>{if(c){Un.add(v);const m=document.activeElement;if(!c.contains(m)){const x=new CustomEvent(It,Vn);c.addEventListener(It,l),c.dispatchEvent(x),x.defaultPrevented||(oc(cc(Zo(c)),{select:!0}),document.activeElement===m&&pe(c))}return()=>{c.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(Lt,Vn);c.addEventListener(Lt,u),c.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),c.removeEventListener(Lt,u),Un.remove(v)},0)}}},[c,l,u,v]);const w=s.useCallback(m=>{if(!n&&!o||v.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[b,C]=rc(y);b&&C?!m.shiftKey&&x===C?(m.preventDefault(),n&&pe(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),n&&pe(C,{select:!0})):x===y&&m.preventDefault()}},[n,o,v.paused]);return p.jsx(I.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});fn.displayName=nc;function oc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function rc(e){const t=Zo(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Zo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!sc(n,{upTo:t}))return n}function sc(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 ic(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ic(e)&&t&&e.select()}}var Un=ac();function ac(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gn(e,t),e.unshift(t)},remove(t){e=Gn(e,t),e[0]?.resume()}}}function Gn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function cc(e){return e.filter(t=>t.tagName!=="A")}var lc="Portal",Ke=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,i]=s.useState(!1);ce(()=>i(!0),[]);const a=n||r&&globalThis?.document?.body;return a?mo.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});Ke.displayName=lc;var jt=0;function Qo(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),jt++,()=>{jt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jt--}},[])}function zn(){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 oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(this,arguments)};function Jo(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function uc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,i;o<r;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",ct="width-before-scroll-bar",dc="with-scroll-bars-hidden",fc="--removed-body-scroll-bar-size";function Ft(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pc(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var mc=typeof window<"u"?s.useLayoutEffect:s.useEffect,Yn=new WeakMap;function hc(e,t){var n=pc(null,function(o){return e.forEach(function(r){return Ft(r,o)})});return mc(function(){var o=Yn.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(c){i.has(c)||Ft(c,null)}),i.forEach(function(c){r.has(c)||Ft(c,a)})}Yn.set(n,e)},[e]),n}function vc(e){return e}function gc(e,t){t===void 0&&(t=vc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(i),a=n}var d=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),n}}}};return r}function wc(e){e===void 0&&(e={});var t=gc(null);return t.options=oe({async:!0,ssr:!1},e),t}var er=function(e){var t=e.sideCar,n=Jo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,oe({},n))};er.isSideCarExport=!0;function xc(e,t){return e.useMedium(t),er}var tr=wc(),$t=function(){},bt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:$t,onWheelCapture:$t,onTouchMoveCapture:$t}),r=o[0],i=o[1],a=e.forwardProps,c=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,b=e.gapMode,C=Jo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,S=hc([n,t]),R=oe(oe({},C),r);return s.createElement(s.Fragment,null,u&&s.createElement(E,{sideCar:tr,removeScrollBar:l,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?s.cloneElement(s.Children.only(c),oe(oe({},R),{ref:S})):s.createElement(y,oe({},R,{className:d,ref:S}),c))});bt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bt.classNames={fullWidth:ct,zeroRight:at};var yc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yc();return t&&e.setAttribute("nonce",t),e}function Cc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ec(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bc())&&(Cc(t,n),Ec(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Rc();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nr=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Tc={left:0,top:0,right:0,gap:0},Bt=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Bt(n),Bt(o),Bt(r)]},Mc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Tc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},_c=nr(),Pe="data-scroll-locked",Ac=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),O=require("react"),nr=require("react-dom");function or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=or(O),pt=or(nr),Pi="_badge_1quq7_1",Ti={badge:Pi},Mi=({variant:e="neutral",size:t="md",className:n,...o})=>l.jsx("div",{className:`${Ti.badge} ${n??""}`,"data-variant":e,"data-size":t,...o}),Ai="_button_1wslv_1",Ii="_buttonNotificationDot_1wslv_143",_o={button:Ai,buttonNotificationDot:Ii},Ni=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),Oi=O.forwardRef(Ni),ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),Di=O.forwardRef(ki),ji=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M3 20a2 2 0 0 0 2 2h10a2.4 2.4 0 0 0 1.706-.706l3.588-3.588A2.4 2.4 0 0 0 21 16V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"}),s.createElement("path",{d:"M15 22v-5a1 1 0 0 1 1-1h5M8 2v4m8-4v4M3 10h18"}))),Li=O.forwardRef(ji),Fi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"})),$i=O.forwardRef(Fi),Bi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9l6 6l6-6"})),Wi=O.forwardRef(Bi),Hi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m15 18l-6-6l6-6"})),Vi=O.forwardRef(Hi),Ki=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18l6-6l-6-6"})),Ui=O.forwardRef(Ki),Gi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m18 15l-6-6l-6 6"})),zi=O.forwardRef(Gi),Yi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),Xi=O.forwardRef(Yi),qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),Zi=O.forwardRef(qi),Qi=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 2v2m4-2v2m2 4a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1M6 2v2"})),Ji=O.forwardRef(Qi),ec=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})),tc=O.forwardRef(ec),nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0a2.34 2.34 0 0 0 3.319 1.915a2.34 2.34 0 0 1 2.33 4.033a2.34 2.34 0 0 0 0 3.831a2.34 2.34 0 0 1-2.33 4.033a2.34 2.34 0 0 0-3.319 1.915a2.34 2.34 0 0 1-4.659 0a2.34 2.34 0 0 0-3.32-1.915a2.34 2.34 0 0 1-2.33-4.033a2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),s.createElement("circle",{cx:12,cy:12,r:3}))),oc=O.forwardRef(nc),rc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),s.createElement("path",{d:"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"}))),sc=O.forwardRef(rc),ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"})),ic=O.forwardRef(ac),cc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),s.createElement("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11"}))),lc=O.forwardRef(cc),uc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},s.createElement("circle",{cx:8,cy:2.5,r:.75}),s.createElement("circle",{cx:8,cy:8,r:.75}),s.createElement("circle",{cx:8,cy:13.5,r:.75}))),dc=O.forwardRef(uc),fc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("path",{d:"M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5l5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994l-2.5-2.5a1 1 0 0 1 0-1.414zm3.914 2.5l-3.414 3.414M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"}),s.createElement("path",{d:"m9.086 6.5l-4.793 4.793a1 1 0 0 0-.18 1.17L7 18"}))),pc=O.forwardRef(fc),mc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m213.85 125.46l-112 120a8 8 0 0 1-13.69-7l14.66-73.33l-57.63-21.64a8 8 0 0 1-3-13l112-120a8 8 0 0 1 13.69 7l-14.7 73.41l57.63 21.61a8 8 0 0 1 3 12.95Z"})),hc=O.forwardRef(mc),vc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 17l5-5l-5-5m5 5H3m12-9h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"})),gc=O.forwardRef(vc),wc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m16 17l5-5l-5-5m5 5H9m0 9H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"})),xc=O.forwardRef(wc),yc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},s.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),s.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Cc=O.forwardRef(yc),bc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Ec=O.forwardRef(bc),Sc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7.159 3.185C7.415 3.066 7.699 3 8 3h8a2 2 0 0 1 2 2v9m0 4v1a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V6m5-2h2M3 3l18 18m-9-4v.01"})),Rc=O.forwardRef(Sc),_c=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"currentColor",d:"m12.9 6.855l4.242 4.242l-9.9 9.9H3v-4.243zm1.414-1.415l2.121-2.121a1 1 0 0 1 1.414 0l2.829 2.828a1 1 0 0 1 0 1.415l-2.122 2.121z"})),Pc=O.forwardRef(_c),Tc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7v14"})),Mc=O.forwardRef(Tc),Ac=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 9H4L2 7l2-2h6m4 0h6l2 2l-2 2h-6m-4 13V4a2 2 0 1 1 4 0v18m-6 0h8"})),Ic=O.forwardRef(Ac),Nc=({title:e,titleId:t,...n},o)=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?s.createElement("title",{id:t},e):null,s.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2"})),Oc=O.forwardRef(Nc),kc="_icon_178c1_1",Dc={icon:kc},jc=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=O.forwardRef(({size:o="lg",className:r,...a},i)=>l.jsx(e,{className:`${r} ${Dc.icon}`,"data-size":o,ref:i,alt:t,...a}));return n.displayName=t,n},rr=V(Oi,"Left"),sr=V(Di,"Right"),ar=V(Li,"Calendar"),Ut=V($i,"Check"),ir=V(Wi,"Chevron Down"),Lc=V(Vi,"Chevron Left"),Fc=V(Ui,"Chevron Right"),$c=V(zi,"Chevron Up"),cr=V(Xi,"Circle"),Xn=V(Zi,"Close"),lr=V(Ji,"Coffee"),ur=V(tc,"External Link"),dr=V(oc,"Gear"),fr=V(sc,"Hammer"),pr=V(ic,"Heart"),mr=V(lc,"Inbox"),hr=V(pc,"Lamp"),vr=V(dc,"Kebab"),gr=V(hc,"Lightning"),wr=V(gc,"Log In"),xr=V(xc,"Log Out"),yr=V(Cc,"Mail"),Cr=V(Ec,"Menu"),br=V(Rc,"No Mobile Devices"),Er=V(Pc,"Pencil"),Sr=V(Mc,"Plus"),Rr=V(Ic,"Signpost"),_r=V(Oc,"Sun Moon"),Ze={ArrowLeft:rr,ArrowRight:sr,Calendar:ar,Check:Ut,Circle:cr,Close:Xn,Coffee:lr,ExternalLink:ur,Gear:dr,Hammer:fr,Heart:pr,Inbox:mr,Kebab:vr,Lamp:hr,Lightning:gr,LogIn:wr,LogOut:xr,Mail:yr,Menu:Cr,NoMobile:br,Pencil:Er,Plus:Sr,Signpost:Rr,SunMoon:_r},Bc="_spinnerWrapper_1mfc7_1",Wc="_spinner_1mfc7_1",Po={spinnerWrapper:Bc,spinner:Wc},qn=O.forwardRef(({className:e,size:t="lg",...n},o)=>l.jsx("div",{ref:o,className:Po.spinnerWrapper,"data-size":t,...n,children:l.jsx("div",{className:Po.spinner})}));qn.displayName="Spinner";const mt=O.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:a="md",variant:i,loading:c,iconOnly:u,...d},f)=>{const p=o?Ze[o]:void 0,h=r?Ze[r]:void 0,g=a==="sm"?"sm":a==="md"?"md":"lg";return l.jsxs("button",{ref:f,...d,className:`${_o.button} ${e??""}`,"data-size":a,"data-variant":i,"data-icon-only":u,children:[p&&l.jsx(p,{size:g}),c&&l.jsx(qn,{size:g}),n,h&&l.jsx(h,{size:g}),t&&l.jsx("span",{className:_o.buttonNotificationDot,children:t})]})});mt.displayName="Button";function To(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gt(...e){return t=>{let n=!1;const o=e.map(r=>{const a=To(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():To(e[r],null)}}}}function H(...e){return s.useCallback(Gt(...e),e)}function Hc(e,t){const n=s.createContext(t),o=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return l.jsx(n.Provider,{value:u,children:i})};o.displayName=e+"Provider";function r(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function pe(e,t=[]){let n=[];function o(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=p=>{const{scope:h,children:g,...w}=p,m=h?.[e]?.[u]||c,v=s.useMemo(()=>w,Object.values(w));return l.jsx(m.Provider,{value:v,children:g})};d.displayName=a+"Provider";function f(p,h){const g=h?.[e]?.[u]||c,w=s.useContext(g);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const r=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return r.scopeName=e,[o,Vc(r,...t)]}function Vc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((c,{useScope:u,scopeName:d})=>{const p=u(a)[`__scope${d}`];return{...c,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var q=globalThis?.document?s.useLayoutEffect:()=>{},Kc=s[" useInsertionEffect ".trim().toString()]||q;function be({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=Uc({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:r;{const f=s.useRef(e!==void 0);s.useEffect(()=>{const p=f.current;p!==c&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${c?"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=c},[c,o])}const d=s.useCallback(f=>{if(c){const p=Gc(f)?f(e):f;p!==e&&i.current?.(p)}else a(f)},[c,e,a,i]);return[u,d]}function Uc({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return Kc(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function Gc(e){return typeof e=="function"}function Pr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Tr(e){const[t,n]=s.useState(void 0);return q(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function zc(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var oe=e=>{const{present:t,children:n}=e,o=Yc(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=H(o.ref,Xc(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};oe.displayName="Presence";function Yc(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[c,u]=zc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const d=Rt(o.current);a.current=c==="mounted"?d:"none"},[c]),q(()=>{const d=o.current,f=r.current;if(f!==e){const h=a.current,g=Rt(d);e?u("MOUNT"):g==="none"||d?.display==="none"?u("UNMOUNT"):u(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),q(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=g=>{const m=Rt(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(u("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Rt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function Rt(e){return e?.animationName||"none"}function Xc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function De(e){const t=qc(e),n=s.forwardRef((o,r)=>{const{children:a,...i}=o,c=s.Children.toArray(a),u=c.find(Qc);if(u){const d=u.props.children,f=c.map(p=>p===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...i,ref:r,children:s.isValidElement(d)?s.cloneElement(d,void 0,f):null})}return l.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function qc(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const i=el(r),c=Jc(a,r.props);return r.type!==s.Fragment&&(c.ref=o?Gt(o,i):i),s.cloneElement(r,c)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mr=Symbol("radix.slottable");function Zc(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Mr,t}function Qc(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mr}function Jc(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...c)=>{const u=a(...c);return r(...c),u}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function el(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],k=tl.reduce((e,t)=>{const n=De(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:i,...c}=r,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(u,{...c,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Zn(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}var zt="Checkbox",[nl]=pe(zt),[ol,Qn]=nl(zt);function rl(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=e,[h,g]=be({prop:n,defaultProp:r??!1,onChange:u,caller:zt}),[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useRef(!1),C=w?!!i||!!w.closest("form"):!0,b={checked:h,disabled:a,setChecked:g,control:w,setControl:m,name:c,form:i,value:f,hasConsumerStoppedPropagationRef:x,required:d,defaultChecked:Pe(r)?!1:r,isFormControl:C,bubbleInput:v,setBubbleInput:y};return l.jsx(ol,{scope:t,...b,children:sl(p)?p(b):o})}var Ar="CheckboxTrigger",Ir=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:w}=Qn(Ar,e),m=H(r,f),v=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const x=()=>p(v.current);return y.addEventListener("reset",x),()=>y.removeEventListener("reset",x)}},[a,p]),l.jsx(k.button,{type:"button",role:"checkbox","aria-checked":Pe(u)?"mixed":u,"aria-required":d,"data-state":Lr(u),"data-disabled":c?"":void 0,disabled:c,value:i,...o,ref:m,onKeyDown:R(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:R(n,y=>{p(x=>Pe(x)?!0:!x),w&&g&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})});Ir.displayName=Ar;var Nr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:f,...p}=e;return l.jsx(rl,{__scopeCheckbox:n,checked:r,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:o,form:f,value:u,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Ir,{...p,ref:t,__scopeCheckbox:n}),h&&l.jsx(jr,{__scopeCheckbox:n})]})})});Nr.displayName=zt;var Or="CheckboxIndicator",kr=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,a=Qn(Or,n);return l.jsx(oe,{present:o||Pe(a.checked)||a.checked===!0,children:l.jsx(k.span,{"data-state":Lr(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});kr.displayName=Or;var Dr="CheckboxBubbleInput",jr=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=Qn(Dr,e),w=H(n,g),m=Pr(a),v=Tr(o);s.useEffect(()=>{const x=h;if(!x)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==a&&E){const S=new Event("click",{bubbles:T});x.indeterminate=Pe(a),E.call(x,Pe(a)?!1:a),x.dispatchEvent(S)}},[h,m,a,r]);const y=s.useRef(Pe(a)?!1:a);return l.jsx(k.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:f,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jr.displayName=Dr;function sl(e){return typeof e=="function"}function Pe(e){return e==="indeterminate"}function Lr(e){return Pe(e)?"indeterminate":e?"checked":"unchecked"}const al="_checkboxRow_aw0oa_1",il="_checkboxRoot_aw0oa_7",cl="_checkboxIndicator_aw0oa_19",ll="_checkboxCheckmarkIcon_aw0oa_29",ul="_checkboxLabel_aw0oa_35",rt={checkboxRow:al,checkboxRoot:il,checkboxIndicator:cl,checkboxCheckmarkIcon:ll,checkboxLabel:ul},dl=({id:e,labelContent:t,checked:n,onClick:o})=>l.jsxs("div",{className:rt.checkboxRow,children:[l.jsx(Nr,{checked:n,onCheckedChange:r=>{o(r===!0)},className:rt.checkboxRoot,defaultChecked:!0,id:e,children:l.jsx(kr,{className:rt.checkboxIndicator,children:l.jsx(Ut,{className:rt.checkboxCheckmarkIcon})})}),l.jsx("label",{className:rt.checkboxLabel,htmlFor:e,children:t})]});var fl=s[" useId ".trim().toString()]||(()=>{}),pl=0;function ue(e){const[t,n]=s.useState(fl());return q(()=>{n(o=>o??String(pl++))},[e]),t?`radix-${t}`:""}function ne(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function ml(e,t=globalThis?.document){const n=ne(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var hl="DismissableLayer",Nn="dismissableLayer.update",vl="dismissableLayer.pointerDownOutside",gl="dismissableLayer.focusOutside",Mo,Fr=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Be=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(Fr),[f,p]=s.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=s.useState({}),w=H(t,S=>p(S)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),x=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,E=xl(S=>{const A=S.target,j=[...d.branches].some(D=>D.contains(A));!b||j||(r?.(S),i?.(S),S.defaultPrevented||c?.())},h),T=yl(S=>{const A=S.target;[...d.branches].some(D=>D.contains(A))||(a?.(S),i?.(S),S.defaultPrevented||c?.())},h);return ml(S=>{x===d.layers.size-1&&(o?.(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},h),s.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Mo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ao(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Mo)}},[f,h,n,d]),s.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ao())},[f,d]),s.useEffect(()=>{const S=()=>g({});return document.addEventListener(Nn,S),()=>document.removeEventListener(Nn,S)},[]),l.jsx(k.div,{...u,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,T.onFocusCapture),onBlurCapture:R(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,E.onPointerDownCapture)})});Be.displayName=hl;var wl="DismissableLayerBranch",$r=s.forwardRef((e,t)=>{const n=s.useContext(Fr),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(k.div,{...e,ref:r})});$r.displayName=wl;function xl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let u=function(){Br(vl,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function yl(e,t=globalThis?.document){const n=ne(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Br(gl,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Nn);document.dispatchEvent(e)}function Br(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var Cl=Be,bl=$r,Cn="focusScope.autoFocusOnMount",bn="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},El="FocusScope",ht=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=ne(r),f=ne(a),p=s.useRef(null),h=H(t,m=>u(m)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let m=function(C){if(g.paused||!c)return;const b=C.target;c.contains(b)?p.current=b:_e(p.current,{select:!0})},v=function(C){if(g.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||_e(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&_e(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()}}},[o,c,g.paused]),s.useEffect(()=>{if(c){Oo.add(g);const m=document.activeElement;if(!c.contains(m)){const y=new CustomEvent(Cn,Io);c.addEventListener(Cn,d),c.dispatchEvent(y),y.defaultPrevented||(Sl(Ml(Wr(c)),{select:!0}),document.activeElement===m&&_e(c))}return()=>{c.removeEventListener(Cn,d),setTimeout(()=>{const y=new CustomEvent(bn,Io);c.addEventListener(bn,f),c.dispatchEvent(y),y.defaultPrevented||_e(m??document.body,{select:!0}),c.removeEventListener(bn,f),Oo.remove(g)},0)}}},[c,d,f,g]);const w=s.useCallback(m=>{if(!n&&!o||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const x=m.currentTarget,[C,b]=Rl(x);C&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&_e(C,{select:!0})):m.shiftKey&&y===C&&(m.preventDefault(),n&&_e(b,{select:!0})):y===x&&m.preventDefault()}},[n,o,g.paused]);return l.jsx(k.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});ht.displayName=El;function Sl(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(_e(o,{select:t}),document.activeElement!==n)return}function Rl(e){const t=Wr(e),n=No(t,e),o=No(t.reverse(),e);return[n,o]}function Wr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function No(e,t){for(const n of e)if(!_l(n,{upTo:t}))return n}function _l(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 Pl(e){return e instanceof HTMLInputElement&&"select"in e}function _e(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pl(e)&&t&&e.select()}}var Oo=Tl();function Tl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ko(e,t),e.unshift(t)},remove(t){e=ko(e,t),e[0]?.resume()}}}function ko(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ml(e){return e.filter(t=>t.tagName!=="A")}var Al="Portal",We=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);q(()=>a(!0),[]);const i=n||r&&globalThis?.document?.body;return i?nr.createPortal(l.jsx(k.div,{...o,ref:t}),i):null});We.displayName=Al;var En=0;function Yt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Do()),document.body.insertAdjacentElement("beforeend",e[1]??Do()),En++,()=>{En===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),En--}},[])}function Do(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ve=function(){return ve=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ve.apply(this,arguments)};function Hr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Il(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Ot="right-scroll-bar-position",kt="width-before-scroll-bar",Nl="with-scroll-bars-hidden",Ol="--removed-body-scroll-bar-size";function Sn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kl(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Dl=typeof window<"u"?s.useLayoutEffect:s.useEffect,jo=new WeakMap;function jl(e,t){var n=kl(null,function(o){return e.forEach(function(r){return Sn(r,o)})});return Dl(function(){var o=jo.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(c){a.has(c)||Sn(c,null)}),a.forEach(function(c){r.has(c)||Sn(c,i)})}jo.set(n,e)},[e]),n}function Ll(e){return e}function Fl(e,t){t===void 0&&(t=Ll);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(c){return c!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var c=n;n=[],c.forEach(a),i=n}var u=function(){var f=i;i=[],f.forEach(a)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){i.push(f),d()},filter:function(f){return i=i.filter(f),n}}}};return r}function $l(e){e===void 0&&(e={});var t=Fl(null);return t.options=ve({async:!0,ssr:!1},e),t}var Vr=function(e){var t=e.sideCar,n=Hr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return s.createElement(o,ve({},n))};Vr.isSideCarExport=!0;function Bl(e,t){return e.useMedium(t),Vr}var Kr=$l(),Rn=function(){},Xt=s.forwardRef(function(e,t){var n=s.useRef(null),o=s.useState({onScrollCapture:Rn,onWheelCapture:Rn,onTouchMoveCapture:Rn}),r=o[0],a=o[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,h=e.sideCar,g=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,b=Hr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=jl([n,t]),S=ve(ve({},b),r);return s.createElement(s.Fragment,null,f&&s.createElement(E,{sideCar:Kr,removeScrollBar:d,shards:p,noRelative:g,noIsolation:w,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),ve(ve({},S),{ref:T})):s.createElement(x,ve({},S,{className:u,ref:T}),c))});Xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xt.classNames={fullWidth:kt,zeroRight:Ot};var Wl=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wl();return t&&e.setAttribute("nonce",t),e}function Vl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Kl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ul=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Hl())&&(Vl(t,n),Kl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gl=function(){var e=Ul();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ur=function(){var e=Gl(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},zl={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Yl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[_n(n),_n(o),_n(r)]},Xl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zl;var t=Yl(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},ql=Ur(),Xe="data-scroll-locked",Zl=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Nl,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(Xe,`] {
|
|
7
7
|
overflow: hidden `).concat(o,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
10
|
padding-left: `.concat(r,`px;
|
|
11
|
-
padding-top: `).concat(
|
|
12
|
-
padding-right: `).concat(
|
|
11
|
+
padding-top: `).concat(a,`px;
|
|
12
|
+
padding-right: `).concat(i,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
15
|
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
16
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(Ot,` {
|
|
20
20
|
right: `).concat(c,"px ").concat(o,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(kt,` {
|
|
24
24
|
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(Ot," .").concat(Ot,` {
|
|
28
28
|
right: 0 `).concat(o,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(kt," .").concat(kt,` {
|
|
32
32
|
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(Xe,`] {
|
|
36
|
+
`).concat(Ol,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},Lo=function(){var e=parseInt(document.body.getAttribute(Xe)||"0",10);return isFinite(e)?e:0},Ql=function(){s.useEffect(function(){return document.body.setAttribute(Xe,(Lo()+1).toString()),function(){var e=Lo()-1;e<=0?document.body.removeAttribute(Xe):document.body.setAttribute(Xe,e.toString())}},[])},Jl=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ql();var a=s.useMemo(function(){return Xl(r)},[r]);return s.createElement(ql,{styles:Zl(a,!t,r,n?"":"!important")})},On=!1;if(typeof window<"u")try{var _t=Object.defineProperty({},"passive",{get:function(){return On=!0,!0}});window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{On=!1}var Ke=On?{passive:!1}:!1,eu=function(e){return e.tagName==="TEXTAREA"},Gr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eu(e)&&n[t]==="visible")},tu=function(e){return Gr(e,"overflowY")},nu=function(e){return Gr(e,"overflowX")},Fo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=zr(e,o);if(r){var a=Yr(e,o),i=a[1],c=a[2];if(i>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ou=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ru=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},zr=function(e,t){return e==="v"?tu(t):nu(t)},Yr=function(e,t){return e==="v"?ou(t):ru(t)},su=function(e,t){return e==="h"&&t==="rtl"?-1:1},au=function(e,t,n,o,r){var a=su(e,window.getComputedStyle(t).direction),i=a*o,c=n.target,u=t.contains(c),d=!1,f=i>0,p=0,h=0;do{if(!c)break;var g=Yr(e,c),w=g[0],m=g[1],v=g[2],y=m-v-a*w;(w||y)&&zr(e,c)&&(p+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(f&&Math.abs(p)<1||!f&&Math.abs(h)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$o=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},iu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cu=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},lu=0,Ue=[];function uu(e){var t=s.useRef([]),n=s.useRef([0,0]),o=s.useRef(),r=s.useState(lu++)[0],a=s.useState(Ur)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Il([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var y=Pt(m),x=n.current,C="deltaX"in m?m.deltaX:x[0]-y[0],b="deltaY"in m?m.deltaY:x[1]-y[1],E,T=m.target,S=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in m&&S==="h"&&T.type==="range")return!1;var A=Fo(S,T);if(!A)return!0;if(A?E=S:(E=S==="v"?"h":"v",A=Fo(S,T)),!A)return!1;if(!o.current&&"changedTouches"in m&&(C||b)&&(o.current=E),!E)return!0;var j=o.current||E;return au(j,v,m,j==="h"?C:b)},[]),u=s.useCallback(function(m){var v=m;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in v?$o(v):Pt(v),x=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&iu(E.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(Bo).filter(Boolean).filter(function(E){return E.contains(v.target)}),b=C.length>0?c(v,C[0]):!i.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=s.useCallback(function(m,v,y,x){var C={name:m,delta:v,target:y,should:x,shadowParent:du(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),f=s.useCallback(function(m){n.current=Pt(m),o.current=void 0},[]),p=s.useCallback(function(m){d(m.type,$o(m),m.target,c(m,e.lockRef.current))},[]),h=s.useCallback(function(m){d(m.type,Pt(m),m.target,c(m,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ke),document.addEventListener("touchmove",u,Ke),document.addEventListener("touchstart",f,Ke),function(){Ue=Ue.filter(function(m){return m!==a}),document.removeEventListener("wheel",u,Ke),document.removeEventListener("touchmove",u,Ke),document.removeEventListener("touchstart",f,Ke)}},[]);var g=e.removeScrollBar,w=e.inert;return s.createElement(s.Fragment,null,w?s.createElement(a,{styles:cu(r)}):null,g?s.createElement(Jl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function du(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fu=Bl(Kr,uu);var vt=s.forwardRef(function(e,t){return s.createElement(Xt,ve({},e,{ref:t,sideCar:fu}))});vt.classNames=Xt.classNames;var pu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ge=new WeakMap,Tt=new WeakMap,Mt={},Pn=0,Xr=function(e){return e&&(e.host||Xr(e.parentNode))},mu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Xr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hu=function(e,t,n,o){var r=mu(t,Array.isArray(e)?e:[e]);Mt[n]||(Mt[n]=new WeakMap);var a=Mt[n],i=[],c=new Set,u=new Set(r),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(h){if(c.has(h))f(h);else try{var g=h.getAttribute(o),w=g!==null&&g!=="false",m=(Ge.get(h)||0)+1,v=(a.get(h)||0)+1;Ge.set(h,m),a.set(h,v),i.push(h),m===1&&w&&Tt.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),c.clear(),Pn++,function(){i.forEach(function(p){var h=Ge.get(p)-1,g=a.get(p)-1;Ge.set(p,h),a.set(p,g),h||(Tt.has(p)||p.removeAttribute(o),Tt.delete(p)),g||p.removeAttribute(n)}),Pn--,Pn||(Ge=new WeakMap,Ge=new WeakMap,Tt=new WeakMap,Mt={})}},qt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=pu(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),hu(o,r,n,"aria-hidden")):function(){return null}},Zt="Dialog",[qr]=pe(Zt),[vu,me]=qr(Zt),Zr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,f]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Zt});return l.jsx(vu,{scope:t,triggerRef:c,contentRef:u,contentId:ue(),titleId:ue(),descriptionId:ue(),open:d,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};Zr.displayName=Zt;var Qr="DialogTrigger",Jr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(Qr,n),a=H(t,r.triggerRef);return l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":to(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)})});Jr.displayName=Qr;var Jn="DialogPortal",[gu,es]=qr(Jn,{forceMount:void 0}),ts=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=me(Jn,t);return l.jsx(gu,{scope:t,forceMount:n,children:s.Children.map(o,i=>l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:i})}))})};ts.displayName=Jn;var jt="DialogOverlay",ns=s.forwardRef((e,t)=>{const n=es(jt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(jt,e.__scopeDialog);return a.modal?l.jsx(oe,{present:o||a.open,children:l.jsx(xu,{...r,ref:t})}):null});ns.displayName=jt;var wu=De("DialogOverlay.RemoveScroll"),xu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(jt,n);return l.jsx(vt,{as:wu,allowPinchZoom:!0,shards:[r.contentRef],children:l.jsx(k.div,{"data-state":to(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),je="DialogContent",os=s.forwardRef((e,t)=>{const n=es(je,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=me(je,e.__scopeDialog);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(yu,{...r,ref:t}):l.jsx(Cu,{...r,ref:t})})});os.displayName=je;var yu=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return qt(a)},[]),l.jsx(rs,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault())})}),Cu=s.forwardRef((e,t)=>{const n=me(je,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(rs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),rs=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...i}=e,c=me(je,n),u=s.useRef(null),d=H(t,u);return Yt(),l.jsxs(l.Fragment,{children:[l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":to(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Eu,{titleId:c.titleId}),l.jsx(Ru,{contentRef:u,descriptionId:c.descriptionId})]})]})}),eo="DialogTitle",ss=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(eo,n);return l.jsx(k.h2,{id:r.titleId,...o,ref:t})});ss.displayName=eo;var as="DialogDescription",bu=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(as,n);return l.jsx(k.p,{id:r.descriptionId,...o,ref:t})});bu.displayName=as;var is="DialogClose",cs=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=me(is,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});cs.displayName=is;function to(e){return e?"open":"closed"}var ls="DialogTitleWarning",[gv,us]=Hc(ls,{contentName:je,titleName:eo,docsSlug:"dialog"}),Eu=({titleId:e})=>{const t=us(ls),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ol="DialogDescriptionWarning",rl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Cr(ol).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},sl=lr,il=dr,al=pr,cl=mr,ll=hr,ul=gr,dl=yr;const fl="_dialogOverlay_1qzfk_1",pl="_dialogContent_1qzfk_20",ml="_dialogCloseButton_1qzfk_65",hl="_dialogTitle_1qzfk_72",rt={dialogOverlay:fl,dialogContent:pl,dialogCloseButton:ml,dialogTitle:hl},vl=["sm","md","lg"],gl=({trigger:e,children:t,title:n,size:o="md",...r})=>p.jsxs(sl,{...r,children:[p.jsx(il,{asChild:!0,children:e}),p.jsxs(al,{children:[p.jsx(cl,{className:`${rt.dialogOverlay}`}),p.jsxs(ll,{className:rt.dialogContent,"data-size":o,onPointerDownOutside:i=>{i?.preventDefault()},children:[p.jsx(dl,{asChild:!0,children:p.jsx(wt,{className:`${rt.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(cn,{})})}),p.jsx(ul,{className:rt.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:x}=m,y=k.useRef(null),b=k.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",d=je(c),l=k.forwardRef((m,g)=>{const{scope:x,children:y}=m,b=i(c,x),C=H(g,b.collectionRef);return p.jsx(d,{ref:C,children:y})});l.displayName=c;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=je(u),v=k.forwardRef((m,g)=>{const{scope:x,children:y,...b}=m,C=k.useRef(null),E=H(g,C),S=i(u,x);return k.useEffect(()=>(S.itemMap.set(C,{ref:C,...b}),()=>void S.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:E,children:y})});v.displayName=u;function w(m){const g=i(e+"CollectionConsumer",m);return k.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,R)=>b.indexOf(S.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,o]}var wl=s.createContext(void 0);function Er(e){const t=s.useContext(wl);return e||t||"ltr"}const xl=["top","right","bottom","left"],he=Math.min,G=Math.max,ft=Math.round,st=Math.floor,se=e=>({x:e,y:e}),yl={left:"right",right:"left",bottom:"top",top:"bottom"},bl={start:"end",end:"start"};function Yt(e,t,n){return G(e,he(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function Oe(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Cl=new Set(["top","bottom"]);function re(e){return Cl.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function El(e,t,n){n===void 0&&(n=!1);const o=Oe(e),r=yn(e),i=xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pt(a)),[a,pt(a)]}function Rl(e){const t=pt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>bl[t])}const Jn=["left","right"],eo=["right","left"],Sl=["top","bottom"],Tl=["bottom","top"];function Pl(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?Sl:Tl;default:return[]}}function Ml(e,t,n,o){const r=Oe(e);let i=Pl(ue(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(Xt)))),i}function pt(e){return e.replace(/left|right|bottom|top/g,t=>yl[t])}function _l(e){return{top:0,right:0,bottom:0,left:0,...e}}function Rr(e){return typeof e!="number"?_l(e):{top:e,right:e,bottom:e,left:e}}function mt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function to(e,t,n){let{reference:o,floating:r}=e;const i=re(t),a=yn(t),c=xn(a),d=ue(t),l=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(d){case"top":v={x:u,y:o.y-r.height};break;case"bottom":v={x:u,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(Oe(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Al=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=to(l,o,d),h=o,v={},w=0;for(let m=0;m<c.length;m++){const{name:g,fn:x}=c[m],{x:y,y:b,data:C,reset:E}=await x({x:u,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:l,platform:a,elements:{reference:e,floating:t}});u=y??u,f=b??f,v={...v,[g]:{...v[g],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(l=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=to(l,h,d)),m=-1)}return{x:u,y:f,placement:h,strategy:r,middlewareData:v}};async function Fe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:c,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=le(t,e),w=Rr(v),g=c[h?f==="floating"?"reference":"floating":f],x=mt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:d})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=mt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:b,strategy:d}):y);return{top:(x.top-E.top+w.top)/C.y,bottom:(E.bottom-x.bottom+w.bottom)/C.y,left:(x.left-E.left+w.left)/C.x,right:(E.right-x.right+w.right)/C.x}}const kl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:c,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=Rr(u),h={x:n,y:o},v=yn(r),w=xn(v),m=await a.getDimensions(l),g=v==="y",x=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[v]-h[v]-i.floating[w],E=h[v]-i.reference[v],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=S?S[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(S)))&&(R=c.floating[b]||i.floating[w]);const _=C/2-E/2,N=R/2-m[w]/2-1,D=he(f[x],N),L=he(f[y],N),W=D,F=R-m[w]-L,P=R/2-m[w]/2+_,$=Yt(W,P,F),O=!d.arrow&&Oe(r)!=null&&P!==$&&i.reference[w]/2-(P<W?D:L)-m[w]/2<0,B=O?P<W?P-W:P-F:0;return{[v]:h[v]+B,data:{[v]:$,centerOffset:P-$-B,...O&&{alignmentOffset:B}},reset:O}}}),Ol=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:c,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=le(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ue(r),y=re(c),b=ue(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(l.floating)),E=h||(b||!m?[pt(c)]:Rl(c)),S=w!=="none";!h&&S&&E.push(...Ml(c,m,w,C));const R=[c,...E],_=await Fe(t,g),N=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&N.push(_[x]),f){const P=El(r,a,C);N.push(_[P[0]],_[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var L,W;const P=(((L=i.flip)==null?void 0:L.index)||0)+1,$=R[P];if($&&(!(f==="alignment"?y!==re($):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let O=(W=D.filter(B=>B.overflows[0]<=0).sort((B,A)=>B.overflows[1]-A.overflows[1])[0])==null?void 0:W.placement;if(!O)switch(v){case"bestFit":{var F;const B=(F=D.filter(A=>{if(S){const T=re(A.placement);return T===y||T==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((A,T)=>A[1]-T[1])[0])==null?void 0:F[0];B&&(O=B);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function no(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return xl.some(t=>e[t]>=0)}const Dl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=le(e,t);switch(o){case"referenceHidden":{const i=await Fe(t,{...r,elementContext:"reference"}),a=no(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oo(a)}}}case"escaped":{const i=await Fe(t,{...r,altBoundary:!0}),a=no(i,n.floating);return{data:{escapedOffsets:a,escaped:oo(a)}}}default:return{}}}}},Sr=new Set(["left","top"]);async function Nl(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=ue(n),c=Oe(n),d=re(n)==="y",l=Sr.has(a)?-1:1,u=i&&d?-1:1,f=le(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(v=c==="end"?w*-1:w),d?{x:v*u,y:h*l}:{x:h*l,y:v*u}}const Il=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:c}=t,d=await Nl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:i+d.y,data:{...d,placement:a}}}}},Ll=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...d}=le(e,t),l={x:n,y:o},u=await Fe(t,d),f=re(ue(r)),h=wn(f);let v=l[h],w=l[f];if(i){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+u[g],b=v-u[x];v=Yt(y,v,b)}if(a){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+u[g],b=w-u[x];w=Yt(y,w,b)}const m=c.fn({...t,[h]:v,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:i,[f]:a}}}}}},jl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:o},f=re(r),h=wn(f);let v=u[h],w=u[f];const m=le(c,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const b=h==="y"?"height":"width",C=i.reference[h]-i.floating[b]+g.mainAxis,E=i.reference[h]+i.reference[b]-g.mainAxis;v<C?v=C:v>E&&(v=E)}if(l){var x,y;const b=h==="y"?"width":"height",C=Sr.has(ue(r)),E=i.reference[f]-i.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),S=i.reference[f]+i.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<E?w=E:w>S&&(w=S)}return{[h]:v,[f]:w}}}},Fl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:c}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),h=Oe(r),v=re(r)==="y",{width:w,height:m}=i.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,b=w-u.left-u.right,C=he(m-u[g],y),E=he(w-u[x],b),S=!t.middlewareData.shift;let R=C,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),S&&!h){const D=G(u.left,0),L=G(u.right,0),W=G(u.top,0),F=G(u.bottom,0);v?_=w-2*(D!==0||L!==0?D+L:G(u.left,u.right)):R=m-2*(W!==0||F!==0?W+F:G(u.top,u.bottom))}await d({...t,availableWidth:_,availableHeight:R});const N=await a.getDimensions(c.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Et(){return typeof window<"u"}function De(e){return Tr(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Tr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tr(e){return Et()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return Et()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return Et()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!Et()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const $l=new Set(["inline","contents"]);function Ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!$l.has(r)}const Bl=new Set(["table","td","th"]);function Wl(e){return Bl.has(De(e))}const Hl=[":popover-open",":modal"];function Rt(e){return Hl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vl=["transform","translate","scale","rotate","perspective"],Kl=["transform","translate","scale","rotate","perspective","filter"],Ul=["paint","layout","strict","content"];function bn(e){const t=Cn(),n=J(e)?ee(e):e;return Vl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Kl.some(o=>(n.willChange||"").includes(o))||Ul.some(o=>(n.contain||"").includes(o))}function Gl(e){let t=ve(e);for(;ie(t)&&!_e(t);){if(bn(t))return t;if(Rt(t))return null;t=ve(t)}return null}function Cn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zl=new Set(["html","body","#document"]);function _e(e){return zl.has(De(e))}function ee(e){return z(e).getComputedStyle(e)}function St(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(De(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ae(e);return ro(t)?t.host:t}function Pr(e){const t=ve(e);return _e(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ue(t)?t:Pr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Pr(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=z(r);if(i){const c=qt(a);return t.concat(a,a.visualViewport||[],Ue(r)?r:[],c&&n?$e(c):[])}return t.concat(r,$e(r,[],n))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=ft(n)!==i||ft(o)!==a;return c&&(n=i,o=a),{width:n,height:o,$:c}}function En(e){return J(e)?e:e.contextElement}function Me(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Mr(t);let a=(i?ft(n.width):n.width)/o,c=(i?ft(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Yl=se(0);function _r(e){const t=z(e);return!Cn()||!t.visualViewport?Yl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=En(e);let a=se(1);t&&(o?J(o)&&(a=Me(o)):a=Me(e));const c=Xl(i,n,o)?_r(i):se(0);let d=(r.left+c.x)/a.x,l=(r.top+c.y)/a.y,u=r.width/a.x,f=r.height/a.y;if(i){const h=z(i),v=o&&J(o)?z(o):o;let w=h,m=qt(w);for(;m&&o&&v!==w;){const g=Me(m),x=m.getBoundingClientRect(),y=ee(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,C=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=b,l+=C,w=z(m),m=qt(w)}}return mt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=St(e).scrollLeft;return t?t.left+n:ye(ae(e)).left+n}function Ar(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function ql(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),c=t?Rt(t.floating):!1;if(o===a||c&&i)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!i)&&((De(o)!=="body"||Ue(a))&&(d=St(o)),ie(o))){const v=ye(o);l=Me(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}const h=a&&!f&&!i?Ar(a,d):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-d.scrollTop*l.y+u.y+h.y}}function Zl(e){return Array.from(e.getClientRects())}function Ql(e){const t=ae(e),n=St(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Tt(e);const c=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:c}}const so=25;function Jl(e,t){const n=z(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,c=0,d=0;if(r){i=r.width,a=r.height;const u=Cn();(!u||u&&t==="fixed")&&(c=r.offsetLeft,d=r.offsetTop)}const l=Tt(o);if(l<=0){const u=o.ownerDocument,f=u.body,h=getComputedStyle(f),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-v);w<=so&&(i-=w)}else l<=so&&(i+=l);return{width:i,height:a,x:c,y:d}}const eu=new Set(["absolute","fixed"]);function tu(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ie(e)?Me(e):se(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,d=r*i.x,l=o*i.y;return{width:a,height:c,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=Jl(e,n);else if(t==="document")o=Ql(ae(e));else if(J(t))o=tu(t,n);else{const r=_r(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function kr(e,t){const n=ve(e);return n===t||!J(n)||_e(n)?!1:ee(n).position==="fixed"||kr(n,t)}function nu(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(c=>J(c)&&De(c)!=="body"),r=null;const i=ee(e).position==="fixed";let a=i?ve(e):e;for(;J(a)&&!_e(a);){const c=ee(a),d=bn(a);!d&&c.position==="fixed"&&(r=null),(i?!d&&!r:!d&&c.position==="static"&&!!r&&eu.has(r.position)||Ue(a)&&!d&&kr(e,a))?o=o.filter(u=>u!==a):r=c,a=ve(a)}return t.set(e,o),o}function ou(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Rt(t)?[]:nu(t,this._c):[].concat(n),o],c=a[0],d=a.reduce((l,u)=>{const f=io(t,u,r);return l.top=G(f.top,l.top),l.right=he(f.right,l.right),l.bottom=he(f.bottom,l.bottom),l.left=G(f.left,l.left),l},io(t,c,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ru(e){const{width:t,height:n}=Mr(e);return{width:t,height:n}}function su(e,t,n){const o=ie(t),r=ae(t),i=n==="fixed",a=ye(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!i)if((De(t)!=="body"||Ue(r))&&(c=St(t)),o){const v=ye(t,!0,i,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=r&&!o&&!i?Ar(r,c):se(0),f=a.left+c.scrollLeft-d.x-u.x,h=a.top+c.scrollTop-d.y-u.y;return{x:f,y:h,width:a.width,height:a.height}}function Ht(e){return ee(e).position==="static"}function ao(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Or(e,t){const n=z(e);if(Rt(e))return n;if(!ie(e)){let r=ve(e);for(;r&&!_e(r);){if(J(r)&&!Ht(r))return r;r=ve(r)}return n}let o=ao(e,t);for(;o&&Wl(o)&&Ht(o);)o=ao(o,t);return o&&_e(o)&&Ht(o)&&!bn(o)?n:o||Gl(e)||n}const iu=async function(e){const t=this.getOffsetParent||Or,n=this.getDimensions,o=await n(e.floating);return{reference:su(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function au(e){return ee(e).direction==="rtl"}const cu={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:ae,getClippingRect:ou,getOffsetParent:Or,getElementRects:iu,getClientRects:Zl,getDimensions:ru,getScale:Me,isElement:J,isRTL:au};function Dr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lu(e,t){let n=null,o;const r=ae(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:v}=l;if(c||t(),!h||!v)return;const w=st(f),m=st(r.clientWidth-(u+h)),g=st(r.clientHeight-(f+v)),x=st(u),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,he(1,d))||1};let C=!0;function E(S){const R=S[0].intersectionRatio;if(R!==d){if(!C)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Dr(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(E,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return a(!0),i}function uu(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||i?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=l&&c?lu(l,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),l&&!d&&v.observe(l),v.observe(t));let w,m=d?ye(e):null;d&&g();function g(){const x=ye(e);m&&!Dr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const du=Il,fu=Ll,pu=Ol,mu=Fl,hu=Dl,co=kl,vu=jl,gu=(e,t,n)=>{const o=new Map,r={platform:cu,...n},i={...r.platform,_c:o};return Al(e,t,{...r,platform:i})};var wu=typeof document<"u",xu=function(){},lt=wu?k.useLayoutEffect:xu;function ht(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!ht(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!ht(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Nr(e);return Math.round(t*n)/n}function Vt(e){const t=s.useRef(e);return lt(()=>{t.current=e}),t}function yu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:d,open:l}=e,[u,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=s.useState(o);ht(h,o)||v(o);const[w,m]=s.useState(null),[g,x]=s.useState(null),y=s.useCallback(A=>{A!==S.current&&(S.current=A,m(A))},[]),b=s.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),C=i||w,E=a||g,S=s.useRef(null),R=s.useRef(null),_=s.useRef(u),N=d!=null,D=Vt(d),L=Vt(r),W=Vt(l),F=s.useCallback(()=>{if(!S.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),gu(S.current,R.current,A).then(T=>{const V={...T,isPositioned:W.current!==!1};P.current&&!ht(_.current,V)&&(_.current=V,sn.flushSync(()=>{f(V)}))})},[h,t,n,L,W]);lt(()=>{l===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=s.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(C&&(S.current=C),E&&(R.current=E),C&&E){if(D.current)return D.current(C,E,F);F()}},[C,E,F,D,N]);const $=s.useMemo(()=>({reference:S,floating:R,setReference:y,setFloating:b}),[y,b]),O=s.useMemo(()=>({reference:C,floating:E}),[C,E]),B=s.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const T=lo(O.floating,u.x),V=lo(O.floating,u.y);return c?{...A,transform:"translate("+T+"px, "+V+"px)",...Nr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:V}},[n,c,O.floating,u.x,u.y]);return s.useMemo(()=>({...u,update:F,refs:$,elements:O,floatingStyles:B}),[u,F,$,O,B])}const bu=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?co({element:o.current,padding:r}).fn(n):{}:o?co({element:o,padding:r}).fn(n):{}}}},Cu=(e,t)=>({...du(e),options:[e,t]}),Eu=(e,t)=>({...fu(e),options:[e,t]}),Ru=(e,t)=>({...vu(e),options:[e,t]}),Su=(e,t)=>({...pu(e),options:[e,t]}),Tu=(e,t)=>({...mu(e),options:[e,t]}),Pu=(e,t)=>({...hu(e),options:[e,t]}),Mu=(e,t)=>({...bu(e),options:[e,t]});var _u="Arrow",Ir=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return p.jsx(I.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ir.displayName=_u;var Au=Ir,Rn="Popper",[Lr,Pt]=de(Rn),[ku,jr]=Lr(Rn),Fr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return p.jsx(ku,{scope:t,anchor:o,onAnchorChange:r,children:n})};Fr.displayName=Rn;var $r="PopperAnchor",Br=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=jr($r,n),a=s.useRef(null),c=H(t,a),d=s.useRef(null);return s.useEffect(()=>{const l=d.current;d.current=o?.current||a.current,l!==d.current&&i.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Br.displayName=$r;var Sn="PopperContent",[Ou,Du]=Lr(Sn),Wr=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:w,...m}=e,g=jr(Sn,n),[x,y]=s.useState(null),b=H(t,K=>y(K)),[C,E]=s.useState(null),S=Fo(C),R=S?.width??0,_=S?.height??0,N=o+(i!=="center"?"-"+i:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(l)?l:[l],W=L.length>0,F={padding:D,boundary:L.filter(Iu),altBoundary:W},{refs:P,floatingStyles:$,placement:O,isPositioned:B,middlewareData:A}=yu({strategy:"fixed",placement:N,whileElementsMounted:(...K)=>uu(...K,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Cu({mainAxis:r+_,alignmentAxis:a}),d&&Eu({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ru():void 0,...F}),d&&Su({...F}),Tu({...F,apply:({elements:K,rects:Ne,availableWidth:oi,availableHeight:ri})=>{const{width:si,height:ii}=Ne.reference,Qe=K.floating.style;Qe.setProperty("--radix-popper-available-width",`${oi}px`),Qe.setProperty("--radix-popper-available-height",`${ri}px`),Qe.setProperty("--radix-popper-anchor-width",`${si}px`),Qe.setProperty("--radix-popper-anchor-height",`${ii}px`)}}),C&&Mu({element:C,padding:c}),Lu({arrowWidth:R,arrowHeight:_}),h&&Pu({strategy:"referenceHidden",...F})]}),[T,V]=Kr(O),X=Y(w);ce(()=>{B&&X?.()},[B,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Ze,ge]=s.useState();return ce(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ze,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ou,{scope:n,placedSide:T,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":T,"data-align":V,...m,ref:b,style:{...m.style,animation:B?void 0:"none"}})})})});Wr.displayName=Sn;var Hr="PopperArrow",Nu={top:"bottom",right:"left",bottom:"top",left:"right"},Vr=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Du(Hr,o),a=Nu[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(Au,{...r,ref:n,style:{...r.style,display:"block"}})})});Vr.displayName=Hr;function Iu(e){return e!==null}var Lu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[l,u]=Kr(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+d/2;let w="",m="";return l==="bottom"?(w=a?f:`${h}px`,m=`${-d}px`):l==="top"?(w=a?f:`${h}px`,m=`${o.floating.height+d}px`):l==="right"?(w=`${-d}px`,m=a?f:`${v}px`):l==="left"&&(w=`${o.floating.width+d}px`,m=a?f:`${v}px`),{data:{x:w,y:m}}}});function Kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ur=Fr,Gr=Br,zr=Wr,Yr=Vr,Kt="rovingFocusGroup.onEntryFocus",ju={bubbles:!1,cancelable:!0},Ge="RovingFocusGroup",[Zt,Xr,Fu]=gn(Ge),[$u,qr]=de(Ge,[Fu]),[Bu,Wu]=$u(Ge),Zr=s.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Hu,{...e,ref:t})})}));Zr.displayName=Ge;var Hu=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=s.useRef(null),v=H(t,h),w=Er(i),[m,g]=ke({prop:a,defaultProp:c??null,onChange:d,caller:Ge}),[x,y]=s.useState(!1),b=Y(l),C=Xr(n),E=s.useRef(!1),[S,R]=s.useState(0);return s.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(Kt,b),()=>_.removeEventListener(Kt,b)},[b]),p.jsx(Bu,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(_=>g(_),[g]),onItemShiftTab:s.useCallback(()=>y(!0),[]),onFocusableItemAdd:s.useCallback(()=>R(_=>_+1),[]),onFocusableItemRemove:s.useCallback(()=>R(_=>_-1),[]),children:p.jsx(I.div,{tabIndex:x||S===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{E.current=!0}),onFocus:M(e.onFocus,_=>{const N=!E.current;if(_.target===_.currentTarget&&N&&!x){const D=new CustomEvent(Kt,ju);if(_.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=C().filter(O=>O.focusable),W=L.find(O=>O.active),F=L.find(O=>O.id===m),$=[W,F,...L].filter(Boolean).map(O=>O.ref.current);es($,u)}}E.current=!1}),onBlur:M(e.onBlur,()=>y(!1))})})}),Qr="RovingFocusGroupItem",Jr=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:i,children:a,...c}=e,d=we(),l=i||d,u=Wu(Qr,n),f=u.currentTabStopId===l,h=Xr(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=u;return s.useEffect(()=>{if(o)return v(),()=>w()},[o,v,w]),p.jsx(Zt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:M(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:M(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:M(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=Uu(g,u.orientation,u.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=u.loop?Gu(b,C+1):b.slice(C+1)}setTimeout(()=>es(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Jr.displayName=Qr;var Vu={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ku(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Uu(e,t,n){const o=Ku(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Vu[o]}function es(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Gu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var zu=Zr,Yu=Jr,Qt=["Enter"," "],Xu=["ArrowDown","PageUp","Home"],ts=["ArrowUp","PageDown","End"],qu=[...Xu,...ts],Zu={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},Qu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ze="Menu",[Be,Ju,ed]=gn(ze),[be,ns]=de(ze,[ed,Pt,qr]),Mt=Pt(),os=qr(),[td,Ce]=be(ze),[nd,Ye]=be(ze),rs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:i,modal:a=!0}=e,c=Mt(t),[d,l]=s.useState(null),u=s.useRef(!1),f=Y(i),h=Er(r);return s.useEffect(()=>{const v=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Ur,{...c,children:p.jsx(td,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(nd,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:a,children:o})})})};rs.displayName=ze;var od="MenuAnchor",Tn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Mt(n);return p.jsx(Gr,{...r,...o,ref:t})});Tn.displayName=od;var Pn="MenuPortal",[rd,ss]=be(Pn,{forceMount:void 0}),is=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,i=Ce(Pn,t);return p.jsx(rd,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||i.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};is.displayName=Pn;var q="MenuContent",[sd,Mn]=be(q),as=s.forwardRef((e,t)=>{const n=ss(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,i=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||i.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(id,{...r,ref:t}):p.jsx(ad,{...r,ref:t})})})})}),id=s.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const i=o.current;if(i)return ar(i)},[]),p.jsx(_n,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ad=s.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu);return p.jsx(_n,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cd=je("MenuContent.ScrollLock"),_n=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:w,...m}=e,g=Ce(q,n),x=Ye(q,n),y=Mt(n),b=os(n),C=Ju(n),[E,S]=s.useState(null),R=s.useRef(null),_=H(t,R,g.onContentChange),N=s.useRef(0),D=s.useRef(""),L=s.useRef(0),W=s.useRef(null),F=s.useRef("right"),P=s.useRef(0),$=w?pn:s.Fragment,O=w?{as:cd,allowPinchZoom:!0}:void 0,B=T=>{const V=D.current+T,X=C().filter(K=>!K.disabled),Q=document.activeElement,ne=X.find(K=>K.ref.current===Q)?.textValue,fe=X.map(K=>K.textValue),Ze=yd(fe,V,ne),ge=X.find(K=>K.textValue===Ze)?.ref.current;(function K(Ne){D.current=Ne,window.clearTimeout(N.current),Ne!==""&&(N.current=window.setTimeout(()=>K(""),1e3))})(V),ge&&setTimeout(()=>ge.focus())};s.useEffect(()=>()=>window.clearTimeout(N.current),[]),Qo();const A=s.useCallback(T=>F.current===W.current?.side&&Cd(T,W.current?.area),[]);return p.jsx(sd,{scope:n,searchRef:D,onItemEnter:s.useCallback(T=>{A(T)&&T.preventDefault()},[A]),onItemLeave:s.useCallback(T=>{A(T)||(R.current?.focus(),S(null))},[A]),onTriggerLeave:s.useCallback(T=>{A(T)&&T.preventDefault()},[A]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback(T=>{W.current=T},[]),children:p.jsx($,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:M(i,T=>{T.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(zu,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:M(d,T=>{x.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(zr,{role:"menu","aria-orientation":"vertical","data-state":Es(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:_,style:{outline:"none",...m.style},onKeyDown:M(m.onKeyDown,T=>{const X=T.target.closest("[data-radix-menu-content]")===T.currentTarget,Q=T.ctrlKey||T.altKey||T.metaKey,ne=T.key.length===1;X&&(T.key==="Tab"&&T.preventDefault(),!Q&&ne&&B(T.key));const fe=R.current;if(T.target!==fe||!qu.includes(T.key))return;T.preventDefault();const ge=C().filter(K=>!K.disabled).map(K=>K.ref.current);ts.includes(T.key)&&ge.reverse(),wd(ge)}),onBlur:M(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:M(e.onPointerMove,We(T=>{const V=T.target,X=P.current!==T.clientX;if(T.currentTarget.contains(V)&&X){const Q=T.clientX>P.current?"right":"left";F.current=Q,P.current=T.clientX}}))})})})})})})});as.displayName=q;var ld="MenuGroup",An=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=ld;var ud="MenuLabel",cs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});cs.displayName=ud;var vt="MenuItem",uo="menu.itemSelect",_t=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,i=s.useRef(null),a=Ye(vt,e.__scopeMenu),c=Mn(vt,e.__scopeMenu),d=H(t,i),l=s.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(uo,{bubbles:!0,cancelable:!0});f.addEventListener(uo,v=>o?.(v),{once:!0}),un(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return p.jsx(ls,{...r,ref:d,disabled:n,onClick:M(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:M(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=vt;var ls=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...i}=e,a=Mn(vt,n),c=os(n),d=s.useRef(null),l=H(t,d),[u,f]=s.useState(!1),[h,v]=s.useState("");return s.useEffect(()=>{const w=d.current;w&&v((w.textContent??"").trim())},[i.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(Yu,{asChild:!0,...c,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:l,onPointerMove:M(e.onPointerMove,We(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,We(w=>a.onItemLeave(w))),onFocus:M(e.onFocus,()=>f(!0)),onBlur:M(e.onBlur,()=>f(!1))})})})}),dd="MenuCheckboxItem",us=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(hs,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":On(n),onSelect:M(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});us.displayName=dd;var ds="MenuRadioGroup",[fd,pd]=be(ds,{value:void 0,onValueChange:()=>{}}),fs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,i=Y(o);return p.jsx(fd,{scope:e.__scopeMenu,value:n,onValueChange:i,children:p.jsx(An,{...r,ref:t})})});fs.displayName=ds;var ps="MenuRadioItem",ms=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=pd(ps,e.__scopeMenu),i=n===r.value;return p.jsx(hs,{scope:e.__scopeMenu,checked:i,children:p.jsx(_t,{role:"menuitemradio","aria-checked":i,...o,ref:t,"data-state":On(i),onSelect:M(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ms.displayName=ps;var kn="MenuItemIndicator",[hs,md]=be(kn,{checked:!1}),vs=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,i=md(kn,n);return p.jsx(Z,{present:o||gt(i.checked)||i.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":On(i.checked)})})});vs.displayName=kn;var hd="MenuSeparator",gs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});gs.displayName=hd;var vd="MenuArrow",ws=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Mt(n);return p.jsx(Yr,{...r,...o,ref:t})});ws.displayName=vd;var gd="MenuSub",[Rp,xs]=be(gd),Le="MenuSubTrigger",ys=s.forwardRef((e,t)=>{const n=Ce(Le,e.__scopeMenu),o=Ye(Le,e.__scopeMenu),r=xs(Le,e.__scopeMenu),i=Mn(Le,e.__scopeMenu),a=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=i,l={__scopeMenu:e.__scopeMenu},u=s.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return s.useEffect(()=>u,[u]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),p.jsx(Tn,{asChild:!0,...l,children:p.jsx(ls,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Es(n.open),...e,ref:xt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,We(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:M(e.onPointerLeave,We(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,w=v==="right",m=w?-5:5,g=h[w?"left":"right"],x=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,f=>{const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||Zu[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ys.displayName=Le;var bs="MenuSubContent",Cs=s.forwardRef((e,t)=>{const n=ss(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,i=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu),c=xs(bs,e.__scopeMenu),d=s.useRef(null),l=H(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||i.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(_n,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{a.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:M(e.onFocusOutside,u=>{u.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:M(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=Qu[a.dir].includes(u.key);f&&h&&(i.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});Cs.displayName=bs;function Es(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function On(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function wd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xd(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function yd(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=xd(e,Math.max(i,0));r.length===1&&(a=a.filter(l=>l!==n));const d=a.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function bd(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function Cd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bd(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ed=rs,Rd=Tn,Sd=is,Td=as,Pd=An,Md=cs,_d=_t,Ad=us,kd=fs,Od=ms,Dd=vs,Nd=gs,Id=ws,Ld=ys,jd=Cs,At="DropdownMenu",[Fd]=de(At,[ns]),U=ns(),[$d,Rs]=Fd(At),Ss=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,d=U(t),l=s.useRef(null),[u,f]=ke({prop:r,defaultProp:i??!1,onChange:a,caller:At});return p.jsx($d,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(Ed,{...d,open:u,onOpenChange:f,dir:o,modal:c,children:n})})};Ss.displayName=At;var Ts="DropdownMenuTrigger",Ps=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,i=Rs(Ts,n),a=U(n);return p.jsx(Rd,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:xt(t,i.triggerRef),onPointerDown:M(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:M(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Ps.displayName=Ts;var Bd="DropdownMenuPortal",Ms=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx(Sd,{...o,...n})};Ms.displayName=Bd;var _s="DropdownMenuContent",As=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Rs(_s,n),i=U(n),a=s.useRef(!1);return p.jsx(Td,{id:r.contentId,"aria-labelledby":r.triggerId,...i,...o,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:M(e.onInteractOutside,c=>{const d=c.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});As.displayName=_s;var Wd="DropdownMenuGroup",Hd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Pd,{...r,...o,ref:t})});Hd.displayName=Wd;var Vd="DropdownMenuLabel",Kd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Md,{...r,...o,ref:t})});Kd.displayName=Vd;var Ud="DropdownMenuItem",ks=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(_d,{...r,...o,ref:t})});ks.displayName=Ud;var Gd="DropdownMenuCheckboxItem",zd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ad,{...r,...o,ref:t})});zd.displayName=Gd;var Yd="DropdownMenuRadioGroup",Xd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(kd,{...r,...o,ref:t})});Xd.displayName=Yd;var qd="DropdownMenuRadioItem",Zd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Od,{...r,...o,ref:t})});Zd.displayName=qd;var Qd="DropdownMenuItemIndicator",Jd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Dd,{...r,...o,ref:t})});Jd.displayName=Qd;var ef="DropdownMenuSeparator",tf=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Nd,{...r,...o,ref:t})});tf.displayName=ef;var nf="DropdownMenuArrow",Os=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Id,{...r,...o,ref:t})});Os.displayName=nf;var of="DropdownMenuSubTrigger",rf=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ld,{...r,...o,ref:t})});rf.displayName=of;var sf="DropdownMenuSubContent",af=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(jd,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});af.displayName=sf;var cf=Ss,lf=Ps,uf=Ms,df=As,ff=ks,pf=Os;const mf="_menuButtonContent_zvwim_1",hf="_menuButtonItem_zvwim_13",vf="_menuButtonArrow_zvwim_41",Jt={menuButtonContent:mf,menuButtonItem:hf,menuButtonArrow:vf},gf=({children:e,trigger:t,...n})=>p.jsxs(cf,{modal:!1,...n,children:[p.jsx(lf,{asChild:!0,children:t}),p.jsx(uf,{children:p.jsxs(df,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(pf,{className:Jt.menuButtonArrow})]})})]}),wf=({children:e,icon:t,...n})=>{const o=t?ut[t]:void 0;return p.jsxs(ff,{className:Jt.menuButtonItem,...n,children:[o&&p.jsx(o,{size:"md",className:"text-color-secondary"}),p.jsx("label",{className:"label-3 text-color-secondary",children:e})]})};var xf=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"}),yf="VisuallyHidden",kt=s.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...xf,...e.style}}));kt.displayName=yf;var bf=kt,Dn="ToastProvider",[Nn,Cf,Ef]=gn("Toast"),[Ds]=de("Toast",[Ef]),[Rf,Ot]=Ds(Dn),Ns=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:i=50,children:a}=e,[c,d]=s.useState(null),[l,u]=s.useState(0),f=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Dn}\`. Expected non-empty \`string\`.`),p.jsx(Nn.Provider,{scope:t,children:p.jsx(Rf,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:i,toastCount:l,viewport:c,onViewportChange:d,onToastAdd:s.useCallback(()=>u(v=>v+1),[]),onToastRemove:s.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};Ns.displayName=Dn;var Is="ToastViewport",Sf=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ls=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Sf,label:r="Notifications ({hotkey})",...i}=e,a=Ot(Is,n),c=Cf(n),d=s.useRef(null),l=s.useRef(null),u=s.useRef(null),f=s.useRef(null),h=H(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;s.useEffect(()=>{const g=x=>{o.length!==0&&o.every(b=>x[b]||x.code===b)&&f.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),s.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(en);x.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(tn);x.dispatchEvent(S),a.isClosePausedRef.current=!1}},C=S=>{!g.contains(S.relatedTarget)&&b()},E=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",y),g.addEventListener("focusout",C),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",C),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[w,a.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:g})=>{const y=c().map(b=>{const C=b.ref.current,E=[C,...Ff(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[c]);return s.useEffect(()=>{const g=f.current;if(g){const x=y=>{const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const E=document.activeElement,S=y.shiftKey;if(y.target===g&&S){l.current?.focus();return}const N=m({tabbingDirection:S?"backwards":"forwards"}),D=N.findIndex(L=>L===E);Ut(N.slice(D+1))?y.preventDefault():S?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),p.jsxs(tc,{ref:d,role:"region","aria-label":r.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(nn,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Ut(g)}}),p.jsx(Nn.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...i,ref:h})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Ut(g)}})]})});Ls.displayName=Is;var js="ToastFocusProxy",nn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,i=Ot(js,n);return p.jsx(kt,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!i.viewport?.contains(c)&&o()}})});nn.displayName=js;var Xe="Toast",Tf="toast.swipeStart",Pf="toast.swipeMove",Mf="toast.swipeCancel",_f="toast.swipeEnd",Fs=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:i,...a}=e,[c,d]=ke({prop:o,defaultProp:r??!0,onChange:i,caller:Xe});return p.jsx(Z,{present:n||c,children:p.jsx(Of,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:M(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:M(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:M(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:M(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Fs.displayName=Xe;var[Af,kf]=Ds(Xe,{onClose(){}}),Of=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:i,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...w}=e,m=Ot(Xe,n),[g,x]=s.useState(null),y=H(t,P=>x(P)),b=s.useRef(null),C=s.useRef(null),E=r||m.duration,S=s.useRef(0),R=s.useRef(E),_=s.useRef(0),{onToastAdd:N,onToastRemove:D}=m,L=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),W=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(_.current),S.current=new Date().getTime(),_.current=window.setTimeout(L,P))},[L]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{W(R.current),l?.()},O=()=>{const B=new Date().getTime()-S.current;R.current=R.current-B,window.clearTimeout(_.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,$),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,$)}}},[m.viewport,E,d,l,W]),s.useEffect(()=>{i&&!m.isClosePausedRef.current&&W(E)},[i,E,m.isClosePausedRef,W]),s.useEffect(()=>(N(),()=>D()),[N,D]);const F=s.useMemo(()=>g?Us(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[F&&p.jsx(Df,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:F}),p.jsx(Af,{scope:n,onClose:L,children:sn.createPortal(p.jsx(Nn.ItemSlot,{scope:n,children:p.jsx(ec,{asChild:!0,onEscapeKeyDown:M(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:M(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:M(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:M(e.onPointerMove,P=>{if(!b.current)return;const $=P.clientX-b.current.x,O=P.clientY-b.current.y,B=!!C.current,A=["left","right"].includes(m.swipeDirection),T=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,V=A?T(0,$):0,X=A?0:T(0,O),Q=P.pointerType==="touch"?10:2,ne={x:V,y:X},fe={originalEvent:P,delta:ne};B?(C.current=ne,it(Pf,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(C.current=ne,it(Tf,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Q||Math.abs(O)>Q)&&(b.current=null)}),onPointerUp:M(e.onPointerUp,P=>{const $=C.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),C.current=null,b.current=null,$){const B=P.currentTarget,A={originalEvent:P,delta:$};fo($,m.swipeDirection,m.swipeThreshold)?it(_f,v,A,{discrete:!0}):it(Mf,h,A,{discrete:!0}),B.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Df=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(Xe,t),[i,a]=s.useState(!1),[c,d]=s.useState(!1);return Lf(()=>a(!0)),s.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),c?null:p.jsx(Ke,{asChild:!0,children:p.jsx(kt,{...o,children:i&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},Nf="ToastTitle",$s=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});$s.displayName=Nf;var If="ToastDescription",Bs=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Bs.displayName=If;var Ws="ToastAction",Hs=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(Ks,{altText:n,asChild:!0,children:p.jsx(In,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ws}\`. Expected non-empty \`string\`.`),null)});Hs.displayName=Ws;var Vs="ToastClose",In=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=kf(Vs,n);return p.jsx(Ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:M(e.onClick,r.onClose)})})});In.displayName=Vs;var Ks=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return p.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Us(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),jf(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",i=o.dataset.radixToastAnnounceExclude==="";if(!r)if(i){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Us(o))}}),t}function it(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),i=o>r;return t==="left"||t==="right"?i&&o>n:!i&&r>n};function Lf(e=()=>{}){const t=Y(e);ce(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function jf(e){return e.nodeType===e.ELEMENT_NODE}function Ff(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ut(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $f=Ns,Bf=Ls,Wf=Fs,Hf=$s,Vf=Bs,Kf=Hs,Uf=In;const Gf="_toast_1ga0s_1",zf="_toastContent_1ga0s_12",Yf="_toastViewport_1ga0s_70",Xf="_toastTitle_1ga0s_89",qf="_toastDescription_1ga0s_95",Te={toast:Gf,toastContent:zf,toastViewport:Yf,toastTitle:Xf,toastDescription:qf},Zf=({...e})=>p.jsx($f,{...e}),Gs=k.forwardRef(({...e},t)=>p.jsx(Bf,{className:Te.toastViewport,ref:t,...e}));Gs.displayName="ToastViewport";const zs=k.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs(Wf,{className:Te.toast,ref:r,...o,children:[p.jsxs("div",{className:Te.toastContent,children:[p.jsx(Hf,{className:Te.toastTitle,children:e}),t&&p.jsx(Vf,{className:Te.toastDescription,children:t})]}),n&&p.jsx(Kf,{className:Te.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(Uf,{asChild:!0,children:p.jsx(wt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));zs.displayName="Toast";var[Dt]=de("Tooltip",[Pt]),Nt=Pt(),Ys="TooltipProvider",Qf=700,on="tooltip.open",[Jf,Ln]=Dt(Ys),Xs=e=>{const{__scopeTooltip:t,delayDuration:n=Qf,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,a=s.useRef(!0),c=s.useRef(!1),d=s.useRef(0);return s.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(Jf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:i})};Xs.displayName=Ys;var He="Tooltip",[ep,qe]=Dt(He),qs=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=s.useState(null),h=we(),v=s.useRef(0),w=a??d.disableHoverableContent,m=c??d.delayDuration,g=s.useRef(!1),[x,y]=ke({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),i?.(R)},caller:He}),b=s.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),E=s.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),S=s.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return s.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Ur,{...l,children:p.jsx(ep,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{d.isOpenDelayedRef.current?S():C()},[d.isOpenDelayedRef,S,C]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(v.current),v.current=0)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:n})})};qs.displayName=He;var rn="TooltipTrigger",Zs=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=qe(rn,n),i=Ln(rn,n),a=Nt(n),c=s.useRef(null),d=H(t,c,r.onTriggerChange),l=s.useRef(!1),u=s.useRef(!1),f=s.useCallback(()=>l.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(Gr,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:M(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:M(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:M(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:M(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:M(e.onBlur,r.onClose),onClick:M(e.onClick,r.onClose)})})});Zs.displayName=rn;var jn="TooltipPortal",[tp,np]=Dt(jn,{forceMount:void 0}),Qs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=qe(jn,t);return p.jsx(tp,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||i.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Qs.displayName=jn;var Ae="TooltipContent",Js=s.forwardRef((e,t)=>{const n=np(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=qe(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(ei,{side:r,...i,ref:t}):p.jsx(op,{side:r,...i,ref:t})})}),op=s.forwardRef((e,t)=>{const n=qe(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=s.useRef(null),i=H(t,r),[a,c]=s.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,h=s.useCallback(()=>{c(null),f(!1)},[f]),v=s.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=ap(x,g.getBoundingClientRect()),b=cp(x,y),C=lp(m.getBoundingClientRect()),E=dp([...b,...C]);c(E),f(!0)},[f]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(d&&u){const w=g=>v(g,u),m=g=>v(g,d);return d.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[d,u,v,h]),s.useEffect(()=>{if(a){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=d?.contains(g)||u?.contains(g),b=!up(x,a);y?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,a,l,h]),p.jsx(ei,{...e,ref:i})}),[rp,sp]=Dt(He,{isInside:!1}),ip=Aa("TooltipContent"),ei=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,d=qe(Ae,n),l=Nt(n),{onClose:u}=d;return s.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),s.useEffect(()=>{if(d.trigger){const f=h=>{h.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),p.jsx(Ve,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(zr,{"data-state":d.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(ip,{children:o}),p.jsx(rp,{scope:n,isInside:!0,children:p.jsx(bf,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Js.displayName=Ae;var ti="TooltipArrow",ni=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return sp(ti,n).isInside?null:p.jsx(Yr,{...r,...o,ref:t})});ni.displayName=ti;function ap(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function cp(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function lp(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function up(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],d=t[a],l=c.x,u=c.y,f=d.x,h=d.y;u>o!=h>o&&n<(f-l)*(o-u)/(h-u)+l&&(r=!r)}return r}function dp(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),fp(t)}function fp(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pp=Xs,mp=qs,hp=Zs,vp=Qs,gp=Js,wp=ni;const xp="_tooltipContent_17t5h_1",yp="_tooltipArrow_17t5h_12",po={tooltipContent:xp,tooltipArrow:yp},bp=({...e})=>p.jsx(pp,{...e});function Cp({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...i}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(mp,{open:n,defaultOpen:o,onOpenChange:a=>{r?.(a)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(hp,{asChild:!0,children:e}),p.jsx(vp,{children:p.jsxs(gp,{className:po.tooltipContent,...i,sideOffset:4,children:[t,p.jsx(wp,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=vo;exports.ArrowRight=go;exports.Button=wt;exports.Calendar=wo;exports.Check=an;exports.Checkbox=Ka;exports.ChevronDown=ma;exports.ChevronLeft=ha;exports.ChevronRight=va;exports.ChevronUp=ga;exports.Circle=xo;exports.Close=cn;exports.Coffee=yo;exports.Dialog=gl;exports.ExternalLink=bo;exports.Gear=Co;exports.Hammer=Eo;exports.Heart=Ro;exports.IconMap=ut;exports.Inbox=So;exports.Kebab=Po;exports.Lamp=To;exports.Lightning=Mo;exports.LogIn=_o;exports.LogOut=Ao;exports.Mail=ko;exports.Menu=Oo;exports.MenuButton=gf;exports.MenuButtonItem=wf;exports.NoMobile=Do;exports.Pencil=No;exports.Plus=Io;exports.Signpost=Lo;exports.Spinner=ln;exports.SunMoon=jo;exports.Toast=zs;exports.ToastProvider=Zf;exports.ToastViewport=Gs;exports.Tooltip=Cp;exports.TooltipProvider=bp;exports.createIcon=j;exports.dialogSizes=vl;exports.iconSizes=pa;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Su="DialogDescriptionWarning",Ru=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${us(Su).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},_u=Zr,Pu=Jr,Tu=ts,Mu=ns,Au=os,Iu=ss,Nu=cs;const Ou="_dialogOverlay_1qzfk_1",ku="_dialogContent_1qzfk_20",Du="_dialogCloseButton_1qzfk_65",ju="_dialogTitle_1qzfk_72",At={dialogOverlay:Ou,dialogContent:ku,dialogCloseButton:Du,dialogTitle:ju},Lu=["sm","md","lg"],Fu=({trigger:e,children:t,title:n,size:o="md",...r})=>l.jsxs(_u,{...r,children:[l.jsx(Pu,{asChild:!0,children:e}),l.jsxs(Tu,{children:[l.jsx(Mu,{className:`${At.dialogOverlay}`}),l.jsxs(Au,{className:At.dialogContent,"data-size":o,onPointerDownOutside:a=>{a?.preventDefault()},children:[l.jsx(Nu,{asChild:!0,children:l.jsx(mt,{className:`${At.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:l.jsx(Xn,{})})}),l.jsx(Iu,{className:At.dialogTitle,children:n}),t]})]})]}),$u="_emptyState_nzjhq_1",Bu={emptyState:$u},Wu=({title:e,description:t,...n})=>l.jsxs("div",{className:Bu.emptyState,...n,children:[l.jsx("h2",{className:"header-2",children:e}),t&&l.jsx("p",{className:"subtitle-2",children:t})]}),Hu="_container_swxkv_1",Vu="_label_swxkv_8",Ku="_inputWrapper_swxkv_15",Uu="_input_swxkv_15",Gu="_startIcon_swxkv_68",zu="_endIcon_swxkv_69",Yu="_error_swxkv_88",Xu="_helperText_swxkv_94",Re={container:Hu,label:Vu,inputWrapper:Ku,input:Uu,startIcon:Gu,endIcon:zu,error:Yu,helperText:Xu},ds=O.forwardRef(({className:e,label:t,error:n,helperText:o,startIcon:r,endIcon:a,id:i,...c},u)=>{const d=O.useId(),f=i||d,p=o?`${f}-helper-text`:void 0,h=n?`${f}-error`:void 0,g=r?Ze[r]:void 0,w=a?Ze[a]:void 0;return l.jsxs("div",{className:`${Re.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:f,className:Re.label,children:t}),l.jsxs("div",{className:Re.inputWrapper,children:[g&&l.jsx("div",{className:Re.startIcon,children:l.jsx(g,{size:"md"})}),l.jsx("input",{ref:u,id:f,className:Re.input,"aria-invalid":!!n,"aria-describedby":h||p,"data-has-start-icon":!!r,"data-has-end-icon":!!a,"data-has-error":!!n,...c}),w&&l.jsx("div",{className:Re.endIcon,children:l.jsx(w,{size:"md"})})]}),n&&l.jsx("span",{id:h,className:Re.error,children:n}),o&&!n&&l.jsx("span",{id:p,className:Re.helperText,children:o})]})});ds.displayName="Input";function Qt(e){const t=e+"CollectionProvider",[n,o]=pe(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:y}=m,x=O.useRef(null),C=O.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=De(c),d=O.forwardRef((m,v)=>{const{scope:y,children:x}=m,C=a(c,y),b=H(v,C.collectionRef);return l.jsx(u,{ref:b,children:x})});d.displayName=c;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=De(f),g=O.forwardRef((m,v)=>{const{scope:y,children:x,...C}=m,b=O.useRef(null),E=H(v,b),T=a(f,y);return O.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),l.jsx(h,{[p]:"",ref:E,children:x})});g.displayName=f;function w(m){const v=a(e+"CollectionConsumer",m);return O.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((T,S)=>C.indexOf(T.ref.current)-C.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:d,ItemSlot:g},w,o]}var qu=s.createContext(void 0);function no(e){const t=s.useContext(qu);return e||t||"ltr"}const Zu=["top","right","bottom","left"],Te=Math.min,se=Math.max,Lt=Math.round,It=Math.floor,we=e=>({x:e,y:e}),Qu={left:"right",right:"left",bottom:"top",top:"bottom"},Ju={start:"end",end:"start"};function kn(e,t,n){return se(e,Te(t,n))}function Ee(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function oo(e){return e==="x"?"y":"x"}function ro(e){return e==="y"?"height":"width"}const ed=new Set(["top","bottom"]);function ge(e){return ed.has(Se(e))?"y":"x"}function so(e){return oo(ge(e))}function td(e,t,n){n===void 0&&(n=!1);const o=tt(e),r=so(e),a=ro(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ft(i)),[i,Ft(i)]}function nd(e){const t=Ft(e);return[Dn(e),t,Dn(t)]}function Dn(e){return e.replace(/start|end/g,t=>Ju[t])}const Wo=["left","right"],Ho=["right","left"],od=["top","bottom"],rd=["bottom","top"];function sd(e,t,n){switch(e){case"top":case"bottom":return n?t?Ho:Wo:t?Wo:Ho;case"left":case"right":return t?od:rd;default:return[]}}function ad(e,t,n,o){const r=tt(e);let a=sd(Se(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(Dn)))),a}function Ft(e){return e.replace(/left|right|bottom|top/g,t=>Qu[t])}function id(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?id(e):{top:e,right:e,bottom:e,left:e}}function $t(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Vo(e,t,n){let{reference:o,floating:r}=e;const a=ge(t),i=so(t),c=ro(i),u=Se(t),d=a==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let g;switch(u){case"top":g={x:f,y:o.y-r.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:p};break;case"left":g={x:o.x-r.width,y:p};break;default:g={x:o.x,y:o.y}}switch(tt(t)){case"start":g[i]-=h*(n&&d?-1:1);break;case"end":g[i]+=h*(n&&d?-1:1);break}return g}const cd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=Vo(d,o,u),h=o,g={},w=0;for(let m=0;m<c.length;m++){const{name:v,fn:y}=c[m],{x,y:C,data:b,reset:E}=await y({x:f,y:p,initialPlacement:o,placement:h,strategy:r,middlewareData:g,rects:d,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,g={...g,[v]:{...g[v],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=Vo(d,h,u)),m=-1)}return{x:f,y:p,placement:h,strategy:r,middlewareData:g}};async function ct(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:g=0}=Ee(t,e),w=fs(g),v=c[h?p==="floating"?"reference":"floating":p],y=$t(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:f,strategy:u})),x=p==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),b=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=$t(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:C,strategy:u}):x);return{top:(y.top-E.top+w.top)/b.y,bottom:(E.bottom-y.bottom+w.bottom)/b.y,left:(y.left-E.left+w.left)/b.x,right:(E.right-y.right+w.right)/b.x}}const ld=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:f=0}=Ee(e,t)||{};if(d==null)return{};const p=fs(f),h={x:n,y:o},g=so(r),w=ro(g),m=await i.getDimensions(d),v=g==="y",y=v?"top":"left",x=v?"bottom":"right",C=v?"clientHeight":"clientWidth",b=a.reference[w]+a.reference[g]-h[g]-a.floating[w],E=h[g]-a.reference[g],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let S=T?T[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(T)))&&(S=c.floating[C]||a.floating[w]);const A=b/2-E/2,j=S/2-m[w]/2-1,D=Te(p[y],j),L=Te(p[x],j),B=D,W=S-m[w]-L,P=S/2-m[w]/2+A,$=kn(B,P,W),N=!u.arrow&&tt(r)!=null&&P!==$&&a.reference[w]/2-(P<B?D:L)-m[w]/2<0,F=N?P<B?P-B:P-W:0;return{[g]:h[g]+F,data:{[g]:$,centerOffset:P-$-F,...N&&{alignmentOffset:F}},reset:N}}}),ud=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=Ee(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(r),x=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),E=h||(C||!m?[Ft(c)]:nd(c)),T=w!=="none";!h&&T&&E.push(...ad(c,m,w,b));const S=[c,...E],A=await ct(t,v),j=[];let D=((o=a.flip)==null?void 0:o.overflows)||[];if(f&&j.push(A[y]),p){const P=td(r,i,b);j.push(A[P[0]],A[P[1]])}if(D=[...D,{placement:r,overflows:j}],!j.every(P=>P<=0)){var L,B;const P=(((L=a.flip)==null?void 0:L.index)||0)+1,$=S[P];if($&&(!(p==="alignment"?x!==ge($):!1)||D.every(I=>ge(I.placement)===x?I.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:$}};let N=(B=D.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(g){case"bestFit":{var W;const F=(W=D.filter(I=>{if(T){const _=ge(I.placement);return _===x||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];F&&(N=F);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Ko(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return Zu.some(t=>e[t]>=0)}const dd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Ee(e,t);switch(o){case"referenceHidden":{const a=await ct(t,{...r,elementContext:"reference"}),i=Ko(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const a=await ct(t,{...r,altBoundary:!0}),i=Ko(a,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}},ps=new Set(["left","top"]);async function fd(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Se(n),c=tt(n),u=ge(n)==="y",d=ps.has(i)?-1:1,f=a&&u?-1:1,p=Ee(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(g=c==="end"?w*-1:w),u?{x:g*f,y:h*d}:{x:h*d,y:g*f}}const pd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:c}=t,u=await fd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+u.x,y:a+u.y,data:{...u,placement:i}}}}},md=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...u}=Ee(e,t),d={x:n,y:o},f=await ct(t,u),p=ge(Se(r)),h=oo(p);let g=d[h],w=d[p];if(a){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+f[v],C=g-f[y];g=kn(x,g,C)}if(i){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=w+f[v],C=w-f[y];w=kn(x,w,C)}const m=c.fn({...t,[h]:g,[p]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:a,[p]:i}}}}}},hd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=Ee(e,t),f={x:n,y:o},p=ge(r),h=oo(p);let g=f[h],w=f[p];const m=Ee(c,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(u){const C=h==="y"?"height":"width",b=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;g<b?g=b:g>E&&(g=E)}if(d){var y,x;const C=h==="y"?"width":"height",b=ps.has(Se(r)),E=a.reference[p]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[p])||0)+(b?0:v.crossAxis),T=a.reference[p]+a.reference[C]+(b?0:((x=i.offset)==null?void 0:x[p])||0)-(b?v.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:g,[p]:w}}}},vd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=Ee(e,t),f=await ct(t,d),p=Se(r),h=tt(r),g=ge(r)==="y",{width:w,height:m}=a.floating;let v,y;p==="top"||p==="bottom"?(v=p,y=h===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=p,v=h==="end"?"top":"bottom");const x=m-f.top-f.bottom,C=w-f.left-f.right,b=Te(m-f[v],x),E=Te(w-f[y],C),T=!t.middlewareData.shift;let S=b,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),T&&!h){const D=se(f.left,0),L=se(f.right,0),B=se(f.top,0),W=se(f.bottom,0);g?A=w-2*(D!==0||L!==0?D+L:se(f.left,f.right)):S=m-2*(B!==0||W!==0?B+W:se(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:S});const j=await i.getDimensions(c.floating);return w!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Jt(){return typeof window<"u"}function nt(e){return ms(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(ms(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ms(e){return Jt()?e instanceof Node||e instanceof ae(e).Node:!1}function de(e){return Jt()?e instanceof Element||e instanceof ae(e).Element:!1}function xe(e){return Jt()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function Go(e){return!Jt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}const gd=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!gd.has(r)}const wd=new Set(["table","td","th"]);function xd(e){return wd.has(nt(e))}const yd=[":popover-open",":modal"];function en(e){return yd.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cd=["transform","translate","scale","rotate","perspective"],bd=["transform","translate","scale","rotate","perspective","filter"],Ed=["paint","layout","strict","content"];function ao(e){const t=io(),n=de(e)?fe(e):e;return Cd.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||bd.some(o=>(n.willChange||"").includes(o))||Ed.some(o=>(n.contain||"").includes(o))}function Sd(e){let t=Me(e);for(;xe(t)&&!Qe(t);){if(ao(t))return t;if(en(t))return null;t=Me(t)}return null}function io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rd=new Set(["html","body","#document"]);function Qe(e){return Rd.has(nt(e))}function fe(e){return ae(e).getComputedStyle(e)}function tn(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(nt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Go(e)&&e.host||ye(e);return Go(t)?t.host:t}function hs(e){const t=Me(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&>(t)?t:hs(t)}function lt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=hs(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=ae(r);if(a){const c=jn(i);return t.concat(i,i.visualViewport||[],gt(r)?r:[],c&&n?lt(c):[])}return t.concat(r,lt(r,[],n))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vs(e){const t=fe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=xe(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Lt(n)!==a||Lt(o)!==i;return c&&(n=a,o=i),{width:n,height:o,$:c}}function co(e){return de(e)?e:e.contextElement}function qe(e){const t=co(e);if(!xe(t))return we(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=vs(t);let i=(a?Lt(n.width):n.width)/o,c=(a?Lt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const _d=we(0);function gs(e){const t=ae(e);return!io()||!t.visualViewport?_d:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ae(e)?!1:t}function Le(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=co(e);let i=we(1);t&&(o?de(o)&&(i=qe(o)):i=qe(e));const c=Pd(a,n,o)?gs(a):we(0);let u=(r.left+c.x)/i.x,d=(r.top+c.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(a){const h=ae(a),g=o&&de(o)?ae(o):o;let w=h,m=jn(w);for(;m&&o&&g!==w;){const v=qe(m),y=m.getBoundingClientRect(),x=fe(m),C=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;u*=v.x,d*=v.y,f*=v.x,p*=v.y,u+=C,d+=b,w=ae(m),m=jn(w)}}return $t({width:f,height:p,x:u,y:d})}function nn(e,t){const n=tn(e).scrollLeft;return t?t.left+n:Le(ye(e)).left+n}function ws(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-nn(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Td(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=ye(o),c=t?en(t.floating):!1;if(o===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=we(1);const f=we(0),p=xe(o);if((p||!p&&!a)&&((nt(o)!=="body"||gt(i))&&(u=tn(o)),xe(o))){const g=Le(o);d=qe(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const h=i&&!p&&!a?ws(i,u):we(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-u.scrollTop*d.y+f.y+h.y}}function Md(e){return Array.from(e.getClientRects())}function Ad(e){const t=ye(e),n=tn(e),o=e.ownerDocument.body,r=se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+nn(e);const c=-n.scrollTop;return fe(o).direction==="rtl"&&(i+=se(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:c}}const zo=25;function Id(e,t){const n=ae(e),o=ye(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,c=0,u=0;if(r){a=r.width,i=r.height;const f=io();(!f||f&&t==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}const d=nn(o);if(d<=0){const f=o.ownerDocument,p=f.body,h=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-g);w<=zo&&(a-=w)}else d<=zo&&(a+=d);return{width:a,height:i,x:c,y:u}}const Nd=new Set(["absolute","fixed"]);function Od(e,t){const n=Le(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=xe(e)?qe(e):we(1),i=e.clientWidth*a.x,c=e.clientHeight*a.y,u=r*a.x,d=o*a.y;return{width:i,height:c,x:u,y:d}}function Yo(e,t,n){let o;if(t==="viewport")o=Id(e,n);else if(t==="document")o=Ad(ye(e));else if(de(t))o=Od(t,n);else{const r=gs(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $t(o)}function xs(e,t){const n=Me(e);return n===t||!de(n)||Qe(n)?!1:fe(n).position==="fixed"||xs(n,t)}function kd(e,t){const n=t.get(e);if(n)return n;let o=lt(e,[],!1).filter(c=>de(c)&&nt(c)!=="body"),r=null;const a=fe(e).position==="fixed";let i=a?Me(e):e;for(;de(i)&&!Qe(i);){const c=fe(i),u=ao(i);!u&&c.position==="fixed"&&(r=null),(a?!u&&!r:!u&&c.position==="static"&&!!r&&Nd.has(r.position)||gt(i)&&!u&&xs(e,i))?o=o.filter(f=>f!==i):r=c,i=Me(i)}return t.set(e,o),o}function Dd(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?en(t)?[]:kd(t,this._c):[].concat(n),o],c=i[0],u=i.reduce((d,f)=>{const p=Yo(t,f,r);return d.top=se(p.top,d.top),d.right=Te(p.right,d.right),d.bottom=Te(p.bottom,d.bottom),d.left=se(p.left,d.left),d},Yo(t,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function jd(e){const{width:t,height:n}=vs(e);return{width:t,height:n}}function Ld(e,t,n){const o=xe(t),r=ye(t),a=n==="fixed",i=Le(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=we(0);function d(){u.x=nn(r)}if(o||!o&&!a)if((nt(t)!=="body"||gt(r))&&(c=tn(t)),o){const g=Le(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else r&&d();a&&!o&&r&&d();const f=r&&!o&&!a?ws(r,c):we(0),p=i.left+c.scrollLeft-u.x-f.x,h=i.top+c.scrollTop-u.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function Tn(e){return fe(e).position==="static"}function Xo(e,t){if(!xe(e)||fe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function ys(e,t){const n=ae(e);if(en(e))return n;if(!xe(e)){let r=Me(e);for(;r&&!Qe(r);){if(de(r)&&!Tn(r))return r;r=Me(r)}return n}let o=Xo(e,t);for(;o&&xd(o)&&Tn(o);)o=Xo(o,t);return o&&Qe(o)&&Tn(o)&&!ao(o)?n:o||Sd(e)||n}const Fd=async function(e){const t=this.getOffsetParent||ys,n=this.getDimensions,o=await n(e.floating);return{reference:Ld(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $d(e){return fe(e).direction==="rtl"}const Bd={convertOffsetParentRelativeRectToViewportRelativeRect:Td,getDocumentElement:ye,getClippingRect:Dd,getOffsetParent:ys,getElementRects:Fd,getClientRects:Md,getDimensions:jd,getScale:qe,isElement:de,isRTL:$d};function Cs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wd(e,t){let n=null,o;const r=ye(e);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:f,top:p,width:h,height:g}=d;if(c||t(),!h||!g)return;const w=It(p),m=It(r.clientWidth-(f+h)),v=It(r.clientHeight-(p+g)),y=It(f),C={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let b=!0;function E(T){const S=T[0].intersectionRatio;if(S!==u){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Cs(d,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function Hd(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=co(e),f=r||a?[...d?lt(d):[],...lt(t)]:[];f.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const p=d&&c?Wd(d,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),d&&!u&&g.observe(d),g.observe(t));let w,m=u?Le(e):null;u&&v();function v(){const y=Le(e);m&&!Cs(m,y)&&n(),m=y,w=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{r&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),p?.(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(w)}}const Vd=pd,Kd=md,Ud=ud,Gd=vd,zd=dd,qo=ld,Yd=hd,Xd=(e,t,n)=>{const o=new Map,r={platform:Bd,...n},a={...r.platform,_c:o};return cd(e,t,{...r,platform:a})};var qd=typeof document<"u",Zd=function(){},Dt=qd?O.useLayoutEffect:Zd;function Bt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Bt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!Bt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function bs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zo(e,t){const n=bs(e);return Math.round(t*n)/n}function Mn(e){const t=s.useRef(e);return Dt(()=>{t.current=e}),t}function Qd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=s.useState(o);Bt(h,o)||g(o);const[w,m]=s.useState(null),[v,y]=s.useState(null),x=s.useCallback(I=>{I!==T.current&&(T.current=I,m(I))},[]),C=s.useCallback(I=>{I!==S.current&&(S.current=I,y(I))},[]),b=a||w,E=i||v,T=s.useRef(null),S=s.useRef(null),A=s.useRef(f),j=u!=null,D=Mn(u),L=Mn(r),B=Mn(d),W=s.useCallback(()=>{if(!T.current||!S.current)return;const I={placement:t,strategy:n,middleware:h};L.current&&(I.platform=L.current),Xd(T.current,S.current,I).then(_=>{const z={..._,isPositioned:B.current!==!1};P.current&&!Bt(A.current,z)&&(A.current=z,pt.flushSync(()=>{p(z)}))})},[h,t,n,L,B]);Dt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(I=>({...I,isPositioned:!1})))},[d]);const P=s.useRef(!1);Dt(()=>(P.current=!0,()=>{P.current=!1}),[]),Dt(()=>{if(b&&(T.current=b),E&&(S.current=E),b&&E){if(D.current)return D.current(b,E,W);W()}},[b,E,W,D,j]);const $=s.useMemo(()=>({reference:T,floating:S,setReference:x,setFloating:C}),[x,C]),N=s.useMemo(()=>({reference:b,floating:E}),[b,E]),F=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!N.floating)return I;const _=Zo(N.floating,f.x),z=Zo(N.floating,f.y);return c?{...I,transform:"translate("+_+"px, "+z+"px)",...bs(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,c,N.floating,f.x,f.y]);return s.useMemo(()=>({...f,update:W,refs:$,elements:N,floatingStyles:F}),[f,W,$,N,F])}const Jd=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?qo({element:o.current,padding:r}).fn(n):{}:o?qo({element:o,padding:r}).fn(n):{}}}},ef=(e,t)=>({...Vd(e),options:[e,t]}),tf=(e,t)=>({...Kd(e),options:[e,t]}),nf=(e,t)=>({...Yd(e),options:[e,t]}),of=(e,t)=>({...Ud(e),options:[e,t]}),rf=(e,t)=>({...Gd(e),options:[e,t]}),sf=(e,t)=>({...zd(e),options:[e,t]}),af=(e,t)=>({...Jd(e),options:[e,t]});var cf="Arrow",Es=s.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return l.jsx(k.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Es.displayName=cf;var lf=Es,lo="Popper",[Ss,Ae]=pe(lo),[uf,Rs]=Ss(lo),_s=e=>{const{__scopePopper:t,children:n}=e,[o,r]=s.useState(null);return l.jsx(uf,{scope:t,anchor:o,onAnchorChange:r,children:n})};_s.displayName=lo;var Ps="PopperAnchor",Ts=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Rs(Ps,n),i=s.useRef(null),c=H(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=o?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),o?null:l.jsx(k.div,{...r,ref:c})});Ts.displayName=Ps;var uo="PopperContent",[df,ff]=Ss(uo),Ms=s.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:w,...m}=e,v=Rs(uo,n),[y,x]=s.useState(null),C=H(t,M=>x(M)),[b,E]=s.useState(null),T=Tr(b),S=T?.width??0,A=T?.height??0,j=o+(a!=="center"?"-"+a:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(d)?d:[d],B=L.length>0,W={padding:D,boundary:L.filter(mf),altBoundary:B},{refs:P,floatingStyles:$,placement:N,isPositioned:F,middlewareData:I}=Qd({strategy:"fixed",placement:j,whileElementsMounted:(...M)=>Hd(...M,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[ef({mainAxis:r+A,alignmentAxis:i}),u&&tf({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?nf():void 0,...W}),u&&of({...W}),rf({...W,apply:({elements:M,rects:K,availableWidth:J,availableHeight:U})=>{const{width:G,height:Y}=K.reference,ie=M.floating.style;ie.setProperty("--radix-popper-available-width",`${J}px`),ie.setProperty("--radix-popper-available-height",`${U}px`),ie.setProperty("--radix-popper-anchor-width",`${G}px`),ie.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),b&&af({element:b,padding:c}),hf({arrowWidth:S,arrowHeight:A}),h&&sf({strategy:"referenceHidden",...W})]}),[_,z]=Ns(N),X=ne(w);q(()=>{F&&X?.()},[F,X]);const Z=I.arrow?.x,te=I.arrow?.y,Q=I.arrow?.centerOffset!==0,[Ce,re]=s.useState();return q(()=>{y&&re(window.getComputedStyle(y).zIndex)},[y]),l.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:F?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(df,{scope:n,placedSide:_,onArrowChange:E,arrowX:Z,arrowY:te,shouldHideArrow:Q,children:l.jsx(k.div,{"data-side":_,"data-align":z,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});Ms.displayName=uo;var As="PopperArrow",pf={top:"bottom",right:"left",bottom:"top",left:"right"},Is=s.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=ff(As,o),i=pf[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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:l.jsx(lf,{...r,ref:n,style:{...r.style,display:"block"}})})});Is.displayName=As;function mf(e){return e!==null}var hf=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,c=i?0:e.arrowWidth,u=i?0:e.arrowHeight,[d,f]=Ns(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,g=(r.arrow?.y??0)+u/2;let w="",m="";return d==="bottom"?(w=i?p:`${h}px`,m=`${-u}px`):d==="top"?(w=i?p:`${h}px`,m=`${o.floating.height+u}px`):d==="right"?(w=`${-u}px`,m=i?p:`${g}px`):d==="left"&&(w=`${o.floating.width+u}px`,m=i?p:`${g}px`),{data:{x:w,y:m}}}});function Ns(e){const[t,n="center"]=e.split("-");return[t,n]}var on=_s,wt=Ts,rn=Ms,sn=Is,An="rovingFocusGroup.onEntryFocus",vf={bubbles:!1,cancelable:!0},xt="RovingFocusGroup",[Ln,Os,gf]=Qt(xt),[wf,ks]=pe(xt,[gf]),[xf,yf]=wf(xt),Ds=s.forwardRef((e,t)=>l.jsx(Ln.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Ln.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Cf,{...e,ref:t})})}));Ds.displayName=xt;var Cf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,h=s.useRef(null),g=H(t,h),w=no(a),[m,v]=be({prop:i,defaultProp:c??null,onChange:u,caller:xt}),[y,x]=s.useState(!1),C=ne(d),b=Os(n),E=s.useRef(!1),[T,S]=s.useState(0);return s.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(An,C),()=>A.removeEventListener(An,C)},[C]),l.jsx(xf,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:s.useCallback(A=>v(A),[v]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(A=>A+1),[]),onFocusableItemRemove:s.useCallback(()=>S(A=>A-1),[]),children:l.jsx(k.div,{tabIndex:y||T===0?-1:0,"data-orientation":o,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{E.current=!0}),onFocus:R(e.onFocus,A=>{const j=!E.current;if(A.target===A.currentTarget&&j&&!y){const D=new CustomEvent(An,vf);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=b().filter(N=>N.focusable),B=L.find(N=>N.active),W=L.find(N=>N.id===m),$=[B,W,...L].filter(Boolean).map(N=>N.ref.current);Fs($,f)}}E.current=!1}),onBlur:R(e.onBlur,()=>x(!1))})})}),js="RovingFocusGroupItem",Ls=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:a,children:i,...c}=e,u=ue(),d=a||u,f=yf(js,n),p=f.currentTabStopId===d,h=Os(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:m}=f;return s.useEffect(()=>{if(o)return g(),()=>w()},[o,g,w]),l.jsx(Ln.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(k.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:R(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:R(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Sf(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=h().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const b=C.indexOf(v.currentTarget);C=f.loop?Rf(C,b+1):C.slice(b+1)}setTimeout(()=>Fs(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:m!=null}):i})})});Ls.displayName=js;var bf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ef(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sf(e,t,n){const o=Ef(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return bf[o]}function Fs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Rf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var _f=Ds,Pf=Ls,Fn=["Enter"," "],Tf=["ArrowDown","PageUp","Home"],$s=["ArrowUp","PageDown","End"],Mf=[...Tf,...$s],Af={ltr:[...Fn,"ArrowRight"],rtl:[...Fn,"ArrowLeft"]},If={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yt="Menu",[ut,Nf,Of]=Qt(yt),[He,Bs]=pe(yt,[Of,Ae,ks]),an=Ae(),Ws=ks(),[kf,Ve]=He(yt),[Df,Ct]=He(yt),Hs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:a,modal:i=!0}=e,c=an(t),[u,d]=s.useState(null),f=s.useRef(!1),p=ne(a),h=no(r);return s.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),l.jsx(on,{...c,children:l.jsx(kf,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:l.jsx(Df,{scope:t,onClose:s.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:h,modal:i,children:o})})})};Hs.displayName=yt;var jf="MenuAnchor",fo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(wt,{...r,...o,ref:t})});fo.displayName=jf;var po="MenuPortal",[Lf,Vs]=He(po,{forceMount:void 0}),Ks=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,a=Ve(po,t);return l.jsx(Lf,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};Ks.displayName=po;var ce="MenuContent",[Ff,mo]=He(ce),Us=s.forwardRef((e,t)=>{const n=Vs(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:i.modal?l.jsx($f,{...r,ref:t}):l.jsx(Bf,{...r,ref:t})})})})}),$f=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return qt(a)},[]),l.jsx(ho,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bf=s.forwardRef((e,t)=>{const n=Ve(ce,e.__scopeMenu);return l.jsx(ho,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Wf=De("MenuContent.ScrollLock"),ho=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,disableOutsideScroll:w,...m}=e,v=Ve(ce,n),y=Ct(ce,n),x=an(n),C=Ws(n),b=Nf(n),[E,T]=s.useState(null),S=s.useRef(null),A=H(t,S,v.onContentChange),j=s.useRef(0),D=s.useRef(""),L=s.useRef(0),B=s.useRef(null),W=s.useRef("right"),P=s.useRef(0),$=w?vt:s.Fragment,N=w?{as:Wf,allowPinchZoom:!0}:void 0,F=_=>{const z=D.current+_,X=b().filter(M=>!M.disabled),Z=document.activeElement,te=X.find(M=>M.ref.current===Z)?.textValue,Q=X.map(M=>M.textValue),Ce=Jf(Q,z,te),re=X.find(M=>M.textValue===Ce)?.ref.current;(function M(K){D.current=K,window.clearTimeout(j.current),K!==""&&(j.current=window.setTimeout(()=>M(""),1e3))})(z),re&&setTimeout(()=>re.focus())};s.useEffect(()=>()=>window.clearTimeout(j.current),[]),Yt();const I=s.useCallback(_=>W.current===B.current?.side&&tp(_,B.current?.area),[]);return l.jsx(Ff,{scope:n,searchRef:D,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(S.current?.focus(),T(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:L,onPointerGraceIntentChange:s.useCallback(_=>{B.current=_},[]),children:l.jsx($,{...N,children:l.jsx(ht,{asChild:!0,trapped:r,onMountAutoFocus:R(a,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:h,onDismiss:g,children:l.jsx(_f,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:R(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(rn,{role:"menu","aria-orientation":"vertical","data-state":ia(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...m,ref:A,style:{outline:"none",...m.style},onKeyDown:R(m.onKeyDown,_=>{const X=_.target.closest("[data-radix-menu-content]")===_.currentTarget,Z=_.ctrlKey||_.altKey||_.metaKey,te=_.key.length===1;X&&(_.key==="Tab"&&_.preventDefault(),!Z&&te&&F(_.key));const Q=S.current;if(_.target!==Q||!Mf.includes(_.key))return;_.preventDefault();const re=b().filter(M=>!M.disabled).map(M=>M.ref.current);$s.includes(_.key)&&re.reverse(),Zf(re)}),onBlur:R(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(j.current),D.current="")}),onPointerMove:R(e.onPointerMove,dt(_=>{const z=_.target,X=P.current!==_.clientX;if(_.currentTarget.contains(z)&&X){const Z=_.clientX>P.current?"right":"left";W.current=Z,P.current=_.clientX}}))})})})})})})});Us.displayName=ce;var Hf="MenuGroup",vo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"group",...o,ref:t})});vo.displayName=Hf;var Vf="MenuLabel",Gs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});Gs.displayName=Vf;var Wt="MenuItem",Qo="menu.itemSelect",cn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,a=s.useRef(null),i=Ct(Wt,e.__scopeMenu),c=mo(Wt,e.__scopeMenu),u=H(t,a),d=s.useRef(!1),f=()=>{const p=a.current;if(!n&&p){const h=new CustomEvent(Qo,{bubbles:!0,cancelable:!0});p.addEventListener(Qo,g=>o?.(g),{once:!0}),Zn(p,h),h.defaultPrevented?d.current=!1:i.onClose()}};return l.jsx(zs,{...r,ref:u,disabled:n,onClick:R(e.onClick,f),onPointerDown:p=>{e.onPointerDown?.(p),d.current=!0},onPointerUp:R(e.onPointerUp,p=>{d.current||p.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,p=>{const h=c.searchRef.current!=="";n||h&&p.key===" "||Fn.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});cn.displayName=Wt;var zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...a}=e,i=mo(Wt,n),c=Ws(n),u=s.useRef(null),d=H(t,u),[f,p]=s.useState(!1),[h,g]=s.useState("");return s.useEffect(()=>{const w=u.current;w&&g((w.textContent??"").trim())},[a.children]),l.jsx(ut.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:l.jsx(Pf,{asChild:!0,...c,focusable:!o,children:l.jsx(k.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:d,onPointerMove:R(e.onPointerMove,dt(w=>{o?i.onItemLeave(w):(i.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,dt(w=>i.onItemLeave(w))),onFocus:R(e.onFocus,()=>p(!0)),onBlur:R(e.onBlur,()=>p(!1))})})})}),Kf="MenuCheckboxItem",Ys=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return l.jsx(Js,{scope:e.__scopeMenu,checked:n,children:l.jsx(cn,{role:"menuitemcheckbox","aria-checked":Ht(n)?"mixed":n,...r,ref:t,"data-state":wo(n),onSelect:R(r.onSelect,()=>o?.(Ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ys.displayName=Kf;var Xs="MenuRadioGroup",[Uf,Gf]=He(Xs,{value:void 0,onValueChange:()=>{}}),qs=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,a=ne(o);return l.jsx(Uf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:l.jsx(vo,{...r,ref:t})})});qs.displayName=Xs;var Zs="MenuRadioItem",Qs=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=Gf(Zs,e.__scopeMenu),a=n===r.value;return l.jsx(Js,{scope:e.__scopeMenu,checked:a,children:l.jsx(cn,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":wo(a),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Qs.displayName=Zs;var go="MenuItemIndicator",[Js,zf]=He(go,{checked:!1}),ea=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,a=zf(go,n);return l.jsx(oe,{present:o||Ht(a.checked)||a.checked===!0,children:l.jsx(k.span,{...r,ref:t,"data-state":wo(a.checked)})})});ea.displayName=go;var Yf="MenuSeparator",ta=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return l.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ta.displayName=Yf;var Xf="MenuArrow",na=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=an(n);return l.jsx(sn,{...r,...o,ref:t})});na.displayName=Xf;var qf="MenuSub",[wv,oa]=He(qf),at="MenuSubTrigger",ra=s.forwardRef((e,t)=>{const n=Ve(at,e.__scopeMenu),o=Ct(at,e.__scopeMenu),r=oa(at,e.__scopeMenu),a=mo(at,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},f=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>f,[f]),s.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]),l.jsx(fo,{asChild:!0,...d,children:l.jsx(zs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ia(n.open),...e,ref:Gt(t,r.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,dt(p=>{a.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,dt(p=>{f();const h=n.content?.getBoundingClientRect();if(h){const g=n.content?.dataset.side,w=g==="right",m=w?-5:5,v=h[w?"left":"right"],y=h[w?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+m,y:p.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:g}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,p=>{const h=a.searchRef.current!=="";e.disabled||h&&p.key===" "||Af[o.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});ra.displayName=at;var sa="MenuSubContent",aa=s.forwardRef((e,t)=>{const n=Vs(ce,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,a=Ve(ce,e.__scopeMenu),i=Ct(ce,e.__scopeMenu),c=oa(sa,e.__scopeMenu),u=s.useRef(null),d=H(t,u);return l.jsx(ut.Provider,{scope:e.__scopeMenu,children:l.jsx(oe,{present:o||a.open,children:l.jsx(ut.Slot,{scope:e.__scopeMenu,children:l.jsx(ho,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&u.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{const p=f.currentTarget.contains(f.target),h=If[i.dir].includes(f.key);p&&h&&(a.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});aa.displayName=sa;function ia(e){return e?"open":"closed"}function Ht(e){return e==="indeterminate"}function wo(e){return Ht(e)?"indeterminate":e?"checked":"unchecked"}function Zf(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Qf(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Jf(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Qf(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function ep(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function tp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ep(n,t)}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var np=Hs,op=fo,rp=Ks,sp=Us,ap=vo,ip=Gs,cp=cn,lp=Ys,up=qs,dp=Qs,fp=ea,pp=ta,mp=na,hp=ra,vp=aa,ln="DropdownMenu",[gp]=pe(ln,[Bs]),ee=Bs(),[wp,ca]=gp(ln),la=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=ee(t),d=s.useRef(null),[f,p]=be({prop:r,defaultProp:a??!1,onChange:i,caller:ln});return l.jsx(wp,{scope:t,triggerId:ue(),triggerRef:d,contentId:ue(),open:f,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(h=>!h),[p]),modal:c,children:l.jsx(np,{...u,open:f,onOpenChange:p,dir:o,modal:c,children:n})})};la.displayName=ln;var ua="DropdownMenuTrigger",da=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,a=ca(ua,n),i=ee(n);return l.jsx(op,{asChild:!0,...i,children:l.jsx(k.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Gt(t,a.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});da.displayName=ua;var xp="DropdownMenuPortal",fa=e=>{const{__scopeDropdownMenu:t,...n}=e,o=ee(t);return l.jsx(rp,{...o,...n})};fa.displayName=xp;var pa="DropdownMenuContent",ma=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ca(pa,n),a=ee(n),i=s.useRef(!1);return l.jsx(sp,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{i.current||r.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ma.displayName=pa;var yp="DropdownMenuGroup",Cp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(ap,{...r,...o,ref:t})});Cp.displayName=yp;var bp="DropdownMenuLabel",Ep=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(ip,{...r,...o,ref:t})});Ep.displayName=bp;var Sp="DropdownMenuItem",ha=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(cp,{...r,...o,ref:t})});ha.displayName=Sp;var Rp="DropdownMenuCheckboxItem",_p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(lp,{...r,...o,ref:t})});_p.displayName=Rp;var Pp="DropdownMenuRadioGroup",Tp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(up,{...r,...o,ref:t})});Tp.displayName=Pp;var Mp="DropdownMenuRadioItem",Ap=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(dp,{...r,...o,ref:t})});Ap.displayName=Mp;var Ip="DropdownMenuItemIndicator",Np=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(fp,{...r,...o,ref:t})});Np.displayName=Ip;var Op="DropdownMenuSeparator",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(pp,{...r,...o,ref:t})});kp.displayName=Op;var Dp="DropdownMenuArrow",va=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(mp,{...r,...o,ref:t})});va.displayName=Dp;var jp="DropdownMenuSubTrigger",Lp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(hp,{...r,...o,ref:t})});Lp.displayName=jp;var Fp="DropdownMenuSubContent",$p=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=ee(n);return l.jsx(vp,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$p.displayName=Fp;var Bp=la,Wp=da,Hp=fa,Vp=ma,Kp=ha,Up=va;const Gp="_menuButtonContent_gcc8s_1",zp="_menuButtonItem_gcc8s_13",Yp="_menuButtonItemLabel_gcc8s_41",Xp="_menuButtonArrow_gcc8s_46",Vt={menuButtonContent:Gp,menuButtonItem:zp,menuButtonItemLabel:Yp,menuButtonArrow:Xp},qp=({children:e,trigger:t,...n})=>l.jsxs(Bp,{modal:!1,...n,children:[l.jsx(Wp,{asChild:!0,children:t}),l.jsx(Hp,{children:l.jsxs(Vp,{align:"end",className:Vt.menuButtonContent,sideOffset:5,children:[e,l.jsx(Up,{className:Vt.menuButtonArrow})]})})]}),Zp=({children:e,icon:t,...n})=>{const o=t?Ze[t]:void 0;return l.jsxs(Kp,{className:Vt.menuButtonItem,...n,children:[o&&l.jsx(o,{size:"md",className:"text-color-secondary"}),l.jsx("label",{className:`label-3 text-color-secondary ${Vt.menuButtonItemLabel}`,children:e})]})};var un="Popover",[ga]=pe(un,[Ae]),bt=Ae(),[Qp,Ie]=ga(un),wa=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:i=!1}=e,c=bt(t),u=s.useRef(null),[d,f]=s.useState(!1),[p,h]=be({prop:o,defaultProp:r??!1,onChange:a,caller:un});return l.jsx(on,{...c,children:l.jsx(Qp,{scope:t,contentId:ue(),triggerRef:u,open:p,onOpenChange:h,onOpenToggle:s.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>f(!0),[]),onCustomAnchorRemove:s.useCallback(()=>f(!1),[]),modal:i,children:n})})};wa.displayName=un;var xa="PopoverAnchor",Jp=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(xa,n),a=bt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return s.useEffect(()=>(i(),()=>c()),[i,c]),l.jsx(wt,{...a,...o,ref:t})});Jp.displayName=xa;var ya="PopoverTrigger",Ca=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(ya,n),a=bt(n),i=H(t,r.triggerRef),c=l.jsx(k.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ta(r.open),...o,ref:i,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:l.jsx(wt,{asChild:!0,...a,children:c})});Ca.displayName=ya;var xo="PopoverPortal",[em,tm]=ga(xo,{forceMount:void 0}),ba=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,a=Ie(xo,t);return l.jsx(em,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};ba.displayName=xo;var Je="PopoverContent",Ea=s.forwardRef((e,t)=>{const n=tm(Je,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,a=Ie(Je,e.__scopePopover);return l.jsx(oe,{present:o||a.open,children:a.modal?l.jsx(om,{...r,ref:t}):l.jsx(rm,{...r,ref:t})})});Ea.displayName=Je;var nm=De("PopoverContent.RemoveScroll"),om=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(null),r=H(t,o),a=s.useRef(!1);return s.useEffect(()=>{const i=o.current;if(i)return qt(i)},[]),l.jsx(vt,{as:nm,allowPinchZoom:!0,children:l.jsx(Sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),rm=s.forwardRef((e,t)=>{const n=Ie(Je,e.__scopePopover),o=s.useRef(!1),r=s.useRef(!1);return l.jsx(Sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),Sa=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...p}=e,h=Ie(Je,n),g=bt(n);return Yt(),l.jsx(ht,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(rn,{"data-state":Ta(h.open),role:"dialog",id:h.contentId,...g,...p,ref:t,style:{...p.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)"}})})})}),Ra="PopoverClose",_a=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Ie(Ra,n);return l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});_a.displayName=Ra;var sm="PopoverArrow",Pa=s.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=bt(n);return l.jsx(sn,{...r,...o,ref:t})});Pa.displayName=sm;function Ta(e){return e?"open":"closed"}var am=wa,im=Ca,cm=ba,lm=Ea,um=_a,dm=Pa;const fm="_popover_bk0al_2",pm="_popoverContent_bk0al_34",mm="_popoverArrow_bk0al_38",hm="_popoverClose_bk0al_42",st={popover:fm,popoverContent:pm,popoverArrow:mm,popoverClose:hm},vm=({trigger:e,title:t,size:n="md",popoverContent:o,...r})=>l.jsxs(am,{children:[l.jsx(im,{asChild:!0,children:e}),l.jsx(cm,{children:l.jsxs(lm,{side:"right",className:st.popover,...r,sideOffset:5,"data-size":n,children:[t&&l.jsx("h2",{className:`header-3 ${st.popoverTitle}`,children:t}),l.jsx("div",{className:st.popoverContent,children:o}),l.jsx("div",{className:st.popoverClose,children:l.jsx(um,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",size:"sm",iconOnly:!0,icon:"Close"})})}),l.jsx(dm,{className:st.popoverArrow})]})})]});function Jo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ma=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"}),gm="VisuallyHidden",dn=s.forwardRef((e,t)=>l.jsx(k.span,{...e,ref:t,style:{...Ma,...e.style}}));dn.displayName=gm;var wm=dn,xm=[" ","Enter","ArrowUp","ArrowDown"],ym=[" ","Enter"],Fe="Select",[fn,pn,Cm]=Qt(Fe),[ot]=pe(Fe,[Cm,Ae]),mn=Ae(),[bm,Ne]=ot(Fe),[Em,Sm]=ot(Fe),Aa=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:g,form:w}=e,m=mn(t),[v,y]=s.useState(null),[x,C]=s.useState(null),[b,E]=s.useState(!1),T=no(d),[S,A]=be({prop:o,defaultProp:r??!1,onChange:a,caller:Fe}),[j,D]=be({prop:i,defaultProp:c,onChange:u,caller:Fe}),L=s.useRef(null),B=v?w||!!v.closest("form"):!0,[W,P]=s.useState(new Set),$=Array.from(W).map(N=>N.props.value).join(";");return l.jsx(on,{...m,children:l.jsxs(bm,{required:g,scope:t,trigger:v,onTriggerChange:y,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:E,contentId:ue(),value:j,onValueChange:D,open:S,onOpenChange:A,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[l.jsx(fn.Provider,{scope:t,children:l.jsx(Em,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(N=>{P(F=>new Set(F).add(N))},[]),onNativeOptionRemove:s.useCallback(N=>{P(F=>{const I=new Set(F);return I.delete(N),I})},[]),children:n})}),B?l.jsxs(qa,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:j,onChange:N=>D(N.target.value),disabled:h,form:w,children:[j===void 0?l.jsx("option",{value:""}):null,Array.from(W)]},$):null]})})};Aa.displayName=Fe;var Ia="SelectTrigger",Na=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,a=mn(n),i=Ne(Ia,n),c=i.disabled||o,u=H(t,i.onTriggerChange),d=pn(n),f=s.useRef("touch"),[p,h,g]=Qa(m=>{const v=d().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),x=Ja(v,m,y);x!==void 0&&i.onValueChange(x.value)}),w=m=>{c||(i.onOpenChange(!0),g()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(wt,{asChild:!0,...a,children:l.jsx(k.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Za(i.value)?"":void 0,...r,ref:u,onClick:R(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&w(m)}),onPointerDown:R(r.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:R(r.onKeyDown,m=>{const v=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&xm.includes(m.key)&&(w(),m.preventDefault())})})})});Na.displayName=Ia;var Oa="SelectValue",ka=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:a,placeholder:i="",...c}=e,u=Ne(Oa,n),{onValueNodeHasChildrenChange:d}=u,f=a!==void 0,p=H(t,u.onValueNodeChange);return q(()=>{d(f)},[d,f]),l.jsx(k.span,{...c,ref:p,style:{pointerEvents:"none"},children:Za(u.value)?l.jsx(l.Fragment,{children:i}):a})});ka.displayName=Oa;var Rm="SelectIcon",Da=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(k.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Da.displayName=Rm;var _m="SelectPortal",ja=e=>l.jsx(We,{asChild:!0,...e});ja.displayName=_m;var $e="SelectContent",La=s.forwardRef((e,t)=>{const n=Ne($e,e.__scopeSelect),[o,r]=s.useState();if(q(()=>{r(new DocumentFragment)},[]),!n.open){const a=o;return a?pt.createPortal(l.jsx(Fa,{scope:e.__scopeSelect,children:l.jsx(fn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx($a,{...e,ref:t})});La.displayName=$e;var le=10,[Fa,Oe]=ot($e),Pm="SelectContentImpl",Tm=De("SelectContent.RemoveScroll"),$a=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,x=Ne($e,n),[C,b]=s.useState(null),[E,T]=s.useState(null),S=H(t,M=>b(M)),[A,j]=s.useState(null),[D,L]=s.useState(null),B=pn(n),[W,P]=s.useState(!1),$=s.useRef(!1);s.useEffect(()=>{if(C)return qt(C)},[C]),Yt();const N=s.useCallback(M=>{const[K,...J]=B().map(Y=>Y.ref.current),[U]=J.slice(-1),G=document.activeElement;for(const Y of M)if(Y===G||(Y?.scrollIntoView({block:"nearest"}),Y===K&&E&&(E.scrollTop=0),Y===U&&E&&(E.scrollTop=E.scrollHeight),Y?.focus(),document.activeElement!==G))return},[B,E]),F=s.useCallback(()=>N([A,C]),[N,A,C]);s.useEffect(()=>{W&&F()},[W,F]);const{onOpenChange:I,triggerPointerDownPosRef:_}=x;s.useEffect(()=>{if(C){let M={x:0,y:0};const K=U=>{M={x:Math.abs(Math.round(U.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(U.pageY)-(_.current?.y??0))}},J=U=>{M.x<=10&&M.y<=10?U.preventDefault():C.contains(U.target)||I(!1),document.removeEventListener("pointermove",K),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const M=()=>I(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[I]);const[z,X]=Qa(M=>{const K=B().filter(G=>!G.disabled),J=K.find(G=>G.ref.current===document.activeElement),U=Ja(K,M,J);U&&setTimeout(()=>U.ref.current.focus())}),Z=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&(j(M),U&&($.current=!0))},[x.value]),te=s.useCallback(()=>C?.focus(),[C]),Q=s.useCallback((M,K,J)=>{const U=!$.current&&!J;(x.value!==void 0&&x.value===K||U)&&L(M)},[x.value]),Ce=o==="popper"?$n:Ba,re=Ce===$n?{side:c,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:g,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(Fa,{scope:n,content:C,viewport:E,onViewportChange:T,itemRefCallback:Z,selectedItem:A,onItemLeave:te,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:D,position:o,isPositioned:W,searchRef:z,children:l.jsx(vt,{as:Tm,allowPinchZoom:!0,children:l.jsx(ht,{asChild:!0,trapped:x.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:R(r,M=>{x.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:l.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:M=>M.preventDefault(),...y,...re,onPlaced:()=>P(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,M=>{const K=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!K&&M.key.length===1&&X(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let U=B().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(M.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const G=M.target,Y=U.indexOf(G);U=U.slice(Y+1)}setTimeout(()=>N(U)),M.preventDefault()}})})})})})})});$a.displayName=Pm;var Mm="SelectItemAlignedPosition",Ba=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,a=Ne($e,n),i=Oe($e,n),[c,u]=s.useState(null),[d,f]=s.useState(null),p=H(t,S=>f(S)),h=pn(n),g=s.useRef(!1),w=s.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&m&&v&&y){const S=a.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),D=y.getBoundingClientRect();if(a.dir!=="rtl"){const G=D.left-A.left,Y=j.left-G,ie=S.left-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.left=yn+"px"}else{const G=A.right-D.right,Y=window.innerWidth-j.right-G,ie=window.innerWidth-S.right-Y,ke=S.width+ie,wn=Math.max(ke,A.width),xn=window.innerWidth-le,yn=Jo(Y,[le,Math.max(le,xn-wn)]);c.style.minWidth=ke+"px",c.style.right=yn+"px"}const L=h(),B=window.innerHeight-le*2,W=m.scrollHeight,P=window.getComputedStyle(d),$=parseInt(P.borderTopWidth,10),N=parseInt(P.paddingTop,10),F=parseInt(P.borderBottomWidth,10),I=parseInt(P.paddingBottom,10),_=$+N+W+I+F,z=Math.min(v.offsetHeight*5,_),X=window.getComputedStyle(m),Z=parseInt(X.paddingTop,10),te=parseInt(X.paddingBottom,10),Q=S.top+S.height/2-le,Ce=B-Q,re=v.offsetHeight/2,M=v.offsetTop+re,K=$+N+M,J=_-K;if(K<=Q){const G=L.length>0&&v===L[L.length-1].ref.current;c.style.bottom="0px";const Y=d.clientHeight-m.offsetTop-m.offsetHeight,ie=Math.max(Ce,re+(G?te:0)+Y+F),ke=K+ie;c.style.height=ke+"px"}else{const G=L.length>0&&v===L[0].ref.current;c.style.top="0px";const ie=Math.max(Q,$+m.offsetTop+(G?Z:0)+re)+J;c.style.height=ie+"px",m.scrollTop=K-Q+m.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=z+"px",c.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,c,d,m,v,y,a.dir,o]);q(()=>C(),[C]);const[b,E]=s.useState();q(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const T=s.useCallback(S=>{S&&w.current===!0&&(C(),x?.(),w.current=!1)},[C,x]);return l.jsx(Im,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:l.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:l.jsx(k.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Ba.displayName=Mm;var Am="SelectPopperPosition",$n=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...a}=e,i=mn(n);return l.jsx(rn,{...i,...a,ref:t,align:o,collisionPadding:r,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)"}})});$n.displayName=Am;var[Im,yo]=ot($e,{}),Bn="SelectViewport",Wa=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,a=Oe(Bn,n),i=yo(Bn,n),c=H(t,a.onViewportChange),u=s.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(fn.Slot,{scope:n,children:l.jsx(k.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=i;if(h?.current&&p){const g=Math.abs(u.current-f.scrollTop);if(g>0){const w=window.innerHeight-le*2,m=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),y=Math.max(m,v);if(y<w){const x=y+g,C=Math.min(w,x),b=x-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}u.current=f.scrollTop})})})]})});Wa.displayName=Bn;var Ha="SelectGroup",[Nm,Om]=ot(Ha),km=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ue();return l.jsx(Nm,{scope:n,id:r,children:l.jsx(k.div,{role:"group","aria-labelledby":r,...o,ref:t})})});km.displayName=Ha;var Va="SelectLabel",Dm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Om(Va,n);return l.jsx(k.div,{id:r.id,...o,ref:t})});Dm.displayName=Va;var Kt="SelectItem",[jm,Ka]=ot(Kt),Ua=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:a,...i}=e,c=Ne(Kt,n),u=Oe(Kt,n),d=c.value===o,[f,p]=s.useState(a??""),[h,g]=s.useState(!1),w=H(t,x=>u.itemRefCallback?.(x,o,r)),m=ue(),v=s.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(jm,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:s.useCallback(x=>{p(C=>C||(x?.textContent??"").trim())},[]),children:l.jsx(fn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(k.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:w,onFocus:R(i.onFocus,()=>g(!0)),onBlur:R(i.onBlur,()=>g(!1)),onClick:R(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:R(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:R(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:R(i.onPointerMove,x=>{v.current=x.pointerType,r?u.onItemLeave?.():v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(i.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:R(i.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(ym.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});Ua.displayName=Kt;var it="SelectItemText",Ga=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...a}=e,i=Ne(it,n),c=Oe(it,n),u=Ka(it,n),d=Sm(it,n),[f,p]=s.useState(null),h=H(t,y=>p(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),g=f?.textContent,w=s.useMemo(()=>l.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return q(()=>(m(w),()=>v(w)),[m,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(k.span,{id:u.textId,...a,ref:h}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});Ga.displayName=it;var za="SelectItemIndicator",Ya=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Ka(za,n).isSelected?l.jsx(k.span,{"aria-hidden":!0,...o,ref:t}):null});Ya.displayName=za;var Wn="SelectScrollUpButton",Lm=s.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=yo(Wn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});Lm.displayName=Wn;var Hn="SelectScrollDownButton",Fm=s.forwardRef((e,t)=>{const n=Oe(Hn,e.__scopeSelect),o=yo(Hn,e.__scopeSelect),[r,a]=s.useState(!1),i=H(t,o.onScrollButtonChange);return q(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,f=Math.ceil(u.scrollTop)<d;a(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?l.jsx(Xa,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});Fm.displayName=Hn;var Xa=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,a=Oe("SelectScrollButton",n),i=s.useRef(null),c=pn(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),q(()=>{c().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),l.jsx(k.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{u()})})}),$m="SelectSeparator",Bm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(k.div,{"aria-hidden":!0,...o,ref:t})});Bm.displayName=$m;var Vn="SelectArrow",Wm=s.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=mn(n),a=Ne(Vn,n),i=Oe(Vn,n);return a.open&&i.position==="popper"?l.jsx(sn,{...r,...o,ref:t}):null});Wm.displayName=Vn;var Hm="SelectBubbleInput",qa=s.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=s.useRef(null),a=H(o,r),i=Pr(t);return s.useEffect(()=>{const c=r.current;if(!c)return;const u=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(c,t),c.dispatchEvent(p)}},[i,t]),l.jsx(k.select,{...n,style:{...Ma,...n.style},ref:a,defaultValue:t})});qa.displayName=Hm;function Za(e){return e===""||e===void 0}function Qa(e){const t=ne(e),n=s.useRef(""),o=s.useRef(0),r=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,a]}function Ja(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Vm(e,Math.max(a,0));r.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function Vm(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Km=Aa,Um=Na,Gm=ka,zm=Da,Ym=ja,Xm=La,qm=Wa,Zm=Ua,Qm=Ga,Jm=Ya;const eh="_container_1ka3x_1",th="_label_1ka3x_9",nh="_trigger_1ka3x_16",oh="_icon_1ka3x_55",rh="_content_1ka3x_61",sh="_viewport_1ka3x_71",ah="_item_1ka3x_75",ih="_itemIndicator_1ka3x_93",ch="_error_1ka3x_106",lh="_helperText_1ka3x_112",he={container:eh,label:th,trigger:nh,icon:oh,content:rh,viewport:sh,item:ah,itemIndicator:ih,error:ch,helperText:lh},ei=({label:e,error:t,helperText:n,placeholder:o="Select an option...",children:r,...a})=>{const i=O.useId(),c=a.name||i,u=n?`${c}-helper-text`:void 0,d=t?`${c}-error`:void 0;return l.jsxs("div",{className:he.container,children:[e&&l.jsx("label",{htmlFor:c,className:he.label,children:e}),l.jsxs(Km,{...a,children:[l.jsxs(Um,{id:c,className:he.trigger,"aria-invalid":!!t,"aria-describedby":d||u,"data-has-error":!!t,children:[l.jsx(Gm,{placeholder:o}),l.jsx(zm,{className:he.icon,children:l.jsx(ir,{size:"md"})})]}),l.jsx(Ym,{children:l.jsx(Xm,{className:he.content,position:"popper",sideOffset:5,children:l.jsx(qm,{className:he.viewport,children:r})})})]}),t&&l.jsx("span",{id:d,className:he.error,children:t}),n&&!t&&l.jsx("span",{id:u,className:he.helperText,children:n})]})},ti=O.forwardRef(({children:e,className:t,...n},o)=>l.jsxs(Zm,{className:`${he.item} ${t??""}`,...n,ref:o,children:[l.jsx(Qm,{className:"label-1",children:e}),l.jsx(Jm,{className:he.itemIndicator,children:l.jsx(Ut,{size:"sm"})})]}));ti.displayName="SelectItem";ei.displayName="SelectInput";const uh="_container_1wksd_1",dh="_label_1wksd_8",fh="_inputWrapper_1wksd_15",ph="_textArea_1wksd_21",mh="_error_1wksd_60",hh="_helperText_1wksd_66",ze={container:uh,label:dh,inputWrapper:fh,textArea:ph,error:mh,helperText:hh},ni=O.forwardRef(({className:e,label:t,error:n,helperText:o,id:r,...a},i)=>{const c=O.useId(),u=r||c,d=o?`${u}-helper-text`:void 0,f=n?`${u}-error`:void 0;return l.jsxs("div",{className:`${ze.container} ${e??""}`,children:[t&&l.jsx("label",{htmlFor:u,className:ze.label,children:t}),l.jsx("div",{className:ze.inputWrapper,children:l.jsx("textarea",{ref:i,id:u,className:ze.textArea,"aria-invalid":!!n,"aria-describedby":f||d,"data-has-error":!!n,...a})}),n&&l.jsx("span",{id:f,className:ze.error,children:n}),o&&!n&&l.jsx("span",{id:d,className:ze.helperText,children:o})]})});ni.displayName="TextArea";var Co="ToastProvider",[bo,vh,gh]=Qt("Toast"),[oi]=pe("Toast",[gh]),[wh,hn]=oi(Co),ri=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:a=50,children:i}=e,[c,u]=s.useState(null),[d,f]=s.useState(0),p=s.useRef(!1),h=s.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Co}\`. Expected non-empty \`string\`.`),l.jsx(bo.Provider,{scope:t,children:l.jsx(wh,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:a,toastCount:d,viewport:c,onViewportChange:u,onToastAdd:s.useCallback(()=>f(g=>g+1),[]),onToastRemove:s.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:h,children:i})})};ri.displayName=Co;var si="ToastViewport",xh=["F8"],Kn="toast.viewportPause",Un="toast.viewportResume",ai=s.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=xh,label:r="Notifications ({hotkey})",...a}=e,i=hn(si,n),c=vh(n),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=H(t,p,i.onViewportChange),g=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;s.useEffect(()=>{const v=y=>{o.length!==0&&o.every(C=>y[C]||y.code===C)&&p.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[o]),s.useEffect(()=>{const v=u.current,y=p.current;if(w&&v&&y){const x=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Kn);y.dispatchEvent(T),i.isClosePausedRef.current=!0}},C=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(Un);y.dispatchEvent(T),i.isClosePausedRef.current=!1}},b=T=>{!v.contains(T.relatedTarget)&&C()},E=()=>{v.contains(document.activeElement)||C()};return v.addEventListener("focusin",x),v.addEventListener("focusout",b),v.addEventListener("pointermove",x),v.addEventListener("pointerleave",E),window.addEventListener("blur",x),window.addEventListener("focus",C),()=>{v.removeEventListener("focusin",x),v.removeEventListener("focusout",b),v.removeEventListener("pointermove",x),v.removeEventListener("pointerleave",E),window.removeEventListener("blur",x),window.removeEventListener("focus",C)}}},[w,i.isClosePausedRef]);const m=s.useCallback(({tabbingDirection:v})=>{const x=c().map(C=>{const b=C.ref.current,E=[b,...Nh(b)];return v==="forwards"?E:E.reverse()});return(v==="forwards"?x.reverse():x).flat()},[c]);return s.useEffect(()=>{const v=p.current;if(v){const y=x=>{const C=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!C){const E=document.activeElement,T=x.shiftKey;if(x.target===v&&T){d.current?.focus();return}const j=m({tabbingDirection:T?"backwards":"forwards"}),D=j.findIndex(L=>L===E);In(j.slice(D+1))?x.preventDefault():T?d.current?.focus():f.current?.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[c,m]),l.jsxs(bl,{ref:u,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&l.jsx(Gn,{ref:d,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});In(v)}}),l.jsx(bo.Slot,{scope:n,children:l.jsx(k.ol,{tabIndex:-1,...a,ref:h})}),w&&l.jsx(Gn,{ref:f,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});In(v)}})]})});ai.displayName=si;var ii="ToastFocusProxy",Gn=s.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,a=hn(ii,n);return l.jsx(dn,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{const c=i.relatedTarget;!a.viewport?.contains(c)&&o()}})});Gn.displayName=ii;var Et="Toast",yh="toast.swipeStart",Ch="toast.swipeMove",bh="toast.swipeCancel",Eh="toast.swipeEnd",ci=s.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:a,...i}=e,[c,u]=be({prop:o,defaultProp:r??!0,onChange:a,caller:Et});return l.jsx(oe,{present:n||c,children:l.jsx(_h,{open:c,...i,ref:t,onClose:()=>u(!1),onPause:ne(e.onPause),onResume:ne(e.onResume),onSwipeStart:R(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:R(e.onSwipeMove,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:R(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:R(e.onSwipeEnd,d=>{const{x:f,y:p}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),u(!1)})})})});ci.displayName=Et;var[Sh,Rh]=oi(Et,{onClose(){}}),_h=s.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:a,onClose:i,onEscapeKeyDown:c,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:h,onSwipeEnd:g,...w}=e,m=hn(Et,n),[v,y]=s.useState(null),x=H(t,P=>y(P)),C=s.useRef(null),b=s.useRef(null),E=r||m.duration,T=s.useRef(0),S=s.useRef(E),A=s.useRef(0),{onToastAdd:j,onToastRemove:D}=m,L=ne(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),B=s.useCallback(P=>{!P||P===1/0||(window.clearTimeout(A.current),T.current=new Date().getTime(),A.current=window.setTimeout(L,P))},[L]);s.useEffect(()=>{const P=m.viewport;if(P){const $=()=>{B(S.current),d?.()},N=()=>{const F=new Date().getTime()-T.current;S.current=S.current-F,window.clearTimeout(A.current),u?.()};return P.addEventListener(Kn,N),P.addEventListener(Un,$),()=>{P.removeEventListener(Kn,N),P.removeEventListener(Un,$)}}},[m.viewport,E,u,d,B]),s.useEffect(()=>{a&&!m.isClosePausedRef.current&&B(E)},[a,E,m.isClosePausedRef,B]),s.useEffect(()=>(j(),()=>D()),[j,D]);const W=s.useMemo(()=>v?hi(v):null,[v]);return m.viewport?l.jsxs(l.Fragment,{children:[W&&l.jsx(Ph,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:W}),l.jsx(Sh,{scope:n,onClose:L,children:pt.createPortal(l.jsx(bo.ItemSlot,{scope:n,children:l.jsx(Cl,{asChild:!0,onEscapeKeyDown:R(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(k.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:R(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:R(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:R(e.onPointerMove,P=>{if(!C.current)return;const $=P.clientX-C.current.x,N=P.clientY-C.current.y,F=!!b.current,I=["left","right"].includes(m.swipeDirection),_=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,z=I?_(0,$):0,X=I?0:_(0,N),Z=P.pointerType==="touch"?10:2,te={x:z,y:X},Q={originalEvent:P,delta:te};F?(b.current=te,Nt(Ch,p,Q,{discrete:!1})):er(te,m.swipeDirection,Z)?(b.current=te,Nt(yh,f,Q,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs($)>Z||Math.abs(N)>Z)&&(C.current=null)}),onPointerUp:R(e.onPointerUp,P=>{const $=b.current,N=P.target;if(N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),b.current=null,C.current=null,$){const F=P.currentTarget,I={originalEvent:P,delta:$};er($,m.swipeDirection,m.swipeThreshold)?Nt(Eh,g,I,{discrete:!0}):Nt(bh,h,I,{discrete:!0}),F.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Ph=e=>{const{__scopeToast:t,children:n,...o}=e,r=hn(Et,t),[a,i]=s.useState(!1),[c,u]=s.useState(!1);return Ah(()=>i(!0)),s.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:l.jsx(We,{asChild:!0,children:l.jsx(dn,{...o,children:a&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},Th="ToastTitle",li=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});li.displayName=Th;var Mh="ToastDescription",ui=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return l.jsx(k.div,{...o,ref:t})});ui.displayName=Mh;var di="ToastAction",fi=s.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?l.jsx(mi,{altText:n,asChild:!0,children:l.jsx(Eo,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${di}\`. Expected non-empty \`string\`.`),null)});fi.displayName=di;var pi="ToastClose",Eo=s.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Rh(pi,n);return l.jsx(mi,{asChild:!0,children:l.jsx(k.button,{type:"button",...o,ref:t,onClick:R(e.onClick,r.onClose)})})});Eo.displayName=pi;var mi=s.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return l.jsx(k.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function hi(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),Ih(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!r)if(a){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...hi(o))}}),t}function Nt(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Zn(r,a):r.dispatchEvent(a)}var er=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),a=o>r;return t==="left"||t==="right"?a&&o>n:!a&&r>n};function Ah(e=()=>{}){const t=ne(e);q(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function Ih(e){return e.nodeType===e.ELEMENT_NODE}function Nh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function In(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Oh=ri,kh=ai,Dh=ci,jh=li,Lh=ui,Fh=fi,$h=Eo;const Bh="_toast_1ga0s_1",Wh="_toastContent_1ga0s_12",Hh="_toastViewport_1ga0s_70",Vh="_toastTitle_1ga0s_89",Kh="_toastDescription_1ga0s_95",Ye={toast:Bh,toastContent:Wh,toastViewport:Hh,toastTitle:Vh,toastDescription:Kh},Uh=({...e})=>l.jsx(Oh,{...e}),vi=O.forwardRef(({...e},t)=>l.jsx(kh,{className:Ye.toastViewport,ref:t,...e}));vi.displayName="ToastViewport";const gi=O.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>l.jsxs(Dh,{className:Ye.toast,ref:r,...o,children:[l.jsxs("div",{className:Ye.toastContent,children:[l.jsx(jh,{className:Ye.toastTitle,children:e}),t&&l.jsx(Lh,{className:Ye.toastDescription,children:t})]}),n&&l.jsx(Fh,{className:Ye.toastAction,asChild:!0,altText:"Toast action",children:n}),l.jsx($h,{asChild:!0,children:l.jsx(mt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));gi.displayName="Toast";var[vn]=pe("Tooltip",[Ae]),gn=Ae(),wi="TooltipProvider",Gh=700,zn="tooltip.open",[zh,So]=vn(wi),xi=e=>{const{__scopeTooltip:t,delayDuration:n=Gh,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(zh,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:a})};xi.displayName=wi;var ft="Tooltip",[Yh,St]=vn(ft),yi=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=So(ft,e.__scopeTooltip),d=gn(t),[f,p]=s.useState(null),h=ue(),g=s.useRef(0),w=i??u.disableHoverableContent,m=c??u.delayDuration,v=s.useRef(!1),[y,x]=be({prop:o,defaultProp:r??!1,onChange:S=>{S?(u.onOpen(),document.dispatchEvent(new CustomEvent(zn))):u.onClose(),a?.(S)},caller:ft}),C=s.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,x(!0)},[x]),E=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,x(!0),g.current=0},m)},[m,x]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(on,{...d,children:l.jsx(Yh,{scope:t,contentId:h,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?T():b()},[u.isOpenDelayedRef,T,b]),onTriggerLeave:s.useCallback(()=>{w?E():(window.clearTimeout(g.current),g.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};yi.displayName=ft;var Yn="TooltipTrigger",Ci=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=St(Yn,n),a=So(Yn,n),i=gn(n),c=s.useRef(null),u=H(t,c,r.onTriggerChange),d=s.useRef(!1),f=s.useRef(!1),p=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(wt,{asChild:!0,...i,children:l.jsx(k.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:u,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:R(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});Ci.displayName=Yn;var Ro="TooltipPortal",[Xh,qh]=vn(Ro,{forceMount:void 0}),bi=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,a=St(Ro,t);return l.jsx(Xh,{scope:t,forceMount:n,children:l.jsx(oe,{present:n||a.open,children:l.jsx(We,{asChild:!0,container:r,children:o})})})};bi.displayName=Ro;var et="TooltipContent",Ei=s.forwardRef((e,t)=>{const n=qh(et,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...a}=e,i=St(et,e.__scopeTooltip);return l.jsx(oe,{present:o||i.open,children:i.disableHoverableContent?l.jsx(Si,{side:r,...a,ref:t}):l.jsx(Zh,{side:r,...a,ref:t})})}),Zh=s.forwardRef((e,t)=>{const n=St(et,e.__scopeTooltip),o=So(et,e.__scopeTooltip),r=s.useRef(null),a=H(t,r),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,f=r.current,{onPointerInTransitChange:p}=o,h=s.useCallback(()=>{c(null),p(!1)},[p]),g=s.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},x=tv(y,v.getBoundingClientRect()),C=nv(y,x),b=ov(m.getBoundingClientRect()),E=sv([...C,...b]);c(E),p(!0)},[p]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(u&&f){const w=v=>g(v,f),m=v=>g(v,u);return u.addEventListener("pointerleave",w),f.addEventListener("pointerleave",m),()=>{u.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",m)}}},[u,f,g,h]),s.useEffect(()=>{if(i){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},x=u?.contains(v)||f?.contains(v),C=!rv(y,i);x?h():C&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,f,i,d,h]),l.jsx(Si,{...e,ref:a})}),[Qh,Jh]=vn(ft,{isInside:!1}),ev=Zc("TooltipContent"),Si=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=St(et,n),d=gn(n),{onClose:f}=u;return s.useEffect(()=>(document.addEventListener(zn,f),()=>document.removeEventListener(zn,f)),[f]),s.useEffect(()=>{if(u.trigger){const p=h=>{h.target?.contains(u.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[u.trigger,f]),l.jsx(Be,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(rn,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ev,{children:o}),l.jsx(Qh,{scope:n,isInside:!0,children:l.jsx(wm,{id:u.contentId,role:"tooltip",children:r||o})})]})})});Ei.displayName=et;var Ri="TooltipArrow",_i=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=gn(n);return Jh(Ri,n).isInside?null:l.jsx(sn,{...r,...o,ref:t})});_i.displayName=Ri;function tv(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,o,r,a)){case a:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function nv(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function ov(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function rv(e,t){const{x:n,y:o}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,f=c.y,p=u.x,h=u.y;f>o!=h>o&&n<(p-d)*(o-f)/(h-f)+d&&(r=!r)}return r}function sv(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),av(t)}function av(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(r.y-i.y)>=(a.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var iv=xi,cv=yi,lv=Ci,uv=bi,dv=Ei,fv=_i;const pv="_tooltipContent_17t5h_1",mv="_tooltipArrow_17t5h_12",tr={tooltipContent:pv,tooltipArrow:mv},hv=({...e})=>l.jsx(iv,{...e});function vv({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...a}){return t===void 0?l.jsx(l.Fragment,{children:e}):l.jsxs(cv,{open:n,defaultOpen:o,onOpenChange:i=>{r?.(i)},disableHoverableContent:!0,delayDuration:200,children:[l.jsx(lv,{asChild:!0,children:e}),l.jsx(uv,{children:l.jsxs(dv,{className:tr.tooltipContent,...a,sideOffset:4,children:[t,l.jsx(fv,{className:tr.tooltipArrow})]})})]})}exports.ArrowLeft=rr;exports.ArrowRight=sr;exports.Badge=Mi;exports.Button=mt;exports.Calendar=ar;exports.Check=Ut;exports.Checkbox=dl;exports.ChevronDown=ir;exports.ChevronLeft=Lc;exports.ChevronRight=Fc;exports.ChevronUp=$c;exports.Circle=cr;exports.Close=Xn;exports.Coffee=lr;exports.Dialog=Fu;exports.EmptyState=Wu;exports.ExternalLink=ur;exports.Gear=dr;exports.Hammer=fr;exports.Heart=pr;exports.IconMap=Ze;exports.Inbox=mr;exports.Input=ds;exports.Kebab=vr;exports.Lamp=hr;exports.Lightning=gr;exports.LogIn=wr;exports.LogOut=xr;exports.Mail=yr;exports.Menu=Cr;exports.MenuButton=qp;exports.MenuButtonItem=Zp;exports.NoMobile=br;exports.Pencil=Er;exports.Plus=Sr;exports.Popover=vm;exports.SelectInput=ei;exports.SelectItem=ti;exports.Signpost=Rr;exports.Spinner=qn;exports.SunMoon=_r;exports.TextArea=ni;exports.Toast=gi;exports.ToastProvider=Uh;exports.ToastViewport=vi;exports.Tooltip=vv;exports.TooltipProvider=hv;exports.createIcon=V;exports.dialogSizes=Lu;exports.iconSizes=jc;
|