@ryanodd/design-system 0.1.0-dev2 → 0.1.0-dev3
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 +8 -8
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +158 -158
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 i=ho(k),sn=ho(mo),Qs="_button_w6zk1_1",Js="_buttonNotificationDot_w6zk1_143",Fn={button:Qs,buttonNotificationDot:Js},ei=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ti=k.forwardRef(ei),ni=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),oi=k.forwardRef(ni),ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),si=k.forwardRef(ri),ii=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),ai=k.forwardRef(ii),ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),li=k.forwardRef(ci),ui=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),di=k.forwardRef(ui),fi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"M31.23 17.736c.063-.57.103-1.148.103-1.736s-.04-1.166-.104-1.737l-4.378-1.557c-.218-.716-.504-1.4-.85-2.05l1.992-4.192a15.6 15.6 0 0 0-2.458-2.46L21.343 6a11 11 0 0 0-2.05-.85L17.737.772C17.166.708 16.588.667 16 .667s-1.166.04-1.737.105L12.707 5.15q-1.075.327-2.05.85L6.464 4.004c-.91.725-1.734 1.55-2.46 2.46L6 10.654q-.523.976-.85 2.05l-4.378 1.56c-.064.57-.105 1.15-.105 1.737s.04 1.165.105 1.736l4.378 1.558q.327 1.074.85 2.05l-1.995 4.192c.725.91 1.55 1.733 2.46 2.458L10.654 26q.976.523 2.05.852l1.558 4.377c.57.063 1.148.103 1.737.103c.588 0 1.165-.04 1.736-.104l1.558-4.378c.715-.218 1.4-.504 2.05-.85l4.192 1.992c.91-.725 1.733-1.55 2.458-2.458L26 21.343c.348-.647.634-1.334.852-2.05l4.377-1.557zM16 20.87a4.871 4.871 0 1 1-.002-9.742A4.871 4.871 0 0 1 16 20.87"})),pi=k.forwardRef(fi),mi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),i.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"}))),hi=k.forwardRef(mi),vi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),gi=k.forwardRef(vi),wi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},i.createElement("circle",{cx:8,cy:2.5,r:.75}),i.createElement("circle",{cx:8,cy:8,r:.75}),i.createElement("circle",{cx:8,cy:13.5,r:.75}))),xi=k.forwardRef(wi),yi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),bi=k.forwardRef(yi),Ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),i.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Ei=k.forwardRef(Ci),Ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Ti=k.forwardRef(Ri),Si=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),Pi=k.forwardRef(Si),_i=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),Mi=k.forwardRef(_i),Ai="_icon_178c1_1",Oi={icon:Ai},Di=["xs","sm","md","lg","xl","2xl","3xl","4xl"],K=(e,t)=>{const n=k.forwardRef(({size:o="lg",className:r,...s},a)=>p.jsx(e,{className:`${r} ${Oi.icon}`,"data-size":o,ref:a,alt:t,...s}));return n.displayName=t,n},vo=K(ti,"Left"),go=K(oi,"Right"),an=K(si,"Check"),wo=K(ai,"Circle"),cn=K(li,"Close"),xo=K(di,"External Link"),yo=K(pi,"Gear"),bo=K(hi,"Hammer"),Co=K(gi,"Heart"),Eo=K(xi,"Kebab"),Ro=K(bi,"Lightning"),To=K(Ei,"Mail"),So=K(Ti,"Menu"),Po=K(Pi,"No Mobile Devices"),_o=K(Mi,"Pencil"),Ut={ArrowLeft:vo,ArrowRight:go,Check:an,Circle:wo,Close:cn,ExternalLink:xo,Gear:yo,Hammer:bo,Heart:Co,Kebab:Eo,Lightning:Ro,Mail:To,Menu:So,NoMobile:Po,Pencil:_o,None:null},Ni="_spinnerWrapper_1mfc7_1",Ii="_spinner_1mfc7_1",$n={spinnerWrapper:Ni,spinner:Ii},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 Ve=k.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:s="medium",variant:a,loading:c,iconOnly:d,...l},u)=>{const f=o?Ut[o]:void 0,h=r?Ut[r]:void 0,v=s==="small"?"sm":s==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":s,"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})]})});Ve.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Bn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Bn(e[r],null)}}}}function W(...e){return i.useCallback(wt(...e),e)}function ki(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,d=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:d,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),d=n.length;n=[...n,a];const l=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[d]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};l.displayName=s+"Provider";function u(f,h){const v=h?.[e]?.[d]||c,w=i.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const d=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,Li(r,...t)]}function Li(...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(s){const a=o.reduce((c,{useScope:d,scopeName:l})=>{const f=d(s)[`__scope${l}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ce=globalThis?.document?i.useLayoutEffect:()=>{},ji=i[" useInsertionEffect ".trim().toString()]||ce;function Oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Fi({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:r;{const u=i.useRef(e!==void 0);i.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=i.useCallback(u=>{if(c){const f=$i(u)?u(e):u;f!==e&&a.current?.(f)}else s(u)},[c,e,s,a]);return[d,l]}function Fi({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return ji(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function $i(e){return typeof e=="function"}function Bi(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mo(e){const[t,n]=i.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 s=r[0];let a,c;if("borderBoxSize"in s){const d=s.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 Wi(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Hi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=W(o.ref,Vi(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Z.displayName="Presence";function Hi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,d]=Wi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=et(o.current);s.current=c==="mounted"?l:"none"},[c]),ce(()=>{const l=o.current,u=r.current;if(u!==e){const h=s.current,v=et(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=et(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&&(s.current=et(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:i.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function et(e){return e?.animationName||"none"}function Vi(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=Ki(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),d=c.find(Gi);if(d){const l=d.props.children,u=c.map(f=>f===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(l)?i.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ki(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Yi(r),c=zi(s,r.props);return r.type!==i.Fragment&&(c.ref=o?wt(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ao=Symbol("radix.slottable");function Ui(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ao,t}function Gi(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ao}function zi(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const d=s(...c);return r(...c),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Yi(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 Xi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Xi.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var xt="Checkbox",[qi]=de(xt),[Zi,dn]=qi(xt);function Qi(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:a,name:c,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[h,v]=Oe({prop:n,defaultProp:r??!1,onChange:d,caller:xt}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:s,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(Zi,{scope:t,...C,children:Ji(f)?f(C):o})}var Oo="CheckboxTrigger",Do=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:a,disabled:c,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=dn(Oo,e),m=W(r,u),g=i.useRef(d);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":Fo(d),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(y=>me(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Do.displayName=Oo;var No=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(Qi,{__scopeCheckbox:n,checked:r,defaultChecked:s,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(Do,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(jo,{__scopeCheckbox:n})]})})});No.displayName=xt;var Io="CheckboxIndicator",ko=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=dn(Io,n);return p.jsx(Z,{present:o||me(s.checked)||s.checked===!0,children:p.jsx(I.span,{"data-state":Fo(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ko.displayName=Io;var Lo="CheckboxBubbleInput",jo=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:a,required:c,disabled:d,name:l,value:u,form:f,bubbleInput:h,setBubbleInput:v}=dn(Lo,e),w=W(n,v),m=Bi(s),g=Mo(o);i.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,T=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:T});y.indeterminate=me(s),E.call(y,me(s)?!1:s),y.dispatchEvent(R)}},[h,m,s,r]);const x=i.useRef(me(s)?!1:s);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%)"}})});jo.displayName=Lo;function Ji(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function Fo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const ea="_checkboxRow_5ztin_1",ta="_checkboxRoot_5ztin_7",na="_checkboxIndicator_5ztin_19",oa="_checkboxCheckmarkIcon_5ztin_29",ra="_checkboxLabel_5ztin_35",ke={checkboxRow:ea,checkboxRoot:ta,checkboxIndicator:na,checkboxCheckmarkIcon:oa,checkboxLabel:ra},sa=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:ke.checkboxRow,children:[p.jsx(No,{checked:n,onCheckedChange:r=>{o(r===!0)},className:ke.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(ko,{className:ke.checkboxIndicator,children:p.jsx(an,{className:ke.checkboxCheckmarkIcon})})}),p.jsx("label",{className:ke.checkboxLabel,htmlFor:e,children:t})]});var ia=i[" useId ".trim().toString()]||(()=>{}),aa=0;function we(e){const[t,n]=i.useState(ia());return ce(()=>{n(o=>o??String(aa++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function ca(e,t=globalThis?.document){const n=Y(e);i.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 la="DismissableLayer",Gt="dismissableLayer.update",ua="dismissableLayer.pointerDownOutside",da="dismissableLayer.focusOutside",Wn,$o=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...d}=e,l=i.useContext($o),[u,f]=i.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=i.useState({}),w=W(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=pa(R=>{const M=R.target,N=[...l.branches].some(D=>D.contains(M));!C||N||(r?.(R),a?.(R),R.defaultPrevented||c?.())},h),T=ma(R=>{const M=R.target;[...l.branches].some(D=>D.contains(M))||(s?.(R),a?.(R),R.defaultPrevented||c?.())},h);return ca(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),i.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]),i.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),i.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:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});Ke.displayName=la;var fa="DismissableLayerBranch",Bo=i.forwardRef((e,t)=>{const n=i.useContext($o),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Bo.displayName=fa;function pa(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let d=function(){Wo(ua,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",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ma(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(da,n,{originalEvent:s},{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 Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var ha=Ke,va=Bo,It="focusScope.autoFocusOnMount",kt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},ga="FocusScope",fn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,d]=i.useState(null),l=Y(r),u=Y(s),f=i.useRef(null),h=W(t,m=>d(m)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.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]),i.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||(wa(Ea(Ho(c)),{select:!0}),document.activeElement===m&&pe(c))}return()=>{c.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(kt,Vn);c.addEventListener(kt,u),c.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),c.removeEventListener(kt,u),Un.remove(v)},0)}}},[c,l,u,v]);const w=i.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]=xa(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=ga;function wa(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function xa(e){const t=Ho(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Ho(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(!ya(n,{upTo:t}))return n}function ya(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 ba(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&&ba(e)&&t&&e.select()}}var Un=Ca();function Ca(){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 Ea(e){return e.filter(t=>t.tagName!=="A")}var Ra="Portal",Ue=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);ce(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?mo.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});Ue.displayName=Ra;var Lt=0;function Vo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oe.apply(this,arguments)};function Ko(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 Ta(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var ct="right-scroll-bar-position",lt="width-before-scroll-bar",Sa="with-scroll-bars-hidden",Pa="--removed-body-scroll-bar-size";function jt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _a(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 Ma=typeof window<"u"?i.useLayoutEffect:i.useEffect,Yn=new WeakMap;function Aa(e,t){var n=_a(null,function(o){return e.forEach(function(r){return jt(r,o)})});return Ma(function(){var o=Yn.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||jt(c,null)}),s.forEach(function(c){r.has(c)||jt(c,a)})}Yn.set(n,e)},[e]),n}function Oa(e){return e}function Da(e,t){t===void 0&&(t=Oa);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(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var d=function(){var u=a;a=[],u.forEach(s)},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 Na(e){e===void 0&&(e={});var t=Da(null);return t.options=oe({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Ko(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 i.createElement(o,oe({},n))};Uo.isSideCarExport=!0;function Ia(e,t){return e.useMedium(t),Uo}var Go=Na(),Ft=function(){},yt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],s=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=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=Aa([n,t]),R=oe(oe({},C),r);return i.createElement(i.Fragment,null,u&&i.createElement(E,{sideCar:Go,removeScrollBar:l,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),oe(oe({},R),{ref:T})):i.createElement(y,oe({},R,{className:d,ref:T}),c))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:lt,zeroRight:ct};var ka=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function La(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ka();return t&&e.setAttribute("nonce",t),e}function ja(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $a=function(){var e=0,t=null;return{add:function(n){e==0&&(t=La())&&(ja(t,n),Fa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ba=function(){var e=$a();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=Ba(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Wa={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Ha=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[$t(n),$t(o),$t(r)]},Va=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wa;var t=Ha(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])}},Ka=zo(),Pe="data-scroll-locked",Ua=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
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 i=ho(k),sn=ho(mo),Qs="_button_w6zk1_1",Js="_buttonNotificationDot_w6zk1_143",Fn={button:Qs,buttonNotificationDot:Js},ei=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m12 19l-7-7l7-7m7 7H5"})),ti=k.forwardRef(ei),ni=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14m-7-7l7 7l-7 7"})),oi=k.forwardRef(ni),ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),si=k.forwardRef(ri),ii=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("circle",{cx:12,cy:12,r:10,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})),ai=k.forwardRef(ii),ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 6L6 18M6 6l12 12"})),li=k.forwardRef(ci),ui=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),di=k.forwardRef(ui),fi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"currentColor",d:"M31.23 17.736c.063-.57.103-1.148.103-1.736s-.04-1.166-.104-1.737l-4.378-1.557c-.218-.716-.504-1.4-.85-2.05l1.992-4.192a15.6 15.6 0 0 0-2.458-2.46L21.343 6a11 11 0 0 0-2.05-.85L17.737.772C17.166.708 16.588.667 16 .667s-1.166.04-1.737.105L12.707 5.15q-1.075.327-2.05.85L6.464 4.004c-.91.725-1.734 1.55-2.46 2.46L6 10.654q-.523.976-.85 2.05l-4.378 1.56c-.064.57-.105 1.15-.105 1.737s.04 1.165.105 1.736l4.378 1.558q.327 1.074.85 2.05l-1.995 4.192c.725.91 1.55 1.733 2.46 2.458L10.654 26q.976.523 2.05.852l1.558 4.377c.57.063 1.148.103 1.737.103c.588 0 1.165-.04 1.736-.104l1.558-4.378c.715-.218 1.4-.504 2.05-.85l4.192 1.992c.91-.725 1.733-1.55 2.458-2.458L26 21.343c.348-.647.634-1.334.852-2.05l4.377-1.557zM16 20.87a4.871 4.871 0 1 1-.002-9.742A4.871 4.871 0 0 1 16 20.87"})),pi=k.forwardRef(fi),mi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("path",{d:"m15 12l-8.373 8.373a1 1 0 1 1-3-3L12 9m6 6l4-4"}),i.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"}))),hi=k.forwardRef(mi),vi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),gi=k.forwardRef(vi),wi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},i.createElement("circle",{cx:8,cy:2.5,r:.75}),i.createElement("circle",{cx:8,cy:8,r:.75}),i.createElement("circle",{cx:8,cy:13.5,r:.75}))),xi=k.forwardRef(wi),yi=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),bi=k.forwardRef(yi),Ci=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2},i.createElement("rect",{width:20,height:16,x:2,y:4,rx:2}),i.createElement("path",{d:"m22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}))),Ei=k.forwardRef(Ci),Ri=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 12h16M4 6h16M4 18h16"})),Ti=k.forwardRef(Ri),Si=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),Pi=k.forwardRef(Si),_i=({title:e,titleId:t,...n},o)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?i.createElement("title",{id:t},e):null,i.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"})),Mi=k.forwardRef(_i),Ai="_icon_178c1_1",Oi={icon:Ai},Di=["xs","sm","md","lg","xl","2xl","3xl","4xl"],K=(e,t)=>{const n=k.forwardRef(({size:o="lg",className:r,...s},a)=>p.jsx(e,{className:`${r} ${Oi.icon}`,"data-size":o,ref:a,alt:t,...s}));return n.displayName=t,n},vo=K(ti,"Left"),go=K(oi,"Right"),an=K(si,"Check"),wo=K(ai,"Circle"),cn=K(li,"Close"),xo=K(di,"External Link"),yo=K(pi,"Gear"),bo=K(hi,"Hammer"),Co=K(gi,"Heart"),Eo=K(xi,"Kebab"),Ro=K(bi,"Lightning"),To=K(Ei,"Mail"),So=K(Ti,"Menu"),Po=K(Pi,"No Mobile Devices"),_o=K(Mi,"Pencil"),Ut={ArrowLeft:vo,ArrowRight:go,Check:an,Circle:wo,Close:cn,ExternalLink:xo,Gear:yo,Hammer:bo,Heart:Co,Kebab:Eo,Lightning:Ro,Mail:To,Menu:So,NoMobile:Po,Pencil:_o,None:null},Ni="_spinnerWrapper_1mfc7_1",Ii="_spinner_1mfc7_1",$n={spinnerWrapper:Ni,spinner:Ii},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 gt=k.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:s="medium",variant:a,loading:c,iconOnly:d,...l},u)=>{const f=o?Ut[o]:void 0,h=r?Ut[r]:void 0,v=s==="small"?"sm":s==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":s,"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})]})});gt.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Bn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Bn(e[r],null)}}}}function W(...e){return i.useCallback(wt(...e),e)}function ki(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,d=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:d,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),d=n.length;n=[...n,a];const l=f=>{const{scope:h,children:v,...w}=f,m=h?.[e]?.[d]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:v})};l.displayName=s+"Provider";function u(f,h){const v=h?.[e]?.[d]||c,w=i.useContext(v);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const d=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return r.scopeName=e,[o,Li(r,...t)]}function Li(...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(s){const a=o.reduce((c,{useScope:d,scopeName:l})=>{const f=d(s)[`__scope${l}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ce=globalThis?.document?i.useLayoutEffect:()=>{},ji=i[" useInsertionEffect ".trim().toString()]||ce;function Oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Fi({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:r;{const u=i.useRef(e!==void 0);i.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=i.useCallback(u=>{if(c){const f=$i(u)?u(e):u;f!==e&&a.current?.(f)}else s(u)},[c,e,s,a]);return[d,l]}function Fi({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return ji(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function $i(e){return typeof e=="function"}function Bi(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mo(e){const[t,n]=i.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 s=r[0];let a,c;if("borderBoxSize"in s){const d=s.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 Wi(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Hi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=W(o.ref,Vi(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Z.displayName="Presence";function Hi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,d]=Wi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=Je(o.current);s.current=c==="mounted"?l:"none"},[c]),ce(()=>{const l=o.current,u=r.current;if(u!==e){const h=s.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&&(s.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:i.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function Je(e){return e?.animationName||"none"}function Vi(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=Ki(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),d=c.find(Gi);if(d){const l=d.props.children,u=c.map(f=>f===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(l)?i.cloneElement(l,void 0,u):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ki(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Yi(r),c=zi(s,r.props);return r.type!==i.Fragment&&(c.ref=o?wt(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ao=Symbol("radix.slottable");function Ui(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ao,t}function Gi(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ao}function zi(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const d=s(...c);return r(...c),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Yi(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 Xi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Xi.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var xt="Checkbox",[qi]=de(xt),[Zi,dn]=qi(xt);function Qi(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:a,name:c,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[h,v]=Oe({prop:n,defaultProp:r??!1,onChange:d,caller:xt}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),b=w?!!a||!!w.closest("form"):!0,C={checked:h,disabled:s,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(Zi,{scope:t,...C,children:Ji(f)?f(C):o})}var Oo="CheckboxTrigger",Do=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:a,disabled:c,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:w}=dn(Oo,e),m=W(r,u),g=i.useRef(d);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":Fo(d),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(y=>me(y)?!0:!y),w&&v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Do.displayName=Oo;var No=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(Qi,{__scopeCheckbox:n,checked:r,defaultChecked:s,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(Do,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(jo,{__scopeCheckbox:n})]})})});No.displayName=xt;var Io="CheckboxIndicator",ko=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=dn(Io,n);return p.jsx(Z,{present:o||me(s.checked)||s.checked===!0,children:p.jsx(I.span,{"data-state":Fo(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ko.displayName=Io;var Lo="CheckboxBubbleInput",jo=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:a,required:c,disabled:d,name:l,value:u,form:f,bubbleInput:h,setBubbleInput:v}=dn(Lo,e),w=W(n,v),m=Bi(s),g=Mo(o);i.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,T=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:T});y.indeterminate=me(s),E.call(y,me(s)?!1:s),y.dispatchEvent(R)}},[h,m,s,r]);const x=i.useRef(me(s)?!1:s);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%)"}})});jo.displayName=Lo;function Ji(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function Fo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const ea="_checkboxRow_5ztin_1",ta="_checkboxRoot_5ztin_7",na="_checkboxIndicator_5ztin_19",oa="_checkboxCheckmarkIcon_5ztin_29",ra="_checkboxLabel_5ztin_35",ke={checkboxRow:ea,checkboxRoot:ta,checkboxIndicator:na,checkboxCheckmarkIcon:oa,checkboxLabel:ra},sa=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:ke.checkboxRow,children:[p.jsx(No,{checked:n,onCheckedChange:r=>{o(r===!0)},className:ke.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(ko,{className:ke.checkboxIndicator,children:p.jsx(an,{className:ke.checkboxCheckmarkIcon})})}),p.jsx("label",{className:ke.checkboxLabel,htmlFor:e,children:t})]});var ia=i[" useId ".trim().toString()]||(()=>{}),aa=0;function we(e){const[t,n]=i.useState(ia());return ce(()=>{n(o=>o??String(aa++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function ca(e,t=globalThis?.document){const n=Y(e);i.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 la="DismissableLayer",Gt="dismissableLayer.update",ua="dismissableLayer.pointerDownOutside",da="dismissableLayer.focusOutside",Wn,$o=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ve=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...d}=e,l=i.useContext($o),[u,f]=i.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=i.useState({}),w=W(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=pa(R=>{const M=R.target,N=[...l.branches].some(D=>D.contains(M));!C||N||(r?.(R),a?.(R),R.defaultPrevented||c?.())},h),T=ma(R=>{const M=R.target;[...l.branches].some(D=>D.contains(M))||(s?.(R),a?.(R),R.defaultPrevented||c?.())},h);return ca(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},h),i.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]),i.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),i.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:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});Ve.displayName=la;var fa="DismissableLayerBranch",Bo=i.forwardRef((e,t)=>{const n=i.useContext($o),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Bo.displayName=fa;function pa(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let d=function(){Wo(ua,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",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ma(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(da,n,{originalEvent:s},{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 Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var ha=Ve,va=Bo,It="focusScope.autoFocusOnMount",kt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},ga="FocusScope",fn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,d]=i.useState(null),l=Y(r),u=Y(s),f=i.useRef(null),h=W(t,m=>d(m)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.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]),i.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||(wa(Ea(Ho(c)),{select:!0}),document.activeElement===m&&pe(c))}return()=>{c.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(kt,Vn);c.addEventListener(kt,u),c.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),c.removeEventListener(kt,u),Un.remove(v)},0)}}},[c,l,u,v]);const w=i.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]=xa(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=ga;function wa(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function xa(e){const t=Ho(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Ho(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(!ya(n,{upTo:t}))return n}function ya(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 ba(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&&ba(e)&&t&&e.select()}}var Un=Ca();function Ca(){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 Ea(e){return e.filter(t=>t.tagName!=="A")}var Ra="Portal",Ke=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);ce(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?mo.createPortal(p.jsx(I.div,{...o,ref:t}),a):null});Ke.displayName=Ra;var Lt=0;function Vo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oe.apply(this,arguments)};function Ko(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 Ta(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",ct="width-before-scroll-bar",Sa="with-scroll-bars-hidden",Pa="--removed-body-scroll-bar-size";function jt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _a(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 Ma=typeof window<"u"?i.useLayoutEffect:i.useEffect,Yn=new WeakMap;function Aa(e,t){var n=_a(null,function(o){return e.forEach(function(r){return jt(r,o)})});return Ma(function(){var o=Yn.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||jt(c,null)}),s.forEach(function(c){r.has(c)||jt(c,a)})}Yn.set(n,e)},[e]),n}function Oa(e){return e}function Da(e,t){t===void 0&&(t=Oa);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(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var d=function(){var u=a;a=[],u.forEach(s)},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 Na(e){e===void 0&&(e={});var t=Da(null);return t.options=oe({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Ko(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 i.createElement(o,oe({},n))};Uo.isSideCarExport=!0;function Ia(e,t){return e.useMedium(t),Uo}var Go=Na(),Ft=function(){},yt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],s=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=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,T=Aa([n,t]),R=oe(oe({},C),r);return i.createElement(i.Fragment,null,u&&i.createElement(E,{sideCar:Go,removeScrollBar:l,shards:f,noRelative:v,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),oe(oe({},R),{ref:T})):i.createElement(y,oe({},R,{className:d,ref:T}),c))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:ct,zeroRight:at};var ka=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function La(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ka();return t&&e.setAttribute("nonce",t),e}function ja(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Fa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $a=function(){var e=0,t=null;return{add:function(n){e==0&&(t=La())&&(ja(t,n),Fa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ba=function(){var e=$a();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=Ba(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Wa={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Ha=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[$t(n),$t(o),$t(r)]},Va=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wa;var t=Ha(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])}},Ka=zo(),Pe="data-scroll-locked",Ua=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Sa,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(c,"px ").concat(o,`;
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(at,` {
|
|
20
20
|
right: `).concat(c,"px ").concat(o,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(ct,` {
|
|
24
24
|
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(at," .").concat(at,` {
|
|
28
28
|
right: 0 `).concat(o,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(ct," .").concat(ct,` {
|
|
32
32
|
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body[`).concat(Pe,`] {
|
|
36
36
|
`).concat(Pa,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},Xn=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},Ga=function(){i.useEffect(function(){return document.body.setAttribute(Pe,(Xn()+1).toString()),function(){var e=Xn()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},za=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ga();var s=i.useMemo(function(){return Va(r)},[r]);return i.createElement(Ka,{styles:Ua(s,!t,r,n?"":"!important")})},zt=!1;if(typeof window<"u")try{var
|
|
38
|
+
`)},Xn=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},Ga=function(){i.useEffect(function(){return document.body.setAttribute(Pe,(Xn()+1).toString()),function(){var e=Xn()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},za=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Ga();var s=i.useMemo(function(){return Va(r)},[r]);return i.createElement(Ka,{styles:Ua(s,!t,r,n?"":"!important")})},zt=!1;if(typeof window<"u")try{var et=Object.defineProperty({},"passive",{get:function(){return zt=!0,!0}});window.addEventListener("test",et,et),window.removeEventListener("test",et,et)}catch{zt=!1}var Ee=zt?{passive:!1}:!1,Ya=function(e){return e.tagName==="TEXTAREA"},Yo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ya(e)&&n[t]==="visible")},Xa=function(e){return Yo(e,"overflowY")},qa=function(e){return Yo(e,"overflowX")},qn=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Xo(e,o);if(r){var s=qo(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Za=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Qa=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Xo=function(e,t){return e==="v"?Xa(t):qa(t)},qo=function(e,t){return e==="v"?Za(t):Qa(t)},Ja=function(e,t){return e==="h"&&t==="rtl"?-1:1},ec=function(e,t,n,o,r){var s=Ja(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,d=t.contains(c),l=!1,u=a>0,f=0,h=0;do{if(!c)break;var v=qo(e,c),w=v[0],m=v[1],g=v[2],x=m-g-s*w;(w||x)&&Xo(e,c)&&(f+=x,h+=w);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(l=!0),l},tt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zn=function(e){return[e.deltaX,e.deltaY]},Qn=function(e){return e&&"current"in e?e.current:e},tc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nc=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},oc=0,Re=[];function rc(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(oc++)[0],s=i.useState(zo)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Ta([e.lockRef.current],(e.shards||[]).map(Qn),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var x=
|
|
41
|
+
`)},oc=0,Re=[];function rc(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(oc++)[0],s=i.useState(zo)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Ta([e.lockRef.current],(e.shards||[]).map(Qn),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var x=tt(m),y=n.current,b="deltaX"in m?m.deltaX:y[0]-x[0],C="deltaY"in m?m.deltaY:y[1]-x[1],E,T=m.target,R=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in m&&R==="h"&&T.type==="range")return!1;var M=qn(R,T);if(!M)return!0;if(M?E=R:(E=R==="v"?"h":"v",M=qn(R,T)),!M)return!1;if(!o.current&&"changedTouches"in m&&(b||C)&&(o.current=E),!E)return!0;var N=o.current||E;return ec(N,g,m,N==="h"?b:C)},[]),d=i.useCallback(function(m){var g=m;if(!(!Re.length||Re[Re.length-1]!==s)){var x="deltaY"in g?Zn(g):tt(g),y=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&tc(E.delta,x)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var b=(a.current.shards||[]).map(Qn).filter(Boolean).filter(function(E){return E.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),l=i.useCallback(function(m,g,x,y){var b={name:m,delta:g,target:x,should:y,shadowParent:sc(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),u=i.useCallback(function(m){n.current=tt(m),o.current=void 0},[]),f=i.useCallback(function(m){l(m.type,Zn(m),m.target,c(m,e.lockRef.current))},[]),h=i.useCallback(function(m){l(m.type,tt(m),m.target,c(m,e.lockRef.current))},[]);i.useEffect(function(){return Re.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",d,Ee),document.addEventListener("touchmove",d,Ee),document.addEventListener("touchstart",u,Ee),function(){Re=Re.filter(function(m){return m!==s}),document.removeEventListener("wheel",d,Ee),document.removeEventListener("touchmove",d,Ee),document.removeEventListener("touchstart",u,Ee)}},[]);var v=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:nc(r)}):null,v?i.createElement(za,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ic=Ia(Go,rc);var pn=i.forwardRef(function(e,t){return i.createElement(yt,oe({},e,{ref:t,sideCar:ic}))});pn.classNames=yt.classNames;var ac=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Te=new WeakMap,nt=new WeakMap,ot={},Bt=0,Zo=function(e){return e&&(e.host||Zo(e.parentNode))},cc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Zo(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})},lc=function(e,t,n,o){var r=cc(t,Array.isArray(e)?e:[e]);ot[n]||(ot[n]=new WeakMap);var s=ot[n],a=[],c=new Set,d=new Set(r),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};r.forEach(l);var u=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))u(h);else try{var v=h.getAttribute(o),w=v!==null&&v!=="false",m=(Te.get(h)||0)+1,g=(s.get(h)||0)+1;Te.set(h,m),s.set(h,g),a.push(h),m===1&&w&&nt.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(t),c.clear(),Bt++,function(){a.forEach(function(f){var h=Te.get(f)-1,v=s.get(f)-1;Te.set(f,h),s.set(f,v),h||(nt.has(f)||f.removeAttribute(o),nt.delete(f)),v||f.removeAttribute(n)}),Bt--,Bt||(Te=new WeakMap,Te=new WeakMap,nt=new WeakMap,ot={})}},Qo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ac(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),lc(o,r,n,"aria-hidden")):function(){return null}},bt="Dialog",[Jo]=de(bt),[uc,te]=Jo(bt),er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),d=i.useRef(null),[l,u]=Oe({prop:o,defaultProp:r??!1,onChange:s,caller:bt});return p.jsx(uc,{scope:t,triggerRef:c,contentRef:d,contentId:we(),titleId:we(),descriptionId:we(),open:l,onOpenChange:u,onOpenToggle:i.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};er.displayName=bt;var tr="DialogTrigger",nr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(tr,n),s=W(t,r.triggerRef);return p.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":vn(r.open),...o,ref:s,onClick:_(e.onClick,r.onOpenToggle)})});nr.displayName=tr;var mn="DialogPortal",[dc,or]=Jo(mn,{forceMount:void 0}),rr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=te(mn,t);return p.jsx(dc,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(Z,{present:n||s.open,children:p.jsx(Ke,{asChild:!0,container:r,children:a})}))})};rr.displayName=mn;var ut="DialogOverlay",sr=i.forwardRef((e,t)=>{const n=or(ut,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(ut,e.__scopeDialog);return s.modal?p.jsx(Z,{present:o||s.open,children:p.jsx(pc,{...r,ref:t})}):null});sr.displayName=ut;var fc=je("DialogOverlay.RemoveScroll"),pc=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ut,n);return p.jsx(pn,{as:fc,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(I.div,{"data-state":vn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),xe="DialogContent",ir=i.forwardRef((e,t)=>{const n=or(xe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(xe,e.__scopeDialog);return p.jsx(Z,{present:o||s.open,children:s.modal?p.jsx(mc,{...r,ref:t}):p.jsx(hc,{...r,ref:t})})});ir.displayName=xe;var mc=i.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=i.useRef(null),r=W(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(ar,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault())})}),hc=i.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(ar,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),ar=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=te(xe,n),d=i.useRef(null),l=W(t,d);return Vo(),p.jsxs(p.Fragment,{children:[p.jsx(fn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ve,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":vn(c.open),...a,ref:l,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(gc,{titleId:c.titleId}),p.jsx(xc,{contentRef:d,descriptionId:c.descriptionId})]})]})}),hn="DialogTitle",cr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(hn,n);return p.jsx(I.h2,{id:r.titleId,...o,ref:t})});cr.displayName=hn;var lr="DialogDescription",vc=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(lr,n);return p.jsx(I.p,{id:r.descriptionId,...o,ref:t})});vc.displayName=lr;var ur="DialogClose",dr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ur,n);return p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,()=>r.onOpenChange(!1))})});dr.displayName=ur;function vn(e){return e?"open":"closed"}var fr="DialogTitleWarning",[jf,pr]=ki(fr,{contentName:xe,titleName:hn,docsSlug:"dialog"}),gc=({titleId:e})=>{const t=pr(fr),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 i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wc="DialogDescriptionWarning",xc=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pr(wc).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},yc=er,bc=nr,Cc=rr,Ec=sr,Rc=ir,Tc=cr,Sc=dr;const Pc="_dialogOverlay_1flkk_1",_c="_dialogContent_1flkk_20",Mc="_dialogCloseButton_1flkk_65",Ac="_dialogTitle_1flkk_72",st={dialogOverlay:Pc,dialogContent:_c,dialogCloseButton:Mc,dialogTitle:Ac},Oc=({trigger:e,content:t,title:n,...o})=>p.jsxs(yc,{...o,children:[p.jsx(bc,{asChild:!0,children:e}),p.jsxs(Cc,{children:[p.jsx(Ec,{className:`${st.dialogOverlay}`}),p.jsxs(Rc,{className:st.dialogContent,onPointerDownOutside:r=>{r?.preventDefault()},"data-size":"md",children:[p.jsx(Sc,{asChild:!0,children:p.jsx(Ve,{className:`${st.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(cn,{})})}),p.jsx(Tc,{className:st.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=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=s(c,x),C=W(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=W(g,C),T=s(u,x);return k.useEffect(()=>(T.itemMap.set(C,{ref:C,...b}),()=>void T.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:E,children:y})});v.displayName=u;function w(m){const g=s(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((T,R)=>b.indexOf(T.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,o]}var Dc=i.createContext(void 0);function mr(e){const t=i.useContext(Dc);return e||t||"ltr"}const Nc=["top","right","bottom","left"],he=Math.min,G=Math.max,ft=Math.round,it=Math.floor,se=e=>({x:e,y:e}),Ic={left:"right",right:"left",bottom:"top",top:"bottom"},kc={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 De(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Lc=new Set(["top","bottom"]);function re(e){return Lc.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function jc(e,t,n){n===void 0&&(n=!1);const o=De(e),r=yn(e),s=xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=pt(a)),[a,pt(a)]}function Fc(e){const t=pt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>kc[t])}const Jn=["left","right"],eo=["right","left"],$c=["top","bottom"],Bc=["bottom","top"];function Wc(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?$c:Bc;default:return[]}}function Hc(e,t,n,o){const r=De(e);let s=Wc(ue(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Xt)))),s}function pt(e){return e.replace(/left|right|bottom|top/g,t=>Ic[t])}function Vc(e){return{top:0,right:0,bottom:0,left:0,...e}}function hr(e){return typeof e!="number"?Vc(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 s=re(t),a=yn(t),c=xn(a),d=ue(t),l=s==="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(De(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Kc=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.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:s,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=hr(v),g=c[h?f==="floating"?"reference":"floating":f],x=mt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.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(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},E=mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.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 Uc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=hr(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=s.reference[w]+s.reference[v]-h[v]-s.floating[w],E=h[v]-s.reference[v],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=T?T[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(T)))&&(R=c.floating[b]||s.floating[w]);const M=C/2-E/2,N=R/2-m[w]/2-1,D=he(f[x],N),L=he(f[y],N),B=D,j=R-m[w]-L,P=R/2-m[w]/2+M,F=Yt(B,P,j),O=!d.arrow&&De(r)!=null&&P!==F&&s.reference[w]/2-(P<B?D:L)-m[w]/2<0,$=O?P<B?P-B:P-j:0;return{[v]:h[v]+$,data:{[v]:F,centerOffset:P-F-$,...O&&{alignmentOffset:$}},reset:O}}}),Gc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,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=s.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)]:Fc(c)),T=w!=="none";!h&&T&&E.push(...Hc(c,m,w,C));const R=[c,...E],M=await Fe(t,g),N=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(M[x]),f){const P=jc(r,a,C);N.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var L,B;const P=(((L=s.flip)==null?void 0:L.index)||0)+1,F=R[P];if(F&&(!(f==="alignment"?y!==re(F):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:F}};let O=(B=D.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(v){case"bestFit":{var j;const $=(j=D.filter(A=>{if(T){const S=re(A.placement);return S===y||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,H)=>S+H,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:j[0];$&&(O=$);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 Nc.some(t=>e[t]>=0)}const zc=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 s=await Fe(t,{...r,elementContext:"reference"}),a=no(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oo(a)}}}case"escaped":{const s=await Fe(t,{...r,altBoundary:!0}),a=no(s,n.floating);return{data:{escapedOffsets:a,escaped:oo(a)}}}default:return{}}}}},vr=new Set(["left","top"]);async function Yc(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=ue(n),c=De(n),d=re(n)==="y",l=vr.has(a)?-1:1,u=s&&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 Xc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,d=await Yc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:a}}}}},qc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!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(s){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]:s,[f]:a}}}}}},Zc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,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=s.reference[h]-s.floating[b]+g.mainAxis,E=s.reference[h]+s.reference[b]-g.mainAxis;v<C?v=C:v>E&&(v=E)}if(l){var x,y;const b=h==="y"?"width":"height",C=vr.has(ue(r)),E=s.reference[f]-s.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),T=s.reference[f]+s.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:v,[f]:w}}}},Qc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),h=De(r),v=re(r)==="y",{width:w,height:m}=s.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),T=!t.middlewareData.shift;let R=C,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),T&&!h){const D=G(u.left,0),L=G(u.right,0),B=G(u.top,0),j=G(u.bottom,0);v?M=w-2*(D!==0||L!==0?D+L:G(u.left,u.right)):R=m-2*(B!==0||j!==0?B+j:G(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const N=await a.getDimensions(c.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ct(){return typeof window<"u"}function Ne(e){return gr(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=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return Ct()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return Ct()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return Ct()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!Ct()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const Jc=new Set(["inline","contents"]);function Ge(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Jc.has(r)}const el=new Set(["table","td","th"]);function tl(e){return el.has(Ne(e))}const nl=[":popover-open",":modal"];function Et(e){return nl.some(t=>{try{return e.matches(t)}catch{return!1}})}const ol=["transform","translate","scale","rotate","perspective"],rl=["transform","translate","scale","rotate","perspective","filter"],sl=["paint","layout","strict","content"];function bn(e){const t=Cn(),n=J(e)?ee(e):e;return ol.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)||rl.some(o=>(n.willChange||"").includes(o))||sl.some(o=>(n.contain||"").includes(o))}function il(e){let t=ve(e);for(;ie(t)&&!Me(t);){if(bn(t))return t;if(Et(t))return null;t=ve(t)}return null}function Cn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const al=new Set(["html","body","#document"]);function Me(e){return al.has(Ne(e))}function ee(e){return z(e).getComputedStyle(e)}function Rt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ae(e);return ro(t)?t.host:t}function wr(e){const t=ve(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ge(t)?t:wr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=wr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=z(r);if(s){const c=qt(a);return t.concat(a,a.visualViewport||[],Ge(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 xr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=ft(n)!==s||ft(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function En(e){return J(e)?e:e.contextElement}function _e(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=xr(t);let a=(s?ft(n.width):n.width)/o,c=(s?ft(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const cl=se(0);function yr(e){const t=z(e);return!Cn()||!t.visualViewport?cl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ll(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(),s=En(e);let a=se(1);t&&(o?J(o)&&(a=_e(o)):a=_e(e));const c=ll(s,n,o)?yr(s):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(s){const h=z(s),v=o&&J(o)?z(o):o;let w=h,m=qt(w);for(;m&&o&&v!==w;){const g=_e(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=Rt(e).scrollLeft;return t?t.left+n:ye(ae(e)).left+n}function br(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 ul(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=ae(o),c=t?Et(t.floating):!1;if(o===a||c&&s)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!s)&&((Ne(o)!=="body"||Ge(a))&&(d=Rt(o)),ie(o))){const v=ye(o);l=_e(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}const h=a&&!f&&!s?br(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 dl(e){return Array.from(e.getClientRects())}function fl(e){const t=ae(e),n=Rt(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=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:s,x:a,y:c}}const so=25;function pl(e,t){const n=z(e),o=ae(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,d=0;if(r){s=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&&(s-=w)}else l<=so&&(s+=l);return{width:s,height:a,x:c,y:d}}const ml=new Set(["absolute","fixed"]);function hl(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,d=r*s.x,l=o*s.y;return{width:a,height:c,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=pl(e,n);else if(t==="document")o=fl(ae(e));else if(J(t))o=hl(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function Cr(e,t){const n=ve(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||Cr(n,t)}function vl(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(c=>J(c)&&Ne(c)!=="body"),r=null;const s=ee(e).position==="fixed";let a=s?ve(e):e;for(;J(a)&&!Me(a);){const c=ee(a),d=bn(a);!d&&c.position==="fixed"&&(r=null),(s?!d&&!r:!d&&c.position==="static"&&!!r&&ml.has(r.position)||Ge(a)&&!d&&Cr(e,a))?o=o.filter(u=>u!==a):r=c,a=ve(a)}return t.set(e,o),o}function gl(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Et(t)?[]:vl(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 wl(e){const{width:t,height:n}=xr(e);return{width:t,height:n}}function xl(e,t,n){const o=ie(t),r=ae(t),s=n==="fixed",a=ye(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!s)if((Ne(t)!=="body"||Ge(r))&&(c=Rt(t)),o){const v=ye(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?br(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 Wt(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 Er(e,t){const n=z(e);if(Et(e))return n;if(!ie(e)){let r=ve(e);for(;r&&!Me(r);){if(J(r)&&!Wt(r))return r;r=ve(r)}return n}let o=ao(e,t);for(;o&&tl(o)&&Wt(o);)o=ao(o,t);return o&&Me(o)&&Wt(o)&&!bn(o)?n:o||il(e)||n}const yl=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,o=await n(e.floating);return{reference:xl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bl(e){return ee(e).direction==="rtl"}const Cl={convertOffsetParentRelativeRectToViewportRelativeRect:ul,getDocumentElement:ae,getClippingRect:gl,getOffsetParent:Er,getElementRects:yl,getClientRects:dl,getDimensions:wl,getScale:_e,isElement:J,isRTL:bl};function Rr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function El(e,t){let n=null,o;const r=ae(e);function s(){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),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:h,height:v}=l;if(c||t(),!h||!v)return;const w=it(f),m=it(r.clientWidth-(u+h)),g=it(r.clientHeight-(f+v)),x=it(u),b={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,he(1,d))||1};let C=!0;function E(T){const R=T[0].intersectionRatio;if(R!==d){if(!C)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Rr(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),s}function Rl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||s?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&c?El(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&&!Rr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const Tl=Xc,Sl=qc,Pl=Gc,_l=Qc,Ml=zc,co=Uc,Al=Zc,Ol=(e,t,n)=>{const o=new Map,r={platform:Cl,...n},s={...r.platform,_c:o};return Kc(e,t,{...r,platform:s})};var Dl=typeof document<"u",Nl=function(){},ut=Dl?k.useLayoutEffect:Nl;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 s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!ht(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Tr(e);return Math.round(t*n)/n}function Ht(e){const t=i.useRef(e);return ut(()=>{t.current=e}),t}function Il(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:d,open:l}=e,[u,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);ht(h,o)||v(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(A=>{A!==T.current&&(T.current=A,m(A))},[]),b=i.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),C=s||w,E=a||g,T=i.useRef(null),R=i.useRef(null),M=i.useRef(u),N=d!=null,D=Ht(d),L=Ht(r),B=Ht(l),j=i.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),Ol(T.current,R.current,A).then(S=>{const H={...S,isPositioned:B.current!==!1};P.current&&!ht(M.current,H)&&(M.current=H,sn.flushSync(()=>{f(H)}))})},[h,t,n,L,B]);ut(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=i.useRef(!1);ut(()=>(P.current=!0,()=>{P.current=!1}),[]),ut(()=>{if(C&&(T.current=C),E&&(R.current=E),C&&E){if(D.current)return D.current(C,E,j);j()}},[C,E,j,D,N]);const F=i.useMemo(()=>({reference:T,floating:R,setReference:y,setFloating:b}),[y,b]),O=i.useMemo(()=>({reference:C,floating:E}),[C,E]),$=i.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const S=lo(O.floating,u.x),H=lo(O.floating,u.y);return c?{...A,transform:"translate("+S+"px, "+H+"px)",...Tr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:H}},[n,c,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:j,refs:F,elements:O,floatingStyles:$}),[u,j,F,O,$])}const kl=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):{}}}},Ll=(e,t)=>({...Tl(e),options:[e,t]}),jl=(e,t)=>({...Sl(e),options:[e,t]}),Fl=(e,t)=>({...Al(e),options:[e,t]}),$l=(e,t)=>({...Pl(e),options:[e,t]}),Bl=(e,t)=>({..._l(e),options:[e,t]}),Wl=(e,t)=>({...Ml(e),options:[e,t]}),Hl=(e,t)=>({...kl(e),options:[e,t]});var Vl="Arrow",Sr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,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"})})});Sr.displayName=Vl;var Kl=Sr,Rn="Popper",[Pr,St]=de(Rn),[Ul,_r]=Pr(Rn),Mr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Ul,{scope:t,anchor:o,onAnchorChange:r,children:n})};Mr.displayName=Rn;var Ar="PopperAnchor",Or=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=_r(Ar,n),a=i.useRef(null),c=W(t,a),d=i.useRef(null);return i.useEffect(()=>{const l=d.current;d.current=o?.current||a.current,l!==d.current&&s.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Or.displayName=Ar;var Tn="PopperContent",[Gl,zl]=Pr(Tn),Dr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="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=_r(Tn,n),[x,y]=i.useState(null),b=W(t,V=>y(V)),[C,E]=i.useState(null),T=Mo(C),R=T?.width??0,M=T?.height??0,N=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(l)?l:[l],B=L.length>0,j={padding:D,boundary:L.filter(Xl),altBoundary:B},{refs:P,floatingStyles:F,placement:O,isPositioned:$,middlewareData:A}=Il({strategy:"fixed",placement:N,whileElementsMounted:(...V)=>Rl(...V,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ll({mainAxis:r+M,alignmentAxis:a}),d&&jl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Fl():void 0,...j}),d&&$l({...j}),Bl({...j,apply:({elements:V,rects:Ie,availableWidth:Ys,availableHeight:Xs})=>{const{width:qs,height:Zs}=Ie.reference,Je=V.floating.style;Je.setProperty("--radix-popper-available-width",`${Ys}px`),Je.setProperty("--radix-popper-available-height",`${Xs}px`),Je.setProperty("--radix-popper-anchor-width",`${qs}px`),Je.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),C&&Hl({element:C,padding:c}),ql({arrowWidth:R,arrowHeight:M}),h&&Wl({strategy:"referenceHidden",...j})]}),[S,H]=kr(O),X=Y(w);ce(()=>{$&&X?.()},[$,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Qe,ge]=i.useState();return ce(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:$?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Gl,{scope:n,placedSide:S,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":S,"data-align":H,...m,ref:b,style:{...m.style,animation:$?void 0:"none"}})})})});Dr.displayName=Tn;var Nr="PopperArrow",Yl={top:"bottom",right:"left",bottom:"top",left:"right"},Ir=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=zl(Nr,o),a=Yl[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Kl,{...r,ref:n,style:{...r.style,display:"block"}})})});Ir.displayName=Nr;function Xl(e){return e!==null}var ql=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 Lr=Mr,jr=Or,Fr=Dr,$r=Ir,Vt="rovingFocusGroup.onEntryFocus",Zl={bubbles:!1,cancelable:!0},ze="RovingFocusGroup",[Zt,Br,Ql]=gn(ze),[Jl,Wr]=de(ze,[Ql]),[eu,tu]=Jl(ze),Hr=i.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(nu,{...e,ref:t})})}));Hr.displayName=ze;var nu=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=i.useRef(null),v=W(t,h),w=mr(s),[m,g]=Oe({prop:a,defaultProp:c??null,onChange:d,caller:ze}),[x,y]=i.useState(!1),b=Y(l),C=Br(n),E=i.useRef(!1),[T,R]=i.useState(0);return i.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Vt,b),()=>M.removeEventListener(Vt,b)},[b]),p.jsx(eu,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!x){const D=new CustomEvent(Vt,Zl);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=C().filter(O=>O.focusable),B=L.find(O=>O.active),j=L.find(O=>O.id===m),F=[B,j,...L].filter(Boolean).map(O=>O.ref.current);Ur(F,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>y(!1))})})}),Vr="RovingFocusGroupItem",Kr=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,d=we(),l=s||d,u=tu(Vr,n),f=u.currentTabStopId===l,h=Br(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=u;return i.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:_(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=su(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?iu(b,C+1):b.slice(C+1)}setTimeout(()=>Ur(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Kr.displayName=Vr;var ou={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ru(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function su(e,t,n){const o=ru(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ou[o]}function Ur(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function iu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var au=Hr,cu=Kr,Qt=["Enter"," "],lu=["ArrowDown","PageUp","Home"],Gr=["ArrowUp","PageDown","End"],uu=[...lu,...Gr],du={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},fu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Be,pu,mu]=gn(Ye),[be,zr]=de(Ye,[mu,St,Wr]),Pt=St(),Yr=Wr(),[hu,Ce]=be(Ye),[vu,Xe]=be(Ye),Xr=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=Pt(t),[d,l]=i.useState(null),u=i.useRef(!1),f=Y(s),h=mr(r);return i.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(Lr,{...c,children:p.jsx(hu,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(vu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:a,children:o})})})};Xr.displayName=Ye;var gu="MenuAnchor",Sn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(jr,{...r,...o,ref:t})});Sn.displayName=gu;var Pn="MenuPortal",[wu,qr]=be(Pn,{forceMount:void 0}),Zr=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ce(Pn,t);return p.jsx(wu,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Zr.displayName=Pn;var q="MenuContent",[xu,_n]=be(q),Qr=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Xe(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(yu,{...r,ref:t}):p.jsx(bu,{...r,ref:t})})})})}),yu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(Mn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu);return p.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cu=je("MenuContent.ScrollLock"),Mn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,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=Xe(q,n),y=Pt(n),b=Yr(n),C=pu(n),[E,T]=i.useState(null),R=i.useRef(null),M=W(t,R,g.onContentChange),N=i.useRef(0),D=i.useRef(""),L=i.useRef(0),B=i.useRef(null),j=i.useRef("right"),P=i.useRef(0),F=w?pn:i.Fragment,O=w?{as:Cu,allowPinchZoom:!0}:void 0,$=S=>{const H=D.current+S,X=C().filter(V=>!V.disabled),Q=document.activeElement,ne=X.find(V=>V.ref.current===Q)?.textValue,fe=X.map(V=>V.textValue),Qe=Iu(fe,H,ne),ge=X.find(V=>V.textValue===Qe)?.ref.current;(function V(Ie){D.current=Ie,window.clearTimeout(N.current),Ie!==""&&(N.current=window.setTimeout(()=>V(""),1e3))})(H),ge&&setTimeout(()=>ge.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Vo();const A=i.useCallback(S=>j.current===B.current?.side&&Lu(S,B.current?.area),[]);return p.jsx(xu,{scope:n,searchRef:D,onItemEnter:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:i.useCallback(S=>{A(S)||(R.current?.focus(),T(null))},[A]),onTriggerLeave:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(S=>{B.current=S},[]),children:p.jsx(F,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:_(s,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:p.jsx(au,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:_(d,S=>{x.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":ms(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:_(m.onKeyDown,S=>{const X=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Q=S.ctrlKey||S.altKey||S.metaKey,ne=S.key.length===1;X&&(S.key==="Tab"&&S.preventDefault(),!Q&&ne&&$(S.key));const fe=R.current;if(S.target!==fe||!uu.includes(S.key))return;S.preventDefault();const ge=C().filter(V=>!V.disabled).map(V=>V.ref.current);Gr.includes(S.key)&&ge.reverse(),Du(ge)}),onBlur:_(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:_(e.onPointerMove,We(S=>{const H=S.target,X=P.current!==S.clientX;if(S.currentTarget.contains(H)&&X){const Q=S.clientX>P.current?"right":"left";j.current=Q,P.current=S.clientX}}))})})})})})})});Qr.displayName=q;var Eu="MenuGroup",An=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=Eu;var Ru="MenuLabel",Jr=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Jr.displayName=Ru;var vt="MenuItem",uo="menu.itemSelect",_t=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=Xe(vt,e.__scopeMenu),c=_n(vt,e.__scopeMenu),d=W(t,s),l=i.useRef(!1),u=()=>{const f=s.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(es,{...r,ref:d,disabled:n,onClick:_(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:_(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 es=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=_n(vt,n),c=Yr(n),d=i.useRef(null),l=W(t,d),[u,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const w=d.current;w&&v((w.textContent??"").trim())},[s.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(cu,{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,...s,ref:l,onPointerMove:_(e.onPointerMove,We(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,We(w=>a.onItemLeave(w))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),Tu="MenuCheckboxItem",ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(is,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":Dn(n),onSelect:_(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ts.displayName=Tu;var ns="MenuRadioGroup",[Su,Pu]=be(ns,{value:void 0,onValueChange:()=>{}}),os=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Y(o);return p.jsx(Su,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(An,{...r,ref:t})})});os.displayName=ns;var rs="MenuRadioItem",ss=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Pu(rs,e.__scopeMenu),s=n===r.value;return p.jsx(is,{scope:e.__scopeMenu,checked:s,children:p.jsx(_t,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Dn(s),onSelect:_(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ss.displayName=rs;var On="MenuItemIndicator",[is,_u]=be(On,{checked:!1}),as=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=_u(On,n);return p.jsx(Z,{present:o||gt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Dn(s.checked)})})});as.displayName=On;var Mu="MenuSeparator",cs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});cs.displayName=Mu;var Au="MenuArrow",ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx($r,{...r,...o,ref:t})});ls.displayName=Au;var Ou="MenuSub",[Ff,us]=be(Ou),Le="MenuSubTrigger",ds=i.forwardRef((e,t)=>{const n=Ce(Le,e.__scopeMenu),o=Xe(Le,e.__scopeMenu),r=us(Le,e.__scopeMenu),s=_n(Le,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,l={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),p.jsx(Sn,{asChild:!0,...l,children:p.jsx(es,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ms(n.open),...e,ref:wt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:_(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"];s.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(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||du[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ds.displayName=Le;var fs="MenuSubContent",ps=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Xe(q,e.__scopeMenu),c=us(fs,e.__scopeMenu),d=i.useRef(null),l=W(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(Mn,{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:_(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:_(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=fu[a.dir].includes(u.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});ps.displayName=fs;function ms(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Dn(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function Du(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Iu(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Nu(e,Math.max(s,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 ku(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],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 Lu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ku(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ju=Xr,Fu=Sn,$u=Zr,Bu=Qr,Wu=An,Hu=Jr,Vu=_t,Ku=ts,Uu=os,Gu=ss,zu=as,Yu=cs,Xu=ls,qu=ds,Zu=ps,Mt="DropdownMenu",[Qu]=de(Mt,[zr]),U=zr(),[Ju,hs]=Qu(Mt),vs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,d=U(t),l=i.useRef(null),[u,f]=Oe({prop:r,defaultProp:s??!1,onChange:a,caller:Mt});return p.jsx(Ju,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(ju,{...d,open:u,onOpenChange:f,dir:o,modal:c,children:n})})};vs.displayName=Mt;var gs="DropdownMenuTrigger",ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=hs(gs,n),a=U(n);return p.jsx(Fu,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:wt(t,s.triggerRef),onPointerDown:_(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:_(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ws.displayName=gs;var ed="DropdownMenuPortal",xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx($u,{...o,...n})};xs.displayName=ed;var ys="DropdownMenuContent",bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=hs(ys,n),s=U(n),a=i.useRef(!1);return p.jsx(Bu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:_(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)"}})});bs.displayName=ys;var td="DropdownMenuGroup",nd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Wu,{...r,...o,ref:t})});nd.displayName=td;var od="DropdownMenuLabel",rd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Hu,{...r,...o,ref:t})});rd.displayName=od;var sd="DropdownMenuItem",Cs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Vu,{...r,...o,ref:t})});Cs.displayName=sd;var id="DropdownMenuCheckboxItem",ad=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ku,{...r,...o,ref:t})});ad.displayName=id;var cd="DropdownMenuRadioGroup",ld=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Uu,{...r,...o,ref:t})});ld.displayName=cd;var ud="DropdownMenuRadioItem",dd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Gu,{...r,...o,ref:t})});dd.displayName=ud;var fd="DropdownMenuItemIndicator",pd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(zu,{...r,...o,ref:t})});pd.displayName=fd;var md="DropdownMenuSeparator",hd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Yu,{...r,...o,ref:t})});hd.displayName=md;var vd="DropdownMenuArrow",Es=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Xu,{...r,...o,ref:t})});Es.displayName=vd;var gd="DropdownMenuSubTrigger",wd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(qu,{...r,...o,ref:t})});wd.displayName=gd;var xd="DropdownMenuSubContent",yd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Zu,{...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)"}})});yd.displayName=xd;var bd=vs,Cd=ws,Ed=xs,Rd=bs,Td=Cs,Sd=Es;const Pd="_menuButtonContent_boy14_1",_d="_menuButtonItem_boy14_10",Md="_menuButtonArrow_boy14_42",Jt={menuButtonContent:Pd,menuButtonItem:_d,menuButtonArrow:Md},Ad=({children:e,...t})=>p.jsxs(bd,{modal:!1,...t,children:[p.jsx(Cd,{asChild:!0,children:p.jsx(Ve,{"data-variant":"tertiary",iconOnly:!0,icon:"Menu"})}),p.jsx(Ed,{children:p.jsxs(Rd,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(Sd,{className:Jt.menuButtonArrow})]})})]}),Od=({children:e,...t})=>p.jsx(Td,{className:Jt.menuButtonItem,...t,children:e});var Dd=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"}),Nd="VisuallyHidden",At=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...Dd,...e.style}}));At.displayName=Nd;var Id=At,Nn="ToastProvider",[In,kd,Ld]=gn("Toast"),[Rs]=de("Toast",[Ld]),[jd,Ot]=Rs(Nn),Ts=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[c,d]=i.useState(null),[l,u]=i.useState(0),f=i.useRef(!1),h=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nn}\`. Expected non-empty \`string\`.`),p.jsx(In.Provider,{scope:t,children:p.jsx(jd,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:c,onViewportChange:d,onToastAdd:i.useCallback(()=>u(v=>v+1),[]),onToastRemove:i.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};Ts.displayName=Nn;var Ss="ToastViewport",Fd=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ps=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Fd,label:r="Notifications ({hotkey})",...s}=e,a=Ot(Ss,n),c=kd(n),d=i.useRef(null),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),h=W(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;i.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]),i.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(en);x.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(tn);x.dispatchEvent(T),a.isClosePausedRef.current=!1}},C=T=>{!g.contains(T.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=i.useCallback(({tabbingDirection:g})=>{const y=c().map(b=>{const C=b.ref.current,E=[C,...Zd(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[c]);return i.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,T=y.shiftKey;if(y.target===g&&T){l.current?.focus();return}const N=m({tabbingDirection:T?"backwards":"forwards"}),D=N.findIndex(L=>L===E);Kt(N.slice(D+1))?y.preventDefault():T?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),p.jsxs(va,{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"});Kt(g)}}),p.jsx(In.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...s,ref:h})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Kt(g)}})]})});Ps.displayName=Ss;var _s="ToastFocusProxy",nn=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ot(_s,n);return p.jsx(At,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!s.viewport?.contains(c)&&o()}})});nn.displayName=_s;var qe="Toast",$d="toast.swipeStart",Bd="toast.swipeMove",Wd="toast.swipeCancel",Hd="toast.swipeEnd",Ms=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[c,d]=Oe({prop:o,defaultProp:r??!0,onChange:s,caller:qe});return p.jsx(Z,{present:n||c,children:p.jsx(Ud,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(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:_(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:_(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)})})})});Ms.displayName=qe;var[Vd,Kd]=Rs(qe,{onClose(){}}),Ud=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...w}=e,m=Ot(qe,n),[g,x]=i.useState(null),y=W(t,P=>x(P)),b=i.useRef(null),C=i.useRef(null),E=r||m.duration,T=i.useRef(0),R=i.useRef(E),M=i.useRef(0),{onToastAdd:N,onToastRemove:D}=m,L=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),B=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(L,P))},[L]);i.useEffect(()=>{const P=m.viewport;if(P){const F=()=>{B(R.current),l?.()},O=()=>{const $=new Date().getTime()-T.current;R.current=R.current-$,window.clearTimeout(M.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,F),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,F)}}},[m.viewport,E,d,l,B]),i.useEffect(()=>{s&&!m.isClosePausedRef.current&&B(E)},[s,E,m.isClosePausedRef,B]),i.useEffect(()=>(N(),()=>D()),[N,D]);const j=i.useMemo(()=>g?Ls(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[j&&p.jsx(Gd,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:j}),p.jsx(Vd,{scope:n,onClose:L,children:sn.createPortal(p.jsx(In.ItemSlot,{scope:n,children:p.jsx(ha,{asChild:!0,onEscapeKeyDown:_(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:_(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:_(e.onPointerMove,P=>{if(!b.current)return;const F=P.clientX-b.current.x,O=P.clientY-b.current.y,$=!!C.current,A=["left","right"].includes(m.swipeDirection),S=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=A?S(0,F):0,X=A?0:S(0,O),Q=P.pointerType==="touch"?10:2,ne={x:H,y:X},fe={originalEvent:P,delta:ne};$?(C.current=ne,at(Bd,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(C.current=ne,at($d,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(F)>Q||Math.abs(O)>Q)&&(b.current=null)}),onPointerUp:_(e.onPointerUp,P=>{const F=C.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),C.current=null,b.current=null,F){const $=P.currentTarget,A={originalEvent:P,delta:F};fo(F,m.swipeDirection,m.swipeThreshold)?at(Hd,v,A,{discrete:!0}):at(Wd,h,A,{discrete:!0}),$.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Gd=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(qe,t),[s,a]=i.useState(!1),[c,d]=i.useState(!1);return Xd(()=>a(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),c?null:p.jsx(Ue,{asChild:!0,children:p.jsx(At,{...o,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},zd="ToastTitle",As=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});As.displayName=zd;var Yd="ToastDescription",Os=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Os.displayName=Yd;var Ds="ToastAction",Ns=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(ks,{altText:n,asChild:!0,children:p.jsx(kn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ds}\`. Expected non-empty \`string\`.`),null)});Ns.displayName=Ds;var Is="ToastClose",kn=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Kd(Is,n);return p.jsx(ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,r.onClose)})})});kn.displayName=Is;var ks=i.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 Ls(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),qd(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Ls(o))}}),t}function at(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Xd(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 qd(e){return e.nodeType===e.ELEMENT_NODE}function Zd(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 Kt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Qd=Ts,Jd=Ps,ef=Ms,tf=As,nf=Os,of=Ns,rf=kn;const sf="_toast_7o27j_1",af="_toastContent_7o27j_12",cf="_toastViewport_7o27j_70",lf="_toastTitle_7o27j_89",uf="_toastDescription_7o27j_95",Se={toast:sf,toastContent:af,toastViewport:cf,toastTitle:lf,toastDescription:uf},df=({...e})=>p.jsx(Qd,{...e}),js=k.forwardRef(({...e},t)=>p.jsx(Jd,{className:Se.toastViewport,ref:t,...e}));js.displayName="ToastViewport";const Fs=k.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs(ef,{className:Se.toast,ref:r,...o,children:[p.jsxs("div",{className:Se.toastContent,children:[p.jsx(tf,{className:Se.toastTitle,children:e}),t&&p.jsx(nf,{className:Se.toastDescription,children:t})]}),n&&p.jsx(of,{className:Se.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(rf,{asChild:!0,children:p.jsx(Ve,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));Fs.displayName="Toast";var[Dt]=de("Tooltip",[St]),Nt=St(),$s="TooltipProvider",ff=700,on="tooltip.open",[pf,Ln]=Dt($s),Bs=e=>{const{__scopeTooltip:t,delayDuration:n=ff,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(pf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:s})};Bs.displayName=$s;var He="Tooltip",[mf,Ze]=Dt(He),Ws=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=i.useState(null),h=we(),v=i.useRef(0),w=a??d.disableHoverableContent,m=c??d.delayDuration,g=i.useRef(!1),[x,y]=Oe({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),s?.(R)},caller:He}),b=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),T=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Lr,{...l,children:p.jsx(mf,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayedRef.current?T():C()},[d.isOpenDelayedRef,T,C]),onTriggerLeave:i.useCallback(()=>{w?E():(window.clearTimeout(v.current),v.current=0)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:n})})};Ws.displayName=He;var rn="TooltipTrigger",Hs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ze(rn,n),s=Ln(rn,n),a=Nt(n),c=i.useRef(null),d=W(t,c,r.onTriggerChange),l=i.useRef(!1),u=i.useRef(!1),f=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jr,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:_(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Hs.displayName=rn;var jn="TooltipPortal",[hf,vf]=Dt(jn,{forceMount:void 0}),Vs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=Ze(jn,t);return p.jsx(hf,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Vs.displayName=jn;var Ae="TooltipContent",Ks=i.forwardRef((e,t)=>{const n=vf(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=Ze(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(Us,{side:r,...s,ref:t}):p.jsx(gf,{side:r,...s,ref:t})})}),gf=i.forwardRef((e,t)=>{const n=Ze(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=i.useRef(null),s=W(t,r),[a,c]=i.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=bf(x,g.getBoundingClientRect()),b=Cf(x,y),C=Ef(m.getBoundingClientRect()),E=Tf([...b,...C]);c(E),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.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]),i.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=!Rf(x,a);y?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,a,l,h]),p.jsx(Us,{...e,ref:s})}),[wf,xf]=Dt(He,{isInside:!1}),yf=Ui("TooltipContent"),Us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,d=Ze(Ae,n),l=Nt(n),{onClose:u}=d;return i.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),i.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(Ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Fr,{"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(yf,{children:o}),p.jsx(wf,{scope:n,isInside:!0,children:p.jsx(Id,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Ks.displayName=Ae;var Gs="TooltipArrow",zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return xf(Gs,n).isInside?null:p.jsx($r,{...r,...o,ref:t})});zs.displayName=Gs;function bf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Cf(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 Ef(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 Rf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],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 Tf(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),Sf(t)}function Sf(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 s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.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 s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.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 Pf=Bs,_f=Ws,Mf=Hs,Af=Vs,Of=Ks,Df=zs;const Nf="_tooltipContent_4rdhp_1",If="_tooltipArrow_4rdhp_12",po={tooltipContent:Nf,tooltipArrow:If},kf=({...e})=>p.jsx(Pf,{...e});function Lf({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...s}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(_f,{open:n,defaultOpen:o,onOpenChange:a=>{r?.(a)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(Mf,{asChild:!0,children:e}),p.jsx(Af,{children:p.jsxs(Of,{className:po.tooltipContent,...s,sideOffset:4,children:[t,p.jsx(Df,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=vo;exports.ArrowRight=go;exports.Button=Ve;exports.Check=an;exports.Checkbox=sa;exports.Circle=wo;exports.Close=cn;exports.Dialog=Oc;exports.ExternalLink=xo;exports.Gear=yo;exports.Hammer=bo;exports.Heart=Co;exports.IconMap=Ut;exports.Kebab=Eo;exports.Lightning=Ro;exports.Mail=To;exports.Menu=So;exports.MenuButton=Ad;exports.MenuButtonItem=Od;exports.NoMobile=Po;exports.Pencil=_o;exports.Spinner=ln;exports.Toast=Fs;exports.ToastProvider=df;exports.ToastViewport=js;exports.Tooltip=Lf;exports.TooltipProvider=kf;exports.createIcon=K;exports.iconSizes=Di;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wc="DialogDescriptionWarning",xc=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pr(wc).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},yc=er,bc=nr,Cc=rr,Ec=sr,Rc=ir,Tc=cr,Sc=dr;const Pc="_dialogOverlay_1flkk_1",_c="_dialogContent_1flkk_20",Mc="_dialogCloseButton_1flkk_65",Ac="_dialogTitle_1flkk_72",rt={dialogOverlay:Pc,dialogContent:_c,dialogCloseButton:Mc,dialogTitle:Ac},Oc=({trigger:e,content:t,title:n,...o})=>p.jsxs(yc,{...o,children:[p.jsx(bc,{asChild:!0,children:e}),p.jsxs(Cc,{children:[p.jsx(Ec,{className:`${rt.dialogOverlay}`}),p.jsxs(Rc,{className:rt.dialogContent,onPointerDownOutside:r=>{r?.preventDefault()},"data-size":"md",children:[p.jsx(Sc,{asChild:!0,children:p.jsx(gt,{className:`${rt.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(cn,{})})}),p.jsx(Tc,{className:rt.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=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=s(c,x),C=W(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=W(g,C),T=s(u,x);return k.useEffect(()=>(T.itemMap.set(C,{ref:C,...b}),()=>void T.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:E,children:y})});v.displayName=u;function w(m){const g=s(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((T,R)=>b.indexOf(T.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:v},w,o]}var Dc=i.createContext(void 0);function mr(e){const t=i.useContext(Dc);return e||t||"ltr"}const Nc=["top","right","bottom","left"],he=Math.min,G=Math.max,dt=Math.round,st=Math.floor,se=e=>({x:e,y:e}),Ic={left:"right",right:"left",bottom:"top",top:"bottom"},kc={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 De(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Lc=new Set(["top","bottom"]);function re(e){return Lc.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function jc(e,t,n){n===void 0&&(n=!1);const o=De(e),r=yn(e),s=xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=ft(a)),[a,ft(a)]}function Fc(e){const t=ft(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>kc[t])}const Jn=["left","right"],eo=["right","left"],$c=["top","bottom"],Bc=["bottom","top"];function Wc(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?$c:Bc;default:return[]}}function Hc(e,t,n,o){const r=De(e);let s=Wc(ue(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Xt)))),s}function ft(e){return e.replace(/left|right|bottom|top/g,t=>Ic[t])}function Vc(e){return{top:0,right:0,bottom:0,left:0,...e}}function hr(e){return typeof e!="number"?Vc(e):{top:e,right:e,bottom:e,left:e}}function pt(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 s=re(t),a=yn(t),c=xn(a),d=ue(t),l=s==="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(De(t)){case"start":v[a]-=h*(n&&l?-1:1);break;case"end":v[a]+=h*(n&&l?-1:1);break}return v}const Kc=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.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:s,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=hr(v),g=c[h?f==="floating"?"reference":"floating":f],x=pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.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(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},E=pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.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 Uc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=hr(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=s.reference[w]+s.reference[v]-h[v]-s.floating[w],E=h[v]-s.reference[v],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let R=T?T[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(T)))&&(R=c.floating[b]||s.floating[w]);const M=C/2-E/2,N=R/2-m[w]/2-1,D=he(f[x],N),L=he(f[y],N),B=D,j=R-m[w]-L,P=R/2-m[w]/2+M,F=Yt(B,P,j),O=!d.arrow&&De(r)!=null&&P!==F&&s.reference[w]/2-(P<B?D:L)-m[w]/2<0,$=O?P<B?P-B:P-j:0;return{[v]:h[v]+$,data:{[v]:F,centerOffset:P-F-$,...O&&{alignmentOffset:$}},reset:O}}}),Gc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,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=s.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?[ft(c)]:Fc(c)),T=w!=="none";!h&&T&&E.push(...Hc(c,m,w,C));const R=[c,...E],M=await Fe(t,g),N=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(M[x]),f){const P=jc(r,a,C);N.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var L,B;const P=(((L=s.flip)==null?void 0:L.index)||0)+1,F=R[P];if(F&&(!(f==="alignment"?y!==re(F):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:F}};let O=(B=D.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!O)switch(v){case"bestFit":{var j;const $=(j=D.filter(A=>{if(T){const S=re(A.placement);return S===y||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,H)=>S+H,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:j[0];$&&(O=$);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 Nc.some(t=>e[t]>=0)}const zc=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 s=await Fe(t,{...r,elementContext:"reference"}),a=no(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oo(a)}}}case"escaped":{const s=await Fe(t,{...r,altBoundary:!0}),a=no(s,n.floating);return{data:{escapedOffsets:a,escaped:oo(a)}}}default:return{}}}}},vr=new Set(["left","top"]);async function Yc(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=ue(n),c=De(n),d=re(n)==="y",l=vr.has(a)?-1:1,u=s&&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 Xc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,d=await Yc(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:a}}}}},qc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!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(s){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]:s,[f]:a}}}}}},Zc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,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=s.reference[h]-s.floating[b]+g.mainAxis,E=s.reference[h]+s.reference[b]-g.mainAxis;v<C?v=C:v>E&&(v=E)}if(l){var x,y;const b=h==="y"?"width":"height",C=vr.has(ue(r)),E=s.reference[f]-s.floating[b]+(C&&((x=a.offset)==null?void 0:x[f])||0)+(C?0:g.crossAxis),T=s.reference[f]+s.reference[b]+(C?0:((y=a.offset)==null?void 0:y[f])||0)-(C?g.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[h]:v,[f]:w}}}},Qc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),h=De(r),v=re(r)==="y",{width:w,height:m}=s.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),T=!t.middlewareData.shift;let R=C,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),T&&!h){const D=G(u.left,0),L=G(u.right,0),B=G(u.top,0),j=G(u.bottom,0);v?M=w-2*(D!==0||L!==0?D+L:G(u.left,u.right)):R=m-2*(B!==0||j!==0?B+j:G(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const N=await a.getDimensions(c.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Ct(){return typeof window<"u"}function Ne(e){return gr(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=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return Ct()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return Ct()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return Ct()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!Ct()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const Jc=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)&&!Jc.has(r)}const el=new Set(["table","td","th"]);function tl(e){return el.has(Ne(e))}const nl=[":popover-open",":modal"];function Et(e){return nl.some(t=>{try{return e.matches(t)}catch{return!1}})}const ol=["transform","translate","scale","rotate","perspective"],rl=["transform","translate","scale","rotate","perspective","filter"],sl=["paint","layout","strict","content"];function bn(e){const t=Cn(),n=J(e)?ee(e):e;return ol.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)||rl.some(o=>(n.willChange||"").includes(o))||sl.some(o=>(n.contain||"").includes(o))}function il(e){let t=ve(e);for(;ie(t)&&!Me(t);){if(bn(t))return t;if(Et(t))return null;t=ve(t)}return null}function Cn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const al=new Set(["html","body","#document"]);function Me(e){return al.has(Ne(e))}function ee(e){return z(e).getComputedStyle(e)}function Rt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ae(e);return ro(t)?t.host:t}function wr(e){const t=ve(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ue(t)?t:wr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=wr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=z(r);if(s){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 xr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=dt(n)!==s||dt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function En(e){return J(e)?e:e.contextElement}function _e(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=xr(t);let a=(s?dt(n.width):n.width)/o,c=(s?dt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const cl=se(0);function yr(e){const t=z(e);return!Cn()||!t.visualViewport?cl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ll(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(),s=En(e);let a=se(1);t&&(o?J(o)&&(a=_e(o)):a=_e(e));const c=ll(s,n,o)?yr(s):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(s){const h=z(s),v=o&&J(o)?z(o):o;let w=h,m=qt(w);for(;m&&o&&v!==w;){const g=_e(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 pt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=Rt(e).scrollLeft;return t?t.left+n:ye(ae(e)).left+n}function br(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 ul(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=ae(o),c=t?Et(t.floating):!1;if(o===a||c&&s)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!s)&&((Ne(o)!=="body"||Ue(a))&&(d=Rt(o)),ie(o))){const v=ye(o);l=_e(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}const h=a&&!f&&!s?br(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 dl(e){return Array.from(e.getClientRects())}function fl(e){const t=ae(e),n=Rt(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=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:s,x:a,y:c}}const so=25;function pl(e,t){const n=z(e),o=ae(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,d=0;if(r){s=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&&(s-=w)}else l<=so&&(s+=l);return{width:s,height:a,x:c,y:d}}const ml=new Set(["absolute","fixed"]);function hl(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,d=r*s.x,l=o*s.y;return{width:a,height:c,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=pl(e,n);else if(t==="document")o=fl(ae(e));else if(J(t))o=hl(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return pt(o)}function Cr(e,t){const n=ve(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||Cr(n,t)}function vl(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(c=>J(c)&&Ne(c)!=="body"),r=null;const s=ee(e).position==="fixed";let a=s?ve(e):e;for(;J(a)&&!Me(a);){const c=ee(a),d=bn(a);!d&&c.position==="fixed"&&(r=null),(s?!d&&!r:!d&&c.position==="static"&&!!r&&ml.has(r.position)||Ue(a)&&!d&&Cr(e,a))?o=o.filter(u=>u!==a):r=c,a=ve(a)}return t.set(e,o),o}function gl(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Et(t)?[]:vl(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 wl(e){const{width:t,height:n}=xr(e);return{width:t,height:n}}function xl(e,t,n){const o=ie(t),r=ae(t),s=n==="fixed",a=ye(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!s)if((Ne(t)!=="body"||Ue(r))&&(c=Rt(t)),o){const v=ye(t,!0,s,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?br(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 Wt(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 Er(e,t){const n=z(e);if(Et(e))return n;if(!ie(e)){let r=ve(e);for(;r&&!Me(r);){if(J(r)&&!Wt(r))return r;r=ve(r)}return n}let o=ao(e,t);for(;o&&tl(o)&&Wt(o);)o=ao(o,t);return o&&Me(o)&&Wt(o)&&!bn(o)?n:o||il(e)||n}const yl=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,o=await n(e.floating);return{reference:xl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bl(e){return ee(e).direction==="rtl"}const Cl={convertOffsetParentRelativeRectToViewportRelativeRect:ul,getDocumentElement:ae,getClippingRect:gl,getOffsetParent:Er,getElementRects:yl,getClientRects:dl,getDimensions:wl,getScale:_e,isElement:J,isRTL:bl};function Rr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function El(e,t){let n=null,o;const r=ae(e);function s(){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),s();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(T){const R=T[0].intersectionRatio;if(R!==d){if(!C)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Rr(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),s}function Rl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||s?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&c?El(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&&!Rr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,d&&cancelAnimationFrame(w)}}const Tl=Xc,Sl=qc,Pl=Gc,_l=Qc,Ml=zc,co=Uc,Al=Zc,Ol=(e,t,n)=>{const o=new Map,r={platform:Cl,...n},s={...r.platform,_c:o};return Kc(e,t,{...r,platform:s})};var Dl=typeof document<"u",Nl=function(){},lt=Dl?k.useLayoutEffect:Nl;function mt(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(!mt(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 s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!mt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Tr(e);return Math.round(t*n)/n}function Ht(e){const t=i.useRef(e);return lt(()=>{t.current=e}),t}function Il(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:d,open:l}=e,[u,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);mt(h,o)||v(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(A=>{A!==T.current&&(T.current=A,m(A))},[]),b=i.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),C=s||w,E=a||g,T=i.useRef(null),R=i.useRef(null),M=i.useRef(u),N=d!=null,D=Ht(d),L=Ht(r),B=Ht(l),j=i.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:n,middleware:h};L.current&&(A.platform=L.current),Ol(T.current,R.current,A).then(S=>{const H={...S,isPositioned:B.current!==!1};P.current&&!mt(M.current,H)&&(M.current=H,sn.flushSync(()=>{f(H)}))})},[h,t,n,L,B]);lt(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=i.useRef(!1);lt(()=>(P.current=!0,()=>{P.current=!1}),[]),lt(()=>{if(C&&(T.current=C),E&&(R.current=E),C&&E){if(D.current)return D.current(C,E,j);j()}},[C,E,j,D,N]);const F=i.useMemo(()=>({reference:T,floating:R,setReference:y,setFloating:b}),[y,b]),O=i.useMemo(()=>({reference:C,floating:E}),[C,E]),$=i.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const S=lo(O.floating,u.x),H=lo(O.floating,u.y);return c?{...A,transform:"translate("+S+"px, "+H+"px)",...Tr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:H}},[n,c,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:j,refs:F,elements:O,floatingStyles:$}),[u,j,F,O,$])}const kl=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):{}}}},Ll=(e,t)=>({...Tl(e),options:[e,t]}),jl=(e,t)=>({...Sl(e),options:[e,t]}),Fl=(e,t)=>({...Al(e),options:[e,t]}),$l=(e,t)=>({...Pl(e),options:[e,t]}),Bl=(e,t)=>({..._l(e),options:[e,t]}),Wl=(e,t)=>({...Ml(e),options:[e,t]}),Hl=(e,t)=>({...kl(e),options:[e,t]});var Vl="Arrow",Sr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,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"})})});Sr.displayName=Vl;var Kl=Sr,Rn="Popper",[Pr,St]=de(Rn),[Ul,_r]=Pr(Rn),Mr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Ul,{scope:t,anchor:o,onAnchorChange:r,children:n})};Mr.displayName=Rn;var Ar="PopperAnchor",Or=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=_r(Ar,n),a=i.useRef(null),c=W(t,a),d=i.useRef(null);return i.useEffect(()=>{const l=d.current;d.current=o?.current||a.current,l!==d.current&&s.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:c})});Or.displayName=Ar;var Tn="PopperContent",[Gl,zl]=Pr(Tn),Dr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="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=_r(Tn,n),[x,y]=i.useState(null),b=W(t,V=>y(V)),[C,E]=i.useState(null),T=Mo(C),R=T?.width??0,M=T?.height??0,N=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(l)?l:[l],B=L.length>0,j={padding:D,boundary:L.filter(Xl),altBoundary:B},{refs:P,floatingStyles:F,placement:O,isPositioned:$,middlewareData:A}=Il({strategy:"fixed",placement:N,whileElementsMounted:(...V)=>Rl(...V,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[Ll({mainAxis:r+M,alignmentAxis:a}),d&&jl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Fl():void 0,...j}),d&&$l({...j}),Bl({...j,apply:({elements:V,rects:Ie,availableWidth:Ys,availableHeight:Xs})=>{const{width:qs,height:Zs}=Ie.reference,Qe=V.floating.style;Qe.setProperty("--radix-popper-available-width",`${Ys}px`),Qe.setProperty("--radix-popper-available-height",`${Xs}px`),Qe.setProperty("--radix-popper-anchor-width",`${qs}px`),Qe.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),C&&Hl({element:C,padding:c}),ql({arrowWidth:R,arrowHeight:M}),h&&Wl({strategy:"referenceHidden",...j})]}),[S,H]=kr(O),X=Y(w);ce(()=>{$&&X?.()},[$,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Ze,ge]=i.useState();return ce(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:$?F.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(Gl,{scope:n,placedSide:S,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":S,"data-align":H,...m,ref:b,style:{...m.style,animation:$?void 0:"none"}})})})});Dr.displayName=Tn;var Nr="PopperArrow",Yl={top:"bottom",right:"left",bottom:"top",left:"right"},Ir=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=zl(Nr,o),a=Yl[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Kl,{...r,ref:n,style:{...r.style,display:"block"}})})});Ir.displayName=Nr;function Xl(e){return e!==null}var ql=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 Lr=Mr,jr=Or,Fr=Dr,$r=Ir,Vt="rovingFocusGroup.onEntryFocus",Zl={bubbles:!1,cancelable:!0},Ge="RovingFocusGroup",[Zt,Br,Ql]=gn(Ge),[Jl,Wr]=de(Ge,[Ql]),[eu,tu]=Jl(Ge),Hr=i.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(nu,{...e,ref:t})})}));Hr.displayName=Ge;var nu=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,h=i.useRef(null),v=W(t,h),w=mr(s),[m,g]=Oe({prop:a,defaultProp:c??null,onChange:d,caller:Ge}),[x,y]=i.useState(!1),b=Y(l),C=Br(n),E=i.useRef(!1),[T,R]=i.useState(0);return i.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(Vt,b),()=>M.removeEventListener(Vt,b)},[b]),p.jsx(eu,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!x){const D=new CustomEvent(Vt,Zl);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const L=C().filter(O=>O.focusable),B=L.find(O=>O.active),j=L.find(O=>O.id===m),F=[B,j,...L].filter(Boolean).map(O=>O.ref.current);Ur(F,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>y(!1))})})}),Vr="RovingFocusGroupItem",Kr=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,d=we(),l=s||d,u=tu(Vr,n),f=u.currentTabStopId===l,h=Br(n),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:m}=u;return i.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:_(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=su(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?iu(b,C+1):b.slice(C+1)}setTimeout(()=>Ur(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:m!=null}):a})})});Kr.displayName=Vr;var ou={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ru(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function su(e,t,n){const o=ru(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ou[o]}function Ur(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function iu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var au=Hr,cu=Kr,Qt=["Enter"," "],lu=["ArrowDown","PageUp","Home"],Gr=["ArrowUp","PageDown","End"],uu=[...lu,...Gr],du={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},fu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ze="Menu",[Be,pu,mu]=gn(ze),[be,zr]=de(ze,[mu,St,Wr]),Pt=St(),Yr=Wr(),[hu,Ce]=be(ze),[vu,Ye]=be(ze),Xr=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=Pt(t),[d,l]=i.useState(null),u=i.useRef(!1),f=Y(s),h=mr(r);return i.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(Lr,{...c,children:p.jsx(hu,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(vu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:a,children:o})})})};Xr.displayName=ze;var gu="MenuAnchor",Sn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(jr,{...r,...o,ref:t})});Sn.displayName=gu;var Pn="MenuPortal",[wu,qr]=be(Pn,{forceMount:void 0}),Zr=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=Ce(Pn,t);return p.jsx(wu,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Zr.displayName=Pn;var q="MenuContent",[xu,_n]=be(q),Qr=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(yu,{...r,ref:t}):p.jsx(bu,{...r,ref:t})})})})}),yu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu),o=i.useRef(null),r=W(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(Mn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),bu=i.forwardRef((e,t)=>{const n=Ce(q,e.__scopeMenu);return p.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Cu=je("MenuContent.ScrollLock"),Mn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,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=Pt(n),b=Yr(n),C=pu(n),[E,T]=i.useState(null),R=i.useRef(null),M=W(t,R,g.onContentChange),N=i.useRef(0),D=i.useRef(""),L=i.useRef(0),B=i.useRef(null),j=i.useRef("right"),P=i.useRef(0),F=w?pn:i.Fragment,O=w?{as:Cu,allowPinchZoom:!0}:void 0,$=S=>{const H=D.current+S,X=C().filter(V=>!V.disabled),Q=document.activeElement,ne=X.find(V=>V.ref.current===Q)?.textValue,fe=X.map(V=>V.textValue),Ze=Iu(fe,H,ne),ge=X.find(V=>V.textValue===Ze)?.ref.current;(function V(Ie){D.current=Ie,window.clearTimeout(N.current),Ie!==""&&(N.current=window.setTimeout(()=>V(""),1e3))})(H),ge&&setTimeout(()=>ge.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Vo();const A=i.useCallback(S=>j.current===B.current?.side&&Lu(S,B.current?.area),[]);return p.jsx(xu,{scope:n,searchRef:D,onItemEnter:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:i.useCallback(S=>{A(S)||(R.current?.focus(),T(null))},[A]),onTriggerLeave:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(S=>{B.current=S},[]),children:p.jsx(F,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:_(s,S=>{S.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(au,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:_(d,S=>{x.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":ms(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:_(m.onKeyDown,S=>{const X=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Q=S.ctrlKey||S.altKey||S.metaKey,ne=S.key.length===1;X&&(S.key==="Tab"&&S.preventDefault(),!Q&&ne&&$(S.key));const fe=R.current;if(S.target!==fe||!uu.includes(S.key))return;S.preventDefault();const ge=C().filter(V=>!V.disabled).map(V=>V.ref.current);Gr.includes(S.key)&&ge.reverse(),Du(ge)}),onBlur:_(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:_(e.onPointerMove,We(S=>{const H=S.target,X=P.current!==S.clientX;if(S.currentTarget.contains(H)&&X){const Q=S.clientX>P.current?"right":"left";j.current=Q,P.current=S.clientX}}))})})})})})})});Qr.displayName=q;var Eu="MenuGroup",An=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=Eu;var Ru="MenuLabel",Jr=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Jr.displayName=Ru;var ht="MenuItem",uo="menu.itemSelect",_t=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=Ye(ht,e.__scopeMenu),c=_n(ht,e.__scopeMenu),d=W(t,s),l=i.useRef(!1),u=()=>{const f=s.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(es,{...r,ref:d,disabled:n,onClick:_(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=ht;var es=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=_n(ht,n),c=Yr(n),d=i.useRef(null),l=W(t,d),[u,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const w=d.current;w&&v((w.textContent??"").trim())},[s.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(cu,{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,...s,ref:l,onPointerMove:_(e.onPointerMove,We(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,We(w=>a.onItemLeave(w))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),Tu="MenuCheckboxItem",ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(is,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":vt(n)?"mixed":n,...r,ref:t,"data-state":Dn(n),onSelect:_(r.onSelect,()=>o?.(vt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ts.displayName=Tu;var ns="MenuRadioGroup",[Su,Pu]=be(ns,{value:void 0,onValueChange:()=>{}}),os=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Y(o);return p.jsx(Su,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(An,{...r,ref:t})})});os.displayName=ns;var rs="MenuRadioItem",ss=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=Pu(rs,e.__scopeMenu),s=n===r.value;return p.jsx(is,{scope:e.__scopeMenu,checked:s,children:p.jsx(_t,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Dn(s),onSelect:_(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ss.displayName=rs;var On="MenuItemIndicator",[is,_u]=be(On,{checked:!1}),as=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=_u(On,n);return p.jsx(Z,{present:o||vt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Dn(s.checked)})})});as.displayName=On;var Mu="MenuSeparator",cs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});cs.displayName=Mu;var Au="MenuArrow",ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx($r,{...r,...o,ref:t})});ls.displayName=Au;var Ou="MenuSub",[Ff,us]=be(Ou),Le="MenuSubTrigger",ds=i.forwardRef((e,t)=>{const n=Ce(Le,e.__scopeMenu),o=Ye(Le,e.__scopeMenu),r=us(Le,e.__scopeMenu),s=_n(Le,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,l={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),d(null)}},[c,d]),p.jsx(Sn,{asChild:!0,...l,children:p.jsx(es,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ms(n.open),...e,ref:wt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:_(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"];s.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(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||du[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ds.displayName=Le;var fs="MenuSubContent",ps=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=Ce(q,e.__scopeMenu),a=Ye(q,e.__scopeMenu),c=us(fs,e.__scopeMenu),d=i.useRef(null),l=W(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(Mn,{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:_(e.onFocusOutside,u=>{u.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:_(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=fu[a.dir].includes(u.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),u.preventDefault())})})})})})});ps.displayName=fs;function ms(e){return e?"open":"closed"}function vt(e){return e==="indeterminate"}function Dn(e){return vt(e)?"indeterminate":e?"checked":"unchecked"}function Du(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Nu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Iu(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Nu(e,Math.max(s,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 ku(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],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 Lu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ku(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ju=Xr,Fu=Sn,$u=Zr,Bu=Qr,Wu=An,Hu=Jr,Vu=_t,Ku=ts,Uu=os,Gu=ss,zu=as,Yu=cs,Xu=ls,qu=ds,Zu=ps,Mt="DropdownMenu",[Qu]=de(Mt,[zr]),U=zr(),[Ju,hs]=Qu(Mt),vs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,d=U(t),l=i.useRef(null),[u,f]=Oe({prop:r,defaultProp:s??!1,onChange:a,caller:Mt});return p.jsx(Ju,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(ju,{...d,open:u,onOpenChange:f,dir:o,modal:c,children:n})})};vs.displayName=Mt;var gs="DropdownMenuTrigger",ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=hs(gs,n),a=U(n);return p.jsx(Fu,{asChild:!0,...a,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:wt(t,s.triggerRef),onPointerDown:_(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:_(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ws.displayName=gs;var ed="DropdownMenuPortal",xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx($u,{...o,...n})};xs.displayName=ed;var ys="DropdownMenuContent",bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=hs(ys,n),s=U(n),a=i.useRef(!1);return p.jsx(Bu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:_(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)"}})});bs.displayName=ys;var td="DropdownMenuGroup",nd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Wu,{...r,...o,ref:t})});nd.displayName=td;var od="DropdownMenuLabel",rd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Hu,{...r,...o,ref:t})});rd.displayName=od;var sd="DropdownMenuItem",Cs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Vu,{...r,...o,ref:t})});Cs.displayName=sd;var id="DropdownMenuCheckboxItem",ad=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ku,{...r,...o,ref:t})});ad.displayName=id;var cd="DropdownMenuRadioGroup",ld=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Uu,{...r,...o,ref:t})});ld.displayName=cd;var ud="DropdownMenuRadioItem",dd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Gu,{...r,...o,ref:t})});dd.displayName=ud;var fd="DropdownMenuItemIndicator",pd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(zu,{...r,...o,ref:t})});pd.displayName=fd;var md="DropdownMenuSeparator",hd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Yu,{...r,...o,ref:t})});hd.displayName=md;var vd="DropdownMenuArrow",Es=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Xu,{...r,...o,ref:t})});Es.displayName=vd;var gd="DropdownMenuSubTrigger",wd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(qu,{...r,...o,ref:t})});wd.displayName=gd;var xd="DropdownMenuSubContent",yd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Zu,{...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)"}})});yd.displayName=xd;var bd=vs,Cd=ws,Ed=xs,Rd=bs,Td=Cs,Sd=Es;const Pd="_menuButtonContent_boy14_1",_d="_menuButtonItem_boy14_10",Md="_menuButtonArrow_boy14_42",Jt={menuButtonContent:Pd,menuButtonItem:_d,menuButtonArrow:Md},Ad=({children:e,trigger:t,...n})=>p.jsxs(bd,{modal:!1,...n,children:[p.jsx(Cd,{asChild:!0,children:t}),p.jsx(Ed,{children:p.jsxs(Rd,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(Sd,{className:Jt.menuButtonArrow})]})})]}),Od=({children:e,...t})=>p.jsx(Td,{className:Jt.menuButtonItem,...t,children:e});var Dd=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"}),Nd="VisuallyHidden",At=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...Dd,...e.style}}));At.displayName=Nd;var Id=At,Nn="ToastProvider",[In,kd,Ld]=gn("Toast"),[Rs]=de("Toast",[Ld]),[jd,Ot]=Rs(Nn),Ts=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=e,[c,d]=i.useState(null),[l,u]=i.useState(0),f=i.useRef(!1),h=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nn}\`. Expected non-empty \`string\`.`),p.jsx(In.Provider,{scope:t,children:p.jsx(jd,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:c,onViewportChange:d,onToastAdd:i.useCallback(()=>u(v=>v+1),[]),onToastRemove:i.useCallback(()=>u(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:a})})};Ts.displayName=Nn;var Ss="ToastViewport",Fd=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ps=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Fd,label:r="Notifications ({hotkey})",...s}=e,a=Ot(Ss,n),c=kd(n),d=i.useRef(null),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),h=W(t,f,a.onViewportChange),v=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;i.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]),i.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(en);x.dispatchEvent(T),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(tn);x.dispatchEvent(T),a.isClosePausedRef.current=!1}},C=T=>{!g.contains(T.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=i.useCallback(({tabbingDirection:g})=>{const y=c().map(b=>{const C=b.ref.current,E=[C,...Zd(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[c]);return i.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,T=y.shiftKey;if(y.target===g&&T){l.current?.focus();return}const N=m({tabbingDirection:T?"backwards":"forwards"}),D=N.findIndex(L=>L===E);Kt(N.slice(D+1))?y.preventDefault():T?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[c,m]),p.jsxs(va,{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"});Kt(g)}}),p.jsx(In.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...s,ref:h})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Kt(g)}})]})});Ps.displayName=Ss;var _s="ToastFocusProxy",nn=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ot(_s,n);return p.jsx(At,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:a=>{const c=a.relatedTarget;!s.viewport?.contains(c)&&o()}})});nn.displayName=_s;var Xe="Toast",$d="toast.swipeStart",Bd="toast.swipeMove",Wd="toast.swipeCancel",Hd="toast.swipeEnd",Ms=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...a}=e,[c,d]=Oe({prop:o,defaultProp:r??!0,onChange:s,caller:Xe});return p.jsx(Z,{present:n||c,children:p.jsx(Ud,{open:c,...a,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(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:_(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:_(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)})})})});Ms.displayName=Xe;var[Vd,Kd]=Rs(Xe,{onClose(){}}),Ud=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:c,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:v,...w}=e,m=Ot(Xe,n),[g,x]=i.useState(null),y=W(t,P=>x(P)),b=i.useRef(null),C=i.useRef(null),E=r||m.duration,T=i.useRef(0),R=i.useRef(E),M=i.useRef(0),{onToastAdd:N,onToastRemove:D}=m,L=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),a()}),B=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(L,P))},[L]);i.useEffect(()=>{const P=m.viewport;if(P){const F=()=>{B(R.current),l?.()},O=()=>{const $=new Date().getTime()-T.current;R.current=R.current-$,window.clearTimeout(M.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,F),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,F)}}},[m.viewport,E,d,l,B]),i.useEffect(()=>{s&&!m.isClosePausedRef.current&&B(E)},[s,E,m.isClosePausedRef,B]),i.useEffect(()=>(N(),()=>D()),[N,D]);const j=i.useMemo(()=>g?Ls(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[j&&p.jsx(Gd,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:j}),p.jsx(Vd,{scope:n,onClose:L,children:sn.createPortal(p.jsx(In.ItemSlot,{scope:n,children:p.jsx(ha,{asChild:!0,onEscapeKeyDown:_(c,()=>{m.isFocusedToastEscapeKeyDownRef.current||L(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,P=>{P.key==="Escape"&&(c?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:_(e.onPointerDown,P=>{P.button===0&&(b.current={x:P.clientX,y:P.clientY})}),onPointerMove:_(e.onPointerMove,P=>{if(!b.current)return;const F=P.clientX-b.current.x,O=P.clientY-b.current.y,$=!!C.current,A=["left","right"].includes(m.swipeDirection),S=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,H=A?S(0,F):0,X=A?0:S(0,O),Q=P.pointerType==="touch"?10:2,ne={x:H,y:X},fe={originalEvent:P,delta:ne};$?(C.current=ne,it(Bd,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(C.current=ne,it($d,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(F)>Q||Math.abs(O)>Q)&&(b.current=null)}),onPointerUp:_(e.onPointerUp,P=>{const F=C.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),C.current=null,b.current=null,F){const $=P.currentTarget,A={originalEvent:P,delta:F};fo(F,m.swipeDirection,m.swipeThreshold)?it(Hd,v,A,{discrete:!0}):it(Wd,h,A,{discrete:!0}),$.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Gd=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(Xe,t),[s,a]=i.useState(!1),[c,d]=i.useState(!1);return Xd(()=>a(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),c?null:p.jsx(Ke,{asChild:!0,children:p.jsx(At,{...o,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},zd="ToastTitle",As=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});As.displayName=zd;var Yd="ToastDescription",Os=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Os.displayName=Yd;var Ds="ToastAction",Ns=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(ks,{altText:n,asChild:!0,children:p.jsx(kn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ds}\`. Expected non-empty \`string\`.`),null)});Ns.displayName=Ds;var Is="ToastClose",kn=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Kd(Is,n);return p.jsx(ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,r.onClose)})})});kn.displayName=Is;var ks=i.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 Ls(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),qd(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=o.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...Ls(o))}}),t}function it(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Xd(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 qd(e){return e.nodeType===e.ELEMENT_NODE}function Zd(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 Kt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Qd=Ts,Jd=Ps,ef=Ms,tf=As,nf=Os,of=Ns,rf=kn;const sf="_toast_7o27j_1",af="_toastContent_7o27j_12",cf="_toastViewport_7o27j_70",lf="_toastTitle_7o27j_89",uf="_toastDescription_7o27j_95",Se={toast:sf,toastContent:af,toastViewport:cf,toastTitle:lf,toastDescription:uf},df=({...e})=>p.jsx(Qd,{...e}),js=k.forwardRef(({...e},t)=>p.jsx(Jd,{className:Se.toastViewport,ref:t,...e}));js.displayName="ToastViewport";const Fs=k.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs(ef,{className:Se.toast,ref:r,...o,children:[p.jsxs("div",{className:Se.toastContent,children:[p.jsx(tf,{className:Se.toastTitle,children:e}),t&&p.jsx(nf,{className:Se.toastDescription,children:t})]}),n&&p.jsx(of,{className:Se.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(rf,{asChild:!0,children:p.jsx(gt,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));Fs.displayName="Toast";var[Dt]=de("Tooltip",[St]),Nt=St(),$s="TooltipProvider",ff=700,on="tooltip.open",[pf,Ln]=Dt($s),Bs=e=>{const{__scopeTooltip:t,delayDuration:n=ff,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(pf,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:s})};Bs.displayName=$s;var He="Tooltip",[mf,qe]=Dt(He),Ws=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=i.useState(null),h=we(),v=i.useRef(0),w=a??d.disableHoverableContent,m=c??d.delayDuration,g=i.useRef(!1),[x,y]=Oe({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),s?.(R)},caller:He}),b=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),C=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,g.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),T=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{g.current=!0,y(!0),v.current=0},m)},[m,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),p.jsx(Lr,{...l,children:p.jsx(mf,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayedRef.current?T():C()},[d.isOpenDelayedRef,T,C]),onTriggerLeave:i.useCallback(()=>{w?E():(window.clearTimeout(v.current),v.current=0)},[E,w]),onOpen:C,onClose:E,disableHoverableContent:w,children:n})})};Ws.displayName=He;var rn="TooltipTrigger",Hs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=qe(rn,n),s=Ln(rn,n),a=Nt(n),c=i.useRef(null),d=W(t,c,r.onTriggerChange),l=i.useRef(!1),u=i.useRef(!1),f=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jr,{asChild:!0,...a,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:_(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Hs.displayName=rn;var jn="TooltipPortal",[hf,vf]=Dt(jn,{forceMount:void 0}),Vs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=qe(jn,t);return p.jsx(hf,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ke,{asChild:!0,container:r,children:o})})})};Vs.displayName=jn;var Ae="TooltipContent",Ks=i.forwardRef((e,t)=>{const n=vf(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=qe(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||a.open,children:a.disableHoverableContent?p.jsx(Us,{side:r,...s,ref:t}):p.jsx(gf,{side:r,...s,ref:t})})}),gf=i.forwardRef((e,t)=>{const n=qe(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=i.useRef(null),s=W(t,r),[a,c]=i.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=bf(x,g.getBoundingClientRect()),b=Cf(x,y),C=Ef(m.getBoundingClientRect()),E=Tf([...b,...C]);c(E),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.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]),i.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=!Rf(x,a);y?h():b&&(h(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,a,l,h]),p.jsx(Us,{...e,ref:s})}),[wf,xf]=Dt(He,{isInside:!1}),yf=Ui("TooltipContent"),Us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,d=qe(Ae,n),l=Nt(n),{onClose:u}=d;return i.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),i.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:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Fr,{"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(yf,{children:o}),p.jsx(wf,{scope:n,isInside:!0,children:p.jsx(Id,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Ks.displayName=Ae;var Gs="TooltipArrow",zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return xf(Gs,n).isInside?null:p.jsx($r,{...r,...o,ref:t})});zs.displayName=Gs;function bf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Cf(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 Ef(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 Rf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],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 Tf(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),Sf(t)}function Sf(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 s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.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 s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.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 Pf=Bs,_f=Ws,Mf=Hs,Af=Vs,Of=Ks,Df=zs;const Nf="_tooltipContent_4rdhp_1",If="_tooltipArrow_4rdhp_12",po={tooltipContent:Nf,tooltipArrow:If},kf=({...e})=>p.jsx(Pf,{...e});function Lf({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...s}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(_f,{open:n,defaultOpen:o,onOpenChange:a=>{r?.(a)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(Mf,{asChild:!0,children:e}),p.jsx(Af,{children:p.jsxs(Of,{className:po.tooltipContent,...s,sideOffset:4,children:[t,p.jsx(Df,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=vo;exports.ArrowRight=go;exports.Button=gt;exports.Check=an;exports.Checkbox=sa;exports.Circle=wo;exports.Close=cn;exports.Dialog=Oc;exports.ExternalLink=xo;exports.Gear=yo;exports.Hammer=bo;exports.Heart=Co;exports.IconMap=Ut;exports.Kebab=Eo;exports.Lightning=Ro;exports.Mail=To;exports.Menu=So;exports.MenuButton=Ad;exports.MenuButtonItem=Od;exports.NoMobile=Po;exports.Pencil=_o;exports.Spinner=ln;exports.Toast=Fs;exports.ToastProvider=df;exports.ToastViewport=js;exports.Tooltip=Lf;exports.TooltipProvider=kf;exports.createIcon=K;exports.iconSizes=Di;
|