@commercetools/nimbus 0.0.4-rc3 → 0.0.4-rc6

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 CHANGED
@@ -1,4 +1,4 @@
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={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@chakra-ui/react"),W=require("@commercetools/nimbus-tokens"),s=require("react"),x=require("react/jsx-runtime"),Oe=require("react-dom"),te=require("@commercetools/nimbus-icons");function Ms(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const G=Ms(s),Oo=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:As}=S.createRecipeContext({recipe:Oo}),Fs=As("figure");function Is(t,e){return t.split("")[0].toUpperCase()+e.split("")[0].toUpperCase()}const zo=s.forwardRef((t,e)=>{const{firstName:r,lastName:n,src:o,alt:i,...l}=t,a=`${r} ${n}`,u={"aria-label":`${a} avatar`,ref:e,...l};return x.jsx(Fs,{...u,children:o?x.jsx(S.Image,{src:o,alt:i||a}):Is(r,n)})});zo.displayName="Avatar";const be=s.forwardRef((t,e)=>x.jsx(S.Box,{ref:e,...t}));be.displayName="Box";const z=typeof document<"u"?s.useLayoutEffect:()=>{};function Z(t){const e=s.useRef(null);return z(()=>{e.current=t},[t]),s.useCallback((...r)=>{const n=e.current;return n==null?void 0:n(...r)},[])}function Bs(t){let[e,r]=s.useState(t),n=s.useRef(null),o=Z(()=>{if(!n.current)return;let l=n.current.next();if(l.done){n.current=null;return}e===l.value?o():r(l.value)});z(()=>{n.current&&o()});let i=Z(l=>{n.current=l(e),o()});return[e,i]}const At={prefix:String(Math.round(Math.random()*1e10)),current:0},Ho=s.createContext(At),Ns=s.createContext(!1);let Os=!!(typeof window<"u"&&window.document&&window.document.createElement),ir=new WeakMap;function zs(t=!1){let e=s.useContext(Ho),r=s.useRef(null);if(r.current===null&&!t){var n,o;let i=(o=s.__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=ir.get(i);l==null?ir.set(i,{id:e.current,state:i.memoizedState}):i.memoizedState!==l.state&&(e.current=l.id,ir.delete(i))}r.current=++e.current}return r.current}function Hs(t){let e=s.useContext(Ho);e===At&&!Os&&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 r=zs(!!t),n=e===At&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function Vs(t){let e=s.useId(),[r]=s.useState(Ee()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${At.prefix}`;return t||`${n}-${e}`}const js=typeof s.useId=="function"?Vs:Hs;function Ws(){return!1}function _s(){return!0}function Us(t){return()=>{}}function Ee(){return typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore(Us,Ws,_s):s.useContext(Ns)}let Gs=!!(typeof window<"u"&&window.document&&window.document.createElement),$e=new Map;function X(t){let[e,r]=s.useState(t),n=s.useRef(null),o=js(e),i=s.useCallback(l=>{n.current=l},[]);return Gs&&($e.has(o)&&!$e.get(o).includes(i)?$e.set(o,[...$e.get(o),i]):$e.set(o,[i])),z(()=>{let l=o;return()=>{$e.delete(l)}},[o]),s.useEffect(()=>{let l=n.current;l&&(n.current=null,r(l))}),o}function qs(t,e){if(t===e)return t;let r=$e.get(t);if(r)return r.forEach(o=>o(e)),e;let n=$e.get(e);return n?(n.forEach(o=>o(t)),t):e}function ct(t=[]){let e=X(),[r,n]=Bs(e),o=s.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,n]);return z(o,[e,o,...t]),r}function Ce(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const j=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},ae=t=>t&&"window"in t&&t.window===t?t:j(t).defaultView||window;function Vo(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=Vo(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ys(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=Vo(t))&&(n&&(n+=" "),n+=e);return n}function B(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];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]=Ce(i,l):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof l=="string"?e[o]=Ys(i,l):o==="id"&&i&&l?e.id=qs(i,l):e[o]=l!==void 0?l:i}}return e}function jo(...t){return t.length===1&&t[0]?t[0]:e=>{for(let r of t)typeof r=="function"?r(e):r!=null&&(r.current=e)}}const Zs=new Set(["id"]),Xs=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Js=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Qs=/^(data-.*)$/;function q(t,e={}){let{labelable:r,isLink:n,propNames:o}=e,i={};for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(Zs.has(l)||r&&Xs.has(l)||n&&Js.has(l)||o!=null&&o.has(l)||Qs.test(l))&&(i[l]=t[l]);return i}function he(t){if(eu())t.focus({preventScroll:!0});else{let e=tu(t);t.focus(),ru(e)}}let wt=null;function eu(){if(wt==null){wt=!1;try{document.createElement("div").focus({get preventScroll(){return wt=!0,!0}})}catch{}}return wt}function tu(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function ru(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}function jt(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(r=>t.test(r.brand)))||t.test(window.navigator.userAgent)}function Yr(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function ge(t){let e=null;return()=>(e==null&&(e=t()),e)}const we=ge(function(){return Yr(/^Mac/i)}),nu=ge(function(){return Yr(/^iPhone/i)}),Wo=ge(function(){return Yr(/^iPad/i)||we()&&navigator.maxTouchPoints>1}),Wt=ge(function(){return nu()||Wo()}),ou=ge(function(){return we()||Wt()}),Zr=ge(function(){return jt(/AppleWebKit/i)&&!_o()}),_o=ge(function(){return jt(/Chrome/i)}),Xr=ge(function(){return jt(/Android/i)}),iu=ge(function(){return jt(/Firefox/i)}),lu=s.createContext({isNative:!0,open:uu,useHref:t=>t});function _t(){return s.useContext(lu)}function au(t,e){let r=t.getAttribute("target");return(!r||r==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function Fe(t,e,r=!0){var n,o;let{metaKey:i,ctrlKey:l,altKey:a,shiftKey:u}=e;iu()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&t.target==="_blank"&&(we()?i=!0:l=!0);let c=Zr()&&we()&&!Wo()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:l,altKey:a,shiftKey:u}):new MouseEvent("click",{metaKey:i,ctrlKey:l,altKey:a,shiftKey:u,bubbles:!0,cancelable:!0});Fe.isOpening=r,he(t),t.dispatchEvent(c),Fe.isOpening=!1}Fe.isOpening=!1;function su(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function uu(t,e){su(t,r=>Fe(r,e))}function Uo(t){let e=_t();var r;const n=e.useHref((r=t==null?void 0:t.href)!==null&&r!==void 0?r:"");return{href:t!=null&&t.href?n:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let Ue=new Map,Tr=new Set;function Hn(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{if(!t(n)||!n.target)return;let o=Ue.get(n.target);o||(o=new Set,Ue.set(n.target,o),n.target.addEventListener("transitioncancel",r,{once:!0})),o.add(n.propertyName)},r=n=>{if(!t(n)||!n.target)return;let o=Ue.get(n.target);if(o&&(o.delete(n.propertyName),o.size===0&&(n.target.removeEventListener("transitioncancel",r),Ue.delete(n.target)),Ue.size===0)){for(let i of Tr)i();Tr.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Hn():document.addEventListener("DOMContentLoaded",Hn));function Go(t){requestAnimationFrame(()=>{Ue.size===0?t():Tr.add(t)})}function qo(){let t=s.useRef(new Map),e=s.useCallback((o,i,l,a)=>{let u=a!=null&&a.once?(...c)=>{t.current.delete(l),l(...c)}:l;t.current.set(l,{type:i,eventTarget:o,fn:u,options:a}),o.addEventListener(i,u,a)},[]),r=s.useCallback((o,i,l,a)=>{var u;let c=((u=t.current.get(l))===null||u===void 0?void 0:u.fn)||l;o.removeEventListener(i,c,a),t.current.delete(l)},[]),n=s.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return s.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function Yo(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=X(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}function oe(t){const e=s.useRef(null);return s.useMemo(()=>({get current(){return e.current},set current(r){e.current=r,typeof t=="function"?t(r):t&&(t.current=r)}}),[t])}function Vn(t,e){const r=s.useRef(!0),n=s.useRef(null);z(()=>(r.current=!0,()=>{r.current=!1}),[]),z(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function cu(){return typeof window.ResizeObserver<"u"}function Dr(t){const{ref:e,box:r,onResize:n}=t;s.useEffect(()=>{let o=e==null?void 0:e.current;if(o)if(cu()){const i=new window.ResizeObserver(l=>{l.length&&n()});return i.observe(o,{box:r}),()=>{o&&i.unobserve(o)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,r])}function Jr(t,e){z(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function dt(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&e&&(n=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),n}function Zo(t,e){let r=t;for(dt(r,e)&&(r=r.parentElement);r&&!dt(r,e);)r=r.parentElement;return r||document.scrollingElement||document.documentElement}function du(t,e){const r=[];for(;t&&t!==document.documentElement;)dt(t,e)&&r.push(t),t=t.parentElement;return r}let fu=0;const lr=new Map;function pu(t){let[e,r]=s.useState();return z(()=>{if(!t)return;let n=lr.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${fu++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},lr.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),lr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function lt(t,e,r,n){let o=Z(r),i=r==null;s.useEffect(()=>{if(i||!t.current)return;let l=t.current;return l.addEventListener(e,o,n),()=>{l.removeEventListener(e,o,n)}},[t,e,n,i,o])}function Xo(t,e){let r=jn(t,e,"left"),n=jn(t,e,"top"),o=e.offsetWidth,i=e.offsetHeight,l=t.scrollLeft,a=t.scrollTop,{borderTopWidth:u,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:p,scrollPaddingBottom:v,scrollPaddingLeft:f}=getComputedStyle(t),h=l+parseInt(c,10),m=a+parseInt(u,10),$=h+t.clientWidth,y=m+t.clientHeight,C=parseInt(d,10)||0,E=parseInt(v,10)||0,K=parseInt(p,10)||0,T=parseInt(f,10)||0;r<=l+T?l=r-parseInt(c,10)-T:r+o>$-K&&(l+=r+o-$+K),n<=m+C?a=n-parseInt(u,10)-C:n+i>y-E&&(a+=n+i-y+E),t.scrollLeft=l,t.scrollTop=a}function jn(t,e,r){const n=r==="left"?"offsetLeft":"offsetTop";let o=0;for(;e.offsetParent&&(o+=e[n],e.offsetParent!==t);){if(e.offsetParent.contains(t)){o-=t[n];break}e=e.offsetParent}return o}function Wn(t,e){if(t&&document.contains(t)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let u=du(t);for(let c of u)Xo(c,t)}else{var r;let{left:u,top:c}=t.getBoundingClientRect();t==null||(r=t.scrollIntoView)===null||r===void 0||r.call(t,{block:"nearest"});let{left:d,top:p}=t.getBoundingClientRect();if(Math.abs(u-d)>1||Math.abs(c-p)>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=t.scrollIntoView)===null||i===void 0||i.call(t,{block:"nearest"})}}}}function kr(t){return t.mozInputSource===0&&t.isTrusted?!0:Xr()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function vu(t){return!Xr()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Qr(t,e,r){let n=s.useRef(e),o=Z(()=>{r&&r(n.current)});s.useEffect(()=>{var i;let l=t==null||(i=t.current)===null||i===void 0?void 0:i.form;return l==null||l.addEventListener("reset",o),()=>{l==null||l.removeEventListener("reset",o)}},[t,o])}const bu="react-aria-clear-focus",hu="react-aria-focus",Jo="react-aria-update-activedescendant";function Ge(t){return we()?t.metaKey:t.ctrlKey}function Qo(t,e=!0){let[r,n]=s.useState(!0),o=r&&e;return z(()=>{if(o&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,o]),ti(t,o,s.useCallback(()=>n(!1),[])),o}function ei(t,e){let[r,n]=s.useState(e?"open":"closed");switch(r){case"open":e||n("exiting");break;case"closed":case"exiting":e&&n("open");break}let o=r==="exiting";return ti(t,o,s.useCallback(()=>{n(i=>i==="exiting"?"closed":i)},[])),o}function ti(t,e,r){z(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){r();return}let n=t.current.getAnimations();if(n.length===0){r();return}let o=!1;return Promise.all(n.map(i=>i.finished)).then(()=>{o||Oe.flushSync(()=>{r()})}).catch(()=>{}),()=>{o=!0}}},[t,e,r])}function Te(t,e,r){let[n,o]=s.useState(t||e),i=s.useRef(t!==void 0),l=t!==void 0;s.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 a=l?t:n,u=s.useCallback((c,...d)=>{let p=(v,...f)=>{r&&(Object.is(a,v)||r(v,...f)),l||(a=v)};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((f,...h)=>{let m=c(l?a:f,...h);return p(m,...d),l?f:m})):(l||o(c),p(c,...d))},[l,a,r]);return[a,u]}function Ft(t,e=-1/0,r=1/0){return Math.min(Math.max(t,e),r)}let qe="default",Rr="",Mt=new WeakMap;function _n(t){if(Wt()){if(qe==="default"){const e=j(t);Rr=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}qe="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(Mt.set(t,t.style.userSelect),t.style.userSelect="none")}function Et(t){if(Wt()){if(qe!=="disabled")return;qe="restoring",setTimeout(()=>{Go(()=>{if(qe==="restoring"){const e=j(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Rr||""),Rr="",qe="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Mt.has(t)){let e=Mt.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Mt.delete(t)}}const ft=s.createContext({register:()=>{}});ft.displayName="PressResponderContext";function gu(t,e){return e.get?e.get.call(t):e.value}function ri(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function mu(t,e){var r=ri(t,e,"get");return gu(t,r)}function yu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $u(t,e,r){yu(t,e),e.set(t,r)}function xu(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}function Un(t,e,r){var n=ri(t,e,"set");return xu(t,n,r),r}function Pu(t){let e=s.useContext(ft);if(e){let{register:r,...n}=e;t=B(n,t),r()}return Jr(e,t.ref),t}var Tt=new WeakMap;class Dt{continuePropagation(){Un(this,Tt,!1)}get shouldStopPropagation(){return mu(this,Tt)}constructor(e,r,n,o){$u(this,Tt,{writable:!0,value:void 0}),Un(this,Tt,!0);var i;let l=(i=o==null?void 0:o.target)!==null&&i!==void 0?i:n.currentTarget;const a=l==null?void 0:l.getBoundingClientRect();let u,c=0,d,p=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,p=n.clientY),a&&(d!=null&&p!=null?(u=d-a.left,c=p-a.top):(u=a.width/2,c=a.height/2)),this.type=e,this.pointerType=r,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 Gn=Symbol("linkClicked");function Ie(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,isDisabled:l,isPressed:a,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:p,...v}=Pu(t),[f,h]=s.useState(!1),m=s.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:$,removeAllGlobalListeners:y}=qo(),C=Z((b,R)=>{let L=m.current;if(l||L.didFirePressStart)return!1;let D=!0;if(L.isTriggeringEvent=!0,n){let A=new Dt("pressstart",R,b);n(A),D=A.shouldStopPropagation}return r&&r(!0),L.isTriggeringEvent=!1,L.didFirePressStart=!0,h(!0),D}),E=Z((b,R,L=!0)=>{let D=m.current;if(!D.didFirePressStart)return!1;D.ignoreClickAfterPress=!0,D.didFirePressStart=!1,D.isTriggeringEvent=!0;let A=!0;if(o){let g=new Dt("pressend",R,b);o(g),A=g.shouldStopPropagation}if(r&&r(!1),h(!1),e&&L&&!l){let g=new Dt("press",R,b);e(g),A&&(A=g.shouldStopPropagation)}return D.isTriggeringEvent=!1,A}),K=Z((b,R)=>{let L=m.current;if(l)return!1;if(i){L.isTriggeringEvent=!0;let D=new Dt("pressup",R,b);return i(D),L.isTriggeringEvent=!1,D.shouldStopPropagation}return!0}),T=Z(b=>{let R=m.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&E(fe(R.target,b),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,y(),d||Et(R.target))}),w=Z(b=>{c&&T(b)}),F=s.useMemo(()=>{let b=m.current,R={onKeyDown(D){if(ar(D.nativeEvent,D.currentTarget)&&D.currentTarget.contains(D.target)){var A;Yn(D.target,D.key)&&D.preventDefault();let g=!0;if(!b.isPressed&&!D.repeat){b.target=D.currentTarget,b.isPressed=!0,g=C(D,"keyboard");let P=D.currentTarget,M=N=>{ar(N,P)&&!N.repeat&&P.contains(N.target)&&b.target&&K(fe(b.target,N),"keyboard")};$(j(D.currentTarget),"keyup",Ce(M,L),!0)}g&&D.stopPropagation(),D.metaKey&&we()&&((A=b.metaKeyEvents)===null||A===void 0||A.set(D.key,D.nativeEvent))}else D.key==="Meta"&&(b.metaKeyEvents=new Map)},onClick(D){if(!(D&&!D.currentTarget.contains(D.target))&&D&&D.button===0&&!b.isTriggeringEvent&&!Fe.isOpening){let A=!0;if(l&&D.preventDefault(),!b.ignoreClickAfterPress&&!b.ignoreEmulatedMouseEvents&&!b.isPressed&&(b.pointerType==="virtual"||kr(D.nativeEvent))){!l&&!u&&he(D.currentTarget);let g=C(D,"virtual"),P=K(D,"virtual"),M=E(D,"virtual");A=g&&P&&M}b.ignoreEmulatedMouseEvents=!1,b.ignoreClickAfterPress=!1,A&&D.stopPropagation()}}},L=D=>{var A;if(b.isPressed&&b.target&&ar(D,b.target)){var g;Yn(D.target,D.key)&&D.preventDefault();let M=D.target;E(fe(b.target,D),"keyboard",b.target.contains(M)),y(),D.key!=="Enter"&&en(b.target)&&b.target.contains(M)&&!D[Gn]&&(D[Gn]=!0,Fe(b.target,D,!1)),b.isPressed=!1,(g=b.metaKeyEvents)===null||g===void 0||g.delete(D.key)}else if(D.key==="Meta"&&(!((A=b.metaKeyEvents)===null||A===void 0)&&A.size)){var P;let M=b.metaKeyEvents;b.metaKeyEvents=void 0;for(let N of M.values())(P=b.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(vu(P.nativeEvent)){b.pointerType="virtual";return}ur(P.currentTarget)&&P.preventDefault(),b.pointerType=P.pointerType;let M=!0;if(!b.isPressed){b.isPressed=!0,b.isOverTarget=!0,b.activePointerId=P.pointerId,b.target=P.currentTarget,!l&&!u&&he(P.currentTarget),d||_n(b.target),M=C(P,b.pointerType);let N=P.target;"releasePointerCapture"in N&&N.releasePointerCapture(P.pointerId),$(j(P.currentTarget),"pointerup",D,!1),$(j(P.currentTarget),"pointercancel",g,!1)}M&&P.stopPropagation()},R.onMouseDown=P=>{P.currentTarget.contains(P.target)&&P.button===0&&(ur(P.currentTarget)&&P.preventDefault(),P.stopPropagation())},R.onPointerUp=P=>{!P.currentTarget.contains(P.target)||b.pointerType==="virtual"||P.button===0&&K(P,b.pointerType||P.pointerType)},R.onPointerEnter=P=>{P.pointerId===b.activePointerId&&b.target&&!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,C(fe(b.target,P),b.pointerType))},R.onPointerLeave=P=>{P.pointerId===b.activePointerId&&b.target&&b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,E(fe(b.target,P),b.pointerType,!1),w(P))};let D=P=>{P.pointerId===b.activePointerId&&b.isPressed&&P.button===0&&b.target&&(b.target.contains(P.target)&&b.pointerType!=null?E(fe(b.target,P),b.pointerType):b.isOverTarget&&b.pointerType!=null&&E(fe(b.target,P),b.pointerType,!1),b.isPressed=!1,b.isOverTarget=!1,b.activePointerId=null,b.pointerType=null,y(),d||Et(b.target),"ontouchend"in b.target&&P.pointerType!=="mouse"&&$(b.target,"touchend",A,{once:!0}))},A=P=>{ni(P.currentTarget)&&P.preventDefault()},g=P=>{T(P)};R.onDragStart=P=>{P.currentTarget.contains(P.target)&&T(P)}}else{R.onMouseDown=g=>{if(g.button!==0||!g.currentTarget.contains(g.target))return;if(ur(g.currentTarget)&&g.preventDefault(),b.ignoreEmulatedMouseEvents){g.stopPropagation();return}b.isPressed=!0,b.isOverTarget=!0,b.target=g.currentTarget,b.pointerType=kr(g.nativeEvent)?"virtual":"mouse",!l&&!u&&he(g.currentTarget),C(g,b.pointerType)&&g.stopPropagation(),$(j(g.currentTarget),"mouseup",D,!1)},R.onMouseEnter=g=>{if(!g.currentTarget.contains(g.target))return;let P=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!0,P=C(g,b.pointerType)),P&&g.stopPropagation()},R.onMouseLeave=g=>{if(!g.currentTarget.contains(g.target))return;let P=!0;b.isPressed&&!b.ignoreEmulatedMouseEvents&&b.pointerType!=null&&(b.isOverTarget=!1,P=E(g,b.pointerType,!1),w(g)),P&&g.stopPropagation()},R.onMouseUp=g=>{g.currentTarget.contains(g.target)&&!b.ignoreEmulatedMouseEvents&&g.button===0&&K(g,b.pointerType||"mouse")};let D=g=>{if(g.button===0){if(b.isPressed=!1,y(),b.ignoreEmulatedMouseEvents){b.ignoreEmulatedMouseEvents=!1;return}b.target&&sr(g,b.target)&&b.pointerType!=null?E(fe(b.target,g),b.pointerType):b.target&&b.isOverTarget&&b.pointerType!=null&&E(fe(b.target,g),b.pointerType,!1),b.isOverTarget=!1}};R.onTouchStart=g=>{if(!g.currentTarget.contains(g.target))return;let P=Su(g.nativeEvent);if(!P)return;b.activePointerId=P.identifier,b.ignoreEmulatedMouseEvents=!0,b.isOverTarget=!0,b.isPressed=!0,b.target=g.currentTarget,b.pointerType="touch",!l&&!u&&he(g.currentTarget),d||_n(b.target),C(ye(b.target,g),b.pointerType)&&g.stopPropagation(),$(ae(g.currentTarget),"scroll",A,!0)},R.onTouchMove=g=>{if(!g.currentTarget.contains(g.target))return;if(!b.isPressed){g.stopPropagation();return}let P=qn(g.nativeEvent,b.activePointerId),M=!0;P&&sr(P,g.currentTarget)?!b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!0,M=C(ye(b.target,g),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(b.isOverTarget=!1,M=E(ye(b.target,g),b.pointerType,!1),w(ye(b.target,g))),M&&g.stopPropagation()},R.onTouchEnd=g=>{if(!g.currentTarget.contains(g.target))return;if(!b.isPressed){g.stopPropagation();return}let P=qn(g.nativeEvent,b.activePointerId),M=!0;P&&sr(P,g.currentTarget)&&b.pointerType!=null?(K(ye(b.target,g),b.pointerType),M=E(ye(b.target,g),b.pointerType)):b.isOverTarget&&b.pointerType!=null&&(M=E(ye(b.target,g),b.pointerType,!1)),M&&g.stopPropagation(),b.isPressed=!1,b.activePointerId=null,b.isOverTarget=!1,b.ignoreEmulatedMouseEvents=!0,b.target&&!d&&Et(b.target),y()},R.onTouchCancel=g=>{g.currentTarget.contains(g.target)&&(g.stopPropagation(),b.isPressed&&T(ye(b.target,g)))};let A=g=>{b.isPressed&&g.target.contains(b.target)&&T({currentTarget:b.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=g=>{g.currentTarget.contains(g.target)&&T(g)}}return R},[$,l,u,y,d,T,w,E,C,K]);return s.useEffect(()=>()=>{var b;d||Et((b=m.current.target)!==null&&b!==void 0?b:void 0)},[d]),{isPressed:a||f,pressProps:B(v,F)}}function en(t){return t.tagName==="A"&&t.hasAttribute("href")}function ar(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof ae(o).HTMLInputElement&&!oi(o,r)||o instanceof ae(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&en(o))&&r!=="Enter")}function Su(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function qn(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function ye(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function fe(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function Cu(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function wu(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function sr(t,e){let r=e.getBoundingClientRect(),n=Cu(t);return wu(r,n)}function ur(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function ni(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!en(t)}function Yn(t,e){return t instanceof HTMLInputElement?!oi(t,e):ni(t)}const Eu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function oi(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Eu.has(t.type)}const Tu=s.forwardRef(({children:t,...e},r)=>{let n=s.useRef(!1),o=s.useContext(ft);r=oe(r||(o==null?void 0:o.ref));let i=B(o||{},{...e,ref:r,register(){n.current=!0,o&&o.register()}});return Jr(o,r),s.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)},[]),s.createElement(ft.Provider,{value:i},t)});function Du({children:t}){let e=s.useMemo(()=>({register:()=>{}}),[]);return s.createElement(ft.Provider,{value:e},t)}class ku{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,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=e}}function ii(t){let e=s.useRef({isFocused:!1,observer:null});z(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=Z(n=>{t==null||t(n)});return s.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&&r(new ku("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 a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}function li(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=s.useCallback(u=>{if(u.target===u.currentTarget)return n&&n(u),o&&o(!1),!0},[n,o]),l=ii(i),a=s.useCallback(u=>{const c=j(u.target);u.target===u.currentTarget&&c.activeElement===u.target&&(r&&r(u),o&&o(!0),l(u))},[o,r,l]);return{focusProps:{onFocus:!e&&(r||o||n)?a:void 0,onBlur:!e&&(n||o)?i:void 0}}}let ze=null,Kr=new Set,ut=new Map,Be=!1,Lr=!1;const Ru={Tab:!0,Escape:!0};function Ut(t,e){for(let r of Kr)r(t,e)}function Ku(t){return!(t.metaKey||!we()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function It(t){Be=!0,Ku(t)&&(ze="keyboard",Ut("keyboard",t))}function le(t){ze="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Be=!0,Ut("pointer",t))}function ai(t){kr(t)&&(Be=!0,ze="virtual")}function si(t){t.target===window||t.target===document||(!Be&&!Lr&&(ze="virtual",Ut("virtual",t)),Be=!1,Lr=!1)}function ui(){Be=!1,Lr=!0}function Mr(t){if(typeof window>"u"||ut.get(ae(t)))return;const e=ae(t),r=j(t);let n=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Be=!0,n.apply(this,arguments)},r.addEventListener("keydown",It,!0),r.addEventListener("keyup",It,!0),r.addEventListener("click",ai,!0),e.addEventListener("focus",si,!0),e.addEventListener("blur",ui,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",le,!0),r.addEventListener("pointermove",le,!0),r.addEventListener("pointerup",le,!0)):(r.addEventListener("mousedown",le,!0),r.addEventListener("mousemove",le,!0),r.addEventListener("mouseup",le,!0)),e.addEventListener("beforeunload",()=>{ci(t)},{once:!0}),ut.set(e,{focus:n})}const ci=(t,e)=>{const r=ae(t),n=j(t);e&&n.removeEventListener("DOMContentLoaded",e),ut.has(r)&&(r.HTMLElement.prototype.focus=ut.get(r).focus,n.removeEventListener("keydown",It,!0),n.removeEventListener("keyup",It,!0),n.removeEventListener("click",ai,!0),r.removeEventListener("focus",si,!0),r.removeEventListener("blur",ui,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",le,!0),n.removeEventListener("pointermove",le,!0),n.removeEventListener("pointerup",le,!0)):(n.removeEventListener("mousedown",le,!0),n.removeEventListener("mousemove",le,!0),n.removeEventListener("mouseup",le,!0)),ut.delete(r))};function Lu(t){const e=j(t);let r;return e.readyState!=="loading"?Mr(t):(r=()=>{Mr(t)},e.addEventListener("DOMContentLoaded",r)),()=>ci(t,r)}typeof document<"u"&&Lu();function pt(){return ze!=="pointer"}function vt(){return ze}function di(t){ze=t,Ut(t,null)}const Mu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Au(t,e,r){var n;const o=typeof window<"u"?ae(r==null?void 0:r.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?ae(r==null?void 0:r.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?ae(r==null?void 0:r.target).HTMLElement:HTMLElement,a=typeof window<"u"?ae(r==null?void 0:r.target).KeyboardEvent:KeyboardEvent;return t=t||(r==null?void 0:r.target)instanceof o&&!Mu.has(r==null||(n=r.target)===null||n===void 0?void 0:n.type)||(r==null?void 0:r.target)instanceof i||(r==null?void 0:r.target)instanceof l&&(r==null?void 0:r.target.isContentEditable),!(t&&e==="keyboard"&&r instanceof a&&!Ru[r.key])}function Fu(t,e,r){Mr(),s.useEffect(()=>{let n=(o,i)=>{Au(!!(r!=null&&r.isTextInput),o,i)&&t(pt())};return Kr.add(n),()=>{Kr.delete(n)}},e)}function Gt(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=s.useRef({isFocusWithin:!1}),l=s.useCallback(c=>{i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,r&&r(c),o&&o(!1))},[r,o,i]),a=ii(l),u=s.useCallback(c=>{!i.current.isFocusWithin&&document.activeElement===c.target&&(n&&n(c),o&&o(!0),i.current.isFocusWithin=!0,a(c))},[n,o,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Bt=!1,cr=0;function Ar(){Bt=!0,setTimeout(()=>{Bt=!1},50)}function Zn(t){t.pointerType==="touch"&&Ar()}function Iu(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Zn):document.addEventListener("touchend",Ar),cr++,()=>{cr--,!(cr>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Zn):document.removeEventListener("touchend",Ar))}}function He(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,l]=s.useState(!1),a=s.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;s.useEffect(Iu,[]);let{hoverProps:u,triggerHoverEnd:c}=s.useMemo(()=>{let d=(f,h)=>{if(a.pointerType=h,o||h==="touch"||a.isHovered||!f.currentTarget.contains(f.target))return;a.isHovered=!0;let m=f.currentTarget;a.target=m,e&&e({type:"hoverstart",target:m,pointerType:h}),r&&r(!0),l(!0)},p=(f,h)=>{if(a.pointerType="",a.target=null,h==="touch"||!a.isHovered)return;a.isHovered=!1;let m=f.currentTarget;n&&n({type:"hoverend",target:m,pointerType:h}),r&&r(!1),l(!1)},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=f=>{Bt&&f.pointerType==="mouse"||d(f,f.pointerType)},v.onPointerLeave=f=>{!o&&f.currentTarget.contains(f.target)&&p(f,f.pointerType)}):(v.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=f=>{!a.ignoreEmulatedMouseEvents&&!Bt&&d(f,"mouse"),a.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=f=>{!o&&f.currentTarget.contains(f.target)&&p(f,"mouse")}),{hoverProps:v,triggerHoverEnd:p}},[e,r,n,o,a]);return s.useEffect(()=>{o&&c({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}function Bu(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:o}=t,i=s.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=Z(u=>{r&&kt(u,e)&&(o&&o(u),i.current.isPointerDown=!0)}),a=Z(u=>{r&&r(u)});s.useEffect(()=>{let u=i.current;if(n)return;const c=e.current,d=j(c);if(typeof PointerEvent<"u"){let p=v=>{u.isPointerDown&&kt(v,e)&&a(v),u.isPointerDown=!1};return d.addEventListener("pointerdown",l,!0),d.addEventListener("pointerup",p,!0),()=>{d.removeEventListener("pointerdown",l,!0),d.removeEventListener("pointerup",p,!0)}}else{let p=f=>{u.ignoreEmulatedMouseEvents?u.ignoreEmulatedMouseEvents=!1:u.isPointerDown&&kt(f,e)&&a(f),u.isPointerDown=!1},v=f=>{u.ignoreEmulatedMouseEvents=!0,u.isPointerDown&&kt(f,e)&&a(f),u.isPointerDown=!1};return d.addEventListener("mousedown",l,!0),d.addEventListener("mouseup",p,!0),d.addEventListener("touchstart",l,!0),d.addEventListener("touchend",v,!0),()=>{d.removeEventListener("mousedown",l,!0),d.removeEventListener("mouseup",p,!0),d.removeEventListener("touchstart",l,!0),d.removeEventListener("touchend",v,!0)}}},[e,n,l,a])}function kt(t,e){if(t.button>0)return!1;if(t.target){const r=t.target.ownerDocument;if(!r||!r.documentElement.contains(t.target)||t.target.closest("[data-react-aria-top-layer]"))return!1}return e.current&&!e.current.contains(t.target)}function Xn(t){if(!t)return;let e=!0;return r=>{let n={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.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}};t(n),e&&r.stopPropagation()}}function Nu(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:Xn(t.onKeyDown),onKeyUp:Xn(t.onKeyUp)}}}const Ou=500;function fi(t){let{isDisabled:e,onLongPressStart:r,onLongPressEnd:n,onLongPress:o,threshold:i=Ou,accessibilityDescription:l}=t;const a=s.useRef(void 0);let{addGlobalListener:u,removeGlobalListener:c}=qo(),{pressProps:d}=Ie({isDisabled:e,onPressStart(v){if(v.continuePropagation(),(v.pointerType==="mouse"||v.pointerType==="touch")&&(r&&r({...v,type:"longpressstart"}),a.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o&&o({...v,type:"longpress"}),a.current=void 0},i),v.pointerType==="touch")){let f=h=>{h.preventDefault()};u(v.target,"contextmenu",f,{once:!0}),u(window,"pointerup",()=>{setTimeout(()=>{c(v.target,"contextmenu",f)},30)},{once:!0})}},onPressEnd(v){a.current&&clearTimeout(a.current),n&&(v.pointerType==="mouse"||v.pointerType==="touch")&&n({...v,type:"longpressend"})}}),p=pu(o&&!e?l:void 0);return{longPressProps:B(d,p)}}function Ne(t){const e=j(t);if(vt()==="virtual"){let r=e.activeElement;Go(()=>{e.activeElement===r&&t.isConnected&&he(t)})}else he(t)}function zu(t){const e=ae(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:l,visibility:a}=i(t);o=l!=="none"&&a!=="hidden"&&a!=="collapse"}return o}function Hu(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function pi(t,e){return t.nodeName!=="#comment"&&zu(t)&&Hu(t,e)&&(!t.parentElement||pi(t.parentElement,t))}const Jn=s.createContext(null),Fr="react-aria-focus-scope-restore";let V=null;function vi(t){let{children:e,contain:r,restoreFocus:n,autoFocus:o}=t,i=s.useRef(null),l=s.useRef(null),a=s.useRef([]),{parentNode:u}=s.useContext(Jn)||{},c=s.useMemo(()=>new Br({scopeRef:a}),[a]);z(()=>{let v=u||U.root;if(U.getTreeNode(v.scopeRef)&&V&&!Nt(V,v.scopeRef)){let f=U.getTreeNode(V);f&&(v=f)}v.addChild(c),U.addNode(c)},[c,u]),z(()=>{let v=U.getTreeNode(a);v&&(v.contain=!!r)},[r]),z(()=>{var v;let f=(v=i.current)===null||v===void 0?void 0:v.nextSibling,h=[],m=$=>$.stopPropagation();for(;f&&f!==l.current;)h.push(f),f.addEventListener(Fr,m),f=f.nextSibling;return a.current=h,()=>{for(let $ of h)$.removeEventListener(Fr,m)}},[e]),qu(a,n,r),_u(a,r),Yu(a,n,r),Gu(a,o),s.useEffect(()=>{const v=j(a.current?a.current[0]:void 0).activeElement;let f=null;if(se(v,a.current)){for(let h of U.traverse())h.scopeRef&&se(v,h.scopeRef.current)&&(f=h);f===U.getTreeNode(a)&&(V=f.scopeRef)}},[a]),z(()=>()=>{var v,f,h;let m=(h=(f=U.getTreeNode(a))===null||f===void 0||(v=f.parent)===null||v===void 0?void 0:v.scopeRef)!==null&&h!==void 0?h:null;(a===V||Nt(a,V))&&(!m||U.getTreeNode(m))&&(V=m),U.removeTreeNode(a)},[a]);let d=s.useMemo(()=>Vu(a),[]),p=s.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return s.createElement(Jn.Provider,{value:p},s.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),e,s.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Vu(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,a=n||j(r[0]).activeElement,u=r[0].previousElementSibling,c=Ae(r),d=re(c,{tabbable:o,accept:l},r);d.currentNode=se(a,r)?a:u;let p=d.nextNode();return!p&&i&&(d.currentNode=u,p=d.nextNode()),p&&J(p,!0),p},focusPrevious(e={}){let r=t.current,{from:n,tabbable:o,wrap:i,accept:l}=e,a=n||j(r[0]).activeElement,u=r[r.length-1].nextElementSibling,c=Ae(r),d=re(c,{tabbable:o,accept:l},r);d.currentNode=se(a,r)?a:u;let p=d.previousNode();return!p&&i&&(d.currentNode=u,p=d.previousNode()),p&&J(p,!0),p},focusFirst(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ae(r),l=re(i,{tabbable:n,accept:o},r);l.currentNode=r[0].previousElementSibling;let a=l.nextNode();return a&&J(a,!0),a},focusLast(e={}){let r=t.current,{tabbable:n,accept:o}=e,i=Ae(r),l=re(i,{tabbable:n,accept:o},r);l.currentNode=r[r.length-1].nextElementSibling;let a=l.previousNode();return a&&J(a,!0),a}}}const tn=["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"])'],ju=tn.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";tn.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Wu=tn.join(':not([hidden]):not([tabindex="-1"]),');function Ae(t){return t[0].parentElement}function at(t){let e=U.getTreeNode(V);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function _u(t,e){let r=s.useRef(void 0),n=s.useRef(void 0);z(()=>{let o=t.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||!at(t)||c.isComposing)return;let d=i.activeElement,p=t.current;if(!p||!se(d,p))return;let v=Ae(p),f=re(v,{tabbable:!0},p);if(!d)return;f.currentNode=d;let h=c.shiftKey?f.previousNode():f.nextNode();h||(f.currentNode=c.shiftKey?p[p.length-1].nextElementSibling:p[0].previousElementSibling,h=c.shiftKey?f.previousNode():f.nextNode()),c.preventDefault(),h&&J(h,!0)},a=c=>{(!V||Nt(V,t))&&se(c.target,t.current)?(V=t,r.current=c.target):at(t)&&!xe(c.target,t)?r.current?r.current.focus():V&&V.current&&Ir(V.current):at(t)&&(r.current=c.target)},u=c=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let d=vt();if(!((d==="virtual"||d===null)&&Xr()&&_o())&&i.activeElement&&at(t)&&!xe(i.activeElement,t))if(V=t,i.body.contains(c.target)){var v;r.current=c.target,(v=r.current)===null||v===void 0||v.focus()}else V.current&&Ir(V.current)})};return i.addEventListener("keydown",l,!1),i.addEventListener("focusin",a,!1),o==null||o.forEach(c=>c.addEventListener("focusin",a,!1)),o==null||o.forEach(c=>c.addEventListener("focusout",u,!1)),()=>{i.removeEventListener("keydown",l,!1),i.removeEventListener("focusin",a,!1),o==null||o.forEach(c=>c.removeEventListener("focusin",a,!1)),o==null||o.forEach(c=>c.removeEventListener("focusout",u,!1))}},[t,e]),z(()=>()=>{n.current&&cancelAnimationFrame(n.current)},[n])}function bi(t){return xe(t)}function se(t,e){return!t||!e?!1:e.some(r=>r.contains(t))}function xe(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of U.traverse(U.getTreeNode(e)))if(r&&se(t,r.current))return!0;return!1}function Uu(t){return xe(t,V)}function Nt(t,e){var r;let n=(r=U.getTreeNode(e))===null||r===void 0?void 0:r.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function J(t,e=!1){if(t!=null&&!e)try{Ne(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function hi(t,e=!0){let r=t[0].previousElementSibling,n=Ae(t),o=re(n,{tabbable:e},t);o.currentNode=r;let i=o.nextNode();return e&&!i&&(n=Ae(t),o=re(n,{tabbable:!1},t),o.currentNode=r,i=o.nextNode()),i}function Ir(t,e=!0){J(hi(t,e))}function Gu(t,e){const r=s.useRef(e);s.useEffect(()=>{if(r.current){V=t;const n=j(t.current?t.current[0]:void 0);!se(n.activeElement,V.current)&&t.current&&Ir(t.current)}r.current=!1},[t])}function qu(t,e,r){z(()=>{if(e||r)return;let n=t.current;const o=j(n?n[0]:void 0);let i=l=>{let a=l.target;se(a,t.current)?V=t:bi(a)||(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))}},[t,e,r])}function Qn(t){let e=U.getTreeNode(V);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return(e==null?void 0:e.scopeRef)===t}function Yu(t,e,r){const n=s.useRef(typeof document<"u"?j(t.current?t.current[0]:void 0).activeElement:null);z(()=>{let o=t.current;const i=j(o?o[0]:void 0);if(!e||r)return;let l=()=>{(!V||Nt(V,t))&&se(i.activeElement,t.current)&&(V=t)};return i.addEventListener("focusin",l,!1),o==null||o.forEach(a=>a.addEventListener("focusin",l,!1)),()=>{i.removeEventListener("focusin",l,!1),o==null||o.forEach(a=>a.removeEventListener("focusin",l,!1))}},[t,r]),z(()=>{const o=j(t.current?t.current[0]:void 0);if(!e)return;let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!at(t)||l.isComposing)return;let a=o.activeElement;if(!xe(a,t)||!Qn(t))return;let u=U.getTreeNode(t);if(!u)return;let c=u.nodeToRestore,d=re(o.body,{tabbable:!0});d.currentNode=a;let p=l.shiftKey?d.previousNode():d.nextNode();if((!c||!o.body.contains(c)||c===o.body)&&(c=void 0,u.nodeToRestore=void 0),(!p||!xe(p,t))&&c){d.currentNode=c;do p=l.shiftKey?d.previousNode():d.nextNode();while(xe(p,t));l.preventDefault(),l.stopPropagation(),p?J(p,!0):bi(c)?J(c,!0):a.blur()}};return r||o.addEventListener("keydown",i,!0),()=>{r||o.removeEventListener("keydown",i,!0)}},[t,e,r]),z(()=>{const o=j(t.current?t.current[0]:void 0);if(!e)return;let i=U.getTreeNode(t);if(i){var l;return i.nodeToRestore=(l=n.current)!==null&&l!==void 0?l:void 0,()=>{let a=U.getTreeNode(t);if(!a)return;let u=a.nodeToRestore;if(e&&u&&(o.activeElement&&xe(o.activeElement,t)||o.activeElement===o.body&&Qn(t))){let c=U.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let d=c.getTreeNode(t);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){eo(d.nodeToRestore);return}d=d.parent}for(d=c.getTreeNode(t);d;){if(d.scopeRef&&d.scopeRef.current&&U.getTreeNode(d.scopeRef)){let p=hi(d.scopeRef.current,!0);eo(p);return}d=d.parent}}})}}}},[t,e])}function eo(t){t.dispatchEvent(new CustomEvent(Fr,{bubbles:!0,cancelable:!0}))&&J(t)}function re(t,e,r){let n=e!=null&&e.tabbable?Wu:ju,o=j(t).createTreeWalker(t,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)&&pi(i)&&(!r||se(i,r))&&(!(e!=null&&e.accept)||e.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(o.currentNode=e.from),o}function Zu(t,e={}){return{focusNext(r={}){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:a=e.accept}=r,u=o||j(n).activeElement,c=re(n,{tabbable:i,accept:a});n.contains(u)&&(c.currentNode=u);let d=c.nextNode();return!d&&l&&(c.currentNode=n,d=c.nextNode()),d&&J(d,!0),d},focusPrevious(r=e){let n=t.current;if(!n)return null;let{from:o,tabbable:i=e.tabbable,wrap:l=e.wrap,accept:a=e.accept}=r,u=o||j(n).activeElement,c=re(n,{tabbable:i,accept:a});if(n.contains(u))c.currentNode=u;else{let p=dr(c);return p&&J(p,!0),p??null}let d=c.previousNode();if(!d&&l){c.currentNode=n;let p=dr(c);if(!p)return null;d=p}return d&&J(d,!0),d??null},focusFirst(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,a=re(n,{tabbable:o,accept:i}).nextNode();return a&&J(a,!0),a},focusLast(r=e){let n=t.current;if(!n)return null;let{tabbable:o=e.tabbable,accept:i=e.accept}=r,l=re(n,{tabbable:o,accept:i}),a=dr(l);return a&&J(a,!0),a??null}}}function dr(t){let e,r;do r=t.lastChild(),r&&(e=r);while(r);return e}class rn{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new Br({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 r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&se(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){var e;let r=new rn;var n;for(let o of this.traverse())r.addTreeNode(o.scopeRef,(n=(e=o.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,o.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new Br({scopeRef:null}),this.fastMap.set(null,this.root)}}class Br{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 rn;function De(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=s.useRef({isFocused:!1,isFocusVisible:e||pt()}),[i,l]=s.useState(!1),[a,u]=s.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=s.useCallback(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=s.useCallback(f=>{o.current.isFocused=f,l(f),c()},[c]);Fu(f=>{o.current.isFocusVisible=f,c()},[],{isTextInput:r});let{focusProps:p}=li({isDisabled:n,onFocusChange:d}),{focusWithinProps:v}=Gt({isDisabled:!n,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:n?v:p}}let gi=s.createContext(null);function Xu(t){let e=s.useContext(gi)||{};Jr(e,t);let{ref:r,...n}=e;return n}const Ju=s.forwardRef(function(e,r){let{children:n,...o}=e,i=oe(r),l={...o,ref:i};return s.createElement(gi.Provider,{value:l},n)});function Xe(t,e){let{focusProps:r}=li(t),{keyboardProps:n}=Nu(t),o=B(r,n),i=Xu(e),l=t.isDisabled?{}:i,a=s.useRef(t.autoFocus);return s.useEffect(()=>{a.current&&e.current&&Ne(e.current),a.current=!1},[e]),{focusableProps:B({...o,tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0},l)}}function Qu(t,e){let{elementType:r="a",onPress:n,onPressStart:o,onPressEnd:i,onClick:l,isDisabled:a,...u}=t,c={};r!=="a"&&(c={role:"link",tabIndex:a?void 0:0});let{focusableProps:d}=Xe(t,e),{pressProps:p,isPressed:v}=Ie({onPress:n,onPressStart:o,onPressEnd:i,isDisabled:a,ref:e}),f=q(u,{labelable:!0}),h=B(d,p),m=_t(),$=Uo(t);return{isPressed:v,linkProps:B(f,$,{...h,...c,"aria-disabled":a||void 0,"aria-current":t["aria-current"],onClick:y=>{var C;(C=p.onClick)===null||C===void 0||C.call(p,y),l&&(l(y),console.warn("onClick is deprecated, please use onPress")),!m.isNative&&y.currentTarget instanceof HTMLAnchorElement&&y.currentTarget.href&&!y.isDefaultPrevented()&&au(y.currentTarget,y)&&t.href&&(y.preventDefault(),m.open(y.currentTarget,y,t.href,t.routerOptions))}})}}const ec=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),tc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function rc(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return ec.has(r.script)}let e=t.split("-")[0];return tc.has(e)}const nc=Symbol.for("react-aria.i18n.locale");function mi(){let t=typeof window<"u"&&window[nc]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:rc(t)?"rtl":"ltr"}}let Nr=mi(),st=new Set;function to(){Nr=mi();for(let t of st)t(Nr)}function oc(){let t=Ee(),[e,r]=s.useState(Nr);return s.useEffect(()=>(st.size===0&&window.addEventListener("languagechange",to),st.add(r),()=>{st.delete(r),st.size===0&&window.removeEventListener("languagechange",to)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const ic=s.createContext(null);function Ve(){let t=oc();return s.useContext(ic)||t}const lc=Symbol.for("react-aria.i18n.locale"),ac=Symbol.for("react-aria.i18n.strings");let _e;class qt{getStringForLocale(e,r){let o=this.getStringsForLocale(r)[e];if(!o)throw new Error(`Could not find intl message ${e} in ${r} locale`);return o}getStringsForLocale(e){let r=this.strings[e];return r||(r=sc(e,this.strings,this.defaultLocale),this.strings[e]=r),r}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let r=window[lc];if(_e===void 0){let o=window[ac];if(!o)return null;_e={};for(let i in o)_e[i]=new qt({[r]:o[i]},r)}let n=_e==null?void 0:_e[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,r="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,n])=>n)),this.defaultLocale=r}}function sc(t,e,r="en-US"){if(e[t])return e[t];let n=uc(t);if(e[n])return e[n];for(let o in e)if(o.startsWith(n+"-"))return e[o];return e[r]}function uc(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const ro=new Map,no=new Map;class cc{format(e,r){let n=this.strings.getStringForLocale(e,this.locale);return typeof n=="function"?n(r,this):n}plural(e,r,n="cardinal"){let o=r["="+e];if(o)return typeof o=="function"?o():o;let i=this.locale+":"+n,l=ro.get(i);l||(l=new Intl.PluralRules(this.locale,{type:n}),ro.set(i,l));let a=l.select(e);return o=r[a]||r.other,typeof o=="function"?o():o}number(e){let r=no.get(this.locale);return r||(r=new Intl.NumberFormat(this.locale),no.set(this.locale,r)),r.format(e)}select(e,r){let n=e[r]||e.other;return typeof n=="function"?n():n}constructor(e,r){this.locale=e,this.strings=r}}const oo=new WeakMap;function dc(t){let e=oo.get(t);return e||(e=new qt(t),oo.set(t,e)),e}function fc(t,e){return e&&qt.getGlobalDictionaryForPackage(e)||dc(t)}function nn(t,e){let{locale:r}=Ve(),n=fc(t,e);return s.useMemo(()=>new cc(r,n),[r,n])}let fr=new Map,Or=!1;try{Or=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Ot=!1;try{Ot=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const yi={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class pc{format(e){let r="";if(!Or&&this.options.signDisplay!=null?r=bc(this.numberFormatter,this.options.signDisplay,e):r=this.numberFormatter.format(e),this.options.style==="unit"&&!Ot){var n;let{unit:o,unitDisplay:i="short",locale:l}=this.resolvedOptions();if(!o)return r;let a=(n=yi[o])===null||n===void 0?void 0:n[i];r+=a[l]||a.default}return r}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(r)}`}formatRangeToParts(e,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let n=this.numberFormatter.formatToParts(e),o=this.numberFormatter.formatToParts(r);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!Or&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!Ot&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,r={}){this.numberFormatter=vc(e,r),this.options=r}}function vc(t,e={}){let{numberingSystem:r}=e;if(r&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${r}`),e.style==="unit"&&!Ot){var n;let{unit:l,unitDisplay:a="short"}=e;if(!l)throw new Error('unit option must be provided with style: "unit"');if(!(!((n=yi[l])===null||n===void 0)&&n[a]))throw new Error(`Unsupported unit ${l} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let o=t+(e?Object.entries(e).sort((l,a)=>l[0]<a[0]?-1:1).join():"");if(fr.has(o))return fr.get(o);let i=new Intl.NumberFormat(t,e);return fr.set(o,i),i}function bc(t,e,r){if(e==="auto")return t.format(r);if(e==="never")return t.format(Math.abs(r));{let n=!1;if(e==="always"?n=r>0||Object.is(r,0):e==="exceptZero"&&(Object.is(r,-0)||Object.is(r,0)?r=Math.abs(r):n=r>0),n){let o=t.format(-r),i=t.format(r),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 t.format(r)}}function hc(t={}){let{locale:e}=Ve();return s.useMemo(()=>new pc(e,t),[e,t])}let pr=new Map;function on(t){let{locale:e}=Ve(),r=e+(t?Object.entries(t).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(pr.has(r))return pr.get(r);let n=new Intl.Collator(e,t);return pr.set(r,n),n}function Yt(t,e){let{elementType:r="button",isDisabled:n,onPress:o,onPressStart:i,onPressEnd:l,onPressUp:a,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:p,href:v,target:f,rel:h,type:m="button"}=t,$;r==="button"?$={type:m,disabled:n}:$={role:"button",tabIndex:n?void 0:0,href:r==="a"&&!n?v:void 0,target:r==="a"?f:void 0,type:r==="input"?m:void 0,disabled:r==="input"?n:void 0,"aria-disabled":!n||r==="input"?void 0:n,rel:r==="a"?h:void 0};let{pressProps:y,isPressed:C}=Ie({onPressStart:i,onPressEnd:l,onPressChange:u,onPress:o,onPressUp:a,isDisabled:n,preventFocusOnPress:c,ref:e}),{focusableProps:E}=Xe(t,e);d&&(E.tabIndex=n?-1:E.tabIndex);let K=B(E,y,q(t,{labelable:!0}));return{isPressed:C,buttonProps:B($,K,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],onClick:T=>{p&&(p(T),console.warn("onClick is deprecated, please use onPress"))}})}}function $i(t,e,r){const{isSelected:n}=e,{isPressed:o,buttonProps:i}=Yt({...t,onPress:Ce(e.toggle,t.onPress)},r);return{isPressed:o,isSelected:n,isDisabled:t.isDisabled||!1,buttonProps:B(i,{"aria-pressed":n})}}function gc(t,e){const{"aria-label":r,"aria-labelledby":n,orientation:o="horizontal"}=t;let[i,l]=s.useState(!1);z(()=>{var h;l(!!(e.current&&(!((h=e.current.parentElement)===null||h===void 0)&&h.closest('[role="toolbar"]'))))});const{direction:a}=Ve(),u=a==="rtl"&&o==="horizontal";let c=Zu(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(),p.current=document.activeElement,h.shiftKey?c.focusFirst():c.focusLast();return}else return;h.stopPropagation(),h.preventDefault()}},p=s.useRef(null),v=h=>{!h.currentTarget.contains(h.relatedTarget)&&!p.current&&(p.current=h.target)},f=h=>{var m;if(p.current&&!h.currentTarget.contains(h.relatedTarget)&&(!((m=e.current)===null||m===void 0)&&m.contains(h.target))){var $;($=p.current)===null||$===void 0||$.focus(),p.current=null}};return{toolbarProps:{...q(t,{labelable:!0}),role:i?"group":"toolbar","aria-orientation":o,"aria-label":r,"aria-labelledby":r==null?n:void 0,onKeyDownCapture:i?void 0:d,onFocusCapture:i?void 0:f,onBlurCapture:i?void 0:v}}}function mc(t,e,r){let{isDisabled:n}=t,{toolbarProps:o}=gc(t,r);return{groupProps:{...o,role:e.selectionMode==="single"?"radiogroup":o.role,"aria-disabled":n}}}function yc(t,e,r){let n={isSelected:e.selectedKeys.has(t.id),setSelected(u){e.setSelected(t.id,u)},toggle(){e.toggleKey(t.id)}},{isPressed:o,isSelected:i,isDisabled:l,buttonProps:a}=$i({...t,id:void 0,isDisabled:t.isDisabled||e.isDisabled},n,r);return e.selectionMode==="single"&&(a.role="radio",a["aria-checked"]=n.isSelected,delete a["aria-pressed"]),{isPressed:o,isSelected:i,isDisabled:l,buttonProps:a}}const xi=7e3;let ce=null;function io(t,e="assertive",r=xi){ce?ce.announce(t,e,r):(ce=new $c,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ce.announce(t,e,r):setTimeout(()=>{ce!=null&&ce.isAttached()&&(ce==null||ce.announce(t,e,r))},100))}class $c{isAttached(){var e;return(e=this.node)===null||e===void 0?void 0:e.isConnected}createLog(e){let r=document.createElement("div");return r.setAttribute("role","log"),r.setAttribute("aria-live",e),r.setAttribute("aria-relevant","additions"),r}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,r="assertive",n=xi){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,r==="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 Pi={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Si={...Pi,customError:!0,valid:!1},rt={isInvalid:!1,validationDetails:Pi,validationErrors:[]},xc=s.createContext({}),zr="__formValidationState"+Date.now();function ln(t){if(t[zr]){let{realtimeValidation:e,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}=t[zr];return{realtimeValidation:e,displayValidation:r,updateValidation:n,resetValidation:o,commitValidation:i}}return Pc(t)}function Pc(t){let{isInvalid:e,validationState:r,name:n,value:o,builtinValidation:i,validate:l,validationBehavior:a="aria"}=t;r&&(e||(e=r==="invalid"));let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Si}:null,c=s.useMemo(()=>{if(!l||o==null)return null;let L=Sc(l,o);return lo(L)},[l,o]);i!=null&&i.validationDetails.valid&&(i=void 0);let d=s.useContext(xc),p=s.useMemo(()=>n?Array.isArray(n)?n.flatMap(L=>Hr(d[L])):Hr(d[n]):[],[d,n]),[v,f]=s.useState(d),[h,m]=s.useState(!1);d!==v&&(f(d),m(!1));let $=s.useMemo(()=>lo(h?[]:p),[h,p]),y=s.useRef(rt),[C,E]=s.useState(rt),K=s.useRef(rt),T=()=>{if(!w)return;F(!1);let L=c||i||y.current;vr(L,K.current)||(K.current=L,E(L))},[w,F]=s.useState(!1);return s.useEffect(T),{realtimeValidation:u||$||c||i||rt,displayValidation:a==="native"?u||$||C:u||$||c||i||C,updateValidation(L){a==="aria"&&!vr(C,L)?E(L):y.current=L},resetValidation(){let L=rt;vr(L,K.current)||(K.current=L,E(L)),a==="native"&&F(!1),m(!0)},commitValidation(){a==="native"&&F(!0),m(!0)}}}function Hr(t){return t?Array.isArray(t)?t:[t]:[]}function Sc(t,e){if(typeof t=="function"){let r=t(e);if(r&&typeof r!="boolean")return Hr(r)}return[]}function lo(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Si}:null}function vr(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((r,n)=>r===e.validationErrors[n])&&Object.entries(t.validationDetails).every(([r,n])=>e.validationDetails[r]===n)}function an(t,e,r){let{validationBehavior:n,focus:o}=t;z(()=>{if(n==="native"&&(r!=null&&r.current)&&!r.current.disabled){let u=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";r.current.setCustomValidity(u),r.current.hasAttribute("title")||(r.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(wc(r.current))}});let i=Z(()=>{e.resetValidation()}),l=Z(u=>{var c;e.displayValidation.isInvalid||e.commitValidation();let d=r==null||(c=r.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&r&&d&&Ec(d)===r.current){var p;o?o():(p=r.current)===null||p===void 0||p.focus(),di("keyboard")}u.preventDefault()}),a=Z(()=>{e.commitValidation()});s.useEffect(()=>{let u=r==null?void 0:r.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",l),u.addEventListener("change",a),c==null||c.addEventListener("reset",i),()=>{u.removeEventListener("invalid",l),u.removeEventListener("change",a),c==null||c.removeEventListener("reset",i)}},[r,l,a,i,n])}function Cc(t){let e=t.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 wc(t){return{isInvalid:!t.validity.valid,validationDetails:Cc(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function Ec(t){for(let e=0;e<t.elements.length;e++){let r=t.elements[e];if(!r.validity.valid)return r}return null}function Tc(t,e,r){let{isDisabled:n=!1,isReadOnly:o=!1,value:i,name:l,children:a,"aria-label":u,"aria-labelledby":c,validationState:d="valid",isInvalid:p}=t,v=w=>{w.stopPropagation(),e.setSelected(w.target.checked)},f=a!=null,h=u!=null||c!=null;!f&&!h&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:m,isPressed:$}=Ie({isDisabled:n}),{pressProps:y,isPressed:C}=Ie({isDisabled:n||o,onPress(){e.toggle()}}),{focusableProps:E}=Xe(t,r),K=B(m,E),T=q(t,{labelable:!0});return Qr(r,e.isSelected,e.setSelected),{labelProps:B(y,{onClick:w=>w.preventDefault()}),inputProps:B(T,{"aria-invalid":p||d==="invalid"||void 0,"aria-errormessage":t["aria-errormessage"],"aria-controls":t["aria-controls"],"aria-readonly":o||void 0,onChange:v,disabled:n,...i==null?{}:{value:i},name:l,type:"checkbox",...K}),isSelected:e.isSelected,isPressed:$||C,isDisabled:n,isReadOnly:o,isInvalid:p||d==="invalid"}}function Dc(t,e,r){let n=ln({...t,value:e.isSelected}),{isInvalid:o,validationErrors:i,validationDetails:l}=n.displayValidation,{labelProps:a,inputProps:u,isSelected:c,isPressed:d,isDisabled:p,isReadOnly:v}=Tc({...t,isInvalid:o},e,r);an(t,n,r);let{isIndeterminate:f,isRequired:h,validationBehavior:m="aria"}=t;s.useEffect(()=>{r.current&&(r.current.indeterminate=!!f)});let{pressProps:$}=Ie({isDisabled:p||v,onPress(){let{[zr]:y}=t,{commitValidation:C}=y||n;C()}});return{labelProps:B(a,$),inputProps:{...u,checked:c,"aria-required":h&&m==="aria"||void 0,required:h&&m==="native"},isSelected:c,isPressed:d,isDisabled:p,isReadOnly:v,isInvalid:o,validationErrors:i,validationDetails:l}}function sn(t){let{id:e,label:r,"aria-labelledby":n,"aria-label":o,labelElementType:i="label"}=t;e=X(e);let l=X(),a={};r?(n=n?`${l} ${n}`:l,a={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=Yo({id:e,"aria-label":o,"aria-labelledby":n});return{labelProps:a,fieldProps:u}}function un(t){let{description:e,errorMessage:r,isInvalid:n,validationState:o}=t,{labelProps:i,fieldProps:l}=sn(t),a=ct([!!e,!!r,n,o]),u=ct([!!e,!!r,n,o]);return l=B(l,{"aria-describedby":[a,u,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:l,descriptionProps:{id:a},errorMessageProps:{id:u}}}function Ci(t={}){let{isReadOnly:e}=t,[r,n]=Te(t.isSelected,t.defaultSelected||!1,t.onChange);function o(l){e||n(l)}function i(){e||n(!r)}return{isSelected:r,setSelected:o,toggle:i}}function kc(t){let{selectionMode:e="single",disallowEmptySelection:r,isDisabled:n=!1}=t,[o,i]=Te(s.useMemo(()=>t.selectedKeys?new Set(t.selectedKeys):void 0,[t.selectedKeys]),s.useMemo(()=>t.defaultSelectedKeys?new Set(t.defaultSelectedKeys):new Set,[t.defaultSelectedKeys]),t.onSelectionChange);return{selectionMode:e,isDisabled:n,selectedKeys:o,setSelectedKeys:i,toggleKey(l){let a;e==="multiple"?(a=new Set(o),a.has(l)&&(!r||a.size>1)?a.delete(l):a.add(l)):a=new Set(o.has(l)&&!r?[]:[l]),i(a)},setSelected(l,a){a!==o.has(l)&&this.toggleKey(l)}}}const ao={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 wi(t={}){let{style:e,isFocusable:r}=t,[n,o]=s.useState(!1),{focusWithinProps:i}=Gt({isDisabled:!r,onFocusWithinChange:a=>o(a)}),l=s.useMemo(()=>n?e:e?{...ao,...e}:ao,[n]);return{visuallyHiddenProps:{...i,style:l}}}function Ei(t){let{children:e,elementType:r="div",isFocusable:n,style:o,...i}=t,{visuallyHiddenProps:l}=wi(t);return s.createElement(r,B(i,l),e)}function Rc(t,e){let{inputElementType:r="input",isDisabled:n=!1,isRequired:o=!1,isReadOnly:i=!1,type:l="text",validationBehavior:a="aria"}=t,[u,c]=Te(t.value,t.defaultValue||"",t.onChange),{focusableProps:d}=Xe(t,e),p=ln({...t,value:u}),{isInvalid:v,validationErrors:f,validationDetails:h}=p.displayValidation,{labelProps:m,fieldProps:$,descriptionProps:y,errorMessageProps:C}=un({...t,isInvalid:v,errorMessage:t.errorMessage||f}),E=q(t,{labelable:!0});const K={type:l,pattern:t.pattern};return Qr(e,u,c),an(t,p,e),s.useEffect(()=>{if(e.current instanceof ae(e.current).HTMLTextAreaElement){let T=e.current;Object.defineProperty(T,"defaultValue",{get:()=>T.value,set:()=>{},configurable:!0})}},[e]),{labelProps:m,inputProps:B(E,r==="input"?K:void 0,{disabled:n,readOnly:i,required:o&&a==="native","aria-required":o&&a==="aria"||void 0,"aria-invalid":v||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],"aria-controls":t["aria-controls"],value:u,onChange:T=>c(T.target.value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,placeholder:t.placeholder,inputMode:t.inputMode,autoCorrect:t.autoCorrect,spellCheck:t.spellCheck,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...d,...$}),descriptionProps:y,errorMessageProps:C,isInvalid:v,validationErrors:f,validationDetails:h}}const de={top:"top",bottom:"top",left:"left",right:"left"},zt={top:"bottom",bottom:"top",left:"right",right:"left"},Kc={top:"left",left:"top"},Vr={top:"height",left:"width"},Ti={width:"totalWidth",height:"totalHeight"},Rt={};let Y=typeof document<"u"?window.visualViewport:null;function so(t){let e=0,r=0,n=0,o=0,i=0,l=0,a={};var u;let c=((u=Y==null?void 0:Y.scale)!==null&&u!==void 0?u:1)>1;if(t.tagName==="BODY"){let h=document.documentElement;n=h.clientWidth,o=h.clientHeight;var d;e=(d=Y==null?void 0:Y.width)!==null&&d!==void 0?d:n;var p;r=(p=Y==null?void 0:Y.height)!==null&&p!==void 0?p:o,a.top=h.scrollTop||t.scrollTop,a.left=h.scrollLeft||t.scrollLeft,Y&&(i=Y.offsetTop,l=Y.offsetLeft)}else({width:e,height:r,top:i,left:l}=Ze(t)),a.top=t.scrollTop,a.left=t.scrollLeft,n=e,o=r;if(Zr()&&(t.tagName==="BODY"||t.tagName==="HTML")&&c){a.top=0,a.left=0;var v;i=(v=Y==null?void 0:Y.pageTop)!==null&&v!==void 0?v:0;var f;l=(f=Y==null?void 0:Y.pageLeft)!==null&&f!==void 0?f:0}return{width:e,height:r,totalWidth:n,totalHeight:o,scroll:a,top:i,left:l}}function Lc(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function uo(t,e,r,n,o,i,l){var a;let u=(a=o.scroll[t])!==null&&a!==void 0?a:0,c=n[Vr[t]],d=n.scroll[de[t]]+i,p=c+n.scroll[de[t]]-i,v=e-u+l[t]-n[de[t]],f=e-u+r+l[t]-n[de[t]];return v<d?d-v:f>p?Math.max(p-f,d-v):0}function Mc(t){let e=window.getComputedStyle(t);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 co(t){if(Rt[t])return Rt[t];let[e,r]=t.split(" "),n=de[e]||"right",o=Kc[n];de[r]||(r="center");let i=Vr[n],l=Vr[o];return Rt[t]={placement:e,crossPlacement:r,axis:n,crossAxis:o,size:i,crossSize:l},Rt[t]}function br(t,e,r,n,o,i,l,a,u,c){let{placement:d,crossPlacement:p,axis:v,crossAxis:f,size:h,crossSize:m}=n,$={};var y;$[f]=(y=t[f])!==null&&y!==void 0?y:0;var C,E,K,T;p==="center"?$[f]+=(((C=t[m])!==null&&C!==void 0?C:0)-((E=r[m])!==null&&E!==void 0?E:0))/2:p!==f&&($[f]+=((K=t[m])!==null&&K!==void 0?K:0)-((T=r[m])!==null&&T!==void 0?T:0)),$[f]+=i;const w=t[f]-r[m]+u+c,F=t[f]+t[m]-u-c;if($[f]=Ft($[f],w,F),d===v){const b=a?l[h]:e[Ti[h]];$[zt[v]]=Math.floor(b-t[v]+o)}else $[v]=Math.floor(t[v]+t[h]+o);return $}function Ac(t,e,r,n,o,i,l,a){const u=n?r.height:e[Ti.height];var c;let d=t.top!=null?r.top+t.top:r.top+(u-((c=t.bottom)!==null&&c!==void 0?c:0)-l);var p,v,f,h,m,$;let y=a!=="top"?Math.max(0,e.height+e.top+((p=e.scroll.top)!==null&&p!==void 0?p:0)-d-(((v=o.top)!==null&&v!==void 0?v:0)+((f=o.bottom)!==null&&f!==void 0?f: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)+(($=o.bottom)!==null&&$!==void 0?$:0)+i));return Math.min(e.height-i*2,y)}function fo(t,e,r,n,o,i){let{placement:l,axis:a,size:u}=i;var c,d;if(l===a)return Math.max(0,r[a]-t[a]-((c=t.scroll[a])!==null&&c!==void 0?c:0)+e[a]-((d=n[a])!==null&&d!==void 0?d:0)-n[zt[a]]-o);var p;return Math.max(0,t[u]+t[a]+t.scroll[a]-e[a]-r[a]-r[u]-((p=n[a])!==null&&p!==void 0?p:0)-n[zt[a]]-o)}function Fc(t,e,r,n,o,i,l,a,u,c,d,p,v,f,h,m){let $=co(t),{size:y,crossAxis:C,crossSize:E,placement:K,crossPlacement:T}=$,w=br(e,a,r,$,d,p,c,v,h,m),F=d,b=fo(a,c,e,o,i+d,$);if(l&&n[y]>b){let ke=co(`${zt[K]} ${T}`),tt=br(e,a,r,ke,d,p,c,v,h,m);fo(a,c,e,o,i+d,ke)>b&&($=ke,w=tt,F=d)}let R="bottom";$.axis==="top"?$.placement==="top"?R="top":$.placement==="bottom"&&(R="bottom"):$.crossAxis==="top"&&($.crossPlacement==="top"?R="bottom":$.crossPlacement==="bottom"&&(R="top"));let L=uo(C,w[C],r[E],a,u,i,c);w[C]+=L;let D=Ac(w,a,c,v,o,i,r.height,R);f&&f<D&&(D=f),r.height=Math.min(r.height,D),w=br(e,a,r,$,F,p,c,v,h,m),L=uo(C,w[C],r[E],a,u,i,c),w[C]+=L;let A={},g=e[C]+.5*e[E]-w[C]-o[de[C]];const P=h/2+m;var M,N,O,k;const H=de[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)+((k=o.bottom)!==null&&k!==void 0?k:0),ee=r[E]-H-h/2-m,Je=e[C]+h/2-(w[C]+o[de[C]]),Qe=e[C]+e[E]-h/2-(w[C]+o[de[C]]),et=Ft(g,Je,Qe);return A[C]=Ft(et,P,ee),{position:w,maxHeight:D,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:$.placement}}function Ic(t){let{placement:e,targetNode:r,overlayNode:n,scrollNode:o,padding:i,shouldFlip:l,boundaryElement:a,offset:u,crossOffset:c,maxHeight:d,arrowSize:p=0,arrowBoundaryOffset:v=0}=t,f=n instanceof HTMLElement?Bc(n):document.documentElement,h=f===document.documentElement;const m=window.getComputedStyle(f).position;let $=!!m&&m!=="static",y=h?Ze(r):po(r,f);if(!h){let{marginTop:A,marginLeft:g}=window.getComputedStyle(r);y.top+=parseInt(A,10)||0,y.left+=parseInt(g,10)||0}let C=Ze(n),E=Mc(n);var K,T;C.width+=((K=E.left)!==null&&K!==void 0?K:0)+((T=E.right)!==null&&T!==void 0?T:0);var w,F;C.height+=((w=E.top)!==null&&w!==void 0?w:0)+((F=E.bottom)!==null&&F!==void 0?F:0);let b=Lc(o),R=so(a),L=so(f),D=a.tagName==="BODY"?Ze(f):po(f,a);return f.tagName==="HTML"&&a.tagName==="BODY"&&(L.scroll.top=0,L.scroll.left=0),Fc(e,y,C,b,E,i,l,R,L,D,u,c,$,d,p,v)}function Ze(t){let{top:e,left:r,width:n,height:o}=t.getBoundingClientRect(),{scrollTop:i,scrollLeft:l,clientTop:a,clientLeft:u}=document.documentElement;return{top:e+i-a,left:r+l-u,width:n,height:o}}function po(t,e){let r=window.getComputedStyle(t),n;if(r.position==="fixed"){let{top:o,left:i,width:l,height:a}=t.getBoundingClientRect();n={top:o,left:i,width:l,height:a}}else{n=Ze(t);let o=Ze(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(r.marginTop,10)||0,n.left-=parseInt(r.marginLeft,10)||0,n}function Bc(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!vo(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!vo(e);)e=e.parentElement;return e||document.documentElement}function vo(t){let e=window.getComputedStyle(t);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 Di=new WeakMap;function Nc(t){let{triggerRef:e,isOpen:r,onClose:n}=t;s.useEffect(()=>{if(!r||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 a=n||Di.get(e.current);a&&a()};return window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("scroll",o,!0)}},[r,n,e])}let _=typeof document<"u"?window.visualViewport:null;function ki(t){let{direction:e}=Ve(),{arrowSize:r=0,targetRef:n,overlayRef:o,scrollRef:i=o,placement:l="bottom",containerPadding:a=12,shouldFlip:u=!0,boundaryElement:c=typeof document<"u"?document.body:null,offset:d=0,crossOffset:p=0,shouldUpdatePosition:v=!0,isOpen:f=!0,onClose:h,maxHeight:m,arrowBoundaryOffset:$=0}=t,[y,C]=s.useState(null),E=[v,l,o.current,n.current,i.current,a,u,c,d,p,f,e,m,$,r],K=s.useRef(_==null?void 0:_.scale);s.useEffect(()=>{f&&(K.current=_==null?void 0:_.scale)},[f]);let T=s.useCallback(()=>{if(v===!1||!f||!o.current||!n.current||!c||(_==null?void 0:_.scale)!==K.current)return;let L=null;if(i.current&&i.current.contains(document.activeElement)){var D;let k=(D=document.activeElement)===null||D===void 0?void 0:D.getBoundingClientRect(),H=i.current.getBoundingClientRect();var A;if(L={type:"top",offset:((A=k==null?void 0:k.top)!==null&&A!==void 0?A:0)-H.top},L.offset>H.height/2){L.type="bottom";var g;L.offset=((g=k==null?void 0:k.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=Ic({placement:zc(l,e),overlayNode:o.current,targetNode:n.current,scrollNode:i.current||o.current,padding:a,shouldFlip:u,boundaryElement:c,offset:d,crossOffset:p,maxHeight:m,arrowSize:r,arrowBoundaryOffset:$});if(O.position){if(P.style.top="",P.style.bottom="",P.style.left="",P.style.right="",Object.keys(O.position).forEach(k=>P.style[k]=O.position[k]+"px"),P.style.maxHeight=O.maxHeight!=null?O.maxHeight+"px":"",L&&document.activeElement&&i.current){let k=document.activeElement.getBoundingClientRect(),H=i.current.getBoundingClientRect(),ee=k[L.type]-H[L.type];i.current.scrollTop+=ee-L.offset}C(O)}},E);z(T,E),Oc(T),Dr({ref:o,onResize:T}),Dr({ref:n,onResize:T});let w=s.useRef(!1);z(()=>{let L,D=()=>{w.current=!0,clearTimeout(L),L=setTimeout(()=>{w.current=!1},500),T()},A=()=>{w.current&&D()};return _==null||_.addEventListener("resize",D),_==null||_.addEventListener("scroll",A),()=>{_==null||_.removeEventListener("resize",D),_==null||_.removeEventListener("scroll",A)}},[T]);let F=s.useCallback(()=>{w.current||h==null||h()},[h,w]);Nc({triggerRef:n,isOpen:f,onClose:h&&F});var b,R;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...y==null?void 0:y.position,maxHeight:(b=y==null?void 0:y.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(R=y==null?void 0:y.placement)!==null&&R!==void 0?R:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:y==null?void 0:y.arrowOffsetLeft,top:y==null?void 0:y.arrowOffsetTop}},updatePosition:T}}function Oc(t){z(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function zc(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}const pe=[];function Hc(t,e){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=!1,isKeyboardDismissDisabled:l=!1,shouldCloseOnInteractOutside:a}=t;s.useEffect(()=>(o&&pe.push(e),()=>{let h=pe.indexOf(e);h>=0&&pe.splice(h,1)}),[o,e]);let u=()=>{pe[pe.length-1]===e&&r&&r()},c=h=>{(!a||a(h.target))&&pe[pe.length-1]===e&&(h.stopPropagation(),h.preventDefault())},d=h=>{(!a||a(h.target))&&(pe[pe.length-1]===e&&(h.stopPropagation(),h.preventDefault()),u())},p=h=>{h.key==="Escape"&&!l&&!h.nativeEvent.isComposing&&(h.stopPropagation(),h.preventDefault(),u())};Bu({ref:e,onInteractOutside:i&&o?d:void 0,onInteractOutsideStart:c});let{focusWithinProps:v}=Gt({isDisabled:!n,onBlurWithin:h=>{!h.relatedTarget||Uu(h.relatedTarget)||(!a||a(h.relatedTarget))&&(r==null||r())}}),f=h=>{h.target===h.currentTarget&&h.preventDefault()};return{overlayProps:{onKeyDown:p,...v},underlayProps:{onPointerDown:f}}}function Ri(t,e,r){let{type:n}=t,{isOpen:o}=e;s.useEffect(()=>{r&&r.current&&Di.set(r.current,e.close)});let i;n==="menu"?i=!0:n==="listbox"&&(i="listbox");let l=X();return{triggerProps:{"aria-haspopup":i,"aria-expanded":o,"aria-controls":o?l:void 0,onPress:e.toggle},overlayProps:{id:l}}}const hr=typeof document<"u"&&window.visualViewport,Vc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Kt=0,gr;function jc(t={}){let{isDisabled:e}=t;z(()=>{if(!e)return Kt++,Kt===1&&(Wt()?gr=_c():gr=Wc()),()=>{Kt--,Kt===0&&gr()}},[e])}function Wc(){return Ce(Ye(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ye(document.documentElement,"overflow","hidden"))}function _c(){let t,e,r=c=>{t=Zo(c.target,!0),!(t===document.documentElement&&t===document.body)&&t instanceof HTMLElement&&window.getComputedStyle(t).overscrollBehavior==="auto"&&(e=Ye(t,"overscrollBehavior","contain"))},n=c=>{if(!t||t===document.documentElement||t===document.body){c.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&c.preventDefault()},o=()=>{e&&e()},i=c=>{let d=c.target;Uc(d)&&(a(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",hr&&(hr.height<window.innerHeight?requestAnimationFrame(()=>{bo(d)}):hr.addEventListener("resize",()=>bo(d),{once:!0}))}))},l=null,a=()=>{if(l)return;let c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,p=window.pageYOffset;l=Ce(nt(window,"scroll",c),Ye(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Ye(document.documentElement,"overflow","hidden"),Ye(document.body,"marginTop",`-${p}px`),()=>{window.scrollTo(d,p)}),window.scrollTo(0,0)},u=Ce(nt(document,"touchstart",r,{passive:!1,capture:!0}),nt(document,"touchmove",n,{passive:!1,capture:!0}),nt(document,"touchend",o,{passive:!1,capture:!0}),nt(document,"focus",i,!0));return()=>{e==null||e(),l==null||l(),u()}}function Ye(t,e,r){let n=t.style[e];return t.style[e]=r,()=>{t.style[e]=n}}function nt(t,e,r,n){return t.addEventListener(e,r,n),()=>{t.removeEventListener(e,r,n)}}function bo(t){let e=document.scrollingElement||document.documentElement,r=t;for(;r&&r!==e;){let n=Zo(r);if(n!==document.documentElement&&n!==document.body&&n!==r){let o=n.getBoundingClientRect().top,i=r.getBoundingClientRect().top;i>o+r.clientHeight&&(n.scrollTop+=i-o)}r=n.parentElement}}function Uc(t){return t instanceof HTMLInputElement&&!Vc.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const jr=s.createContext(null);function Gc(t){let{children:e}=t,r=s.useContext(jr),[n,o]=s.useState(0),i=s.useMemo(()=>({parent:r,modalCount:n,addModal(){o(l=>l+1),r&&r.addModal()},removeModal(){o(l=>l-1),r&&r.removeModal()}}),[r,n]);return s.createElement(jr.Provider,{value:i},e)}function qc(){let t=s.useContext(jr);return{modalProviderProps:{"aria-hidden":t&&t.modalCount>0?!0:void 0}}}function Yc(t){let{modalProviderProps:e}=qc();return s.createElement("div",{"data-overlay-container":!0,...t,...e})}function Zc(t){return s.createElement(Gc,null,s.createElement(Yc,t))}function Xc(t){let e=Ee(),{portalContainer:r=e?null:document.body,...n}=t;if(s.useEffect(()=>{if(r!=null&&r.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[r]),!r)return null;let o=s.createElement(Zc,n);return Oe.createPortal(o,r)}var Ki={};Ki={dismiss:"تجاهل"};var Li={};Li={dismiss:"Отхвърляне"};var Mi={};Mi={dismiss:"Odstranit"};var Ai={};Ai={dismiss:"Luk"};var Fi={};Fi={dismiss:"Schließen"};var Ii={};Ii={dismiss:"Απόρριψη"};var Bi={};Bi={dismiss:"Dismiss"};var Ni={};Ni={dismiss:"Descartar"};var Oi={};Oi={dismiss:"Lõpeta"};var zi={};zi={dismiss:"Hylkää"};var Hi={};Hi={dismiss:"Rejeter"};var Vi={};Vi={dismiss:"התעלם"};var ji={};ji={dismiss:"Odbaci"};var Wi={};Wi={dismiss:"Elutasítás"};var _i={};_i={dismiss:"Ignora"};var Ui={};Ui={dismiss:"閉じる"};var Gi={};Gi={dismiss:"무시"};var qi={};qi={dismiss:"Atmesti"};var Yi={};Yi={dismiss:"Nerādīt"};var Zi={};Zi={dismiss:"Lukk"};var Xi={};Xi={dismiss:"Negeren"};var Ji={};Ji={dismiss:"Zignoruj"};var Qi={};Qi={dismiss:"Descartar"};var el={};el={dismiss:"Dispensar"};var tl={};tl={dismiss:"Revocare"};var rl={};rl={dismiss:"Пропустить"};var nl={};nl={dismiss:"Zrušiť"};var ol={};ol={dismiss:"Opusti"};var il={};il={dismiss:"Odbaci"};var ll={};ll={dismiss:"Avvisa"};var al={};al={dismiss:"Kapat"};var sl={};sl={dismiss:"Скасувати"};var ul={};ul={dismiss:"取消"};var cl={};cl={dismiss:"關閉"};var dl={};dl={"ar-AE":Ki,"bg-BG":Li,"cs-CZ":Mi,"da-DK":Ai,"de-DE":Fi,"el-GR":Ii,"en-US":Bi,"es-ES":Ni,"et-EE":Oi,"fi-FI":zi,"fr-FR":Hi,"he-IL":Vi,"hr-HR":ji,"hu-HU":Wi,"it-IT":_i,"ja-JP":Ui,"ko-KR":Gi,"lt-LT":qi,"lv-LV":Yi,"nb-NO":Zi,"nl-NL":Xi,"pl-PL":Ji,"pt-BR":Qi,"pt-PT":el,"ro-RO":tl,"ru-RU":rl,"sk-SK":nl,"sl-SI":ol,"sr-SP":il,"sv-SE":ll,"tr-TR":al,"uk-UA":sl,"zh-CN":ul,"zh-TW":cl};function Jc(t){return t&&t.__esModule?t.default:t}function ho(t){let{onDismiss:e,...r}=t,n=nn(Jc(dl),"@react-aria/overlays"),o=Yo(r,n.format("dismiss")),i=()=>{e&&e()};return s.createElement(Ei,null,s.createElement("button",{...o,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}let ot=new WeakMap,ie=[];function Qc(t,e=document.body){let r=new Set(t),n=new Set,o=u=>{for(let v of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(v);let c=v=>{if(r.has(v)||v.parentElement&&n.has(v.parentElement)&&v.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let f of r)if(v.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),p=c(u);if(p===NodeFilter.FILTER_ACCEPT&&i(u),p!==NodeFilter.FILTER_REJECT){let v=d.nextNode();for(;v!=null;)i(v),v=d.nextNode()}},i=u=>{var c;let d=(c=ot.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),ot.set(u,d+1))};ie.length&&ie[ie.length-1].disconnect(),o(e);let l=new MutationObserver(u=>{for(let c of u)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...r,...n].some(d=>d.contains(c.target))){for(let d of c.removedNodes)d instanceof Element&&(r.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")?r.add(d):d instanceof Element&&o(d)}});l.observe(e,{childList:!0,subtree:!0});let a={observe(){l.observe(e,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return ie.push(a),()=>{l.disconnect();for(let u of n){let c=ot.get(u);c!=null&&(c===1?(u.removeAttribute("aria-hidden"),ot.delete(u)):ot.set(u,c-1))}a===ie[ie.length-1]?(ie.pop(),ie.length&&ie[ie.length-1].observe()):ie.splice(ie.indexOf(a),1)}}function ed(t,e){let{triggerRef:r,popoverRef:n,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:l,...a}=t,{overlayProps:u,underlayProps:c}=Hc({isOpen:e.isOpen&&!a["data-react-aria-top-layer"],onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:l},n),{overlayProps:d,arrowProps:p,placement:v}=ki({...a,targetRef:r,overlayRef:n,isOpen:e.isOpen,onClose:o?e.close:null});return jc({isDisabled:o||!e.isOpen}),z(()=>{if(e.isOpen&&!o&&n.current)return Qc([n.current])},[o,e.isOpen,n]),{popoverProps:B(u,d),arrowProps:p,underlayProps:c,placement:v}}const td=s.createContext({});function rd(){var t;return(t=s.useContext(td))!==null&&t!==void 0?t:{}}const fl=s.createContext(null);function nd(t){let e=Ee(),{portalContainer:r=e?null:document.body,isExiting:n}=t,[o,i]=s.useState(!1),l=s.useMemo(()=>({contain:o,setContain:i}),[o,i]),{getContainer:a}=rd();if(!t.portalContainer&&a&&(r=a()),!r)return null;let u=t.children;return t.disableFocusManagement||(u=s.createElement(vi,{restoreFocus:!0,contain:o&&!n},u)),u=s.createElement(fl.Provider,{value:l},s.createElement(Du,null,u)),Oe.createPortal(u,r)}function od(){let t=s.useContext(fl),e=t==null?void 0:t.setContain;z(()=>{e==null||e(!0)},[e])}const cn=new WeakMap;function id(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function ld(t,e){let r=cn.get(t);if(!r)throw new Error("Unknown list");return`${r.id}-option-${id(e)}`}function Wr(t){return ou()?t.altKey:t.ctrlKey}const ad=1e3;function pl(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=s.useRef({search:"",timeout:void 0}).current,i=l=>{let a=sd(l.key);if(!(!a||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(a===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=a,e.getKeyForSearch!=null){let u=e.getKeyForSearch(o.search,r.focusedKey);u==null&&(u=e.getKeyForSearch(o.search)),u!=null&&(r.setFocusedKey(u),n&&n(u))}clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},ad)}};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0}}}function sd(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function ud(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:l=!1,disallowSelectAll:a=!1,selectOnFocus:u=e.selectionBehavior==="replace",disallowTypeAhead:c=!1,shouldUseVirtualFocus:d,allowsTabNavigation:p=!1,isVirtualized:v,scrollRef:f=n,linkBehavior:h="action"}=t,{direction:m}=Ve(),$=_t(),y=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=(I,Re)=>{if(I!=null){if(e.isLink(I)&&h==="selection"&&u&&!Wr(g)){var me;Oe.flushSync(()=>{e.setFocusedKey(I,Re)});let On=(me=f.current)===null||me===void 0?void 0:me.querySelector(`[data-key="${CSS.escape(I.toString())}"]`),zn=e.getItemProps(I);On&&$.open(On,g,zn.href,zn.routerOptions);return}if(e.setFocusedKey(I,Re),e.isLink(I)&&h==="override")return;g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):u&&!Wr(g)&&e.replaceSelection(I)}};switch(g.key){case"ArrowDown":if(r.getKeyBelow){var N,O,k;let I=e.focusedKey!=null?(N=r.getKeyBelow)===null||N===void 0?void 0:N.call(r,e.focusedKey):(O=r.getFirstKey)===null||O===void 0?void 0:O.call(r);I==null&&i&&(I=(k=r.getFirstKey)===null||k===void 0?void 0:k.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),M(I))}break;case"ArrowUp":if(r.getKeyAbove){var H,ee,Je;let I=e.focusedKey!=null?(H=r.getKeyAbove)===null||H===void 0?void 0:H.call(r,e.focusedKey):(ee=r.getLastKey)===null||ee===void 0?void 0:ee.call(r);I==null&&i&&(I=(Je=r.getLastKey)===null||Je===void 0?void 0:Je.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),M(I))}break;case"ArrowLeft":if(r.getKeyLeftOf){var Qe,et,ke;let I=e.focusedKey!=null?(Qe=r.getKeyLeftOf)===null||Qe===void 0?void 0:Qe.call(r,e.focusedKey):null;I==null&&i&&(I=m==="rtl"?(et=r.getFirstKey)===null||et===void 0?void 0:et.call(r,e.focusedKey):(ke=r.getLastKey)===null||ke===void 0?void 0:ke.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),M(I,m==="rtl"?"first":"last"))}break;case"ArrowRight":if(r.getKeyRightOf){var tt,Ct,or;let I=e.focusedKey!=null?(tt=r.getKeyRightOf)===null||tt===void 0?void 0:tt.call(r,e.focusedKey):null;I==null&&i&&(I=m==="rtl"?(Ct=r.getLastKey)===null||Ct===void 0?void 0:Ct.call(r,e.focusedKey):(or=r.getFirstKey)===null||or===void 0?void 0:or.call(r,e.focusedKey)),I!=null&&(g.preventDefault(),M(I,m==="rtl"?"last":"first"))}break;case"Home":if(r.getFirstKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let I=r.getFirstKey(e.focusedKey,Ge(g));e.setFocusedKey(I),I!=null&&(Ge(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):u&&e.replaceSelection(I))}break;case"End":if(r.getLastKey){if(e.focusedKey===null&&g.shiftKey)return;g.preventDefault();let I=r.getLastKey(e.focusedKey,Ge(g));e.setFocusedKey(I),I!=null&&(Ge(g)&&g.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(I):u&&e.replaceSelection(I))}break;case"PageDown":if(r.getKeyPageBelow&&e.focusedKey!=null){let I=r.getKeyPageBelow(e.focusedKey);I!=null&&(g.preventDefault(),M(I))}break;case"PageUp":if(r.getKeyPageAbove&&e.focusedKey!=null){let I=r.getKeyPageAbove(e.focusedKey);I!=null&&(g.preventDefault(),M(I))}break;case"a":Ge(g)&&e.selectionMode==="multiple"&&a!==!0&&(g.preventDefault(),e.selectAll());break;case"Escape":!l&&e.selectedKeys.size!==0&&(g.stopPropagation(),g.preventDefault(),e.clearSelection());break;case"Tab":if(!p){if(g.shiftKey)n.current.focus();else{let I=re(n.current,{tabbable:!0}),Re,me;do me=I.lastChild(),me&&(Re=me);while(me);Re&&!Re.contains(document.activeElement)&&he(Re)}break}}},C=s.useRef({top:0,left:0});lt(f,"scroll",v?void 0:()=>{var g,P,M,N;C.current={top:(M=(g=f.current)===null||g===void 0?void 0:g.scrollTop)!==null&&M!==void 0?M:0,left:(N=(P=f.current)===null||P===void 0?void 0:P.scrollLeft)!==null&&N!==void 0?N:0}});let E=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 k=ee=>{ee!=null&&(e.setFocusedKey(ee),u&&e.replaceSelection(ee))},H=g.relatedTarget;var N,O;H&&g.currentTarget.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?k((N=e.lastSelectedKey)!==null&&N!==void 0?N:(P=r.getLastKey)===null||P===void 0?void 0:P.call(r)):k((O=e.firstSelectedKey)!==null&&O!==void 0?O:(M=r.getFirstKey)===null||M===void 0?void 0:M.call(r))}else!v&&f.current&&(f.current.scrollTop=C.current.top,f.current.scrollLeft=C.current.left);if(e.focusedKey!=null&&f.current){let k=f.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);k&&(k.contains(document.activeElement)||he(k),vt()==="keyboard"&&Wn(k,{containingElement:n.current}))}}},K=g=>{g.currentTarget.contains(g.relatedTarget)||e.setFocused(!1)},T=s.useRef(!1);lt(n,hu,d?g=>{let{detail:P}=g;g.stopPropagation(),e.setFocused(!0),(P==null?void 0:P.focusStrategy)==="first"&&(T.current=!0)}:void 0);let w=Z(()=>{var g,P;let M=(P=(g=r.getFirstKey)===null||g===void 0?void 0:g.call(r))!==null&&P!==void 0?P:null;if(M==null){var N;(N=n.current)===null||N===void 0||N.dispatchEvent(new CustomEvent(Jo,{cancelable:!0,bubbles:!0})),e.collection.size>0&&(T.current=!1)}else e.setFocusedKey(M),T.current=!1});Vn(()=>{T.current&&w()},[e.collection,w]);let F=Z(()=>{e.collection.size>0&&(T.current=!1)});Vn(()=>{F()},[e.focusedKey,F]),lt(n,bu,d?g=>{g.stopPropagation(),e.setFocused(!1),e.setFocusedKey(null)}:void 0);const b=s.useRef(o);s.useEffect(()=>{if(b.current){var g,P;let O=null;var M;o==="first"&&(O=(M=(g=r.getFirstKey)===null||g===void 0?void 0:g.call(r))!==null&&M!==void 0?M:null);var N;o==="last"&&(O=(N=(P=r.getLastKey)===null||P===void 0?void 0:P.call(r))!==null&&N!==void 0?N:null);let k=e.selectedKeys;if(k.size){for(let H of k)if(e.canSelectItem(H)){O=H;break}}e.setFocused(!0),e.setFocusedKey(O),O==null&&!d&&n.current&&Ne(n.current)}},[]);let R=s.useRef(e.focusedKey);s.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==R.current||b.current)&&f.current&&n.current){let g=vt(),P=n.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);if(!P)return;(g==="keyboard"||b.current)&&(Xo(f.current,P),g!=="virtual"&&Wn(P,{containingElement:n.current}))}!d&&e.isFocused&&e.focusedKey==null&&R.current!=null&&n.current&&Ne(n.current),R.current=e.focusedKey,b.current=!1}),lt(n,"react-aria-focus-scope-restore",g=>{g.preventDefault(),e.setFocused(!0)});let L={onKeyDown:y,onFocus:E,onBlur:K,onMouseDown(g){f.current===g.target&&g.preventDefault()}},{typeSelectProps:D}=pl({keyboardDelegate:r,selectionManager:e});c||(L=B(D,L));let A;return d?A=-1:A=e.focusedKey==null?0:-1,{collectionProps:{...L,tabIndex:A}}}function cd(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:a,isDisabled:u,onAction:c,allowsDifferentPressOrigin:d,linkBehavior:p="action"}=t,v=_t();e=X(e);let f=k=>{if(k.pointerType==="keyboard"&&Wr(k))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(p==="selection"&&o.current){let H=r.getItemProps(n);v.open(o.current,k,H.href,H.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(p==="override"||p==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):k&&k.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||k&&(Ge(k)||k.pointerType==="touch"||k.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};s.useEffect(()=>{if(n===r.focusedKey&&r.isFocused)if(!l)a?a():document.activeElement!==o.current&&o.current&&Ne(o.current);else{var H;let ee=new CustomEvent(Jo,{cancelable:!0,bubbles:!0});(H=o.current)===null||H===void 0||H.dispatchEvent(ee)}},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,l]),u=u||r.isDisabled(n);let h={};!l&&!u?h={tabIndex:n===r.focusedKey?0:-1,onFocus(k){k.target===o.current&&r.setFocusedKey(n)}}:u&&(h.onMouseDown=k=>{k.preventDefault()});let m=r.isLink(n)&&p==="override",$=r.isLink(n)&&p!=="selection"&&p!=="none",y=!u&&r.canSelectItem(n)&&!m,C=(c||$)&&!u,E=C&&(r.selectionBehavior==="replace"?!y:!y||r.isEmpty),K=C&&y&&r.selectionBehavior==="replace",T=E||K,w=s.useRef(null),F=T&&y,b=s.useRef(!1),R=s.useRef(!1),L=k=>{if(c&&c(),$&&o.current){let H=r.getItemProps(n);v.open(o.current,k,H.href,H.routerOptions)}},D={};i?(D.onPressStart=k=>{w.current=k.pointerType,b.current=F,k.pointerType==="keyboard"&&(!T||mo())&&f(k)},d?(D.onPressUp=E?void 0:k=>{k.pointerType==="mouse"&&y&&f(k)},D.onPress=E?L:k=>{k.pointerType!=="keyboard"&&k.pointerType!=="mouse"&&y&&f(k)}):D.onPress=k=>{if(E||K&&k.pointerType!=="mouse"){if(k.pointerType==="keyboard"&&!go())return;L(k)}else k.pointerType!=="keyboard"&&y&&f(k)}):(D.onPressStart=k=>{w.current=k.pointerType,b.current=F,R.current=E,y&&(k.pointerType==="mouse"&&!E||k.pointerType==="keyboard"&&(!C||mo()))&&f(k)},D.onPress=k=>{(k.pointerType==="touch"||k.pointerType==="pen"||k.pointerType==="virtual"||k.pointerType==="keyboard"&&T&&go()||k.pointerType==="mouse"&&R.current)&&(T?L(k):y&&f(k))}),h["data-key"]=n,D.preventFocusOnPress=l;let{pressProps:A,isPressed:g}=Ie(D),P=K?k=>{w.current==="mouse"&&(k.stopPropagation(),k.preventDefault(),L(k))}:void 0,{longPressProps:M}=fi({isDisabled:!F,onLongPress(k){k.pointerType==="touch"&&(f(k),r.setSelectionBehavior("toggle"))}}),N=k=>{w.current==="touch"&&b.current&&k.preventDefault()},O=r.isLink(n)?k=>{Fe.isOpening||k.preventDefault()}:void 0;return{itemProps:B(h,y||E?A:{},F?M:{},{onDoubleClick:P,onDragStartCapture:N,onClick:O,id:e}),isPressed:g,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:u,allowsSelection:y,hasAction:T}}function go(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function mo(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class yo{getItemRect(e){let r=this.ref.current;if(!r)return null;let n=e!=null?r.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null;if(!n)return null;let o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-o.left+r.scrollLeft,y:i.top-o.top+r.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;var r,n;return{width:(r=e==null?void 0:e.scrollWidth)!==null&&r!==void 0?r:0,height:(n=e==null?void 0:e.scrollHeight)!==null&&n!==void 0?n:0}}getVisibleRect(){let e=this.ref.current;var r,n,o,i;return{x:(r=e==null?void 0:e.scrollLeft)!==null&&r!==void 0?r: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 dn{isDisabled(e){var r;return this.disabledBehavior==="all"&&(((r=e.props)===null||r===void 0?void 0:r.isDisabled)||this.disabledKeys.has(e.key))}findNextNonDisabled(e,r){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=r(n)}return null}getNextKey(e){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,n=>this.collection.getKeyAfter(n))}getPreviousKey(e){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,n=>this.collection.getKeyBefore(n))}findKey(e,r,n){let o=e,i=this.layoutDelegate.getItemRect(o);if(!i||o==null)return null;let l=i;do{if(o=r(o),o==null)break;i=this.layoutDelegate.getItemRect(o)}while(i&&n(l,i)&&o!=null);return o}isSameRow(e,r){return e.y===r.y||e.x!==r.x}isSameColumn(e,r){return e.x===r.x||e.y!==r.y}getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,r){return r?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[r](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 r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,n=>this.layoutDelegate[r](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,r=>this.collection.getKeyAfter(r))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,r=>this.collection.getKeyBefore(r))}getKeyPageAbove(e){let r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(r&&!dt(r))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 r=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(r&&!dt(r))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,r){if(!this.collator)return null;let n=this.collection,o=r||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 r=e[0];this.collection=r.collection,this.ref=r.ref,this.collator=r.collator,this.disabledKeys=r.disabledKeys||new Set,this.disabledBehavior=r.disabledBehavior||"all",this.orientation=r.orientation||"vertical",this.direction=r.direction,this.layout=r.layout||"stack",this.layoutDelegate=r.layoutDelegate||new yo(r.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 yo(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function dd(t){let{selectionManager:e,collection:r,disabledKeys:n,ref:o,keyboardDelegate:i,layoutDelegate:l}=t,a=on({usage:"search",sensitivity:"base"}),u=e.disabledBehavior,c=s.useMemo(()=>i||new dn({collection:r,disabledKeys:n,disabledBehavior:u,ref:o,collator:a,layoutDelegate:l}),[i,l,r,n,o,a,u]),{collectionProps:d}=ud({...t,ref:o,selectionManager:e,keyboardDelegate:c});return{listProps:d}}function fd(t,e,r){let n=q(t,{labelable:!0}),o=t.selectionBehavior||"toggle",i=t.linkBehavior||(o==="replace"?"action":"override");o==="toggle"&&i==="action"&&(i="override");let{listProps:l}=dd({...t,ref:r,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:a}=Gt({onFocusWithin:t.onFocus,onBlurWithin:t.onBlur,onFocusWithinChange:t.onFocusChange}),u=X(t.id);cn.set(e,{id:u,shouldUseVirtualFocus:t.shouldUseVirtualFocus,shouldSelectOnPressUp:t.shouldSelectOnPressUp,shouldFocusOnHover:t.shouldFocusOnHover,isVirtualized:t.isVirtualized,onAction:t.onAction,linkBehavior:i});let{labelProps:c,fieldProps:d}=sn({...t,id:u,labelElementType:"span"});return{labelProps:c,listBoxProps:B(n,a,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...B(d,l)})}}class pd{build(e,r){return this.context=r,$o(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(s.isValidElement(r)&&r.type===s.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="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:r}),o++}else{let o=[];s.Children.forEach(r,l=>{l&&o.push(l)});let i=0;for(let l of o){let a=this.getFullNode({element:l,index:i},{});for(let u of a)i++,yield u}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){var l;let a=(l=i.key)!==null&&l!==void 0?l:i.id;if(a==null)throw new Error("No key found for item");return a}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(s.isValidElement(e.element)&&e.element.type===s.Fragment){let $=[];s.Children.forEach(e.element.props.children,C=>{$.push(C)});var i;let y=(i=e.index)!==null&&i!==void 0?i:0;for(const C of $)yield*this.getFullNode({element:C,index:y++},r,n,o);return}let l=e.element;if(!l&&e.value&&r&&r.renderer){let $=this.cache.get(e.value);if($&&(!$.shouldInvalidate||!$.shouldInvalidate(this.context))){$.index=e.index,$.parentKey=o?o.key:null,yield $;return}l=r.renderer(e.value)}if(s.isValidElement(l)){let $=l.type;if(typeof $!="function"&&typeof $.getCollectionNode!="function"){let K=l.type;throw new Error(`Unknown element <${K}> in collection.`)}let y=$.getCollectionNode(l.props,this.context);var a;let C=(a=e.index)!==null&&a!==void 0?a:0,E=y.next();for(;!E.done&&E.value;){let K=E.value;e.index=C;var u;let T=(u=K.key)!==null&&u!==void 0?u:null;T==null&&(T=K.element?null:this.getKey(l,e,r,n));let F=[...this.getFullNode({...K,key:T,index:C,wrapper:vd(e.wrapper,K.wrapper)},this.getChildState(r,K),n?`${n}${l.key}`:l.key,o)];for(let b of F){var c,d;b.value=(d=(c=K.value)!==null&&c!==void 0?c:e.value)!==null&&d!==void 0?d:null,b.value&&this.cache.set(b.value,b);var p;if(e.type&&b.type!==e.type)throw new Error(`Unsupported type <${mr(b.type)}> in <${mr((p=o==null?void 0:o.type)!==null&&p!==void 0?p:"unknown parent type")}>. Only <${mr(e.type)}> is supported.`);C++,yield b}E=y.next(F)}return}if(e.key==null||e.type==null)return;let v=this;var f,h;let m={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:(f=e.value)!==null&&f!==void 0?f: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:$o(function*(){if(!e.hasChildNodes||!e.childNodes)return;let $=0;for(let y of e.childNodes()){y.key!=null&&(y.key=`${m.key}${y.key}`);let C=v.getFullNode({...y,index:$},v.getChildState(r,y),m.key,m);for(let E of C)$++,yield E}})};yield m}constructor(){this.cache=new WeakMap}}function $o(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function vd(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function mr(t){return t[0].toUpperCase()+t.slice(1)}function bd(t,e,r){let n=s.useMemo(()=>new pd,[]),{children:o,items:i,collection:l}=t;return s.useMemo(()=>{if(l)return l;let u=n.build({children:o,items:i},r);return e(u)},[n,o,i,l,r,e])}function vl(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function hd(t){return gd(t)}function gd(t,e){for(let r of t)return r}function yr(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...xo(t,e),e],o=[...xo(t,r),r],i=n.slice(0,o.length).findIndex((l,a)=>l!==o[a]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(l=>l===r)>=0?1:(o.findIndex(l=>l===e)>=0,-1)}function xo(t,e){let r=[],n=e;for(;(n==null?void 0:n.parentKey)!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}const Po=new WeakMap;function md(t){let e=Po.get(t);if(e!=null)return e;let r=0,n=o=>{for(let i of o)i.type==="section"?n(vl(i,t)):r++};return n(t),Po.set(t,r),r}function yd(t,e,r){var n,o;let{key:i}=t,l=cn.get(e);var a;let u=(a=t.isDisabled)!==null&&a!==void 0?a:e.selectionManager.isDisabled(i);var c;let d=(c=t.isSelected)!==null&&c!==void 0?c:e.selectionManager.isSelected(i);var p;let v=(p=t.shouldSelectOnPressUp)!==null&&p!==void 0?p:l==null?void 0:l.shouldSelectOnPressUp;var f;let h=(f=t.shouldFocusOnHover)!==null&&f!==void 0?f:l==null?void 0:l.shouldFocusOnHover;var m;let $=(m=t.shouldUseVirtualFocus)!==null&&m!==void 0?m:l==null?void 0:l.shouldUseVirtualFocus;var y;let C=(y=t.isVirtualized)!==null&&y!==void 0?y:l==null?void 0:l.isVirtualized,E=ct(),K=ct(),T={role:"option","aria-disabled":u||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?d:void 0};we()&&Zr()||(T["aria-label"]=t["aria-label"],T["aria-labelledby"]=E,T["aria-describedby"]=K);let w=e.collection.getItem(i);if(C){let O=Number(w==null?void 0:w.index);T["aria-posinset"]=Number.isNaN(O)?void 0:O+1,T["aria-setsize"]=md(e.collection)}let F=l!=null&&l.onAction?()=>{var O;return l==null||(O=l.onAction)===null||O===void 0?void 0:O.call(l,i)}:void 0,b=ld(e,i),{itemProps:R,isPressed:L,isFocused:D,hasAction:A,allowsSelection:g}=cd({selectionManager:e.selectionManager,key:i,ref:r,shouldSelectOnPressUp:v,allowsDifferentPressOrigin:v&&h,isVirtualized:C,shouldUseVirtualFocus:$,isDisabled:u,onAction:F||!(w==null||(n=w.props)===null||n===void 0)&&n.onAction?Ce(w==null||(o=w.props)===null||o===void 0?void 0:o.onAction,F):void 0,linkBehavior:l==null?void 0:l.linkBehavior,id:b}),{hoverProps:P}=He({isDisabled:u||!h,onHoverStart(){pt()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(i))}}),M=q(w==null?void 0:w.props);delete M.id;let N=Uo(w==null?void 0:w.props);return{optionProps:{...T,...B(M,R,P,N),id:b},labelProps:{id:E},descriptionProps:{id:K},isFocused:D,isFocusVisible:D&&pt(),isSelected:d,isDisabled:u,isPressed:L,allowsSelection:g,hasAction:A}}function $d(t){let{heading:e,"aria-label":r}=t,n=X();return{itemProps:{role:"presentation"},headingProps:e?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":e?n:void 0}}}var bl={};bl={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var hl={};hl={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var gl={};gl={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ml={};ml={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var yl={};yl={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var $l={};$l={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var xl={};xl={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Pl={};Pl={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Sl={};Sl={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 wl={};wl={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var El={};El={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Tl={};Tl={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Dl={};Dl={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var kl={};kl={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Rl={};Rl={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Kl={};Kl={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Ll={};Ll={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Ml={};Ml={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Al={};Al={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Fl={};Fl={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Il={};Il={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Bl={};Bl={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Nl={};Nl={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Ol={};Ol={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var zl={};zl={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Hl={};Hl={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Vl={};Vl={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var jl={};jl={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Wl={};Wl={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var _l={};_l={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var Ul={};Ul={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Gl={};Gl={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ql={};ql={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Yl={};Yl={"ar-AE":bl,"bg-BG":hl,"cs-CZ":gl,"da-DK":ml,"de-DE":yl,"el-GR":$l,"en-US":xl,"es-ES":Pl,"et-EE":Sl,"fi-FI":Cl,"fr-FR":wl,"he-IL":El,"hr-HR":Tl,"hu-HU":Dl,"it-IT":kl,"ja-JP":Rl,"ko-KR":Kl,"lt-LT":Ll,"lv-LV":Ml,"nb-NO":Al,"nl-NL":Fl,"pl-PL":Il,"pt-BR":Bl,"pt-PT":Nl,"ro-RO":Ol,"ru-RU":zl,"sk-SK":Hl,"sl-SI":Vl,"sr-SP":jl,"sv-SE":Wl,"tr-TR":_l,"uk-UA":Ul,"zh-CN":Gl,"zh-TW":ql};function xd(t){return t&&t.__esModule?t.default:t}function Pd(t,e,r){let{type:n="menu",isDisabled:o,trigger:i="press"}=t,l=X(),{triggerProps:a,overlayProps:u}=Ri({type:n},e,r),c=f=>{if(!o&&!(i==="longPress"&&!f.altKey)&&r&&r.current)switch(f.key){case"Enter":case" ":if(i==="longPress")return;case"ArrowDown":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),e.toggle("last");break;default:"continuePropagation"in f&&f.continuePropagation()}},d=nn(xd(Yl),"@react-aria/menu"),{longPressProps:p}=fi({isDisabled:o||i!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),v={onPressStart(f){f.pointerType!=="touch"&&f.pointerType!=="keyboard"&&!o&&e.open(f.pointerType==="virtual"?"first":null)},onPress(f){f.pointerType==="touch"&&!o&&e.toggle()}};return delete a.onPress,{menuTriggerProps:{...a,...i==="press"?v:p,id:l,onKeyDown:c},menuProps:{...u,"aria-labelledby":l,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function Sd(t,e){let{role:r="dialog"}=t,n=ct();n=t["aria-label"]?void 0:n;let o=s.useRef(!1);return s.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){Ne(e.current);let i=setTimeout(()=>{document.activeElement===e.current&&(o.current=!0,e.current&&(e.current.blur(),Ne(e.current)),o.current=!1)},500);return()=>{clearTimeout(i)}}},[e]),od(),{dialogProps:{...q(t,{labelable:!0}),role:r,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||n,onBlur:i=>{o.current&&i.stopPropagation()}},titleProps:{id:n}}}function Cd(t,e,r){let{isDisabled:n}=t,o=X(),i=X(),a=!Ee()&&"onbeforematch"in document.body,u=s.useRef(null),c=s.useCallback(()=>{u.current=requestAnimationFrame(()=>{r.current&&r.current.setAttribute("hidden","until-found")}),Oe.flushSync(()=>{e.toggle()})},[r,e]);return lt(r,"beforematch",a?c:null),z(()=>{u.current&&cancelAnimationFrame(u.current),a&&r.current&&!n&&(e.isExpanded?r.current.removeAttribute("hidden"):r.current.setAttribute("hidden","until-found"))},[n,r,e.isExpanded,a]),s.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:a?!0:!e.isExpanded}}}function wd(t){let{value:e=0,minValue:r=0,maxValue:n=100,valueLabel:o,isIndeterminate:i,formatOptions:l={style:"percent"}}=t,a=q(t,{labelable:!0}),{labelProps:u,fieldProps:c}=sn({...t,labelElementType:"span"});e=Ft(e,r,n);let d=(e-r)/(n-r),p=hc(l);if(!i&&!o){let v=l.style==="percent"?d:e;o=p.format(v)}return{progressBarProps:B(a,{...c,"aria-valuenow":i?void 0:e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuetext":i?void 0:o,role:"progressbar"}),labelProps:u}}const Zl=new WeakMap;function Ed(t,e,r){let{keyboardDelegate:n,isDisabled:o,isRequired:i,name:l,validationBehavior:a="aria"}=t,u=on({usage:"search",sensitivity:"base"}),c=s.useMemo(()=>n||new dn(e.collection,e.disabledKeys,r,u),[n,e.collection,e.disabledKeys,u]),{menuTriggerProps:d,menuProps:p}=Pd({isDisabled:o,type:"listbox"},e,r),v=b=>{switch(b.key){case"ArrowLeft":{var R,L;b.preventDefault();let g=e.selectedKey!=null?(R=c.getKeyAbove)===null||R===void 0?void 0:R.call(c,e.selectedKey):(L=c.getFirstKey)===null||L===void 0?void 0:L.call(c);g&&e.setSelectedKey(g);break}case"ArrowRight":{var D,A;b.preventDefault();let g=e.selectedKey!=null?(D=c.getKeyBelow)===null||D===void 0?void 0:D.call(c,e.selectedKey):(A=c.getFirstKey)===null||A===void 0?void 0:A.call(c);g&&e.setSelectedKey(g);break}}},{typeSelectProps:f}=pl({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(b){e.setSelectedKey(b)}}),{isInvalid:h,validationErrors:m,validationDetails:$}=e.displayValidation,{labelProps:y,fieldProps:C,descriptionProps:E,errorMessageProps:K}=un({...t,labelElementType:"span",isInvalid:h,errorMessage:t.errorMessage||m});f.onKeyDown=f.onKeyDownCapture,delete f.onKeyDownCapture;let T=q(t,{labelable:!0}),w=B(f,d,C),F=X();return Zl.set(e,{isDisabled:o,isRequired:i,name:l,validationBehavior:a}),{labelProps:{...y,onClick:()=>{if(!t.isDisabled){var b;(b=r.current)===null||b===void 0||b.focus(),di("keyboard")}}},triggerProps:B(T,{...w,isDisabled:o,onKeyDown:Ce(w.onKeyDown,v,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[F,w["aria-labelledby"],w["aria-label"]&&!w["aria-labelledby"]?w.id:null].filter(Boolean).join(" "),onFocus(b){e.isFocused||(t.onFocus&&t.onFocus(b),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(b){e.isOpen||(t.onBlur&&t.onBlur(b),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:F},menuProps:{...p,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:b=>{b.currentTarget.contains(b.relatedTarget)||(t.onBlur&&t.onBlur(b),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[C["aria-labelledby"],w["aria-label"]&&!C["aria-labelledby"]?w.id:null].filter(Boolean).join(" ")},descriptionProps:E,errorMessageProps:K,isInvalid:h,validationErrors:m,validationDetails:$}}function Td(t,e,r){let n=Zl.get(e)||{},{autoComplete:o,name:i=n.name,isDisabled:l=n.isDisabled}=t,{validationBehavior:a,isRequired:u}=n,{visuallyHiddenProps:c}=wi();Qr(t.selectRef,e.selectedKey,e.setSelectedKey),an({validationBehavior:a,focus:()=>{var p;return(p=r.current)===null||p===void 0?void 0:p.focus()}},e,t.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:a==="native"&&u,name:i,value:(d=e.selectedKey)!==null&&d!==void 0?d:"",onChange:p=>e.setSelectedKey(p.target.value)}}}function Dd(t){let{state:e,triggerRef:r,label:n,name:o,isDisabled:i}=t,l=s.useRef(null),{containerProps:a,selectProps:u}=Td({...t,selectRef:l},e,r);var c;return e.collection.size<=300?s.createElement("div",{...a,"data-testid":"hidden-select-container"},s.createElement("label",null,n,s.createElement("select",{...u,ref:l},s.createElement("option",null),[...e.collection.getKeys()].map(d=>{let p=e.collection.getItem(d);if(p&&p.type==="item")return s.createElement("option",{key:p.key,value:p.key},p.textValue)})))):o?s.createElement("input",{type:"hidden",autoComplete:u.autoComplete,name:o,disabled:i,value:(c=e.selectedKey)!==null&&c!==void 0?c:""}):null}function kd(t,e){let r=q(t,{labelable:!0}),{hoverProps:n}=He({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:B(r,n,{role:"tooltip"})}}function Rd(t,e,r){let{isDisabled:n,trigger:o}=t,i=X(),l=s.useRef(!1),a=s.useRef(!1),u=()=>{(l.current||a.current)&&e.open(a.current)},c=y=>{!l.current&&!a.current&&e.close(y)};s.useEffect(()=>{let y=C=>{r&&r.current&&C.key==="Escape"&&(C.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0)}},[r,e]);let d=()=>{o!=="focus"&&(vt()==="pointer"?l.current=!0:l.current=!1,u())},p=()=>{o!=="focus"&&(a.current=!1,l.current=!1,c())},v=()=>{a.current=!1,l.current=!1,c(!0)},f=()=>{pt()&&(a.current=!0,u())},h=()=>{a.current=!1,l.current=!1,c(!0)},{hoverProps:m}=He({isDisabled:n,onHoverStart:d,onHoverEnd:p}),{focusableProps:$}=Xe({isDisabled:n,onFocus:f,onBlur:h},r);return{triggerProps:{"aria-describedby":e.isOpen?i:void 0,...B($,m,{onPointerDown:v,onKeyDown:v})},tooltipProps:{id:i}}}const Me=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"}});function Kd(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Ld=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Md=Kd(function(t){return Ld.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});const{withContext:Ad}=S.createRecipeContext({recipe:Me}),Fd=Ad("button",{defaultProps:{type:"button"},shouldForwardProp(t,e){const r=!(e!=null&&e.includes(t))&&!S.defaultSystem.isValidProperty(t);return Md(t)&&r&&!t.includes("onPress")}}),Zt=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=oe(S.mergeRefs(l,e)),u=r||(n?"a":"button")||"button",{buttonProps:c}=Yt({...i,elementType:u},a);return x.jsx(Fd,{...B(i,c,{as:r,asChild:n,ref:a}),children:o})});Zt.displayName="Button";const Id=s.forwardRef(function(e,r){const{children:n,portalled:o=!0,portalRef:i,backdrop:l=!0,...a}=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:r,...a,asChild:!1,children:n})})]})}),Bd=s.forwardRef(function(e,r){return x.jsx(S.Dialog.CloseTrigger,{position:"absolute",top:"2",insetEnd:"2",...e,asChild:!0,children:x.jsx(Zt,{size:"xs",ref:r,children:e.children})})}),Nd=S.Dialog.Root,Od=S.Dialog.Footer,zd=S.Dialog.Header,Hd=S.Dialog.Body,Vd=S.Dialog.Backdrop,jd=S.Dialog.Title,Wd=S.Dialog.Description,_d=S.Dialog.Trigger,Ud=S.Dialog.ActionTrigger,gt=s.forwardRef(({children:t,...e},r)=>x.jsx(Zt,{px:0,py:0,ref:r,...e,children:t}));gt.displayName="IconButton";const Xl=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:Gd}=S.createRecipeContext({recipe:Xl}),qd=Gd("a"),Jl=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=oe(S.mergeRefs(l,e)),u=r||(n?"span":"a")||"a",{linkProps:c}=Qu({...i,elementType:u},a);return x.jsx(qd,{...B(i,c,{as:r,asChild:n,ref:a}),children:o})});Jl.displayName="Link";const Yd=t=>x.jsx(S.List.Root,{...t}),Zd=t=>x.jsx(S.List.Item,{...t}),Ql=s.forwardRef((t,e)=>x.jsx(S.SimpleGrid,{ref:e,...t}));Ql.displayName="SimpleGrid";const Xd=Object.assign(Ql,{Item:S.GridItem}),Jd=t=>x.jsx(S.Table.Root,{...t}),Qd=t=>x.jsx(S.Table.ColumnGroup,{...t}),ef=t=>x.jsx(S.Table.Column,{...t}),tf=t=>x.jsx(S.Table.Header,{...t}),rf=t=>x.jsx(S.Table.Footer,{...t}),nf=t=>x.jsx(S.Table.Row,{...t}),of=t=>x.jsx(S.Table.Cell,{...t}),lf=t=>x.jsx(S.Table.Body,{...t}),af=t=>x.jsx(S.Table.ColumnHeader,{...t}),ea=s.forwardRef((t,e)=>x.jsx(S.Text,{ref:e,...t}));ea.displayName="Text";s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);s.createContext(null);const sf=s.createContext({}),Ht=Symbol("default");function je({values:t,children:e}){for(let[r,n]of t)e=s.createElement(r.Provider,{value:n},e);return e}function Q(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:l,values:a}=t;return s.useMemo(()=>{let u,c,d;return typeof e=="function"?u=e({...a,defaultClassName:o}):u=e,typeof r=="function"?c=r({...a,defaultStyle:l||{}}):c=r,typeof n=="function"?d=n({...a,defaultChildren:i}):n==null?d=i:d=n,{className:u??o,style:c||l?{...l,...c}:void 0,children:d??i,"data-rac":""}},[e,r,n,o,i,l,a])}function Xt(t,e){let r=s.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`));if(!e&&!r.slots[Ht])throw new Error(`A slot prop is required. Valid slot names are ${n}.`);let o=e||Ht;if(!r.slots[o])throw new Error(`Invalid slot "${e}". Valid slot names are ${n}.`);return r.slots[o]}return r}function ne(t,e,r){let n=Xt(r,t.slot)||{},{ref:o,...i}=n,l=oe(s.useMemo(()=>jo(e,o),[e,o])),a=B(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?a.style=u=>{let c=typeof i.style=="function"?i.style(u):i.style,d={...u.defaultStyle,...c},p=typeof t.style=="function"?t.style({...u,defaultStyle:d}):t.style;return{...d,...p}}:a.style={...i.style,...t.style}),[a,l]}function fn(){let[t,e]=s.useState(!0),r=s.useRef(!1),n=s.useCallback(o=>{r.current=!0,e(!!o)},[]);return z(()=>{r.current||e(!1)},[]),[n,t]}function ta(t){const e=/^(data-.*)$/;let r={};for(const n in t)e.test(n)||(r[n]=t[n]);return r}class pn{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new pn(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,r){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=r}}class vn{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 r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=(n==null?void 0:n.firstChildKey)!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);var n;return(n=r==null?void 0:r.key)!==null&&n!==void 0?n:null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.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 r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r:null}getItem(e){var r;return(r=this.keyMap.get(e))!==null&&r!==void 0?r:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r}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,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}filter(e){let r=new vn,n=null;for(let o of this)if(o.type==="section"&&o.hasChildNodes){let i=o.clone(),l=null;for(let a of this.getChildren(o.key))if(e(a.textValue)||a.type==="header"){let u=a.clone();l==null&&(i.firstChildKey=u.key),r.firstKey==null&&(r.firstKey=i.key),l&&l.parentKey===u.parentKey?(l.nextKey=u.key,u.prevKey=l.key):u.prevKey=null,u.nextKey=null,r.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,r.addNode(i)):(r.firstKey===i.key&&(r.firstKey=null),r.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,r.addNode(i))}else if(e(o.textValue)){let i=o.clone();r.firstKey==null&&(r.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,r.addNode(i),n=i}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let o;n.prevKey!=null&&(o=r.getItem(n.prevKey),o.nextKey=null),r.removeNode(n.key),n=o}return r.lastKey=(n==null?void 0:n.key)||null,r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class ra{*[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,r){if(r==null)return this.appendChild(e);this.ownerDocument.startTransaction(),e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode;let n=r;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 r=e.nextSibling;for(;r;)r.index--,r=r.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 bt extends ra{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof bt?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var e,r,n,o;let i=this.ownerDocument.getMutableNode(this);i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof bt?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 a;i.nextKey=(a=(r=this.nextSibling)===null||r===void 0?void 0:r.node.key)!==null&&a!==void 0?a: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,r,n,o){let i=this.ownerDocument.getMutableNode(this),{value:l,textValue:a,id:u,...c}=e;if(c.ref=r,i.props=c,i.rendered=n,i.render=o,i.value=l,i.textValue=a||(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,r){super(r),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new pn(e,`react-aria-${++r.nodeId}`),this.ownerDocument.startTransaction()}}class uf extends ra{get isConnected(){return this.isMounted}createElement(e){return new bt(e,this)}getMutableNode(e){let r=e.node;return this.mutatedNodes.has(e)||(r=e.node.clone(),this.mutatedNodes.add(e),e.node=r),this.markDirty(e),r}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 r=this.getMutableCollection();if(!r.getItem(e.node.key)){r.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 bt&&i.isConnected&&i.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var e,r;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=(r=this.lastChild)===null||r===void 0?void 0:r.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 na(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,l=s.useMemo(()=>new WeakMap,i);return s.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let d of r){let p=l.get(d);if(!p){p=e(d);var a,u;let v=(u=(a=p.props.id)!==null&&a!==void 0?a:d.key)!==null&&u!==void 0?u:d.id;if(v==null)throw new Error("Could not determine key for item");n&&(v=n+":"+v),p=s.cloneElement(p,o?{key:v,id:v,value:d}:{key:v}),l.set(d,p)}c.push(p)}return c}else if(typeof e!="function")return e},[e,r,l,n,o])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Vt=s.createContext(!1),cf=typeof DocumentFragment<"u"?new DocumentFragment:null;function df(t){let e=s.useContext(Vt),r=Ee();if(e)return s.createElement(s.Fragment,null,t.children);let n=s.createElement(Vt.Provider,{value:!0},t.children);return r?s.createElement("template",{"data-react-aria-hidden":!0},n):Oe.createPortal(n,cf)}function oa(t){let e=(r,n)=>s.useContext(Vt)?null:t(r,n);return e.displayName=t.displayName||t.name,s.forwardRef(e)}function ff(){return s.useContext(Vt)}function pf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Lt={exports:{}},$r={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
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={};/**
9
+ */var So;function vf(){if(So)return $r;So=1;var t=s;function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function a(p,v){var f=v(),h=n({inst:{value:f,getSnapshot:v}}),m=h[0].inst,$=h[1];return i(function(){m.value=f,m.getSnapshot=v,u(m)&&$({inst:m})},[p,f,v]),o(function(){return u(m)&&$({inst:m}),p(function(){u(m)&&$({inst:m})})},[p]),l(f),f}function u(p){var v=p.getSnapshot;p=p.value;try{var f=v();return!r(p,f)}catch{return!0}}function c(p,v){return v()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return $r.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,$r}var xr={};/**
10
10
  * @license React
11
11
  * use-sync-external-store-shim.development.js
12
12
  *
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
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=`
17
+ */var Co;function bf(){return Co||(Co=1,process.env.NODE_ENV!=="production"&&function(){function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}function e(f,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(!p){var $=h();i(m,$)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}$=l({inst:{value:m,getSnapshot:h}});var y=$[0].inst,C=$[1];return u(function(){y.value=m,y.getSnapshot=h,r(y)&&C({inst:y})},[f,m,h]),a(function(){return r(y)&&C({inst:y}),f(function(){r(y)&&C({inst:y})})},[f]),c(m),m}function r(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!i(f,m)}catch{return!0}}function n(f,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=s,i=typeof Object.is=="function"?Object.is:t,l=o.useState,a=o.useEffect,u=o.useLayoutEffect,c=o.useDebugValue,d=!1,p=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;xr.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),xr}var wo;function hf(){return wo||(wo=1,process.env.NODE_ENV==="production"?Lt.exports=vf():Lt.exports=bf()),Lt.exports}var gf=hf();const ia=s.createContext(!1),ht=s.createContext(null);function la(t){if(s.useContext(ht))return t.content;let{collection:r,document:n}=xf(t.createCollection);return s.createElement(s.Fragment,null,s.createElement(df,null,s.createElement(ht.Provider,{value:n},t.content)),s.createElement(mf,{render:t.children,collection:r}))}function mf({collection:t,render:e}){return e(t)}function yf(t,e,r){let n=Ee(),o=s.useRef(n);o.current=n;let i=s.useCallback(()=>o.current?r():e(),[e,r]);return gf.useSyncExternalStore(t,i)}const $f=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:yf;function xf(t){let[e]=s.useState(()=>new uf((t==null?void 0:t())||new vn)),r=s.useCallback(l=>e.subscribe(l),[e]),n=s.useCallback(()=>{let l=e.getCollection();return e.isSSR&&e.resetAfterSSR(),l},[e]),o=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=$f(r,n,o);return z(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const _r=s.createContext(null);function aa(t,e,r,n,o,i){let l=s.useCallback(u=>{u==null||u.setProps(e,r,n,i)},[e,r,n,i]),a=s.useContext(_r);if(a){let u=a.ownerDocument.nodesByProps.get(e);return u||(u=a.ownerDocument.createElement(t),u.setProps(e,r,n,i),a.appendChild(u),a.ownerDocument.updateCollection(),a.ownerDocument.nodesByProps.set(e,u)),o?s.createElement(_r.Provider,{value:u},o):null}return s.createElement(t,{ref:l},o)}function sa(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=s.forwardRef((o,i)=>{if(!s.useContext(ia)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return aa(t,o,i,"children"in o?o.children:null,null,a=>s.createElement(r,{node:a}))});return n.displayName=e.name,n}function Pf(t,e,r=ua){let n=({node:i})=>e(i.props,i.props.ref,i),o=s.forwardRef((i,l)=>{let a=r(i);var u;return(u=aa(t,i,l,null,a,c=>s.createElement(n,{node:c})))!==null&&u!==void 0?u:s.createElement(s.Fragment,null)});return o.displayName=e.name,o}function ua(t){return na({...t,addIdAndValue:!0})}const Eo=s.createContext(null);function ca(t){let e=s.useContext(Eo),r=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),n=t.idScope||(e==null?void 0:e.idScope),o=ua({...t,idScope:n,dependencies:r});return s.useContext(ht)&&(o=s.createElement(Sf,null,o)),e=s.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),s.createElement(Eo.Provider,{value:e},o)}function Sf({children:t}){let e=s.useContext(ht),r=s.useMemo(()=>s.createElement(ht.Provider,{value:null},s.createElement(ia.Provider,{value:!0},t)),[t]);return Ee()?s.createElement(_r.Provider,{value:e},r):Oe.createPortal(r,e)}const da=s.createContext({}),Cf=s.createContext(null),wf=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),bn=s.createContext({}),Ef=oa(function(e,r){[e,r]=ne(e,r,bn),e=Tf(e);let n=e,{isPending:o}=n,{buttonProps:i,isPressed:l}=Yt(e,r),{focusProps:a,isFocused:u,isFocusVisible:c}=De(e),{hoverProps:d,isHovered:p}=He({...e,isDisabled:e.isDisabled||o}),v={isHovered:p,isPressed:(n.isPressed||l)&&!o,isFocused:u,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:o??!1},f=Q({...e,values:v,defaultClassName:"react-aria-Button"}),h=X(i.id),m=X(),$=i["aria-labelledby"];o&&($?$=`${$} ${m}`:i["aria-label"]&&($=`${h} ${m}`));let y=s.useRef(o);return s.useEffect(()=>{let C={"aria-labelledby":$||h};(!y.current&&u&&o||y.current&&u&&!o)&&io(C,"assertive"),y.current=o},[o,u,$,h]),s.createElement("button",{...q(e,{propNames:wf}),...B(i,a,d),...f,type:i.type==="submit"&&o?"button":i.type,id:h,ref:r,"aria-labelledby":$,slot:e.slot||void 0,"aria-disabled":o?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":v.isPressed||void 0,"data-hovered":p||void 0,"data-focused":u||void 0,"data-pending":o||void 0,"data-focus-visible":c||void 0},s.createElement(Cf.Provider,{value:{id:m}},f.children))});function Tf(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const Jt=s.createContext({}),fa=s.createContext(null);class To{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(e){let r=this.keyMap.get(e);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var r;return(r=this.keyMap.get(e))!==null&&r!==void 0?r:null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){let r=this.keyMap.get(e);return(r==null?void 0:r.childNodes)||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let a of l.childNodes)r(a)};for(let l of e)r(l);let n=null,o=0;for(let[l,a]of this.keyMap)n?(n.nextKey=l,a.prevKey=n.key):(this.firstKey=l,a.prevKey=void 0),a.type==="item"&&(a.index=o++),n=a,n.nextKey=void 0;var i;this.lastKey=(i=n==null?void 0:n.key)!==null&&i!==void 0?i:null}}class ue extends Set{constructor(e,r,n){super(e),e instanceof ue?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function Df(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function kf(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,l=s.useRef(!1),[,a]=s.useState(!1),u=s.useRef(null),c=s.useRef(null),[,d]=s.useState(null),p=s.useMemo(()=>Do(t.selectedKeys),[t.selectedKeys]),v=s.useMemo(()=>Do(t.defaultSelectedKeys,new ue),[t.defaultSelectedKeys]),[f,h]=Te(p,v,t.onSelectionChange),m=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[$,y]=s.useState(o);o==="replace"&&$==="toggle"&&typeof f=="object"&&f.size===0&&y("replace");let C=s.useRef(o);return s.useEffect(()=>{o!==C.current&&(y(o),C.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:$,setSelectionBehavior:y,get isFocused(){return l.current},setFocused(E){l.current=E,a(E)},get focusedKey(){return u.current},get childFocusStrategy(){return c.current},setFocusedKey(E,K="first"){u.current=E,c.current=K,d(E)},selectedKeys:f,setSelectedKeys(E){(n||!Df(E,f))&&h(E)},disabledKeys:m,disabledBehavior:i}}function Do(t,e){return t?t==="all"?"all":new ue(t):e}class Rf{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,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}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 r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}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(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&yr(this.collection,o,e)<0)&&(e=o)}var r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r:null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let o=this.collection.getItem(n);(!e||o&&yr(this.collection,o,e)>0)&&(e=o)}var r;return(r=e==null?void 0:e.key)!==null&&r!==void 0?r: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 r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new ue([r],r,r);else{let l=this.state.selectedKeys;var o;let a=(o=l.anchorKey)!==null&&o!==void 0?o:r;n=new ue(l,a,r);var i;for(let u of this.getKeyRange(a,(i=l.currentKey)!==null&&i!==void 0?i:r))n.delete(u);for(let u of this.getKeyRange(r,a))this.canSelectItem(u)&&n.add(u)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?yr(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){var n;if(!((n=this.layoutDelegate)===null||n===void 0)&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);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===r)return o;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new ue(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new ue([r],r,r):new ue;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new ue;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=[],r=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")&&r((i=(o=hd(vl(l,this.collection)))===null||o===void 0?void 0:o.key)!==null&&i!==void 0?i:null)}n=this.collection.getKeyAfter(n)}};return r(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 ue)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){var r;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(r=n.props)===null||r===void 0)&&r.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var r,n;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.isDisabled))}isLink(e){var r,n;return!!(!((n=this.collection.getItem(e))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.href)}getItemProps(e){var r;return(r=this.collection.getItem(e))===null||r===void 0?void 0:r.props}constructor(e,r,n){this.collection=e,this.state=r;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 pa(t){let{filter:e,layoutDelegate:r}=t,n=kf(t),o=s.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=s.useCallback(d=>e?new To(e(d)):new To(d),[e]),l=s.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),a=bd(t,i,l),u=s.useMemo(()=>new Rf(a,n,{layoutDelegate:r}),[a,n,r]);const c=s.useRef(null);return s.useEffect(()=>{if(n.focusedKey!=null&&!a.getItem(n.focusedKey)&&c.current){const y=c.current.getItem(n.focusedKey),C=[...c.current.getKeys()].map(b=>{const R=c.current.getItem(b);return(R==null?void 0:R.type)==="item"?R:null}).filter(b=>b!==null),E=[...a.getKeys()].map(b=>{const R=a.getItem(b);return(R==null?void 0:R.type)==="item"?R:null}).filter(b=>b!==null);var d,p;const K=((d=C==null?void 0:C.length)!==null&&d!==void 0?d:0)-((p=E==null?void 0:E.length)!==null&&p!==void 0?p:0);var v,f,h;let T=Math.min(K>1?Math.max(((v=y==null?void 0:y.index)!==null&&v!==void 0?v:0)-K+1,0):(f=y==null?void 0:y.index)!==null&&f!==void 0?f:0,((h=E==null?void 0:E.length)!==null&&h!==void 0?h:0)-1),w=null,F=!1;for(;T>=0;){if(!u.isDisabled(E[T].key)){w=E[T];break}if(T<E.length-1&&!F)T++;else{F=!0;var m,$;T>((m=y==null?void 0:y.index)!==null&&m!==void 0?m:0)&&(T=($=y==null?void 0:y.index)!==null&&$!==void 0?$:0),T--}}n.setFocusedKey(w?w.key:null)}c.current=a},[a,u,n,n.focusedKey]),{collection:a,disabledKeys:o,selectionManager:u}}function Kf(t){var e;let[r,n]=Te(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),o=s.useMemo(()=>r!=null?[r]:[],[r]),{collection:i,disabledKeys:l,selectionManager:a}=pa({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:c=>{if(c==="all")return;var d;let p=(d=c.values().next().value)!==null&&d!==void 0?d:null;p===r&&t.onSelectionChange&&t.onSelectionChange(p),n(p)}}),u=r!=null?i.getItem(r):null;return{collection:i,disabledKeys:l,selectionManager:a,selectedKey:r,setSelectedKey:n,selectedItem:u}}function Qt(t){let[e,r]=Te(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const n=s.useCallback(()=>{r(!0)},[r]),o=s.useCallback(()=>{r(!1)},[r]),i=s.useCallback(()=>{r(!e)},[r,e]);return{isOpen:e,setOpen:r,open:n,close:o,toggle:i}}function Lf(t){let[e,r]=Te(t.isExpanded,t.defaultExpanded||!1,t.onExpandedChange);const n=s.useCallback(()=>{r(!0)},[r]),o=s.useCallback(()=>{r(!1)},[r]),i=s.useCallback(()=>{r(!e)},[r,e]);return{isExpanded:e,setExpanded:r,expand:n,collapse:o,toggle:i}}function Mf(t){let{allowsMultipleExpanded:e=!1,isDisabled:r=!1}=t,[n,o]=Te(s.useMemo(()=>t.expandedKeys?new Set(t.expandedKeys):void 0,[t.expandedKeys]),s.useMemo(()=>t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,[t.defaultExpandedKeys]),t.onExpandedChange);return s.useEffect(()=>{!e&&n.size>1&&o(new Set([n.values().next().value]))}),{allowsMultipleExpanded:e,isDisabled:r,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 Af(t){let e=Qt(t),[r,n]=s.useState(null),[o,i]=s.useState([]),l=()=>{i([]),e.close()};return{focusStrategy:r,...e,open(c=null){n(c),e.open()},toggle(c=null){n(c),e.toggle()},close(){l()},expandedKeysStack:o,openSubmenu:(c,d)=>{i(p=>d>p.length?p:[...p.slice(0,d),c])},closeSubmenu:(c,d)=>{i(p=>p[d]===c?p.slice(0,d):p)}}}function Ff(t){let e=Qt(t),[r,n]=s.useState(null),o=Kf({...t,onSelectionChange:u=>{t.onSelectionChange!=null&&t.onSelectionChange(u),e.close(),i.commitValidation()}}),i=ln({...t,value:o.selectedKey}),[l,a]=s.useState(!1);return{...i,...o,...e,focusStrategy:r,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:a}}const If=1500,ko=500;let Ke={},Bf=0,it=!1,ve=null,Le=null;function va(t={}){let{delay:e=If,closeDelay:r=ko}=t,{isOpen:n,open:o,close:i}=Qt(t),l=s.useMemo(()=>`${++Bf}`,[]),a=s.useRef(null),u=s.useRef(i),c=()=>{Ke[l]=v},d=()=>{for(let h in Ke)h!==l&&(Ke[h](!0),delete Ke[h])},p=()=>{a.current&&clearTimeout(a.current),a.current=null,d(),c(),it=!0,o(),ve&&(clearTimeout(ve),ve=null),Le&&(clearTimeout(Le),Le=null)},v=h=>{h||r<=0?(a.current&&clearTimeout(a.current),a.current=null,u.current()):a.current||(a.current=setTimeout(()=>{a.current=null,u.current()},r)),ve&&(clearTimeout(ve),ve=null),it&&(Le&&clearTimeout(Le),Le=setTimeout(()=>{delete Ke[l],Le=null,it=!1},Math.max(ko,r)))},f=()=>{d(),c(),!n&&!ve&&!it?ve=setTimeout(()=>{ve=null,it=!0,p()},e):n||p()};return s.useEffect(()=>{u.current=i},[i]),s.useEffect(()=>()=>{a.current&&clearTimeout(a.current),Ke[l]&&delete Ke[l]},[l]),{isOpen:n,open:h=>{!h&&e>0&&!a.current?f():p()},close:v}}const ba=s.createContext(null),Ur=s.createContext({});let Nf=t=>{let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,...o}=t;return o};const Of=oa(function(e,r){[e,r]=ne(e,r,Ur);let{hoverProps:n,isHovered:o}=He(e),{isFocused:i,isFocusVisible:l,focusProps:a}=De({isTextInput:!0,autoFocus:e.autoFocus}),u=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",c=Q({...e,values:{isHovered:o,isFocused:i,isFocusVisible:l,isDisabled:e.disabled||!1,isInvalid:u},defaultClassName:"react-aria-Input"});return s.createElement("input",{...B(Nf(e),a,n),...c,ref:r,"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})}),zf=s.createContext({}),Hf=s.createContext(null),Vf=s.forwardRef(function(e,r){[e,r]=ne(e,r,Hf);let{validationBehavior:n}=Xt(ba)||{};var o,i;let l=(i=(o=e.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",a=s.useRef(null),[u,c]=ne({},a,Ur),[d,p]=fn(),[v,f]=s.useState("input"),{labelProps:h,inputProps:m,descriptionProps:$,errorMessageProps:y,...C}=Rc({...ta(e),inputElementType:v,label:p,validationBehavior:l},c),E=s.useCallback(w=>{c.current=w,w&&f(w instanceof HTMLTextAreaElement?"textarea":"input")},[c]),K=Q({...e,values:{isDisabled:e.isDisabled||!1,isInvalid:C.isInvalid,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-TextField"}),T=q(e);return delete T.id,s.createElement("div",{...T,...K,ref:r,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},s.createElement(je,{values:[[da,{...h,ref:d}],[Ur,{...B(m,u),ref:E}],[zf,{...m,ref:E}],[Jt,{slots:{description:$,errorMessage:y}}],[fa,C]]},K.children))}),jf=s.createContext(null),Wf=s.createContext(null),_f={CollectionRoot({collection:t,renderDropIndicator:e}){return Ro(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return Ro(t,e,r)}};function Ro(t,e,r){return na({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){var o;let i=n.render(n);if(!r||n.type!=="item")return i;let l=n.key,a=t.getKeyAfter(l);return s.createElement(s.Fragment,null,r({type:"item",key:l,dropPosition:"before"}),i,(a==null||((o=t.getItem(a))===null||o===void 0?void 0:o.type)!=="item")&&r({type:"item",key:l,dropPosition:"after"}))}})}const hn=s.createContext(_f);var ha={};ha={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var ga={};ga={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var ma={};ma={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var ya={};ya={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var $a={};$a={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var xa={};xa={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var Pa={};Pa={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var Sa={};Sa={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 wa={};wa={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var Ea={};Ea={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var Ta={};Ta={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var Da={};Da={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var ka={};ka={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var Ra={};Ra={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var Ka={};Ka={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var La={};La={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var Ma={};Ma={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var Aa={};Aa={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var Fa={};Fa={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var Ia={};Ia={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var Ba={};Ba={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var Na={};Na={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var Oa={};Oa={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var za={};za={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var Ha={};Ha={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var Va={};Va={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var ja={};ja={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var Wa={};Wa={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var _a={};_a={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var Ua={};Ua={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var Ga={};Ga={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var qa={};qa={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var Ya={};Ya={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var Za={};Za={"ar-AE":ha,"bg-BG":ga,"cs-CZ":ma,"da-DK":ya,"de-DE":$a,"el-GR":xa,"en-US":Pa,"es-ES":Sa,"et-EE":Ca,"fi-FI":wa,"fr-FR":Ea,"he-IL":Ta,"hr-HR":Da,"hu-HU":ka,"it-IT":Ra,"ja-JP":Ka,"ko-KR":La,"lt-LT":Ma,"lv-LV":Aa,"nb-NO":Fa,"nl-NL":Ia,"pl-PL":Ba,"pt-BR":Na,"pt-PT":Oa,"ro-RO":za,"ru-RU":Ha,"sk-SK":Va,"sl-SI":ja,"sr-SP":Wa,"sv-SE":_a,"tr-TR":Ua,"uk-UA":Ga,"zh-CN":qa,"zh-TW":Ya};const er=s.createContext({}),Xa=s.createContext(null),Uf=s.forwardRef(function(e,r){let{render:n}=s.useContext(Xa);return s.createElement(s.Fragment,null,n(e,r))});function Ja(t,e){var r;let n=t==null?void 0:t.renderDropIndicator,o=t==null||(r=t.isVirtualDragging)===null||r===void 0?void 0:r.call(t),i=s.useCallback(l=>{if(o||e!=null&&e.isDropTarget(l))return n?n(l):s.createElement(Uf,{target:l})},[e==null?void 0:e.target,o,n]);return t!=null&&t.useDropIndicator?i:void 0}function Gf(t,e,r){var n,o;let i=t.focusedKey,l=null;if(!(e==null||(n=e.isVirtualDragging)===null||n===void 0)&&n.call(e)&&(r==null||(o=r.target)===null||o===void 0?void 0:o.type)==="item"){l=r.target.key;var a;r.target.dropPosition==="after"&&(l=(a=r.collection.getKeyAfter(l))!==null&&a!==void 0?a:l)}return s.useMemo(()=>new Set([i,l].filter(u=>u!=null)),[i,l])}const Qa=s.createContext({}),qf=sa("header",function(e,r){return[e,r]=ne(e,r,Qa),s.createElement("header",{className:"react-aria-Header",...e,ref:r},e.children)}),Yf=s.createContext({}),gn=s.createContext(null),mt=s.createContext(null),Zf=s.forwardRef(function(e,r){[e,r]=ne(e,r,gn);let n=s.useContext(mt);return n?s.createElement(es,{state:n,props:e,listBoxRef:r}):s.createElement(la,{content:s.createElement(ca,e)},o=>s.createElement(Xf,{props:e,listBoxRef:r,collection:o}))});function Xf({props:t,listBoxRef:e,collection:r}){t={...t,collection:r,children:null,items:null};let{layoutDelegate:n}=s.useContext(hn),{filterFn:o,collectionProps:i,collectionRef:l}=s.useContext(jf)||{};e=oe(s.useMemo(()=>jo(e,l!==void 0?l:null),[l,e]));let a=s.useMemo(()=>o?r.filter(o):r,[r,o]),u=pa({...t,collection:a,layoutDelegate:n});return s.createElement(es,{state:u,props:{...t,...i},listBoxRef:e})}function es({state:t,props:e,listBoxRef:r}){let{dragAndDropHooks:n,layout:o="stack",orientation:i="vertical"}=e,{collection:l,selectionManager:a}=t,u=!!(n!=null&&n.useDraggableCollectionState),c=!!(n!=null&&n.useDroppableCollectionState),{direction:d}=Ve(),{disabledBehavior:p,disabledKeys:v}=a,f=on({usage:"search",sensitivity:"base"}),{isVirtualized:h,layoutDelegate:m,dropTargetDelegate:$,CollectionRoot:y}=s.useContext(hn),C=s.useMemo(()=>e.keyboardDelegate||new dn({collection:l,collator:f,ref:r,disabledKeys:v,disabledBehavior:p,layout:o,orientation:i,direction:d,layoutDelegate:m}),[l,f,r,p,v,i,d,e.keyboardDelegate,o,m]),{listBoxProps:E}=fd({...e,shouldSelectOnPressUp:u||e.shouldSelectOnPressUp,keyboardDelegate:C,isVirtualized:h},t,r),K=s.useRef(u),T=s.useRef(c);s.useEffect(()=>{K.current!==u&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),T.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 w,F,b,R=!1,L=null,D=s.useRef(null);if(u&&n){w=n.useDraggableCollectionState({collection:l,selectionManager:a,preview:n.renderDragPreview?D:void 0}),n.useDraggableCollection({},w,r);let k=n.DragPreview;L=n.renderDragPreview?s.createElement(k,{ref:D},n.renderDragPreview):null}if(c&&n){F=n.useDroppableCollectionState({collection:l,selectionManager:a});let k=n.dropTargetDelegate||$||new n.ListDropTargetDelegate(l,r,{orientation:i,layout:o,direction:d});b=n.useDroppableCollection({keyboardDelegate:C,dropTargetDelegate:k},F,r),R=F.isDropTarget({type:"root"})}let{focusProps:A,isFocused:g,isFocusVisible:P}=De(),M={isDropTarget:R,isEmpty:t.collection.size===0,isFocused:g,isFocusVisible:P,layout:e.layout||"stack",state:t},N=Q({className:e.className,style:e.style,defaultClassName:"react-aria-ListBox",values:M}),O=null;return t.collection.size===0&&e.renderEmptyState&&(O=s.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(M))),s.createElement(vi,null,s.createElement("div",{...q(e),...B(E,A,b==null?void 0:b.collectionProps),...N,ref:r,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":R||void 0,"data-empty":t.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"},s.createElement(je,{values:[[gn,e],[mt,t],[er,{dragAndDropHooks:n,dragState:w,dropState:F}],[Yf,{elementType:"div"}],[Xa,{render:ep}],[Wf,{name:"ListBoxSection",render:ts}]]},s.createElement(y,{collection:l,scrollRef:r,persistedKeys:Gf(a,n,F),renderDropIndicator:Ja(n,F)})),O,L))}function ts(t,e,r,n="react-aria-ListBoxSection"){let o=s.useContext(mt),{dragAndDropHooks:i,dropState:l}=s.useContext(er),{CollectionBranch:a}=s.useContext(hn),[u,c]=fn();var d;let{headingProps:p,groupProps:v}=$d({heading:c,"aria-label":(d=t["aria-label"])!==null&&d!==void 0?d:void 0}),f=Q({defaultClassName:n,className:t.className,style:t.style,values:{}});return s.createElement("section",{...q(t),...v,...f,ref:e},s.createElement(Qa.Provider,{value:{...p,ref:u}},s.createElement(a,{collection:o.collection,parent:r,renderDropIndicator:Ja(i,l)})))}const Jf=Pf("section",ts),Qf=sa("item",function(e,r,n){let o=oe(r),i=s.useContext(mt),{dragAndDropHooks:l,dragState:a,dropState:u}=s.useContext(er),{optionProps:c,labelProps:d,descriptionProps:p,...v}=yd({key:n.key,"aria-label":e==null?void 0:e["aria-label"]},i,o),{hoverProps:f,isHovered:h}=He({isDisabled:!v.allowsSelection&&!v.hasAction,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),m=null;a&&l&&(m=l.useDraggableItem({key:n.key},a));let $=null;u&&l&&($=l.useDroppableItem({target:{type:"item",key:n.key,dropPosition:"on"}},u,o));let y=a&&a.isDragging(n.key),C=Q({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...v,isHovered:h,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:y,isDropTarget:$==null?void 0:$.isDropTarget}});s.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 E=e.href?"a":"div";return s.createElement(E,{...B(c,f,m==null?void 0:m.dragProps,$==null?void 0:$.dropProps),...C,ref:o,"data-allows-dragging":!!a||void 0,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-dragging":y||void 0,"data-drop-target":($==null?void 0:$.isDropTarget)||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},s.createElement(je,{values:[[Jt,{slots:{label:d,description:p}}]]},C.children))});function ep(t,e){e=oe(e);let{dragAndDropHooks:r,dropState:n}=s.useContext(er),{dropIndicatorProps:o,isHidden:i,isDropTarget:l}=r.useDropIndicator(t,n,e);return i?null:s.createElement(rp,{...t,dropIndicatorProps:o,isDropTarget:l,ref:e})}function tp(t,e){let{dropIndicatorProps:r,isDropTarget:n,...o}=t,i=Q({...o,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:n}});return s.createElement("div",{...r,...i,role:"option",ref:e,"data-drop-target":n||void 0})}const rp=s.forwardRef(tp),rs=s.createContext({placement:"bottom"}),mn=s.createContext(null),ns=s.forwardRef(function(e,r){[e,r]=ne(e,r,mn);let n=s.useContext(tr),o=Qt(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?o:n,l=ei(r,i.isOpen)||e.isExiting||!1;if(ff()){let u=e.children;return typeof u=="function"&&(u=u({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),s.createElement(s.Fragment,null,u)}return i&&!i.isOpen&&!l?null:s.createElement(np,{...e,triggerRef:e.triggerRef,state:i,popoverRef:r,isExiting:l})});function np({state:t,isExiting:e,UNSTABLE_portalContainer:r,...n}){let o=s.useRef(null),[i,l]=s.useState(0);z(()=>{o.current&&t.isOpen&&l(o.current.getBoundingClientRect().width)},[t.isOpen,o]);var a;let{popoverProps:u,underlayProps:c,arrowProps:d,placement:p}=ed({...n,offset:(a=n.offset)!==null&&a!==void 0?a:8,arrowSize:i},t),v=n.popoverRef,f=Qo(v,!!p)||n.isEntering||!1,h=Q({...n,defaultClassName:"react-aria-Popover",values:{trigger:n.trigger||null,placement:p,isEntering:f,isExiting:e}}),m={...u.style,...h.style};return s.createElement(nd,{...n,isExiting:e,portalContainer:r},!n.isNonModal&&t.isOpen&&s.createElement("div",{"data-testid":"underlay",...c,style:{position:"fixed",inset:0}}),s.createElement("div",{...B(q(n),u),...h,ref:v,slot:n.slot||void 0,style:m,"data-trigger":n.trigger,"data-placement":p,"data-entering":f||void 0,"data-exiting":e||void 0},!n.isNonModal&&s.createElement(ho,{onDismiss:t.close}),s.createElement(rs.Provider,{value:{...d,placement:p,ref:o}},h.children),s.createElement(ho,{onDismiss:t.close})))}const op=s.createContext(null),os=s.createContext(null),tr=s.createContext(null);function ip(t){let e=Af(t),r=s.useRef(null),{triggerProps:n,overlayProps:o}=Ri({type:"dialog"},e,r);return n.id=X(),o["aria-labelledby"]=n.id,s.createElement(je,{values:[[tr,e],[op,e],[os,o],[mn,{trigger:"DialogTrigger",triggerRef:r}]]},s.createElement(Tu,{...n,ref:r,isPressed:e.isOpen},t.children))}const lp=s.forwardRef(function(e,r){let n=e["aria-labelledby"];[e,r]=ne(e,r,os);let{dialogProps:o,titleProps:i}=Sd({...e,"aria-labelledby":n},r),l=s.useContext(tr);!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 a=Q({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(l==null?void 0:l.close)||(()=>{})}});return s.createElement("section",{...q(e),...o,...a,ref:r,slot:e.slot||void 0},s.createElement(je,{values:[[sf,{slots:{[Ht]:{},title:{...i,level:2}}}],[bn,{slots:{[Ht]:{},close:{onPress:()=>l==null?void 0:l.close()}}}]]},a.children))});function ap(t){return t&&t.__esModule?t.default:t}const yn=s.createContext(null),$n=s.createContext(null),sp=s.forwardRef(function(e,r){[e,r]=ne(e,r,yn);let{children:n,isDisabled:o=!1,isInvalid:i=!1,isRequired:l=!1}=e,a=s.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 s.createElement(la,{content:a},u=>s.createElement(up,{props:e,collection:u,selectRef:r}))});function up({props:t,selectRef:e,collection:r}){let{validationBehavior:n}=Xt(ba)||{};var o,i;let l=(i=(o=t.validationBehavior)!==null&&o!==void 0?o:n)!==null&&i!==void 0?i:"native",a=Ff({...t,collection:r,children:void 0,validationBehavior:l}),{isFocusVisible:u,focusProps:c}=De({within:!0}),d=s.useRef(null),[p,v]=fn(),{labelProps:f,triggerProps:h,valueProps:m,menuProps:$,descriptionProps:y,errorMessageProps:C,...E}=Ed({...ta(t),label:v,validationBehavior:l},a,d),[K,T]=s.useState(null),w=s.useCallback(()=>{d.current&&T(d.current.offsetWidth+"px")},[d]);Dr({ref:d,onResize:w});let F=s.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:u,isDisabled:t.isDisabled||!1,isInvalid:E.isInvalid||!1,isRequired:t.isRequired||!1}),[a.isOpen,a.isFocused,u,t.isDisabled,E.isInvalid,t.isRequired]),b=Q({...t,values:F,defaultClassName:"react-aria-Select"}),R=q(t);delete R.id;let L=s.useRef(null);return s.createElement(je,{values:[[yn,t],[$n,a],[is,m],[da,{...f,ref:p,elementType:"span"}],[bn,{...h,ref:d,isPressed:a.isOpen}],[tr,a],[mn,{trigger:"Select",triggerRef:d,scrollRef:L,placement:"bottom start",style:{"--trigger-width":K}}],[gn,{...$,ref:L}],[mt,a],[Jt,{slots:{description:y,errorMessage:C}}],[fa,E]]},s.createElement("div",{...R,...b,...c,ref:e,slot:t.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":u||void 0,"data-open":a.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":E.isInvalid||void 0,"data-required":t.isRequired||void 0}),s.createElement(Dd,{autoComplete:t.autoComplete,state:a,triggerRef:d,label:v,name:t.name,isDisabled:t.isDisabled}))}const is=s.createContext(null),cp=s.forwardRef(function(e,r){var n,o;[e,r]=ne(e,r,is);let i=s.useContext($n),{placeholder:l}=Xt(yn),a=i.selectedKey!=null?i.collection.getItem(i.selectedKey):null,u=a==null?void 0:a.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=nn(ap(Za),"react-aria-components");var d,p,v;let f=Q({...e,defaultChildren:(d=u??l)!==null&&d!==void 0?d:c.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(p=(n=i.selectedItem)===null||n===void 0?void 0:n.value)!==null&&p!==void 0?p:null,selectedText:(v=(o=i.selectedItem)===null||o===void 0?void 0:o.textValue)!==null&&v!==void 0?v:null,isPlaceholder:!a}}),h=q(e);return s.createElement("span",{ref:r,...h,...f,"data-placeholder":!a||void 0},s.createElement(Jt.Provider,{value:void 0},f.children))}),dp=s.createContext({}),ls=s.createContext(null),fp=s.forwardRef(function(e,r){[e,r]=ne(e,r,dp);let n=kc(e),{groupProps:o}=mc(e,n,r),i=Q({...e,values:{isDisabled:n.isDisabled,state:n},defaultClassName:"react-aria-ToggleButtonGroup"});return s.createElement("div",{...o,...i,ref:r,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},s.createElement(ls.Provider,{value:n},i.children))}),pp=s.createContext({}),vp=s.forwardRef(function(e,r){[e,r]=ne(e,r,pp);let n=s.useContext(ls),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:a,isDisabled:u}=n&&e.id!=null?yc({...e,id:e.id},n,r):$i({...e,id:e.id!=null?String(e.id):void 0},o,r),{focusProps:c,isFocused:d,isFocusVisible:p}=De(e),{hoverProps:v,isHovered:f}=He(e),h=Q({...e,id:void 0,values:{isHovered:f,isPressed:l,isFocused:d,isSelected:o.isSelected,isFocusVisible:p,isDisabled:u,state:o},defaultClassName:"react-aria-ToggleButton"});return s.createElement("button",{...B(i,c,v),...h,ref:r,slot:e.slot||void 0,"data-focused":d||void 0,"data-disabled":u||void 0,"data-pressed":l||void 0,"data-selected":a||void 0,"data-hovered":f||void 0,"data-focus-visible":p||void 0})}),xn=s.createContext(null),as=s.createContext(null);function bp(t){let e=va(t),r=s.useRef(null),{triggerProps:n,tooltipProps:o}=Rd(t,e,r);return s.createElement(je,{values:[[xn,e],[as,{...o,triggerRef:r}]]},s.createElement(Ju,{...n,ref:r},t.children))}const hp=s.forwardRef(function({UNSTABLE_portalContainer:e,...r},n){[r,n]=ne(r,n,as);let o=s.useContext(xn),i=va(r),l=r.isOpen!=null||r.defaultOpen!=null||!o?i:o,a=ei(n,l.isOpen)||r.isExiting||!1;return!l.isOpen&&!a?null:s.createElement(Xc,{portalContainer:e},s.createElement(gp,{...r,tooltipRef:n,isExiting:a}))});function gp(t){let e=s.useContext(xn),r=s.useRef(null),[n,o]=s.useState(0);z(()=>{r.current&&e.isOpen&&o(r.current.getBoundingClientRect().width)},[e.isOpen,r]);let{overlayProps:i,arrowProps:l,placement:a}=ki({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:n,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,onClose:()=>e.close(!0)}),u=Qo(t.tooltipRef,!!a)||t.isEntering||!1,c=Q({...t,defaultClassName:"react-aria-Tooltip",values:{placement:a,isEntering:u,isExiting:t.isExiting,state:e}});t=B(t,i);let{tooltipProps:d}=kd(t,e);return s.createElement("div",{...d,ref:t.tooltipRef,...c,style:{...i.style,...c.style},"data-placement":a??void 0,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},s.createElement(rs.Provider,{value:{...l,placement:a,ref:r}},c.children))}const ss=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:mp}=S.createRecipeContext({recipe:ss}),yp=mp("div"),us=s.forwardRef(function({children:e,placement:r="bottom",...n},o){return x.jsx(yp,{ref:o,asChild:!0,...n,children:x.jsx(hp,{placement:r,...n,children:e})})});us.displayName="Tooltip";const cs=bp;cs.displayName="TooltipTrigger";const ds=s.forwardRef(function(e,r){const n=s.useRef(null),o=oe(S.mergeRefs(n,r)),{focusableProps:i}=Xe(e,o);if(s.isValidElement(e.children))return s.cloneElement(e.children,B(i,e.children.props,{ref:o}))});ds.displayName="MakeElementFocusable";var $p=(t,e,r,n,o,i,l,a)=>{let u=document.documentElement,c=["light","dark"];function d(f){(Array.isArray(t)?t:[t]).forEach(h=>{let m=h==="class",$=m&&i?o.map(y=>i[y]||y):o;m?(u.classList.remove(...$),u.classList.add(i&&i[f]?i[f]:f)):u.setAttribute(h,f)}),p(f)}function p(f){a&&c.includes(f)&&(u.style.colorScheme=f)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(n)d(n);else try{let f=localStorage.getItem(e)||r,h=l&&f==="system"?v():f;d(h)}catch{}},Ko=["light","dark"],fs="(prefers-color-scheme: dark)",xp=typeof window>"u",Pn=G.createContext(void 0),Pp={setTheme:t=>{},themes:[]},Sp=()=>{var t;return(t=G.useContext(Pn))!=null?t:Pp},Cp=t=>G.useContext(Pn)?G.createElement(G.Fragment,null,t.children):G.createElement(Ep,{...t}),wp=["light","dark"],Ep=({forcedTheme:t,disableTransitionOnChange:e=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:o="theme",themes:i=wp,defaultTheme:l=r?"system":"light",attribute:a="data-theme",value:u,children:c,nonce:d,scriptProps:p})=>{let[v,f]=G.useState(()=>Dp(o,l)),[h,m]=G.useState(()=>v==="system"?Pr():v),$=u?Object.values(u):i,y=G.useCallback(T=>{let w=T;if(!w)return;T==="system"&&r&&(w=Pr());let F=u?u[w]:w,b=e?kp(d):null,R=document.documentElement,L=D=>{D==="class"?(R.classList.remove(...$),F&&R.classList.add(F)):D.startsWith("data-")&&(F?R.setAttribute(D,F):R.removeAttribute(D))};if(Array.isArray(a)?a.forEach(L):L(a),n){let D=Ko.includes(l)?l:null,A=Ko.includes(w)?w:D;R.style.colorScheme=A}b==null||b()},[d]),C=G.useCallback(T=>{let w=typeof T=="function"?T(v):T;f(w);try{localStorage.setItem(o,w)}catch{}},[v]),E=G.useCallback(T=>{let w=Pr(T);m(w),v==="system"&&r&&!t&&y("system")},[v,t]);G.useEffect(()=>{let T=window.matchMedia(fs);return T.addListener(E),E(T),()=>T.removeListener(E)},[E]),G.useEffect(()=>{let T=w=>{w.key===o&&(w.newValue?f(w.newValue):C(l))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[C]),G.useEffect(()=>{y(t??v)},[t,v]);let K=G.useMemo(()=>({theme:v,setTheme:C,forcedTheme:t,resolvedTheme:v==="system"?h:v,themes:r?[...i,"system"]:i,systemTheme:r?h:void 0}),[v,C,t,h,r,i]);return G.createElement(Pn.Provider,{value:K},G.createElement(Tp,{forcedTheme:t,storageKey:o,attribute:a,enableSystem:r,enableColorScheme:n,defaultTheme:l,value:u,themes:i,nonce:d,scriptProps:p}),c)},Tp=G.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:i,value:l,themes:a,nonce:u,scriptProps:c})=>{let d=JSON.stringify([r,e,i,t,a,l,n,o]).slice(1,-1);return G.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${$p.toString()})(${d})`}})}),Dp=(t,e)=>{if(xp)return;let r;try{r=localStorage.getItem(t)||void 0}catch{}return r||e},kp=t=>{let e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},Pr=t=>(t||(t=window.matchMedia(fs)),t.matches?"dark":"light");function Rp(t){return x.jsx(Cp,{attribute:"class",disableTransitionOnChange:!0,...t})}function Sn(){const{resolvedTheme:t,setTheme:e}=Sp();return{colorMode:t,setColorMode:e,toggleColorMode:()=>{e(t==="light"?"dark":"light")}}}function Kp(t,e){const{colorMode:r}=Sn();return r==="light"?t:e}function Lp(){const{colorMode:t}=Sn();return t==="light"?"Light Theme":"DarkTheme"}const Mp=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 Ap(t){var r;const e={};for(const n in t)(r=t[n])!=null&&r.value?e[n]=t[n].value:e[n]=t[n];return e}const Fp=Ap(W.themeTokens.breakpoints),Ip=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"}}),Bp={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"}}},Np=S.defineLayerStyles({disabled:{value:{opacity:"0.5",cursor:"not-allowed"}}}),Op=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"}}),zp=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"}}),Hp=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"}}),Cn=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"}}),Vp={avatar:Oo,button:Me,code:Op,heading:zp,kbd:Hp,link:Xl,tooltip:ss,textInput:Cn},jp=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"]}),Wp=S.defineSemanticTokens.shadows(W.themeTokens.shadow),_p=S.defineSemanticTokens.radii({}),Up={colors:jp,shadows:Wp,radii:_p},Gp=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"}}),qp=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"}}),Yp=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"}}),Zp=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"}}),ps=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"}}),Xp=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"}}),Jp={dialog:Gp,list:qp,table:Yp,checkbox:Zp,select:ps,accordion:Xp},Qp=S.defineTextStyles(W.themeTokens.textStyle),ev=S.defineTokens.durations(W.themeTokens.aspectRatio),tv=S.defineTokens.animations(W.themeTokens.animation),rv=S.defineTokens.blurs(W.themeTokens.blur),nv=S.defineTokens.borders(W.themeTokens.border),ov=S.defineTokens.colors({...W.themeTokens.color["blacks-and-whites"]}),iv=S.defineTokens.durations(W.themeTokens.duration),lv=S.defineTokens.easings(W.themeTokens.easing),av=S.defineTokens.fonts(W.themeTokens.fontFamily),sv=S.defineTokens.fontSizes(W.themeTokens.fontSize),uv=S.defineTokens.fontWeights(W.themeTokens.fontWeight),cv=t=>Object.keys(t).reduce((e,r)=>{const o=parseFloat(t[r].value)/100;return e[r]={value:`${o}em`},e},{}),dv=S.defineTokens.letterSpacings(cv(W.themeTokens.letterSpacing)),fv=S.defineTokens.lineHeights(W.themeTokens.lineHeight),pv=S.defineTokens.radii(W.themeTokens.borderRadius),vv=S.defineTokens.spacing(W.themeTokens.spacing),bv=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"}}),hv=S.defineTokens.zIndex(W.themeTokens.zIndex),gv=S.defineTokens.cursor(W.themeTokens.cursor),mv={aspectRatios:ev,animations:tv,blurs:rv,borders:nv,colors:ov,durations:iv,easings:lv,fonts:av,fontSizes:sv,fontWeights:uv,letterSpacings:dv,lineHeights:fv,radii:pv,spacing:vv,sizes:bv,zIndex:hv,cursor:gv},yv=S.defineConfig({preflight:!0,cssVarsPrefix:"nimbus",cssVarsRoot:":where(:root, :host)",globalCss:Ip,theme:{breakpoints:Fp,keyframes:Bp,tokens:mv,semanticTokens:Up,recipes:Vp,slotRecipes:Jp,textStyles:Qp,layerStyles:Np,animationStyles:Mp}}),vs=S.createSystem(S.defaultBaseConfig,yv);function $v(){const[t,e]=s.useState(r());function r(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return s.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>{const i=r();e(i)});return o.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>o.disconnect()},[]),t}function xv({children:t,...e}){return x.jsx(S.ChakraProvider,{value:vs,children:x.jsx(Rp,{enableSystem:!1,...e,children:x.jsx(x.Fragment,{children:t})})})}function rr(t){const e={},r={...t};return Object.keys(t).forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&S.defaultSystem.isValidProperty(n)&&(e[n]=t[n],delete r[n])}),[e,r]}const{withProvider:Pv,withContext:bs}=S.createSlotRecipeContext({key:"checkbox"}),Sv=Pv("label","root"),Cv=bs("span","label"),wv=bs("span","indicator"),hs=s.forwardRef((t,e)=>{const r=s.useRef(null),n=oe(S.mergeRefs(r,e)),o=S.useSlotRecipe({key:"checkbox"}),[i]=o.splitVariantProps(t),[l,a]=rr(t),u=Ci(t),{inputProps:c}=Dc(a,u,n),{isFocused:d,focusProps:p}=De(),v=u.isSelected&&!t.isIndeterminate,f=t.isIndeterminate,h={"data-selected":v,"data-indeterminate":f,"data-invalid":t.isInvalid,"data-disabled":t.isDisabled,"data-focus":d||void 0};return x.jsxs(Sv,{"data-slot":"root",...i,...h,...l,children:[x.jsxs(wv,{"data-slot":"indicator",...h,children:[v&&x.jsx(te.Check,{}),f&&x.jsx(te.Remove,{}),x.jsx(wn,{as:"span",children:x.jsx("input",{...B(c,p),ref:n})})]}),t.children&&x.jsx(Cv,{"data-slot":"label",...h,children:t.children})]})});hs.displayName="Checkbox";const nr=s.forwardRef((t,e)=>x.jsx(S.Stack,{ref:e,...t}));nr.displayName="Stack";const wn=t=>{const{as:e="div",...r}=t;return x.jsx(Ei,{elementType:e,...r})};wn.displayName="VisuallyHidden";const{withContext:Ev}=S.createRecipeContext({recipe:Cn}),Tv=Ev("input"),gs=s.forwardRef((t,e)=>{const r=s.useRef(null),n=oe(S.mergeRefs(r,e)),o=S.useRecipe({recipe:Cn}),[i,l]=o.splitVariantProps(t),[a,u]=rr(l);return x.jsx(Vf,{...u,children:x.jsx(Tv,{ref:n,...i,...a,asChild:!0,children:x.jsx(Of,{})})})});gs.displayName="TextInput";const ms=s.forwardRef((t,e)=>x.jsx(S.Grid,{ref:e,...t}));ms.displayName="Grid";const Dv=Object.assign(ms,{Item:S.GridItem}),{withProvider:kv,withContext:yt}=S.createSlotRecipeContext({key:"select"}),Rv=kv("div","root"),Kv=yt("button","trigger"),Lv=yt("span","triggerLabel"),Mv=yt("div","options"),Av=yt("div","option"),Fv=yt("div","optionGroup"),ys=()=>{const t=s.useContext($n);if(!(t!=null&&t.selectedKey))return null;const e=()=>{t==null||t.setSelectedKey(null)};return x.jsx(gt,{pointerEvents:"all",size:"2xs",variant:"ghost",tone:"primary","aria-label":"Clear Selection",onPress:e,children:x.jsx(te.Close,{})})};ys.displayName="Select.ClearButton";const En=s.forwardRef(({children:t,isLoading:e,isDisabled:r,...n},o)=>{const i=S.useSlotRecipe({recipe:ps}),[l,a]=i.splitVariantProps(n),[u,c]=rr(a),d={...c,isDisabled:e||r};return x.jsx(Rv,{asChild:!0,ref:o,...l,...u,children:x.jsxs(sp,{...d,children:[x.jsxs(S.chakra.div,{position:"relative",children:[x.jsx(Kv,{zIndex:0,asChild:!0,children:x.jsx(Ef,{children:x.jsx(Lv,{asChild:!0,children:x.jsx(cp,{})})})}),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(ys,{})}),x.jsx(S.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:x.jsx(be,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:e?x.jsx(be,{asChild:!0,animation:"spin",animationDuration:"slowest",children:x.jsx(te.Loop,{})}):x.jsx(te.KeyboardArrowDown,{})})})]})]}),x.jsx(ns,{children:t})]})})});En.displayName="Select.Root";const Tn=t=>s.forwardRef(t),Dn=Tn((t,e)=>{const[r,n]=rr(t);return x.jsx(Mv,{asChild:!0,...r,children:x.jsx(Zf,{ref:e,...n})})});Dn.displayName="Select.Options";const kn=Tn((t,e)=>x.jsx(Av,{asChild:!0,ref:e,children:x.jsx(Qf,{...t})}));kn.displayName="Select.Option";const Rn=Tn(({label:t,items:e,children:r,...n},o)=>{if(e&&typeof r!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return x.jsxs(Jf,{ref:o,...n,children:[x.jsx(Fv,{asChild:!0,children:x.jsx(qf,{children:t})}),e?x.jsx(ca,{items:e,children:i=>typeof r=="function"?r(i):null}):r]})});Rn.displayName="Select.OptionGroup";const Iv={Root:En,Options:Dn,Option:kn,OptionGroup:Rn},{withProvider:Bv,withContext:$t}=S.createSlotRecipeContext({key:"accordion"}),Nv=Bv("div","root"),Ov=$t("div","disclosure"),zv=$t("button","trigger"),Hv=$t("div","panel"),Vv=$t("div","accordionTitle"),Gr=$t("div","headerContentRight"),Kn=s.createContext(null),$s=s.createContext(null),jv=s.forwardRef(({children:t,onExpandedChange:e,...r},n)=>{const o=Mf({...r,onExpandedChange:a=>{e==null||e(a.size>0)}}),i=S.useSlotRecipe({key:"accordion"}),[l]=i.splitVariantProps(r);return x.jsx($s.Provider,{value:o,children:x.jsx(Nv,{"data-slot":"root",ref:n,...l,children:t})})}),Wv=s.forwardRef(({children:t},e)=>{const r=s.useContext(Kn);if(!r)throw new Error("Accordion.Header must be used within Accordion.Item");const n=s.Children.toArray(t).reduce((o,i)=>(s.isValidElement(i)&&i.type===Gr?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(zv,{ref:S.mergeRefs(r.triggerRef,e),...r.buttonProps,"data-slot":"trigger",outline:r.isFocusVisible?void 0:"none",children:[x.jsx(te.KeyboardArrowRight,{}),x.jsx(Vv,{"data-slot":"accordionTitle",children:n.main})]}),n.rightContent.length>0&&x.jsx(Gr,{"data-slot":"headerContentRight",children:n.rightContent})]})}),_v=s.forwardRef((t,e)=>{const r=s.useContext(Kn),n=oe(S.mergeRefs(r==null?void 0:r.panelRef,e));return x.jsx(Hv,{ref:n,...S.mergeProps({...r==null?void 0:r.panelProps,...t}),"data-slot":"panel",children:t.children})}),Uv=s.forwardRef(({children:t,id:e,isDisabled:r,isExpanded:n,onExpandedChange:o,value:i},l)=>{const a=X(),c=i||(e||a),d=s.useContext($s),p=d?d.expandedKeys.has(c):n,v=Lf({isExpanded:p,onExpandedChange:w=>{d&&d.toggleKey(c),o==null||o(w)}}),f=s.useRef(null),h=s.useRef(null),m=r||(d==null?void 0:d.isDisabled)||!1,{buttonProps:$,panelProps:y}=Cd({isExpanded:v.isExpanded,isDisabled:m},v,f),{buttonProps:C}=Yt($,h),{focusProps:E,isFocusVisible:K}=De(),T={isExpanded:v.isExpanded,triggerRef:h,panelRef:f,buttonProps:B(C,E),panelProps:y,isFocusVisible:K};return x.jsx(Kn.Provider,{value:T,children:x.jsx(Ov,{"data-slot":"disclosure","data-value":c,"data-expanded":v.isExpanded,ref:l,children:t})})}),Gv={Root:jv,Item:Uv,Header:Wv,Content:_v,HeaderRightContent:Gr},qv=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:Yv}=S.createRecipeContext({recipe:qv}),Zv=Yv("div"),Xv="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",Jv="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",xs=s.forwardRef(({"aria-label":t="Loading data",...e},r)=>{const{progressBarProps:n}=wd({isIndeterminate:!0,"aria-label":t,...e});return x.jsx(Zv,{ref:r,...B(e,n),"aria-label":t,children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:[x.jsx("path",{d:Xv,"data-svg-path":"spinner-circle",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),x.jsx("path",{d:Jv,"data-svg-path":"spinner-pointer",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]})})});xs.displayName="LoadingSpinner";const Qv=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:eb,withContext:Ps}=S.createSlotRecipeContext({recipe:Qv}),tb=eb("div","root"),rb=Ps("div","header"),nb=Ps("div","content"),Ln=s.createContext(void 0),Mn=s.forwardRef(({children:t,...e},r)=>{const{isFocused:n,isFocusVisible:o,focusProps:i}=De(),[l,a]=s.useState(null),[u,c]=s.useState(null),d=s.useMemo(()=>({setHeader:a,setContent:c}),[a,c]);return x.jsx(Ln.Provider,{value:d,children:x.jsxs(tb,{ref:r,...B(e,i),"data-focus":n||void 0,"data-focus-visible":o||void 0,tabIndex:0,children:[x.jsxs(nr,{direction:"column",gap:"200",children:[l,u]}),t]})})});Mn.displayName="Card.Root";const An=({children:t,...e})=>{const r=s.useContext(Ln);return s.useEffect(()=>{if(r){const n=x.jsx(rb,{...e,children:t});return r.setHeader(n),()=>r.setHeader(null)}},[t,e]),null};An.displayName="Card.Header";const Fn=({children:t,...e})=>{const r=s.useContext(Ln);return s.useEffect(()=>{if(r){const n=x.jsx(nb,{...e,children:t});return r.setContent(n),()=>r.setContent(null)}},[t,e]),null};Fn.displayName="Card.Content";const ob={Root:Mn,Header:An,Content:Fn},ib=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:lb}=S.createRecipeContext({recipe:ib}),ab=lb("span"),sb=s.forwardRef((t,e)=>{const{as:r,asChild:n,children:o,...i}=t,l=s.useRef(null),a=oe(S.mergeRefs(l,e)),u=r||"span";return x.jsx(ab,{as:u,...B(i,{ref:a}),children:o})}),ub=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:cb,withContext:xt}=S.createSlotRecipeContext({recipe:ub}),db=cb("div","root"),fb=xt("div","title"),pb=xt("div","description"),vb=xt("div","icon"),bb=xt("div","actions"),hb=xt("div","dismissButton"),gb=t=>{switch(t){case"critical":return x.jsx(te.ErrorOutline,{});case"info":return x.jsx(te.Info,{});case"warning":return x.jsx(te.WarningAmber,{});case"positive":return x.jsx(te.CheckCircleOutline,{});default:return null}},Pt=s.createContext(void 0),Ss=s.forwardRef(({children:t,...e},r)=>{const[n,o]=s.useState(null),[i,l]=s.useState(null),[a,u]=s.useState(null),[c,d]=s.useState(null),p=s.useMemo(()=>({setTitle:o,setDescription:l,setActions:u,setDismiss:d}),[o,l,u,d]);return x.jsx(Pt.Provider,{value:p,children:x.jsxs(db,{ref:r,...e,role:"alert",children:[x.jsx(vb,{alignItems:"flex-start",children:gb(e.tone)}),x.jsxs(nr,{flex:"1",gap:"200",children:[x.jsxs(be,{children:[n,i]}),a]}),c,t]})})});Ss.displayName="Alert.Root";const Cs=({children:t,...e})=>{const r=s.useContext(Pt);return s.useEffect(()=>{if(r){const n=x.jsx(fb,{...e,fontWeight:"600",children:t});return r.setTitle(n),()=>r.setTitle(null)}},[t,e]),null};Cs.displayName="Alert.Title";const ws=({children:t,...e})=>{const r=s.useContext(Pt);return s.useEffect(()=>{if(r){const n=x.jsx(pb,{...e,children:t});return r.setDescription(n),()=>r.setDescription(null)}},[t,e]),null};ws.displayName="Alert.Description";const Es=({children:t,...e})=>{const r=s.useContext(Pt);return s.useEffect(()=>{if(r){const n=x.jsx(bb,{...e,children:t});return r.setActions(n),()=>r.setActions(null)}},[t,e]),null};Es.displayName="Alert.Actions";const Ts=({children:t,...e})=>{const r=s.useContext(Pt);return s.useEffect(()=>{if(r){const n=x.jsx(hb,{children:x.jsx(gt,{"aria-label":"Dismiss",...e,variant:"ghost",size:"2xs",children:x.jsx(te.Clear,{role:"img"})})});return r.setDismiss(n),()=>r.setDismiss(null)}},[t,e]),null};Ts.displayName="Alert.DismissButton";const mb={Root:Ss,Title:Cs,Description:ws,Actions:Es,DismissButton:Ts};var Fo,Io,Bo,No;const yb=S.defineSlotRecipe({slots:["root","button"],className:"nimbus-toggle-button-group",base:{root:{display:"inline-flex"},button:{...Me.base,...(Fo=Me.variants)==null?void 0:Fo.variant.outline,borderRadius:"0",borderRightWidth:"0","&:first-of-type":{borderLeftRadius:"200"},"&:last-of-type":{borderRightWidth:"1px",borderRightRadius:"200"},"&[data-selected=true]":(Io=Me.variants)==null?void 0:Io.variant.solid}},variants:{size:{xs:{button:(Bo=Me.variants)==null?void 0:Bo.size.xs},md:{button:(No=Me.variants)==null?void 0:No.size.md}},tone:{primary:{button:{colorPalette:"primary"}},critical:{button:{colorPalette:"critical"}},neutral:{button:{colorPalette:"neutral"}}}},defaultVariants:{size:"md"}}),{withContext:$b,withProvider:xb}=S.createSlotRecipeContext({recipe:yb}),Pb=xb(fp,"root"),Sb=$b(vp,"button"),In=s.forwardRef(({children:t,...e},r)=>x.jsx(Pb,{ref:r,...e,children:t}));In.displayName="ToggleButtonGroup.Root";const Bn=s.forwardRef(({children:t,...e},r)=>x.jsx(Sb,{...e,ref:r,children:t}));Bn.displayName="ToggleButtonGroup.Button";const Cb={Root:In,Button:Bn},wb=`
18
18
  "label"
19
19
  "input"
20
20
  "description"
21
21
  "error"
22
- `,qv=`
22
+ `,Eb=`
23
23
  "label input"
24
24
  "label description"
25
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;
26
+ `,Tb=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:wb},input:{mt:"var(--grid-gap)"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}},row:{root:{gridTemplateAreas:Eb,gridTemplateColumns:"auto 1fr",gridColumnGap:"200"},description:{mt:"var(--grid-gap)"},error:{mt:"var(--grid-gap)"}}}},defaultVariants:{direction:"column",size:"md"}}),{withProvider:Db,withContext:St}=S.createSlotRecipeContext({recipe:Tb}),kb=Db("div","root"),Rb=St("div","label"),Kb=St("div","input"),Lb=St("div","description"),Mb=St("div","error"),Ab=St("div","popover"),Fb=s.forwardRef(({isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n,children:o,...i},l)=>{const[a,u]=s.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n}),{labelProps:c,fieldProps:d,descriptionProps:p,errorMessageProps:v}=un({label:a.label,description:a.description,errorMessage:a.error});s.useEffect(()=>{u(h=>({...h,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n}))},[t,e,r,n]);const f={...d,isInvalid:t,isRequired:e,isDisabled:r,isReadOnly:n};return x.jsx(We.Provider,{value:{context:a,setContext:u},children:x.jsxs(kb,{ref:l,...i,children:[a.label&&x.jsxs(Rb,{...a.labelSlotProps,children:[x.jsxs("label",{...c,children:[a.label,e&&x.jsx("sup",{"aria-hidden":"true",children:"*"})]}),a.info&&x.jsxs(ip,{children:[x.jsx(be,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:x.jsx(be,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:x.jsx(gt,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:x.jsx(te.HelpOutline,{})})})}),x.jsx(ns,{children:x.jsx(Ab,{asChild:!0,children:x.jsx(lp,{children:x.jsx(be,{p:"300",children:a.info})})})})]})]}),a.input&&x.jsx(Kb,{...a.inputSlotProps,children:s.Children.map(a.input,h=>s.isValidElement(h)?s.cloneElement(h,f):h)}),a.description&&x.jsx(Lb,{...p,...a.descriptionSlotProps,children:a.description}),t&&a.error&&x.jsxs(Mb,{...v,...a.errorSlotProps,children:[x.jsx(be,{as:te.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),a.error]}),o]})})}),Ib=({children:t,...e})=>{const{setContext:r}=s.useContext(We);return s.useEffect(()=>{r(n=>({...n,label:t,labelSlotProps:e}))},[t,r]),null},Bb=({children:t,...e})=>{const{setContext:r}=s.useContext(We);return s.useEffect(()=>{r(n=>({...n,input:t,inputSlotProps:e}))},[t,r]),null},Nb=({children:t,...e})=>{const{setContext:r}=s.useContext(We);return s.useEffect(()=>{r(n=>({...n,description:t,descriptionSlotProps:e}))},[t,r]),null},Ob=({children:t,...e})=>{const{setContext:r}=s.useContext(We);return s.useEffect(()=>{r(n=>({...n,error:t,errorSlotProps:e}))},[t,r]),null},zb=({children:t})=>{const{setContext:e}=s.useContext(We);return s.useEffect(()=>{e(r=>({...r,info:t}))},[t,e]),null},We=s.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),Hb={Root:Fb,Label:Ib,Input:Bb,Description:Nb,Error:Ob,InfoBox:zb};function qr(){return qr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qr.apply(null,arguments)}var Ds=["shift","alt","meta","mod","ctrl"],Vb={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function Pe(t){return(t&&Vb[t]||t||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function jb(t){return Ds.includes(t)}function Sr(t,e){return e===void 0&&(e=","),t.split(e)}function Cr(t,e,r){e===void 0&&(e="+");var n=t.toLocaleLowerCase().split(e).map(function(l){return Pe(l)}),o={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(function(l){return!Ds.includes(l)});return qr({},o,{keys:i,description:r,hotkey:t})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(t){t.key!==void 0&&ks([Pe(t.key),Pe(t.code)])}),document.addEventListener("keyup",function(t){t.key!==void 0&&Rs([Pe(t.key),Pe(t.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){Se.clear()})})();var Se=new Set;function Nn(t){return Array.isArray(t)}function Wb(t,e){e===void 0&&(e=",");var r=Nn(t)?t:t.split(e);return r.every(function(n){return Se.has(n.trim().toLowerCase())})}function ks(t){var e=Array.isArray(t)?t:[t];Se.has("meta")&&Se.forEach(function(r){return!jb(r)&&Se.delete(r.toLowerCase())}),e.forEach(function(r){return Se.add(r.toLowerCase())})}function Rs(t){var e=Array.isArray(t)?t:[t];t==="meta"?Se.clear():e.forEach(function(r){return Se.delete(r.toLowerCase())})}function _b(t,e,r){(typeof r=="function"&&r(t,e)||r===!0)&&t.preventDefault()}function Ub(t,e,r){return typeof r=="function"?r(t,e):r===!0||r===void 0}function Gb(t){return Ks(t,["input","textarea","select"])}function Ks(t,e){e===void 0&&(e=!1);var r=t.target,n=t.composed,o=null;return qb(r)&&n?o=t.composedPath()[0]&&t.composedPath()[0].tagName:o=r&&r.tagName,Nn(e)?!!(o&&e&&e.some(function(i){var l;return i.toLowerCase()===((l=o)==null?void 0:l.toLowerCase())})):!!(o&&e&&e)}function qb(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function Yb(t,e){return t.length===0&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):e?t.some(function(r){return e.includes(r)})||t.includes("*"):!0}var Zb=function(e,r,n){n===void 0&&(n=!1);var o=r.alt,i=r.meta,l=r.mod,a=r.shift,u=r.ctrl,c=r.keys,d=e.key,p=e.code,v=e.ctrlKey,f=e.metaKey,h=e.shiftKey,m=e.altKey,$=Pe(p),y=d.toLowerCase();if(!(c!=null&&c.includes($))&&!(c!=null&&c.includes(y))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes($))return!1;if(!n){if(o===!m&&y!=="alt"||a===!h&&y!=="shift")return!1;if(l){if(!f&&!v)return!1}else if(i===!f&&y!=="meta"&&y!=="os"||u===!v&&y!=="ctrl"&&y!=="control")return!1}return c&&c.length===1&&(c.includes(y)||c.includes($))?!0:c?Wb(c):!c},Xb=s.createContext(void 0),Jb=function(){return s.useContext(Xb)};function Ls(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce(function(r,n){return r&&Ls(t[n],e[n])},!0):t===e}var Qb=s.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),eh=function(){return s.useContext(Qb)};function th(t){var e=s.useRef(void 0);return Ls(e.current,t)||(e.current=t),e.current}var Lo=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},rh=typeof window<"u"?s.useLayoutEffect:s.useEffect;function nh(t,e,r,n){var o=s.useState(null),i=o[0],l=o[1],a=s.useRef(!1),u=r instanceof Array?n instanceof Array?void 0:n:r,c=Nn(t)?t.join(u==null?void 0:u.splitKey):t,d=r instanceof Array?r:n instanceof Array?n:void 0,p=s.useCallback(e,d??[]),v=s.useRef(p);d?v.current=p:v.current=e;var f=th(u),h=eh(),m=h.enabledScopes,$=Jb();return rh(function(){if(!((f==null?void 0:f.enabled)===!1||!Yb(m,f==null?void 0:f.scopes))){var y=function(w,F){var b;if(F===void 0&&(F=!1),!(Gb(w)&&!Ks(w,f==null?void 0:f.enableOnFormTags))){if(i!==null){var R=i.getRootNode();if((R instanceof Document||R instanceof ShadowRoot)&&R.activeElement!==i&&!i.contains(R.activeElement)){Lo(w);return}}(b=w.target)!=null&&b.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||Sr(c,f==null?void 0:f.splitKey).forEach(function(L){var D,A=Cr(L,f==null?void 0:f.combinationKey);if(Zb(w,A,f==null?void 0:f.ignoreModifiers)||(D=A.keys)!=null&&D.includes("*")){if(f!=null&&f.ignoreEventWhen!=null&&f.ignoreEventWhen(w)||F&&a.current)return;if(_b(w,A,f==null?void 0:f.preventDefault),!Ub(w,A,f==null?void 0:f.enabled)){Lo(w);return}v.current(w,A),F||(a.current=!0)}})}},C=function(w){w.key!==void 0&&(ks(Pe(w.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&y(w))},E=function(w){w.key!==void 0&&(Rs(Pe(w.code)),a.current=!1,f!=null&&f.keyup&&y(w,!0))},K=i||(u==null?void 0:u.document)||document;return K.addEventListener("keyup",E),K.addEventListener("keydown",C),$&&Sr(c,f==null?void 0:f.splitKey).forEach(function(T){return $.addHotkey(Cr(T,f==null?void 0:f.combinationKey,f==null?void 0:f.description))}),function(){K.removeEventListener("keyup",E),K.removeEventListener("keydown",C),$&&Sr(c,f==null?void 0:f.splitKey).forEach(function(T){return $.removeHotkey(Cr(T,f==null?void 0:f.combinationKey,f==null?void 0:f.description))})}}},[i,c,f,m]),l}function oh(){var t=s.useRef(!1),e=s.useCallback(function(){return t.current},[]);return s.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var ih=function(t){t===void 0&&(t={});var e=s.useState(t),r=e[0],n=e[1],o=s.useCallback(function(i){n(function(l){return Object.assign({},l,i instanceof Function?i(l):i)})},[]);return[r,o]},wr,Mo;function lh(){return Mo||(Mo=1,wr=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(o){t.addRange(o)}),e&&e.focus()}}),wr}var Er,Ao;function ah(){if(Ao)return Er;Ao=1;var t=lh(),e={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(i){var l=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return i.replace(/#{\s*key\s*}/g,l)}function o(i,l){var a,u,c,d,p,v,f=!1;l||(l={}),a=l.debug||!1;try{c=t(),d=document.createRange(),p=document.getSelection(),v=document.createElement("span"),v.textContent=i,v.ariaHidden="true",v.style.all="unset",v.style.position="fixed",v.style.top=0,v.style.clip="rect(0, 0, 0, 0)",v.style.whiteSpace="pre",v.style.webkitUserSelect="text",v.style.MozUserSelect="text",v.style.msUserSelect="text",v.style.userSelect="text",v.addEventListener("copy",function(m){if(m.stopPropagation(),l.format)if(m.preventDefault(),typeof m.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var $=e[l.format]||e.default;window.clipboardData.setData($,i)}else m.clipboardData.clearData(),m.clipboardData.setData(l.format,i);l.onCopy&&(m.preventDefault(),l.onCopy(m.clipboardData))}),document.body.appendChild(v),d.selectNodeContents(v),p.addRange(d);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");f=!0}catch(m){a&&console.error("unable to copy using execCommand: ",m),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(l.format||"text",i),l.onCopy&&l.onCopy(window.clipboardData),f=!0}catch($){a&&console.error("unable to copy using clipboardData: ",$),a&&console.error("falling back to prompt"),u=n("message"in l?l.message:r),window.prompt(u,i)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(d):p.removeAllRanges()),v&&document.body.removeChild(v),c()}return f}return Er=o,Er}var sh=ah();const uh=pf(sh);var ch=function(){var t=oh(),e=ih({value:void 0,error:void 0,noUserInteraction:!0}),r=e[0],n=e[1],o=s.useCallback(function(i){if(t()){var l,a;try{if(typeof i!="string"&&typeof i!="number"){var u=new Error("Cannot copy typeof "+typeof i+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(u),n({value:i,error:u,noUserInteraction:!0});return}else if(i===""){var u=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(u),n({value:i,error:u,noUserInteraction:!0});return}a=i.toString(),l=uh(a),n({value:a,error:void 0,noUserInteraction:l})}catch(c){n({value:a,error:c,noUserInteraction:l})}}},[]);return[r,o]};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});exports.Accordion=Gv;exports.Alert=mb;exports.Avatar=zo;exports.Badge=sb;exports.Box=be;exports.Button=Zt;exports.Card=ob;exports.CardContent=Fn;exports.CardHeader=An;exports.CardRoot=Mn;exports.Checkbox=hs;exports.ColorModeLabel=Lp;exports.DialogActionTrigger=Ud;exports.DialogBackdrop=Vd;exports.DialogBody=Hd;exports.DialogCloseTrigger=Bd;exports.DialogContent=Id;exports.DialogDescription=Wd;exports.DialogFooter=Od;exports.DialogHeader=zd;exports.DialogRoot=Nd;exports.DialogTitle=jd;exports.DialogTrigger=_d;exports.FormField=Hb;exports.FormFieldContext=We;exports.Grid=Dv;exports.IconButton=gt;exports.Link=Jl;exports.ListItem=Zd;exports.ListRoot=Yd;exports.LoadingSpinner=xs;exports.MakeElementFocusable=ds;exports.NimbusProvider=xv;exports.Select=Iv;exports.SimpleGrid=Xd;exports.Stack=nr;exports.TableBody=lf;exports.TableCell=of;exports.TableColumn=ef;exports.TableColumnGroup=Qd;exports.TableColumnHeader=af;exports.TableFooter=rf;exports.TableHeader=tf;exports.TableRoot=Jd;exports.TableRow=nf;exports.Text=ea;exports.TextInput=gs;exports.ToggleButtonGroup=Cb;exports.ToggleButtonGroupButton=Bn;exports.ToggleButtonGroupRoot=In;exports.Tooltip=us;exports.TooltipTrigger=cs;exports.VisuallyHidden=wn;exports._SelectOption=kn;exports._SelectOptionGroup=Rn;exports._SelectOptions=Dn;exports._SelectRoot=En;exports.system=vs;exports.useColorMode=Sn;exports.useColorModeValue=Kp;exports.useColorScheme=$v;exports.useCopyToClipboard=ch;exports.useHotkeys=nh;
27
27
  //# sourceMappingURL=index.cjs.map