@commercetools/nimbus 0.0.3 → 0.0.4-rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@chakra-ui/react"),W=require("@commercetools/nimbus-tokens"),x=require("react/jsx-runtime"),a=require("react"),ps=require("@emotion/is-prop-valid"),Ie=require("react-dom"),Co=require("next-themes"),ee=require("@commercetools/nimbus-icons"),vs=require("react-hotkeys-hook"),bs=require("react-use"),wo=S.defineRecipe({className:"avatar",base:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",overflow:"hidden",userSelect:"none",borderRadius:"full",flexShrink:0,fontWeight:"600",backgroundColor:"colorPalette.3",colorPalette:"primary",color:"colorPalette.11",focusVisibleRing:"outside","button&":{cursor:"button"},_disabled:{layerStyle:"disabled"}},variants:{size:{md:{width:1e3,height:1e3,textStyle:"sm"},xs:{width:800,height:800,textStyle:"xs"},"2xs":{width:600,height:600,textStyle:"xs"}}},defaultVariants:{size:"md"}}),{withContext:hs}=S.createRecipeContext({recipe:wo}),gs=hs("figure");function ms(r,e){return r.split("")[0].toUpperCase()+e.split("")[0].toUpperCase()}const Eo=a.forwardRef((r,e)=>{const{firstName:t,lastName:n,src:o,alt:i,...l}=r,s=`${t} ${n}`,u={"aria-label":`${s} avatar`,ref:e,...l};return x.jsx(gs,{...u,children:o?x.jsx(S.Image,{src:o,alt:i||s}):ms(t,n)})});Eo.displayName="Avatar";const ve=a.forwardRef((r,e)=>x.jsx(S.Box,{ref:e,...r}));ve.displayName="Box";const z=typeof document<"u"?a.useLayoutEffect:()=>{};function Z(r){const e=a.useRef(null);return z(()=>{e.current=r},[r]),a.useCallback((...t)=>{const n=e.current;return n==null?void 0:n(...t)},[])}function ys(r){let[e,t]=a.useState(r),n=a.useRef(null),o=Z(()=>{if(!n.current)return;let l=n.current.next();if(l.done){n.current=null;return}e===l.value?o():t(l.value)});z(()=>{n.current&&o()});let i=Z(l=>{n.current=l(e),o()});return[e,i]}const Kt={prefix:String(Math.round(Math.random()*1e10)),current:0},To=a.createContext(Kt),$s=a.createContext(!1);let xs=!!(typeof window<"u"&&window.document&&window.document.createElement),rr=new WeakMap;function Ps(r=!1){let e=a.useContext(To),t=a.useRef(null);if(t.current===null&&!r){var n,o;let i=(o=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(n=o.ReactCurrentOwner)===null||n===void 0?void 0:n.current;if(i){let l=rr.get(i);l==null?rr.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,rr.delete(i))}t.current=++e.current}return t.current}function Ss(r){let e=a.useContext(To);e===Kt&&!xs&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=Ps(!!r),n=e===Kt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return r||`${n}-${t}`}function Cs(r){let e=a.useId(),[t]=a.useState(Se()),n=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Kt.prefix}`;return r||`${n}-${e}`}const ws=typeof a.useId=="function"?Cs:Ss;function Es(){return!1}function Ts(){return!0}function Ds(r){return()=>{}}function Se(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(Ds,Es,Ts):a.useContext($s)}let ks=!!(typeof window<"u"&&window.document&&window.document.createElement),ye=new Map;function Y(r){let[e,t]=a.useState(r),n=a.useRef(null),o=ws(e),i=a.useCallback(l=>{n.current=l},[]);return ks&&(ye.has(o)&&!ye.get(o).includes(i)?ye.set(o,[...ye.get(o),i]):ye.set(o,[i])),z(()=>{let l=o;return()=>{ye.delete(l)}},[o]),a.useEffect(()=>{let l=n.current;l&&(n.current=null,t(l))}),o}function Rs(r,e){if(r===e)return r;let t=ye.get(r);if(t)return t.forEach(o=>o(e)),e;let n=ye.get(e);return n?(n.forEach(o=>o(r)),r):e}function at(r=[]){let e=Y(),[t,n]=ys(e),o=a.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,n]);return z(o,[e,o,...r]),t}function xe(...r){return(...e)=>{for(let t of r)typeof t=="function"&&t(...e)}}const j=r=>{var e;return(e=r==null?void 0:r.ownerDocument)!==null&&e!==void 0?e:document},le=r=>r&&"window"in r&&r.window===r?r:j(r).defaultView||window;function Do(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;e<o;e++)r[e]&&(t=Do(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function Ks(){for(var r,e,t=0,n="",o=arguments.length;t<o;t++)(r=arguments[t])&&(e=Do(r))&&(n&&(n+=" "),n+=e);return n}function I(...r){let e={...r[0]};for(let t=1;t<r.length;t++){let n=r[t];for(let o in n){let i=e[o],l=n[o];typeof i=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=xe(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=Ks(i,l):o==="id"&&i&&l?e.id=Rs(i,l):e[o]=l!==void 0?l:i}}return e}function ko(...r){return r.length===1&&r[0]?r[0]:e=>{for(let t of r)typeof t=="function"?t(e):t!=null&&(t.current=e)}}const Fs=new Set(["id"]),Ms=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Ls=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),As=/^(data-.*)$/;function G(r,e={}){let{labelable:t,isLink:n,propNames:o}=e,i={};for(const l in r)Object.prototype.hasOwnProperty.call(r,l)&&(Fs.has(l)||t&&Ms.has(l)||n&&Ls.has(l)||o!=null&&o.has(l)||As.test(l))&&(i[l]=r[l]);return i}function be(r){if(Is())r.focus({preventScroll:!0});else{let e=Bs(r);r.focus(),Ns(e)}}let Pt=null;function Is(){if(Pt==null){Pt=!1;try{document.createElement("div").focus({get preventScroll(){return Pt=!0,!0}})}catch{}}return Pt}function Bs(r){let e=r.parentNode,t=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&t.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),t}function Ns(r){for(let{element:e,scrollTop:t,scrollLeft:n}of r)e.scrollTop=t,e.scrollLeft=n}function zt(r){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(t=>r.test(t.brand)))||r.test(window.navigator.userAgent)}function zr(r){var e;return typeof window<"u"&&window.navigator!=null?r.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function he(r){let e=null;return()=>(e==null&&(e=r()),e)}const Pe=he(function(){return zr(/^Mac/i)}),Os=he(function(){return zr(/^iPhone/i)}),Ro=he(function(){return zr(/^iPad/i)||Pe()&&navigator.maxTouchPoints>1}),Ht=he(function(){return Os()||Ro()}),zs=he(function(){return Pe()||Ht()}),Hr=he(function(){return zt(/AppleWebKit/i)&&!Ko()}),Ko=he(function(){return zt(/Chrome/i)}),Vr=he(function(){return zt(/Android/i)}),Hs=he(function(){return zt(/Firefox/i)}),Vs=a.createContext({isNative:!0,open:_s,useHref:r=>r});function Vt(){return a.useContext(Vs)}function js(r,e){let t=r.getAttribute("target");return(!t||t==="_self")&&r.origin===location.origin&&!r.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Fe(r,e,t=!0){var n,o;let{metaKey:i,ctrlKey:l,altKey:s,shiftKey:u}=e;Hs()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&r.target==="_blank"&&(Pe()?i=!0:l=!0);let c=Hr()&&Pe()&&!Ro()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:l,altKey:s,shiftKey:u}):new MouseEvent("click",{metaKey:i,ctrlKey:l,altKey:s,shiftKey:u,bubbles:!0,cancelable:!0});Fe.isOpening=t,be(r),r.dispatchEvent(c),Fe.isOpening=!1}Fe.isOpening=!1;function Ws(r,e){if(r instanceof HTMLAnchorElement)e(r);else if(r.hasAttribute("data-href")){let t=document.createElement("a");t.href=r.getAttribute("data-href"),r.hasAttribute("data-target")&&(t.target=r.getAttribute("data-target")),r.hasAttribute("data-rel")&&(t.rel=r.getAttribute("data-rel")),r.hasAttribute("data-download")&&(t.download=r.getAttribute("data-download")),r.hasAttribute("data-ping")&&(t.ping=r.getAttribute("data-ping")),r.hasAttribute("data-referrer-policy")&&(t.referrerPolicy=r.getAttribute("data-referrer-policy")),r.appendChild(t),e(t),r.removeChild(t)}}function _s(r,e){Ws(r,t=>Fe(t,e))}function Fo(r){let e=Vt();var t;const n=e.useHref((t=r==null?void 0:r.href)!==null&&t!==void 0?t:"");return{href:r!=null&&r.href?n:void 0,target:r==null?void 0:r.target,rel:r==null?void 0:r.rel,download:r==null?void 0:r.download,ping:r==null?void 0:r.ping,referrerPolicy:r==null?void 0:r.referrerPolicy}}let je=new Map,yr=new Set;function Rn(){if(typeof window>"u")return;function r(n){return"propertyName"in n}let e=n=>{if(!r(n)||!n.target)return;let o=je.get(n.target);o||(o=new Set,je.set(n.target,o),n.target.addEventListener("transitioncancel",t,{once:!0})),o.add(n.propertyName)},t=n=>{if(!r(n)||!n.target)return;let o=je.get(n.target);if(o&&(o.delete(n.propertyName),o.size===0&&(n.target.removeEventListener("transitioncancel",t),je.delete(n.target)),je.size===0)){for(let i of yr)i();yr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Rn():document.addEventListener("DOMContentLoaded",Rn));function Mo(r){requestAnimationFrame(()=>{je.size===0?r():yr.add(r)})}function Lo(){let r=a.useRef(new Map),e=a.useCallback((o,i,l,s)=>{let u=s!=null&&s.once?(...c)=>{r.current.delete(l),l(...c)}:l;r.current.set(l,{type:i,eventTarget:o,fn:u,options:s}),o.addEventListener(i,u,s)},[]),t=a.useCallback((o,i,l,s)=>{var u;let c=((u=r.current.get(l))===null||u===void 0?void 0:u.fn)||l;o.removeEventListener(i,c,s),r.current.delete(l)},[]),n=a.useCallback(()=>{r.current.forEach((o,i)=>{t(o.eventTarget,o.type,i,o.options)})},[t]);return a.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:n}}function Ao(r,e){let{id:t,"aria-label":n,"aria-labelledby":o}=r;return t=Y(t),o&&n?o=[...new Set([t,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:t,"aria-label":n,"aria-labelledby":o}}function ne(r){const e=a.useRef(null);return a.useMemo(()=>({get current(){return e.current},set current(t){e.current=t,typeof r=="function"?r(t):r&&(r.current=t)}}),[r])}function Kn(r,e){const t=a.useRef(!0),n=a.useRef(null);z(()=>(t.current=!0,()=>{t.current=!1}),[]),z(()=>{t.current?t.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&r(),n.current=e},e)}function Us(){return typeof window.ResizeObserver<"u"}function $r(r){const{ref:e,box:t,onResize:n}=r;a.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(Us()){const i=new window.ResizeObserver(l=>{l.length&&n()});return i.observe(o,{box:t}),()=>{o&&i.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,t])}function jr(r,e){z(()=>{if(r&&r.ref&&e)return r.ref.current=e.current,()=>{r.ref&&(r.ref.current=null)}})}function st(r,e){if(!r)return!1;let t=window.getComputedStyle(r),n=/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY);return n&&e&&(n=r.scrollHeight!==r.clientHeight||r.scrollWidth!==r.clientWidth),n}function Io(r,e){let t=r;for(st(t,e)&&(t=t.parentElement);t&&!st(t,e);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Gs(r,e){const t=[];for(;r&&r!==document.documentElement;)st(r,e)&&t.push(r),r=r.parentElement;return t}let qs=0;const nr=new Map;function Zs(r){let[e,t]=a.useState();return z(()=>{if(!r)return;let n=nr.get(r);if(n)t(n.element.id);else{let o=`react-aria-description-${qs++}`;t(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=r,document.body.appendChild(i),n={refCount:0,element:i},nr.set(r,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),nr.delete(r))}},[r]),{"aria-describedby":r?e:void 0}}function nt(r,e,t,n){let o=Z(t),i=t==null;a.useEffect(()=>{if(i||!r.current)return;let l=r.current;return l.addEventListener(e,o,n),()=>{l.removeEventListener(e,o,n)}},[r,e,n,i,o])}function Bo(r,e){let t=Fn(r,e,"left"),n=Fn(r,e,"top"),o=e.offsetWidth,i=e.offsetHeight,l=r.scrollLeft,s=r.scrollTop,{borderTopWidth:u,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:b,scrollPaddingLeft:p}=getComputedStyle(r),h=l+parseInt(c,10),m=s+parseInt(u,10),y=h+r.clientWidth,$=m+r.clientHeight,C=parseInt(d,10)||0,w=parseInt(b,10)||0,F=parseInt(f,10)||0,k=parseInt(p,10)||0;t<=l+k?l=t-parseInt(c,10)-k:t+o>y-F&&(l+=t+o-y+F),n<=m+C?s=n-parseInt(u,10)-C:n+i>$-w&&(s+=n+i-$+w),r.scrollLeft=l,r.scrollTop=s}function Fn(r,e,t){const n=t==="left"?"offsetLeft":"offsetTop";let o=0;for(;e.offsetParent&&(o+=e[n],e.offsetParent!==r);){if(e.offsetParent.contains(r)){o-=r[n];break}e=e.offsetParent}return o}function Mn(r,e){if(r&&document.contains(r)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let u=Gs(r);for(let c of u)Bo(c,r)}else{var t;let{left:u,top:c}=r.getBoundingClientRect();r==null||(t=r.scrollIntoView)===null||t===void 0||t.call(r,{block:"nearest"});let{left:d,top:f}=r.getBoundingClientRect();if(Math.abs(u-d)>1||Math.abs(c-f)>1){var n,o,i;e==null||(o=e.containingElement)===null||o===void 0||(n=o.scrollIntoView)===null||n===void 0||n.call(o,{block:"center",inline:"center"}),(i=r.scrollIntoView)===null||i===void 0||i.call(r,{block:"nearest"})}}}}function xr(r){return r.mozInputSource===0&&r.isTrusted?!0:Vr()&&r.pointerType?r.type==="click"&&r.buttons===1:r.detail===0&&!r.pointerType}function Ys(r){return!Vr()&&r.width===0&&r.height===0||r.width===1&&r.height===1&&r.pressure===0&&r.detail===0&&r.pointerType==="mouse"}function Wr(r,e,t){let n=a.useRef(e),o=Z(()=>{t&&t(n.current)});a.useEffect(()=>{var i;let l=r==null||(i=r.current)===null||i===void 0?void 0:i.form;return l==null||l.addEventListener("reset",o),()=>{l==null||l.removeEventListener("reset",o)}},[r,o])}const Xs="react-aria-clear-focus",Js="react-aria-focus",No="react-aria-update-activedescendant";function We(r){return Pe()?r.metaKey:r.ctrlKey}function Oo(r,e=!0){let[t,n]=a.useState(!0),o=t&&e;return z(()=>{if(o&&r.current&&"getAnimations"in r.current)for(let i of r.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[r,o]),Ho(r,o,a.useCallback(()=>n(!1),[])),o}function zo(r,e){let[t,n]=a.useState(e?"open":"closed");switch(t){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=t==="exiting";return Ho(r,o,a.useCallback(()=>{n(i=>i==="exiting"?"closed":i)},[])),o}function Ho(r,e,t){z(()=>{if(e&&r.current){if(!("getAnimations"in r.current)){t();return}let n=r.current.getAnimations();if(n.length===0){t();return}let o=!1;return Promise.all(n.map(i=>i.finished)).then(()=>{o||Ie.flushSync(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[r,e,t])}function Ce(r,e,t){let[n,o]=a.useState(r||e),i=a.useRef(r!==void 0),l=r!==void 0;a.useEffect(()=>{let c=i.current;c!==l&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),i.current=l},[l]);let s=l?r:n,u=a.useCallback((c,...d)=>{let f=(b,...p)=>{t&&(Object.is(s,b)||t(b,...p)),l||(s=b)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((p,...h)=>{let m=c(l?s:p,...h);return f(m,...d),l?p:m})):(l||o(c),f(c,...d))},[l,s,t]);return[s,u]}function Ft(r,e=-1/0,t=1/0){return Math.min(Math.max(r,e),t)}let _e="default",Pr="",Rt=new WeakMap;function Ln(r){if(Ht()){if(_e==="default"){const e=j(r);Pr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}_e="disabled"}else(r instanceof HTMLElement||r instanceof SVGElement)&&(Rt.set(r,r.style.userSelect),r.style.userSelect="none")}function St(r){if(Ht()){if(_e!=="disabled")return;_e="restoring",setTimeout(()=>{Mo(()=>{if(_e==="restoring"){const e=j(r);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Pr||""),Pr="",_e="default"}})},300)}else if((r instanceof HTMLElement||r instanceof SVGElement)&&r&&Rt.has(r)){let e=Rt.get(r);r.style.userSelect==="none"&&(r.style.userSelect=e),r.getAttribute("style")===""&&r.removeAttribute("style"),Rt.delete(r)}}const ut=a.createContext({register:()=>{}});ut.displayName="PressResponderContext";function Qs(r,e){return e.get?e.get.call(r):e.value}function Vo(r,e,t){if(!e.has(r))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(r)}function eu(r,e){var t=Vo(r,e,"get");return Qs(r,t)}function tu(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ru(r,e,t){tu(r,e),e.set(r,t)}function nu(r,e,t){if(e.set)e.set.call(r,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function An(r,e,t){var n=Vo(r,e,"set");return nu(r,n,t),t}function ou(r){let e=a.useContext(ut);if(e){let{register:t,...n}=e;r=I(n,r),t()}return jr(e,r.ref),r}var Ct=new WeakMap;class wt{continuePropagation(){An(this,Ct,!1)}get shouldStopPropagation(){return eu(this,Ct)}constructor(e,t,n,o){ru(this,Ct,{writable:!0,value:void 0}),An(this,Ct,!0);var i;let l=(i=o==null?void 0:o.target)!==null&&i!==void 0?i:n.currentTarget;const s=l==null?void 0:l.getBoundingClientRect();let u,c=0,d,f=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,f=n.clientY),s&&(d!=null&&f!=null?(u=d-s.left,c=f-s.top):(u=s.width/2,c=s.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=u,this.y=c}}const In=Symbol("linkClicked");function Me(r){let{onPress:e,onPressChange:t,onPressStart:n,onPressEnd:o,onPressUp:i,isDisabled:l,isPressed:s,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:f,...b}=ou(r),[p,h]=a.useState(!1),m=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:y,removeAllGlobalListeners:$}=Lo(),C=Z((v,R)=>{let K=m.current;if(l||K.didFirePressStart)return!1;let E=!0;if(K.isTriggeringEvent=!0,n){let L=new wt("pressstart",R,v);n(L),E=L.shouldStopPropagation}return t&&t(!0),K.isTriggeringEvent=!1,K.didFirePressStart=!0,h(!0),E}),w=Z((v,R,K=!0)=>{let E=m.current;if(!E.didFirePressStart)return!1;E.ignoreClickAfterPress=!0,E.didFirePressStart=!1,E.isTriggeringEvent=!0;let L=!0;if(o){let g=new wt("pressend",R,v);o(g),L=g.shouldStopPropagation}if(t&&t(!1),h(!1),e&&K&&!l){let g=new wt("press",R,v);e(g),L&&(L=g.shouldStopPropagation)}return E.isTriggeringEvent=!1,L}),F=Z((v,R)=>{let K=m.current;if(l)return!1;if(i){K.isTriggeringEvent=!0;let E=new wt("pressup",R,v);return i(E),K.isTriggeringEvent=!1,E.shouldStopPropagation}return!0}),k=Z(v=>{let R=m.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&w(de(R.target,v),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,$(),d||St(R.target))}),D=Z(v=>{c&&k(v)}),B=a.useMemo(()=>{let v=m.current,R={onKeyDown(E){if(or(E.nativeEvent,E.currentTarget)&&E.currentTarget.contains(E.target)){var L;Nn(E.target,E.key)&&E.preventDefault();let g=!0;if(!v.isPressed&&!E.repeat){v.target=E.currentTarget,v.isPressed=!0,g=C(E,"keyboard");let P=E.currentTarget,M=N=>{or(N,P)&&!N.repeat&&P.contains(N.target)&&v.target&&F(de(v.target,N),"keyboard")};y(j(E.currentTarget),"keyup",xe(M,K),!0)}g&&E.stopPropagation(),E.metaKey&&Pe()&&((L=v.metaKeyEvents)===null||L===void 0||L.set(E.key,E.nativeEvent))}else E.key==="Meta"&&(v.metaKeyEvents=new Map)},onClick(E){if(!(E&&!E.currentTarget.contains(E.target))&&E&&E.button===0&&!v.isTriggeringEvent&&!Fe.isOpening){let L=!0;if(l&&E.preventDefault(),!v.ignoreClickAfterPress&&!v.ignoreEmulatedMouseEvents&&!v.isPressed&&(v.pointerType==="virtual"||xr(E.nativeEvent))){!l&&!u&&be(E.currentTarget);let g=C(E,"virtual"),P=F(E,"virtual"),M=w(E,"virtual");L=g&&P&&M}v.ignoreEmulatedMouseEvents=!1,v.ignoreClickAfterPress=!1,L&&E.stopPropagation()}}},K=E=>{var L;if(v.isPressed&&v.target&&or(E,v.target)){var g;Nn(E.target,E.key)&&E.preventDefault();let M=E.target;w(de(v.target,E),"keyboard",v.target.contains(M)),$(),E.key!=="Enter"&&_r(v.target)&&v.target.contains(M)&&!E[In]&&(E[In]=!0,Fe(v.target,E,!1)),v.isPressed=!1,(g=v.metaKeyEvents)===null||g===void 0||g.delete(E.key)}else if(E.key==="Meta"&&(!((L=v.metaKeyEvents)===null||L===void 0)&&L.size)){var P;let M=v.metaKeyEvents;v.metaKeyEvents=void 0;for(let N of M.values())(P=v.target)===null||P===void 0||P.dispatchEvent(new KeyboardEvent("keyup",N))}};if(typeof PointerEvent<"u"){R.onPointerDown=P=>{if(P.button!==0||!P.currentTarget.contains(P.target))return;if(Ys(P.nativeEvent)){v.pointerType="virtual";return}lr(P.currentTarget)&&P.preventDefault(),v.pointerType=P.pointerType;let M=!0;if(!v.isPressed){v.isPressed=!0,v.isOverTarget=!0,v.activePointerId=P.pointerId,v.target=P.currentTarget,!l&&!u&&be(P.currentTarget),d||Ln(v.target),M=C(P,v.pointerType);let N=P.target;"releasePointerCapture"in N&&N.releasePointerCapture(P.pointerId),y(j(P.currentTarget),"pointerup",E,!1),y(j(P.currentTarget),"pointercancel",g,!1)}M&&P.stopPropagation()},R.onMouseDown=P=>{P.currentTarget.contains(P.target)&&P.button===0&&(lr(P.currentTarget)&&P.preventDefault(),P.stopPropagation())},R.onPointerUp=P=>{!P.currentTarget.contains(P.target)||v.pointerType==="virtual"||P.button===0&&F(P,v.pointerType||P.pointerType)},R.onPointerEnter=P=>{P.pointerId===v.activePointerId&&v.target&&!v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!0,C(de(v.target,P),v.pointerType))},R.onPointerLeave=P=>{P.pointerId===v.activePointerId&&v.target&&v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!1,w(de(v.target,P),v.pointerType,!1),D(P))};let E=P=>{P.pointerId===v.activePointerId&&v.isPressed&&P.button===0&&v.target&&(v.target.contains(P.target)&&v.pointerType!=null?w(de(v.target,P),v.pointerType):v.isOverTarget&&v.pointerType!=null&&w(de(v.target,P),v.pointerType,!1),v.isPressed=!1,v.isOverTarget=!1,v.activePointerId=null,v.pointerType=null,$(),d||St(v.target),"ontouchend"in v.target&&P.pointerType!=="mouse"&&y(v.target,"touchend",L,{once:!0}))},L=P=>{jo(P.currentTarget)&&P.preventDefault()},g=P=>{k(P)};R.onDragStart=P=>{P.currentTarget.contains(P.target)&&k(P)}}else{R.onMouseDown=g=>{if(g.button!==0||!g.currentTarget.contains(g.target))return;if(lr(g.currentTarget)&&g.preventDefault(),v.ignoreEmulatedMouseEvents){g.stopPropagation();return}v.isPressed=!0,v.isOverTarget=!0,v.target=g.currentTarget,v.pointerType=xr(g.nativeEvent)?"virtual":"mouse",!l&&!u&&be(g.currentTarget),C(g,v.pointerType)&&g.stopPropagation(),y(j(g.currentTarget),"mouseup",E,!1)},R.onMouseEnter=g=>{if(!g.currentTarget.contains(g.target))return;let P=!0;v.isPressed&&!v.ignoreEmulatedMouseEvents&&v.pointerType!=null&&(v.isOverTarget=!0,P=C(g,v.pointerType)),P&&g.stopPropagation()},R.onMouseLeave=g=>{if(!g.currentTarget.contains(g.target))return;let P=!0;v.isPressed&&!v.ignoreEmulatedMouseEvents&&v.pointerType!=null&&(v.isOverTarget=!1,P=w(g,v.pointerType,!1),D(g)),P&&g.stopPropagation()},R.onMouseUp=g=>{g.currentTarget.contains(g.target)&&!v.ignoreEmulatedMouseEvents&&g.button===0&&F(g,v.pointerType||"mouse")};let E=g=>{if(g.button===0){if(v.isPressed=!1,$(),v.ignoreEmulatedMouseEvents){v.ignoreEmulatedMouseEvents=!1;return}v.target&&ir(g,v.target)&&v.pointerType!=null?w(de(v.target,g),v.pointerType):v.target&&v.isOverTarget&&v.pointerType!=null&&w(de(v.target,g),v.pointerType,!1),v.isOverTarget=!1}};R.onTouchStart=g=>{if(!g.currentTarget.contains(g.target))return;let P=iu(g.nativeEvent);if(!P)return;v.activePointerId=P.identifier,v.ignoreEmulatedMouseEvents=!0,v.isOverTarget=!0,v.isPressed=!0,v.target=g.currentTarget,v.pointerType="touch",!l&&!u&&be(g.currentTarget),d||Ln(v.target),C(me(v.target,g),v.pointerType)&&g.stopPropagation(),y(le(g.currentTarget),"scroll",L,!0)},R.onTouchMove=g=>{if(!g.currentTarget.contains(g.target))return;if(!v.isPressed){g.stopPropagation();return}let P=Bn(g.nativeEvent,v.activePointerId),M=!0;P&&ir(P,g.currentTarget)?!v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!0,M=C(me(v.target,g),v.pointerType)):v.isOverTarget&&v.pointerType!=null&&(v.isOverTarget=!1,M=w(me(v.target,g),v.pointerType,!1),D(me(v.target,g))),M&&g.stopPropagation()},R.onTouchEnd=g=>{if(!g.currentTarget.contains(g.target))return;if(!v.isPressed){g.stopPropagation();return}let P=Bn(g.nativeEvent,v.activePointerId),M=!0;P&&ir(P,g.currentTarget)&&v.pointerType!=null?(F(me(v.target,g),v.pointerType),M=w(me(v.target,g),v.pointerType)):v.isOverTarget&&v.pointerType!=null&&(M=w(me(v.target,g),v.pointerType,!1)),M&&g.stopPropagation(),v.isPressed=!1,v.activePointerId=null,v.isOverTarget=!1,v.ignoreEmulatedMouseEvents=!0,v.target&&!d&&St(v.target),$()},R.onTouchCancel=g=>{g.currentTarget.contains(g.target)&&(g.stopPropagation(),v.isPressed&&k(me(v.target,g)))};let L=g=>{v.isPressed&&g.target.contains(v.target)&&k({currentTarget:v.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=g=>{g.currentTarget.contains(g.target)&&k(g)}}return R},[y,l,u,$,d,k,D,w,C,F]);return a.useEffect(()=>()=>{var v;d||St((v=m.current.target)!==null&&v!==void 0?v:void 0)},[d]),{isPressed:s||p,pressProps:I(b,B)}}function _r(r){return r.tagName==="A"&&r.hasAttribute("href")}function or(r,e){const{key:t,code:n}=r,o=e,i=o.getAttribute("role");return(t==="Enter"||t===" "||t==="Spacebar"||n==="Space")&&!(o instanceof le(o).HTMLInputElement&&!Wo(o,t)||o instanceof le(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&_r(o))&&t!=="Enter")}function iu(r){const{targetTouches:e}=r;return e.length>0?e[0]:null}function Bn(r,e){const t=r.changedTouches;for(let n=0;n<t.length;n++){const o=t[n];if(o.identifier===e)return o}return null}function me(r,e){let t=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(t=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:r,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:t,clientY:n}}function de(r,e){let t=e.clientX,n=e.clientY;return{currentTarget:r,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:t,clientY:n}}function lu(r){let e=0,t=0;return r.width!==void 0?e=r.width/2:r.radiusX!==void 0&&(e=r.radiusX),r.height!==void 0?t=r.height/2:r.radiusY!==void 0&&(t=r.radiusY),{top:r.clientY-t,right:r.clientX+e,bottom:r.clientY+t,left:r.clientX-e}}function au(r,e){return!(r.left>e.right||e.left>r.right||r.top>e.bottom||e.top>r.bottom)}function ir(r,e){let t=e.getBoundingClientRect(),n=lu(r);return au(t,n)}function lr(r){return!(r instanceof HTMLElement)||!r.hasAttribute("draggable")}function jo(r){return r instanceof HTMLInputElement?!1:r instanceof HTMLButtonElement?r.type!=="submit"&&r.type!=="reset":!_r(r)}function Nn(r,e){return r instanceof HTMLInputElement?!Wo(r,e):jo(r)}const su=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Wo(r,e){return r.type==="checkbox"||r.type==="radio"?e===" ":su.has(r.type)}const uu=a.forwardRef(({children:r,...e},t)=>{let n=a.useRef(!1),o=a.useContext(ut);t=ne(t||(o==null?void 0:o.ref));let i=I(o||{},{...e,ref:t,register(){n.current=!0,o&&o.register()}});return jr(o,t),a.useEffect(()=>{n.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),n.current=!0)},[]),a.createElement(ut.Provider,{value:i},r)});function cu({children:r}){let e=a.useMemo(()=>({register:()=>{}}),[]);return a.createElement(ut.Provider,{value:e},r)}class du{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function _o(r){let e=a.useRef({isFocused:!1,observer:null});z(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let t=Z(n=>{r==null||r(n)});return a.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n.target,i=l=>{e.current.isFocused=!1,o.disabled&&t(new du("blur",l)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){var l;(l=e.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}function Uo(r){let{isDisabled:e,onFocus:t,onBlur:n,onFocusChange:o}=r;const i=a.useCallback(u=>{if(u.target===u.currentTarget)return n&&n(u),o&&o(!1),!0},[n,o]),l=_o(i),s=a.useCallback(u=>{const c=j(u.target);u.target===u.currentTarget&&c.activeElement===u.target&&(t&&t(u),o&&o(!0),l(u))},[o,t,l]);return{focusProps:{onFocus:!e&&(t||o||n)?s:void 0,onBlur:!e&&(n||o)?i:void 0}}}let Be=null,Sr=new Set,lt=new Map,Le=!1,Cr=!1;const fu={Tab:!0,Escape:!0};function jt(r,e){for(let t of Sr)t(r,e)}function pu(r){return!(r.metaKey||!Pe()&&r.altKey||r.ctrlKey||r.key==="Control"||r.key==="Shift"||r.key==="Meta")}function Mt(r){Le=!0,pu(r)&&(Be="keyboard",jt("keyboard",r))}function ie(r){Be="pointer",(r.type==="mousedown"||r.type==="pointerdown")&&(Le=!0,jt("pointer",r))}function Go(r){xr(r)&&(Le=!0,Be="virtual")}function qo(r){r.target===window||r.target===document||(!Le&&!Cr&&(Be="virtual",jt("virtual",r)),Le=!1,Cr=!1)}function Zo(){Le=!1,Cr=!0}function wr(r){if(typeof window>"u"||lt.get(le(r)))return;const e=le(r),t=j(r);let n=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Le=!0,n.apply(this,arguments)},t.addEventListener("keydown",Mt,!0),t.addEventListener("keyup",Mt,!0),t.addEventListener("click",Go,!0),e.addEventListener("focus",qo,!0),e.addEventListener("blur",Zo,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",ie,!0),t.addEventListener("pointermove",ie,!0),t.addEventListener("pointerup",ie,!0)):(t.addEventListener("mousedown",ie,!0),t.addEventListener("mousemove",ie,!0),t.addEventListener("mouseup",ie,!0)),e.addEventListener("beforeunload",()=>{Yo(r)},{once:!0}),lt.set(e,{focus:n})}const Yo=(r,e)=>{const t=le(r),n=j(r);e&&n.removeEventListener("DOMContentLoaded",e),lt.has(t)&&(t.HTMLElement.prototype.focus=lt.get(t).focus,n.removeEventListener("keydown",Mt,!0),n.removeEventListener("keyup",Mt,!0),n.removeEventListener("click",Go,!0),t.removeEventListener("focus",qo,!0),t.removeEventListener("blur",Zo,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",ie,!0),n.removeEventListener("pointermove",ie,!0),n.removeEventListener("pointerup",ie,!0)):(n.removeEventListener("mousedown",ie,!0),n.removeEventListener("mousemove",ie,!0),n.removeEventListener("mouseup",ie,!0)),lt.delete(t))};function vu(r){const e=j(r);let t;return e.readyState!=="loading"?wr(r):(t=()=>{wr(r)},e.addEventListener("DOMContentLoaded",t)),()=>Yo(r,t)}typeof document<"u"&&vu();function ct(){return Be!=="pointer"}function dt(){return Be}function Xo(r){Be=r,jt(r,null)}const bu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function hu(r,e,t){var n;const o=typeof window<"u"?le(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?le(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?le(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?le(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return r=r||(t==null?void 0:t.target)instanceof o&&!bu.has(t==null||(n=t.target)===null||n===void 0?void 0:n.type)||(t==null?void 0:t.target)instanceof i||(t==null?void 0:t.target)instanceof l&&(t==null?void 0:t.target.isContentEditable),!(r&&e==="keyboard"&&t instanceof s&&!fu[t.key])}function gu(r,e,t){wr(),a.useEffect(()=>{let n=(o,i)=>{hu(!!(t!=null&&t.isTextInput),o,i)&&r(ct())};return Sr.add(n),()=>{Sr.delete(n)}},e)}function Wt(r){let{isDisabled:e,onBlurWithin:t,onFocusWithin:n,onFocusWithinChange:o}=r,i=a.useRef({isFocusWithin:!1}),l=a.useCallback(c=>{i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,t&&t(c),o&&o(!1))},[t,o,i]),s=_o(l),u=a.useCallback(c=>{!i.current.isFocusWithin&&document.activeElement===c.target&&(n&&n(c),o&&o(!0),i.current.isFocusWithin=!0,s(c))},[n,o,s]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Lt=!1,ar=0;function Er(){Lt=!0,setTimeout(()=>{Lt=!1},50)}function On(r){r.pointerType==="touch"&&Er()}function mu(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",On):document.addEventListener("touchend",Er),ar++,()=>{ar--,!(ar>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",On):document.removeEventListener("touchend",Er))}}function Ne(r){let{onHoverStart:e,onHoverChange:t,onHoverEnd:n,isDisabled:o}=r,[i,l]=a.useState(!1),s=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(mu,[]);let{hoverProps:u,triggerHoverEnd:c}=a.useMemo(()=>{let d=(p,h)=>{if(s.pointerType=h,o||h==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let m=p.currentTarget;s.target=m,e&&e({type:"hoverstart",target:m,pointerType:h}),t&&t(!0),l(!0)},f=(p,h)=>{if(s.pointerType="",s.target=null,h==="touch"||!s.isHovered)return;s.isHovered=!1;let m=p.currentTarget;n&&n({type:"hoverend",target:m,pointerType:h}),t&&t(!1),l(!1)},b={};return typeof PointerEvent<"u"?(b.onPointerEnter=p=>{Lt&&p.pointerType==="mouse"||d(p,p.pointerType)},b.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(b.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=p=>{!s.ignoreEmulatedMouseEvents&&!Lt&&d(p,"mouse"),s.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:b,triggerHoverEnd:f}},[e,t,n,o,s]);return a.useEffect(()=>{o&&c({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,isHovered:i}}function yu(r){let{ref:e,onInteractOutside:t,isDisabled:n,onInteractOutsideStart:o}=r,i=a.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Z(u=>{t&&Et(u,e)&&(o&&o(u),i.current.isPointerDown=!0)}),s=Z(u=>{t&&t(u)});a.useEffect(()=>{let u=i.current;if(n)return;const c=e.current,d=j(c);if(typeof PointerEvent<"u"){let f=b=>{u.isPointerDown&&Et(b,e)&&s(b),u.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("pointerup",f,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("pointerup",f,!0)}}else{let f=p=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&Et(p,e)&&s(p),u.isPointerDown=!1},b=p=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&Et(p,e)&&s(p),u.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",f,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",b,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",f,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",b,!0)}}},[e,n,l,s])}function Et(r,e){if(r.button>0)return!1;if(r.target){const t=r.target.ownerDocument;if(!t||!t.documentElement.contains(r.target)||r.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(r.target)}function zn(r){if(!r)return;let e=!0;return t=>{let n={...t,preventDefault(){t.preventDefault()},isDefaultPrevented(){return t.isDefaultPrevented()},stopPropagation(){e?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};r(n),e&&t.stopPropagation()}}function $u(r){return{keyboardProps:r.isDisabled?{}:{onKeyDown:zn(r.onKeyDown),onKeyUp:zn(r.onKeyUp)}}}const xu=500;function Jo(r){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:n,onLongPress:o,threshold:i=xu,accessibilityDescription:l}=r;const s=a.useRef(void 0);let{addGlobalListener:u,removeGlobalListener:c}=Lo(),{pressProps:d}=Me({isDisabled:e,onPressStart(b){if(b.continuePropagation(),(b.pointerType==="mouse"||b.pointerType==="touch")&&(t&&t({...b,type:"longpressstart"}),s.current=setTimeout(()=>{b.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o&&o({...b,type:"longpress"}),s.current=void 0},i),b.pointerType==="touch")){let p=h=>{h.preventDefault()};u(b.target,"contextmenu",p,{once:!0}),u(window,"pointerup",()=>{setTimeout(()=>{c(b.target,"contextmenu",p)},30)},{once:!0})}},onPressEnd(b){s.current&&clearTimeout(s.current),n&&(b.pointerType==="mouse"||b.pointerType==="touch")&&n({...b,type:"longpressend"})}}),f=Zs(o&&!e?l:void 0);return{longPressProps:I(d,f)}}function Ae(r){const e=j(r);if(dt()==="virtual"){let t=e.activeElement;Mo(()=>{e.activeElement===t&&r.isConnected&&be(r)})}else be(r)}function Pu(r){const e=le(r);if(!(r instanceof e.HTMLElement)&&!(r instanceof e.SVGElement))return!1;let{display:t,visibility:n}=r.style,o=t!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=r.ownerDocument.defaultView;let{display:l,visibility:s}=i(r);o=l!=="none"&&s!=="hidden"&&s!=="collapse"}return o}function Su(r,e){return!r.hasAttribute("hidden")&&!r.hasAttribute("data-react-aria-prevent-focus")&&(r.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?r.hasAttribute("open"):!0)}function Qo(r,e){return r.nodeName!=="#comment"&&Pu(r)&&Su(r,e)&&(!r.parentElement||Qo(r.parentElement,r))}const Hn=a.createContext(null),Tr="react-aria-focus-scope-restore";let V=null;function ei(r){let{children:e,contain:t,restoreFocus:n,autoFocus:o}=r,i=a.useRef(null),l=a.useRef(null),s=a.useRef([]),{parentNode:u}=a.useContext(Hn)||{},c=a.useMemo(()=>new kr({scopeRef:s}),[s]);z(()=>{let b=u||U.root;if(U.getTreeNode(b.scopeRef)&&V&&!At(V,b.scopeRef)){let p=U.getTreeNode(V);p&&(b=p)}b.addChild(c),U.addNode(c)},[c,u]),z(()=>{let b=U.getTreeNode(s);b&&(b.contain=!!t)},[t]),z(()=>{var b;let p=(b=i.current)===null||b===void 0?void 0:b.nextSibling,h=[],m=y=>y.stopPropagation();for(;p&&p!==l.current;)h.push(p),p.addEventListener(Tr,m),p=p.nextSibling;return s.current=h,()=>{for(let y of h)y.removeEventListener(Tr,m)}},[e]),Ru(s,n,t),Tu(s,t),Ku(s,n,t),ku(s,o),a.useEffect(()=>{const b=j(s.current?s.current[0]:void 0).activeElement;let p=null;if(ae(b,s.current)){for(let h of U.traverse())h.scopeRef&&ae(b,h.scopeRef.current)&&(p=h);p===U.getTreeNode(s)&&(V=p.scopeRef)}},[s]),z(()=>()=>{var b,p,h;let m=(h=(p=U.getTreeNode(s))===null||p===void 0||(b=p.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&h!==void 0?h:null;(s===V||At(s,V))&&(!m||U.getTreeNode(m))&&(V=m),U.removeTreeNode(s)},[s]);let d=a.useMemo(()=>Cu(s),[]),f=a.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return a.createElement(Hn.Provider,{value:f},a.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,a.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Cu(r){return{focusNext(e={}){let t=r.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||j(t[0]).activeElement,u=t[0].previousElementSibling,c=Ke(t),d=te(c,{tabbable:o,accept:l},t);d.currentNode=ae(s,t)?s:u;let f=d.nextNode();return!f&&i&&(d.currentNode=u,f=d.nextNode()),f&&X(f,!0),f},focusPrevious(e={}){let t=r.current,{from:n,tabbable:o,wrap:i,accept:l}=e,s=n||j(t[0]).activeElement,u=t[t.length-1].nextElementSibling,c=Ke(t),d=te(c,{tabbable:o,accept:l},t);d.currentNode=ae(s,t)?s:u;let f=d.previousNode();return!f&&i&&(d.currentNode=u,f=d.previousNode()),f&&X(f,!0),f},focusFirst(e={}){let t=r.current,{tabbable:n,accept:o}=e,i=Ke(t),l=te(i,{tabbable:n,accept:o},t);l.currentNode=t[0].previousElementSibling;let s=l.nextNode();return s&&X(s,!0),s},focusLast(e={}){let t=r.current,{tabbable:n,accept:o}=e,i=Ke(t),l=te(i,{tabbable:n,accept:o},t);l.currentNode=t[t.length-1].nextElementSibling;let s=l.previousNode();return s&&X(s,!0),s}}}const Ur=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],wu=Ur.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Ur.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Eu=Ur.join(':not([hidden]):not([tabindex="-1"]),');function Ke(r){return r[0].parentElement}function ot(r){let e=U.getTreeNode(V);for(;e&&e.scopeRef!==r;){if(e.contain)return!1;e=e.parent}return!0}function Tu(r,e){let t=a.useRef(void 0),n=a.useRef(void 0);z(()=>{let o=r.current;if(!e){n.current&&(cancelAnimationFrame(n.current),n.current=void 0);return}const i=j(o?o[0]:void 0);let l=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!ot(r)||c.isComposing)return;let d=i.activeElement,f=r.current;if(!f||!ae(d,f))return;let b=Ke(f),p=te(b,{tabbable:!0},f);if(!d)return;p.currentNode=d;let h=c.shiftKey?p.previousNode():p.nextNode();h||(p.currentNode=c.shiftKey?f[f.length-1].nextElementSibling:f[0].previousElementSibling,h=c.shiftKey?p.previousNode():p.nextNode()),c.preventDefault(),h&&X(h,!0)},s=c=>{(!V||At(V,r))&&ae(c.target,r.current)?(V=r,t.current=c.target):ot(r)&&!$e(c.target,r)?t.current?t.current.focus():V&&V.current&&Dr(V.current):ot(r)&&(t.current=c.target)},u=c=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let d=dt();if(!((d==="virtual"||d===null)&&Vr()&&Ko())&&i.activeElement&&ot(r)&&!$e(i.activeElement,r))if(V=r,i.body.contains(c.target)){var b;t.current=c.target,(b=t.current)===null||b===void 0||b.focus()}else V.current&&Dr(V.current)})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",s,!1),o==null||o.forEach(c=>c.addEventListener("focusin",s,!1)),o==null||o.forEach(c=>c.addEventListener("focusout",u,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",s,!1),o==null||o.forEach(c=>c.removeEventListener("focusin",s,!1)),o==null||o.forEach(c=>c.removeEventListener("focusout",u,!1))}},[r,e]),z(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function ti(r){return $e(r)}function ae(r,e){return!r||!e?!1:e.some(t=>t.contains(r))}function $e(r,e=null){if(r instanceof Element&&r.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:t}of U.traverse(U.getTreeNode(e)))if(t&&ae(r,t.current))return!0;return!1}function Du(r){return $e(r,V)}function At(r,e){var t;let n=(t=U.getTreeNode(e))===null||t===void 0?void 0:t.parent;for(;n;){if(n.scopeRef===r)return!0;n=n.parent}return!1}function X(r,e=!1){if(r!=null&&!e)try{Ae(r)}catch{}else if(r!=null)try{r.focus()}catch{}}function ri(r,e=!0){let t=r[0].previousElementSibling,n=Ke(r),o=te(n,{tabbable:e},r);o.currentNode=t;let i=o.nextNode();return e&&!i&&(n=Ke(r),o=te(n,{tabbable:!1},r),o.currentNode=t,i=o.nextNode()),i}function Dr(r,e=!0){X(ri(r,e))}function ku(r,e){const t=a.useRef(e);a.useEffect(()=>{if(t.current){V=r;const n=j(r.current?r.current[0]:void 0);!ae(n.activeElement,V.current)&&r.current&&Dr(r.current)}t.current=!1},[r])}function Ru(r,e,t){z(()=>{if(e||t)return;let n=r.current;const o=j(n?n[0]:void 0);let i=l=>{let s=l.target;ae(s,r.current)?V=r:ti(s)||(V=null)};return o.addEventListener("focusin",i,!1),n==null||n.forEach(l=>l.addEventListener("focusin",i,!1)),()=>{o.removeEventListener("focusin",i,!1),n==null||n.forEach(l=>l.removeEventListener("focusin",i,!1))}},[r,e,t])}function Vn(r){let e=U.getTreeNode(V);for(;e&&e.scopeRef!==r;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===r}function Ku(r,e,t){const n=a.useRef(typeof document<"u"?j(r.current?r.current[0]:void 0).activeElement:null);z(()=>{let o=r.current;const i=j(o?o[0]:void 0);if(!e||t)return;let l=()=>{(!V||At(V,r))&&ae(i.activeElement,r.current)&&(V=r)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(s=>s.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(s=>s.removeEventListener("focusin",l,!1))}},[r,t]),z(()=>{const o=j(r.current?r.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!ot(r)||l.isComposing)return;let s=o.activeElement;if(!$e(s,r)||!Vn(r))return;let u=U.getTreeNode(r);if(!u)return;let c=u.nodeToRestore,d=te(o.body,{tabbable:!0});d.currentNode=s;let f=l.shiftKey?d.previousNode():d.nextNode();if((!c||!o.body.contains(c)||c===o.body)&&(c=void 0,u.nodeToRestore=void 0),(!f||!$e(f,r))&&c){d.currentNode=c;do f=l.shiftKey?d.previousNode():d.nextNode();while($e(f,r));l.preventDefault(),l.stopPropagation(),f?X(f,!0):ti(c)?X(c,!0):s.blur()}};return t||o.addEventListener("keydown",i,!0),()=>{t||o.removeEventListener("keydown",i,!0)}},[r,e,t]),z(()=>{const o=j(r.current?r.current[0]:void 0);if(!e)return;let i=U.getTreeNode(r);if(i){var l;return i.nodeToRestore=(l=n.current)!==null&&l!==void 0?l:void 0,()=>{let s=U.getTreeNode(r);if(!s)return;let u=s.nodeToRestore;if(e&&u&&(o.activeElement&&$e(o.activeElement,r)||o.activeElement===o.body&&Vn(r))){let c=U.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=c.getTreeNode(r);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){jn(d.nodeToRestore);return}d=d.parent}for(d=c.getTreeNode(r);d;){if(d.scopeRef&&d.scopeRef.current&&U.getTreeNode(d.scopeRef)){let f=ri(d.scopeRef.current,!0);jn(f);return}d=d.parent}}})}}}},[r,e])}function jn(r){r.dispatchEvent(new CustomEvent(Tr,{bubbles:!0,cancelable:!0}))&&X(r)}function te(r,e,t){let n=e!=null&&e.tabbable?Eu:wu,o=j(r).createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var l;return!(e==null||(l=e.from)===null||l===void 0)&&l.contains(i)?NodeFilter.FILTER_REJECT:i.matches(n)&&Qo(i)&&(!t||ae(i,t))&&(!(e!=null&&e.accept)||e.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(o.currentNode=e.from),o}function Fu(r,e={}){return{focusNext(t={}){let n=r.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:s=e.accept}=t,u=o||j(n).activeElement,c=te(n,{tabbable:i,accept:s});n.contains(u)&&(c.currentNode=u);let d=c.nextNode();return!d&&l&&(c.currentNode=n,d=c.nextNode()),d&&X(d,!0),d},focusPrevious(t=e){let n=r.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:s=e.accept}=t,u=o||j(n).activeElement,c=te(n,{tabbable:i,accept:s});if(n.contains(u))c.currentNode=u;else{let f=sr(c);return f&&X(f,!0),f??null}let d=c.previousNode();if(!d&&l){c.currentNode=n;let f=sr(c);if(!f)return null;d=f}return d&&X(d,!0),d??null},focusFirst(t=e){let n=r.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=t,s=te(n,{tabbable:o,accept:i}).nextNode();return s&&X(s,!0),s},focusLast(t=e){let n=r.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=t,l=te(n,{tabbable:o,accept:i}),s=sr(l);return s&&X(s,!0),s??null}}}function sr(r){let e,t;do t=r.lastChild(),t&&(e=t);while(t);return e}class Gr{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let o=this.fastMap.get(t??null);if(!o)return;let i=new kr({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let i of this.traverse())i!==t&&t.nodeToRestore&&i.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&ae(i.nodeToRestore,t.scopeRef.current)&&(i.nodeToRestore=t.nodeToRestore);let o=t.children;n&&(n.removeChild(t),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){var e;let t=new Gr;var n;for(let o of this.traverse())t.addTreeNode(o.scopeRef,(n=(e=o.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,o.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new kr({scopeRef:null}),this.fastMap.set(null,this.root)}}class kr{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}let U=new Gr;function we(r={}){let{autoFocus:e=!1,isTextInput:t,within:n}=r,o=a.useRef({isFocused:!1,isFocusVisible:e||ct()}),[i,l]=a.useState(!1),[s,u]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=a.useCallback(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=a.useCallback(p=>{o.current.isFocused=p,l(p),c()},[c]);gu(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:t});let{focusProps:f}=Uo({isDisabled:n,onFocusChange:d}),{focusWithinProps:b}=Wt({isDisabled:!n,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:s,focusProps:n?b:f}}let ni=a.createContext(null);function Mu(r){let e=a.useContext(ni)||{};jr(e,r);let{ref:t,...n}=e;return n}const Lu=a.forwardRef(function(e,t){let{children:n,...o}=e,i=ne(t),l={...o,ref:i};return a.createElement(ni.Provider,{value:l},n)});function qe(r,e){let{focusProps:t}=Uo(r),{keyboardProps:n}=$u(r),o=I(t,n),i=Mu(e),l=r.isDisabled?{}:i,s=a.useRef(r.autoFocus);return a.useEffect(()=>{s.current&&e.current&&Ae(e.current),s.current=!1},[e]),{focusableProps:I({...o,tabIndex:r.excludeFromTabOrder&&!r.isDisabled?-1:void 0},l)}}function Au(r,e){let{elementType:t="a",onPress:n,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:s,...u}=r,c={};t!=="a"&&(c={role:"link",tabIndex:s?void 0:0});let{focusableProps:d}=qe(r,e),{pressProps:f,isPressed:b}=Me({onPress:n,onPressStart:o,onPressEnd:i,isDisabled:s,ref:e}),p=G(u,{labelable:!0}),h=I(d,f),m=Vt(),y=Fo(r);return{isPressed:b,linkProps:I(p,y,{...h,...c,"aria-disabled":s||void 0,"aria-current":r["aria-current"],onClick:$=>{var C;(C=f.onClick)===null||C===void 0||C.call(f,$),l&&(l($),console.warn("onClick is deprecated, please use onPress")),!m.isNative&&$.currentTarget instanceof HTMLAnchorElement&&$.currentTarget.href&&!$.isDefaultPrevented()&&js($.currentTarget,$)&&r.href&&($.preventDefault(),m.open($.currentTarget,$,r.href,r.routerOptions))}})}}const Iu=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Bu=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Nu(r){if(Intl.Locale){let t=new Intl.Locale(r).maximize(),n=typeof t.getTextInfo=="function"?t.getTextInfo():t.textInfo;if(n)return n.direction==="rtl";if(t.script)return Iu.has(t.script)}let e=r.split("-")[0];return Bu.has(e)}const Ou=Symbol.for("react-aria.i18n.locale");function oi(){let r=typeof window<"u"&&window[Ou]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([r])}catch{r="en-US"}return{locale:r,direction:Nu(r)?"rtl":"ltr"}}let Rr=oi(),it=new Set;function Wn(){Rr=oi();for(let r of it)r(Rr)}function zu(){let r=Se(),[e,t]=a.useState(Rr);return a.useEffect(()=>(it.size===0&&window.addEventListener("languagechange",Wn),it.add(t),()=>{it.delete(t),it.size===0&&window.removeEventListener("languagechange",Wn)}),[]),r?{locale:"en-US",direction:"ltr"}:e}const Hu=a.createContext(null);function Oe(){let r=zu();return a.useContext(Hu)||r}const Vu=Symbol.for("react-aria.i18n.locale"),ju=Symbol.for("react-aria.i18n.strings");let Ve;class _t{getStringForLocale(e,t){let o=this.getStringsForLocale(t)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${t} locale`);return o}getStringsForLocale(e){let t=this.strings[e];return t||(t=Wu(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let t=window[Vu];if(Ve===void 0){let o=window[ju];if(!o)return null;Ve={};for(let i in o)Ve[i]=new _t({[t]:o[i]},t)}let n=Ve==null?void 0:Ve[e];if(!n)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=t}}function Wu(r,e,t="en-US"){if(e[r])return e[r];let n=_u(r);if(e[n])return e[n];for(let o in e)if(o.startsWith(n+"-"))return e[o];return e[t]}function _u(r){return Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]}const _n=new Map,Un=new Map;class Uu{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n=="function"?n(t,this):n}plural(e,t,n="cardinal"){let o=t["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+n,l=_n.get(i);l||(l=new Intl.PluralRules(this.locale,{type:n}),_n.set(i,l));let s=l.select(e);return o=t[s]||t.other,typeof o=="function"?o():o}number(e){let t=Un.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Un.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n=="function"?n():n}constructor(e,t){this.locale=e,this.strings=t}}const Gn=new WeakMap;function Gu(r){let e=Gn.get(r);return e||(e=new _t(r),Gn.set(r,e)),e}function qu(r,e){return e&&_t.getGlobalDictionaryForPackage(e)||Gu(r)}function qr(r,e){let{locale:t}=Oe(),n=qu(r,e);return a.useMemo(()=>new Uu(t,n),[t,n])}let ur=new Map,Kr=!1;try{Kr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let It=!1;try{It=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const ii={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Zu{format(e){let t="";if(!Kr&&this.options.signDisplay!=null?t=Xu(this.numberFormatter,this.options.signDisplay,e):t=this.numberFormatter.format(e),this.options.style==="unit"&&!It){var n;let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return t;let s=(n=ii[o])===null||n===void 0?void 0:n[i];t+=s[l]||s.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,t);if(t<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(t);return[...n.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Kr&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!It&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Yu(e,t),this.options=t}}function Yu(r,e={}){let{numberingSystem:t}=e;if(t&&r.includes("-nu-")&&(r.includes("-u-")||(r+="-u-"),r+=`-nu-${t}`),e.style==="unit"&&!It){var n;let{unit:l,unitDisplay:s="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=ii[l])===null||n===void 0)&&n[s]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${s}`);e={...e,style:"decimal"}}let o=r+(e?Object.entries(e).sort((l,s)=>l[0]<s[0]?-1:1).join():"");if(ur.has(o))return ur.get(o);let i=new Intl.NumberFormat(r,e);return ur.set(o,i),i}function Xu(r,e,t){if(e==="auto")return r.format(t);if(e==="never")return r.format(Math.abs(t));{let n=!1;if(e==="always"?n=t>0||Object.is(t,0):e==="exceptZero"&&(Object.is(t,-0)||Object.is(t,0)?t=Math.abs(t):n=t>0),n){let o=r.format(-t),i=r.format(t),l=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...l].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(l,"+").replace("!!!",i)}else return r.format(t)}}function Ju(r={}){let{locale:e}=Oe();return a.useMemo(()=>new Zu(e,r),[e,r])}let cr=new Map;function Zr(r){let{locale:e}=Oe(),t=e+(r?Object.entries(r).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(cr.has(t))return cr.get(t);let n=new Intl.Collator(e,r);return cr.set(t,n),n}function Ut(r,e){let{elementType:t="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:s,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:f,href:b,target:p,rel:h,type:m="button"}=r,y;t==="button"?y={type:m,disabled:n}:y={role:"button",tabIndex:n?void 0:0,href:t==="a"&&!n?b:void 0,target:t==="a"?p:void 0,type:t==="input"?m:void 0,disabled:t==="input"?n:void 0,"aria-disabled":!n||t==="input"?void 0:n,rel:t==="a"?h:void 0};let{pressProps:$,isPressed:C}=Me({onPressStart:i,onPressEnd:l,onPressChange:u,onPress:o,onPressUp:s,isDisabled:n,preventFocusOnPress:c,ref:e}),{focusableProps:w}=qe(r,e);d&&(w.tabIndex=n?-1:w.tabIndex);let F=I(w,$,G(r,{labelable:!0}));return{isPressed:C,buttonProps:I(y,F,{"aria-haspopup":r["aria-haspopup"],"aria-expanded":r["aria-expanded"],"aria-controls":r["aria-controls"],"aria-pressed":r["aria-pressed"],onClick:k=>{f&&(f(k),console.warn("onClick is deprecated, please use onPress"))}})}}function li(r,e,t){const{isSelected:n}=e,{isPressed:o,buttonProps:i}=Ut({...r,onPress:xe(e.toggle,r.onPress)},t);return{isPressed:o,isSelected:n,isDisabled:r.isDisabled||!1,buttonProps:I(i,{"aria-pressed":n})}}function Qu(r,e){const{"aria-label":t,"aria-labelledby":n,orientation:o="horizontal"}=r;let[i,l]=a.useState(!1);z(()=>{var h;l(!!(e.current&&(!((h=e.current.parentElement)===null||h===void 0)&&h.closest('[role="toolbar"]'))))});const{direction:s}=Oe(),u=s==="rtl"&&o==="horizontal";let c=Fu(e);const d=h=>{if(h.currentTarget.contains(h.target)){if(o==="horizontal"&&h.key==="ArrowRight"||o==="vertical"&&h.key==="ArrowDown")u?c.focusPrevious():c.focusNext();else if(o==="horizontal"&&h.key==="ArrowLeft"||o==="vertical"&&h.key==="ArrowUp")u?c.focusNext():c.focusPrevious();else if(h.key==="Tab"){h.stopPropagation(),f.current=document.activeElement,h.shiftKey?c.focusFirst():c.focusLast();return}else return;h.stopPropagation(),h.preventDefault()}},f=a.useRef(null),b=h=>{!h.currentTarget.contains(h.relatedTarget)&&!f.current&&(f.current=h.target)},p=h=>{var m;if(f.current&&!h.currentTarget.contains(h.relatedTarget)&&(!((m=e.current)===null||m===void 0)&&m.contains(h.target))){var y;(y=f.current)===null||y===void 0||y.focus(),f.current=null}};return{toolbarProps:{...G(r,{labelable:!0}),role:i?"group":"toolbar","aria-orientation":o,"aria-label":t,"aria-labelledby":t==null?n:void 0,onKeyDownCapture:i?void 0:d,onFocusCapture:i?void 0:p,onBlurCapture:i?void 0:b}}}function ec(r,e,t){let{isDisabled:n}=r,{toolbarProps:o}=Qu(r,t);return{groupProps:{...o,role:e.selectionMode==="single"?"radiogroup":o.role,"aria-disabled":n}}}function tc(r,e,t){let n={isSelected:e.selectedKeys.has(r.id),setSelected(u){e.setSelected(r.id,u)},toggle(){e.toggleKey(r.id)}},{isPressed:o,isSelected:i,isDisabled:l,buttonProps:s}=li({...r,id:void 0,isDisabled:r.isDisabled||e.isDisabled},n,t);return e.selectionMode==="single"&&(s.role="radio",s["aria-checked"]=n.isSelected,delete s["aria-pressed"]),{isPressed:o,isSelected:i,isDisabled:l,buttonProps:s}}const ai=7e3;let ue=null;function qn(r,e="assertive",t=ai){ue?ue.announce(r,e,t):(ue=new rc,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ue.announce(r,e,t):setTimeout(()=>{ue!=null&&ue.isAttached()&&(ue==null||ue.announce(r,e,t))},100))}class rc{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=ai){var o,i;if(!this.node)return;let l=document.createElement("div");typeof e=="object"?(l.setAttribute("role","img"),l.setAttribute("aria-labelledby",e["aria-labelledby"])):l.textContent=e,t==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(l):(i=this.politeLog)===null||i===void 0||i.appendChild(l),e!==""&&setTimeout(()=>{l.remove()},n)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}const si={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ui={...si,customError:!0,valid:!1},Qe={isInvalid:!1,validationDetails:si,validationErrors:[]},nc=a.createContext({}),Fr="__formValidationState"+Date.now();function Yr(r){if(r[Fr]){let{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:o,commitValidation:i}=r[Fr];return{realtimeValidation:e,displayValidation:t,updateValidation:n,resetValidation:o,commitValidation:i}}return oc(r)}function oc(r){let{isInvalid:e,validationState:t,name:n,value:o,builtinValidation:i,validate:l,validationBehavior:s="aria"}=r;t&&(e||(e=t==="invalid"));let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:ui}:null,c=a.useMemo(()=>{if(!l||o==null)return null;let K=ic(l,o);return Zn(K)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=a.useContext(nc),f=a.useMemo(()=>n?Array.isArray(n)?n.flatMap(K=>Mr(d[K])):Mr(d[n]):[],[d,n]),[b,p]=a.useState(d),[h,m]=a.useState(!1);d!==b&&(p(d),m(!1));let y=a.useMemo(()=>Zn(h?[]:f),[h,f]),$=a.useRef(Qe),[C,w]=a.useState(Qe),F=a.useRef(Qe),k=()=>{if(!D)return;B(!1);let K=c||i||$.current;dr(K,F.current)||(F.current=K,w(K))},[D,B]=a.useState(!1);return a.useEffect(k),{realtimeValidation:u||y||c||i||Qe,displayValidation:s==="native"?u||y||C:u||y||c||i||C,updateValidation(K){s==="aria"&&!dr(C,K)?w(K):$.current=K},resetValidation(){let K=Qe;dr(K,F.current)||(F.current=K,w(K)),s==="native"&&B(!1),m(!0)},commitValidation(){s==="native"&&B(!0),m(!0)}}}function Mr(r){return r?Array.isArray(r)?r:[r]:[]}function ic(r,e){if(typeof r=="function"){let t=r(e);if(t&&typeof t!="boolean")return Mr(t)}return[]}function Zn(r){return r.length?{isInvalid:!0,validationErrors:r,validationDetails:ui}:null}function dr(r,e){return r===e?!0:!!r&&!!e&&r.isInvalid===e.isInvalid&&r.validationErrors.length===e.validationErrors.length&&r.validationErrors.every((t,n)=>t===e.validationErrors[n])&&Object.entries(r.validationDetails).every(([t,n])=>e.validationDetails[t]===n)}function Xr(r,e,t){let{validationBehavior:n,focus:o}=r;z(()=>{if(n==="native"&&(t!=null&&t.current)&&!t.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t.current.setCustomValidity(u),t.current.hasAttribute("title")||(t.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(ac(t.current))}});let i=Z(()=>{e.resetValidation()}),l=Z(u=>{var c;e.displayValidation.isInvalid||e.commitValidation();let d=t==null||(c=t.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&t&&d&&sc(d)===t.current){var f;o?o():(f=t.current)===null||f===void 0||f.focus(),Xo("keyboard")}u.preventDefault()}),s=Z(()=>{e.commitValidation()});a.useEffect(()=>{let u=t==null?void 0:t.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",l),u.addEventListener("change",s),c==null||c.addEventListener("reset",i),()=>{u.removeEventListener("invalid",l),u.removeEventListener("change",s),c==null||c.removeEventListener("reset",i)}},[t,l,s,i,n])}function lc(r){let e=r.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function ac(r){return{isInvalid:!r.validity.valid,validationDetails:lc(r),validationErrors:r.validationMessage?[r.validationMessage]:[]}}function sc(r){for(let e=0;e<r.elements.length;e++){let t=r.elements[e];if(!t.validity.valid)return t}return null}function uc(r,e,t){let{isDisabled:n=!1,isReadOnly:o=!1,value:i,name:l,children:s,"aria-label":u,"aria-labelledby":c,validationState:d="valid",isInvalid:f}=r,b=D=>{D.stopPropagation(),e.setSelected(D.target.checked)},p=s!=null,h=u!=null||c!=null;!p&&!h&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:y}=Me({isDisabled:n}),{pressProps:$,isPressed:C}=Me({isDisabled:n||o,onPress(){e.toggle()}}),{focusableProps:w}=qe(r,t),F=I(m,w),k=G(r,{labelable:!0});return Wr(t,e.isSelected,e.setSelected),{labelProps:I($,{onClick:D=>D.preventDefault()}),inputProps:I(k,{"aria-invalid":f||d==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":o||void 0,onChange:b,disabled:n,...i==null?{}:{value:i},name:l,type:"checkbox",...F}),isSelected:e.isSelected,isPressed:y||C,isDisabled:n,isReadOnly:o,isInvalid:f||d==="invalid"}}function cc(r,e,t){let n=Yr({...r,value:e.isSelected}),{isInvalid:o,validationErrors:i,validationDetails:l}=n.displayValidation,{labelProps:s,inputProps:u,isSelected:c,isPressed:d,isDisabled:f,isReadOnly:b}=uc({...r,isInvalid:o},e,t);Xr(r,n,t);let{isIndeterminate:p,isRequired:h,validationBehavior:m="aria"}=r;a.useEffect(()=>{t.current&&(t.current.indeterminate=!!p)});let{pressProps:y}=Me({isDisabled:f||b,onPress(){let{[Fr]:$}=r,{commitValidation:C}=$||n;C()}});return{labelProps:I(s,y),inputProps:{...u,checked:c,"aria-required":h&&m==="aria"||void 0,required:h&&m==="native"},isSelected:c,isPressed:d,isDisabled:f,isReadOnly:b,isInvalid:o,validationErrors:i,validationDetails:l}}function Jr(r){let{id:e,label:t,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=r;e=Y(e);let l=Y(),s={};t?(n=n?`${l} ${n}`:l,s={id:l,htmlFor:i==="label"?e:void 0}):!n&&!o&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=Ao({id:e,"aria-label":o,"aria-labelledby":n});return{labelProps:s,fieldProps:u}}function Qr(r){let{description:e,errorMessage:t,isInvalid:n,validationState:o}=r,{labelProps:i,fieldProps:l}=Jr(r),s=at([!!e,!!t,n,o]),u=at([!!e,!!t,n,o]);return l=I(l,{"aria-describedby":[s,u,r["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:l,descriptionProps:{id:s},errorMessageProps:{id:u}}}function ci(r={}){let{isReadOnly:e}=r,[t,n]=Ce(r.isSelected,r.defaultSelected||!1,r.onChange);function o(l){e||n(l)}function i(){e||n(!t)}return{isSelected:t,setSelected:o,toggle:i}}function dc(r){let{selectionMode:e="single",disallowEmptySelection:t,isDisabled:n=!1}=r,[o,i]=Ce(a.useMemo(()=>r.selectedKeys?new Set(r.selectedKeys):void 0,[r.selectedKeys]),a.useMemo(()=>r.defaultSelectedKeys?new Set(r.defaultSelectedKeys):new Set,[r.defaultSelectedKeys]),r.onSelectionChange);return{selectionMode:e,isDisabled:n,selectedKeys:o,setSelectedKeys:i,toggleKey(l){let s;e==="multiple"?(s=new Set(o),s.has(l)&&(!t||s.size>1)?s.delete(l):s.add(l)):s=new Set(o.has(l)&&!t?[]:[l]),i(s)},setSelected(l,s){s!==o.has(l)&&this.toggleKey(l)}}}const Yn={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function di(r={}){let{style:e,isFocusable:t}=r,[n,o]=a.useState(!1),{focusWithinProps:i}=Wt({isDisabled:!t,onFocusWithinChange:s=>o(s)}),l=a.useMemo(()=>n?e:e?{...Yn,...e}:Yn,[n]);return{visuallyHiddenProps:{...i,style:l}}}function fi(r){let{children:e,elementType:t="div",isFocusable:n,style:o,...i}=r,{visuallyHiddenProps:l}=di(r);return a.createElement(t,I(i,l),e)}function fc(r,e){let{inputElementType:t="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:l="text",validationBehavior:s="aria"}=r,[u,c]=Ce(r.value,r.defaultValue||"",r.onChange),{focusableProps:d}=qe(r,e),f=Yr({...r,value:u}),{isInvalid:b,validationErrors:p,validationDetails:h}=f.displayValidation,{labelProps:m,fieldProps:y,descriptionProps:$,errorMessageProps:C}=Qr({...r,isInvalid:b,errorMessage:r.errorMessage||p}),w=G(r,{labelable:!0});const F={type:l,pattern:r.pattern};return Wr(e,u,c),Xr(r,f,e),a.useEffect(()=>{if(e.current instanceof le(e.current).HTMLTextAreaElement){let k=e.current;Object.defineProperty(k,"defaultValue",{get:()=>k.value,set:()=>{},configurable:!0})}},[e]),{labelProps:m,inputProps:I(w,t==="input"?F:void 0,{disabled:n,readOnly:i,required:o&&s==="native","aria-required":o&&s==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":r["aria-errormessage"],"aria-activedescendant":r["aria-activedescendant"],"aria-autocomplete":r["aria-autocomplete"],"aria-haspopup":r["aria-haspopup"],"aria-controls":r["aria-controls"],value:u,onChange:k=>c(k.target.value),autoComplete:r.autoComplete,autoCapitalize:r.autoCapitalize,maxLength:r.maxLength,minLength:r.minLength,name:r.name,placeholder:r.placeholder,inputMode:r.inputMode,autoCorrect:r.autoCorrect,spellCheck:r.spellCheck,onCopy:r.onCopy,onCut:r.onCut,onPaste:r.onPaste,onCompositionEnd:r.onCompositionEnd,onCompositionStart:r.onCompositionStart,onCompositionUpdate:r.onCompositionUpdate,onSelect:r.onSelect,onBeforeInput:r.onBeforeInput,onInput:r.onInput,...d,...y}),descriptionProps:$,errorMessageProps:C,isInvalid:b,validationErrors:p,validationDetails:h}}const ce={top:"top",bottom:"top",left:"left",right:"left"},Bt={top:"bottom",bottom:"top",left:"right",right:"left"},pc={top:"left",left:"top"},Lr={top:"height",left:"width"},pi={width:"totalWidth",height:"totalHeight"},Tt={};let q=typeof document<"u"?window.visualViewport:null;function Xn(r){let e=0,t=0,n=0,o=0,i=0,l=0,s={};var u;let c=((u=q==null?void 0:q.scale)!==null&&u!==void 0?u:1)>1;if(r.tagName==="BODY"){let h=document.documentElement;n=h.clientWidth,o=h.clientHeight;var d;e=(d=q==null?void 0:q.width)!==null&&d!==void 0?d:n;var f;t=(f=q==null?void 0:q.height)!==null&&f!==void 0?f:o,s.top=h.scrollTop||r.scrollTop,s.left=h.scrollLeft||r.scrollLeft,q&&(i=q.offsetTop,l=q.offsetLeft)}else({width:e,height:t,top:i,left:l}=Ge(r)),s.top=r.scrollTop,s.left=r.scrollLeft,n=e,o=t;if(Hr()&&(r.tagName==="BODY"||r.tagName==="HTML")&&c){s.top=0,s.left=0;var b;i=(b=q==null?void 0:q.pageTop)!==null&&b!==void 0?b:0;var p;l=(p=q==null?void 0:q.pageLeft)!==null&&p!==void 0?p:0}return{width:e,height:t,totalWidth:n,totalHeight:o,scroll:s,top:i,left:l}}function vc(r){return{top:r.scrollTop,left:r.scrollLeft,width:r.scrollWidth,height:r.scrollHeight}}function Jn(r,e,t,n,o,i,l){var s;let u=(s=o.scroll[r])!==null&&s!==void 0?s:0,c=n[Lr[r]],d=n.scroll[ce[r]]+i,f=c+n.scroll[ce[r]]-i,b=e-u+l[r]-n[ce[r]],p=e-u+t+l[r]-n[ce[r]];return b<d?d-b:p>f?Math.max(f-p,d-b):0}function bc(r){let e=window.getComputedStyle(r);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function Qn(r){if(Tt[r])return Tt[r];let[e,t]=r.split(" "),n=ce[e]||"right",o=pc[n];ce[t]||(t="center");let i=Lr[n],l=Lr[o];return Tt[r]={placement:e,crossPlacement:t,axis:n,crossAxis:o,size:i,crossSize:l},Tt[r]}function fr(r,e,t,n,o,i,l,s,u,c){let{placement:d,crossPlacement:f,axis:b,crossAxis:p,size:h,crossSize:m}=n,y={};var $;y[p]=($=r[p])!==null&&$!==void 0?$:0;var C,w,F,k;f==="center"?y[p]+=(((C=r[m])!==null&&C!==void 0?C:0)-((w=t[m])!==null&&w!==void 0?w:0))/2:f!==p&&(y[p]+=((F=r[m])!==null&&F!==void 0?F:0)-((k=t[m])!==null&&k!==void 0?k:0)),y[p]+=i;const D=r[p]-t[m]+u+c,B=r[p]+r[m]-u-c;if(y[p]=Ft(y[p],D,B),d===b){const v=s?l[h]:e[pi[h]];y[Bt[b]]=Math.floor(v-r[b]+o)}else y[b]=Math.floor(r[b]+r[h]+o);return y}function hc(r,e,t,n,o,i,l,s){const u=n?t.height:e[pi.height];var c;let d=r.top!=null?t.top+r.top:t.top+(u-((c=r.bottom)!==null&&c!==void 0?c:0)-l);var f,b,p,h,m,y;let $=s!=="top"?Math.max(0,e.height+e.top+((f=e.scroll.top)!==null&&f!==void 0?f:0)-d-(((b=o.top)!==null&&b!==void 0?b:0)+((p=o.bottom)!==null&&p!==void 0?p:0)+i)):Math.max(0,d+l-(e.top+((h=e.scroll.top)!==null&&h!==void 0?h:0))-(((m=o.top)!==null&&m!==void 0?m:0)+((y=o.bottom)!==null&&y!==void 0?y:0)+i));return Math.min(e.height-i*2,$)}function eo(r,e,t,n,o,i){let{placement:l,axis:s,size:u}=i;var c,d;if(l===s)return Math.max(0,t[s]-r[s]-((c=r.scroll[s])!==null&&c!==void 0?c:0)+e[s]-((d=n[s])!==null&&d!==void 0?d:0)-n[Bt[s]]-o);var f;return Math.max(0,r[u]+r[s]+r.scroll[s]-e[s]-t[s]-t[u]-((f=n[s])!==null&&f!==void 0?f:0)-n[Bt[s]]-o)}function gc(r,e,t,n,o,i,l,s,u,c,d,f,b,p,h,m){let y=Qn(r),{size:$,crossAxis:C,crossSize:w,placement:F,crossPlacement:k}=y,D=fr(e,s,t,y,d,f,c,b,h,m),B=d,v=eo(s,c,e,o,i+d,y);if(l&&n[$]>v){let Ee=Qn(`${Bt[F]} ${k}`),Je=fr(e,s,t,Ee,d,f,c,b,h,m);eo(s,c,e,o,i+d,Ee)>v&&(y=Ee,D=Je,B=d)}let R="bottom";y.axis==="top"?y.placement==="top"?R="top":y.placement==="bottom"&&(R="bottom"):y.crossAxis==="top"&&(y.crossPlacement==="top"?R="bottom":y.crossPlacement==="bottom"&&(R="top"));let K=Jn(C,D[C],t[w],s,u,i,c);D[C]+=K;let E=hc(D,s,c,b,o,i,t.height,R);p&&p<E&&(E=p),t.height=Math.min(t.height,E),D=fr(e,s,t,y,B,f,c,b,h,m),K=Jn(C,D[C],t[w],s,u,i,c),D[C]+=K;let L={},g=e[C]+.5*e[w]-D[C]-o[ce[C]];const P=h/2+m;var M,N,O,T;const H=ce[C]==="left"?((M=o.left)!==null&&M!==void 0?M:0)+((N=o.right)!==null&&N!==void 0?N:0):((O=o.top)!==null&&O!==void 0?O:0)+((T=o.bottom)!==null&&T!==void 0?T:0),Q=t[w]-H-h/2-m,Ze=e[C]+h/2-(D[C]+o[ce[C]]),Ye=e[C]+e[w]-h/2-(D[C]+o[ce[C]]),Xe=Ft(g,Ze,Ye);return L[C]=Ft(Xe,P,Q),{position:D,maxHeight:E,arrowOffsetLeft:L.left,arrowOffsetTop:L.top,placement:y.placement}}function mc(r){let{placement:e,targetNode:t,overlayNode:n,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:s,offset:u,crossOffset:c,maxHeight:d,arrowSize:f=0,arrowBoundaryOffset:b=0}=r,p=n instanceof HTMLElement?yc(n):document.documentElement,h=p===document.documentElement;const m=window.getComputedStyle(p).position;let y=!!m&&m!=="static",$=h?Ge(t):to(t,p);if(!h){let{marginTop:L,marginLeft:g}=window.getComputedStyle(t);$.top+=parseInt(L,10)||0,$.left+=parseInt(g,10)||0}let C=Ge(n),w=bc(n);var F,k;C.width+=((F=w.left)!==null&&F!==void 0?F:0)+((k=w.right)!==null&&k!==void 0?k:0);var D,B;C.height+=((D=w.top)!==null&&D!==void 0?D:0)+((B=w.bottom)!==null&&B!==void 0?B:0);let v=vc(o),R=Xn(s),K=Xn(p),E=s.tagName==="BODY"?Ge(p):to(p,s);return p.tagName==="HTML"&&s.tagName==="BODY"&&(K.scroll.top=0,K.scroll.left=0),gc(e,$,C,v,w,i,l,R,K,E,u,c,y,d,f,b)}function Ge(r){let{top:e,left:t,width:n,height:o}=r.getBoundingClientRect(),{scrollTop:i,scrollLeft:l,clientTop:s,clientLeft:u}=document.documentElement;return{top:e+i-s,left:t+l-u,width:n,height:o}}function to(r,e){let t=window.getComputedStyle(r),n;if(t.position==="fixed"){let{top:o,left:i,width:l,height:s}=r.getBoundingClientRect();n={top:o,left:i,width:l,height:s}}else{n=Ge(r);let o=Ge(e),i=window.getComputedStyle(e);o.top+=(parseInt(i.borderTopWidth,10)||0)-e.scrollTop,o.left+=(parseInt(i.borderLeftWidth,10)||0)-e.scrollLeft,n.top-=o.top,n.left-=o.left}return n.top-=parseInt(t.marginTop,10)||0,n.left-=parseInt(t.marginLeft,10)||0,n}function yc(r){let e=r.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!ro(e)&&(e=document.documentElement),e==null)for(e=r.parentElement;e&&!ro(e);)e=e.parentElement;return e||document.documentElement}function ro(r){let e=window.getComputedStyle(r);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const vi=new WeakMap;function $c(r){let{triggerRef:e,isOpen:t,onClose:n}=r;a.useEffect(()=>{if(!t||n===null)return;let o=i=>{let l=i.target;if(!e.current||l instanceof Node&&!l.contains(e.current)||i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement)return;let s=n||vi.get(e.current);s&&s()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[t,n,e])}let _=typeof document<"u"?window.visualViewport:null;function bi(r){let{direction:e}=Oe(),{arrowSize:t=0,targetRef:n,overlayRef:o,scrollRef:i=o,placement:l="bottom",containerPadding:s=12,shouldFlip:u=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:b=!0,isOpen:p=!0,onClose:h,maxHeight:m,arrowBoundaryOffset:y=0}=r,[$,C]=a.useState(null),w=[b,l,o.current,n.current,i.current,s,u,c,d,f,p,e,m,y,t],F=a.useRef(_==null?void 0:_.scale);a.useEffect(()=>{p&&(F.current=_==null?void 0:_.scale)},[p]);let k=a.useCallback(()=>{if(b===!1||!p||!o.current||!n.current||!c||(_==null?void 0:_.scale)!==F.current)return;let K=null;if(i.current&&i.current.contains(document.activeElement)){var E;let T=(E=document.activeElement)===null||E===void 0?void 0:E.getBoundingClientRect(),H=i.current.getBoundingClientRect();var L;if(K={type:"top",offset:((L=T==null?void 0:T.top)!==null&&L!==void 0?L:0)-H.top},K.offset>H.height/2){K.type="bottom";var g;K.offset=((g=T==null?void 0:T.bottom)!==null&&g!==void 0?g:0)-H.bottom}}let P=o.current;if(!m&&o.current){var M;P.style.top="0px",P.style.bottom="";var N;P.style.maxHeight=((N=(M=window.visualViewport)===null||M===void 0?void 0:M.height)!==null&&N!==void 0?N:window.innerHeight)+"px"}let O=mc({placement:Pc(l,e),overlayNode:o.current,targetNode:n.current,scrollNode:i.current||o.current,padding:s,shouldFlip:u,boundaryElement:c,offset:d,crossOffset:f,maxHeight:m,arrowSize:t,arrowBoundaryOffset:y});if(O.position){if(P.style.top="",P.style.bottom="",P.style.left="",P.style.right="",Object.keys(O.position).forEach(T=>P.style[T]=O.position[T]+"px"),P.style.maxHeight=O.maxHeight!=null?O.maxHeight+"px":"",K&&document.activeElement&&i.current){let T=document.activeElement.getBoundingClientRect(),H=i.current.getBoundingClientRect(),Q=T[K.type]-H[K.type];i.current.scrollTop+=Q-K.offset}C(O)}},w);z(k,w),xc(k),$r({ref:o,onResize:k}),$r({ref:n,onResize:k});let D=a.useRef(!1);z(()=>{let K,E=()=>{D.current=!0,clearTimeout(K),K=setTimeout(()=>{D.current=!1},500),k()},L=()=>{D.current&&E()};return _==null||_.addEventListener("resize",E),_==null||_.addEventListener("scroll",L),()=>{_==null||_.removeEventListener("resize",E),_==null||_.removeEventListener("scroll",L)}},[k]);let B=a.useCallback(()=>{D.current||h==null||h()},[h,D]);$c({triggerRef:n,isOpen:p,onClose:h&&B});var v,R;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(v=$==null?void 0:$.maxHeight)!==null&&v!==void 0?v:"100vh"}},placement:(R=$==null?void 0:$.placement)!==null&&R!==void 0?R:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:k}}function xc(r){z(()=>(window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}),[r])}function Pc(r,e){return e==="rtl"?r.replace("start","right").replace("end","left"):r.replace("start","left").replace("end","right")}const fe=[];function Sc(r,e){let{onClose:t,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:s}=r;a.useEffect(()=>(o&&fe.push(e),()=>{let h=fe.indexOf(e);h>=0&&fe.splice(h,1)}),[o,e]);let u=()=>{fe[fe.length-1]===e&&t&&t()},c=h=>{(!s||s(h.target))&&fe[fe.length-1]===e&&(h.stopPropagation(),h.preventDefault())},d=h=>{(!s||s(h.target))&&(fe[fe.length-1]===e&&(h.stopPropagation(),h.preventDefault()),u())},f=h=>{h.key==="Escape"&&!l&&!h.nativeEvent.isComposing&&(h.stopPropagation(),h.preventDefault(),u())};yu({ref:e,onInteractOutside:i&&o?d:void 0,onInteractOutsideStart:c});let{focusWithinProps:b}=Wt({isDisabled:!n,onBlurWithin:h=>{!h.relatedTarget||Du(h.relatedTarget)||(!s||s(h.relatedTarget))&&(t==null||t())}}),p=h=>{h.target===h.currentTarget&&h.preventDefault()};return{overlayProps:{onKeyDown:f,...b},underlayProps:{onPointerDown:p}}}function hi(r,e,t){let{type:n}=r,{isOpen:o}=e;a.useEffect(()=>{t&&t.current&&vi.set(t.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let l=Y();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}const pr=typeof document<"u"&&window.visualViewport,Cc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Dt=0,vr;function wc(r={}){let{isDisabled:e}=r;z(()=>{if(!e)return Dt++,Dt===1&&(Ht()?vr=Tc():vr=Ec()),()=>{Dt--,Dt===0&&vr()}},[e])}function Ec(){return xe(Ue(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ue(document.documentElement,"overflow","hidden"))}function Tc(){let r,e,t=c=>{r=Io(c.target,!0),!(r===document.documentElement&&r===document.body)&&r instanceof HTMLElement&&window.getComputedStyle(r).overscrollBehavior==="auto"&&(e=Ue(r,"overscrollBehavior","contain"))},n=c=>{if(!r||r===document.documentElement||r===document.body){c.preventDefault();return}r.scrollHeight===r.clientHeight&&r.scrollWidth===r.clientWidth&&c.preventDefault()},o=()=>{e&&e()},i=c=>{let d=c.target;Dc(d)&&(s(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",pr&&(pr.height<window.innerHeight?requestAnimationFrame(()=>{no(d)}):pr.addEventListener("resize",()=>no(d),{once:!0}))}))},l=null,s=()=>{if(l)return;let c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,f=window.pageYOffset;l=xe(et(window,"scroll",c),Ue(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ue(document.documentElement,"overflow","hidden"),Ue(document.body,"marginTop",`-${f}px`),()=>{window.scrollTo(d,f)}),window.scrollTo(0,0)},u=xe(et(document,"touchstart",t,{passive:!1,capture:!0}),et(document,"touchmove",n,{passive:!1,capture:!0}),et(document,"touchend",o,{passive:!1,capture:!0}),et(document,"focus",i,!0));return()=>{e==null||e(),l==null||l(),u()}}function Ue(r,e,t){let n=r.style[e];return r.style[e]=t,()=>{r.style[e]=n}}function et(r,e,t,n){return r.addEventListener(e,t,n),()=>{r.removeEventListener(e,t,n)}}function no(r){let e=document.scrollingElement||document.documentElement,t=r;for(;t&&t!==e;){let n=Io(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let o=n.getBoundingClientRect().top,i=t.getBoundingClientRect().top;i>o+t.clientHeight&&(n.scrollTop+=i-o)}t=n.parentElement}}function Dc(r){return r instanceof HTMLInputElement&&!Cc.has(r.type)||r instanceof HTMLTextAreaElement||r instanceof HTMLElement&&r.isContentEditable}const Ar=a.createContext(null);function kc(r){let{children:e}=r,t=a.useContext(Ar),[n,o]=a.useState(0),i=a.useMemo(()=>({parent:t,modalCount:n,addModal(){o(l=>l+1),t&&t.addModal()},removeModal(){o(l=>l-1),t&&t.removeModal()}}),[t,n]);return a.createElement(Ar.Provider,{value:i},e)}function Rc(){let r=a.useContext(Ar);return{modalProviderProps:{"aria-hidden":r&&r.modalCount>0?!0:void 0}}}function Kc(r){let{modalProviderProps:e}=Rc();return a.createElement("div",{"data-overlay-container":!0,...r,...e})}function Fc(r){return a.createElement(kc,null,a.createElement(Kc,r))}function Mc(r){let e=Se(),{portalContainer:t=e?null:document.body,...n}=r;if(a.useEffect(()=>{if(t!=null&&t.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[t]),!t)return null;let o=a.createElement(Fc,n);return Ie.createPortal(o,t)}var gi={};gi={dismiss:"تجاهل"};var mi={};mi={dismiss:"Отхвърляне"};var yi={};yi={dismiss:"Odstranit"};var $i={};$i={dismiss:"Luk"};var xi={};xi={dismiss:"Schließen"};var Pi={};Pi={dismiss:"Απόρριψη"};var Si={};Si={dismiss:"Dismiss"};var Ci={};Ci={dismiss:"Descartar"};var wi={};wi={dismiss:"Lõpeta"};var Ei={};Ei={dismiss:"Hylkää"};var Ti={};Ti={dismiss:"Rejeter"};var Di={};Di={dismiss:"התעלם"};var ki={};ki={dismiss:"Odbaci"};var Ri={};Ri={dismiss:"Elutasítás"};var Ki={};Ki={dismiss:"Ignora"};var Fi={};Fi={dismiss:"閉じる"};var Mi={};Mi={dismiss:"무시"};var Li={};Li={dismiss:"Atmesti"};var Ai={};Ai={dismiss:"Nerādīt"};var Ii={};Ii={dismiss:"Lukk"};var Bi={};Bi={dismiss:"Negeren"};var Ni={};Ni={dismiss:"Zignoruj"};var Oi={};Oi={dismiss:"Descartar"};var zi={};zi={dismiss:"Dispensar"};var Hi={};Hi={dismiss:"Revocare"};var Vi={};Vi={dismiss:"Пропустить"};var ji={};ji={dismiss:"Zrušiť"};var Wi={};Wi={dismiss:"Opusti"};var _i={};_i={dismiss:"Odbaci"};var Ui={};Ui={dismiss:"Avvisa"};var Gi={};Gi={dismiss:"Kapat"};var qi={};qi={dismiss:"Скасувати"};var Zi={};Zi={dismiss:"取消"};var Yi={};Yi={dismiss:"關閉"};var Xi={};Xi={"ar-AE":gi,"bg-BG":mi,"cs-CZ":yi,"da-DK":$i,"de-DE":xi,"el-GR":Pi,"en-US":Si,"es-ES":Ci,"et-EE":wi,"fi-FI":Ei,"fr-FR":Ti,"he-IL":Di,"hr-HR":ki,"hu-HU":Ri,"it-IT":Ki,"ja-JP":Fi,"ko-KR":Mi,"lt-LT":Li,"lv-LV":Ai,"nb-NO":Ii,"nl-NL":Bi,"pl-PL":Ni,"pt-BR":Oi,"pt-PT":zi,"ro-RO":Hi,"ru-RU":Vi,"sk-SK":ji,"sl-SI":Wi,"sr-SP":_i,"sv-SE":Ui,"tr-TR":Gi,"uk-UA":qi,"zh-CN":Zi,"zh-TW":Yi};function Lc(r){return r&&r.__esModule?r.default:r}function oo(r){let{onDismiss:e,...t}=r,n=qr(Lc(Xi),"@react-aria/overlays"),o=Ao(t,n.format("dismiss")),i=()=>{e&&e()};return a.createElement(fi,null,a.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}let tt=new WeakMap,oe=[];function Ac(r,e=document.body){let t=new Set(r),n=new Set,o=u=>{for(let b of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(b);let c=b=>{if(t.has(b)||b.parentElement&&n.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let p of t)if(b.contains(p))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),f=c(u);if(f===NodeFilter.FILTER_ACCEPT&&i(u),f!==NodeFilter.FILTER_REJECT){let b=d.nextNode();for(;b!=null;)i(b),b=d.nextNode()}},i=u=>{var c;let d=(c=tt.get(u))!==null&&c!==void 0?c:0;u.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&u.setAttribute("aria-hidden","true"),n.add(u),tt.set(u,d+1))};oe.length&&oe[oe.length-1].disconnect(),o(e);let l=new MutationObserver(u=>{for(let c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...t,...n].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(t.delete(d),n.delete(d));for(let d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?t.add(d):d instanceof Element&&o(d)}});l.observe(e,{childList:!0,subtree:!0});let s={observe(){l.observe(e,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return oe.push(s),()=>{l.disconnect();for(let u of n){let c=tt.get(u);c!=null&&(c===1?(u.removeAttribute("aria-hidden"),tt.delete(u)):tt.set(u,c-1))}s===oe[oe.length-1]?(oe.pop(),oe.length&&oe[oe.length-1].observe()):oe.splice(oe.indexOf(s),1)}}function Ic(r,e){let{triggerRef:t,popoverRef:n,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:l,...s}=r,{overlayProps:u,underlayProps:c}=Sc({isOpen:e.isOpen&&!s["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:l},n),{overlayProps:d,arrowProps:f,placement:b}=bi({...s,targetRef:t,overlayRef:n,isOpen:e.isOpen,onClose:o?e.close:null});return wc({isDisabled:o||!e.isOpen}),z(()=>{if(e.isOpen&&!o&&n.current)return Ac([n.current])},[o,e.isOpen,n]),{popoverProps:I(u,d),arrowProps:f,underlayProps:c,placement:b}}const Bc=a.createContext({});function Nc(){var r;return(r=a.useContext(Bc))!==null&&r!==void 0?r:{}}const Ji=a.createContext(null);function Oc(r){let e=Se(),{portalContainer:t=e?null:document.body,isExiting:n}=r,[o,i]=a.useState(!1),l=a.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:s}=Nc();if(!r.portalContainer&&s&&(t=s()),!t)return null;let u=r.children;return r.disableFocusManagement||(u=a.createElement(ei,{restoreFocus:!0,contain:o&&!n},u)),u=a.createElement(Ji.Provider,{value:l},a.createElement(cu,null,u)),Ie.createPortal(u,t)}function zc(){let r=a.useContext(Ji),e=r==null?void 0:r.setContain;z(()=>{e==null||e(!0)},[e])}const en=new WeakMap;function Hc(r){return typeof r=="string"?r.replace(/\s*/g,""):""+r}function Vc(r,e){let t=en.get(r);if(!t)throw new Error("Unknown list");return`${t.id}-option-${Hc(e)}`}function Ir(r){return zs()?r.altKey:r.ctrlKey}const jc=1e3;function Qi(r){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:n}=r,o=a.useRef({search:"",timeout:void 0}).current,i=l=>{let s=Wc(l.key);if(!(!s||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(s===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=s,e.getKeyForSearch!=null){let u=e.getKeyForSearch(o.search,t.focusedKey);u==null&&(u=e.getKeyForSearch(o.search)),u!=null&&(t.setFocusedKey(u),n&&n(u))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},jc)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function Wc(r){return r.length===1||!/^[A-Z]/i.test(r)?r:""}function _c(r){let{selectionManager:e,keyboardDelegate:t,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:s=!1,selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:c=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:b,scrollRef:p=n,linkBehavior:h="action"}=r,{direction:m}=Oe(),y=Vt(),$=g=>{var P;if(g.altKey&&g.key==="Tab"&&g.preventDefault(),!(!((P=n.current)===null||P===void 0)&&P.contains(g.target)))return;const M=(A,Te)=>{if(A!=null){if(e.isLink(A)&&h==="selection"&&u&&!Ir(g)){var ge;Ie.flushSync(()=>{e.setFocusedKey(A,Te)});let Dn=(ge=p.current)===null||ge===void 0?void 0:ge.querySelector(`[data-key="${CSS.escape(A.toString())}"]`),kn=e.getItemProps(A);Dn&&y.open(Dn,g,kn.href,kn.routerOptions);return}if(e.setFocusedKey(A,Te),e.isLink(A)&&h==="override")return;g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(A):u&&!Ir(g)&&e.replaceSelection(A)}};switch(g.key){case"ArrowDown":if(t.getKeyBelow){var N,O,T;let A=e.focusedKey!=null?(N=t.getKeyBelow)===null||N===void 0?void 0:N.call(t,e.focusedKey):(O=t.getFirstKey)===null||O===void 0?void 0:O.call(t);A==null&&i&&(A=(T=t.getFirstKey)===null||T===void 0?void 0:T.call(t,e.focusedKey)),A!=null&&(g.preventDefault(),M(A))}break;case"ArrowUp":if(t.getKeyAbove){var H,Q,Ze;let A=e.focusedKey!=null?(H=t.getKeyAbove)===null||H===void 0?void 0:H.call(t,e.focusedKey):(Q=t.getLastKey)===null||Q===void 0?void 0:Q.call(t);A==null&&i&&(A=(Ze=t.getLastKey)===null||Ze===void 0?void 0:Ze.call(t,e.focusedKey)),A!=null&&(g.preventDefault(),M(A))}break;case"ArrowLeft":if(t.getKeyLeftOf){var Ye,Xe,Ee;let A=e.focusedKey!=null?(Ye=t.getKeyLeftOf)===null||Ye===void 0?void 0:Ye.call(t,e.focusedKey):null;A==null&&i&&(A=m==="rtl"?(Xe=t.getFirstKey)===null||Xe===void 0?void 0:Xe.call(t,e.focusedKey):(Ee=t.getLastKey)===null||Ee===void 0?void 0:Ee.call(t,e.focusedKey)),A!=null&&(g.preventDefault(),M(A,m==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){var Je,xt,tr;let A=e.focusedKey!=null?(Je=t.getKeyRightOf)===null||Je===void 0?void 0:Je.call(t,e.focusedKey):null;A==null&&i&&(A=m==="rtl"?(xt=t.getLastKey)===null||xt===void 0?void 0:xt.call(t,e.focusedKey):(tr=t.getFirstKey)===null||tr===void 0?void 0:tr.call(t,e.focusedKey)),A!=null&&(g.preventDefault(),M(A,m==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let A=t.getFirstKey(e.focusedKey,We(g));e.setFocusedKey(A),A!=null&&(We(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(A):u&&e.replaceSelection(A))}break;case"End":if(t.getLastKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let A=t.getLastKey(e.focusedKey,We(g));e.setFocusedKey(A),A!=null&&(We(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(A):u&&e.replaceSelection(A))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let A=t.getKeyPageBelow(e.focusedKey);A!=null&&(g.preventDefault(),M(A))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let A=t.getKeyPageAbove(e.focusedKey);A!=null&&(g.preventDefault(),M(A))}break;case"a":We(g)&&e.selectionMode==="multiple"&&s!==!0&&(g.preventDefault(),e.selectAll());break;case"Escape":!l&&e.selectedKeys.size!==0&&(g.stopPropagation(),g.preventDefault(),e.clearSelection());break;case"Tab":if(!f){if(g.shiftKey)n.current.focus();else{let A=te(n.current,{tabbable:!0}),Te,ge;do ge=A.lastChild(),ge&&(Te=ge);while(ge);Te&&!Te.contains(document.activeElement)&&be(Te)}break}}},C=a.useRef({top:0,left:0});nt(p,"scroll",b?void 0:()=>{var g,P,M,N;C.current={top:(M=(g=p.current)===null||g===void 0?void 0:g.scrollTop)!==null&&M!==void 0?M:0,left:(N=(P=p.current)===null||P===void 0?void 0:P.scrollLeft)!==null&&N!==void 0?N:0}});let w=g=>{if(e.isFocused){g.currentTarget.contains(g.target)||e.setFocused(!1);return}if(g.currentTarget.contains(g.target)){if(e.setFocused(!0),e.focusedKey==null){var P,M;let T=Q=>{Q!=null&&(e.setFocusedKey(Q),u&&e.replaceSelection(Q))},H=g.relatedTarget;var N,O;H&&g.currentTarget.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?T((N=e.lastSelectedKey)!==null&&N!==void 0?N:(P=t.getLastKey)===null||P===void 0?void 0:P.call(t)):T((O=e.firstSelectedKey)!==null&&O!==void 0?O:(M=t.getFirstKey)===null||M===void 0?void 0:M.call(t))}else!b&&p.current&&(p.current.scrollTop=C.current.top,p.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&p.current){let T=p.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);T&&(T.contains(document.activeElement)||be(T),dt()==="keyboard"&&Mn(T,{containingElement:n.current}))}}},F=g=>{g.currentTarget.contains(g.relatedTarget)||e.setFocused(!1)},k=a.useRef(!1);nt(n,Js,d?g=>{let{detail:P}=g;g.stopPropagation(),e.setFocused(!0),(P==null?void 0:P.focusStrategy)==="first"&&(k.current=!0)}:void 0);let D=Z(()=>{var g,P;let M=(P=(g=t.getFirstKey)===null||g===void 0?void 0:g.call(t))!==null&&P!==void 0?P:null;if(M==null){var N;(N=n.current)===null||N===void 0||N.dispatchEvent(new CustomEvent(No,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(k.current=!1)}else e.setFocusedKey(M),k.current=!1});Kn(()=>{k.current&&D()},[e.collection,D]);let B=Z(()=>{e.collection.size>0&&(k.current=!1)});Kn(()=>{B()},[e.focusedKey,B]),nt(n,Xs,d?g=>{g.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const v=a.useRef(o);a.useEffect(()=>{if(v.current){var g,P;let O=null;var M;o==="first"&&(O=(M=(g=t.getFirstKey)===null||g===void 0?void 0:g.call(t))!==null&&M!==void 0?M:null);var N;o==="last"&&(O=(N=(P=t.getLastKey)===null||P===void 0?void 0:P.call(t))!==null&&N!==void 0?N:null);let T=e.selectedKeys;if(T.size){for(let H of T)if(e.canSelectItem(H)){O=H;break}}e.setFocused(!0),e.setFocusedKey(O),O==null&&!d&&n.current&&Ae(n.current)}},[]);let R=a.useRef(e.focusedKey);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==R.current||v.current)&&p.current&&n.current){let g=dt(),P=n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!P)return;(g==="keyboard"||v.current)&&(Bo(p.current,P),g!=="virtual"&&Mn(P,{containingElement:n.current}))}!d&&e.isFocused&&e.focusedKey==null&&R.current!=null&&n.current&&Ae(n.current),R.current=e.focusedKey,v.current=!1}),nt(n,"react-aria-focus-scope-restore",g=>{g.preventDefault(),e.setFocused(!0)});let K={onKeyDown:$,onFocus:w,onBlur:F,onMouseDown(g){p.current===g.target&&g.preventDefault()}},{typeSelectProps:E}=Qi({keyboardDelegate:t,selectionManager:e});c||(K=I(E,K));let L;return d?L=-1:L=e.focusedKey==null?0:-1,{collectionProps:{...K,tabIndex:L}}}function Uc(r){let{id:e,selectionManager:t,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:s,isDisabled:u,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:f="action"}=r,b=Vt();e=Y(e);let p=T=>{if(T.pointerType==="keyboard"&&Ir(T))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(f==="selection"&&o.current){let H=t.getItemProps(n);b.open(o.current,T,H.href,H.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(f==="override"||f==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):T&&T.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||T&&(We(T)||T.pointerType==="touch"||T.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};a.useEffect(()=>{if(n===t.focusedKey&&t.isFocused)if(!l)s?s():document.activeElement!==o.current&&o.current&&Ae(o.current);else{var H;let Q=new CustomEvent(No,{cancelable:!0,bubbles:!0});(H=o.current)===null||H===void 0||H.dispatchEvent(Q)}},[o,n,t.focusedKey,t.childFocusStrategy,t.isFocused,l]),u=u||t.isDisabled(n);let h={};!l&&!u?h={tabIndex:n===t.focusedKey?0:-1,onFocus(T){T.target===o.current&&t.setFocusedKey(n)}}:u&&(h.onMouseDown=T=>{T.preventDefault()});let m=t.isLink(n)&&f==="override",y=t.isLink(n)&&f!=="selection"&&f!=="none",$=!u&&t.canSelectItem(n)&&!m,C=(c||y)&&!u,w=C&&(t.selectionBehavior==="replace"?!$:!$||t.isEmpty),F=C&&$&&t.selectionBehavior==="replace",k=w||F,D=a.useRef(null),B=k&&$,v=a.useRef(!1),R=a.useRef(!1),K=T=>{if(c&&c(),y&&o.current){let H=t.getItemProps(n);b.open(o.current,T,H.href,H.routerOptions)}},E={};i?(E.onPressStart=T=>{D.current=T.pointerType,v.current=B,T.pointerType==="keyboard"&&(!k||lo())&&p(T)},d?(E.onPressUp=w?void 0:T=>{T.pointerType==="mouse"&&$&&p(T)},E.onPress=w?K:T=>{T.pointerType!=="keyboard"&&T.pointerType!=="mouse"&&$&&p(T)}):E.onPress=T=>{if(w||F&&T.pointerType!=="mouse"){if(T.pointerType==="keyboard"&&!io())return;K(T)}else T.pointerType!=="keyboard"&&$&&p(T)}):(E.onPressStart=T=>{D.current=T.pointerType,v.current=B,R.current=w,$&&(T.pointerType==="mouse"&&!w||T.pointerType==="keyboard"&&(!C||lo()))&&p(T)},E.onPress=T=>{(T.pointerType==="touch"||T.pointerType==="pen"||T.pointerType==="virtual"||T.pointerType==="keyboard"&&k&&io()||T.pointerType==="mouse"&&R.current)&&(k?K(T):$&&p(T))}),h["data-key"]=n,E.preventFocusOnPress=l;let{pressProps:L,isPressed:g}=Me(E),P=F?T=>{D.current==="mouse"&&(T.stopPropagation(),T.preventDefault(),K(T))}:void 0,{longPressProps:M}=Jo({isDisabled:!B,onLongPress(T){T.pointerType==="touch"&&(p(T),t.setSelectionBehavior("toggle"))}}),N=T=>{D.current==="touch"&&v.current&&T.preventDefault()},O=t.isLink(n)?T=>{Fe.isOpening||T.preventDefault()}:void 0;return{itemProps:I(h,$||w?L:{},B?M:{},{onDoubleClick:P,onDragStartCapture:N,onClick:O,id:e}),isPressed:g,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:u,allowsSelection:$,hasAction:k}}function io(){let r=window.event;return(r==null?void 0:r.key)==="Enter"}function lo(){let r=window.event;return(r==null?void 0:r.key)===" "||(r==null?void 0:r.code)==="Space"}class ao{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e!=null?t.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!n)return null;let o=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left+t.scrollLeft,y:i.top-o.top+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;var t,n;return{width:(t=e==null?void 0:e.scrollWidth)!==null&&t!==void 0?t:0,height:(n=e==null?void 0:e.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let e=this.ref.current;var t,n,o,i;return{x:(t=e==null?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,y:(n=e==null?void 0:e.scrollTop)!==null&&n!==void 0?n:0,width:(o=e==null?void 0:e.offsetWidth)!==null&&o!==void 0?o:0,height:(i=e==null?void 0:e.offsetHeight)!==null&&i!==void 0?i:0}}constructor(e){this.ref=e}}class tn{isDisabled(e){var t;return this.disabledBehavior==="all"&&(((t=e.props)===null||t===void 0?void 0:t.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let o=this.collection.getItem(n);if((o==null?void 0:o.type)==="item"&&!this.isDisabled(o))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}findKey(e,t,n){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=t(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(l,i)&&o!=null);return o}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[t](n))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyAfter(t))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,t=>this.collection.getKeyBefore(t))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!st(t))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>i&&o!=null;)o=this.getKeyAbove(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!st(t))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<i&&o!=null;)o=this.getKeyBelow(o),n=o==null?null:this.layoutDelegate.getItemRect(o)}return o??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,o=t||this.getFirstKey();for(;o!=null;){let i=n.getItem(o);if(!i)return null;let l=i.textValue.slice(0,e.length);if(i.textValue&&this.collator.compare(l,e)===0)return o;o=this.getNextKey(o)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||"all",this.orientation=t.orientation||"vertical",this.direction=t.direction,this.layout=t.layout||"stack",this.layoutDelegate=t.layoutDelegate||new ao(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new ao(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function Gc(r){let{selectionManager:e,collection:t,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:l}=r,s=Zr({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,c=a.useMemo(()=>i||new tn({collection:t,disabledKeys:n,disabledBehavior:u,ref:o,collator:s,layoutDelegate:l}),[i,l,t,n,o,s,u]),{collectionProps:d}=_c({...r,ref:o,selectionManager:e,keyboardDelegate:c});return{listProps:d}}function qc(r,e,t){let n=G(r,{labelable:!0}),o=r.selectionBehavior||"toggle",i=r.linkBehavior||(o==="replace"?"action":"override");o==="toggle"&&i==="action"&&(i="override");let{listProps:l}=Gc({...r,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:s}=Wt({onFocusWithin:r.onFocus,onBlurWithin:r.onBlur,onFocusWithinChange:r.onFocusChange}),u=Y(r.id);en.set(e,{id:u,shouldUseVirtualFocus:r.shouldUseVirtualFocus,shouldSelectOnPressUp:r.shouldSelectOnPressUp,shouldFocusOnHover:r.shouldFocusOnHover,isVirtualized:r.isVirtualized,onAction:r.onAction,linkBehavior:i});let{labelProps:c,fieldProps:d}=Jr({...r,id:u,labelElementType:"span"});return{labelProps:c,listBoxProps:I(n,s,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...I(d,l)})}}class Zc{build(e,t){return this.context=t,so(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(a.isValidElement(t)&&t.type===a.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:t}),o++}else{let o=[];a.Children.forEach(t,l=>{l&&o.push(l)});let i=0;for(let l of o){let s=this.getFullNode({element:l,index:i},{});for(let u of s)i++,yield u}}}getKey(e,t,n,o){if(e.key!=null)return e.key;if(t.type==="cell"&&t.key!=null)return`${o}${t.key}`;let i=t.value;if(i!=null){var l;let s=(l=i.key)!==null&&l!==void 0?l:i.id;if(s==null)throw new Error("No key found for item");return s}return o?`${o}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,o){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let y=[];a.Children.forEach(e.element.props.children,C=>{y.push(C)});var i;let $=(i=e.index)!==null&&i!==void 0?i:0;for(const C of y)yield*this.getFullNode({element:C,index:$++},t,n,o);return}let l=e.element;if(!l&&e.value&&t&&t.renderer){let y=this.cache.get(e.value);if(y&&(!y.shouldInvalidate||!y.shouldInvalidate(this.context))){y.index=e.index,y.parentKey=o?o.key:null,yield y;return}l=t.renderer(e.value)}if(a.isValidElement(l)){let y=l.type;if(typeof y!="function"&&typeof y.getCollectionNode!="function"){let F=l.type;throw new Error(`Unknown element <${F}> in collection.`)}let $=y.getCollectionNode(l.props,this.context);var s;let C=(s=e.index)!==null&&s!==void 0?s:0,w=$.next();for(;!w.done&&w.value;){let F=w.value;e.index=C;var u;let k=(u=F.key)!==null&&u!==void 0?u:null;k==null&&(k=F.element?null:this.getKey(l,e,t,n));let B=[...this.getFullNode({...F,key:k,index:C,wrapper:Yc(e.wrapper,F.wrapper)},this.getChildState(t,F),n?`${n}${l.key}`:l.key,o)];for(let v of B){var c,d;v.value=(d=(c=F.value)!==null&&c!==void 0?c:e.value)!==null&&d!==void 0?d:null,v.value&&this.cache.set(v.value,v);var f;if(e.type&&v.type!==e.type)throw new Error(`Unsupported type <${br(v.type)}> in <${br((f=o==null?void 0:o.type)!==null&&f!==void 0?f:"unknown parent type")}>. Only <${br(e.type)}> is supported.`);C++,yield v}w=$.next(B)}return}if(e.key==null||e.type==null)return;let b=this;var p,h;let m={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:(p=e.value)!==null&&p!==void 0?p:null,level:o?o.level+1:0,index:e.index,rendered:e.rendered,textValue:(h=e.textValue)!==null&&h!==void 0?h:"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:so(function*(){if(!e.hasChildNodes||!e.childNodes)return;let y=0;for(let $ of e.childNodes()){$.key!=null&&($.key=`${m.key}${$.key}`);let C=b.getFullNode({...$,index:y},b.getChildState(t,$),m.key,m);for(let w of C)y++,yield w}})};yield m}constructor(){this.cache=new WeakMap}}function so(r){let e=[],t=null;return{*[Symbol.iterator](){for(let n of e)yield n;t||(t=r());for(let n of t)e.push(n),yield n}}}function Yc(r,e){if(r&&e)return t=>r(e(t));if(r)return r;if(e)return e}function br(r){return r[0].toUpperCase()+r.slice(1)}function Xc(r,e,t){let n=a.useMemo(()=>new Zc,[]),{children:o,items:i,collection:l}=r;return a.useMemo(()=>{if(l)return l;let u=n.build({children:o,items:i},t);return e(u)},[n,o,i,l,t,e])}function el(r,e){return typeof e.getChildren=="function"?e.getChildren(r.key):r.childNodes}function Jc(r){return Qc(r)}function Qc(r,e){for(let t of r)return t}function hr(r,e,t){if(e.parentKey===t.parentKey)return e.index-t.index;let n=[...uo(r,e),e],o=[...uo(r,t),t],i=n.slice(0,o.length).findIndex((l,s)=>l!==o[s]);return i!==-1?(e=n[i],t=o[i],e.index-t.index):n.findIndex(l=>l===t)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function uo(r,e){let t=[],n=e;for(;(n==null?void 0:n.parentKey)!=null;)n=r.getItem(n.parentKey),n&&t.unshift(n);return t}const co=new WeakMap;function ed(r){let e=co.get(r);if(e!=null)return e;let t=0,n=o=>{for(let i of o)i.type==="section"?n(el(i,r)):t++};return n(r),co.set(r,t),t}function td(r,e,t){var n,o;let{key:i}=r,l=en.get(e);var s;let u=(s=r.isDisabled)!==null&&s!==void 0?s:e.selectionManager.isDisabled(i);var c;let d=(c=r.isSelected)!==null&&c!==void 0?c:e.selectionManager.isSelected(i);var f;let b=(f=r.shouldSelectOnPressUp)!==null&&f!==void 0?f:l==null?void 0:l.shouldSelectOnPressUp;var p;let h=(p=r.shouldFocusOnHover)!==null&&p!==void 0?p:l==null?void 0:l.shouldFocusOnHover;var m;let y=(m=r.shouldUseVirtualFocus)!==null&&m!==void 0?m:l==null?void 0:l.shouldUseVirtualFocus;var $;let C=($=r.isVirtualized)!==null&&$!==void 0?$:l==null?void 0:l.isVirtualized,w=at(),F=at(),k={role:"option","aria-disabled":u||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?d:void 0};Pe()&&Hr()||(k["aria-label"]=r["aria-label"],k["aria-labelledby"]=w,k["aria-describedby"]=F);let D=e.collection.getItem(i);if(C){let O=Number(D==null?void 0:D.index);k["aria-posinset"]=Number.isNaN(O)?void 0:O+1,k["aria-setsize"]=ed(e.collection)}let B=l!=null&&l.onAction?()=>{var O;return l==null||(O=l.onAction)===null||O===void 0?void 0:O.call(l,i)}:void 0,v=Vc(e,i),{itemProps:R,isPressed:K,isFocused:E,hasAction:L,allowsSelection:g}=Uc({selectionManager:e.selectionManager,key:i,ref:t,shouldSelectOnPressUp:b,allowsDifferentPressOrigin:b&&h,isVirtualized:C,shouldUseVirtualFocus:y,isDisabled:u,onAction:B||!(D==null||(n=D.props)===null||n===void 0)&&n.onAction?xe(D==null||(o=D.props)===null||o===void 0?void 0:o.onAction,B):void 0,linkBehavior:l==null?void 0:l.linkBehavior,id:v}),{hoverProps:P}=Ne({isDisabled:u||!h,onHoverStart(){ct()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(i))}}),M=G(D==null?void 0:D.props);delete M.id;let N=Fo(D==null?void 0:D.props);return{optionProps:{...k,...I(M,R,P,N),id:v},labelProps:{id:w},descriptionProps:{id:F},isFocused:E,isFocusVisible:E&&ct(),isSelected:d,isDisabled:u,isPressed:K,allowsSelection:g,hasAction:L}}function rd(r){let{heading:e,"aria-label":t}=r,n=Y();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?n:void 0}}}var tl={};tl={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var rl={};rl={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var nl={};nl={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ol={};ol={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var il={};il={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var ll={};ll={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var al={};al={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var sl={};sl={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var ul={};ul={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var cl={};cl={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var dl={};dl={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var fl={};fl={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var pl={};pl={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var vl={};vl={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var bl={};bl={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var hl={};hl={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var gl={};gl={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var ml={};ml={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var yl={};yl={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var $l={};$l={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var xl={};xl={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Pl={};Pl={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Sl={};Sl={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Cl={};Cl={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var wl={};wl={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var El={};El={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Tl={};Tl={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Dl={};Dl={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var kl={};kl={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Rl={};Rl={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Kl={};Kl={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var Fl={};Fl={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Ml={};Ml={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var Ll={};Ll={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Al={};Al={"ar-AE":tl,"bg-BG":rl,"cs-CZ":nl,"da-DK":ol,"de-DE":il,"el-GR":ll,"en-US":al,"es-ES":sl,"et-EE":ul,"fi-FI":cl,"fr-FR":dl,"he-IL":fl,"hr-HR":pl,"hu-HU":vl,"it-IT":bl,"ja-JP":hl,"ko-KR":gl,"lt-LT":ml,"lv-LV":yl,"nb-NO":$l,"nl-NL":xl,"pl-PL":Pl,"pt-BR":Sl,"pt-PT":Cl,"ro-RO":wl,"ru-RU":El,"sk-SK":Tl,"sl-SI":Dl,"sr-SP":kl,"sv-SE":Rl,"tr-TR":Kl,"uk-UA":Fl,"zh-CN":Ml,"zh-TW":Ll};function nd(r){return r&&r.__esModule?r.default:r}function od(r,e,t){let{type:n="menu",isDisabled:o,trigger:i="press"}=r,l=Y(),{triggerProps:s,overlayProps:u}=hi({type:n},e,t),c=p=>{if(!o&&!(i==="longPress"&&!p.altKey)&&t&&t.current)switch(p.key){case"Enter":case" ":if(i==="longPress")return;case"ArrowDown":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in p||p.stopPropagation(),p.preventDefault(),e.toggle("last");break;default:"continuePropagation"in p&&p.continuePropagation()}},d=qr(nd(Al),"@react-aria/menu"),{longPressProps:f}=Jo({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),b={onPressStart(p){p.pointerType!=="touch"&&p.pointerType!=="keyboard"&&!o&&e.open(p.pointerType==="virtual"?"first":null)},onPress(p){p.pointerType==="touch"&&!o&&e.toggle()}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?b:f,id:l,onKeyDown:c},menuProps:{...u,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function id(r,e){let{role:t="dialog"}=r,n=at();n=r["aria-label"]?void 0:n;let o=a.useRef(!1);return a.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){Ae(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(o.current=!0,e.current&&(e.current.blur(),Ae(e.current)),o.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),zc(),{dialogProps:{...G(r,{labelable:!0}),role:t,tabIndex:-1,"aria-labelledby":r["aria-labelledby"]||n,onBlur:i=>{o.current&&i.stopPropagation()}},titleProps:{id:n}}}function ld(r,e,t){let{isDisabled:n}=r,o=Y(),i=Y(),s=!Se()&&"onbeforematch"in document.body,u=a.useRef(null),c=a.useCallback(()=>{u.current=requestAnimationFrame(()=>{t.current&&t.current.setAttribute("hidden","until-found")}),Ie.flushSync(()=>{e.toggle()})},[t,e]);return nt(t,"beforematch",s?c:null),z(()=>{u.current&&cancelAnimationFrame(u.current),s&&t.current&&!n&&(e.isExpanded?t.current.removeAttribute("hidden"):t.current.setAttribute("hidden","until-found"))},[n,t,e.isExpanded,s]),a.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),{buttonProps:{id:o,"aria-expanded":e.isExpanded,"aria-controls":i,onPress:d=>{!n&&d.pointerType!=="keyboard"&&e.toggle()},isDisabled:n,onPressStart(d){d.pointerType==="keyboard"&&!n&&e.toggle()}},panelProps:{id:i,role:"group","aria-labelledby":o,"aria-hidden":!e.isExpanded,hidden:s?!0:!e.isExpanded}}}function ad(r){let{value:e=0,minValue:t=0,maxValue:n=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=r,s=G(r,{labelable:!0}),{labelProps:u,fieldProps:c}=Jr({...r,labelElementType:"span"});e=Ft(e,t,n);let d=(e-t)/(n-t),f=Ju(l);if(!i&&!o){let b=l.style==="percent"?d:e;o=f.format(b)}return{progressBarProps:I(s,{...c,"aria-valuenow":i?void 0:e,"aria-valuemin":t,"aria-valuemax":n,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:u}}const Il=new WeakMap;function sd(r,e,t){let{keyboardDelegate:n,isDisabled:o,isRequired:i,name:l,validationBehavior:s="aria"}=r,u=Zr({usage:"search",sensitivity:"base"}),c=a.useMemo(()=>n||new tn(e.collection,e.disabledKeys,t,u),[n,e.collection,e.disabledKeys,u]),{menuTriggerProps:d,menuProps:f}=od({isDisabled:o,type:"listbox"},e,t),b=v=>{switch(v.key){case"ArrowLeft":{var R,K;v.preventDefault();let g=e.selectedKey!=null?(R=c.getKeyAbove)===null||R===void 0?void 0:R.call(c,e.selectedKey):(K=c.getFirstKey)===null||K===void 0?void 0:K.call(c);g&&e.setSelectedKey(g);break}case"ArrowRight":{var E,L;v.preventDefault();let g=e.selectedKey!=null?(E=c.getKeyBelow)===null||E===void 0?void 0:E.call(c,e.selectedKey):(L=c.getFirstKey)===null||L===void 0?void 0:L.call(c);g&&e.setSelectedKey(g);break}}},{typeSelectProps:p}=Qi({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(v){e.setSelectedKey(v)}}),{isInvalid:h,validationErrors:m,validationDetails:y}=e.displayValidation,{labelProps:$,fieldProps:C,descriptionProps:w,errorMessageProps:F}=Qr({...r,labelElementType:"span",isInvalid:h,errorMessage:r.errorMessage||m});p.onKeyDown=p.onKeyDownCapture,delete p.onKeyDownCapture;let k=G(r,{labelable:!0}),D=I(p,d,C),B=Y();return Il.set(e,{isDisabled:o,isRequired:i,name:l,validationBehavior:s}),{labelProps:{...$,onClick:()=>{if(!r.isDisabled){var v;(v=t.current)===null||v===void 0||v.focus(),Xo("keyboard")}}},triggerProps:I(k,{...D,isDisabled:o,onKeyDown:xe(D.onKeyDown,b,r.onKeyDown),onKeyUp:r.onKeyUp,"aria-labelledby":[B,D["aria-labelledby"],D["aria-label"]&&!D["aria-labelledby"]?D.id:null].filter(Boolean).join(" "),onFocus(v){e.isFocused||(r.onFocus&&r.onFocus(v),r.onFocusChange&&r.onFocusChange(!0),e.setFocused(!0))},onBlur(v){e.isOpen||(r.onBlur&&r.onBlur(v),r.onFocusChange&&r.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:B},menuProps:{...f,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:v=>{v.currentTarget.contains(v.relatedTarget)||(r.onBlur&&r.onBlur(v),r.onFocusChange&&r.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[C["aria-labelledby"],D["aria-label"]&&!C["aria-labelledby"]?D.id:null].filter(Boolean).join(" ")},descriptionProps:w,errorMessageProps:F,isInvalid:h,validationErrors:m,validationDetails:y}}function ud(r,e,t){let n=Il.get(e)||{},{autoComplete:o,name:i=n.name,isDisabled:l=n.isDisabled}=r,{validationBehavior:s,isRequired:u}=n,{visuallyHiddenProps:c}=di();Wr(r.selectRef,e.selectedKey,e.setSelectedKey),Xr({validationBehavior:s,focus:()=>{var f;return(f=t.current)===null||f===void 0?void 0:f.focus()}},e,r.selectRef);var d;return{containerProps:{...c,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:o,disabled:l,required:s==="native"&&u,name:i,value:(d=e.selectedKey)!==null&&d!==void 0?d:"",onChange:f=>e.setSelectedKey(f.target.value)}}}function cd(r){let{state:e,triggerRef:t,label:n,name:o,isDisabled:i}=r,l=a.useRef(null),{containerProps:s,selectProps:u}=ud({...r,selectRef:l},e,t);var c;return e.collection.size<=300?a.createElement("div",{...s,"data-testid":"hidden-select-container"},a.createElement("label",null,n,a.createElement("select",{...u,ref:l},a.createElement("option",null),[...e.collection.getKeys()].map(d=>{let f=e.collection.getItem(d);if(f&&f.type==="item")return a.createElement("option",{key:f.key,value:f.key},f.textValue)})))):o?a.createElement("input",{type:"hidden",autoComplete:u.autoComplete,name:o,disabled:i,value:(c=e.selectedKey)!==null&&c!==void 0?c:""}):null}function dd(r,e){let t=G(r,{labelable:!0}),{hoverProps:n}=Ne({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:I(t,n,{role:"tooltip"})}}function fd(r,e,t){let{isDisabled:n,trigger:o}=r,i=Y(),l=a.useRef(!1),s=a.useRef(!1),u=()=>{(l.current||s.current)&&e.open(s.current)},c=$=>{!l.current&&!s.current&&e.close($)};a.useEffect(()=>{let $=C=>{t&&t.current&&C.key==="Escape"&&(C.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",$,!0),()=>{document.removeEventListener("keydown",$,!0)}},[t,e]);let d=()=>{o!=="focus"&&(dt()==="pointer"?l.current=!0:l.current=!1,u())},f=()=>{o!=="focus"&&(s.current=!1,l.current=!1,c())},b=()=>{s.current=!1,l.current=!1,c(!0)},p=()=>{ct()&&(s.current=!0,u())},h=()=>{s.current=!1,l.current=!1,c(!0)},{hoverProps:m}=Ne({isDisabled:n,onHoverStart:d,onHoverEnd:f}),{focusableProps:y}=qe({isDisabled:n,onFocus:p,onBlur:h},t);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...I(y,m,{onPointerDown:b,onKeyDown:b})},tooltipProps:{id:i}}}const Re=S.defineRecipe({className:"nimbus-button",base:{borderRadius:"200",display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",borderWidth:"1px",borderColor:"transparent",cursor:"button",flexShrink:"0",outline:"0",lineHeight:"1.2",isolation:"isolate",fontWeight:"500",transitionProperty:"common",transitionDuration:"moderate",focusVisibleRing:"outside",_disabled:{layerStyle:"disabled"},_icon:{flexShrink:"0"}},variants:{size:{"2xs":{h:"600",minW:"600",fontSize:"300",fontWeight:"500",lineHeight:"400",px:"200",gap:"100",_icon:{width:"400",height:"400"}},xs:{h:"800",minW:"800",fontSize:"350",fontWeight:"500",lineHeight:"400",px:"300",gap:"100",_icon:{width:"500",height:"500"}},md:{h:"1000",minW:"1000",fontSize:"400",lineHeight:"500",px:"400",gap:"200",_icon:{width:"600",height:"600"}}},variant:{solid:{bg:"colorPalette.9",color:"colorPalette.contrast",_hover:{bg:"colorPalette.10"},_expanded:{bg:"colorPalette.10"}},subtle:{bg:"colorPalette.3",color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},outline:{borderWidth:"1px",borderColor:"colorPalette.7",color:"colorPalette.11",transitionProperty:"background-color, border-color, color",transitionDuration:"moderate",_hover:{bg:"colorPalette.3",borderColor:"colorPalette.8"},_expanded:{bg:"colorPalette.subtle"}},ghost:{color:"colorPalette.11",_hover:{bg:"colorPalette.4"},_expanded:{bg:"colorPalette.4"}},link:{color:"colorPalette.11",_hover:{textDecoration:"underline"}}},tone:{primary:{colorPalette:"primary"},critical:{colorPalette:"critical"},neutral:{colorPalette:"neutral"},info:{colorPalette:"info"}}},defaultVariants:{size:"md",variant:"subtle"}}),{withContext:pd}=S.createRecipeContext({recipe:Re}),vd=pd("button",{defaultProps:{type:"button"},shouldForwardProp(r,e){const t=!(e!=null&&e.includes(r))&&!S.defaultSystem.isValidProperty(r);return ps(r)&&t&&!r.includes("onPress")}}),Gt=a.forwardRef((r,e)=>{const{as:t,asChild:n,children:o,...i}=r,l=a.useRef(null),s=ne(S.mergeRefs(l,e)),u=t||(n?"a":"button")||"button",{buttonProps:c}=Ut({...i,elementType:u},s);return x.jsx(vd,{...I(i,c,{as:t,asChild:n,ref:s}),children:o})});Gt.displayName="Button";const bd=a.forwardRef(function(e,t){const{children:n,portalled:o=!0,portalRef:i,backdrop:l=!0,...s}=e;return x.jsxs(S.Portal,{disabled:!o,container:i,children:[l&&x.jsx(S.Dialog.Backdrop,{}),x.jsx(S.Dialog.Positioner,{children:x.jsx(S.Dialog.Content,{ref:t,...s,asChild:!1,children:n})})]})}),hd=a.forwardRef(function(e,t){return x.jsx(S.Dialog.CloseTrigger,{position:"absolute",top:"2",insetEnd:"2",...e,asChild:!0,children:x.jsx(Gt,{size:"xs",ref:t,children:e.children})})}),gd=S.Dialog.Root,md=S.Dialog.Footer,yd=S.Dialog.Header,$d=S.Dialog.Body,xd=S.Dialog.Backdrop,Pd=S.Dialog.Title,Sd=S.Dialog.Description,Cd=S.Dialog.Trigger,wd=S.Dialog.ActionTrigger,vt=a.forwardRef(({children:r,...e},t)=>x.jsx(Gt,{px:0,py:0,ref:t,...e,children:r}));vt.displayName="IconButton";const Bl=S.defineRecipe({className:"nimbus-link",base:{display:"inline-flex",alignItems:"center",color:"colorPalette.11",borderRadius:"100",focusVisibleRing:"outside",bg:"transparent",outline:"none",cursor:"pointer",textDecoration:"underline",textUnderlineOffset:"3px",_hover:{textDecorationThickness:"12%"}},variants:{size:{xs:{fontSize:"300",lineHeight:"450"},sm:{fontSize:"350",lineHeight:"500"},md:{fontSize:"400",lineHeight:"600"}},fontColor:{primary:{color:"primary"},inherit:{color:"inherit"}}}}),{withContext:Ed}=S.createRecipeContext({recipe:Bl}),Td=Ed("a"),Nl=a.forwardRef((r,e)=>{const{as:t,asChild:n,children:o,...i}=r,l=a.useRef(null),s=ne(S.mergeRefs(l,e)),u=t||(n?"span":"a")||"a",{linkProps:c}=Au({...i,elementType:u},s);return x.jsx(Td,{...I(i,c,{as:t,asChild:n,ref:s}),children:o})});Nl.displayName="Link";const Dd=r=>x.jsx(S.List.Root,{...r}),kd=r=>x.jsx(S.List.Item,{...r}),Ol=a.forwardRef((r,e)=>x.jsx(S.SimpleGrid,{ref:e,...r}));Ol.displayName="SimpleGrid";const Rd=Object.assign(Ol,{Item:S.GridItem}),Kd=r=>x.jsx(S.Table.Root,{...r}),Fd=r=>x.jsx(S.Table.ColumnGroup,{...r}),Md=r=>x.jsx(S.Table.Column,{...r}),Ld=r=>x.jsx(S.Table.Header,{...r}),Ad=r=>x.jsx(S.Table.Footer,{...r}),Id=r=>x.jsx(S.Table.Row,{...r}),Bd=r=>x.jsx(S.Table.Cell,{...r}),Nd=r=>x.jsx(S.Table.Body,{...r}),Od=r=>x.jsx(S.Table.ColumnHeader,{...r}),zl=a.forwardRef((r,e)=>x.jsx(S.Text,{ref:e,...r}));zl.displayName="Text";a.createContext(null);a.createContext(null);a.createContext(null);a.createContext(null);a.createContext(null);const zd=a.createContext({}),Nt=Symbol("default");function ze({values:r,children:e}){for(let[t,n]of r)e=a.createElement(t.Provider,{value:n},e);return e}function J(r){let{className:e,style:t,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:s}=r;return a.useMemo(()=>{let u,c,d;return typeof e=="function"?u=e({...s,defaultClassName:o}):u=e,typeof t=="function"?c=t({...s,defaultStyle:l||{}}):c=t,typeof n=="function"?d=n({...s,defaultChildren:i}):n==null?d=i:d=n,{className:u??o,style:c||l?{...l,...c}:void 0,children:d??i,"data-rac":""}},[e,t,n,o,i,l,s])}function qt(r,e){let t=a.useContext(r);if(e===null)return null;if(t&&typeof t=="object"&&"slots"in t&&t.slots){let n=new Intl.ListFormat().format(Object.keys(t.slots).map(i=>`"${i}"`));if(!e&&!t.slots[Nt])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=e||Nt;if(!t.slots[o])throw new Error(`Invalid slot "${e}". Valid slot names are ${n}.`);return t.slots[o]}return t}function re(r,e,t){let n=qt(t,r.slot)||{},{ref:o,...i}=n,l=ne(a.useMemo(()=>ko(e,o),[e,o])),s=I(i,r);return"style"in i&&i.style&&"style"in r&&r.style&&(typeof i.style=="function"||typeof r.style=="function"?s.style=u=>{let c=typeof i.style=="function"?i.style(u):i.style,d={...u.defaultStyle,...c},f=typeof r.style=="function"?r.style({...u,defaultStyle:d}):r.style;return{...d,...f}}:s.style={...i.style,...r.style}),[s,l]}function rn(){let[r,e]=a.useState(!0),t=a.useRef(!1),n=a.useCallback(o=>{t.current=!0,e(!!o)},[]);return z(()=>{t.current||e(!1)},[]),[n,r]}function Hl(r){const e=/^(data-.*)$/;let t={};for(const n in r)e.test(n)||(t[n]=r[n]);return t}class nn{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new nn(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=e,this.key=t}}class on{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),o=(n==null?void 0:n.firstChildKey)!=null?t.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?t.get(o.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new on,n=null;for(let o of this)if(o.type==="section"&&o.hasChildNodes){let i=o.clone(),l=null;for(let s of this.getChildren(o.key))if(e(s.textValue)||s.type==="header"){let u=s.clone();l==null&&(i.firstChildKey=u.key),t.firstKey==null&&(t.firstKey=i.key),l&&l.parentKey===u.parentKey?(l.nextKey=u.key,u.prevKey=l.key):u.prevKey=null,u.nextKey=null,t.addNode(u),l=u}l&&(l.type!=="header"?(i.lastChildKey=l.key,n==null?i.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=i.key,i.prevKey=n.key),i.nextKey=null,n=i,t.addNode(i)):(t.firstKey===i.key&&(t.firstKey=null),t.removeNode(l.key)))}else if(o.type==="separator"){let i=o.clone();i.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=i.key,i.prevKey=n.key,n=i,t.addNode(i))}else if(e(o.textValue)){let i=o.clone();t.firstKey==null&&(t.firstKey=i.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===i.parentKey?(n.nextKey=i.key,i.prevKey=n.key):i.prevKey=null,i.nextKey=null,t.addNode(i),n=i}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let o;n.prevKey!=null&&(o=t.getItem(n.prevKey),o.nextKey=null),t.removeNode(n.key),n=o}return t.lastKey=(n==null?void 0:n.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class Vl{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}appendChild(e){this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode;let n=t;for(;n;)n.index++,n=n.nextSibling;e.hasSetProps&&this.ownerDocument.addNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(e){if(e.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let t=e.nextSibling;for(;t;)t.index--,t=t.nextSibling;e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.removeNode(e),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=e}}class ft extends Vl{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof ft?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,t,n,o;let i=this.ownerDocument.getMutableNode(this);i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof ft?this.parentNode.node.key:null;var l;i.prevKey=(l=(e=this.previousSibling)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null;var s;i.nextKey=(s=(t=this.nextSibling)===null||t===void 0?void 0:t.node.key)!==null&&s!==void 0?s:null,i.hasChildNodes=!!this.firstChild;var u;i.firstChildKey=(u=(n=this.firstChild)===null||n===void 0?void 0:n.node.key)!==null&&u!==void 0?u:null;var c;i.lastChildKey=(c=(o=this.lastChild)===null||o===void 0?void 0:o.node.key)!==null&&c!==void 0?c:null}setProps(e,t,n,o){let i=this.ownerDocument.getMutableNode(this),{value:l,textValue:s,id:u,...c}=e;if(c.ref=t,i.props=c,i.rendered=n,i.render=o,i.value=l,i.textValue=s||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",u!=null&&u!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=u}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new nn(e,`react-aria-${++t.nodeId}`),this.ownerDocument.startTransaction()}}class Hd extends Vl{get isConnected(){return this.isMounted}createElement(e){return new ft(e,this)}getMutableNode(e){let t=e.node;return this.mutatedNodes.has(e)||(t=e.node.clone(),this.mutatedNodes.add(e),e.node=t),this.markDirty(e),t}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(e){this.dirtyNodes.add(e)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(e){let t=this.getMutableCollection();if(!t.getItem(e.node.key)){t.addNode(e.node);for(let n of e)this.addNode(n)}this.markDirty(e)}removeNode(e){for(let n of e)this.removeNode(n);this.getMutableCollection().removeNode(e.node.key),this.markDirty(e)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof ft&&i.isConnected&&i.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,t;let i=this.getMutableCollection();for(let l of this.mutatedNodes)l.isConnected&&i.addNode(l.node);var n,o;i.commit((n=(e=this.firstChild)===null||e===void 0?void 0:e.node.key)!==null&&n!==void 0?n:null,(o=(t=this.lastChild)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let e of this.subscriptions)e()}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=e,this.collectionMutated=!0}}function jl(r){let{children:e,items:t,idScope:n,addIdAndValue:o,dependencies:i=[]}=r,l=a.useMemo(()=>new WeakMap,i);return a.useMemo(()=>{if(t&&typeof e=="function"){let c=[];for(let d of t){let f=l.get(d);if(!f){f=e(d);var s,u;let b=(u=(s=f.props.id)!==null&&s!==void 0?s:d.key)!==null&&u!==void 0?u:d.id;if(b==null)throw new Error("Could not determine key for item");n&&(b=n+":"+b),f=a.cloneElement(f,o?{key:b,id:b,value:d}:{key:b}),l.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,t,l,n,o])}if(typeof HTMLTemplateElement<"u"){const r=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:r.call(this)}})}const Ot=a.createContext(!1),Vd=typeof DocumentFragment<"u"?new DocumentFragment:null;function jd(r){let e=a.useContext(Ot),t=Se();if(e)return a.createElement(a.Fragment,null,r.children);let n=a.createElement(Ot.Provider,{value:!0},r.children);return t?a.createElement("template",{"data-react-aria-hidden":!0},n):Ie.createPortal(n,Vd)}function Wl(r){let e=(t,n)=>a.useContext(Ot)?null:r(t,n);return e.displayName=r.displayName||r.name,a.forwardRef(e)}function Wd(){return a.useContext(Ot)}var kt={exports:{}},gr={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var fo;function _d(){if(fo)return gr;fo=1;var r=a;function e(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var t=typeof Object.is=="function"?Object.is:e,n=r.useState,o=r.useEffect,i=r.useLayoutEffect,l=r.useDebugValue;function s(f,b){var p=b(),h=n({inst:{value:p,getSnapshot:b}}),m=h[0].inst,y=h[1];return i(function(){m.value=p,m.getSnapshot=b,u(m)&&y({inst:m})},[f,p,b]),o(function(){return u(m)&&y({inst:m}),f(function(){u(m)&&y({inst:m})})},[f]),l(p),p}function u(f){var b=f.getSnapshot;f=f.value;try{var p=b();return!t(f,p)}catch{return!0}}function c(f,b){return b()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return gr.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:d,gr}var mr={};/**
10
+ * @license React
11
+ * use-sync-external-store-shim.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var po;function Ud(){return po||(po=1,process.env.NODE_ENV!=="production"&&function(){function r(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function e(p,h){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=h();if(!f){var y=h();i(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=l({inst:{value:m,getSnapshot:h}});var $=y[0].inst,C=y[1];return u(function(){$.value=m,$.getSnapshot=h,t($)&&C({inst:$})},[p,m,h]),s(function(){return t($)&&C({inst:$}),p(function(){t($)&&C({inst:$})})},[p]),c(m),m}function t(p){var h=p.getSnapshot;p=p.value;try{var m=h();return!i(p,m)}catch{return!0}}function n(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=a,i=typeof Object.is=="function"?Object.is:r,l=o.useState,s=o.useEffect,u=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;mr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),mr}var vo;function Gd(){return vo||(vo=1,process.env.NODE_ENV==="production"?kt.exports=_d():kt.exports=Ud()),kt.exports}var qd=Gd();const _l=a.createContext(!1),pt=a.createContext(null);function Ul(r){if(a.useContext(pt))return r.content;let{collection:t,document:n}=Jd(r.createCollection);return a.createElement(a.Fragment,null,a.createElement(jd,null,a.createElement(pt.Provider,{value:n},r.content)),a.createElement(Zd,{render:r.children,collection:t}))}function Zd({collection:r,render:e}){return e(r)}function Yd(r,e,t){let n=Se(),o=a.useRef(n);o.current=n;let i=a.useCallback(()=>o.current?t():e(),[e,t]);return qd.useSyncExternalStore(r,i)}const Xd=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:Yd;function Jd(r){let[e]=a.useState(()=>new Hd((r==null?void 0:r())||new on)),t=a.useCallback(l=>e.subscribe(l),[e]),n=a.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=Xd(t,n,o);return z(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const Br=a.createContext(null);function Gl(r,e,t,n,o,i){let l=a.useCallback(u=>{u==null||u.setProps(e,t,n,i)},[e,t,n,i]),s=a.useContext(Br);if(s){let u=s.ownerDocument.nodesByProps.get(e);return u||(u=s.ownerDocument.createElement(r),u.setProps(e,t,n,i),s.appendChild(u),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(e,u)),o?a.createElement(Br.Provider,{value:u},o):null}return a.createElement(r,{ref:l},o)}function ql(r,e){let t=({node:o})=>e(o.props,o.props.ref,o),n=a.forwardRef((o,i)=>{if(!a.useContext(_l)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return Gl(r,o,i,"children"in o?o.children:null,null,s=>a.createElement(t,{node:s}))});return n.displayName=e.name,n}function Qd(r,e,t=Zl){let n=({node:i})=>e(i.props,i.props.ref,i),o=a.forwardRef((i,l)=>{let s=t(i);var u;return(u=Gl(r,i,l,null,s,c=>a.createElement(n,{node:c})))!==null&&u!==void 0?u:a.createElement(a.Fragment,null)});return o.displayName=e.name,o}function Zl(r){return jl({...r,addIdAndValue:!0})}const bo=a.createContext(null);function Yl(r){let e=a.useContext(bo),t=((e==null?void 0:e.dependencies)||[]).concat(r.dependencies),n=r.idScope||(e==null?void 0:e.idScope),o=Zl({...r,idScope:n,dependencies:t});return a.useContext(pt)&&(o=a.createElement(ef,null,o)),e=a.useMemo(()=>({dependencies:t,idScope:n}),[n,...t]),a.createElement(bo.Provider,{value:e},o)}function ef({children:r}){let e=a.useContext(pt),t=a.useMemo(()=>a.createElement(pt.Provider,{value:null},a.createElement(_l.Provider,{value:!0},r)),[r]);return Se()?a.createElement(Br.Provider,{value:e},t):Ie.createPortal(t,e)}const Xl=a.createContext({}),tf=a.createContext(null),rf=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),ln=a.createContext({}),nf=Wl(function(e,t){[e,t]=re(e,t,ln),e=of(e);let n=e,{isPending:o}=n,{buttonProps:i,isPressed:l}=Ut(e,t),{focusProps:s,isFocused:u,isFocusVisible:c}=we(e),{hoverProps:d,isHovered:f}=Ne({...e,isDisabled:e.isDisabled||o}),b={isHovered:f,isPressed:(n.isPressed||l)&&!o,isFocused:u,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:o??!1},p=J({...e,values:b,defaultClassName:"react-aria-Button"}),h=Y(i.id),m=Y(),y=i["aria-labelledby"];o&&(y?y=`${y} ${m}`:i["aria-label"]&&(y=`${h} ${m}`));let $=a.useRef(o);return a.useEffect(()=>{let C={"aria-labelledby":y||h};(!$.current&&u&&o||$.current&&u&&!o)&&qn(C,"assertive"),$.current=o},[o,u,y,h]),a.createElement("button",{...G(e,{propNames:rf}),...I(i,s,d),...p,type:i.type==="submit"&&o?"button":i.type,id:h,ref:t,"aria-labelledby":y,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":b.isPressed||void 0,"data-hovered":f||void 0,"data-focused":u||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},a.createElement(tf.Provider,{value:{id:m}},p.children))});function of(r){return r.isPending&&(r.onPress=void 0,r.onPressStart=void 0,r.onPressEnd=void 0,r.onPressChange=void 0,r.onPressUp=void 0,r.onKeyDown=void 0,r.onKeyUp=void 0,r.onClick=void 0,r.href=void 0),r}const Zt=a.createContext({}),Jl=a.createContext(null);class ho{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t==null?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let s of l.childNodes)t(s)};for(let l of e)t(l);let n=null,o=0;for(let[l,s]of this.keyMap)n?(n.nextKey=l,s.prevKey=n.key):(this.firstKey=l,s.prevKey=void 0),s.type==="item"&&(s.index=o++),n=s,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}}class se extends Set{constructor(e,t,n){super(e),e instanceof se?(this.anchorKey=t??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=t??null,this.currentKey=n??null)}}function lf(r,e){if(r.size!==e.size)return!1;for(let t of r)if(!e.has(t))return!1;return!0}function af(r){let{selectionMode:e="none",disallowEmptySelection:t=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=r,l=a.useRef(!1),[,s]=a.useState(!1),u=a.useRef(null),c=a.useRef(null),[,d]=a.useState(null),f=a.useMemo(()=>go(r.selectedKeys),[r.selectedKeys]),b=a.useMemo(()=>go(r.defaultSelectedKeys,new se),[r.defaultSelectedKeys]),[p,h]=Ce(f,b,r.onSelectionChange),m=a.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),[y,$]=a.useState(o);o==="replace"&&y==="toggle"&&typeof p=="object"&&p.size===0&&$("replace");let C=a.useRef(o);return a.useEffect(()=>{o!==C.current&&($(o),C.current=o)},[o]),{selectionMode:e,disallowEmptySelection:t,selectionBehavior:y,setSelectionBehavior:$,get isFocused(){return l.current},setFocused(w){l.current=w,s(w)},get focusedKey(){return u.current},get childFocusStrategy(){return c.current},setFocusedKey(w,F="first"){u.current=w,c.current=F,d(w)},selectedKeys:p,setSelectedKeys(w){(n||!lf(w,p))&&h(w)},disabledKeys:m,disabledBehavior:i}}function go(r,e){return r?r==="all"?"all":new se(r):e}class sf{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(n=>t.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&hr(this.collection,o,e)<0)&&(e=o)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&hr(this.collection,o,e)>0)&&(e=o)}var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys==="all")n=new se([t],t,t);else{let l=this.state.selectedKeys;var o;let s=(o=l.anchorKey)!==null&&o!==void 0?o:t;n=new se(l,s,t);var i;for(let u of this.getKeyRange(s,(i=l.currentKey)!==null&&i!==void 0?i:t))n.delete(u);for(let u of this.getKeyRange(t,s))this.canSelectItem(u)&&n.add(u)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),o=this.collection.getItem(t);return n&&o?hr(this.collection,n,o)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if(!((n=this.layoutDelegate)===null||n===void 0)&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let o=[],i=e;for(;i!=null;){let l=this.collection.getItem(i);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&o.push(i),i===t)return o;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type==="cell"&&this.allowsCellSelection)return e;for(;t&&t.type!=="item"&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!=="item"?null:t.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new se(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new se([t],t,t):new se;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let t=new se;for(let n of e){let o=this.getKey(n);if(o!=null&&(t.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){var o;let l=this.collection.getItem(n);(l==null?void 0:l.type)==="item"&&e.push(n);var i;l!=null&&l.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&t((i=(o=Jc(el(l,this.collection)))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new se)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||t&&(t.pointerType==="touch"||t.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(t=n.props)===null||t===void 0)&&t.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.isDisabled))}isLink(e){var t,n;return!!(!((n=this.collection.getItem(e))===null||n===void 0||(t=n.props)===null||t===void 0)&&t.href)}getItemProps(e){var t;return(t=this.collection.getItem(e))===null||t===void 0?void 0:t.props}constructor(e,t,n){this.collection=e,this.state=t;var o;this.allowsCellSelection=(o=n==null?void 0:n.allowsCellSelection)!==null&&o!==void 0?o:!1,this._isSelectAll=null,this.layoutDelegate=(n==null?void 0:n.layoutDelegate)||null}}function Ql(r){let{filter:e,layoutDelegate:t}=r,n=af(r),o=a.useMemo(()=>r.disabledKeys?new Set(r.disabledKeys):new Set,[r.disabledKeys]),i=a.useCallback(d=>e?new ho(e(d)):new ho(d),[e]),l=a.useMemo(()=>({suppressTextValueWarning:r.suppressTextValueWarning}),[r.suppressTextValueWarning]),s=Xc(r,i,l),u=a.useMemo(()=>new sf(s,n,{layoutDelegate:t}),[s,n,t]);const c=a.useRef(null);return a.useEffect(()=>{if(n.focusedKey!=null&&!s.getItem(n.focusedKey)&&c.current){const $=c.current.getItem(n.focusedKey),C=[...c.current.getKeys()].map(v=>{const R=c.current.getItem(v);return(R==null?void 0:R.type)==="item"?R:null}).filter(v=>v!==null),w=[...s.getKeys()].map(v=>{const R=s.getItem(v);return(R==null?void 0:R.type)==="item"?R:null}).filter(v=>v!==null);var d,f;const F=((d=C==null?void 0:C.length)!==null&&d!==void 0?d:0)-((f=w==null?void 0:w.length)!==null&&f!==void 0?f:0);var b,p,h;let k=Math.min(F>1?Math.max(((b=$==null?void 0:$.index)!==null&&b!==void 0?b:0)-F+1,0):(p=$==null?void 0:$.index)!==null&&p!==void 0?p:0,((h=w==null?void 0:w.length)!==null&&h!==void 0?h:0)-1),D=null,B=!1;for(;k>=0;){if(!u.isDisabled(w[k].key)){D=w[k];break}if(k<w.length-1&&!B)k++;else{B=!0;var m,y;k>((m=$==null?void 0:$.index)!==null&&m!==void 0?m:0)&&(k=(y=$==null?void 0:$.index)!==null&&y!==void 0?y:0),k--}}n.setFocusedKey(D?D.key:null)}c.current=s},[s,u,n,n.focusedKey]),{collection:s,disabledKeys:o,selectionManager:u}}function uf(r){var e;let[t,n]=Ce(r.selectedKey,(e=r.defaultSelectedKey)!==null&&e!==void 0?e:null,r.onSelectionChange),o=a.useMemo(()=>t!=null?[t]:[],[t]),{collection:i,disabledKeys:l,selectionManager:s}=Ql({...r,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{if(c==="all")return;var d;let f=(d=c.values().next().value)!==null&&d!==void 0?d:null;f===t&&r.onSelectionChange&&r.onSelectionChange(f),n(f)}}),u=t!=null?i.getItem(t):null;return{collection:i,disabledKeys:l,selectionManager:s,selectedKey:t,setSelectedKey:n,selectedItem:u}}function Yt(r){let[e,t]=Ce(r.isOpen,r.defaultOpen||!1,r.onOpenChange);const n=a.useCallback(()=>{t(!0)},[t]),o=a.useCallback(()=>{t(!1)},[t]),i=a.useCallback(()=>{t(!e)},[t,e]);return{isOpen:e,setOpen:t,open:n,close:o,toggle:i}}function cf(r){let[e,t]=Ce(r.isExpanded,r.defaultExpanded||!1,r.onExpandedChange);const n=a.useCallback(()=>{t(!0)},[t]),o=a.useCallback(()=>{t(!1)},[t]),i=a.useCallback(()=>{t(!e)},[t,e]);return{isExpanded:e,setExpanded:t,expand:n,collapse:o,toggle:i}}function df(r){let{allowsMultipleExpanded:e=!1,isDisabled:t=!1}=r,[n,o]=Ce(a.useMemo(()=>r.expandedKeys?new Set(r.expandedKeys):void 0,[r.expandedKeys]),a.useMemo(()=>r.defaultExpandedKeys?new Set(r.defaultExpandedKeys):new Set,[r.defaultExpandedKeys]),r.onExpandedChange);return a.useEffect(()=>{!e&&n.size>1&&o(new Set([n.values().next().value]))}),{allowsMultipleExpanded:e,isDisabled:t,expandedKeys:n,setExpandedKeys:o,toggleKey(i){let l;e?(l=new Set(n),l.has(i)?l.delete(i):l.add(i)):l=new Set(n.has(i)?[]:[i]),o(l)}}}function ff(r){let e=Yt(r),[t,n]=a.useState(null),[o,i]=a.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:t,...e,open(c=null){n(c),e.open()},toggle(c=null){n(c),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(c,d)=>{i(f=>d>f.length?f:[...f.slice(0,d),c])},closeSubmenu:(c,d)=>{i(f=>f[d]===c?f.slice(0,d):f)}}}function pf(r){let e=Yt(r),[t,n]=a.useState(null),o=uf({...r,onSelectionChange:u=>{r.onSelectionChange!=null&&r.onSelectionChange(u),e.close(),i.commitValidation()}}),i=Yr({...r,value:o.selectedKey}),[l,s]=a.useState(!1);return{...i,...o,...e,focusStrategy:t,open(u=null){o.collection.size!==0&&(n(u),e.open())},toggle(u=null){o.collection.size!==0&&(n(u),e.toggle())},isFocused:l,setFocused:s}}const vf=1500,mo=500;let De={},bf=0,rt=!1,pe=null,ke=null;function ea(r={}){let{delay:e=vf,closeDelay:t=mo}=r,{isOpen:n,open:o,close:i}=Yt(r),l=a.useMemo(()=>`${++bf}`,[]),s=a.useRef(null),u=a.useRef(i),c=()=>{De[l]=b},d=()=>{for(let h in De)h!==l&&(De[h](!0),delete De[h])},f=()=>{s.current&&clearTimeout(s.current),s.current=null,d(),c(),rt=!0,o(),pe&&(clearTimeout(pe),pe=null),ke&&(clearTimeout(ke),ke=null)},b=h=>{h||t<=0?(s.current&&clearTimeout(s.current),s.current=null,u.current()):s.current||(s.current=setTimeout(()=>{s.current=null,u.current()},t)),pe&&(clearTimeout(pe),pe=null),rt&&(ke&&clearTimeout(ke),ke=setTimeout(()=>{delete De[l],ke=null,rt=!1},Math.max(mo,t)))},p=()=>{d(),c(),!n&&!pe&&!rt?pe=setTimeout(()=>{pe=null,rt=!0,f()},e):n||f()};return a.useEffect(()=>{u.current=i},[i]),a.useEffect(()=>()=>{s.current&&clearTimeout(s.current),De[l]&&delete De[l]},[l]),{isOpen:n,open:h=>{!h&&e>0&&!s.current?p():f()},close:b}}const ta=a.createContext(null),Nr=a.createContext({});let hf=r=>{let{onHoverStart:e,onHoverChange:t,onHoverEnd:n,...o}=r;return o};const gf=Wl(function(e,t){[e,t]=re(e,t,Nr);let{hoverProps:n,isHovered:o}=Ne(e),{isFocused:i,isFocusVisible:l,focusProps:s}=we({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",c=J({...e,values:{isHovered:o,isFocused:i,isFocusVisible:l,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return a.createElement("input",{...I(hf(e),s,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":o||void 0,"data-focus-visible":l||void 0,"data-invalid":u||void 0})}),mf=a.createContext({}),yf=a.createContext(null),$f=a.forwardRef(function(e,t){[e,t]=re(e,t,yf);let{validationBehavior:n}=qt(ta)||{};var o,i;let l=(i=(o=e.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",s=a.useRef(null),[u,c]=re({},s,Nr),[d,f]=rn(),[b,p]=a.useState("input"),{labelProps:h,inputProps:m,descriptionProps:y,errorMessageProps:$,...C}=fc({...Hl(e),inputElementType:b,label:f,validationBehavior:l},c),w=a.useCallback(D=>{c.current=D,D&&p(D instanceof HTMLTextAreaElement?"textarea":"input")},[c]),F=J({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:C.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),k=G(e);return delete k.id,a.createElement("div",{...k,...F,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":C.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},a.createElement(ze,{values:[[Xl,{...h,ref:d}],[Nr,{...I(m,u),ref:w}],[mf,{...m,ref:w}],[Zt,{slots:{description:y,errorMessage:$}}],[Jl,C]]},F.children))}),xf=a.createContext(null),Pf=a.createContext(null),Sf={CollectionRoot({collection:r,renderDropIndicator:e}){return yo(r,null,e)},CollectionBranch({collection:r,parent:e,renderDropIndicator:t}){return yo(r,e,t)}};function yo(r,e,t){return jl({items:e?r.getChildren(e.key):r,dependencies:[t],children(n){var o;let i=n.render(n);if(!t||n.type!=="item")return i;let l=n.key,s=r.getKeyAfter(l);return a.createElement(a.Fragment,null,t({type:"item",key:l,dropPosition:"before"}),i,(s==null||((o=r.getItem(s))===null||o===void 0?void 0:o.type)!=="item")&&t({type:"item",key:l,dropPosition:"after"}))}})}const an=a.createContext(Sf);var ra={};ra={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var na={};na={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var oa={};oa={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var ia={};ia={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var la={};la={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var aa={};aa={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var sa={};sa={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var ua={};ua={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var ca={};ca={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var da={};da={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var fa={};fa={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var pa={};pa={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var va={};va={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var ba={};ba={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var ha={};ha={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var ga={};ga={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var ma={};ma={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var ya={};ya={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var $a={};$a={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var xa={};xa={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var Pa={};Pa={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var Sa={};Sa={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var Ca={};Ca={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var wa={};wa={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var Ea={};Ea={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var Ta={};Ta={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var Da={};Da={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var ka={};ka={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var Ra={};Ra={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var Ka={};Ka={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var Fa={};Fa={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var Ma={};Ma={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var La={};La={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var Aa={};Aa={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var Ia={};Ia={"ar-AE":ra,"bg-BG":na,"cs-CZ":oa,"da-DK":ia,"de-DE":la,"el-GR":aa,"en-US":sa,"es-ES":ua,"et-EE":ca,"fi-FI":da,"fr-FR":fa,"he-IL":pa,"hr-HR":va,"hu-HU":ba,"it-IT":ha,"ja-JP":ga,"ko-KR":ma,"lt-LT":ya,"lv-LV":$a,"nb-NO":xa,"nl-NL":Pa,"pl-PL":Sa,"pt-BR":Ca,"pt-PT":wa,"ro-RO":Ea,"ru-RU":Ta,"sk-SK":Da,"sl-SI":ka,"sr-SP":Ra,"sv-SE":Ka,"tr-TR":Fa,"uk-UA":Ma,"zh-CN":La,"zh-TW":Aa};const Xt=a.createContext({}),Ba=a.createContext(null),Cf=a.forwardRef(function(e,t){let{render:n}=a.useContext(Ba);return a.createElement(a.Fragment,null,n(e,t))});function Na(r,e){var t;let n=r==null?void 0:r.renderDropIndicator,o=r==null||(t=r.isVirtualDragging)===null||t===void 0?void 0:t.call(r),i=a.useCallback(l=>{if(o||e!=null&&e.isDropTarget(l))return n?n(l):a.createElement(Cf,{target:l})},[e==null?void 0:e.target,o,n]);return r!=null&&r.useDropIndicator?i:void 0}function wf(r,e,t){var n,o;let i=r.focusedKey,l=null;if(!(e==null||(n=e.isVirtualDragging)===null||n===void 0)&&n.call(e)&&(t==null||(o=t.target)===null||o===void 0?void 0:o.type)==="item"){l=t.target.key;var s;t.target.dropPosition==="after"&&(l=(s=t.collection.getKeyAfter(l))!==null&&s!==void 0?s:l)}return a.useMemo(()=>new Set([i,l].filter(u=>u!=null)),[i,l])}const Oa=a.createContext({}),Ef=ql("header",function(e,t){return[e,t]=re(e,t,Oa),a.createElement("header",{className:"react-aria-Header",...e,ref:t},e.children)}),Tf=a.createContext({}),sn=a.createContext(null),bt=a.createContext(null),Df=a.forwardRef(function(e,t){[e,t]=re(e,t,sn);let n=a.useContext(bt);return n?a.createElement(za,{state:n,props:e,listBoxRef:t}):a.createElement(Ul,{content:a.createElement(Yl,e)},o=>a.createElement(kf,{props:e,listBoxRef:t,collection:o}))});function kf({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:n}=a.useContext(an),{filterFn:o,collectionProps:i,collectionRef:l}=a.useContext(xf)||{};e=ne(a.useMemo(()=>ko(e,l!==void 0?l:null),[l,e]));let s=a.useMemo(()=>o?t.filter(o):t,[t,o]),u=Ql({...r,collection:s,layoutDelegate:n});return a.createElement(za,{state:u,props:{...r,...i},listBoxRef:e})}function za({state:r,props:e,listBoxRef:t}){let{dragAndDropHooks:n,layout:o="stack",orientation:i="vertical"}=e,{collection:l,selectionManager:s}=r,u=!!(n!=null&&n.useDraggableCollectionState),c=!!(n!=null&&n.useDroppableCollectionState),{direction:d}=Oe(),{disabledBehavior:f,disabledKeys:b}=s,p=Zr({usage:"search",sensitivity:"base"}),{isVirtualized:h,layoutDelegate:m,dropTargetDelegate:y,CollectionRoot:$}=a.useContext(an),C=a.useMemo(()=>e.keyboardDelegate||new tn({collection:l,collator:p,ref:t,disabledKeys:b,disabledBehavior:f,layout:o,orientation:i,direction:d,layoutDelegate:m}),[l,p,t,f,b,i,d,e.keyboardDelegate,o,m]),{listBoxProps:w}=qc({...e,shouldSelectOnPressUp:u||e.shouldSelectOnPressUp,keyboardDelegate:C,isVirtualized:h},r,t),F=a.useRef(u),k=a.useRef(c);a.useEffect(()=>{F.current!==u&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),k.current!==c&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.")},[u,c]);let D,B,v,R=!1,K=null,E=a.useRef(null);if(u&&n){D=n.useDraggableCollectionState({collection:l,selectionManager:s,preview:n.renderDragPreview?E:void 0}),n.useDraggableCollection({},D,t);let T=n.DragPreview;K=n.renderDragPreview?a.createElement(T,{ref:E},n.renderDragPreview):null}if(c&&n){B=n.useDroppableCollectionState({collection:l,selectionManager:s});let T=n.dropTargetDelegate||y||new n.ListDropTargetDelegate(l,t,{orientation:i,layout:o,direction:d});v=n.useDroppableCollection({keyboardDelegate:C,dropTargetDelegate:T},B,t),R=B.isDropTarget({type:"root"})}let{focusProps:L,isFocused:g,isFocusVisible:P}=we(),M={isDropTarget:R,isEmpty:r.collection.size===0,isFocused:g,isFocusVisible:P,layout:e.layout||"stack",state:r},N=J({className:e.className,style:e.style,defaultClassName:"react-aria-ListBox",values:M}),O=null;return r.collection.size===0&&e.renderEmptyState&&(O=a.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(M))),a.createElement(ei,null,a.createElement("div",{...G(e),...I(w,L,v==null?void 0:v.collectionProps),...N,ref:t,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":R||void 0,"data-empty":r.collection.size===0||void 0,"data-focused":g||void 0,"data-focus-visible":P||void 0,"data-layout":e.layout||"stack","data-orientation":e.orientation||"vertical"},a.createElement(ze,{values:[[sn,e],[bt,r],[Xt,{dragAndDropHooks:n,dragState:D,dropState:B}],[Tf,{elementType:"div"}],[Ba,{render:Ff}],[Pf,{name:"ListBoxSection",render:Ha}]]},a.createElement($,{collection:l,scrollRef:t,persistedKeys:wf(s,n,B),renderDropIndicator:Na(n,B)})),O,K))}function Ha(r,e,t,n="react-aria-ListBoxSection"){let o=a.useContext(bt),{dragAndDropHooks:i,dropState:l}=a.useContext(Xt),{CollectionBranch:s}=a.useContext(an),[u,c]=rn();var d;let{headingProps:f,groupProps:b}=rd({heading:c,"aria-label":(d=r["aria-label"])!==null&&d!==void 0?d:void 0}),p=J({defaultClassName:n,className:r.className,style:r.style,values:{}});return a.createElement("section",{...G(r),...b,...p,ref:e},a.createElement(Oa.Provider,{value:{...f,ref:u}},a.createElement(s,{collection:o.collection,parent:t,renderDropIndicator:Na(i,l)})))}const Rf=Qd("section",Ha),Kf=ql("item",function(e,t,n){let o=ne(t),i=a.useContext(bt),{dragAndDropHooks:l,dragState:s,dropState:u}=a.useContext(Xt),{optionProps:c,labelProps:d,descriptionProps:f,...b}=td({key:n.key,"aria-label":e==null?void 0:e["aria-label"]},i,o),{hoverProps:p,isHovered:h}=Ne({isDisabled:!b.allowsSelection&&!b.hasAction,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),m=null;s&&l&&(m=l.useDraggableItem({key:n.key},s));let y=null;u&&l&&(y=l.useDroppableItem({target:{type:"item",key:n.key,dropPosition:"on"}},u,o));let $=s&&s.isDragging(n.key),C=J({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...b,isHovered:h,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:$,isDropTarget:y==null?void 0:y.isDropTarget}});a.useEffect(()=>{n.textValue||console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.")},[n.textValue]);let w=e.href?"a":"div";return a.createElement(w,{...I(c,p,m==null?void 0:m.dragProps,y==null?void 0:y.dropProps),...C,ref:o,"data-allows-dragging":!!s||void 0,"data-selected":b.isSelected||void 0,"data-disabled":b.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-dragging":$||void 0,"data-drop-target":(y==null?void 0:y.isDropTarget)||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},a.createElement(ze,{values:[[Zt,{slots:{label:d,description:f}}]]},C.children))});function Ff(r,e){e=ne(e);let{dragAndDropHooks:t,dropState:n}=a.useContext(Xt),{dropIndicatorProps:o,isHidden:i,isDropTarget:l}=t.useDropIndicator(r,n,e);return i?null:a.createElement(Lf,{...r,dropIndicatorProps:o,isDropTarget:l,ref:e})}function Mf(r,e){let{dropIndicatorProps:t,isDropTarget:n,...o}=r,i=J({...o,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:n}});return a.createElement("div",{...t,...i,role:"option",ref:e,"data-drop-target":n||void 0})}const Lf=a.forwardRef(Mf),Va=a.createContext({placement:"bottom"}),un=a.createContext(null),ja=a.forwardRef(function(e,t){[e,t]=re(e,t,un);let n=a.useContext(Jt),o=Yt(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?o:n,l=zo(t,i.isOpen)||e.isExiting||!1;if(Wd()){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,u)}return i&&!i.isOpen&&!l?null:a.createElement(Af,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:l})});function Af({state:r,isExiting:e,UNSTABLE_portalContainer:t,...n}){let o=a.useRef(null),[i,l]=a.useState(0);z(()=>{o.current&&r.isOpen&&l(o.current.getBoundingClientRect().width)},[r.isOpen,o]);var s;let{popoverProps:u,underlayProps:c,arrowProps:d,placement:f}=Ic({...n,offset:(s=n.offset)!==null&&s!==void 0?s:8,arrowSize:i},r),b=n.popoverRef,p=Oo(b,!!f)||n.isEntering||!1,h=J({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:f,isEntering:p,isExiting:e}}),m={...u.style,...h.style};return a.createElement(Oc,{...n,isExiting:e,portalContainer:t},!n.isNonModal&&r.isOpen&&a.createElement("div",{"data-testid":"underlay",...c,style:{position:"fixed",inset:0}}),a.createElement("div",{...I(G(n),u),...h,ref:b,slot:n.slot||void 0,style:m,"data-trigger":n.trigger,"data-placement":f,"data-entering":p||void 0,"data-exiting":e||void 0},!n.isNonModal&&a.createElement(oo,{onDismiss:r.close}),a.createElement(Va.Provider,{value:{...d,placement:f,ref:o}},h.children),a.createElement(oo,{onDismiss:r.close})))}const If=a.createContext(null),Wa=a.createContext(null),Jt=a.createContext(null);function Bf(r){let e=ff(r),t=a.useRef(null),{triggerProps:n,overlayProps:o}=hi({type:"dialog"},e,t);return n.id=Y(),o["aria-labelledby"]=n.id,a.createElement(ze,{values:[[Jt,e],[If,e],[Wa,o],[un,{trigger:"DialogTrigger",triggerRef:t}]]},a.createElement(uu,{...n,ref:t,isPressed:e.isOpen},r.children))}const Nf=a.forwardRef(function(e,t){let n=e["aria-labelledby"];[e,t]=re(e,t,Wa);let{dialogProps:o,titleProps:i}=id({...e,"aria-labelledby":n},t),l=a.useContext(Jt);!o["aria-label"]&&!o["aria-labelledby"]&&(e["aria-labelledby"]?o["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let s=J({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}});return a.createElement("section",{...G(e),...o,...s,ref:t,slot:e.slot||void 0},a.createElement(ze,{values:[[zd,{slots:{[Nt]:{},title:{...i,level:2}}}],[ln,{slots:{[Nt]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},s.children))});function Of(r){return r&&r.__esModule?r.default:r}const cn=a.createContext(null),dn=a.createContext(null),zf=a.forwardRef(function(e,t){[e,t]=re(e,t,cn);let{children:n,isDisabled:o=!1,isInvalid:i=!1,isRequired:l=!1}=e,s=a.useMemo(()=>typeof n=="function"?n({isOpen:!1,isDisabled:o,isInvalid:i,isRequired:l,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):n,[n,o,i,l]);return a.createElement(Ul,{content:s},u=>a.createElement(Hf,{props:e,collection:u,selectRef:t}))});function Hf({props:r,selectRef:e,collection:t}){let{validationBehavior:n}=qt(ta)||{};var o,i;let l=(i=(o=r.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",s=pf({...r,collection:t,children:void 0,validationBehavior:l}),{isFocusVisible:u,focusProps:c}=we({within:!0}),d=a.useRef(null),[f,b]=rn(),{labelProps:p,triggerProps:h,valueProps:m,menuProps:y,descriptionProps:$,errorMessageProps:C,...w}=sd({...Hl(r),label:b,validationBehavior:l},s,d),[F,k]=a.useState(null),D=a.useCallback(()=>{d.current&&k(d.current.offsetWidth+"px")},[d]);$r({ref:d,onResize:D});let B=a.useMemo(()=>({isOpen:s.isOpen,isFocused:s.isFocused,isFocusVisible:u,isDisabled:r.isDisabled||!1,isInvalid:w.isInvalid||!1,isRequired:r.isRequired||!1}),[s.isOpen,s.isFocused,u,r.isDisabled,w.isInvalid,r.isRequired]),v=J({...r,values:B,defaultClassName:"react-aria-Select"}),R=G(r);delete R.id;let K=a.useRef(null);return a.createElement(ze,{values:[[cn,r],[dn,s],[_a,m],[Xl,{...p,ref:f,elementType:"span"}],[ln,{...h,ref:d,isPressed:s.isOpen}],[Jt,s],[un,{trigger:"Select",triggerRef:d,scrollRef:K,placement:"bottom start",style:{"--trigger-width":F}}],[sn,{...y,ref:K}],[bt,s],[Zt,{slots:{description:$,errorMessage:C}}],[Jl,w]]},a.createElement("div",{...R,...v,...c,ref:e,slot:r.slot||void 0,"data-focused":s.isFocused||void 0,"data-focus-visible":u||void 0,"data-open":s.isOpen||void 0,"data-disabled":r.isDisabled||void 0,"data-invalid":w.isInvalid||void 0,"data-required":r.isRequired||void 0}),a.createElement(cd,{autoComplete:r.autoComplete,state:s,triggerRef:d,label:b,name:r.name,isDisabled:r.isDisabled}))}const _a=a.createContext(null),Vf=a.forwardRef(function(e,t){var n,o;[e,t]=re(e,t,_a);let i=a.useContext(dn),{placeholder:l}=qt(cn),s=i.selectedKey!=null?i.collection.getItem(i.selectedKey):null,u=s==null?void 0:s.props.children;typeof u=="function"&&(u=u({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let c=qr(Of(Ia),"react-aria-components");var d,f,b;let p=J({...e,defaultChildren:(d=u??l)!==null&&d!==void 0?d:c.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(f=(n=i.selectedItem)===null||n===void 0?void 0:n.value)!==null&&f!==void 0?f:null,selectedText:(b=(o=i.selectedItem)===null||o===void 0?void 0:o.textValue)!==null&&b!==void 0?b:null,isPlaceholder:!s}}),h=G(e);return a.createElement("span",{ref:t,...h,...p,"data-placeholder":!s||void 0},a.createElement(Zt.Provider,{value:void 0},p.children))}),jf=a.createContext({}),Ua=a.createContext(null),Wf=a.forwardRef(function(e,t){[e,t]=re(e,t,jf);let n=dc(e),{groupProps:o}=ec(e,n,t),i=J({...e,values:{isDisabled:n.isDisabled,state:n},defaultClassName:"react-aria-ToggleButtonGroup"});return a.createElement("div",{...o,...i,ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},a.createElement(Ua.Provider,{value:n},i.children))}),_f=a.createContext({}),Uf=a.forwardRef(function(e,t){[e,t]=re(e,t,_f);let n=a.useContext(Ua),o=ci(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(m){n.setSelected(e.id,m)}}:e),{buttonProps:i,isPressed:l,isSelected:s,isDisabled:u}=n&&e.id!=null?tc({...e,id:e.id},n,t):li({...e,id:e.id!=null?String(e.id):void 0},o,t),{focusProps:c,isFocused:d,isFocusVisible:f}=we(e),{hoverProps:b,isHovered:p}=Ne(e),h=J({...e,id:void 0,values:{isHovered:p,isPressed:l,isFocused:d,isSelected:o.isSelected,isFocusVisible:f,isDisabled:u,state:o},defaultClassName:"react-aria-ToggleButton"});return a.createElement("button",{...I(i,c,b),...h,ref:t,slot:e.slot||void 0,"data-focused":d||void 0,"data-disabled":u||void 0,"data-pressed":l||void 0,"data-selected":s||void 0,"data-hovered":p||void 0,"data-focus-visible":f||void 0})}),fn=a.createContext(null),Ga=a.createContext(null);function Gf(r){let e=ea(r),t=a.useRef(null),{triggerProps:n,tooltipProps:o}=fd(r,e,t);return a.createElement(ze,{values:[[fn,e],[Ga,{...o,triggerRef:t}]]},a.createElement(Lu,{...n,ref:t},r.children))}const qf=a.forwardRef(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=re(t,n,Ga);let o=a.useContext(fn),i=ea(t),l=t.isOpen!=null||t.defaultOpen!=null||!o?i:o,s=zo(n,l.isOpen)||t.isExiting||!1;return!l.isOpen&&!s?null:a.createElement(Mc,{portalContainer:e},a.createElement(Zf,{...t,tooltipRef:n,isExiting:s}))});function Zf(r){let e=a.useContext(fn),t=a.useRef(null),[n,o]=a.useState(0);z(()=>{t.current&&e.isOpen&&o(t.current.getBoundingClientRect().width)},[e.isOpen,t]);let{overlayProps:i,arrowProps:l,placement:s}=bi({placement:r.placement||"top",targetRef:r.triggerRef,overlayRef:r.tooltipRef,offset:r.offset,crossOffset:r.crossOffset,isOpen:e.isOpen,arrowSize:n,arrowBoundaryOffset:r.arrowBoundaryOffset,shouldFlip:r.shouldFlip,onClose:()=>e.close(!0)}),u=Oo(r.tooltipRef,!!s)||r.isEntering||!1,c=J({...r,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:u,isExiting:r.isExiting,state:e}});r=I(r,i);let{tooltipProps:d}=dd(r,e);return a.createElement("div",{...d,ref:r.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":s??void 0,"data-entering":u||void 0,"data-exiting":r.isExiting||void 0},a.createElement(Va.Provider,{value:{...l,placement:s,ref:t}},c.children))}const qa=S.defineRecipe({className:"nimbus-tooltip",base:{color:"white",textStyle:"xs",fontWeight:"400",background:"slate.12",display:"inline-flex",alignItems:"center",borderRadius:"100",paddingX:"300",paddingY:"100",margin:"100",maxW:"6400",boxShadow:"1"}}),{withContext:Yf}=S.createRecipeContext({recipe:qa}),Xf=Yf("div"),Za=a.forwardRef(function({children:e,placement:t="bottom",...n},o){return x.jsx(Xf,{ref:o,asChild:!0,...n,children:x.jsx(qf,{placement:t,...n,children:e})})});Za.displayName="Tooltip";const Ya=Gf;Ya.displayName="TooltipTrigger";const Xa=a.forwardRef(function(e,t){const n=a.useRef(null),o=ne(S.mergeRefs(n,t)),{focusableProps:i}=qe(e,o);if(a.isValidElement(e.children))return a.cloneElement(e.children,I(i,e.children.props,{ref:o}))});Xa.displayName="MakeElementFocusable";function Jf(r){return x.jsx(Co.ThemeProvider,{attribute:"class",disableTransitionOnChange:!0,...r})}function pn(){const{resolvedTheme:r,setTheme:e}=Co.useTheme();return{colorMode:r,setColorMode:e,toggleColorMode:()=>{e(r==="light"?"dark":"light")}}}function Qf(r,e){const{colorMode:t}=pn();return t==="light"?r:e}function ep(){const{colorMode:r}=pn();return r==="light"?"Light Theme":"DarkTheme"}const tp=S.defineAnimationStyles({"slide-fade-in":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-from-bottom, fade-in"},"&[data-placement^=bottom]":{animationName:"slide-from-top, fade-in"},"&[data-placement^=left]":{animationName:"slide-from-right, fade-in"},"&[data-placement^=right]":{animationName:"slide-from-left, fade-in"}}},"slide-fade-out":{value:{transformOrigin:"var(--transform-origin)","&[data-placement^=top]":{animationName:"slide-to-bottom, fade-out"},"&[data-placement^=bottom]":{animationName:"slide-to-top, fade-out"},"&[data-placement^=left]":{animationName:"slide-to-right, fade-out"},"&[data-placement^=right]":{animationName:"slide-to-left, fade-out"}}},"scale-fade-in":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-in, fade-in"}},"scale-fade-out":{value:{transformOrigin:"var(--transform-origin)",animationName:"scale-out, fade-out"}}});function rp(r){var t;const e={};for(const n in r)(t=r[n])!=null&&t.value?e[n]=r[n].value:e[n]=r[n];return e}const np=rp(W.themeTokens.breakpoints),op=S.defineGlobalStyles({"*":{fontFeatureSettings:'"liga", "calt", "case", "ss01", "ss07", "ss08", "tnum"',"--ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--ring-offset-width":"0px","--ring-offset-color":"#fff","--ring-color":"rgba(66, 153, 225, 0.6)","--ring-offset-shadow":"0 0 #0000","--ring-shadow":"0 0 #0000","--focus-ring-color":"colors.primary.7","--brightness":"var(--chakra-empty,/*!*/ /*!*/)","--contrast":"var(--chakra-empty,/*!*/ /*!*/)","--grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--invert":"var(--chakra-empty,/*!*/ /*!*/)","--saturate":"var(--chakra-empty,/*!*/ /*!*/)","--sepia":"var(--chakra-empty,/*!*/ /*!*/)","--drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--global-font-mono":"fonts.mono","--global-font-body":"fonts.body","--global-color-border":"colors.border"},"code *":{fontFeatureSettings:'"calt", "case", "ss01", "ss07", "ss08", "tnum"'},html:{color:"fg",bg:"bg",lineHeight:"1.5",colorPalette:"neutral"},"*::placeholder":{color:"fg.muted/80"},"*::selection":{bg:"colorPalette.9",color:"colorPalette.contrast"}}),ip={spin:{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},pulse:{"50%":{opacity:"0.5"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}},"fade-in":{from:{opacity:0},to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:"-100% 0"},to:{translate:"0 0"}},"slide-from-right-full":{from:{translate:"100% 0"},to:{translate:"0 0"}},"slide-from-top-full":{from:{translate:"0 -100%"},to:{translate:"0 0"}},"slide-from-bottom-full":{from:{translate:"0 100%"},to:{translate:"0 0"}},"slide-to-left-full":{from:{translate:"0 0"},to:{translate:"-100% 0"}},"slide-to-right-full":{from:{translate:"0 0"},to:{translate:"100% 0"}},"slide-to-top-full":{from:{translate:"0 0"},to:{translate:"0 -100%"}},"slide-to-bottom-full":{from:{translate:"0 0"},to:{translate:"0 100%"}},"slide-from-top":{"0%":{translate:"0 -0.5rem"},to:{translate:"0"}},"slide-from-bottom":{"0%":{translate:"0 0.5rem"},to:{translate:"0"}},"slide-from-left":{"0%":{translate:"-0.5rem 0"},to:{translate:"0"}},"slide-from-right":{"0%":{translate:"0.5rem 0"},to:{translate:"0"}},"slide-to-top":{"0%":{translate:"0"},to:{translate:"0 -0.5rem"}},"slide-to-bottom":{"0%":{translate:"0"},to:{translate:"0 0.5rem"}},"slide-to-left":{"0%":{translate:"0"},to:{translate:"-0.5rem 0"}},"slide-to-right":{"0%":{translate:"0"},to:{translate:"0.5rem 0"}},"scale-in":{from:{scale:"0.95"},to:{scale:"1"}},"scale-out":{from:{scale:"1"},to:{scale:"0.95"}}},lp=S.defineLayerStyles({disabled:{value:{opacity:"0.5",cursor:"not-allowed"}}}),ap=S.defineRecipe({className:"nimbus-code",base:{fontFamily:"mono",alignItems:"center",display:"inline-flex",borderRadius:"100"},variants:{variant:{solid:{bg:"colorPalette.4",color:"colorPalette.11"},subtle:{bg:"colorPalette.3",color:"colorPalette.11"},outline:{color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},surface:{bg:"colorPalette.subtle",color:"colorPalette.fg",shadow:"inset 0 0 0px 1px var(--shadow-color)",shadowColor:"colorPalette.muted"},plain:{color:"colorPalette.fg"}},size:{xs:{textStyle:"2xs",px:"100",minH:"400"},sm:{textStyle:"xs",px:"150",minH:"500"},md:{textStyle:"sm",px:"200",minH:"600"},lg:{textStyle:"sm",px:"250",minH:"700"}}},defaultVariants:{variant:"solid",size:"md"}}),sp=S.defineRecipe({className:"nimbus-heading",base:{fontFamily:"heading",fontWeight:"600"},variants:{size:{xs:{textStyle:"xs"},sm:{textStyle:"sm"},md:{textStyle:"md"},lg:{textStyle:"lg"},xl:{textStyle:"xl"},"2xl":{textStyle:"2xl"},"3xl":{textStyle:"3xl"},"4xl":{textStyle:"4xl"},"5xl":{textStyle:"5xl"},"6xl":{textStyle:"6xl"},"7xl":{textStyle:"7xl"}}},defaultVariants:{size:"xl"}}),up=S.defineRecipe({className:"nimbus-kbd",base:{display:"inline-flex",alignItems:"center",fontWeight:"medium",fontFamily:"mono",flexShrink:"0",whiteSpace:"nowrap",wordSpacing:"-0.5em",userSelect:"none",px:"100",borderRadius:"100"},variants:{variant:{raised:{bg:"colorPalette.subtle",color:"colorPalette.fg",borderWidth:"1px",borderBottomWidth:"2px",borderColor:"colorPalette.muted"},outline:{borderWidth:"1px",color:"colorPalette.fg"},subtle:{bg:"colorPalette.muted",color:"colorPalette.fg"},plain:{color:"colorPalette.fg"}},size:{sm:{textStyle:"xs",height:"450"},md:{textStyle:"sm",height:"500"},lg:{textStyle:"md",height:"600"}}},defaultVariants:{size:"md",variant:"raised"}}),vn=S.defineRecipe({className:"nimbus-text-input",base:{display:"block",borderRadius:"200",colorPalette:"neutral",focusVisibleRing:"outside",bg:"transparent",outline:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)",_placeholder:{opacity:.5,color:"currentColor"},_disabled:{layerStyle:"disabled"},"&[data-invalid='true']":{"--border-color":"colors.critical.7",color:"critical.11"}},variants:{size:{sm:{h:800,textStyle:"sm",px:300},md:{h:1e3,textStyle:"md",px:400}},variant:{solid:{"--border-width":"sizes.25","--border-color":"colors.neutral.7",backgroundColor:"neutral.1",_hover:{backgroundColor:"primary.2"}},ghost:{_hover:{backgroundColor:"primary.2"}}}},defaultVariants:{size:"md",variant:"solid"}}),cp={avatar:wo,button:Re,code:ap,heading:sp,kbd:up,link:Bl,tooltip:qa,textInput:vn},dp=S.defineSemanticTokens.colors({bg:{DEFAULT:{value:{_light:"{colors.neutral.1}",_dark:"{colors.neutral.1}"}}},fg:{DEFAULT:{value:{_light:"{colors.neutral.12}",_dark:"{colors.neutral.12}"}}},border:{DEFAULT:{value:"{colors.neutral.6}"},muted:{value:"{colors.neutral.7}"},subtle:{value:"{colors.neutral.6}"},emphasized:{value:"{colors.neutral.8}"},inverted:{value:"{colors.neutral.9}"},critical:{value:"{colors.critical.8}"},warning:{value:"{colors.warning.8}"},positive:{value:"{colors.positive.8}"},info:{value:"{colors.ingo.8}"}},...W.themeTokens.color["system-palettes"],...W.themeTokens.color["brand-palettes"],...W.themeTokens.color["semantic-palettes"]}),fp=S.defineSemanticTokens.shadows(W.themeTokens.shadow),pp=S.defineSemanticTokens.radii({}),vp={colors:dp,shadows:fp,radii:pp},bp=S.defineSlotRecipe({slots:["trigger","backdrop","positioner","content","title","description","closeTrigger","header","body","footer","backdrop"],className:"nimbus-dialog",base:{backdrop:{bg:{_dark:"bg/50",_light:"fg/50"},pos:"fixed",left:0,top:0,w:"100vw",h:"100dvh",zIndex:"modal",_open:{animationName:"fade-in",animationDuration:"slow"},_closed:{animationName:"fade-out",animationDuration:"moderate"}},positioner:{display:"flex",width:"100vw",height:"100dvh",position:"fixed",left:0,top:0,"--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",justifyContent:"center",overscrollBehaviorY:"none"},content:{display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,borderRadius:"200",textStyle:"sm",my:"var(--dialog-margin, var(--dialog-base-margin))","--dialog-z-index":"zIndex.modal",zIndex:"calc(var(--dialog-z-index) + var(--layer-index, 0))",bg:"bg",boxShadow:"lg",_open:{animationDuration:"moderate"},_closed:{animationDuration:"faster"}},header:{flex:0,px:"600",pt:"600",pb:"400"},body:{flex:"1",px:"600",pt:"200",pb:"600"},footer:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"300",px:"600",pt:"200",pb:"400"},title:{textStyle:"lg",fontWeight:"semibold"},description:{color:"fg.muted"}},variants:{placement:{center:{positioner:{alignItems:"center"},content:{"--dialog-base-margin":"auto",mx:"auto"}},top:{positioner:{alignItems:"flex-start"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}},bottom:{positioner:{alignItems:"flex-end"},content:{"--dialog-base-margin":"spacing.1600",mx:"auto"}}},scrollBehavior:{inside:{positioner:{overflow:"hidden"},content:{maxH:"calc(100% - 7.5rem)"},body:{overflow:"auto"}},outside:{positioner:{overflow:"auto",pointerEvents:"auto"}}},size:{xs:{content:{maxW:"sm"}},sm:{content:{maxW:"md"}},md:{content:{maxW:"lg"}},lg:{content:{maxW:"2xl"}},xl:{content:{maxW:"4xl"}},cover:{positioner:{padding:"1000"},content:{width:"100%",height:"100%","--dialog-margin":"0"}},full:{content:{maxW:"100vw",minH:"100vh","--dialog-margin":"0",borderRadius:"0"}}},motionPreset:{scale:{content:{_open:{animationName:"scale-in, fade-in"},_closed:{animationName:"scale-out, fade-out"}}},"slide-in-bottom":{content:{_open:{animationName:"slide-from-bottom, fade-in"},_closed:{animationName:"slide-to-bottom, fade-out"}}},"slide-in-top":{content:{_open:{animationName:"slide-from-top, fade-in"},_closed:{animationName:"slide-to-top, fade-out"}}},"slide-in-left":{content:{_open:{animationName:"slide-from-left, fade-in"},_closed:{animationName:"slide-to-left, fade-out"}}},"slide-in-right":{content:{_open:{animationName:"slide-from-right, fade-in"},_closed:{animationName:"slide-to-right, fade-out"}}},none:{}}},defaultVariants:{size:"md",scrollBehavior:"outside",placement:"top",motionPreset:"scale"}}),hp=S.defineSlotRecipe({className:"chakra-list",slots:["root","item","indicator"],base:{root:{display:"flex",flexDirection:"column",gap:"var(--list-gap)","& :where(ul, ol)":{marginTop:"var(--list-gap)"}},item:{whiteSpace:"normal",display:"list-item"},indicator:{marginEnd:"200",minHeight:"1lh",flexShrink:0,display:"inline-block",verticalAlign:"middle"}},variants:{variant:{marker:{root:{listStyle:"revert",listStylePosition:"inside"},item:{_marker:{color:"fg.subtle"}}},plain:{item:{alignItems:"flex-start",display:"inline-flex"}}},align:{center:{item:{alignItems:"center"}},start:{item:{alignItems:"flex-start"}},end:{item:{alignItems:"flex-end"}}}},defaultVariants:{variant:"marker"}}),gp=S.defineSlotRecipe({className:"chakra-table",slots:["root","header","body","row","columnHeader","cell","footer","caption"],base:{root:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full",textAlign:"start",verticalAlign:"top"},row:{_selected:{bg:"colorPalette.subtle"}},cell:{textAlign:"start",alignItems:"center"},columnHeader:{fontWeight:"medium",textAlign:"start",color:"fg"},caption:{fontWeight:"medium",textStyle:"xs"},footer:{fontWeight:"medium"}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:"colorPalette.subtle"}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:"var(--table-sticky-offset, 0)",position:"sticky",zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:"bg.muted"}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:"1px"}}}},variant:{line:{columnHeader:{borderBottomWidth:"1px"},cell:{borderBottomWidth:"1px"},row:{bg:"bg"}},outline:{root:{boxShadow:"0 0 0 1px {colors.border}",overflow:"hidden"},columnHeader:{borderBottomWidth:"1px"},header:{bg:"bg.muted"},row:{"&:not(:last-of-type)":{borderBottomWidth:"1px"}},footer:{borderTopWidth:"1px"}}},size:{sm:{root:{textStyle:"sm"},columnHeader:{px:"200",py:"200"},cell:{px:"200",py:"200"}},md:{root:{textStyle:"sm"},columnHeader:{px:"300",py:"300"},cell:{px:"300",py:"300"}},lg:{root:{textStyle:"md"},columnHeader:{px:"400",py:"300"},cell:{px:"400",py:"300"}}}},defaultVariants:{variant:"line",size:"md"}}),mp=S.defineSlotRecipe({slots:["root","label","indicator"],className:"nimbus-checkbox",base:{root:{colorPalette:"primary",display:"inline-flex",gap:"200",alignItems:"center",verticalAlign:"top",minWidth:"600",minHeight:"600","&[data-disabled='true']":{layerStyle:"disabled"}},label:{flexShrink:0,userSelect:"none",color:"neutral.11","&[data-invalid='true']":{color:"critical.11"}},indicator:{position:"relative",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center",border:"solid-50",borderRadius:"50",focusRing:"outside",borderColor:"neutral.9",bg:"transparent",color:"neutral.11",_icon:{w:"350",h:"350"},"&:hover":{borderColor:"neutral.10"},"&[data-invalid='true']":{bg:"transparent",borderColor:"critical.9",color:"critical.11","&:hover":{borderColor:"critical.10"}},"&[data-selected='true'], &[data-indeterminate='true']":{bg:"colorPalette.9",borderColor:"colorPalette.9",color:"colorPalette.contrast","&:hover":{bg:"colorPalette.10",borderColor:"colorPalette.10"},"&[data-invalid='true']":{bg:"critical.9",borderColor:"critical.9",color:"critical.contrast","&:hover":{bg:"critical.10",borderColor:"critical.10"}}}}},variants:{size:{md:{label:{fontSize:"350",fontWeight:"400",lineHeight:"400"},indicator:{w:"400",h:"400",zIndex:1,_after:{position:"absolute",content:"''",width:"600",height:"600",zIndex:0}}}}},defaultVariants:{size:"md"}}),Ja=S.defineSlotRecipe({slots:["root","trigger","triggerLabel","options","optionGroup","option"],className:"nimbus-select",base:{root:{colorPalette:"primary",display:"inline-block",position:"relative",maxWidth:"100%",borderRadius:"200","&[data-disabled]":{layerStyle:"disabled",pointerEvents:"none"}},trigger:{cursor:"button",display:"inline-flex",focusRing:"outside",alignItems:"flex-start",borderRadius:"200",color:"neutral.12",width:"100%",userSelect:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)","& span":{display:"inline-block",my:"auto"},'& [slot="description"]':{display:"none"},"[data-invalid] &":{"--border-width":"sizes.50","--border-color":"colors.critical.7"}},triggerLabel:{"--button-safespace":"sizes.1400",color:"neutral.12",textAlign:"left",marginRight:"var(--button-safespace)",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&[data-placeholder]":{opacity:.5},"[data-invalid] &":{color:"critical.11"}},options:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"bg",borderRadius:"200",boxShadow:"5",minWidth:"var(--trigger-width)",p:"200",focusRing:"outside",maxHeight:"40svh",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)"},optionGroup:{textStyle:"xs",color:"neutral.11",fontWeight:"600",lineHeight:"350",letterSpacing:"25",textTransform:"uppercase",p:"200",borderBottom:"solid-25",borderColor:"neutral.6",mx:"-200",mt:"200",mb:"300"},option:{focusRing:"outside",cursor:"menuitem",color:"neutral.12",textStyle:"sm",p:"200",borderRadius:"200",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",'&[aria-selected="true"], &[data-focused="true"]':{bg:"primary.4"},'& [slot="label"]':{display:"block"},'& [slot="description"]':{display:"block",color:"neutral.11",textStyle:"xs"},'&[data-disabled="true"]':{layerStyle:"disabled"}}},variants:{size:{sm:{root:{},trigger:{h:"800",px:"400",textStyle:"sm"}},md:{root:{},trigger:{h:"1000",px:"400",textStyle:"md"}}},variant:{outline:{root:{bg:"bg","&:hover":{bg:"primary.2"}},trigger:{"--border-width":"sizes.25","--border-color":"colors.neutral.7"}},ghost:{root:{bg:"transparent","&:hover":{bg:"primaryAlpha.2"}},trigger:{"--border-width":"sizes.25","--border-color":"transparent"}}}},defaultVariants:{size:"md",variant:"outline"}}),yp=S.defineSlotRecipe({slots:["root","disclosure","trigger","panel","accordionTitle","headerContentRight"],className:"nimbus-accordion",base:{root:{width:"100%"},disclosure:{width:"100%"},trigger:{fontSize:"var(--font-size)",focusVisibleRing:"outside",minHeight:"1200",bg:"none",flexGrow:1,display:"flex",alignItems:"center",gap:"8px",width:"auto","& svg":{width:"var(--width)",height:"var(--height)",rotate:"0deg",transition:"rotate 200ms"},'&[aria-expanded="true"] svg':{rotate:"90deg"},"&[disabled]":{layerStyle:"disabled"}},panel:{paddingTop:"var(--padding-top)",paddingBottom:"var(--padding-bottom)",paddingLeft:"var(--padding-left)",'&[aria-hidden="true"]':{display:"none"}},accordionTitle:{fontWeight:"700"}},variants:{size:{md:{trigger:{"--font-size":"fontSizes.500","& svg":{"--width":"sizes.600","--height":"sizes.600"}},panel:{"--padding-top":"spacing.600","--padding-bottom":"spacing.800","--padding-left":"spacing.800"}},sm:{trigger:{"--font-size":"fontSizes.400","& svg":{"--width":"sizes.500","--height":"sizes.500"}},panel:{"--padding-top":"spacing.400","--padding-bottom":"spacing.600","--padding-left":"spacing.700"}}}},defaultVariants:{size:"md"}}),$p={dialog:bp,list:hp,table:gp,checkbox:mp,select:Ja,accordion:yp},xp=S.defineTextStyles(W.themeTokens.textStyle),Pp=S.defineTokens.durations(W.themeTokens.aspectRatio),Sp=S.defineTokens.animations(W.themeTokens.animation),Cp=S.defineTokens.blurs(W.themeTokens.blur),wp=S.defineTokens.borders(W.themeTokens.border),Ep=S.defineTokens.colors({...W.themeTokens.color["blacks-and-whites"]}),Tp=S.defineTokens.durations(W.themeTokens.duration),Dp=S.defineTokens.easings(W.themeTokens.easing),kp=S.defineTokens.fonts(W.themeTokens.fontFamily),Rp=S.defineTokens.fontSizes(W.themeTokens.fontSize),Kp=S.defineTokens.fontWeights(W.themeTokens.fontWeight),Fp=r=>Object.keys(r).reduce((e,t)=>{const o=parseFloat(r[t].value)/100;return e[t]={value:`${o}em`},e},{}),Mp=S.defineTokens.letterSpacings(Fp(W.themeTokens.letterSpacing)),Lp=S.defineTokens.lineHeights(W.themeTokens.lineHeight),Ap=S.defineTokens.radii(W.themeTokens.borderRadius),Ip=S.defineTokens.spacing(W.themeTokens.spacing),Bp=S.defineTokens.sizes({...W.themeTokens.size,"1/2":{value:"50%"},"1/3":{value:"33.333333%"},"2/3":{value:"66.666667%"},"1/4":{value:"25%"},"3/4":{value:"75%"},"1/5":{value:"20%"},"2/5":{value:"40%"},"3/5":{value:"60%"},"4/5":{value:"80%"},"1/6":{value:"16.666667%"},"2/6":{value:"33.333333%"},"3/6":{value:"50%"},"4/6":{value:"66.666667%"},"5/6":{value:"83.333333%"},"1/12":{value:"8.333333%"},"2/12":{value:"16.666667%"},"3/12":{value:"25%"},"4/12":{value:"33.333333%"},"5/12":{value:"41.666667%"},"6/12":{value:"50%"},"7/12":{value:"58.333333%"},"8/12":{value:"66.666667%"},"9/12":{value:"75%"},"10/12":{value:"83.333333%"},"11/12":{value:"91.666667%"},max:{value:"max-content"},min:{value:"min-content"},fit:{value:"fit-content"},prose:{value:"60ch"},full:{value:"100%"},dvh:{value:"100dvh"},svh:{value:"100svh"},lvh:{value:"100lvh"},dvw:{value:"100dvw"},svw:{value:"100svw"},lvw:{value:"100lvw"},vw:{value:"100vw"},vh:{value:"100vh"}}),Np=S.defineTokens.zIndex(W.themeTokens.zIndex),Op=S.defineTokens.cursor(W.themeTokens.cursor),zp={aspectRatios:Pp,animations:Sp,blurs:Cp,borders:wp,colors:Ep,durations:Tp,easings:Dp,fonts:kp,fontSizes:Rp,fontWeights:Kp,letterSpacings:Mp,lineHeights:Lp,radii:Ap,spacing:Ip,sizes:Bp,zIndex:Np,cursor:Op},Hp=S.defineConfig({preflight:!0,cssVarsPrefix:"nimbus",cssVarsRoot:":where(:root, :host)",globalCss:op,theme:{breakpoints:np,keyframes:ip,tokens:zp,semanticTokens:vp,recipes:cp,slotRecipes:$p,textStyles:xp,layerStyles:lp,animationStyles:tp}}),Qa=S.createSystem(S.defaultBaseConfig,Hp);function Vp(){const[r,e]=a.useState(t());function t(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return a.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>{const i=t();e(i)});return o.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>o.disconnect()},[]),r}function jp({children:r,...e}){return x.jsx(S.ChakraProvider,{value:Qa,children:x.jsx(Jf,{enableSystem:!1,...e,children:x.jsx(x.Fragment,{children:r})})})}function Qt(r){const e={},t={...r};return Object.keys(r).forEach(n=>{Object.prototype.hasOwnProperty.call(r,n)&&S.defaultSystem.isValidProperty(n)&&(e[n]=r[n],delete t[n])}),[e,t]}const{withProvider:Wp,withContext:es}=S.createSlotRecipeContext({key:"checkbox"}),_p=Wp("label","root"),Up=es("span","label"),Gp=es("span","indicator"),ts=a.forwardRef((r,e)=>{const t=a.useRef(null),n=ne(S.mergeRefs(t,e)),o=S.useSlotRecipe({key:"checkbox"}),[i]=o.splitVariantProps(r),[l,s]=Qt(r),u=ci(r),{inputProps:c}=cc(s,u,n),{isFocused:d,focusProps:f}=we(),b=u.isSelected&&!r.isIndeterminate,p=r.isIndeterminate,h={"data-selected":b,"data-indeterminate":p,"data-invalid":r.isInvalid,"data-disabled":r.isDisabled,"data-focus":d||void 0};return x.jsxs(_p,{"data-slot":"root",...i,...h,...l,children:[x.jsxs(Gp,{"data-slot":"indicator",...h,children:[b&&x.jsx(ee.Check,{}),p&&x.jsx(ee.Remove,{}),x.jsx(bn,{as:"span",children:x.jsx("input",{...I(c,f),ref:n})})]}),r.children&&x.jsx(Up,{"data-slot":"label",...h,children:r.children})]})});ts.displayName="Checkbox";const er=a.forwardRef((r,e)=>x.jsx(S.Stack,{ref:e,...r}));er.displayName="Stack";const bn=r=>{const{as:e="div",...t}=r;return x.jsx(fi,{elementType:e,...t})};bn.displayName="VisuallyHidden";const{withContext:qp}=S.createRecipeContext({recipe:vn}),Zp=qp("input"),rs=a.forwardRef((r,e)=>{const t=a.useRef(null),n=ne(S.mergeRefs(t,e)),o=S.useRecipe({recipe:vn}),[i,l]=o.splitVariantProps(r),[s,u]=Qt(l);return x.jsx($f,{...u,children:x.jsx(Zp,{ref:n,...i,...s,asChild:!0,children:x.jsx(gf,{})})})});rs.displayName="TextInput";const ns=a.forwardRef((r,e)=>x.jsx(S.Grid,{ref:e,...r}));ns.displayName="Grid";const Yp=Object.assign(ns,{Item:S.GridItem}),{withProvider:Xp,withContext:ht}=S.createSlotRecipeContext({key:"select"}),Jp=Xp("div","root"),Qp=ht("button","trigger"),ev=ht("span","triggerLabel"),tv=ht("div","options"),rv=ht("div","option"),nv=ht("div","optionGroup"),os=()=>{const r=a.useContext(dn);if(!(r!=null&&r.selectedKey))return null;const e=()=>{r==null||r.setSelectedKey(null)};return x.jsx(vt,{pointerEvents:"all",size:"2xs",variant:"ghost",tone:"primary","aria-label":"Clear Selection",onPress:e,children:x.jsx(ee.Close,{})})};os.displayName="Select.ClearButton";const hn=a.forwardRef(({children:r,isLoading:e,isDisabled:t,...n},o)=>{const i=S.useSlotRecipe({recipe:Ja}),[l,s]=i.splitVariantProps(n),[u,c]=Qt(s),d={...c,isDisabled:e||t};return x.jsx(Jp,{asChild:!0,ref:o,...l,...u,children:x.jsxs(zf,{...d,children:[x.jsxs(S.chakra.div,{position:"relative",children:[x.jsx(Qp,{zIndex:0,asChild:!0,children:x.jsx(nf,{children:x.jsx(ev,{asChild:!0,children:x.jsx(Vf,{})})})}),x.jsxs(S.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[x.jsx(S.Flex,{width:"600",my:"auto",children:x.jsx(os,{})}),x.jsx(S.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:x.jsx(ve,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:e?x.jsx(ve,{asChild:!0,animation:"spin",animationDuration:"slowest",children:x.jsx(ee.Loop,{})}):x.jsx(ee.KeyboardArrowDown,{})})})]})]}),x.jsx(ja,{children:r})]})})});hn.displayName="Select.Root";const gn=r=>a.forwardRef(r),mn=gn((r,e)=>{const[t,n]=Qt(r);return x.jsx(tv,{asChild:!0,...t,children:x.jsx(Df,{ref:e,...n})})});mn.displayName="Select.Options";const yn=gn((r,e)=>x.jsx(rv,{asChild:!0,ref:e,children:x.jsx(Kf,{...r})}));yn.displayName="Select.Option";const $n=gn(({label:r,items:e,children:t,...n},o)=>{if(e&&typeof t!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return x.jsxs(Rf,{ref:o,...n,children:[x.jsx(nv,{asChild:!0,children:x.jsx(Ef,{children:r})}),e?x.jsx(Yl,{items:e,children:i=>typeof t=="function"?t(i):null}):t]})});$n.displayName="Select.OptionGroup";const ov={Root:hn,Options:mn,Option:yn,OptionGroup:$n},{withProvider:iv,withContext:gt}=S.createSlotRecipeContext({key:"accordion"}),lv=iv("div","root"),av=gt("div","disclosure"),sv=gt("button","trigger"),uv=gt("div","panel"),cv=gt("div","accordionTitle"),Or=gt("div","headerContentRight"),xn=a.createContext(null),is=a.createContext(null),dv=a.forwardRef(({children:r,onExpandedChange:e,...t},n)=>{const o=df({...t,onExpandedChange:s=>{e==null||e(s.size>0)}}),i=S.useSlotRecipe({key:"accordion"}),[l]=i.splitVariantProps(t);return x.jsx(is.Provider,{value:o,children:x.jsx(lv,{"data-slot":"root",ref:n,...l,children:r})})}),fv=a.forwardRef(({children:r},e)=>{const t=a.useContext(xn);if(!t)throw new Error("Accordion.Header must be used within Accordion.Item");const n=a.Children.toArray(r).reduce((o,i)=>(a.isValidElement(i)&&i.type===Or?o.rightContent.push(i):o.main.push(i),o),{main:[],rightContent:[]});return x.jsxs(S.Flex,{justifyContent:"space-between",alignItems:"center",borderBottom:"solid-25",borderColor:"neutral.4",children:[x.jsxs(sv,{ref:S.mergeRefs(t.triggerRef,e),...t.buttonProps,"data-slot":"trigger",outline:t.isFocusVisible?void 0:"none",children:[x.jsx(ee.KeyboardArrowRight,{}),x.jsx(cv,{"data-slot":"accordionTitle",children:n.main})]}),n.rightContent.length>0&&x.jsx(Or,{"data-slot":"headerContentRight",children:n.rightContent})]})}),pv=a.forwardRef((r,e)=>{const t=a.useContext(xn),n=ne(S.mergeRefs(t==null?void 0:t.panelRef,e));return x.jsx(uv,{ref:n,...S.mergeProps({...t==null?void 0:t.panelProps,...r}),"data-slot":"panel",children:r.children})}),vv=a.forwardRef(({children:r,id:e,isDisabled:t,isExpanded:n,onExpandedChange:o,value:i},l)=>{const s=Y(),c=i||(e||s),d=a.useContext(is),f=d?d.expandedKeys.has(c):n,b=cf({isExpanded:f,onExpandedChange:D=>{d&&d.toggleKey(c),o==null||o(D)}}),p=a.useRef(null),h=a.useRef(null),m=t||(d==null?void 0:d.isDisabled)||!1,{buttonProps:y,panelProps:$}=ld({isExpanded:b.isExpanded,isDisabled:m},b,p),{buttonProps:C}=Ut(y,h),{focusProps:w,isFocusVisible:F}=we(),k={isExpanded:b.isExpanded,triggerRef:h,panelRef:p,buttonProps:I(C,w),panelProps:$,isFocusVisible:F};return x.jsx(xn.Provider,{value:k,children:x.jsx(av,{"data-slot":"disclosure","data-value":c,"data-expanded":b.isExpanded,ref:l,children:r})})}),bv={Root:dv,Item:vv,Header:fv,Content:pv,HeaderRightContent:Or},hv=S.defineRecipe({className:"nimbus-loading-spinner",base:{display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{overflow:"visible",transform:"scale(calc(1 - 2/12))"},"& svg [data-svg-path='spinner-pointer']":{stroke:"colorPalette.10",animationName:"spin",animationDuration:"0.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",transformOrigin:"center center 0"},"& svg [data-svg-path='spinner-circle']":{stroke:"colorPalette.5"}},variants:{size:{"2xs":{width:"350",height:"350"},xs:{width:"500",height:"500"},sm:{width:"600",height:"600"},md:{width:"800",height:"800"},lg:{width:"1000",height:"1000"}},tone:{primary:{colorPalette:"ctvioletAlpha"},white:{colorPalette:"whiteAlpha"}}},defaultVariants:{size:"sm",tone:"primary"}}),{withContext:gv}=S.createRecipeContext({recipe:hv}),mv=gv("div"),yv="M22.5 12C22.5 13.3789 22.2284 14.7443 21.7007 16.0182C21.1731 17.2921 20.3996 18.4496 19.4246 19.4246C18.4496 20.3996 17.2921 21.1731 16.0182 21.7007C14.7443 22.2284 13.3789 22.5 12 22.5C10.6211 22.5 9.25574 22.2284 7.98182 21.7007C6.7079 21.1731 5.55039 20.3996 4.57538 19.4246C3.60036 18.4496 2.82694 17.2921 2.29926 16.0182C1.77159 14.7443 1.5 13.3789 1.5 12C1.5 10.6211 1.77159 9.25574 2.29927 7.98182C2.82694 6.7079 3.60037 5.55039 4.57538 4.57538C5.5504 3.60036 6.70791 2.82694 7.98183 2.29926C9.25575 1.77159 10.6211 1.5 12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60037 19.4246 4.57538C20.3996 5.5504 21.1731 6.70791 21.7007 7.98183C22.2284 9.25575 22.5 10.6211 22.5 12L22.5 12Z",$v="M12 1.5C13.3789 1.5 14.7443 1.77159 16.0182 2.29927C17.2921 2.82694 18.4496 3.60036 19.4246 4.57538C20.3996 5.55039 21.1731 6.70791 21.7007 7.98183C22.2284 9.25574 22.5 10.6211 22.5 12",ls=a.forwardRef(({"aria-label":r="Loading data",...e},t)=>{const{progressBarProps:n}=ad({isIndeterminate:!0,"aria-label":r,...e});return x.jsx(mv,{ref:t,...I(e,n),"aria-label":r,children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[x.jsx("path",{d:yv,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),x.jsx("path",{d:$v,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});ls.displayName="LoadingSpinner";const xv=S.defineSlotRecipe({slots:["root","header","content"],className:"nimbus-card",base:{root:{colorPalette:"slate",display:"inline-flex",alignItems:"flex-start",borderRadius:"300",focusVisibleRing:"outside"}},variants:{cardPadding:{sm:{root:{padding:"200"}},md:{root:{padding:"400"}},lg:{root:{padding:"600"}}},borderStyle:{none:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.3"}}},elevation:{none:{},elevated:{root:{shadow:"1"}}},backgroundStyle:{default:{root:{backgroundColor:"colorPalette.contrast"}},muted:{root:{backgroundColor:"colorPalette.2"}}}}}),{withProvider:Pv,withContext:as}=S.createSlotRecipeContext({recipe:xv}),Sv=Pv("div","root"),Cv=as("div","header"),wv=as("div","content"),Pn=a.createContext(void 0),Sn=a.forwardRef(({children:r,...e},t)=>{const{isFocused:n,isFocusVisible:o,focusProps:i}=we(),[l,s]=a.useState(null),[u,c]=a.useState(null),d=a.useMemo(()=>({setHeader:s,setContent:c}),[s,c]);return x.jsx(Pn.Provider,{value:d,children:x.jsxs(Sv,{ref:t,...I(e,i),"data-focus":n||void 0,"data-focus-visible":o||void 0,tabIndex:0,children:[x.jsxs(er,{direction:"column",gap:"200",children:[l,u]}),r]})})});Sn.displayName="Card.Root";const Cn=({children:r,...e})=>{const t=a.useContext(Pn);return a.useEffect(()=>{if(t){const n=x.jsx(Cv,{...e,children:r});return t.setHeader(n),()=>t.setHeader(null)}},[r,e]),null};Cn.displayName="Card.Header";const wn=({children:r,...e})=>{const t=a.useContext(Pn);return a.useEffect(()=>{if(t){const n=x.jsx(wv,{...e,children:r});return t.setContent(n),()=>t.setContent(null)}},[r,e]),null};wn.displayName="Card.Content";const Ev={Root:Sn,Header:Cn,Content:wn},Tv=S.defineRecipe({className:"nimbus-badge",base:{display:"inline-flex",alignItems:"center",borderRadius:"200",justifyContent:"center",whiteSpace:"nowrap",verticalAlign:"middle",py:"25",fontWeight:"500",backgroundColor:"colorPalette.3",color:"colorPalette.11",w:"auto",userSelect:"none",_icon:{flexShrink:"0"}},variants:{size:{"2xs":{fontSize:"300",gap:"100",h:"600",lineHeight:"350",px:"200",_icon:{width:"400",height:"400"}},xs:{fontSize:"350",gap:"100",h:"800",lineHeight:"400",px:"300",_icon:{width:"500",height:"500"}},md:{fontSize:"400",gap:"200",h:"1000",lineHeight:"500",px:"400",_icon:{width:"600",height:"600"}}}},defaultVariants:{size:"md"}}),{withContext:Dv}=S.createRecipeContext({recipe:Tv}),kv=Dv("span"),Rv=a.forwardRef((r,e)=>{const{as:t,asChild:n,children:o,...i}=r,l=a.useRef(null),s=ne(S.mergeRefs(l,e)),u=t||"span";return x.jsx(kv,{as:u,...I(i,{ref:s}),children:o})}),Kv=S.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:Fv,withContext:mt}=S.createSlotRecipeContext({recipe:Kv}),Mv=Fv("div","root"),Lv=mt("div","title"),Av=mt("div","description"),Iv=mt("div","icon"),Bv=mt("div","actions"),Nv=mt("div","dismissButton"),Ov=r=>{switch(r){case"critical":return x.jsx(ee.ErrorOutline,{});case"info":return x.jsx(ee.Info,{});case"warning":return x.jsx(ee.WarningAmber,{});case"positive":return x.jsx(ee.CheckCircleOutline,{});default:return null}},yt=a.createContext(void 0),ss=a.forwardRef(({children:r,...e},t)=>{const[n,o]=a.useState(null),[i,l]=a.useState(null),[s,u]=a.useState(null),[c,d]=a.useState(null),f=a.useMemo(()=>({setTitle:o,setDescription:l,setActions:u,setDismiss:d}),[o,l,u,d]);return x.jsx(yt.Provider,{value:f,children:x.jsxs(Mv,{ref:t,...e,role:"alert",children:[x.jsx(Iv,{alignItems:"flex-start",children:Ov(e.tone)}),x.jsxs(er,{flex:"1",gap:"200",children:[x.jsxs(ve,{children:[n,i]}),s]}),c,r]})})});ss.displayName="Alert.Root";const us=({children:r,...e})=>{const t=a.useContext(yt);return a.useEffect(()=>{if(t){const n=x.jsx(Lv,{...e,fontWeight:"600",children:r});return t.setTitle(n),()=>t.setTitle(null)}},[r,e]),null};us.displayName="Alert.Title";const cs=({children:r,...e})=>{const t=a.useContext(yt);return a.useEffect(()=>{if(t){const n=x.jsx(Av,{...e,children:r});return t.setDescription(n),()=>t.setDescription(null)}},[r,e]),null};cs.displayName="Alert.Description";const ds=({children:r,...e})=>{const t=a.useContext(yt);return a.useEffect(()=>{if(t){const n=x.jsx(Bv,{...e,children:r});return t.setActions(n),()=>t.setActions(null)}},[r,e]),null};ds.displayName="Alert.Actions";const fs=({children:r,...e})=>{const t=a.useContext(yt);return a.useEffect(()=>{if(t){const n=x.jsx(Nv,{children:x.jsx(vt,{"aria-label":"Dismiss",...e,variant:"ghost",size:"2xs",children:x.jsx(ee.Clear,{role:"img"})})});return t.setDismiss(n),()=>t.setDismiss(null)}},[r,e]),null};fs.displayName="Alert.DismissButton";const zv={Root:ss,Title:us,Description:cs,Actions:ds,DismissButton:fs};var $o,xo,Po,So;const Hv=S.defineSlotRecipe({slots:["root","button"],className:"nimbus-toggle-button-group",base:{root:{display:"inline-flex"},button:{...Re.base,...($o=Re.variants)==null?void 0:$o.variant.outline,borderRadius:"0",borderRightWidth:"0","&:first-of-type":{borderLeftRadius:"200"},"&:last-of-type":{borderRightWidth:"1px",borderRightRadius:"200"},"&[data-selected=true]":(xo=Re.variants)==null?void 0:xo.variant.solid}},variants:{size:{xs:{button:(Po=Re.variants)==null?void 0:Po.size.xs},md:{button:(So=Re.variants)==null?void 0:So.size.md}},tone:{primary:{button:{colorPalette:"primary"}},critical:{button:{colorPalette:"critical"}},neutral:{button:{colorPalette:"neutral"}}}},defaultVariants:{size:"md"}}),{withContext:Vv,withProvider:jv}=S.createSlotRecipeContext({recipe:Hv}),Wv=jv(Wf,"root"),_v=Vv(Uf,"button"),En=a.forwardRef(({children:r,...e},t)=>x.jsx(Wv,{ref:t,...e,children:r}));En.displayName="ToggleButtonGroup.Root";const Tn=a.forwardRef(({children:r,...e},t)=>x.jsx(_v,{...e,ref:t,children:r}));Tn.displayName="ToggleButtonGroup.Button";const Uv={Root:En,Button:Tn},Gv=`
18
+ "label"
19
+ "input"
20
+ "description"
21
+ "error"
22
+ `,qv=`
23
+ "label input"
24
+ "label description"
25
+ "label error"
26
+ `,Zv=S.defineSlotRecipe({slots:["root","label","input","description","error","popover"],className:"nimbus-ui-form-field",base:{root:{"--grid-gap":"spacing.100",display:"grid",width:"auto"},label:{gridArea:"label",fontWeight:"500",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},input:{gridArea:"input"},description:{gridArea:"description",color:"neutral.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},error:{gridArea:"error",color:"critical.11",fontSize:"var(--form-field-font-size)",lineHeight:"var(--form-field-line-height)"},popover:{"--scrollbar-color":"colors.neutral.8","--scrollbar-bg":"colors.neutral.3",bg:"neutral.1",maxWidth:"xl",borderRadius:"200",boxShadow:"6",border:"solid-25",borderColor:"neutral.8",maxHeight:"40svh",overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--scrollbar-color) var(--scrollbar-bg)",focusRing:"outside"}},variants:{size:{md:{root:{"--form-field-font-size":"fontSizes.350","--form-field-line-height":"lineHeights.500"}},sm:{root:{"--form-field-font-size":"fontSizes.300","--form-field-line-height":"lineHeights.450"}}},direction:{column:{root:{gridTemplateAreas:Gv},input:{mt:"var(--grid-gap)"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}},row:{root:{gridTemplateAreas:qv,gridTemplateColumns:"auto 1fr",gridColumnGap:"200"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}}}},defaultVariants:{direction:"column",size:"md"}}),{withProvider:Yv,withContext:$t}=S.createSlotRecipeContext({recipe:Zv}),Xv=Yv("div","root"),Jv=$t("div","label"),Qv=$t("div","input"),eb=$t("div","description"),tb=$t("div","error"),rb=$t("div","popover"),nb=a.forwardRef(({isInvalid:r,isRequired:e,isDisabled:t,isReadOnly:n,children:o,...i},l)=>{const[s,u]=a.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:r,isRequired:e,isDisabled:t,isReadOnly:n}),{labelProps:c,fieldProps:d,descriptionProps:f,errorMessageProps:b}=Qr({label:s.label,description:s.description,errorMessage:s.error});a.useEffect(()=>{u(h=>({...h,isInvalid:r,isRequired:e,isDisabled:t,isReadOnly:n}))},[r,e,t,n]);const p={...d,isInvalid:r,isRequired:e,isDisabled:t,isReadOnly:n};return x.jsx(He.Provider,{value:{context:s,setContext:u},children:x.jsxs(Xv,{ref:l,...i,children:[s.label&&x.jsxs(Jv,{...s.labelSlotProps,children:[x.jsxs("label",{...c,children:[s.label,e&&x.jsx("sup",{"aria-hidden":"true",children:"*"})]}),s.info&&x.jsxs(Bf,{children:[x.jsx(ve,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:x.jsx(ve,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:x.jsx(vt,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:x.jsx(ee.HelpOutline,{})})})}),x.jsx(ja,{children:x.jsx(rb,{asChild:!0,children:x.jsx(Nf,{children:x.jsx(ve,{p:"300",children:s.info})})})})]})]}),s.input&&x.jsx(Qv,{...s.inputSlotProps,children:a.Children.map(s.input,h=>a.isValidElement(h)?a.cloneElement(h,p):h)}),s.description&&x.jsx(eb,{...f,...s.descriptionSlotProps,children:s.description}),r&&s.error&&x.jsxs(tb,{...b,...s.errorSlotProps,children:[x.jsx(ve,{as:ee.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),s.error]}),o]})})}),ob=({children:r,...e})=>{const{setContext:t}=a.useContext(He);return a.useEffect(()=>{t(n=>({...n,label:r,labelSlotProps:e}))},[r,t]),null},ib=({children:r,...e})=>{const{setContext:t}=a.useContext(He);return a.useEffect(()=>{t(n=>({...n,input:r,inputSlotProps:e}))},[r,t]),null},lb=({children:r,...e})=>{const{setContext:t}=a.useContext(He);return a.useEffect(()=>{t(n=>({...n,description:r,descriptionSlotProps:e}))},[r,t]),null},ab=({children:r,...e})=>{const{setContext:t}=a.useContext(He);return a.useEffect(()=>{t(n=>({...n,error:r,errorSlotProps:e}))},[r,t]),null},sb=({children:r})=>{const{setContext:e}=a.useContext(He);return a.useEffect(()=>{e(t=>({...t,info:r}))},[r,e]),null},He=a.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),ub={Root:nb,Label:ob,Input:ib,Description:lb,Error:ab,InfoBox:sb};Object.defineProperty(exports,"Bleed",{enumerable:!0,get:()=>S.Bleed});Object.defineProperty(exports,"Code",{enumerable:!0,get:()=>S.Code});Object.defineProperty(exports,"Em",{enumerable:!0,get:()=>S.Em});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>S.Flex});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>S.Heading});Object.defineProperty(exports,"Highlight",{enumerable:!0,get:()=>S.Highlight});Object.defineProperty(exports,"Kbd",{enumerable:!0,get:()=>S.Kbd});Object.defineProperty(exports,"List",{enumerable:!0,get:()=>S.List});Object.defineProperty(exports,"Table",{enumerable:!0,get:()=>S.Table});Object.defineProperty(exports,"useHotkeys",{enumerable:!0,get:()=>vs.useHotkeys});Object.defineProperty(exports,"useCopyToClipboard",{enumerable:!0,get:()=>bs.useCopyToClipboard});exports.Accordion=bv;exports.Alert=zv;exports.Avatar=Eo;exports.Badge=Rv;exports.Box=ve;exports.Button=Gt;exports.Card=Ev;exports.CardContent=wn;exports.CardHeader=Cn;exports.CardRoot=Sn;exports.Checkbox=ts;exports.ColorModeLabel=ep;exports.DialogActionTrigger=wd;exports.DialogBackdrop=xd;exports.DialogBody=$d;exports.DialogCloseTrigger=hd;exports.DialogContent=bd;exports.DialogDescription=Sd;exports.DialogFooter=md;exports.DialogHeader=yd;exports.DialogRoot=gd;exports.DialogTitle=Pd;exports.DialogTrigger=Cd;exports.FormField=ub;exports.FormFieldContext=He;exports.Grid=Yp;exports.IconButton=vt;exports.Link=Nl;exports.ListItem=kd;exports.ListRoot=Dd;exports.LoadingSpinner=ls;exports.MakeElementFocusable=Xa;exports.NimbusProvider=jp;exports.Select=ov;exports.SimpleGrid=Rd;exports.Stack=er;exports.TableBody=Nd;exports.TableCell=Bd;exports.TableColumn=Md;exports.TableColumnGroup=Fd;exports.TableColumnHeader=Od;exports.TableFooter=Ad;exports.TableHeader=Ld;exports.TableRoot=Kd;exports.TableRow=Id;exports.Text=zl;exports.TextInput=rs;exports.ToggleButtonGroup=Uv;exports.ToggleButtonGroupButton=Tn;exports.ToggleButtonGroupRoot=En;exports.Tooltip=Za;exports.TooltipTrigger=Ya;exports.VisuallyHidden=bn;exports._SelectOption=yn;exports._SelectOptionGroup=$n;exports._SelectOptions=mn;exports._SelectRoot=hn;exports.system=Qa;exports.useColorMode=pn;exports.useColorModeValue=Qf;exports.useColorScheme=Vp;
27
+ //# sourceMappingURL=index.cjs.map