@necto-react/hooks 2.14.11 → 2.14.12

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,2 +1,2 @@
1
- "use strict";var Kt=Object.create;var ye=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Ct=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var Dt=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},We=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ct(e))!At.call(n,o)&&o!==t&&ye(n,o,{get:()=>e[o],enumerable:!(r=Vt(e,o))||r.enumerable});return n};var je=(n,e,t)=>(t=n!=null?Kt(kt(n)):{},We(e||!n||!n.__esModule?ye(t,"default",{value:n,enumerable:!0}):t,n)),It=n=>We(ye({},"__esModule",{value:!0}),n);var Yt={};Dt(Yt,{DEFAULT_VALIDATION_RESULT:()=>J,FormValidationContext:()=>Be,VALID_VALIDITY_STATE:()=>de,getInteractionModality:()=>ne,mergeValidation:()=>Mt,privateValidationStateProp:()=>we,useAnimation:()=>ht,useAriaProps:()=>vt,useCollectionNavigation:()=>Ut,useContextProps:()=>Ge,useEffectEvent:()=>N,useElementVisibility:()=>_e,useFocus:()=>ee,useFocusRing:()=>qe,useFocusVisible:()=>Qe,useFocusVisibleListener:()=>re,useFocusWithin:()=>Fe,useFocusable:()=>ze,useFormState:()=>wt,useGlobalListeners:()=>ie,useHover:()=>it,useId:()=>lt,useIsomorphicInsertionEffect:()=>De,useKeyboard:()=>Te,useLatestRef:()=>Gt,useLongPress:()=>Tt,useMounted:()=>Le,usePress:()=>at,useRenderer:()=>ft,useScrollLock:()=>mt,useSlottedContext:()=>Ee,useStyleInjection:()=>gt,useSupported:()=>Nt,useSyntheticBlurEvent:()=>te});module.exports=It(Yt);var ve=require("react"),Ne=require("@necto/mergers");function Ge({props:n,ref:e,context:t}){let r=Ee({context:t,slot:n.slot})||{},{ref:o=null,...s}=r,a=(0,ve.useRef)(null),i=(0,ve.useCallback)(l=>{a.current=l,typeof e=="function"?e(l):e&&(e.current=l),typeof o=="function"?o(l):o&&typeof o=="object"&&(o.current=l)},[e,o]),u=(0,Ne.mergeProps)(s,n);return"style"in s&&s.style&&"style"in n&&n.style&&(typeof s.style=="function"||typeof n.style=="function"?u.style=l=>{let y=typeof s.style=="function"?s.style(l):s.style,d={...l.defaultStyle,...y},E=typeof n.style=="function"?n.style({...l,defaultStyle:d}):n.style;return{...d,...E}}:u.style={...s.style,...n.style}),[u,i]}var B=require("react");function _e(n={}){let{partialVisibility:e=!1,threshold:t=0,rootMargin:r="0px",root:o=null,active:s=!0,once:a=!1,onChange:i}=n,[u,l]=(0,B.useState)(null),[y,d]=(0,B.useState)(!1),[E,b]=(0,B.useState)(null),g=(0,B.useRef)(!1),m=(0,B.useRef)(null),p=N(T=>{let F=T[0],U=F.isIntersecting,x={isIntersecting:F.isIntersecting,intersectionRatio:F.intersectionRatio,intersectionRect:F.intersectionRect,boundingClientRect:F.boundingClientRect,rootBounds:F.rootBounds,time:F.time};b(x),d(K=>a&&g.current?!0:U&&a?(g.current=!0,K!==!0&&i&&i(!0),!0):K!==U?(i&&i(U),U):K)}),h=(0,B.useCallback)(T=>{l(T)},[]);return(0,B.useEffect)(()=>{if(!s||!u)return;let T;return e===!0?T=[0,.1,.25,.5,.75,1]:typeof e=="string"?T=.01:T=t,m.current=new IntersectionObserver(p,{root:o,rootMargin:r,threshold:T}),m.current.observe(u),()=>{m.current&&m.current.disconnect()}},[s,u,o,r,t,e]),[h,y,E]}var ge=require("react");var Y=require("@necto/dom");function ee(n={}){let{isDisabled:e,onFocus:t,onBlur:r,onFocusChange:o}=n,s=(0,ge.useCallback)((l,y)=>{l?(t?.(y),o?.(!0)):(r?.(y),o?.(!1))},[t,r,o]),a=(0,ge.useCallback)(l=>{l.target===l.currentTarget&&s(!1,l)},[s]),i=te({onBlur:a}),u=(0,ge.useCallback)(l=>{let y=(0,Y.getOwnerDocument)(l.target),d=y?(0,Y.getActiveElement)(y):(0,Y.getActiveElement)();l.target===l.currentTarget&&d===(0,Y.getEventTarget)(l.nativeEvent)&&(s(!0,l),i(l))},[s,i]);return{focusProps:{...e?{}:{onFocus:u,onBlur:a}}}}var W=require("@necto/dom"),$e=require("@necto/mergers"),be=require("react");function ze(n,e){let{autoFocus:t,isDisabled:r,excludeFromTabOrder:o}=n,{focusProps:s}=ee(n),{keyboardProps:a}=Te(n),i=(0,be.useRef)(t),u=(0,W.getOwnerDocument)(e.current),l=(0,W.getActiveElement)(u);(0,be.useEffect)(()=>{if(i.current&&e.current)if(ne()==="virtual"){let d=l;(0,W.runAfterTransition)(()=>{(0,W.getActiveElement)(u)===d&&e.current?.isConnected&&(0,W.focusWithoutScrolling)(e.current)})}else(0,W.focusWithoutScrolling)(e.current);i.current=!1},[e]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:(0,$e.mergeProps)(s??{},a,{tabIndex:y})}}var G=require("react");var Ht=null;function qe(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=(0,G.useRef)({isFocused:r,isFocusVisible:r||Ht!=="pointer"}),[s,a]=(0,G.useState)(r),[i,u]=(0,G.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),l=(0,G.useCallback)(()=>{u(o.current.isFocused&&o.current.isFocusVisible)},[]),y=(0,G.useCallback)(b=>{o.current.isFocused=b,a(b),l()},[l]);re({fn:b=>{o.current.isFocusVisible=b,l()},deps:[],opts:{isTextInput:t}});let{focusProps:d={}}=ee({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:E={}}=Fe({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:i,focusProps:e?E:d}}var Ye=require("react");function Qe(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=(0,Ye.useState)(t||ne()!=="pointer");return re({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var oe=new Map,Re=new Set,Je=!1,Ke=null,Xe=!1,V={get hasEventBeforeFocus(){return Je},set hasEventBeforeFocus(n){Je=n},get hasBlurredWindowRecently(){return Xe},set hasBlurredWindowRecently(n){Xe=n},get currentModality(){return Ke},set currentModality(n){Ke=n}};function ne(){return Ke}var Ze=require("std-env"),et=require("react"),tt=require("@necto-react/helpers"),se=require("@necto/dom");function Ce(n,e){Re.forEach(t=>t(n,e))}function Bt(n){return!(n.metaKey||Ze.isMacOS&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function nt(n){Bt(n)&&(V.hasEventBeforeFocus=!0,V.currentModality="keyboard",Ce("keyboard",n))}function Ve(n){["mousedown","pointerdown"].includes(n.type)&&(V.hasEventBeforeFocus=!0,V.currentModality="pointer",Ce("pointer",n))}function rt(n){[window,document].includes(n.target)||!n.isTrusted||!V.hasEventBeforeFocus&&!V.hasBlurredWindowRecently||(!V.hasEventBeforeFocus&&!V.hasBlurredWindowRecently&&(V.currentModality="virtual",Ce("virtual",n)),V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!1)}function ot(){V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!0}function Wt(n){let e=(0,se.getOwnerWindow)(n),t=(0,se.getOwnerDocument)(n);if(typeof window>"u"||typeof document>"u"||oe.has(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(...o){V.hasEventBeforeFocus=!0,r.apply(this,o)},t.addEventListener("keydown",nt,!0),t.addEventListener("click",Ve,!0),e.addEventListener("focus",rt,!0),e.addEventListener("blur",ot,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",Ve,!0),oe.set(e,{focus:r})}function jt(n){let e=(0,se.getOwnerWindow)(n),t=(0,se.getOwnerDocument)(n);if(!oe.has(e))return;let{focus:r}=oe.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",nt,!0),t.removeEventListener("click",Ve,!0),e.removeEventListener("focus",rt,!0),e.removeEventListener("blur",ot,!1),oe.delete(e)}function re(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(Wt(),(0,et.useEffect)(()=>{let o=(s,a)=>{(0,tt.isKeyboardFocusEvent)(!!r?.isTextInput,s,a)&&e(V.currentModality!=="pointer")};return Re.add(o),()=>{Re.delete(o),jt()}},t))}var ae=require("react"),st=require("@necto-react/helpers");var _=require("@necto/dom");function Fe(n){let{isDisabled:e,onFocusWithin:t,onBlurWithin:r,onFocusWithinChange:o}=n,s=(0,ae.useRef)({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=ie(),u=(0,ae.useCallback)(d=>{d.currentTarget.contains(d.target)&&s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,i(),r&&r(d),o&&o(!1))},[r,o,i]),l=te({onBlur:u}),y=(0,ae.useCallback)(d=>{if(!d.currentTarget.contains(d.target))return;let E=(0,_.getOwnerDocument)(d.target),b=(0,_.getActiveElement)(E);if(!s.current.isFocusWithin&&b===(0,_.getEventTarget)(d.nativeEvent)){t&&t(d),o&&o(!0),s.current.isFocusWithin=!0,l(d);let g=d.currentTarget;a(E,"focus",m=>{if(s.current.isFocusWithin&&!(0,_.nodeContains)(g,m.target)&&E.defaultView&&typeof E.defaultView.FocusEvent=="function"){let p=new E.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(p,"target",{value:g}),Object.defineProperty(p,"currentTarget",{value:g});let h=(0,st.createSyntheticEvent)(p);u(h)}},{capture:!0})}},[t,o,l,a,u]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:u}}}var $=require("react");function ie(){let n=(0,$.useRef)(new Map),e=(0,$.useCallback)((o,s,a,i)=>{let u=typeof i=="object"&&i?.once?(...l)=>{n.current.delete(a),a(...l)}:a;n.current.set(a,{type:s,eventTarget:o,options:i}),o.addEventListener(s,u,i)},[]),t=(0,$.useCallback)((o,s,a,i)=>{let u=n.current.get(a),l=u?.options?.once?u.fn:a;o.removeEventListener(s,l,i),n.current.delete(a)},[]),r=(0,$.useCallback)(()=>{n.current.forEach((o,s)=>{o.eventTarget.removeEventListener(o.type,s,o.options)}),n.current.clear()},[]);return(0,$.useEffect)(()=>()=>r(),[r]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:r}}var he=require("std-env");var xe=require("@necto/dom"),D=require("react");function it(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,a]=(0,D.useState)(!1),i=(0,D.useRef)({hoverCount:0,ignoreEmulated:!1}),u=(0,D.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=ie(),d=(0,D.useCallback)(()=>{i.current.ignoreEmulated=!0,setTimeout(()=>{i.current.ignoreEmulated=!1},50)},[]);(0,D.useEffect)(()=>{let m=h=>{h.pointerType==="touch"&&d()};if(typeof document>"u")return;let p=i.current;return p.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):he.isTest&&document.addEventListener("touchend",d),()=>{p.hoverCount--,p.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):he.isTest&&document.removeEventListener("touchend",d))}},[d]);let E=(0,D.useCallback)((m,p)=>{o||p==="touch"||u.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target))||(u.isHovered=!0,u.pointerType=p,u.target=m.currentTarget,l((0,xe.getOwnerDocument)(m.target instanceof Element?m.target:null),"pointerover",h=>{u.isHovered&&u.target&&!(0,xe.nodeContains)(u.target,h.target)&&b(h,h.pointerType)},{capture:!0}),e?.({type:"hoverstart",target:m.currentTarget,pointerType:p}),t?.(!0),a(!0))},[o,e,t,l,u]),b=(0,D.useCallback)((m,p)=>{p==="touch"||!u.isHovered||!u.target||(u.isHovered=!1,u.pointerType="",u.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:p}),t?.(!1),a(!1))},[r,t,y,u.target,u]),g=(0,D.useMemo)(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=p=>{i.current.ignoreEmulated&&p.pointerType==="mouse"||E(p,p.pointerType)},m.onPointerLeave=p=>{!o&&p.currentTarget instanceof Element&&p.currentTarget.contains(p.target)&&b(p,p.pointerType)}):he.isTest&&(m.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=p=>{!u.ignoreEmulatedMouseEvents&&!i.current.ignoreEmulated&&E(p.nativeEvent,"mouse"),u.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&b(p.nativeEvent,"mouse")}),m},[o,E,b,u]);return(0,D.useEffect)(()=>{o&&u.isHovered&&b({currentTarget:u.target},u.pointerType)},[o,b,u.isHovered,u.pointerType,u.target]),{hoverProps:g,isHovered:s}}var ut=require("std-env");var ke={prefix:String(Math.round(Math.random()*1e10)),current:0},ce=new Map,fe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{ce.delete(n)}):null;var H=je(require("react"),1);function lt(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=(0,H.useState)(()=>t),s=(0,H.useRef)(null),a=(0,H.useRef)({}),i=(()=>{if(t)return t;let u=typeof H.default.useId=="function"?(0,H.useId)():String(++ke.current);return`${ut.isTest?e:`${e}${ke.prefix}`}-${u}`})();return(0,H.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let u=ce.get(i)||[],l={current:s.current};u.some(y=>y===l)||ce.set(i,[...u,l])}return fe&&fe.register(a.current,i),()=>{fe&&fe.unregister(a.current),ce.delete(i)}},[i]),(0,H.useEffect)(()=>{let u=s.current;u&&(o(u),s.current=null)},[]),i}var Ae=require("@necto-react/helpers");function Te(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?(0,Ae.createEventHandler)(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?(0,Ae.createEventHandler)(e=>n.onKeyUp?.(e.nativeEvent)):void 0}}}var z=require("react");function Le(n={}){let{type:e="function"}=n,t=(0,z.useRef)(!1),[r,o]=(0,z.useState)(!1),s=(0,z.useCallback)(()=>t.current,[]);return(0,z.useEffect)(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}var k=require("@necto/dom"),L=require("react");function C(n,e,t){return{type:n,pointerType:e,target:t.currentTarget??t.target,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function at(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:a,onPressEnd:i,onPressChange:u,onPressUp:l,onClick:y}=n,[d,E]=(0,L.useState)(!1),b=(0,L.useRef)(!1),g=(0,L.useRef)(null),m=(0,L.useRef)(!1),p=(0,L.useCallback)(f=>{d!==f&&(E(f),u?.(f))},[d,u]),h=(0,L.useCallback)(f=>{if(!m.current)return;let c=g.current&&g.current instanceof Node&&f.target instanceof Node&&g.current.contains(f.target);if(m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&(0,k.restoreTextSelection)(g.current),f.target){let R={...C("pressend","mouse",f),target:f.target};i?.(R),l?.(R),c&&s?.(R)}},[i,l,s,p,r]),T=(0,L.useCallback)(f=>{if(e||f.button!==0||b.current)return;t&&f.preventDefault(),r||(0,k.disableTextSelection)(f.currentTarget),m.current=!0,g.current=f.currentTarget,p(!0);let c=C("pressstart","mouse",f);a?.(c),window.addEventListener("mouseup",h,{once:!0})},[e,t,r,a,p,h]),F=(0,L.useCallback)(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&(0,k.restoreTextSelection)(f.currentTarget);let c=C("pressend","mouse",f);i?.(c),l?.(c),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(C("press","mouse",f))},[e,s,i,l,p,r]),U=(0,L.useCallback)(f=>{d&&(p(!1),i?.(C("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&(0,k.restoreTextSelection)(f.currentTarget))},[d,p,i,r]),x=(0,L.useCallback)(f=>{m.current&&!d&&(p(!0),a?.(C("pressstart","mouse",f)))},[d,a,p]),K=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&(0,k.restoreTextSelection)(g.current);let c={...C("pressend","touch",f),target:f.target};i?.(c),l?.(c)},[i,l,p,r]),M=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&(0,k.restoreTextSelection)(g.current);let c={...C("pressend","touch",f),target:f.target};i?.(c)},[i,p,r]),A=(0,L.useCallback)(f=>{e||(r||(0,k.disableTextSelection)(f.currentTarget),b.current=!0,setTimeout(()=>{b.current=!1},100),m.current=!0,g.current=f.currentTarget,p(!0),a?.(C("pressstart","touch",f)),window.addEventListener("touchend",K,{once:!0}),window.addEventListener("touchcancel",M,{once:!0}))},[e,a,p,r,K,M]),X=(0,L.useCallback)(f=>{if(e||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&(0,k.restoreTextSelection)(f.currentTarget);let c=C("pressend","touch",f);i?.(c),l?.(c),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(C("press","touch",f))},[e,s,i,l,p,r]),P=(0,L.useCallback)(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!d&&(f.key===" "&&f.preventDefault(),r||(0,k.disableTextSelection)(),p(!0),m.current=!0,a?.(C("pressstart","keyboard",f)))},[e,d,a,p,r]),pe=(0,L.useCallback)(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&d){p(!1),m.current=!1,r||(0,k.restoreTextSelection)();let R=C("pressend","keyboard",f);i?.(R),l?.(C("pressup","keyboard",f)),s?.(C("press","keyboard",f))}},[e,d,s,i,l,p,r]),me=(0,L.useCallback)(f=>{if(e){f.preventDefault();return}b.current||y?.(f)},[e,y]);(0,L.useEffect)(()=>()=>{window.removeEventListener("mouseup",h),window.removeEventListener("touchend",K),window.removeEventListener("touchcancel",M)},[h,K,M]);let Me=(0,L.useMemo)(()=>({onMouseDown:T,onMouseUp:F,onMouseLeave:U,onMouseEnter:x,onTouchStart:A,onTouchEnd:X,onKeyDown:P,onKeyUp:pe,onClick:me}),[T,F,U,x,A,X,P,pe,me]);return(0,L.useEffect)(()=>{let f=o?.current;f&&f instanceof(0,k.getOwnerWindow)(f).Element&&(0,k.getOwnerWindow)(f).getComputedStyle(f).touchAction==="auto"&&(f.style.touchAction="pan-x pan-y pinch-zoom")},[o]),{pressProps:Me,isPressed:d}}var ct=require("react");function ft(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:a,defaultClassName:i="necto"}=n;return(0,ct.useMemo)(()=>{let u=typeof o=="function"?o({...t,defaultClassName:i}):o?`${i} ${o}`:i,l=typeof e=="function"?e({...t,defaultStyle:s||{}}):{...s,...e},y=typeof r=="function"?r({...t,defaultChildren:a}):r??a;return{className:u,style:l,children:y}},[o,e,r,i,a,s,t])}var dt=require("react");function Ee(n){let{context:e,slot:t}=n,r=(0,dt.useContext)(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let o=t||Symbol("default");if(!r.slots[o]){let s=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`)),a=t?`Invalid slot name: "${t}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${a} Valid slot names are ${s}.`)}return r.slots[o]}return r}var pt=require("@necto-react/helpers"),ue=require("react");function te(n){let{onBlur:e}=n,t=(0,ue.useRef)({isFocused:!1,observer:null});(0,ue.useLayoutEffect)(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=N(o=>{e?.(o)});return(0,ue.useCallback)(o=>{if(o.target instanceof HTMLButtonElement||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=o.target,a=i=>{if(t.current.isFocused=!1,s.disabled){let u=(0,pt.createSyntheticEvent)(i);r(u)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){t.current.observer?.disconnect();let i=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[r])}var q=require("react");function N(n){let e=(0,q.useRef)(n);return(typeof window<"u"?q.useLayoutEffect:q.useEffect)(()=>{e.current=n},[n]),(0,q.useCallback)(((...t)=>e.current(...t)),[])}var Se=require("react");function Nt(n){let e=Le(),[t,r]=(0,Se.useState)(!1);return(0,Se.useEffect)(()=>{e()&&r(!!n())},[n,e]),t}var Q=require("react");function mt(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=(0,Q.useState)(!1),a=(0,Q.useRef)(null),i=(0,Q.useRef)(null),u=N(()=>{if(typeof window>"u"||!a.current)return;let{overflow:y,paddingRight:d}=a.current.style;if(i.current={overflow:y,paddingRight:d},r){let E=a.current===document.body?window.innerWidth:a.current.offsetWidth,b=parseInt(window.getComputedStyle(a.current).paddingRight,10)||0,g=E-a.current.scrollWidth;a.current.style.paddingRight=`${g+b}px`}a.current.style.overflow="hidden",s(!0)}),l=N(()=>{a.current&&i.current&&(a.current.style.overflow=i.current.overflow,r&&(a.current.style.paddingRight=i.current.paddingRight)),s(!1)});return(0,Q.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return t&&(a.current=typeof t=="string"?document.querySelector(t):t),a.current||(a.current=document.body),e&&u(),()=>{l()}},[e,t,r,u,l]),{isLocked:o,lock:u,unlock:l}}var yt=require("react"),S=require("@necto/dom");function vt(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:a,isExpanded:i,isSelected:u,isChecked:l,isHidden:y,hasPopup:d,valueCurrent:E,valueMin:b,valueMax:g,valueText:m,label:p,labelledBy:h,describedBy:T,controls:F,owns:U}=n;return(0,yt.useMemo)(()=>{let x={},K=[{value:e,attr:S.AriaProps.Invalid},{value:t,attr:S.AriaProps.Disabled},{value:r,attr:S.AriaProps.Readonly},{value:o,attr:S.AriaProps.Required},{value:s,attr:S.AriaProps.Busy},{value:i,attr:S.AriaProps.Expanded},{value:u,attr:S.AriaProps.Selected},{value:y,attr:S.AriaProps.Hidden}];for(let{value:M,attr:A}of K)M!==void 0&&(x[A]=M||void 0);return a!==void 0&&(x[S.AriaProps.Pressed]=a===!1?void 0:a),l!==void 0&&(x[S.AriaProps.Checked]=l===!1?void 0:l),d!==void 0&&(x[S.AriaProps.Haspopup]=d===!1?void 0:d),E!==void 0&&(x[S.AriaProps.Valuenow]=E),b!==void 0&&(x[S.AriaProps.Valuemin]=b),g!==void 0&&(x[S.AriaProps.Valuemax]=g),m!==void 0&&(x[S.AriaProps.Valuetext]=m),p!==void 0&&(x[S.AriaProps.Label]=p),h!==void 0&&(x[S.AriaProps.Labelledby]=h),T!==void 0&&(x[S.AriaProps.Describedby]=T),F!==void 0&&(x[S.AriaProps.Controls]=F),U!==void 0&&(x[S.AriaProps.Owns]=U),x},[e,t,r,o,s,a,i,u,l,y,d,E,b,g,m,p,h,T,F,U])}var Et=require("@necto/dom");function gt({id:n,css:e,insertionPoint:t,enabled:r=!0,window:o=typeof window<"u"?window:null}){let s=Array.isArray(e)?e.join(`
2
- `):e;De(()=>{if(!(!r||!s))return(0,Et.injectStyle)(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}var Ue=require("react");function Gt(n){let e=(0,Ue.useRef)(n);return(0,Ue.useLayoutEffect)(()=>{e.current=n}),e}var Pe=je(require("react"),1),De=Pe.default.useInsertionEffect??Pe.useLayoutEffect;var bt=require("defu"),I=require("react");function Tt(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:a}=(0,bt.defu)(n,{threshold:500}),i=(0,I.useRef)(null),u=(0,I.useRef)(null),l=(0,I.useRef)(null),y=(0,I.useRef)(!1),d=(0,I.useCallback)(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);(0,I.useEffect)(()=>d,[d]);let E=(0,I.useCallback)(F=>({type:F,pointerType:u.current??"mouse",target:l.current}),[]),b=(0,I.useCallback)(F=>{e||F.button!==0||F.pointerType!=="mouse"&&(u.current=F.pointerType,l.current=F.currentTarget,y.current=!1,t?.(E("longpressstart")),i.current=setTimeout(()=>{y.current=!0,F.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o?.(E("longpress")),i.current=null},a))},[e,a,t,o,E]),g=(0,I.useCallback)(()=>{u.current!==null&&(d(),!y.current&&r&&r(E("longpressend")),u.current=null,l.current=null)},[d,r,E]),m=(0,I.useCallback)(()=>{d(),u.current!==null&&r&&r(E("longpressend")),u.current=null,l.current=null},[d,r,E]),p=(0,I.useCallback)(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:b,onPointerUp:g,onPointerCancel:m,onContextMenu:p,...!e&&!!o&&!!s&&{"aria-description":s}}}}var Rt=require("react-dom"),j=require("react");function ht(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=(0,j.useState)(t),a=o&&r;(0,j.useLayoutEffect)(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let E of e.current.getAnimations())E instanceof CSSTransition&&E.cancel()},[e,a]),Ft(e,a,(0,j.useCallback)(()=>s(!1),[]));let[i,u]=(0,j.useState)(t);t&&!i?(s(!0),u(!0)):!t&&i&&u(!1);let[l,y]=(0,j.useState)(t?"open":"closed");switch(l){case"open":t||y("exiting");break;case"closed":case"exiting":t&&y("open");break}let d=l==="exiting";return Ft(e,d,(0,j.useCallback)(()=>{y(E=>E==="exiting"?"closed":E)},[])),{isEntering:a,isExiting:d,isRendered:t||d}}function Ft(n,e,t){(0,j.useLayoutEffect)(()=>{if(e&&n.current){if(!("getAnimations"in n.current)){t();return}let r=n.current.getAnimations();if(r.length===0){t();return}let o=!1;return Promise.all(r.map(s=>s.finished)).then(()=>{o||(0,Rt.flushSync)(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}var Lt=require("defu"),St=require("@necto/mergers"),O=require("react"),le=require("@necto/platform"),Oe=require("@necto/dom");function $t(n){return(0,le.isMac)()?n.metaKey:n.ctrlKey}function xt(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function Ut(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:a,disallowSelectAll:i,escapeBehavior:u,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:d,allowsTabNavigation:E,scrollRef:b,direction:g,orientation:m,onNavigate:p,onFocusItem:h}=(0,Lt.defu)(n,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),T=b??r,F=(0,O.useRef)({top:0,left:0}),U=(0,O.useRef)(e.focusedKey),x=(0,O.useRef)(o),K=(0,O.useRef)(""),M=(0,O.useRef)(null),A=(0,O.useCallback)((c,R,v)=>{c!=null&&(e.setFocusedKey(c,v),p?.(c),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(c):l&&!$t(R)&&e.replaceSelection(c))},[e,l,p]),X=(0,O.useCallback)(c=>{if(h){h(c);return}let R=xt(r,c);R&&!d&&(0,Oe.focusWithoutScrolling)(R)},[r,d,h]),P=(0,O.useCallback)(c=>{if(!y&&c.key.length===1&&!c.ctrlKey&&!c.metaKey&&!c.altKey){M.current&&clearTimeout(M.current),K.current+=c.key;let v=t.getKeyForSearch?.(K.current,e.focusedKey)??null;v!=null&&(c.preventDefault(),A(v,c)),M.current=setTimeout(()=>{K.current=""},500);return}let R=g==="rtl";switch(c.key){case"ArrowDown":{if(t.getKeyBelow){let v=e.focusedKey!=null?t.getKeyBelow(e.focusedKey):t.getFirstKey?.()??null;v==null&&s&&(v=t.getFirstKey?.()??null),v!=null&&(c.preventDefault(),A(v,c))}break}case"ArrowUp":{if(t.getKeyAbove){let v=e.focusedKey!=null?t.getKeyAbove(e.focusedKey):t.getLastKey?.()??null;v==null&&s&&(v=t.getLastKey?.()??null),v!=null&&(c.preventDefault(),A(v,c))}break}case"ArrowLeft":{if(t.getKeyLeftOf){let v=e.focusedKey!=null?t.getKeyLeftOf(e.focusedKey):null;v==null&&s&&(v=R?t.getFirstKey?.()??null:t.getLastKey?.()??null),v!=null&&(c.preventDefault(),A(v,c,R?"first":"last"))}break}case"ArrowRight":{if(t.getKeyRightOf){let v=e.focusedKey!=null?t.getKeyRightOf(e.focusedKey):null;v==null&&s&&(v=R?t.getLastKey?.()??null:t.getFirstKey?.()??null),v!=null&&(c.preventDefault(),A(v,c,R?"last":"first"))}break}case"Home":{if(t.getFirstKey){c.preventDefault();let v=t.getFirstKey();e.setFocusedKey(v),v!=null&&((0,le.isCtrlKeyPressed)(c)&&c.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):l&&e.replaceSelection(v))}break}case"End":{if(t.getLastKey){c.preventDefault();let v=t.getLastKey();e.setFocusedKey(v),v!=null&&((0,le.isCtrlKeyPressed)(c)&&c.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):l&&e.replaceSelection(v))}break}case"PageDown":{if(t.getKeyPageBelow&&e.focusedKey!=null){let v=t.getKeyPageBelow(e.focusedKey);v!=null&&(c.preventDefault(),A(v,c))}break}case"PageUp":{if(t.getKeyPageAbove&&e.focusedKey!=null){let v=t.getKeyPageAbove(e.focusedKey);v!=null&&(c.preventDefault(),A(v,c))}break}case"a":{(0,le.isCtrlKeyPressed)(c)&&e.selectionMode==="multiple"&&!i&&(c.preventDefault(),e.selectAll());break}case"Escape":{u==="clearSelection"&&!a&&e.selectedKeys.size>0&&(c.stopPropagation(),c.preventDefault(),e.clearSelection());break}case"Tab":{!E&&r.current&&c.shiftKey&&r.current.focus();break}}},[t,e,r,g,s,l,y,i,a,u,E,A]),pe=(0,O.useCallback)(c=>{if(!e.isFocused){if(e.setFocused(!0),e.focusedKey==null){let R=c.relatedTarget,v=R!=null&&!!(c.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING),Z=null;v?Z=e.lastSelectedKey??t.getLastKey?.()??null:Z=e.firstSelectedKey??t.getFirstKey?.()??null,Z!=null&&(e.setFocusedKey(Z),l&&!e.isSelected(Z)&&e.replaceSelection(Z))}else T.current&&(T.current.scrollTop=F.current.top,T.current.scrollLeft=F.current.left);e.focusedKey!=null&&X(e.focusedKey)}},[e,t,l,T,X]),me=(0,O.useCallback)(c=>{let R=c.relatedTarget;c.currentTarget.contains(R)||e.setFocused(!1)},[e]),Me=(0,O.useCallback)(c=>{T.current===c.target&&c.preventDefault()},[T]);(0,O.useEffect)(()=>{let c=T.current;if(!c)return()=>{};let R=()=>{F.current={top:c.scrollTop,left:c.scrollLeft}};return c.addEventListener("scroll",R,{passive:!0}),()=>{c.removeEventListener("scroll",R)}},[T]),(0,O.useEffect)(()=>{if(!x.current)return;let c=null;if(x.current==="first"?c=t.getFirstKey?.()??null:x.current==="last"&&(c=t.getLastKey?.()??null),e.selectedKeys.size>0){for(let R of e.selectedKeys)if(e.canSelectItem?.(R)!==!1){c=R;break}}e.setFocused(!0),e.setFocusedKey(c),c==null&&!d&&r.current&&r.current.focus(),x.current=!1},[t,e,r,d]),(0,O.useEffect)(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===U.current)return;let c=xt(r,e.focusedKey);c&&T.current&&(0,Oe.scrollIntoView)(T.current,c),U.current=e.focusedKey},[e.isFocused,e.focusedKey,r,T]),(0,O.useEffect)(()=>()=>{M.current&&clearTimeout(M.current)},[]);let f=d?void 0:e.focusedKey==null?0:-1;return{collectionProps:(0,St.mergeProps)({onKeyDown:P,onFocus:pe,onBlur:me,onMouseDown:Me,tabIndex:f,"data-orientation":m})}}var w=require("react"),de={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Ot={...de,customError:!0,valid:!1},J={isInvalid:!1,validationErrors:[],validationDetails:de},Be=(0,w.createContext)({}),we="__formValidationState"+Date.now();function wt(n){if(n[we]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[we];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return zt(n)}function zt(n){let{isInvalid:e,validationState:t,name:r,value:o,builtinValidation:s,validate:a,validationBehavior:i="aria"}=n;t&&(e||=t==="invalid");let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Ot}:null,l=(0,w.useMemo)(()=>{if(!a||o==null)return null;let P=qt(a,o);return Pt(P)},[a,o]);s?.validationDetails.valid&&(s=void 0);let y=(0,w.useContext)(Be),d=(0,w.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>He(y[P])):He(y[r]):[],[y,r]),[E,b]=(0,w.useState)(y),[g,m]=(0,w.useState)(!1);y!==E&&(b(y),m(!1));let p=(0,w.useMemo)(()=>Pt(g?[]:d),[g,d]),h=(0,w.useRef)(J),[T,F]=(0,w.useState)(J),U=(0,w.useRef)(J),x=()=>{if(!K)return;M(!1);let P=l||s||h.current;Ie(P,U.current)||(U.current=P,F(P))},[K,M]=(0,w.useState)(!1);return(0,w.useEffect)(x),{realtimeValidation:u||p||l||s||J,displayValidation:i==="native"?u||p||T:u||p||l||s||T,updateValidation(P){i==="aria"&&!Ie(T,P)?F(P):h.current=P},resetValidation(){let P=J;Ie(P,U.current)||(U.current=P,F(P)),i==="native"&&M(!1),m(!0)},commitValidation(){i==="native"&&M(!0),m(!0)}}}function He(n){return n?Array.isArray(n)?n:[n]:[]}function qt(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return He(t)}return[]}function Pt(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Ot}:null}function Ie(n,e){return n===e?!0:!!n&&!!e&&n.isInvalid===e.isInvalid&&n.validationErrors.length===e.validationErrors.length&&n.validationErrors.every((t,r)=>t===e.validationErrors[r])&&Object.entries(n.validationDetails).every(([t,r])=>e.validationDetails[t]===r)}function Mt(...n){let e=new Set,t=!1,r={...de};for(let o of n){for(let s of o.validationErrors)e.add(s);t||=o.isInvalid;for(let s in r)r[s]||=o.validationDetails[s]}return r.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:r}}0&&(module.exports={DEFAULT_VALIDATION_RESULT,FormValidationContext,VALID_VALIDITY_STATE,getInteractionModality,mergeValidation,privateValidationStateProp,useAnimation,useAriaProps,useCollectionNavigation,useContextProps,useEffectEvent,useElementVisibility,useFocus,useFocusRing,useFocusVisible,useFocusVisibleListener,useFocusWithin,useFocusable,useFormState,useGlobalListeners,useHover,useId,useIsomorphicInsertionEffect,useKeyboard,useLatestRef,useLongPress,useMounted,usePress,useRenderer,useScrollLock,useSlottedContext,useStyleInjection,useSupported,useSyntheticBlurEvent});
1
+ "use strict";var Kt=Object.create;var ye=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Ct=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty;var Dt=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},We=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ct(e))!At.call(n,o)&&o!==t&&ye(n,o,{get:()=>e[o],enumerable:!(r=Vt(e,o))||r.enumerable});return n};var je=(n,e,t)=>(t=n!=null?Kt(kt(n)):{},We(e||!n||!n.__esModule?ye(t,"default",{value:n,enumerable:!0}):t,n)),It=n=>We(ye({},"__esModule",{value:!0}),n);var Yt={};Dt(Yt,{DEFAULT_VALIDATION_RESULT:()=>J,FormValidationContext:()=>Be,VALID_VALIDITY_STATE:()=>de,getInteractionModality:()=>ne,mergeValidation:()=>Mt,privateValidationStateProp:()=>Oe,useAnimation:()=>ht,useAriaProps:()=>vt,useCollectionNavigation:()=>Ut,useContextProps:()=>Ge,useEffectEvent:()=>N,useElementVisibility:()=>_e,useFocus:()=>ee,useFocusRing:()=>qe,useFocusVisible:()=>Qe,useFocusVisibleListener:()=>re,useFocusWithin:()=>Fe,useFocusable:()=>ze,useFormState:()=>Ot,useGlobalListeners:()=>ie,useHover:()=>it,useId:()=>lt,useIsomorphicInsertionEffect:()=>De,useKeyboard:()=>Te,useLatestRef:()=>Gt,useLongPress:()=>Tt,useMounted:()=>Le,usePress:()=>at,useRenderer:()=>ft,useScrollLock:()=>mt,useSlottedContext:()=>Ee,useStyleInjection:()=>gt,useSupported:()=>Nt,useSyntheticBlurEvent:()=>te});module.exports=It(Yt);var ve=require("react"),Ne=require("@necto/mergers");function Ge({props:n,ref:e,context:t}){let r=Ee({context:t,slot:n.slot})||{},{ref:o=null,...s}=r,c=(0,ve.useRef)(null),u=(0,ve.useCallback)(l=>{c.current=l,typeof e=="function"?e(l):e&&(e.current=l),typeof o=="function"?o(l):o&&typeof o=="object"&&(o.current=l)},[e,o]),i=(0,Ne.mergeProps)(s,n);return"style"in s&&s.style&&"style"in n&&n.style&&(typeof s.style=="function"||typeof n.style=="function"?i.style=l=>{let y=typeof s.style=="function"?s.style(l):s.style,d={...l.defaultStyle,...y},v=typeof n.style=="function"?n.style({...l,defaultStyle:d}):n.style;return{...d,...v}}:i.style={...s.style,...n.style}),[i,u]}var B=require("react");function _e(n={}){let{partialVisibility:e=!1,threshold:t=0,rootMargin:r="0px",root:o=null,active:s=!0,once:c=!1,onChange:u}=n,[i,l]=(0,B.useState)(null),[y,d]=(0,B.useState)(!1),[v,T]=(0,B.useState)(null),b=(0,B.useRef)(!1),m=(0,B.useRef)(null),p=N(g=>{let F=g[0],U=F.isIntersecting,h={isIntersecting:F.isIntersecting,intersectionRatio:F.intersectionRatio,intersectionRect:F.intersectionRect,boundingClientRect:F.boundingClientRect,rootBounds:F.rootBounds,time:F.time};T(h),d(K=>c&&b.current?!0:U&&c?(b.current=!0,K!==!0&&u&&u(!0),!0):K!==U?(u&&u(U),U):K)}),x=(0,B.useCallback)(g=>{l(g)},[]);return(0,B.useEffect)(()=>{if(!s||!i)return;let g;return e===!0?g=[0,.1,.25,.5,.75,1]:typeof e=="string"?g=.01:g=t,m.current=new IntersectionObserver(p,{root:o,rootMargin:r,threshold:g}),m.current.observe(i),()=>{m.current&&m.current.disconnect()}},[s,i,o,r,t,e]),[x,y,v]}var ge=require("react");var Y=require("@necto/dom");function ee(n={}){let{isDisabled:e,onFocus:t,onBlur:r,onFocusChange:o}=n,s=(0,ge.useCallback)((l,y)=>{l?(t?.(y),o?.(!0)):(r?.(y),o?.(!1))},[t,r,o]),c=(0,ge.useCallback)(l=>{l.target===l.currentTarget&&s(!1,l)},[s]),u=te({onBlur:c}),i=(0,ge.useCallback)(l=>{let y=(0,Y.getOwnerDocument)(l.target),d=y?(0,Y.getActiveElement)(y):(0,Y.getActiveElement)();l.target===l.currentTarget&&d===(0,Y.getEventTarget)(l.nativeEvent)&&(s(!0,l),u(l))},[s,u]);return{focusProps:{...e?{}:{onFocus:i,onBlur:c}}}}var W=require("@necto/dom"),$e=require("@necto/mergers"),be=require("react");function ze(n,e){let{autoFocus:t,isDisabled:r,excludeFromTabOrder:o}=n,{focusProps:s}=ee(n),{keyboardProps:c}=Te(n),u=(0,be.useRef)(t),i=(0,W.getOwnerDocument)(e.current),l=i?(0,W.getActiveElement)(i):null;(0,be.useEffect)(()=>{if(u.current&&e.current)if(ne()==="virtual"){let d=l;(0,W.runAfterTransition)(()=>{i&&(0,W.getActiveElement)(i)===d&&e.current?.isConnected&&(0,W.focusWithoutScrolling)(e.current)})}else(0,W.focusWithoutScrolling)(e.current);u.current=!1},[e]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:(0,$e.mergeProps)(s??{},c,{tabIndex:y})}}var G=require("react");var Ht=null;function qe(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=(0,G.useRef)({isFocused:r,isFocusVisible:r||Ht!=="pointer"}),[s,c]=(0,G.useState)(r),[u,i]=(0,G.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),l=(0,G.useCallback)(()=>{i(o.current.isFocused&&o.current.isFocusVisible)},[]),y=(0,G.useCallback)(T=>{o.current.isFocused=T,c(T),l()},[l]);re({fn:T=>{o.current.isFocusVisible=T,l()},deps:[],opts:{isTextInput:t}});let{focusProps:d={}}=ee({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:v={}}=Fe({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:u,focusProps:e?v:d}}var Ye=require("react");function Qe(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=(0,Ye.useState)(t||ne()!=="pointer");return re({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var oe=new Map,Re=new Set,Je=!1,Ke=null,Xe=!1,V={get hasEventBeforeFocus(){return Je},set hasEventBeforeFocus(n){Je=n},get hasBlurredWindowRecently(){return Xe},set hasBlurredWindowRecently(n){Xe=n},get currentModality(){return Ke},set currentModality(n){Ke=n}};function ne(){return Ke}var Ze=require("std-env"),et=require("react"),tt=require("@necto-react/helpers"),se=require("@necto/dom");function Ce(n,e){Re.forEach(t=>t(n,e))}function Bt(n){return!(n.metaKey||Ze.isMacOS&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function nt(n){Bt(n)&&(V.hasEventBeforeFocus=!0,V.currentModality="keyboard",Ce("keyboard",n))}function Ve(n){["mousedown","pointerdown"].includes(n.type)&&(V.hasEventBeforeFocus=!0,V.currentModality="pointer",Ce("pointer",n))}function rt(n){[window,document].includes(n.target)||!n.isTrusted||!V.hasEventBeforeFocus&&!V.hasBlurredWindowRecently||(!V.hasEventBeforeFocus&&!V.hasBlurredWindowRecently&&(V.currentModality="virtual",Ce("virtual",n)),V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!1)}function ot(){V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!0}function Wt(n){let e=(0,se.getOwnerWindow)(n),t=(0,se.getOwnerDocument)(n);if(typeof window>"u"||typeof document>"u"||!e||!t||oe.has(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(...o){V.hasEventBeforeFocus=!0,r.apply(this,o)},t.addEventListener("keydown",nt,!0),t.addEventListener("click",Ve,!0),e.addEventListener("focus",rt,!0),e.addEventListener("blur",ot,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",Ve,!0),oe.set(e,{focus:r})}function jt(n){let e=(0,se.getOwnerWindow)(n),t=(0,se.getOwnerDocument)(n);if(!e||!t||!oe.has(e))return;let{focus:r}=oe.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",nt,!0),t.removeEventListener("click",Ve,!0),e.removeEventListener("focus",rt,!0),e.removeEventListener("blur",ot,!1),oe.delete(e)}function re(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(Wt(),(0,et.useEffect)(()=>{let o=(s,c)=>{(0,tt.isKeyboardFocusEvent)(!!r?.isTextInput,s,c)&&e(V.currentModality!=="pointer")};return Re.add(o),()=>{Re.delete(o),jt()}},t))}var ae=require("react"),st=require("@necto-react/helpers");var _=require("@necto/dom");function Fe(n){let{isDisabled:e,onFocusWithin:t,onBlurWithin:r,onFocusWithinChange:o}=n,s=(0,ae.useRef)({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=ie(),i=(0,ae.useCallback)(d=>{d.currentTarget.contains(d.target)&&s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,u(),r&&r(d),o&&o(!1))},[r,o,u]),l=te({onBlur:i}),y=(0,ae.useCallback)(d=>{if(!d.currentTarget.contains(d.target))return;let v=(0,_.getOwnerDocument)(d.target);if(!v)return;let T=(0,_.getActiveElement)(v);if(!s.current.isFocusWithin&&T===(0,_.getEventTarget)(d.nativeEvent)){t&&t(d),o&&o(!0),s.current.isFocusWithin=!0,l(d);let b=d.currentTarget;c(v,"focus",m=>{if(s.current.isFocusWithin&&!(0,_.nodeContains)(b,m.target)&&v.defaultView&&typeof v.defaultView.FocusEvent=="function"){let p=new v.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(p,"target",{value:b}),Object.defineProperty(p,"currentTarget",{value:b});let x=(0,st.createSyntheticEvent)(p);i(x)}},{capture:!0})}},[t,o,l,c,i]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:i}}}var $=require("react");function ie(){let n=(0,$.useRef)(new Map),e=(0,$.useCallback)((o,s,c,u)=>{let i=typeof u=="object"&&u?.once?(...l)=>{n.current.delete(c),c(...l)}:c;n.current.set(c,{type:s,eventTarget:o,options:u}),o.addEventListener(s,i,u)},[]),t=(0,$.useCallback)((o,s,c,u)=>{let i=n.current.get(c),l=i?.options?.once?i.fn:c;o.removeEventListener(s,l,u),n.current.delete(c)},[]),r=(0,$.useCallback)(()=>{n.current.forEach((o,s)=>{o.eventTarget.removeEventListener(o.type,s,o.options)}),n.current.clear()},[]);return(0,$.useEffect)(()=>()=>r(),[r]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:r}}var he=require("std-env");var xe=require("@necto/dom"),A=require("react");function it(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,c]=(0,A.useState)(!1),u=(0,A.useRef)({hoverCount:0,ignoreEmulated:!1}),i=(0,A.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=ie(),d=(0,A.useCallback)(()=>{u.current.ignoreEmulated=!0,setTimeout(()=>{u.current.ignoreEmulated=!1},50)},[]);(0,A.useEffect)(()=>{let m=x=>{x.pointerType==="touch"&&d()};if(typeof document>"u")return;let p=u.current;return p.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):he.isTest&&document.addEventListener("touchend",d),()=>{p.hoverCount--,p.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):he.isTest&&document.removeEventListener("touchend",d))}},[d]);let v=(0,A.useCallback)((m,p)=>{if(o||p==="touch"||i.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target)))return;i.isHovered=!0,i.pointerType=p,i.target=m.currentTarget;let x=(0,xe.getOwnerDocument)(m.target instanceof Element?m.target:null);x&&(l(x,"pointerover",g=>{i.isHovered&&i.target&&!(0,xe.nodeContains)(i.target,g.target)&&T(g,g.pointerType)},{capture:!0}),e?.({type:"hoverstart",target:m.currentTarget,pointerType:p}),t?.(!0),c(!0))},[o,e,t,l,i]),T=(0,A.useCallback)((m,p)=>{p==="touch"||!i.isHovered||!i.target||(i.isHovered=!1,i.pointerType="",i.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:p}),t?.(!1),c(!1))},[r,t,y,i.target,i]),b=(0,A.useMemo)(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=p=>{u.current.ignoreEmulated&&p.pointerType==="mouse"||v(p,p.pointerType)},m.onPointerLeave=p=>{!o&&p.currentTarget instanceof Element&&p.currentTarget.contains(p.target)&&T(p,p.pointerType)}):he.isTest&&(m.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=p=>{!i.ignoreEmulatedMouseEvents&&!u.current.ignoreEmulated&&v(p.nativeEvent,"mouse"),i.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&T(p.nativeEvent,"mouse")}),m},[o,v,T,i]);return(0,A.useEffect)(()=>{o&&i.isHovered&&T({currentTarget:i.target},i.pointerType)},[o,T,i.isHovered,i.pointerType,i.target]),{hoverProps:b,isHovered:s}}var ut=require("std-env");var ke={prefix:String(Math.round(Math.random()*1e10)),current:0},ce=new Map,fe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{ce.delete(n)}):null;var H=je(require("react"),1);function lt(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=(0,H.useState)(()=>t),s=(0,H.useRef)(null),c=(0,H.useRef)({}),u=(()=>{if(t)return t;let i=typeof H.default.useId=="function"?(0,H.useId)():String(++ke.current);return`${ut.isTest?e:`${e}${ke.prefix}`}-${i}`})();return(0,H.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let i=ce.get(u)||[],l={current:s.current};i.some(y=>y===l)||ce.set(u,[...i,l])}return fe&&fe.register(c.current,u),()=>{fe&&fe.unregister(c.current),ce.delete(u)}},[u]),(0,H.useEffect)(()=>{let i=s.current;i&&(o(i),s.current=null)},[]),u}var Ae=require("@necto-react/helpers");function Te(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?(0,Ae.createEventHandler)(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?(0,Ae.createEventHandler)(e=>n.onKeyUp?.(e.nativeEvent)):void 0}}}var z=require("react");function Le(n={}){let{type:e="function"}=n,t=(0,z.useRef)(!1),[r,o]=(0,z.useState)(!1),s=(0,z.useCallback)(()=>t.current,[]);return(0,z.useEffect)(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}var D=require("@necto/dom"),L=require("react");function C(n,e,t){return{type:n,pointerType:e,target:t.currentTarget??t.target,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function at(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:c,onPressEnd:u,onPressChange:i,onPressUp:l,onClick:y}=n,[d,v]=(0,L.useState)(!1),T=(0,L.useRef)(!1),b=(0,L.useRef)(null),m=(0,L.useRef)(!1),p=(0,L.useCallback)(f=>{d!==f&&(v(f),i?.(f))},[d,i]),x=(0,L.useCallback)(f=>{if(!m.current)return;let a=b.current&&b.current instanceof Node&&f.target instanceof Node&&b.current.contains(f.target);if(m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&(0,D.restoreTextSelection)(b.current),f.target){let R={...C("pressend","mouse",f),target:f.target};u?.(R),l?.(R),a&&s?.(R)}},[u,l,s,p,r]),g=(0,L.useCallback)(f=>{if(e||f.button!==0||T.current)return;t&&f.preventDefault(),r||(0,D.disableTextSelection)(f.currentTarget),m.current=!0,b.current=f.currentTarget,p(!0);let a=C("pressstart","mouse",f);c?.(a),window.addEventListener("mouseup",x,{once:!0})},[e,t,r,c,p,x]),F=(0,L.useCallback)(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&(0,D.restoreTextSelection)(f.currentTarget);let a=C("pressend","mouse",f);u?.(a),l?.(a),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(C("press","mouse",f))},[e,s,u,l,p,r]),U=(0,L.useCallback)(f=>{d&&(p(!1),u?.(C("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&(0,D.restoreTextSelection)(f.currentTarget))},[d,p,u,r]),h=(0,L.useCallback)(f=>{m.current&&!d&&(p(!0),c?.(C("pressstart","mouse",f)))},[d,c,p]),K=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&(0,D.restoreTextSelection)(b.current);let a={...C("pressend","touch",f),target:f.target};u?.(a),l?.(a)},[u,l,p,r]),M=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&(0,D.restoreTextSelection)(b.current);let a={...C("pressend","touch",f),target:f.target};u?.(a)},[u,p,r]),k=(0,L.useCallback)(f=>{e||(r||(0,D.disableTextSelection)(f.currentTarget),T.current=!0,setTimeout(()=>{T.current=!1},100),m.current=!0,b.current=f.currentTarget,p(!0),c?.(C("pressstart","touch",f)),window.addEventListener("touchend",K,{once:!0}),window.addEventListener("touchcancel",M,{once:!0}))},[e,c,p,r,K,M]),X=(0,L.useCallback)(f=>{if(e||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&(0,D.restoreTextSelection)(f.currentTarget);let a=C("pressend","touch",f);u?.(a),l?.(a),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(C("press","touch",f))},[e,s,u,l,p,r]),P=(0,L.useCallback)(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!d&&(f.key===" "&&f.preventDefault(),r||(0,D.disableTextSelection)(),p(!0),m.current=!0,c?.(C("pressstart","keyboard",f)))},[e,d,c,p,r]),pe=(0,L.useCallback)(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&d){p(!1),m.current=!1,r||(0,D.restoreTextSelection)();let R=C("pressend","keyboard",f);u?.(R),l?.(C("pressup","keyboard",f)),s?.(C("press","keyboard",f))}},[e,d,s,u,l,p,r]),me=(0,L.useCallback)(f=>{if(e){f.preventDefault();return}T.current||y?.(f)},[e,y]);(0,L.useEffect)(()=>()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",K),window.removeEventListener("touchcancel",M)},[x,K,M]);let Me=(0,L.useMemo)(()=>({onMouseDown:g,onMouseUp:F,onMouseLeave:U,onMouseEnter:h,onTouchStart:k,onTouchEnd:X,onKeyDown:P,onKeyUp:pe,onClick:me}),[g,F,U,h,k,X,P,pe,me]);return(0,L.useEffect)(()=>{let f=o?.current,a=f?(0,D.getOwnerWindow)(f):void 0;f&&a&&f instanceof a.Element&&a.getComputedStyle(f).touchAction==="auto"&&(f.style.touchAction="pan-x pan-y pinch-zoom")},[o]),{pressProps:Me,isPressed:d}}var ct=require("react");function ft(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return(0,ct.useMemo)(()=>{let i=typeof o=="function"?o({...t,defaultClassName:u}):o?`${u} ${o}`:u,l=typeof e=="function"?e({...t,defaultStyle:s||{}}):{...s,...e},y=typeof r=="function"?r({...t,defaultChildren:c}):r??c;return{className:i,style:l,children:y}},[o,e,r,u,c,s,t])}var dt=require("react");function Ee(n){let{context:e,slot:t}=n,r=(0,dt.useContext)(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let o=t||Symbol("default");if(!r.slots[o]){let s=new Intl.ListFormat().format(Object.keys(r.slots).map(u=>`"${u}"`)),c=t?`Invalid slot name: "${t}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${c} Valid slot names are ${s}.`)}return r.slots[o]}return r}var pt=require("@necto-react/helpers"),ue=require("react");function te(n){let{onBlur:e}=n,t=(0,ue.useRef)({isFocused:!1,observer:null});(0,ue.useLayoutEffect)(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=N(o=>{e?.(o)});return(0,ue.useCallback)(o=>{if(o.target instanceof HTMLButtonElement||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=o.target,c=u=>{if(t.current.isFocused=!1,s.disabled){let i=(0,pt.createSyntheticEvent)(u);r(i)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",c,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){t.current.observer?.disconnect();let u=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[r])}var q=require("react");function N(n){let e=(0,q.useRef)(n);return(typeof window<"u"?q.useLayoutEffect:q.useEffect)(()=>{e.current=n},[n]),(0,q.useCallback)(((...t)=>e.current(...t)),[])}var Se=require("react");function Nt(n){let e=Le(),[t,r]=(0,Se.useState)(!1);return(0,Se.useEffect)(()=>{e()&&r(!!n())},[n,e]),t}var Q=require("react");function mt(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=(0,Q.useState)(!1),c=(0,Q.useRef)(null),u=(0,Q.useRef)(null),i=N(()=>{if(typeof window>"u"||!c.current)return;let{overflow:y,paddingRight:d}=c.current.style;if(u.current={overflow:y,paddingRight:d},r){let v=c.current===document.body?window.innerWidth:c.current.offsetWidth,T=parseInt(window.getComputedStyle(c.current).paddingRight,10)||0,b=v-c.current.scrollWidth;c.current.style.paddingRight=`${b+T}px`}c.current.style.overflow="hidden",s(!0)}),l=N(()=>{c.current&&u.current&&(c.current.style.overflow=u.current.overflow,r&&(c.current.style.paddingRight=u.current.paddingRight)),s(!1)});return(0,Q.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return t&&(c.current=typeof t=="string"?document.querySelector(t):t),c.current||(c.current=document.body),e&&i(),()=>{l()}},[e,t,r,i,l]),{isLocked:o,lock:i,unlock:l}}var yt=require("react"),S=require("@necto/dom");function vt(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:c,isExpanded:u,isSelected:i,isChecked:l,isHidden:y,hasPopup:d,valueCurrent:v,valueMin:T,valueMax:b,valueText:m,label:p,labelledBy:x,describedBy:g,controls:F,owns:U}=n;return(0,yt.useMemo)(()=>{let h={},K=[{value:e,attr:S.AriaProps.Invalid},{value:t,attr:S.AriaProps.Disabled},{value:r,attr:S.AriaProps.Readonly},{value:o,attr:S.AriaProps.Required},{value:s,attr:S.AriaProps.Busy},{value:u,attr:S.AriaProps.Expanded},{value:i,attr:S.AriaProps.Selected},{value:y,attr:S.AriaProps.Hidden}];for(let{value:M,attr:k}of K)M!==void 0&&(h[k]=M||void 0);return c!==void 0&&(h[S.AriaProps.Pressed]=c===!1?void 0:c),l!==void 0&&(h[S.AriaProps.Checked]=l===!1?void 0:l),d!==void 0&&(h[S.AriaProps.Haspopup]=d===!1?void 0:d),v!==void 0&&(h[S.AriaProps.Valuenow]=v),T!==void 0&&(h[S.AriaProps.Valuemin]=T),b!==void 0&&(h[S.AriaProps.Valuemax]=b),m!==void 0&&(h[S.AriaProps.Valuetext]=m),p!==void 0&&(h[S.AriaProps.Label]=p),x!==void 0&&(h[S.AriaProps.Labelledby]=x),g!==void 0&&(h[S.AriaProps.Describedby]=g),F!==void 0&&(h[S.AriaProps.Controls]=F),U!==void 0&&(h[S.AriaProps.Owns]=U),h},[e,t,r,o,s,c,u,i,l,y,d,v,T,b,m,p,x,g,F,U])}var Et=require("@necto/dom");function gt({id:n,css:e,insertionPoint:t,enabled:r=!0,window:o=typeof window<"u"?window:null}){let s=Array.isArray(e)?e.join(`
2
+ `):e;De(()=>{if(!(!r||!s))return(0,Et.injectStyle)(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}var Ue=require("react");function Gt(n){let e=(0,Ue.useRef)(n);return(0,Ue.useLayoutEffect)(()=>{e.current=n}),e}var Pe=je(require("react"),1),De=Pe.default.useInsertionEffect??Pe.useLayoutEffect;var bt=require("defu"),I=require("react");function Tt(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=(0,bt.defu)(n,{threshold:500}),u=(0,I.useRef)(null),i=(0,I.useRef)(null),l=(0,I.useRef)(null),y=(0,I.useRef)(!1),d=(0,I.useCallback)(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);(0,I.useEffect)(()=>d,[d]);let v=(0,I.useCallback)(F=>({type:F,pointerType:i.current??"mouse",target:l.current}),[]),T=(0,I.useCallback)(F=>{e||F.button!==0||F.pointerType!=="mouse"&&(i.current=F.pointerType,l.current=F.currentTarget,y.current=!1,t?.(v("longpressstart")),u.current=setTimeout(()=>{y.current=!0,F.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o?.(v("longpress")),u.current=null},c))},[e,c,t,o,v]),b=(0,I.useCallback)(()=>{i.current!==null&&(d(),!y.current&&r&&r(v("longpressend")),i.current=null,l.current=null)},[d,r,v]),m=(0,I.useCallback)(()=>{d(),i.current!==null&&r&&r(v("longpressend")),i.current=null,l.current=null},[d,r,v]),p=(0,I.useCallback)(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:T,onPointerUp:b,onPointerCancel:m,onContextMenu:p,...!e&&!!o&&!!s&&{"aria-description":s}}}}var Rt=require("react-dom"),j=require("react");function ht(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=(0,j.useState)(t),c=o&&r;(0,j.useLayoutEffect)(()=>{if(c&&e.current&&"getAnimations"in e.current)for(let v of e.current.getAnimations())v instanceof CSSTransition&&v.cancel()},[e,c]),Ft(e,c,(0,j.useCallback)(()=>s(!1),[]));let[u,i]=(0,j.useState)(t);t&&!u?(s(!0),i(!0)):!t&&u&&i(!1);let[l,y]=(0,j.useState)(t?"open":"closed");switch(l){case"open":t||y("exiting");break;case"closed":case"exiting":t&&y("open");break}let d=l==="exiting";return Ft(e,d,(0,j.useCallback)(()=>{y(v=>v==="exiting"?"closed":v)},[])),{isEntering:c,isExiting:d,isRendered:t||d}}function Ft(n,e,t){(0,j.useLayoutEffect)(()=>{if(e&&n.current){if(!("getAnimations"in n.current)){t();return}let r=n.current.getAnimations();if(r.length===0){t();return}let o=!1;return Promise.all(r.map(s=>s.finished)).then(()=>{o||(0,Rt.flushSync)(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}var Lt=require("defu"),St=require("@necto/mergers"),w=require("react"),le=require("@necto/platform"),we=require("@necto/dom");function $t(n){return(0,le.isMac)()?n.metaKey:n.ctrlKey}function xt(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function Ut(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:c,disallowSelectAll:u,escapeBehavior:i,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:d,allowsTabNavigation:v,scrollRef:T,direction:b,orientation:m,onNavigate:p,onFocusItem:x}=(0,Lt.defu)(n,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),g=T??r,F=(0,w.useRef)({top:0,left:0}),U=(0,w.useRef)(e.focusedKey),h=(0,w.useRef)(o),K=(0,w.useRef)(""),M=(0,w.useRef)(null),k=(0,w.useCallback)((a,R,E)=>{a!=null&&(e.setFocusedKey(a,E),p?.(a),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(a):l&&!$t(R)&&e.replaceSelection(a))},[e,l,p]),X=(0,w.useCallback)(a=>{if(x){x(a);return}let R=xt(r,a);R&&!d&&(0,we.focusWithoutScrolling)(R)},[r,d,x]),P=(0,w.useCallback)(a=>{if(!y&&a.key.length===1&&!a.ctrlKey&&!a.metaKey&&!a.altKey){M.current&&clearTimeout(M.current),K.current+=a.key;let E=t.getKeyForSearch?.(K.current,e.focusedKey)??null;E!=null&&(a.preventDefault(),k(E,a)),M.current=setTimeout(()=>{K.current=""},500);return}let R=b==="rtl";switch(a.key){case"ArrowDown":{if(t.getKeyBelow){let E=e.focusedKey!=null?t.getKeyBelow(e.focusedKey):t.getFirstKey?.()??null;E==null&&s&&(E=t.getFirstKey?.()??null),E!=null&&(a.preventDefault(),k(E,a))}break}case"ArrowUp":{if(t.getKeyAbove){let E=e.focusedKey!=null?t.getKeyAbove(e.focusedKey):t.getLastKey?.()??null;E==null&&s&&(E=t.getLastKey?.()??null),E!=null&&(a.preventDefault(),k(E,a))}break}case"ArrowLeft":{if(t.getKeyLeftOf){let E=e.focusedKey!=null?t.getKeyLeftOf(e.focusedKey):null;E==null&&s&&(E=R?t.getFirstKey?.()??null:t.getLastKey?.()??null),E!=null&&(a.preventDefault(),k(E,a,R?"first":"last"))}break}case"ArrowRight":{if(t.getKeyRightOf){let E=e.focusedKey!=null?t.getKeyRightOf(e.focusedKey):null;E==null&&s&&(E=R?t.getLastKey?.()??null:t.getFirstKey?.()??null),E!=null&&(a.preventDefault(),k(E,a,R?"last":"first"))}break}case"Home":{if(t.getFirstKey){a.preventDefault();let E=t.getFirstKey();e.setFocusedKey(E),E!=null&&((0,le.isCtrlKeyPressed)(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(E):l&&e.replaceSelection(E))}break}case"End":{if(t.getLastKey){a.preventDefault();let E=t.getLastKey();e.setFocusedKey(E),E!=null&&((0,le.isCtrlKeyPressed)(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(E):l&&e.replaceSelection(E))}break}case"PageDown":{if(t.getKeyPageBelow&&e.focusedKey!=null){let E=t.getKeyPageBelow(e.focusedKey);E!=null&&(a.preventDefault(),k(E,a))}break}case"PageUp":{if(t.getKeyPageAbove&&e.focusedKey!=null){let E=t.getKeyPageAbove(e.focusedKey);E!=null&&(a.preventDefault(),k(E,a))}break}case"a":{(0,le.isCtrlKeyPressed)(a)&&e.selectionMode==="multiple"&&!u&&(a.preventDefault(),e.selectAll());break}case"Escape":{i==="clearSelection"&&!c&&e.selectedKeys.size>0&&(a.stopPropagation(),a.preventDefault(),e.clearSelection());break}case"Tab":{!v&&r.current&&a.shiftKey&&r.current.focus();break}}},[t,e,r,b,s,l,y,u,c,i,v,k]),pe=(0,w.useCallback)(a=>{if(!e.isFocused){if(e.setFocused(!0),e.focusedKey==null){let R=a.relatedTarget,E=R!=null&&!!(a.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING),Z=null;E?Z=e.lastSelectedKey??t.getLastKey?.()??null:Z=e.firstSelectedKey??t.getFirstKey?.()??null,Z!=null&&(e.setFocusedKey(Z),l&&!e.isSelected(Z)&&e.replaceSelection(Z))}else g.current&&(g.current.scrollTop=F.current.top,g.current.scrollLeft=F.current.left);e.focusedKey!=null&&X(e.focusedKey)}},[e,t,l,g,X]),me=(0,w.useCallback)(a=>{let R=a.relatedTarget;a.currentTarget.contains(R)||e.setFocused(!1)},[e]),Me=(0,w.useCallback)(a=>{g.current===a.target&&a.preventDefault()},[g]);(0,w.useEffect)(()=>{let a=g.current;if(!a)return()=>{};let R=()=>{F.current={top:a.scrollTop,left:a.scrollLeft}};return a.addEventListener("scroll",R,{passive:!0}),()=>{a.removeEventListener("scroll",R)}},[g]),(0,w.useEffect)(()=>{if(!h.current)return;let a=null;if(h.current==="first"?a=t.getFirstKey?.()??null:h.current==="last"&&(a=t.getLastKey?.()??null),e.selectedKeys.size>0){for(let R of e.selectedKeys)if(e.canSelectItem?.(R)!==!1){a=R;break}}e.setFocused(!0),e.setFocusedKey(a),a==null&&!d&&r.current&&r.current.focus(),h.current=!1},[t,e,r,d]),(0,w.useEffect)(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===U.current)return;let a=xt(r,e.focusedKey);a&&g.current&&(0,we.scrollIntoView)(g.current,a),U.current=e.focusedKey},[e.isFocused,e.focusedKey,r,g]),(0,w.useEffect)(()=>()=>{M.current&&clearTimeout(M.current)},[]);let f=d?void 0:e.focusedKey==null?0:-1;return{collectionProps:(0,St.mergeProps)({onKeyDown:P,onFocus:pe,onBlur:me,onMouseDown:Me,tabIndex:f,"data-orientation":m})}}var O=require("react"),de={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},wt={...de,customError:!0,valid:!1},J={isInvalid:!1,validationErrors:[],validationDetails:de},Be=(0,O.createContext)({}),Oe="__formValidationState"+Date.now();function Ot(n){if(n[Oe]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[Oe];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return zt(n)}function zt(n){let{isInvalid:e,validationState:t,name:r,value:o,builtinValidation:s,validate:c,validationBehavior:u="aria"}=n;t&&(e||=t==="invalid");let i=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:wt}:null,l=(0,O.useMemo)(()=>{if(!c||o==null)return null;let P=qt(c,o);return Pt(P)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=(0,O.useContext)(Be),d=(0,O.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>He(y[P])):He(y[r]):[],[y,r]),[v,T]=(0,O.useState)(y),[b,m]=(0,O.useState)(!1);y!==v&&(T(y),m(!1));let p=(0,O.useMemo)(()=>Pt(b?[]:d),[b,d]),x=(0,O.useRef)(J),[g,F]=(0,O.useState)(J),U=(0,O.useRef)(J),h=()=>{if(!K)return;M(!1);let P=l||s||x.current;Ie(P,U.current)||(U.current=P,F(P))},[K,M]=(0,O.useState)(!1);return(0,O.useEffect)(h),{realtimeValidation:i||p||l||s||J,displayValidation:u==="native"?i||p||g:i||p||l||s||g,updateValidation(P){u==="aria"&&!Ie(g,P)?F(P):x.current=P},resetValidation(){let P=J;Ie(P,U.current)||(U.current=P,F(P)),u==="native"&&M(!1),m(!0)},commitValidation(){u==="native"&&M(!0),m(!0)}}}function He(n){return n?Array.isArray(n)?n:[n]:[]}function qt(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return He(t)}return[]}function Pt(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:wt}:null}function Ie(n,e){return n===e?!0:!!n&&!!e&&n.isInvalid===e.isInvalid&&n.validationErrors.length===e.validationErrors.length&&n.validationErrors.every((t,r)=>t===e.validationErrors[r])&&Object.entries(n.validationDetails).every(([t,r])=>e.validationDetails[t]===r)}function Mt(...n){let e=new Set,t=!1,r={...de};for(let o of n){for(let s of o.validationErrors)e.add(s);t||=o.isInvalid;for(let s in r)r[s]||=o.validationDetails[s]}return r.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:r}}0&&(module.exports={DEFAULT_VALIDATION_RESULT,FormValidationContext,VALID_VALIDITY_STATE,getInteractionModality,mergeValidation,privateValidationStateProp,useAnimation,useAriaProps,useCollectionNavigation,useContextProps,useEffectEvent,useElementVisibility,useFocus,useFocusRing,useFocusVisible,useFocusVisibleListener,useFocusWithin,useFocusable,useFormState,useGlobalListeners,useHover,useId,useIsomorphicInsertionEffect,useKeyboard,useLatestRef,useLongPress,useMounted,usePress,useRenderer,useScrollLock,useSlottedContext,useStyleInjection,useSupported,useSyntheticBlurEvent});
@@ -1,21 +1,21 @@
1
- "use strict";(()=>{var fo=Object.create;var Cn=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var yo=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Eo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of yo(t))!go.call(e,s)&&s!==r&&Cn(e,s,{get:()=>t[s],enumerable:!(o=po(t,s))||o.enumerable});return e};var K=(e,t,r)=>(r=e!=null?fo(mo(e)):{},Eo(t||!e||!e.__esModule?Cn(r,"default",{value:e,enumerable:!0}):r,e));var Hn=Ce(w=>{"use strict";var It=Symbol.for("react.transitional.element"),vo=Symbol.for("react.portal"),ho=Symbol.for("react.fragment"),To=Symbol.for("react.strict_mode"),bo=Symbol.for("react.profiler"),Ro=Symbol.for("react.consumer"),So=Symbol.for("react.context"),Oo=Symbol.for("react.forward_ref"),_o=Symbol.for("react.suspense"),wo=Symbol.for("react.memo"),Dn=Symbol.for("react.lazy"),Ao=Symbol.for("react.activity"),Pn=Symbol.iterator;function Lo(e){return e===null||typeof e!="object"?null:(e=Pn&&e[Pn]||e["@@iterator"],typeof e=="function"?e:null)}var Un={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fn=Object.assign,kn={};function Me(e,t,r){this.props=e,this.context=t,this.refs=kn,this.updater=r||Un}Me.prototype.isReactComponent={};Me.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Me.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nn(){}Nn.prototype=Me.prototype;function xt(e,t,r){this.props=e,this.context=t,this.refs=kn,this.updater=r||Un}var Dt=xt.prototype=new Nn;Dt.constructor=xt;Fn(Dt,Me.prototype);Dt.isPureReactComponent=!0;var Mn=Array.isArray;function Mt(){}var H={H:null,A:null,T:null,S:null},Kn=Object.prototype.hasOwnProperty;function Ut(e,t,r){var o=r.ref;return{$$typeof:It,type:e,key:t,ref:o!==void 0?o:null,props:r}}function Co(e,t){return Ut(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===It}function Po(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var In=/\/+/g;function Pt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Po(""+e.key):t.toString(36)}function Mo(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Mt,Mt):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pe(e,t,r,o,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case It:case vo:l=!0;break;case Dn:return l=e._init,Pe(l(e._payload),t,r,o,s)}}if(l)return s=s(e),l=o===""?"."+Pt(e,0):o,Mn(s)?(r="",l!=null&&(r=l.replace(In,"$&/")+"/"),Pe(s,t,r,"",function(p){return p})):s!=null&&(Ft(s)&&(s=Co(s,r+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(In,"$&/")+"/")+l)),t.push(s)),1;l=0;var d=o===""?".":o+":";if(Mn(e))for(var f=0;f<e.length;f++)o=e[f],i=d+Pt(o,f),l+=Pe(o,t,r,i,s);else if(f=Lo(e),typeof f=="function")for(e=f.call(e),f=0;!(o=e.next()).done;)o=o.value,i=d+Pt(o,f++),l+=Pe(o,t,r,i,s);else if(i==="object"){if(typeof e.then=="function")return Pe(Mo(e),t,r,o,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function ot(e,t,r){if(e==null)return e;var o=[],s=0;return Pe(e,o,"","",function(i){return t.call(r,i,s++)}),o}function Io(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var xn=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xo={map:ot,forEach:function(e,t,r){ot(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ot(e,function(){t++}),t},toArray:function(e){return ot(e,function(t){return t})||[]},only:function(e){if(!Ft(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=Ao;w.Children=xo;w.Component=Me;w.Fragment=ho;w.Profiler=bo;w.PureComponent=xt;w.StrictMode=To;w.Suspense=_o;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return H.H.useMemoCache(e)}};w.cache=function(e){return function(){return e.apply(null,arguments)}};w.cacheSignal=function(){return null};w.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Fn({},e.props),s=e.key;if(t!=null)for(i in t.key!==void 0&&(s=""+t.key),t)!Kn.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var l=Array(i),d=0;d<i;d++)l[d]=arguments[d+2];o.children=l}return Ut(e.type,s,o)};w.createContext=function(e){return e={$$typeof:So,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ro,_context:e},e};w.createElement=function(e,t,r){var o,s={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Kn.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(s[o]=t[o]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var d=Array(l),f=0;f<l;f++)d[f]=arguments[f+2];s.children=d}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)s[o]===void 0&&(s[o]=l[o]);return Ut(e,i,s)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:Oo,render:e}};w.isValidElement=Ft;w.lazy=function(e){return{$$typeof:Dn,_payload:{_status:-1,_result:e},_init:Io}};w.memo=function(e,t){return{$$typeof:wo,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=H.T,r={};H.T=r;try{var o=e(),s=H.S;s!==null&&s(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Mt,xn)}catch(i){xn(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),H.T=t}};w.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()};w.use=function(e){return H.H.use(e)};w.useActionState=function(e,t,r){return H.H.useActionState(e,t,r)};w.useCallback=function(e,t){return H.H.useCallback(e,t)};w.useContext=function(e){return H.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return H.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return H.H.useEffect(e,t)};w.useEffectEvent=function(e){return H.H.useEffectEvent(e)};w.useId=function(){return H.H.useId()};w.useImperativeHandle=function(e,t,r){return H.H.useImperativeHandle(e,t,r)};w.useInsertionEffect=function(e,t){return H.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return H.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return H.H.useMemo(e,t)};w.useOptimistic=function(e,t){return H.H.useOptimistic(e,t)};w.useReducer=function(e,t,r){return H.H.useReducer(e,t,r)};w.useRef=function(e){return H.H.useRef(e)};w.useState=function(e){return H.H.useState(e)};w.useSyncExternalStore=function(e,t,r){return H.H.useSyncExternalStore(e,t,r)};w.useTransition=function(){return H.H.useTransition()};w.version="19.2.0"});var Vn=Ce((_,st)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(n,u){Object.defineProperty(o.prototype,n,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",u[0],u[1])}})}function t(n){return n===null||typeof n!="object"?null:(n=mn&&n[mn]||n["@@iterator"],typeof n=="function"?n:null)}function r(n,u){n=(n=n.constructor)&&(n.displayName||n.name)||"ReactClass";var y=n+"."+u;gn[y]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",u,n),gn[y]=!0)}function o(n,u,y){this.props=n,this.context=u,this.refs=Lt,this.updater=y||En}function s(){}function i(n,u,y){this.props=n,this.context=u,this.refs=Lt,this.updater=y||En}function l(){}function d(n){return""+n}function f(n){try{d(n);var u=!1}catch{u=!0}if(u){u=console;var y=u.error,h=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return y.call(u,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",h),d(n)}}function p(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===io?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _t:return"Fragment";case ln:return"Profiler";case cn:return"StrictMode";case pn:return"Suspense";case so:return"SuspenseList";case yn:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case ce:return"Portal";case fn:return n.displayName||"Context";case wt:return(n._context.displayName||"Context")+".Consumer";case dn:var u=n.render;return n=n.displayName,n||(n=u.displayName||u.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case At:return u=n.displayName||null,u!==null?u:p(n.type)||"Memo";case Ne:u=n._payload,n=n._init;try{return p(n(u))}catch{}}return null}function b(n){if(n===_t)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===Ne)return"<...>";try{var u=p(n);return u?"<"+u+">":"<...>"}catch{return"<...>"}}function c(){var n=P.A;return n===null?null:n.getOwner()}function a(){return Error("react-stack-top-frame")}function g(n){if(et.call(n,"key")){var u=Object.getOwnPropertyDescriptor(n,"key").get;if(u&&u.isReactWarning)return!1}return n.key!==void 0}function S(n,u){function y(){bn||(bn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",u))}y.isReactWarning=!0,Object.defineProperty(n,"key",{get:y,configurable:!0})}function T(){var n=p(this.type);return Sn[n]||(Sn[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function v(n,u,y,h,R,M){var L=y.ref;return n={$$typeof:O,type:n,key:u,props:y,_owner:h},(L!==void 0?L:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:T}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function k(n,u){return u=v(n.type,u,n.props,n._owner,n._debugStack,n._debugTask),n._store&&(u._store.validated=n._store.validated),u}function x(n){C(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===Ne&&(n._payload.status==="fulfilled"?C(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function C(n){return typeof n=="object"&&n!==null&&n.$$typeof===O}function B(n){var u={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(y){return u[y]})}function U(n,u){return typeof n=="object"&&n!==null&&n.key!=null?(f(n.key),B(""+n.key)):u.toString(36)}function Y(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(l,l):(n.status="pending",n.then(function(u){n.status==="pending"&&(n.status="fulfilled",n.value=u)},function(u){n.status==="pending"&&(n.status="rejected",n.reason=u)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function j(n,u,y,h,R){var M=typeof n;(M==="undefined"||M==="boolean")&&(n=null);var L=!1;if(n===null)L=!0;else switch(M){case"bigint":case"string":case"number":L=!0;break;case"object":switch(n.$$typeof){case O:case ce:L=!0;break;case Ne:return L=n._init,j(L(n._payload),u,y,h,R)}}if(L){L=n,R=R(L);var N=h===""?"."+U(L,0):h;return hn(R)?(y="",N!=null&&(y=N.replace(_n,"$&/")+"/"),j(R,u,y,"",function(de){return de})):R!=null&&(C(R)&&(R.key!=null&&(L&&L.key===R.key||f(R.key)),y=k(R,y+(R.key==null||L&&L.key===R.key?"":(""+R.key).replace(_n,"$&/")+"/")+N),h!==""&&L!=null&&C(L)&&L.key==null&&L._store&&!L._store.validated&&(y._store.validated=2),R=y),u.push(R)),1}if(L=0,N=h===""?".":h+":",hn(n))for(var I=0;I<n.length;I++)h=n[I],M=N+U(h,I),L+=j(h,u,y,M,R);else if(I=t(n),typeof I=="function")for(I===n.entries&&(On||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),On=!0),n=I.call(n),I=0;!(h=n.next()).done;)h=h.value,M=N+U(h,I++),L+=j(h,u,y,M,R);else if(M==="object"){if(typeof n.then=="function")return j(Y(n),u,y,h,R);throw u=String(n),Error("Objects are not valid as a React child (found: "+(u==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":u)+"). If you meant to render a collection of children, use an array instead.")}return L}function G(n,u,y){if(n==null)return n;var h=[],R=0;return j(n,h,"","",function(M){return u.call(y,M,R++)}),h}function fe(n){if(n._status===-1){var u=n._ioInfo;u!=null&&(u.start=u.end=performance.now()),u=n._result;var y=u();if(y.then(function(R){if(n._status===0||n._status===-1){n._status=1,n._result=R;var M=n._ioInfo;M!=null&&(M.end=performance.now()),y.status===void 0&&(y.status="fulfilled",y.value=R)}},function(R){if(n._status===0||n._status===-1){n._status=2,n._result=R;var M=n._ioInfo;M!=null&&(M.end=performance.now()),y.status===void 0&&(y.status="rejected",y.reason=R)}}),u=n._ioInfo,u!=null){u.value=y;var h=y.displayName;typeof h=="string"&&(u.name=h)}n._status===-1&&(n._status=0,n._result=y)}if(n._status===1)return u=n._result,u===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
1
+ "use strict";(()=>{var fo=Object.create;var Cn=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var yo=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Eo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of yo(t))!go.call(e,s)&&s!==r&&Cn(e,s,{get:()=>t[s],enumerable:!(o=po(t,s))||o.enumerable});return e};var K=(e,t,r)=>(r=e!=null?fo(mo(e)):{},Eo(t||!e||!e.__esModule?Cn(r,"default",{value:e,enumerable:!0}):r,e));var Hn=Ce(w=>{"use strict";var It=Symbol.for("react.transitional.element"),vo=Symbol.for("react.portal"),ho=Symbol.for("react.fragment"),To=Symbol.for("react.strict_mode"),bo=Symbol.for("react.profiler"),Ro=Symbol.for("react.consumer"),So=Symbol.for("react.context"),Oo=Symbol.for("react.forward_ref"),_o=Symbol.for("react.suspense"),wo=Symbol.for("react.memo"),Dn=Symbol.for("react.lazy"),Ao=Symbol.for("react.activity"),Pn=Symbol.iterator;function Lo(e){return e===null||typeof e!="object"?null:(e=Pn&&e[Pn]||e["@@iterator"],typeof e=="function"?e:null)}var Un={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fn=Object.assign,kn={};function Me(e,t,r){this.props=e,this.context=t,this.refs=kn,this.updater=r||Un}Me.prototype.isReactComponent={};Me.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Me.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nn(){}Nn.prototype=Me.prototype;function xt(e,t,r){this.props=e,this.context=t,this.refs=kn,this.updater=r||Un}var Dt=xt.prototype=new Nn;Dt.constructor=xt;Fn(Dt,Me.prototype);Dt.isPureReactComponent=!0;var Mn=Array.isArray;function Mt(){}var H={H:null,A:null,T:null,S:null},Kn=Object.prototype.hasOwnProperty;function Ut(e,t,r){var o=r.ref;return{$$typeof:It,type:e,key:t,ref:o!==void 0?o:null,props:r}}function Co(e,t){return Ut(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===It}function Po(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var In=/\/+/g;function Pt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Po(""+e.key):t.toString(36)}function Mo(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Mt,Mt):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pe(e,t,r,o,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case It:case vo:l=!0;break;case Dn:return l=e._init,Pe(l(e._payload),t,r,o,s)}}if(l)return s=s(e),l=o===""?"."+Pt(e,0):o,Mn(s)?(r="",l!=null&&(r=l.replace(In,"$&/")+"/"),Pe(s,t,r,"",function(p){return p})):s!=null&&(Ft(s)&&(s=Co(s,r+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(In,"$&/")+"/")+l)),t.push(s)),1;l=0;var d=o===""?".":o+":";if(Mn(e))for(var f=0;f<e.length;f++)o=e[f],i=d+Pt(o,f),l+=Pe(o,t,r,i,s);else if(f=Lo(e),typeof f=="function")for(e=f.call(e),f=0;!(o=e.next()).done;)o=o.value,i=d+Pt(o,f++),l+=Pe(o,t,r,i,s);else if(i==="object"){if(typeof e.then=="function")return Pe(Mo(e),t,r,o,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function ot(e,t,r){if(e==null)return e;var o=[],s=0;return Pe(e,o,"","",function(i){return t.call(r,i,s++)}),o}function Io(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var xn=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xo={map:ot,forEach:function(e,t,r){ot(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ot(e,function(){t++}),t},toArray:function(e){return ot(e,function(t){return t})||[]},only:function(e){if(!Ft(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=Ao;w.Children=xo;w.Component=Me;w.Fragment=ho;w.Profiler=bo;w.PureComponent=xt;w.StrictMode=To;w.Suspense=_o;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return H.H.useMemoCache(e)}};w.cache=function(e){return function(){return e.apply(null,arguments)}};w.cacheSignal=function(){return null};w.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Fn({},e.props),s=e.key;if(t!=null)for(i in t.key!==void 0&&(s=""+t.key),t)!Kn.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var l=Array(i),d=0;d<i;d++)l[d]=arguments[d+2];o.children=l}return Ut(e.type,s,o)};w.createContext=function(e){return e={$$typeof:So,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ro,_context:e},e};w.createElement=function(e,t,r){var o,s={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)Kn.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(s[o]=t[o]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var d=Array(l),f=0;f<l;f++)d[f]=arguments[f+2];s.children=d}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)s[o]===void 0&&(s[o]=l[o]);return Ut(e,i,s)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:Oo,render:e}};w.isValidElement=Ft;w.lazy=function(e){return{$$typeof:Dn,_payload:{_status:-1,_result:e},_init:Io}};w.memo=function(e,t){return{$$typeof:wo,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=H.T,r={};H.T=r;try{var o=e(),s=H.S;s!==null&&s(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Mt,xn)}catch(i){xn(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),H.T=t}};w.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()};w.use=function(e){return H.H.use(e)};w.useActionState=function(e,t,r){return H.H.useActionState(e,t,r)};w.useCallback=function(e,t){return H.H.useCallback(e,t)};w.useContext=function(e){return H.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return H.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return H.H.useEffect(e,t)};w.useEffectEvent=function(e){return H.H.useEffectEvent(e)};w.useId=function(){return H.H.useId()};w.useImperativeHandle=function(e,t,r){return H.H.useImperativeHandle(e,t,r)};w.useInsertionEffect=function(e,t){return H.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return H.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return H.H.useMemo(e,t)};w.useOptimistic=function(e,t){return H.H.useOptimistic(e,t)};w.useReducer=function(e,t,r){return H.H.useReducer(e,t,r)};w.useRef=function(e){return H.H.useRef(e)};w.useState=function(e){return H.H.useState(e)};w.useSyncExternalStore=function(e,t,r){return H.H.useSyncExternalStore(e,t,r)};w.useTransition=function(){return H.H.useTransition()};w.version="19.2.0"});var Vn=Ce((_,st)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(n,a){Object.defineProperty(o.prototype,n,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",a[0],a[1])}})}function t(n){return n===null||typeof n!="object"?null:(n=mn&&n[mn]||n["@@iterator"],typeof n=="function"?n:null)}function r(n,a){n=(n=n.constructor)&&(n.displayName||n.name)||"ReactClass";var y=n+"."+a;gn[y]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",a,n),gn[y]=!0)}function o(n,a,y){this.props=n,this.context=a,this.refs=Lt,this.updater=y||En}function s(){}function i(n,a,y){this.props=n,this.context=a,this.refs=Lt,this.updater=y||En}function l(){}function d(n){return""+n}function f(n){try{d(n);var a=!1}catch{a=!0}if(a){a=console;var y=a.error,h=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return y.call(a,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",h),d(n)}}function p(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===io?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _t:return"Fragment";case ln:return"Profiler";case cn:return"StrictMode";case pn:return"Suspense";case so:return"SuspenseList";case yn:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case ce:return"Portal";case fn:return n.displayName||"Context";case wt:return(n._context.displayName||"Context")+".Consumer";case dn:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case At:return a=n.displayName||null,a!==null?a:p(n.type)||"Memo";case Ne:a=n._payload,n=n._init;try{return p(n(a))}catch{}}return null}function b(n){if(n===_t)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===Ne)return"<...>";try{var a=p(n);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function c(){var n=M.A;return n===null?null:n.getOwner()}function u(){return Error("react-stack-top-frame")}function g(n){if(et.call(n,"key")){var a=Object.getOwnPropertyDescriptor(n,"key").get;if(a&&a.isReactWarning)return!1}return n.key!==void 0}function S(n,a){function y(){bn||(bn=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",a))}y.isReactWarning=!0,Object.defineProperty(n,"key",{get:y,configurable:!0})}function T(){var n=p(this.type);return Sn[n]||(Sn[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function v(n,a,y,h,R,I){var L=y.ref;return n={$$typeof:O,type:n,key:a,props:y,_owner:h},(L!==void 0?L:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:T}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function k(n,a){return a=v(n.type,a,n.props,n._owner,n._debugStack,n._debugTask),n._store&&(a._store.validated=n._store.validated),a}function C(n){P(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===Ne&&(n._payload.status==="fulfilled"?P(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function P(n){return typeof n=="object"&&n!==null&&n.$$typeof===O}function B(n){var a={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(y){return a[y]})}function U(n,a){return typeof n=="object"&&n!==null&&n.key!=null?(f(n.key),B(""+n.key)):a.toString(36)}function Y(n){switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:switch(typeof n.status=="string"?n.then(l,l):(n.status="pending",n.then(function(a){n.status==="pending"&&(n.status="fulfilled",n.value=a)},function(a){n.status==="pending"&&(n.status="rejected",n.reason=a)})),n.status){case"fulfilled":return n.value;case"rejected":throw n.reason}}throw n}function j(n,a,y,h,R){var I=typeof n;(I==="undefined"||I==="boolean")&&(n=null);var L=!1;if(n===null)L=!0;else switch(I){case"bigint":case"string":case"number":L=!0;break;case"object":switch(n.$$typeof){case O:case ce:L=!0;break;case Ne:return L=n._init,j(L(n._payload),a,y,h,R)}}if(L){L=n,R=R(L);var N=h===""?"."+U(L,0):h;return hn(R)?(y="",N!=null&&(y=N.replace(_n,"$&/")+"/"),j(R,a,y,"",function(de){return de})):R!=null&&(P(R)&&(R.key!=null&&(L&&L.key===R.key||f(R.key)),y=k(R,y+(R.key==null||L&&L.key===R.key?"":(""+R.key).replace(_n,"$&/")+"/")+N),h!==""&&L!=null&&P(L)&&L.key==null&&L._store&&!L._store.validated&&(y._store.validated=2),R=y),a.push(R)),1}if(L=0,N=h===""?".":h+":",hn(n))for(var x=0;x<n.length;x++)h=n[x],I=N+U(h,x),L+=j(h,a,y,I,R);else if(x=t(n),typeof x=="function")for(x===n.entries&&(On||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),On=!0),n=x.call(n),x=0;!(h=n.next()).done;)h=h.value,I=N+U(h,x++),L+=j(h,a,y,I,R);else if(I==="object"){if(typeof n.then=="function")return j(Y(n),a,y,h,R);throw a=String(n),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return L}function G(n,a,y){if(n==null)return n;var h=[],R=0;return j(n,h,"","",function(I){return a.call(y,I,R++)}),h}function fe(n){if(n._status===-1){var a=n._ioInfo;a!=null&&(a.start=a.end=performance.now()),a=n._result;var y=a();if(y.then(function(R){if(n._status===0||n._status===-1){n._status=1,n._result=R;var I=n._ioInfo;I!=null&&(I.end=performance.now()),y.status===void 0&&(y.status="fulfilled",y.value=R)}},function(R){if(n._status===0||n._status===-1){n._status=2,n._result=R;var I=n._ioInfo;I!=null&&(I.end=performance.now()),y.status===void 0&&(y.status="rejected",y.reason=R)}}),a=n._ioInfo,a!=null){a.value=y;var h=y.displayName;typeof h=="string"&&(a.name=h)}n._status===-1&&(n._status=0,n._result=y)}if(n._status===1)return a=n._result,a===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
2
 
3
3
  Your code should look like:
4
4
  const MyComponent = lazy(() => import('./MyComponent'))
5
5
 
6
- Did you accidentally put curly braces around the import?`,u),"default"in u||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
6
+ Did you accidentally put curly braces around the import?`,a),"default"in a||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
7
 
8
8
  Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))`,u),u.default;throw n._result}function A(){var n=P.H;return n===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
9
+ const MyComponent = lazy(() => import('./MyComponent'))`,a),a.default;throw n._result}function A(){var n=M.H;return n===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
10
  1. You might have mismatching versions of React and the renderer (such as React DOM)
11
11
  2. You might be breaking the Rules of Hooks
12
12
  3. You might have more than one copy of React in the same app
13
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),n}function Se(){P.asyncTransitions--}function ue(n){if(tt===null)try{var u=("require"+Math.random()).slice(0,7);tt=(st&&st[u]).call(st,"timers").setImmediate}catch{tt=function(h){An===!1&&(An=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var R=new MessageChannel;R.port1.onmessage=h,R.port2.postMessage(void 0)}}return tt(n)}function ae(n){return 1<n.length&&typeof AggregateError=="function"?new AggregateError(n):n[0]}function E(n,u){u!==nt-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),nt=u}function m(n,u,y){var h=P.actQueue;if(h!==null)if(h.length!==0)try{D(h),ue(function(){return m(n,u,y)});return}catch(R){P.thrownErrors.push(R)}else P.actQueue=null;0<P.thrownErrors.length?(h=ae(P.thrownErrors),P.thrownErrors.length=0,y(h)):u(n)}function D(n){if(!Ct){Ct=!0;var u=0;try{for(;u<n.length;u++){var y=n[u];do{P.didUsePromise=!1;var h=y(!1);if(h!==null){if(P.didUsePromise){n[u]=y,n.splice(0,u);return}y=h}else break}while(!0)}n.length=0}catch(R){n.splice(0,u+1),P.thrownErrors.push(R)}finally{Ct=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var O=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),_t=Symbol.for("react.fragment"),cn=Symbol.for("react.strict_mode"),ln=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),fn=Symbol.for("react.context"),dn=Symbol.for("react.forward_ref"),pn=Symbol.for("react.suspense"),so=Symbol.for("react.suspense_list"),At=Symbol.for("react.memo"),Ne=Symbol.for("react.lazy"),yn=Symbol.for("react.activity"),mn=Symbol.iterator,gn={},En={isMounted:function(){return!1},enqueueForceUpdate:function(n){r(n,"forceUpdate")},enqueueReplaceState:function(n){r(n,"replaceState")},enqueueSetState:function(n){r(n,"setState")}},vn=Object.assign,Lt={};Object.freeze(Lt),o.prototype.isReactComponent={},o.prototype.setState=function(n,u){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,u,"setState")},o.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};var re={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Ke in re)re.hasOwnProperty(Ke)&&e(Ke,re[Ke]);s.prototype=o.prototype,re=i.prototype=new s,re.constructor=i,vn(re,o.prototype),re.isPureReactComponent=!0;var hn=Array.isArray,io=Symbol.for("react.client.reference"),P={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},et=Object.prototype.hasOwnProperty,Tn=console.createTask?console.createTask:function(){return null};re={react_stack_bottom_frame:function(n){return n()}};var bn,Rn,Sn={},uo=re.react_stack_bottom_frame.bind(re,a)(),ao=Tn(b(a)),On=!1,_n=/\/+/g,wn=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},An=!1,tt=null,nt=0,rt=!1,Ct=!1,Ln=typeof queueMicrotask=="function"?function(n){queueMicrotask(function(){return queueMicrotask(n)})}:ue;re=Object.freeze({__proto__:null,c:function(n){return A().useMemoCache(n)}});var Ke={map:G,forEach:function(n,u,y){G(n,function(){u.apply(this,arguments)},y)},count:function(n){var u=0;return G(n,function(){u++}),u},toArray:function(n){return G(n,function(u){return u})||[]},only:function(n){if(!C(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};_.Activity=yn,_.Children=Ke,_.Component=o,_.Fragment=_t,_.Profiler=ln,_.PureComponent=i,_.StrictMode=cn,_.Suspense=pn,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,_.__COMPILER_RUNTIME=re,_.act=function(n){var u=P.actQueue,y=nt;nt++;var h=P.actQueue=u!==null?u:[],R=!1;try{var M=n()}catch(I){P.thrownErrors.push(I)}if(0<P.thrownErrors.length)throw E(u,y),n=ae(P.thrownErrors),P.thrownErrors.length=0,n;if(M!==null&&typeof M=="object"&&typeof M.then=="function"){var L=M;return Ln(function(){R||rt||(rt=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(I,de){R=!0,L.then(function(Le){if(E(u,y),y===0){try{D(h),ue(function(){return m(Le,I,de)})}catch(lo){P.thrownErrors.push(lo)}if(0<P.thrownErrors.length){var co=ae(P.thrownErrors);P.thrownErrors.length=0,de(co)}}else I(Le)},function(Le){E(u,y),0<P.thrownErrors.length&&(Le=ae(P.thrownErrors),P.thrownErrors.length=0),de(Le)})}}}var N=M;if(E(u,y),y===0&&(D(h),h.length!==0&&Ln(function(){R||rt||(rt=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),P.actQueue=null),0<P.thrownErrors.length)throw n=ae(P.thrownErrors),P.thrownErrors.length=0,n;return{then:function(I,de){R=!0,y===0?(P.actQueue=h,ue(function(){return m(N,I,de)})):I(N)}}},_.cache=function(n){return function(){return n.apply(null,arguments)}},_.cacheSignal=function(){return null},_.captureOwnerStack=function(){var n=P.getCurrentStack;return n===null?null:n()},_.cloneElement=function(n,u,y){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var h=vn({},n.props),R=n.key,M=n._owner;if(u!=null){var L;e:{if(et.call(u,"ref")&&(L=Object.getOwnPropertyDescriptor(u,"ref").get)&&L.isReactWarning){L=!1;break e}L=u.ref!==void 0}L&&(M=c()),g(u)&&(f(u.key),R=""+u.key);for(N in u)!et.call(u,N)||N==="key"||N==="__self"||N==="__source"||N==="ref"&&u.ref===void 0||(h[N]=u[N])}var N=arguments.length-2;if(N===1)h.children=y;else if(1<N){L=Array(N);for(var I=0;I<N;I++)L[I]=arguments[I+2];h.children=L}for(h=v(n.type,R,h,M,n._debugStack,n._debugTask),R=2;R<arguments.length;R++)x(arguments[R]);return h},_.createContext=function(n){return n={$$typeof:fn,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:wt,_context:n},n._currentRenderer=null,n._currentRenderer2=null,n},_.createElement=function(n,u,y){for(var h=2;h<arguments.length;h++)x(arguments[h]);h={};var R=null;if(u!=null)for(I in Rn||!("__self"in u)||"key"in u||(Rn=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),g(u)&&(f(u.key),R=""+u.key),u)et.call(u,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(h[I]=u[I]);var M=arguments.length-2;if(M===1)h.children=y;else if(1<M){for(var L=Array(M),N=0;N<M;N++)L[N]=arguments[N+2];Object.freeze&&Object.freeze(L),h.children=L}if(n&&n.defaultProps)for(I in M=n.defaultProps,M)h[I]===void 0&&(h[I]=M[I]);R&&S(h,typeof n=="function"?n.displayName||n.name||"Unknown":n);var I=1e4>P.recentlyCreatedOwnerStacks++;return v(n,R,h,c(),I?Error("react-stack-top-frame"):uo,I?Tn(b(n)):ao)},_.createRef=function(){var n={current:null};return Object.seal(n),n},_.forwardRef=function(n){n!=null&&n.$$typeof===At?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof n!="function"?console.error("forwardRef requires a render function but was given %s.",n===null?"null":typeof n):n.length!==0&&n.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",n.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),n!=null&&n.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var u={$$typeof:dn,render:n},y;return Object.defineProperty(u,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(h){y=h,n.name||n.displayName||(Object.defineProperty(n,"name",{value:h}),n.displayName=h)}}),u},_.isValidElement=C,_.lazy=function(n){n={_status:-1,_result:n};var u={$$typeof:Ne,_payload:n,_init:fe},y={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return n._ioInfo=y,u._debugInfo=[{awaited:y}],u},_.memo=function(n,u){n==null&&console.error("memo: The first argument must be a component. Instead received: %s",n===null?"null":typeof n),u={$$typeof:At,type:n,compare:u===void 0?null:u};var y;return Object.defineProperty(u,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(h){y=h,n.name||n.displayName||(Object.defineProperty(n,"name",{value:h}),n.displayName=h)}}),u},_.startTransition=function(n){var u=P.T,y={};y._updatedFibers=new Set,P.T=y;try{var h=n(),R=P.S;R!==null&&R(y,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&(P.asyncTransitions++,h.then(Se,Se),h.then(l,wn))}catch(M){wn(M)}finally{u===null&&y._updatedFibers&&(n=y._updatedFibers.size,y._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),u!==null&&y.types!==null&&(u.types!==null&&u.types!==y.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),u.types=y.types),P.T=u}},_.unstable_useCacheRefresh=function(){return A().useCacheRefresh()},_.use=function(n){return A().use(n)},_.useActionState=function(n,u,y){return A().useActionState(n,u,y)},_.useCallback=function(n,u){return A().useCallback(n,u)},_.useContext=function(n){var u=A();return n.$$typeof===wt&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),u.useContext(n)},_.useDebugValue=function(n,u){return A().useDebugValue(n,u)},_.useDeferredValue=function(n,u){return A().useDeferredValue(n,u)},_.useEffect=function(n,u){return n==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useEffect(n,u)},_.useEffectEvent=function(n){return A().useEffectEvent(n)},_.useId=function(){return A().useId()},_.useImperativeHandle=function(n,u,y){return A().useImperativeHandle(n,u,y)},_.useInsertionEffect=function(n,u){return n==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useInsertionEffect(n,u)},_.useLayoutEffect=function(n,u){return n==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useLayoutEffect(n,u)},_.useMemo=function(n,u){return A().useMemo(n,u)},_.useOptimistic=function(n,u){return A().useOptimistic(n,u)},_.useReducer=function(n,u,y){return A().useReducer(n,u,y)},_.useRef=function(n){return A().useRef(n)},_.useState=function(n){return A().useState(n)},_.useSyncExternalStore=function(n,u,y){return A().useSyncExternalStore(n,u,y)},_.useTransition=function(){return A().useTransition()},_.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var F=Ce((Gs,kt)=>{"use strict";process.env.NODE_ENV==="production"?kt.exports=Hn():kt.exports=Vn()});var qr=Ce(J=>{"use strict";var xs=F();function zr(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Re(){}var Z={d:{f:Re,r:function(){throw Error(zr(522))},D:Re,C:Re,L:Re,m:Re,X:Re,S:Re,M:Re},p:0,findDOMNode:null},Ds=Symbol.for("react.portal");function Us(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ds,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var Je=xs.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function St(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}J.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z;J.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(zr(299));return Us(e,t,null,r)};J.flushSync=function(e){var t=Je.T,r=Z.p;try{if(Je.T=null,Z.p=2,e)return e()}finally{Je.T=t,Z.p=r,Z.d.f()}};J.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Z.d.C(e,t))};J.prefetchDNS=function(e){typeof e=="string"&&Z.d.D(e)};J.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,o=St(r,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Z.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:s,fetchPriority:i}):r==="script"&&Z.d.X(e,{crossOrigin:o,integrity:s,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};J.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=St(t.as,t.crossOrigin);Z.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Z.d.M(e)};J.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,o=St(r,t.crossOrigin);Z.d.L(e,r,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};J.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=St(t.as,t.crossOrigin);Z.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Z.d.m(e)};J.requestFormReset=function(e){Z.d.r(e)};J.unstable_batchedUpdates=function(e,t){return e(t)};J.useFormState=function(e,t,r){return Je.H.useFormState(e,t,r)};J.useFormStatus=function(){return Je.H.useHostTransitionStatus()};J.version="19.2.0"});var Qr=Ce(ee=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(c){return""+c}function r(c,a,g){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(S);var T=!1}catch{T=!0}return T&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object"),t(S)),{$$typeof:p,key:S==null?null:""+S,children:c,containerInfo:a,implementation:g}}function o(c,a){if(c==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}function s(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":'something with type "'+typeof c+'"'}function i(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":typeof c=="string"?JSON.stringify(c):typeof c=="number"?"`"+c+"`":'something with type "'+typeof c+'"'}function l(){var c=b.H;return c===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
13
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),n}function Re(){M.asyncTransitions--}function ue(n){if(tt===null)try{var a=("require"+Math.random()).slice(0,7);tt=(st&&st[a]).call(st,"timers").setImmediate}catch{tt=function(h){An===!1&&(An=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var R=new MessageChannel;R.port1.onmessage=h,R.port2.postMessage(void 0)}}return tt(n)}function ae(n){return 1<n.length&&typeof AggregateError=="function"?new AggregateError(n):n[0]}function E(n,a){a!==nt-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),nt=a}function m(n,a,y){var h=M.actQueue;if(h!==null)if(h.length!==0)try{D(h),ue(function(){return m(n,a,y)});return}catch(R){M.thrownErrors.push(R)}else M.actQueue=null;0<M.thrownErrors.length?(h=ae(M.thrownErrors),M.thrownErrors.length=0,y(h)):a(n)}function D(n){if(!Ct){Ct=!0;var a=0;try{for(;a<n.length;a++){var y=n[a];do{M.didUsePromise=!1;var h=y(!1);if(h!==null){if(M.didUsePromise){n[a]=y,n.splice(0,a);return}y=h}else break}while(!0)}n.length=0}catch(R){n.splice(0,a+1),M.thrownErrors.push(R)}finally{Ct=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var O=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),_t=Symbol.for("react.fragment"),cn=Symbol.for("react.strict_mode"),ln=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),fn=Symbol.for("react.context"),dn=Symbol.for("react.forward_ref"),pn=Symbol.for("react.suspense"),so=Symbol.for("react.suspense_list"),At=Symbol.for("react.memo"),Ne=Symbol.for("react.lazy"),yn=Symbol.for("react.activity"),mn=Symbol.iterator,gn={},En={isMounted:function(){return!1},enqueueForceUpdate:function(n){r(n,"forceUpdate")},enqueueReplaceState:function(n){r(n,"replaceState")},enqueueSetState:function(n){r(n,"setState")}},vn=Object.assign,Lt={};Object.freeze(Lt),o.prototype.isReactComponent={},o.prototype.setState=function(n,a){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,a,"setState")},o.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};var re={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(Ke in re)re.hasOwnProperty(Ke)&&e(Ke,re[Ke]);s.prototype=o.prototype,re=i.prototype=new s,re.constructor=i,vn(re,o.prototype),re.isPureReactComponent=!0;var hn=Array.isArray,io=Symbol.for("react.client.reference"),M={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},et=Object.prototype.hasOwnProperty,Tn=console.createTask?console.createTask:function(){return null};re={react_stack_bottom_frame:function(n){return n()}};var bn,Rn,Sn={},uo=re.react_stack_bottom_frame.bind(re,u)(),ao=Tn(b(u)),On=!1,_n=/\/+/g,wn=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},An=!1,tt=null,nt=0,rt=!1,Ct=!1,Ln=typeof queueMicrotask=="function"?function(n){queueMicrotask(function(){return queueMicrotask(n)})}:ue;re=Object.freeze({__proto__:null,c:function(n){return A().useMemoCache(n)}});var Ke={map:G,forEach:function(n,a,y){G(n,function(){a.apply(this,arguments)},y)},count:function(n){var a=0;return G(n,function(){a++}),a},toArray:function(n){return G(n,function(a){return a})||[]},only:function(n){if(!P(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};_.Activity=yn,_.Children=Ke,_.Component=o,_.Fragment=_t,_.Profiler=ln,_.PureComponent=i,_.StrictMode=cn,_.Suspense=pn,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,_.__COMPILER_RUNTIME=re,_.act=function(n){var a=M.actQueue,y=nt;nt++;var h=M.actQueue=a!==null?a:[],R=!1;try{var I=n()}catch(x){M.thrownErrors.push(x)}if(0<M.thrownErrors.length)throw E(a,y),n=ae(M.thrownErrors),M.thrownErrors.length=0,n;if(I!==null&&typeof I=="object"&&typeof I.then=="function"){var L=I;return Ln(function(){R||rt||(rt=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(x,de){R=!0,L.then(function(Le){if(E(a,y),y===0){try{D(h),ue(function(){return m(Le,x,de)})}catch(lo){M.thrownErrors.push(lo)}if(0<M.thrownErrors.length){var co=ae(M.thrownErrors);M.thrownErrors.length=0,de(co)}}else x(Le)},function(Le){E(a,y),0<M.thrownErrors.length&&(Le=ae(M.thrownErrors),M.thrownErrors.length=0),de(Le)})}}}var N=I;if(E(a,y),y===0&&(D(h),h.length!==0&&Ln(function(){R||rt||(rt=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),M.actQueue=null),0<M.thrownErrors.length)throw n=ae(M.thrownErrors),M.thrownErrors.length=0,n;return{then:function(x,de){R=!0,y===0?(M.actQueue=h,ue(function(){return m(N,x,de)})):x(N)}}},_.cache=function(n){return function(){return n.apply(null,arguments)}},_.cacheSignal=function(){return null},_.captureOwnerStack=function(){var n=M.getCurrentStack;return n===null?null:n()},_.cloneElement=function(n,a,y){if(n==null)throw Error("The argument must be a React element, but you passed "+n+".");var h=vn({},n.props),R=n.key,I=n._owner;if(a!=null){var L;e:{if(et.call(a,"ref")&&(L=Object.getOwnPropertyDescriptor(a,"ref").get)&&L.isReactWarning){L=!1;break e}L=a.ref!==void 0}L&&(I=c()),g(a)&&(f(a.key),R=""+a.key);for(N in a)!et.call(a,N)||N==="key"||N==="__self"||N==="__source"||N==="ref"&&a.ref===void 0||(h[N]=a[N])}var N=arguments.length-2;if(N===1)h.children=y;else if(1<N){L=Array(N);for(var x=0;x<N;x++)L[x]=arguments[x+2];h.children=L}for(h=v(n.type,R,h,I,n._debugStack,n._debugTask),R=2;R<arguments.length;R++)C(arguments[R]);return h},_.createContext=function(n){return n={$$typeof:fn,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:wt,_context:n},n._currentRenderer=null,n._currentRenderer2=null,n},_.createElement=function(n,a,y){for(var h=2;h<arguments.length;h++)C(arguments[h]);h={};var R=null;if(a!=null)for(x in Rn||!("__self"in a)||"key"in a||(Rn=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),g(a)&&(f(a.key),R=""+a.key),a)et.call(a,x)&&x!=="key"&&x!=="__self"&&x!=="__source"&&(h[x]=a[x]);var I=arguments.length-2;if(I===1)h.children=y;else if(1<I){for(var L=Array(I),N=0;N<I;N++)L[N]=arguments[N+2];Object.freeze&&Object.freeze(L),h.children=L}if(n&&n.defaultProps)for(x in I=n.defaultProps,I)h[x]===void 0&&(h[x]=I[x]);R&&S(h,typeof n=="function"?n.displayName||n.name||"Unknown":n);var x=1e4>M.recentlyCreatedOwnerStacks++;return v(n,R,h,c(),x?Error("react-stack-top-frame"):uo,x?Tn(b(n)):ao)},_.createRef=function(){var n={current:null};return Object.seal(n),n},_.forwardRef=function(n){n!=null&&n.$$typeof===At?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof n!="function"?console.error("forwardRef requires a render function but was given %s.",n===null?"null":typeof n):n.length!==0&&n.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",n.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),n!=null&&n.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var a={$$typeof:dn,render:n},y;return Object.defineProperty(a,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(h){y=h,n.name||n.displayName||(Object.defineProperty(n,"name",{value:h}),n.displayName=h)}}),a},_.isValidElement=P,_.lazy=function(n){n={_status:-1,_result:n};var a={$$typeof:Ne,_payload:n,_init:fe},y={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return n._ioInfo=y,a._debugInfo=[{awaited:y}],a},_.memo=function(n,a){n==null&&console.error("memo: The first argument must be a component. Instead received: %s",n===null?"null":typeof n),a={$$typeof:At,type:n,compare:a===void 0?null:a};var y;return Object.defineProperty(a,"displayName",{enumerable:!1,configurable:!0,get:function(){return y},set:function(h){y=h,n.name||n.displayName||(Object.defineProperty(n,"name",{value:h}),n.displayName=h)}}),a},_.startTransition=function(n){var a=M.T,y={};y._updatedFibers=new Set,M.T=y;try{var h=n(),R=M.S;R!==null&&R(y,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&(M.asyncTransitions++,h.then(Re,Re),h.then(l,wn))}catch(I){wn(I)}finally{a===null&&y._updatedFibers&&(n=y._updatedFibers.size,y._updatedFibers.clear(),10<n&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),a!==null&&y.types!==null&&(a.types!==null&&a.types!==y.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),a.types=y.types),M.T=a}},_.unstable_useCacheRefresh=function(){return A().useCacheRefresh()},_.use=function(n){return A().use(n)},_.useActionState=function(n,a,y){return A().useActionState(n,a,y)},_.useCallback=function(n,a){return A().useCallback(n,a)},_.useContext=function(n){var a=A();return n.$$typeof===wt&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),a.useContext(n)},_.useDebugValue=function(n,a){return A().useDebugValue(n,a)},_.useDeferredValue=function(n,a){return A().useDeferredValue(n,a)},_.useEffect=function(n,a){return n==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useEffect(n,a)},_.useEffectEvent=function(n){return A().useEffectEvent(n)},_.useId=function(){return A().useId()},_.useImperativeHandle=function(n,a,y){return A().useImperativeHandle(n,a,y)},_.useInsertionEffect=function(n,a){return n==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useInsertionEffect(n,a)},_.useLayoutEffect=function(n,a){return n==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),A().useLayoutEffect(n,a)},_.useMemo=function(n,a){return A().useMemo(n,a)},_.useOptimistic=function(n,a){return A().useOptimistic(n,a)},_.useReducer=function(n,a,y){return A().useReducer(n,a,y)},_.useRef=function(n){return A().useRef(n)},_.useState=function(n){return A().useState(n)},_.useSyncExternalStore=function(n,a,y){return A().useSyncExternalStore(n,a,y)},_.useTransition=function(){return A().useTransition()},_.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var F=Ce((Gs,kt)=>{"use strict";process.env.NODE_ENV==="production"?kt.exports=Hn():kt.exports=Vn()});var qr=Ce(J=>{"use strict";var xs=F();function zr(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function be(){}var Z={d:{f:be,r:function(){throw Error(zr(522))},D:be,C:be,L:be,m:be,X:be,S:be,M:be},p:0,findDOMNode:null},Ds=Symbol.for("react.portal");function Us(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ds,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var Je=xs.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function St(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}J.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z;J.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(zr(299));return Us(e,t,null,r)};J.flushSync=function(e){var t=Je.T,r=Z.p;try{if(Je.T=null,Z.p=2,e)return e()}finally{Je.T=t,Z.p=r,Z.d.f()}};J.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Z.d.C(e,t))};J.prefetchDNS=function(e){typeof e=="string"&&Z.d.D(e)};J.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,o=St(r,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Z.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:s,fetchPriority:i}):r==="script"&&Z.d.X(e,{crossOrigin:o,integrity:s,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};J.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=St(t.as,t.crossOrigin);Z.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Z.d.M(e)};J.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,o=St(r,t.crossOrigin);Z.d.L(e,r,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};J.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=St(t.as,t.crossOrigin);Z.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Z.d.m(e)};J.requestFormReset=function(e){Z.d.r(e)};J.unstable_batchedUpdates=function(e,t){return e(t)};J.useFormState=function(e,t,r){return Je.H.useFormState(e,t,r)};J.useFormStatus=function(){return Je.H.useHostTransitionStatus()};J.version="19.2.0"});var Qr=Ce(ee=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(c){return""+c}function r(c,u,g){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(S);var T=!1}catch{T=!0}return T&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object"),t(S)),{$$typeof:p,key:S==null?null:""+S,children:c,containerInfo:u,implementation:g}}function o(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}function s(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":'something with type "'+typeof c+'"'}function i(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":typeof c=="string"?JSON.stringify(c):typeof c=="number"?"`"+c+"`":'something with type "'+typeof c+'"'}function l(){var c=b.H;return c===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
14
14
  1. You might have mismatching versions of React and the renderer (such as React DOM)
15
15
  2. You might be breaking the Rules of Hooks
16
16
  3. You might have more than one copy of React in the same app
17
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=F(),f={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},p=Symbol.for("react.portal"),b=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ee.createPortal=function(c,a){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,a,null,g)},ee.flushSync=function(c){var a=b.T,g=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=a,f.p=g,f.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ee.preconnect=function(c,a){typeof c=="string"&&c?a!=null&&typeof a!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",i(a)):a!=null&&typeof a.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",s(a.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,f.d.C(c,a))},ee.prefetchDNS=function(c){if(typeof c!="string"||!c)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c));else if(1<arguments.length){var a=arguments[1];typeof a=="object"&&a.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(a))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,a){if(typeof c=="string"&&c?a==null||typeof a!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",i(a)):a.as!=="style"&&a.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',i(a.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&a&&typeof a.as=="string"){var g=a.as,S=o(g,a.crossOrigin),T=typeof a.integrity=="string"?a.integrity:void 0,v=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;g==="style"?f.d.S(c,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:v}):g==="script"&&f.d.X(c,{crossOrigin:S,integrity:T,fetchPriority:v,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},ee.preinitModule=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&a.as!=="script"&&(g+=" The `as` option encountered was "+i(a.as)+"."),g)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",g);else switch(g=a&&typeof a.as=="string"?a.as:"script",g){case"script":break;default:g=i(g),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',g,c)}typeof c=="string"&&(typeof a=="object"&&a!==null?(a.as==null||a.as==="script")&&(g=o(a.as,a.crossOrigin),f.d.M(c,{crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})):a==null&&f.d.M(c))},ee.preload=function(c,a){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a==null||typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":typeof a.as=="string"&&a.as||(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',g),typeof c=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){g=a.as;var S=o(g,a.crossOrigin);f.d.L(c,g,{crossOrigin:S,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},ee.preloadModule=function(c,a){var g="";typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),a!==void 0&&typeof a!="object"?g+=" The `options` argument encountered was "+s(a)+".":a&&"as"in a&&typeof a.as!="string"&&(g+=" The `as` option encountered was "+s(a.as)+"."),g&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',g),typeof c=="string"&&(a?(g=o(a.as,a.crossOrigin),f.d.m(c,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:g,integrity:typeof a.integrity=="string"?a.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,a){return c(a)},ee.useFormState=function(c,a,g){return l().useFormState(c,a,g)},ee.useFormStatus=function(){return l().useHostTransitionStatus()},ee.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Zr=Ce((ba,on)=>{"use strict";function Xr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Xr(),on.exports=qr()):on.exports=Qr()});var it=K(F(),1);function Ie(...e){if(e.length===0)return{};if(e.length===1)return typeof e[0]=="object"&&e[0]!==null?e[0]:{};let t={},r={};for(let o of e)if(!(typeof o!="object"||o===null)){for(let s in o)if(Object.hasOwn(o,s)){if(s==="children")continue;let i=o[s];s.startsWith("on")&&typeof i=="function"?(r[s]??=[],r[s].push(i)):t[s]=i}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let i of r[o])i?.(...s)});for(let o=e.length-1;o>=0;o--){let s=e[o];if(typeof s=="object"&&s!==null&&"children"in s){t.children=s.children;break}}return t}function Do({props:e,ref:t,context:r}){let o=Nt({context:r,slot:e.slot})||{},{ref:s=null,...i}=o,l=(0,it.useRef)(null),d=(0,it.useCallback)(p=>{l.current=p,typeof t=="function"?t(p):t&&(t.current=p),typeof s=="function"?s(p):s&&typeof s=="object"&&(s.current=p)},[t,s]),f=Ie(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof i.style=="function"?i.style(p):i.style,c={...p.defaultStyle,...b},a=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...a}}:f.style={...i.style,...e.style}),[f,d]}var se=K(F(),1);function Uo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:i=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[a,g]=(0,se.useState)(null),S=(0,se.useRef)(!1),T=(0,se.useRef)(null),v=Oe(x=>{let C=x[0],B=C.isIntersecting,U={isIntersecting:C.isIntersecting,intersectionRatio:C.intersectionRatio,intersectionRect:C.intersectionRect,boundingClientRect:C.boundingClientRect,rootBounds:C.rootBounds,time:C.time};g(U),c(Y=>l&&S.current?!0:B&&l?(S.current=!0,Y!==!0&&d&&d(!0),!0):Y!==B?(d&&d(B),B):Y)}),k=(0,se.useCallback)(x=>{p(x)},[]);return(0,se.useEffect)(()=>{if(!i||!f)return;let x;return t===!0?x=[0,.1,.25,.5,.75,1]:typeof t=="string"?x=.01:x=r,T.current=new IntersectionObserver(v,{root:s,rootMargin:o,threshold:x}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[i,f,s,o,r,t]),[k,b,a]}var yt=K(F(),1);var Fo=Object.defineProperty,ut=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},xe={};ut(xe,{ARIA_ATTRIBUTES:()=>jn,HTML_TAGS:()=>Wn,PRIMITIVE_TAGS:()=>Bn,default:()=>ko});var jn=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],ko={ARIA_ATTRIBUTES:jn,PRIMITIVE_TAGS:Bn,HTML_TAGS:Wn},No={};ut(No,{NUMERIC_DIGITS:()=>Gn,default:()=>Ko});var Gn=["1","2","3","4","5","6","7","8","9","0"],Ko={NUMERIC_DIGITS:Gn},Ho={};ut(Ho,{AMPERSAND:()=>tr,ASTERISK:()=>rr,BACKSLASH:()=>yr,BOM:()=>Yn,CARRIAGE_RETURN:()=>qn,COLON:()=>ar,COMMA:()=>sr,COMMERCIAL_AT:()=>dr,DOT:()=>ur,DOUBLE_QUOTE:()=>Zn,EXCLAMATION:()=>Xn,GRAVE_ACCENT:()=>gr,GREATER_THAN:()=>lr,LEFT_CURLY_BRACKET:()=>Er,LEFT_SQUARE_BRACKET:()=>pr,LINE_FEED:()=>zn,MINUS:()=>ir,PERCENT:()=>er,PLUS:()=>or,QUESTION:()=>fr,RIGHT_CURLY_BRACKET:()=>hr,RIGHT_SQUARE_BRACKET:()=>mr,SHARP:()=>Jn,SINGLE_QUOTE:()=>nr,SMALLER_THAN:()=>cr,SPACE:()=>Qn,TAB:()=>$n,VERTICAL_LINE:()=>vr,default:()=>Vo});var Yn=65279,$n=9,zn=10,qn=13,Qn=32,Xn=33,Zn=34,Jn=35,er=37,tr=38,nr=39,rr=42,or=43,sr=44,ir=45,ur=46,ar=58,cr=60,lr=62,fr=63,dr=64,pr=91,yr=92,mr=93,gr=96,Er=123,vr=124,hr=125,Vo={BOM:Yn,TAB:$n,LINE_FEED:zn,CARRIAGE_RETURN:qn,SPACE:Qn,EXCLAMATION:Xn,DOUBLE_QUOTE:Zn,SHARP:Jn,PERCENT:er,AMPERSAND:tr,SINGLE_QUOTE:nr,ASTERISK:rr,PLUS:or,COMMA:sr,MINUS:ir,DOT:ur,COLON:ar,SMALLER_THAN:cr,GREATER_THAN:lr,QUESTION:fr,COMMERCIAL_AT:dr,LEFT_SQUARE_BRACKET:pr,BACKSLASH:yr,RIGHT_SQUARE_BRACKET:mr,GRAVE_ACCENT:gr,LEFT_CURLY_BRACKET:Er,VERTICAL_LINE:vr,RIGHT_CURLY_BRACKET:hr},jo={};ut(jo,{CAPITALIZED:()=>Tr,LOWERCASE:()=>br,VOWELS:()=>Rr,default:()=>Bo});var Tr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],br=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],Rr=["A","E","I","O","U","a","e","i","o","u"],Bo={CAPITALIZED:Tr,LOWERCASE:br,VOWELS:Rr};function Wo(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var at=()=>Wo(/^Mac/i);function Sr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Go=()=>Sr(/^iPhone/i),Yo=()=>Sr(/^iPad/i)||at()&&navigator.maxTouchPoints>1,Kt=()=>Go()||Yo();function ct(e){return at()?e.metaKey??!1:e.ctrlKey??!1}function q(e){if(e?.ownerDocument)return e.ownerDocument;if(typeof document<"u")return document;throw new Error("getOwnerDocument called in an environment without document")}function ye(e){return e&&"window"in e&&e.window===e?e:q(e).defaultView||(typeof window<"u"?window:void 0)}var lt=null;function $o(){if(lt==null){lt=!1;try{if(typeof document>"u")return!1;document.createElement("div").focus({get preventScroll(){return lt=!0,!0}})}catch{}}return lt}function _r(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<i.top,f=l.bottom>i.bottom,p=l.left<i.left,b=l.right>i.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-i.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-i.bottom);else if(o==="center"){let a=i.top+i.height/2,g=l.top+l.height/2;c=e.scrollTop+(g-a)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-i.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-i.right);else if(s==="center"){let a=i.left+i.width/2,g=l.left+l.width/2;c=e.scrollLeft+(g-a)}e.scrollLeft=c}}function zo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ft(e,t,r=!0){if(!e||!t)return!1;if(!r)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o instanceof Element&&o.tagName==="SLOT"&&o.assignedSlot?o.assignedSlot.parentNode:zo(o)?o.host:o.parentNode}return!1}var me=(e,t=!0)=>{if(e||(e=typeof document<"u"?document:void 0),!e)return null;if(!t)return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&r.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;return r};function dt(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Be(e){if($o())e.focus({preventScroll:!0});else{let t=qo(e);e.focus();for(let{element:r,scrollTop:o,scrollLeft:s}of t)r.scrollTop=o,r.scrollLeft=s}}function qo(e){let t=e.parentNode,r=Array.from({length:0}),o=typeof document<"u"?document.scrollingElement||document.documentElement:null;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return o instanceof HTMLElement&&r.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),r}var wr="necto-style",Or=new WeakMap;function Qo(e){let t=Or.get(e);return t||(t=new Map,Or.set(e,t)),t}function Xo(e,t={}){let{id:r=wr,insertionPoint:o}=t,s=o?q(o):typeof document<"u"?document:void 0;if(!s)throw new Error("createStyleElement called without document");let i=s.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("necto-style-id",r),i.textContent=e,o?s.head.insertBefore(i,o):s.head.appendChild(i),i}function Ar(e,t={}){let{id:r=wr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let i=Qo(o),l=`${r}:${e}`,d=i.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:Xo(e,{id:r,insertionPoint:s}),count:1},i.set(l,d)),()=>{let f=i.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,i.delete(l)))}}var pe=new Map,Vt=new Set;function Zo(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);t||(t=new Set,pe.set(e.target,t),e.target.addEventListener("transitioncancel",Wt,{once:!0})),t.add(e.propertyName)}function Wt(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Wt),pe.delete(e.target)),pe.size===0)){for(let r of Vt)r();Vt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",Zo),t.addEventListener("transitionend",Wt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Gt(e){requestAnimationFrame(()=>{for(let[t]of pe)"isConnected"in t&&!t.isConnected&&pe.delete(t);pe.size===0?e():Vt.add(e)})}var le,Ht=()=>xe.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),si=new Proxy({},{get:(e,t,r)=>(le||(le=Ht()),Reflect.get(le,t,r)),ownKeys:()=>(le||(le=Ht()),Reflect.ownKeys(le)),getOwnPropertyDescriptor:(e,t)=>(le||(le=Ht()),Object.getOwnPropertyDescriptor(le,t))}),jt="",De="default",He=new WeakMap;function pt(e){if(Kt()){if(De==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(jt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",De="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";He.has(e)||(He.set(e,t[r]??""),t[r]="none")}}function ge(e){if(Kt()){if(De!=="disabled")return;De="restoring",setTimeout(()=>{Gt(()=>{if(De==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=jt||""),jt="",De="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&He.has(e)){let t=He.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),He.delete(e)}}var Ve,Bt,Lr,je=()=>{Ve||(Ve=xe.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Bt=xe.ARIA_ATTRIBUTES,Lr=new Set(Bt))},W=new Proxy({},{get:(e,t,r)=>(je(),Reflect.get(Ve,t,r)),ownKeys:()=>(je(),Reflect.ownKeys(Ve)),getOwnPropertyDescriptor:(e,t)=>(je(),Object.getOwnPropertyDescriptor(Ve,t))}),ai=new Proxy([],{get:(e,t,r)=>(je(),Reflect.get(Bt,t,r))}),ci=new Proxy(new Set,{get:(e,t,r)=>(je(),Reflect.get(Lr,t,r))});function We(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,i=(0,yt.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,yt.useCallback)(p=>{p.target===p.currentTarget&&i(!1,p)},[i]),d=Ge({onBlur:l}),f=(0,yt.useCallback)(p=>{let b=q(p.target),c=b?me(b):me();p.target===p.currentTarget&&c===dt(p.nativeEvent)&&(i(!0,p),d(p))},[i,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var mt=K(F(),1);function Jo(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:i}=We(e),{keyboardProps:l}=Yt(e),d=(0,mt.useRef)(r),f=q(t.current),p=me(f);(0,mt.useEffect)(()=>{if(d.current&&t.current)if(Ye()==="virtual"){let c=p;Gt(()=>{me(f)===c&&t.current?.isConnected&&Be(t.current)})}else Be(t.current);d.current=!1},[t]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Ie(i??{},l,{tabIndex:b})}}var Ee=K(F(),1);var es=null;function ts(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,Ee.useRef)({isFocused:o,isFocusVisible:o||es!=="pointer"}),[i,l]=(0,Ee.useState)(o),[d,f]=(0,Ee.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,Ee.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,Ee.useCallback)(g=>{s.current.isFocused=g,l(g),p()},[p]);$e({fn:g=>{s.current.isFocusVisible=g,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=We({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:a={}}=$t({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:i,isFocusVisible:d,focusProps:t?a:c}}var Cr=K(F(),1);function ns(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Cr.useState)(r||Ye()!=="pointer");return $e({fn:i=>s(i),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Ue=new Map,gt=new Set,Pr=!1,zt=null,Mr=!1,Q={get hasEventBeforeFocus(){return Pr},set hasEventBeforeFocus(e){Pr=e},get hasBlurredWindowRecently(){return Mr},set hasBlurredWindowRecently(e){Mr=e},get currentModality(){return zt},set currentModality(e){zt=e}};function Ye(){return zt}var vs={},Et=Object.create(null),ze=e=>globalThis.process?.env||vs.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Et:globalThis),ve=new Proxy(Et,{get(e,t){return ze()[t]??Et[t]},has(e,t){let r=ze();return t in r||t in Et},set(e,t,r){let o=ze(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=ze(!0);return delete r[t],!0},ownKeys(){let e=ze(!0);return Object.keys(e)}}),xr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rs=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function os(){if(globalThis.process?.env)for(let e of rs){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Dr=os(),xi=Dr.name;function _e(e){return e?e!=="false":!1}var qt=globalThis.process?.platform||"",Ur=_e(ve.CI)||Dr.ci!==!1,Fr=_e(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Di=_e(ve.DEBUG),we=xr==="test"||_e(ve.TEST),kr=xr==="production";var Ui=_e(ve.MINIMAL)||Ur||we||!Fr,ss=/^win/i.test(qt),Fi=/^linux/i.test(qt),Nr=/^darwin/i.test(qt),ki=!_e(ve.NO_COLOR)&&(_e(ve.FORCE_COLOR)||(Fr||ss)&&ve.TERM!=="dumb"||Ur),is=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Ni=Number(is?.split(".")[0])||null,us=globalThis.process||Object.create(null),Ir={versions:{}},Ki=new Proxy(us,{get(e,t){if(t==="env")return ve;if(t in e)return e[t];if(t in Ir)return Ir[t]}}),as=globalThis.process?.release?.name==="node",cs=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ls=!!globalThis.Deno,fs=!!globalThis.fastly,ds=!!globalThis.Netlify,ps=!!globalThis.EdgeRuntime,ys=globalThis.navigator?.userAgent==="Cloudflare-Workers",ms=[[ds,"netlify"],[ps,"edge-light"],[ys,"workerd"],[fs,"fastly"],[ls,"deno"],[cs,"bun"],[as,"node"]];function gs(){let e=ms.find(t=>t[0]);if(e)return{name:e[1]}}var Es=gs(),Hi=Es?.name||"";var Hr=K(F(),1);function Qt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&kr?console.error("stopPropagation is now the default behavior for events in Necto. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function vt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var hs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Ts={Tab:!0,Escape:!0};function Kr(e,t,r){if(!r||!("target"in r)||!r.target)return!1;let o=q(r.target),s=ye(r.target),i=typeof window<"u"?s.HTMLInputElement:HTMLInputElement,l=typeof window<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,d=typeof window<"u"?s.HTMLElement:HTMLElement,f=typeof window<"u"?s.KeyboardEvent:KeyboardEvent,p=o.activeElement;return e=e||p instanceof i&&!hs.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!Ts[r.key])}function Zt(e,t){gt.forEach(r=>r(e,t))}function bs(e){return!(e.metaKey||Nr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Vr(e){bs(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",Zt("keyboard",e))}function Xt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",Zt("pointer",e))}function jr(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",Zt("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function Br(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function Rs(e){let t=ye(e),r=q(e);if(typeof window>"u"||typeof document>"u"||Ue.has(t))return;let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(...s){Q.hasEventBeforeFocus=!0,o.apply(this,s)},r.addEventListener("keydown",Vr,!0),r.addEventListener("click",Xt,!0),t.addEventListener("focus",jr,!0),t.addEventListener("blur",Br,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Xt,!0),Ue.set(t,{focus:o})}function Ss(e){let t=ye(e),r=q(e);if(!Ue.has(t))return;let{focus:o}=Ue.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("click",Xt,!0),t.removeEventListener("focus",jr,!0),t.removeEventListener("blur",Br,!1),Ue.delete(t)}function $e(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(Rs(),(0,Hr.useEffect)(()=>{let s=(i,l)=>{Kr(!!o?.isTextInput,i,l)&&t(Q.currentModality!=="pointer")};return gt.add(s),()=>{gt.delete(s),Ss()}},r))}var qe=K(F(),1);function $t(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,i=(0,qe.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=Qe(),f=(0,qe.useCallback)(c=>{c.currentTarget.contains(c.target)&&i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=Ge({onBlur:f}),b=(0,qe.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let a=q(c.target),g=me(a);if(!i.current.isFocusWithin&&g===dt(c.nativeEvent)){r&&r(c),s&&s(!0),i.current.isFocusWithin=!0,p(c);let S=c.currentTarget;l(a,"focus",T=>{if(i.current.isFocusWithin&&!ft(S,T.target)&&a.defaultView&&typeof a.defaultView.FocusEvent=="function"){let v=new a.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(v,"target",{value:S}),Object.defineProperty(v,"currentTarget",{value:S});let k=vt(v);f(k)}},{capture:!0})}},[r,s,p,l,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:f}}}var he=K(F(),1);function Qe(){let e=(0,he.useRef)(new Map),t=(0,he.useCallback)((s,i,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:i,eventTarget:s,options:d}),s.addEventListener(i,f,d)},[]),r=(0,he.useCallback)((s,i,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(i,p,d),e.current.delete(l)},[]),o=(0,he.useCallback)(()=>{e.current.forEach((s,i)=>{s.eventTarget.removeEventListener(s.type,i,s.options)}),e.current.clear()},[]);return(0,he.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(F(),1);function Os(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[i,l]=(0,te.useState)(!1),d=(0,te.useRef)({hoverCount:0,ignoreEmulated:!1}),f=(0,te.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:p,removeAllGlobalListeners:b}=Qe(),c=(0,te.useCallback)(()=>{d.current.ignoreEmulated=!0,setTimeout(()=>{d.current.ignoreEmulated=!1},50)},[]);(0,te.useEffect)(()=>{let T=k=>{k.pointerType==="touch"&&c()};if(typeof document>"u")return;let v=d.current;return v.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",T):we&&document.addEventListener("touchend",c),()=>{v.hoverCount--,v.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):we&&document.removeEventListener("touchend",c))}},[c]);let a=(0,te.useCallback)((T,v)=>{s||v==="touch"||f.isHovered||!(T.currentTarget&&T.currentTarget.contains(T.target))||(f.isHovered=!0,f.pointerType=v,f.target=T.currentTarget,p(q(T.target instanceof Element?T.target:null),"pointerover",k=>{f.isHovered&&f.target&&!ft(f.target,k.target)&&g(k,k.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:v}),r?.(!0),l(!0))},[s,t,r,p,f]),g=(0,te.useCallback)((T,v)=>{v==="touch"||!f.isHovered||!f.target||(f.isHovered=!1,f.pointerType="",f.target=null,b(),o?.({type:"hoverend",target:T.currentTarget,pointerType:v}),r?.(!1),l(!1))},[o,r,b,f.target,f]),S=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=v=>{d.current.ignoreEmulated&&v.pointerType==="mouse"||a(v,v.pointerType)},T.onPointerLeave=v=>{!s&&v.currentTarget instanceof Element&&v.currentTarget.contains(v.target)&&g(v,v.pointerType)}):we&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=v=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&a(v.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&g(v.nativeEvent,"mouse")}),T},[s,a,g,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&g({currentTarget:f.target},f.pointerType)},[s,g,f.isHovered,f.pointerType,f.target]),{hoverProps:S,isHovered:i}}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Xe=new Map,Ze=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{Xe.delete(e)}):null;var oe=K(F(),1);function _s(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),i=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++Jt.current);return`${we?t:`${t}${Jt.prefix}`}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=Xe.get(d)||[],p={current:i.current};f.some(b=>b===p)||Xe.set(d,[...f,p])}return Ze&&Ze.register(l.current,d),()=>{Ze&&Ze.unregister(l.current),Xe.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=i.current;f&&(s(f),i.current=null)},[]),d}function Yt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Qt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Qt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var Te=K(F(),1);function en(e={}){let{type:t="function"}=e,r=(0,Te.useRef)(!1),[o,s]=(0,Te.useState)(!1),i=(0,Te.useCallback)(()=>r.current,[]);return(0,Te.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:i}var V=K(F(),1);function X(e,t,r){return{type:e,pointerType:t,target:r.currentTarget??r.target,shiftKey:r.shiftKey,ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey}}function ws(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:i,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,a]=(0,V.useState)(!1),g=(0,V.useRef)(!1),S=(0,V.useRef)(null),T=(0,V.useRef)(!1),v=(0,V.useCallback)(E=>{c!==E&&(a(E),f?.(E))},[c,f]),k=(0,V.useCallback)(E=>{if(!T.current)return;let m=S.current&&S.current instanceof Node&&E.target instanceof Node&&S.current.contains(E.target);if(T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current),E.target){let D={...X("pressend","mouse",E),target:E.target};d?.(D),p?.(D),m&&i?.(D)}},[d,p,i,v,o]),x=(0,V.useCallback)(E=>{if(t||E.button!==0||g.current)return;r&&E.preventDefault(),o||pt(E.currentTarget),T.current=!0,S.current=E.currentTarget,v(!0);let m=X("pressstart","mouse",E);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,v,k]),C=(0,V.useCallback)(E=>{if(t||E.button!==0||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","mouse",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","mouse",E))},[t,i,d,p,v,o]),B=(0,V.useCallback)(E=>{c&&(v(!1),d?.(X("pressend","mouse",E)),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget))},[c,v,d,o]),U=(0,V.useCallback)(E=>{T.current&&!c&&(v(!0),l?.(X("pressstart","mouse",E)))},[c,l,v]),Y=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m),p?.(m)},[d,p,v,o]),j=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&ge(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m)},[d,v,o]),G=(0,V.useCallback)(E=>{t||(o||pt(E.currentTarget),g.current=!0,setTimeout(()=>{g.current=!1},100),T.current=!0,S.current=E.currentTarget,v(!0),l?.(X("pressstart","touch",E)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",j,{once:!0}))},[t,l,v,o,Y,j]),fe=(0,V.useCallback)(E=>{if(t||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&ge(E.currentTarget);let m=X("pressend","touch",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","touch",E))},[t,i,d,p,v,o]),A=(0,V.useCallback)(E=>{if(t)return;(E.key==="Enter"||E.key===" ")&&!c&&(E.key===" "&&E.preventDefault(),o||pt(),v(!0),T.current=!0,l?.(X("pressstart","keyboard",E)))},[t,c,l,v,o]),Se=(0,V.useCallback)(E=>{if(t)return;if((E.key==="Enter"||E.key===" ")&&c){v(!1),T.current=!1,o||ge();let D=X("pressend","keyboard",E);d?.(D),p?.(X("pressup","keyboard",E)),i?.(X("press","keyboard",E))}},[t,c,i,d,p,v,o]),ue=(0,V.useCallback)(E=>{if(t){E.preventDefault();return}g.current||b?.(E)},[t,b]);(0,V.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",j)},[k,Y,j]);let ae=(0,V.useMemo)(()=>({onMouseDown:x,onMouseUp:C,onMouseLeave:B,onMouseEnter:U,onTouchStart:G,onTouchEnd:fe,onKeyDown:A,onKeyUp:Se,onClick:ue}),[x,C,B,U,G,fe,A,Se,ue]);return(0,V.useEffect)(()=>{let E=s?.current;E&&E instanceof ye(E).Element&&ye(E).getComputedStyle(E).touchAction==="auto"&&(E.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Wr=K(F(),1);function As(e){let{style:t,values:r,children:o,className:s,defaultStyle:i,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Wr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:i||{}}):{...i,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,i,r])}var Gr=K(F(),1);function Nt(e){let{context:t,slot:r}=e,o=(0,Gr.useContext)(t);if(r===null)return null;if(o&&typeof o=="object"&&"slots"in o&&o.slots){let s=r||Symbol("default");if(!o.slots[s]){let i=new Intl.ListFormat().format(Object.keys(o.slots).map(d=>`"${d}"`)),l=r?`Invalid slot name: "${r}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${l} Valid slot names are ${i}.`)}return o.slots[s]}return o}var Fe=K(F(),1);function Ge(e){let{onBlur:t}=e,r=(0,Fe.useRef)({isFocused:!1,observer:null});(0,Fe.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Oe(s=>{t?.(s)});return(0,Fe.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let i=s.target,l=d=>{if(r.current.isFocused=!1,i.disabled){let f=vt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};i.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&i.disabled){r.current.observer?.disconnect();let d=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var be=K(F(),1);function Oe(e){let t=(0,be.useRef)(e);return(typeof window<"u"?be.useLayoutEffect:be.useEffect)(()=>{t.current=e},[e]),(0,be.useCallback)(((...r)=>t.current(...r)),[])}var ht=K(F(),1);function Yu(e){let t=en(),[r,o]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var Ae=K(F(),1);function Ls(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,i]=(0,Ae.useState)(!1),l=(0,Ae.useRef)(null),d=(0,Ae.useRef)(null),f=Oe(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let a=l.current===document.body?window.innerWidth:l.current.offsetWidth,g=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,S=a-l.current.scrollWidth;l.current.style.paddingRight=`${S+g}px`}l.current.style.overflow="hidden",i(!0)}),p=Oe(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),i(!1)});return(0,Ae.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return r&&(l.current=typeof r=="string"?document.querySelector(r):r),l.current||(l.current=document.body),t&&f(),()=>{p()}},[t,r,o,f,p]),{isLocked:s,lock:f,unlock:p}}var Yr=K(F(),1);function Cs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:i,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:a,valueMin:g,valueMax:S,valueText:T,label:v,labelledBy:k,describedBy:x,controls:C,owns:B}=e;return(0,Yr.useMemo)(()=>{let U={},Y=[{value:t,attr:W.Invalid},{value:r,attr:W.Disabled},{value:o,attr:W.Readonly},{value:s,attr:W.Required},{value:i,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:j,attr:G}of Y)j!==void 0&&(U[G]=j||void 0);return l!==void 0&&(U[W.Pressed]=l===!1?void 0:l),p!==void 0&&(U[W.Checked]=p===!1?void 0:p),c!==void 0&&(U[W.Haspopup]=c===!1?void 0:c),a!==void 0&&(U[W.Valuenow]=a),g!==void 0&&(U[W.Valuemin]=g),S!==void 0&&(U[W.Valuemax]=S),T!==void 0&&(U[W.Valuetext]=T),v!==void 0&&(U[W.Label]=v),k!==void 0&&(U[W.Labelledby]=k),x!==void 0&&(U[W.Describedby]=x),C!==void 0&&(U[W.Controls]=C),B!==void 0&&(U[W.Owns]=B),U},[t,r,o,s,i,l,d,f,p,b,c,a,g,S,T,v,k,x,C,B])}function Ps({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let i=Array.isArray(t)?t.join(`
18
- `):t;$r(()=>{if(!(!o||!i))return Ar(i,{id:e,window:s,insertionPoint:r})},[e,i,s,r,o])}var Tt=K(F(),1);function ua(e){let t=(0,Tt.useRef)(e);return(0,Tt.useLayoutEffect)(()=>{t.current=e}),t}var bt=K(F(),1),$r=bt.default.useInsertionEffect??bt.useLayoutEffect;function tn(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function nn(e,t,r=".",o){if(!tn(t))return nn(e,{},r,o);let s=Object.assign({},t);for(let i in e){if(i==="__proto__"||i==="constructor")continue;let l=e[i];l!=null&&(o&&o(s,i,l,r)||(Array.isArray(l)&&Array.isArray(s[i])?s[i]=[...l,...s[i]]:tn(l)&&tn(s[i])?s[i]=nn(l,s[i],(r?`${r}.`:"")+i.toString(),o):s[i]=l))}return s}function rn(e){return(...t)=>t.reduce((r,o)=>nn(r,o,"",e),{})}var Rt=rn(),la=rn((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),fa=rn((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var ne=K(F(),1);function Is(e={}){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,accessibilityDescription:i,threshold:l}=Rt(e,{threshold:500}),d=(0,ne.useRef)(null),f=(0,ne.useRef)(null),p=(0,ne.useRef)(null),b=(0,ne.useRef)(!1),c=(0,ne.useCallback)(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);(0,ne.useEffect)(()=>c,[c]);let a=(0,ne.useCallback)(C=>({type:C,pointerType:f.current??"mouse",target:p.current}),[]),g=(0,ne.useCallback)(C=>{t||C.button!==0||C.pointerType!=="mouse"&&(f.current=C.pointerType,p.current=C.currentTarget,b.current=!1,r?.(a("longpressstart")),d.current=setTimeout(()=>{b.current=!0,C.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),s?.(a("longpress")),d.current=null},l))},[t,l,r,s,a]),S=(0,ne.useCallback)(()=>{f.current!==null&&(c(),!b.current&&o&&o(a("longpressend")),f.current=null,p.current=null)},[c,o,a]),T=(0,ne.useCallback)(()=>{c(),f.current!==null&&o&&o(a("longpressend")),f.current=null,p.current=null},[c,o,a]),v=(0,ne.useCallback)(C=>{b.current&&C.preventDefault()},[]);return{longPressProps:t?{}:{onPointerDown:g,onPointerUp:S,onPointerCancel:T,onContextMenu:v,...!t&&!!s&&!!i&&{"aria-description":i}}}}var eo=K(Zr(),1),ie=K(F(),1);function Fs(e){let{ref:t,isOpen:r,isReady:o=!0}=e,[s,i]=(0,ie.useState)(r),l=s&&o;(0,ie.useLayoutEffect)(()=>{if(l&&t.current&&"getAnimations"in t.current)for(let a of t.current.getAnimations())a instanceof CSSTransition&&a.cancel()},[t,l]),Jr(t,l,(0,ie.useCallback)(()=>i(!1),[]));let[d,f]=(0,ie.useState)(r);r&&!d?(i(!0),f(!0)):!r&&d&&f(!1);let[p,b]=(0,ie.useState)(r?"open":"closed");switch(p){case"open":r||b("exiting");break;case"closed":case"exiting":r&&b("open");break}let c=p==="exiting";return Jr(t,c,(0,ie.useCallback)(()=>{b(a=>a==="exiting"?"closed":a)},[])),{isEntering:l,isExiting:c,isRendered:r||c}}function Jr(e,t,r){(0,ie.useLayoutEffect)(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let o=e.current.getAnimations();if(o.length===0){r();return}let s=!1;return Promise.all(o.map(i=>i.finished)).then(()=>{s||(0,eo.flushSync)(()=>{r()})}).catch(()=>{}),()=>{s=!0}}},[e,t,r])}var $=K(F(),1);function ks(e){return at()?e.metaKey:e.ctrlKey}function to(e,t){return e.current?.querySelector(`[data-key="${t}"]`)??null}function Ns(e){let{selectionManager:t,keyboardDelegate:r,ref:o,autoFocus:s,shouldFocusWrap:i,disallowEmptySelection:l,disallowSelectAll:d,escapeBehavior:f,selectOnFocus:p,disallowTypeAhead:b,shouldUseVirtualFocus:c,allowsTabNavigation:a,scrollRef:g,direction:S,orientation:T,onNavigate:v,onFocusItem:k}=Rt(e,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),x=g??o,C=(0,$.useRef)({top:0,left:0}),B=(0,$.useRef)(t.focusedKey),U=(0,$.useRef)(s),Y=(0,$.useRef)(""),j=(0,$.useRef)(null),G=(0,$.useCallback)((m,D,O)=>{m!=null&&(t.setFocusedKey(m,O),v?.(m),D?.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(m):p&&!ks(D)&&t.replaceSelection(m))},[t,p,v]),fe=(0,$.useCallback)(m=>{if(k){k(m);return}let D=to(o,m);D&&!c&&Be(D)},[o,c,k]),A=(0,$.useCallback)(m=>{if(!b&&m.key.length===1&&!m.ctrlKey&&!m.metaKey&&!m.altKey){j.current&&clearTimeout(j.current),Y.current+=m.key;let O=r.getKeyForSearch?.(Y.current,t.focusedKey)??null;O!=null&&(m.preventDefault(),G(O,m)),j.current=setTimeout(()=>{Y.current=""},500);return}let D=S==="rtl";switch(m.key){case"ArrowDown":{if(r.getKeyBelow){let O=t.focusedKey!=null?r.getKeyBelow(t.focusedKey):r.getFirstKey?.()??null;O==null&&i&&(O=r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowUp":{if(r.getKeyAbove){let O=t.focusedKey!=null?r.getKeyAbove(t.focusedKey):r.getLastKey?.()??null;O==null&&i&&(O=r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowLeft":{if(r.getKeyLeftOf){let O=t.focusedKey!=null?r.getKeyLeftOf(t.focusedKey):null;O==null&&i&&(O=D?r.getFirstKey?.()??null:r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"first":"last"))}break}case"ArrowRight":{if(r.getKeyRightOf){let O=t.focusedKey!=null?r.getKeyRightOf(t.focusedKey):null;O==null&&i&&(O=D?r.getLastKey?.()??null:r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"last":"first"))}break}case"Home":{if(r.getFirstKey){m.preventDefault();let O=r.getFirstKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"End":{if(r.getLastKey){m.preventDefault();let O=r.getLastKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"PageDown":{if(r.getKeyPageBelow&&t.focusedKey!=null){let O=r.getKeyPageBelow(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"PageUp":{if(r.getKeyPageAbove&&t.focusedKey!=null){let O=r.getKeyPageAbove(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"a":{ct(m)&&t.selectionMode==="multiple"&&!d&&(m.preventDefault(),t.selectAll());break}case"Escape":{f==="clearSelection"&&!l&&t.selectedKeys.size>0&&(m.stopPropagation(),m.preventDefault(),t.clearSelection());break}case"Tab":{!a&&o.current&&m.shiftKey&&o.current.focus();break}}},[r,t,o,S,i,p,b,d,l,f,a,G]),Se=(0,$.useCallback)(m=>{if(!t.isFocused){if(t.setFocused(!0),t.focusedKey==null){let D=m.relatedTarget,O=D!=null&&!!(m.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING),ce=null;O?ce=t.lastSelectedKey??r.getLastKey?.()??null:ce=t.firstSelectedKey??r.getFirstKey?.()??null,ce!=null&&(t.setFocusedKey(ce),p&&!t.isSelected(ce)&&t.replaceSelection(ce))}else x.current&&(x.current.scrollTop=C.current.top,x.current.scrollLeft=C.current.left);t.focusedKey!=null&&fe(t.focusedKey)}},[t,r,p,x,fe]),ue=(0,$.useCallback)(m=>{let D=m.relatedTarget;m.currentTarget.contains(D)||t.setFocused(!1)},[t]),ae=(0,$.useCallback)(m=>{x.current===m.target&&m.preventDefault()},[x]);(0,$.useEffect)(()=>{let m=x.current;if(!m)return()=>{};let D=()=>{C.current={top:m.scrollTop,left:m.scrollLeft}};return m.addEventListener("scroll",D,{passive:!0}),()=>{m.removeEventListener("scroll",D)}},[x]),(0,$.useEffect)(()=>{if(!U.current)return;let m=null;if(U.current==="first"?m=r.getFirstKey?.()??null:U.current==="last"&&(m=r.getLastKey?.()??null),t.selectedKeys.size>0){for(let D of t.selectedKeys)if(t.canSelectItem?.(D)!==!1){m=D;break}}t.setFocused(!0),t.setFocusedKey(m),m==null&&!c&&o.current&&o.current.focus(),U.current=!1},[r,t,o,c]),(0,$.useEffect)(()=>{if(!t.isFocused||t.focusedKey==null||t.focusedKey===B.current)return;let m=to(o,t.focusedKey);m&&x.current&&_r(x.current,m),B.current=t.focusedKey},[t.isFocused,t.focusedKey,o,x]),(0,$.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]);let E=c?void 0:t.focusedKey==null?0:-1;return{collectionProps:Ie({onKeyDown:A,onFocus:Se,onBlur:ue,onMouseDown:ae,tabIndex:E,"data-orientation":T})}}var z=K(F(),1),Ot={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ro={...Ot,customError:!0,valid:!1},ke={isInvalid:!1,validationErrors:[],validationDetails:Ot},oo=(0,z.createContext)({}),un="__formValidationState"+Date.now();function Ks(e){if(e[un]){let{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}=e[un];return{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}}return Hs(e)}function Hs(e){let{isInvalid:t,validationState:r,name:o,value:s,builtinValidation:i,validate:l,validationBehavior:d="aria"}=e;r&&(t||=r==="invalid");let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:ro}:null,p=(0,z.useMemo)(()=>{if(!l||s==null)return null;let A=Vs(l,s);return no(A)},[l,s]);i?.validationDetails.valid&&(i=void 0);let b=(0,z.useContext)(oo),c=(0,z.useMemo)(()=>o?Array.isArray(o)?o.flatMap(A=>an(b[A])):an(b[o]):[],[b,o]),[a,g]=(0,z.useState)(b),[S,T]=(0,z.useState)(!1);b!==a&&(g(b),T(!1));let v=(0,z.useMemo)(()=>no(S?[]:c),[S,c]),k=(0,z.useRef)(ke),[x,C]=(0,z.useState)(ke),B=(0,z.useRef)(ke),U=()=>{if(!Y)return;j(!1);let A=p||i||k.current;sn(A,B.current)||(B.current=A,C(A))},[Y,j]=(0,z.useState)(!1);return(0,z.useEffect)(U),{realtimeValidation:f||v||p||i||ke,displayValidation:d==="native"?f||v||x:f||v||p||i||x,updateValidation(A){d==="aria"&&!sn(x,A)?C(A):k.current=A},resetValidation(){let A=ke;sn(A,B.current)||(B.current=A,C(A)),d==="native"&&j(!1),T(!0)},commitValidation(){d==="native"&&j(!0),T(!0)}}}function an(e){return e?Array.isArray(e)?e:[e]:[]}function Vs(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return an(r)}return[]}function no(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ro}:null}function sn(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,o)=>r===t.validationErrors[o])&&Object.entries(e.validationDetails).every(([r,o])=>t.validationDetails[r]===o)}function js(...e){let t=new Set,r=!1,o={...Ot};for(let s of e){for(let i of s.validationErrors)t.add(i);r||=s.isInvalid;for(let i in o)o[i]||=s.validationDetails[i]}return o.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:o}}})();
17
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=F(),f={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},p=Symbol.for("react.portal"),b=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,ee.createPortal=function(c,u){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,u,null,g)},ee.flushSync=function(c){var u=b.T,g=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=u,f.p=g,f.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},ee.preconnect=function(c,u){typeof c=="string"&&c?u!=null&&typeof u!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",i(u)):u!=null&&typeof u.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",s(u.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,f.d.C(c,u))},ee.prefetchDNS=function(c){if(typeof c!="string"||!c)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c));else if(1<arguments.length){var u=arguments[1];typeof u=="object"&&u.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(u)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",i(u))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,u){if(typeof c=="string"&&c?u==null||typeof u!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",i(u)):u.as!=="style"&&u.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',i(u.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",s(c)),typeof c=="string"&&u&&typeof u.as=="string"){var g=u.as,S=o(g,u.crossOrigin),T=typeof u.integrity=="string"?u.integrity:void 0,v=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;g==="style"?f.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:S,integrity:T,fetchPriority:v}):g==="script"&&f.d.X(c,{crossOrigin:S,integrity:T,fetchPriority:v,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},ee.preinitModule=function(c,u){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),u!==void 0&&typeof u!="object"?g+=" The `options` argument encountered was "+s(u)+".":u&&"as"in u&&u.as!=="script"&&(g+=" The `as` option encountered was "+i(u.as)+"."),g)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",g);else switch(g=u&&typeof u.as=="string"?u.as:"script",g){case"script":break;default:g=i(g),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',g,c)}typeof c=="string"&&(typeof u=="object"&&u!==null?(u.as==null||u.as==="script")&&(g=o(u.as,u.crossOrigin),f.d.M(c,{crossOrigin:g,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})):u==null&&f.d.M(c))},ee.preload=function(c,u){var g="";if(typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),u==null||typeof u!="object"?g+=" The `options` argument encountered was "+s(u)+".":typeof u.as=="string"&&u.as||(g+=" The `as` option encountered was "+s(u.as)+"."),g&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',g),typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){g=u.as;var S=o(g,u.crossOrigin);f.d.L(c,g,{crossOrigin:S,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},ee.preloadModule=function(c,u){var g="";typeof c=="string"&&c||(g+=" The `href` argument encountered was "+s(c)+"."),u!==void 0&&typeof u!="object"?g+=" The `options` argument encountered was "+s(u)+".":u&&"as"in u&&typeof u.as!="string"&&(g+=" The `as` option encountered was "+s(u.as)+"."),g&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',g),typeof c=="string"&&(u?(g=o(u.as,u.crossOrigin),f.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:g,integrity:typeof u.integrity=="string"?u.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,u){return c(u)},ee.useFormState=function(c,u,g){return l().useFormState(c,u,g)},ee.useFormStatus=function(){return l().useHostTransitionStatus()},ee.version="19.2.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Zr=Ce((ba,on)=>{"use strict";function Xr(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Xr(),on.exports=qr()):on.exports=Qr()});var it=K(F(),1);function Ie(...e){if(e.length===0)return{};if(e.length===1)return typeof e[0]=="object"&&e[0]!==null?e[0]:{};let t={},r={};for(let o of e)if(!(typeof o!="object"||o===null)){for(let s in o)if(Object.hasOwn(o,s)){if(s==="children")continue;let i=o[s];s.startsWith("on")&&typeof i=="function"?(r[s]??=[],r[s].push(i)):t[s]=i}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let i of r[o])i?.(...s)});for(let o=e.length-1;o>=0;o--){let s=e[o];if(typeof s=="object"&&s!==null&&"children"in s){t.children=s.children;break}}return t}function Do({props:e,ref:t,context:r}){let o=Nt({context:r,slot:e.slot})||{},{ref:s=null,...i}=o,l=(0,it.useRef)(null),d=(0,it.useCallback)(p=>{l.current=p,typeof t=="function"?t(p):t&&(t.current=p),typeof s=="function"?s(p):s&&typeof s=="object"&&(s.current=p)},[t,s]),f=Ie(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof i.style=="function"?i.style(p):i.style,c={...p.defaultStyle,...b},u=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...u}}:f.style={...i.style,...e.style}),[f,d]}var se=K(F(),1);function Uo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:i=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[u,g]=(0,se.useState)(null),S=(0,se.useRef)(!1),T=(0,se.useRef)(null),v=Se(C=>{let P=C[0],B=P.isIntersecting,U={isIntersecting:P.isIntersecting,intersectionRatio:P.intersectionRatio,intersectionRect:P.intersectionRect,boundingClientRect:P.boundingClientRect,rootBounds:P.rootBounds,time:P.time};g(U),c(Y=>l&&S.current?!0:B&&l?(S.current=!0,Y!==!0&&d&&d(!0),!0):Y!==B?(d&&d(B),B):Y)}),k=(0,se.useCallback)(C=>{p(C)},[]);return(0,se.useEffect)(()=>{if(!i||!f)return;let C;return t===!0?C=[0,.1,.25,.5,.75,1]:typeof t=="string"?C=.01:C=r,T.current=new IntersectionObserver(v,{root:s,rootMargin:o,threshold:C}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[i,f,s,o,r,t]),[k,b,u]}var yt=K(F(),1);var Fo=Object.defineProperty,ut=(e,t)=>{for(var r in t)Fo(e,r,{get:t[r],enumerable:!0})},xe={};ut(xe,{ARIA_ATTRIBUTES:()=>jn,HTML_TAGS:()=>Wn,PRIMITIVE_TAGS:()=>Bn,default:()=>ko});var jn=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Bn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Wn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],ko={ARIA_ATTRIBUTES:jn,PRIMITIVE_TAGS:Bn,HTML_TAGS:Wn},No={};ut(No,{NUMERIC_DIGITS:()=>Gn,default:()=>Ko});var Gn=["1","2","3","4","5","6","7","8","9","0"],Ko={NUMERIC_DIGITS:Gn},Ho={};ut(Ho,{AMPERSAND:()=>tr,ASTERISK:()=>rr,BACKSLASH:()=>yr,BOM:()=>Yn,CARRIAGE_RETURN:()=>qn,COLON:()=>ar,COMMA:()=>sr,COMMERCIAL_AT:()=>dr,DOT:()=>ur,DOUBLE_QUOTE:()=>Zn,EXCLAMATION:()=>Xn,GRAVE_ACCENT:()=>gr,GREATER_THAN:()=>lr,LEFT_CURLY_BRACKET:()=>Er,LEFT_SQUARE_BRACKET:()=>pr,LINE_FEED:()=>zn,MINUS:()=>ir,PERCENT:()=>er,PLUS:()=>or,QUESTION:()=>fr,RIGHT_CURLY_BRACKET:()=>hr,RIGHT_SQUARE_BRACKET:()=>mr,SHARP:()=>Jn,SINGLE_QUOTE:()=>nr,SMALLER_THAN:()=>cr,SPACE:()=>Qn,TAB:()=>$n,VERTICAL_LINE:()=>vr,default:()=>Vo});var Yn=65279,$n=9,zn=10,qn=13,Qn=32,Xn=33,Zn=34,Jn=35,er=37,tr=38,nr=39,rr=42,or=43,sr=44,ir=45,ur=46,ar=58,cr=60,lr=62,fr=63,dr=64,pr=91,yr=92,mr=93,gr=96,Er=123,vr=124,hr=125,Vo={BOM:Yn,TAB:$n,LINE_FEED:zn,CARRIAGE_RETURN:qn,SPACE:Qn,EXCLAMATION:Xn,DOUBLE_QUOTE:Zn,SHARP:Jn,PERCENT:er,AMPERSAND:tr,SINGLE_QUOTE:nr,ASTERISK:rr,PLUS:or,COMMA:sr,MINUS:ir,DOT:ur,COLON:ar,SMALLER_THAN:cr,GREATER_THAN:lr,QUESTION:fr,COMMERCIAL_AT:dr,LEFT_SQUARE_BRACKET:pr,BACKSLASH:yr,RIGHT_SQUARE_BRACKET:mr,GRAVE_ACCENT:gr,LEFT_CURLY_BRACKET:Er,VERTICAL_LINE:vr,RIGHT_CURLY_BRACKET:hr},jo={};ut(jo,{CAPITALIZED:()=>Tr,LOWERCASE:()=>br,VOWELS:()=>Rr,default:()=>Bo});var Tr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],br=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],Rr=["A","E","I","O","U","a","e","i","o","u"],Bo={CAPITALIZED:Tr,LOWERCASE:br,VOWELS:Rr};function Wo(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var at=()=>Wo(/^Mac/i);function Sr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Go=()=>Sr(/^iPhone/i),Yo=()=>Sr(/^iPad/i)||at()&&navigator.maxTouchPoints>1,Kt=()=>Go()||Yo();function ct(e){return at()?e.metaKey??!1:e.ctrlKey??!1}function q(e){return e?.ownerDocument?e.ownerDocument:typeof document<"u"?document:void 0}function Oe(e){if(e&&"window"in e&&e.window===e)return e;let t=q(e);return t?.defaultView?t.defaultView:typeof window<"u"?window:void 0}var lt=null;function $o(){if(lt==null){lt=!1;try{if(typeof document>"u")return!1;document.createElement("div").focus({get preventScroll(){return lt=!0,!0}})}catch{}}return lt}function _r(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<i.top,f=l.bottom>i.bottom,p=l.left<i.left,b=l.right>i.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-i.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-i.bottom);else if(o==="center"){let u=i.top+i.height/2,g=l.top+l.height/2;c=e.scrollTop+(g-u)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-i.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-i.right);else if(s==="center"){let u=i.left+i.width/2,g=l.left+l.width/2;c=e.scrollLeft+(g-u)}e.scrollLeft=c}}function zo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ft(e,t,r=!0){if(!e||!t)return!1;if(!r)return e.contains(t);let o=t;for(;o;){if(o===e)return!0;o=o instanceof Element&&o.tagName==="SLOT"&&o.assignedSlot?o.assignedSlot.parentNode:zo(o)?o.host:o.parentNode}return!1}var ye=(e,t=!0)=>{if(e||(e=typeof document<"u"?document:void 0),!e)return null;if(!t)return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&r.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;return r};function dt(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Be(e){if($o())e.focus({preventScroll:!0});else{let t=qo(e);e.focus();for(let{element:r,scrollTop:o,scrollLeft:s}of t)r.scrollTop=o,r.scrollLeft=s}}function qo(e){let t=e.parentNode,r=Array.from({length:0}),o=typeof document<"u"?document.scrollingElement||document.documentElement:null;for(;t instanceof HTMLElement&&t!==o;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&r.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return o instanceof HTMLElement&&r.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),r}var wr="necto-style",Or=new WeakMap;function Qo(e){let t=Or.get(e);return t||(t=new Map,Or.set(e,t)),t}function Xo(e,t={}){let{id:r=wr,insertionPoint:o}=t,s=o?q(o):typeof document<"u"?document:void 0;if(!s)return null;let i=s.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("necto-style-id",r),i.textContent=e,o?s.head.insertBefore(i,o):s.head.appendChild(i),i}function Ar(e,t={}){let{id:r=wr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let i=Qo(o),l=`${r}:${e}`,d=i.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:Xo(e,{id:r,insertionPoint:s}),count:1},i.set(l,d)),()=>{let f=i.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,i.delete(l)))}}var pe=new Map,Vt=new Set;function Zo(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);t||(t=new Set,pe.set(e.target,t),e.target.addEventListener("transitioncancel",Wt,{once:!0})),t.add(e.propertyName)}function Wt(e){if(!("propertyName"in e)||!e.target)return;let t=pe.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Wt),pe.delete(e.target)),pe.size===0)){for(let r of Vt)r();Vt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",Zo),t.addEventListener("transitionend",Wt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Gt(e){requestAnimationFrame(()=>{for(let[t]of pe)"isConnected"in t&&!t.isConnected&&pe.delete(t);pe.size===0?e():Vt.add(e)})}var le,Ht=()=>xe.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),si=new Proxy({},{get:(e,t,r)=>(le||(le=Ht()),Reflect.get(le,t,r)),ownKeys:()=>(le||(le=Ht()),Reflect.ownKeys(le)),getOwnPropertyDescriptor:(e,t)=>(le||(le=Ht()),Object.getOwnPropertyDescriptor(le,t))}),jt="",De="default",He=new WeakMap;function pt(e){if(Kt()){if(De==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(jt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",De="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";He.has(e)||(He.set(e,t[r]??""),t[r]="none")}}function me(e){if(Kt()){if(De!=="disabled")return;De="restoring",setTimeout(()=>{Gt(()=>{if(De==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=jt||""),jt="",De="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&He.has(e)){let t=He.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),He.delete(e)}}var Ve,Bt,Lr,je=()=>{Ve||(Ve=xe.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Bt=xe.ARIA_ATTRIBUTES,Lr=new Set(Bt))},W=new Proxy({},{get:(e,t,r)=>(je(),Reflect.get(Ve,t,r)),ownKeys:()=>(je(),Reflect.ownKeys(Ve)),getOwnPropertyDescriptor:(e,t)=>(je(),Object.getOwnPropertyDescriptor(Ve,t))}),ai=new Proxy([],{get:(e,t,r)=>(je(),Reflect.get(Bt,t,r))}),ci=new Proxy(new Set,{get:(e,t,r)=>(je(),Reflect.get(Lr,t,r))});function We(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,i=(0,yt.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,yt.useCallback)(p=>{p.target===p.currentTarget&&i(!1,p)},[i]),d=Ge({onBlur:l}),f=(0,yt.useCallback)(p=>{let b=q(p.target),c=b?ye(b):ye();p.target===p.currentTarget&&c===dt(p.nativeEvent)&&(i(!0,p),d(p))},[i,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var mt=K(F(),1);function Jo(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:i}=We(e),{keyboardProps:l}=Yt(e),d=(0,mt.useRef)(r),f=q(t.current),p=f?ye(f):null;(0,mt.useEffect)(()=>{if(d.current&&t.current)if(Ye()==="virtual"){let c=p;Gt(()=>{f&&ye(f)===c&&t.current?.isConnected&&Be(t.current)})}else Be(t.current);d.current=!1},[t]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Ie(i??{},l,{tabIndex:b})}}var ge=K(F(),1);var es=null;function ts(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,ge.useRef)({isFocused:o,isFocusVisible:o||es!=="pointer"}),[i,l]=(0,ge.useState)(o),[d,f]=(0,ge.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,ge.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,ge.useCallback)(g=>{s.current.isFocused=g,l(g),p()},[p]);$e({fn:g=>{s.current.isFocusVisible=g,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=We({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:u={}}=$t({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:i,isFocusVisible:d,focusProps:t?u:c}}var Cr=K(F(),1);function ns(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Cr.useState)(r||Ye()!=="pointer");return $e({fn:i=>s(i),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Ue=new Map,gt=new Set,Pr=!1,zt=null,Mr=!1,Q={get hasEventBeforeFocus(){return Pr},set hasEventBeforeFocus(e){Pr=e},get hasBlurredWindowRecently(){return Mr},set hasBlurredWindowRecently(e){Mr=e},get currentModality(){return zt},set currentModality(e){zt=e}};function Ye(){return zt}var vs={},Et=Object.create(null),ze=e=>globalThis.process?.env||vs.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Et:globalThis),Ee=new Proxy(Et,{get(e,t){return ze()[t]??Et[t]},has(e,t){let r=ze();return t in r||t in Et},set(e,t,r){let o=ze(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=ze(!0);return delete r[t],!0},ownKeys(){let e=ze(!0);return Object.keys(e)}}),xr=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",rs=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function os(){if(globalThis.process?.env)for(let e of rs){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Dr=os(),xi=Dr.name;function _e(e){return e?e!=="false":!1}var qt=globalThis.process?.platform||"",Ur=_e(Ee.CI)||Dr.ci!==!1,Fr=_e(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Di=_e(Ee.DEBUG),we=xr==="test"||_e(Ee.TEST),kr=xr==="production";var Ui=_e(Ee.MINIMAL)||Ur||we||!Fr,ss=/^win/i.test(qt),Fi=/^linux/i.test(qt),Nr=/^darwin/i.test(qt),ki=!_e(Ee.NO_COLOR)&&(_e(Ee.FORCE_COLOR)||(Fr||ss)&&Ee.TERM!=="dumb"||Ur),is=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Ni=Number(is?.split(".")[0])||null,us=globalThis.process||Object.create(null),Ir={versions:{}},Ki=new Proxy(us,{get(e,t){if(t==="env")return Ee;if(t in e)return e[t];if(t in Ir)return Ir[t]}}),as=globalThis.process?.release?.name==="node",cs=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ls=!!globalThis.Deno,fs=!!globalThis.fastly,ds=!!globalThis.Netlify,ps=!!globalThis.EdgeRuntime,ys=globalThis.navigator?.userAgent==="Cloudflare-Workers",ms=[[ds,"netlify"],[ps,"edge-light"],[ys,"workerd"],[fs,"fastly"],[ls,"deno"],[cs,"bun"],[as,"node"]];function gs(){let e=ms.find(t=>t[0]);if(e)return{name:e[1]}}var Es=gs(),Hi=Es?.name||"";var Hr=K(F(),1);function Qt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&kr?console.error("stopPropagation is now the default behavior for events in Necto. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function vt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var hs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),Ts={Tab:!0,Escape:!0};function Kr(e,t,r){if(!r||!("target"in r)||!r.target)return!1;let o=q(r.target),s=Oe(r.target);if(!o||!s)return!1;let i=typeof window<"u"?s.HTMLInputElement:HTMLInputElement,l=typeof window<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,d=typeof window<"u"?s.HTMLElement:HTMLElement,f=typeof window<"u"?s.KeyboardEvent:KeyboardEvent,p=o.activeElement;return e=e||p instanceof i&&!hs.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!Ts[r.key])}function Zt(e,t){gt.forEach(r=>r(e,t))}function bs(e){return!(e.metaKey||Nr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Vr(e){bs(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",Zt("keyboard",e))}function Xt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",Zt("pointer",e))}function jr(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",Zt("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function Br(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function Rs(e){let t=Oe(e),r=q(e);if(typeof window>"u"||typeof document>"u"||!t||!r||Ue.has(t))return;let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(...s){Q.hasEventBeforeFocus=!0,o.apply(this,s)},r.addEventListener("keydown",Vr,!0),r.addEventListener("click",Xt,!0),t.addEventListener("focus",jr,!0),t.addEventListener("blur",Br,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Xt,!0),Ue.set(t,{focus:o})}function Ss(e){let t=Oe(e),r=q(e);if(!t||!r||!Ue.has(t))return;let{focus:o}=Ue.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Vr,!0),r.removeEventListener("click",Xt,!0),t.removeEventListener("focus",jr,!0),t.removeEventListener("blur",Br,!1),Ue.delete(t)}function $e(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(Rs(),(0,Hr.useEffect)(()=>{let s=(i,l)=>{Kr(!!o?.isTextInput,i,l)&&t(Q.currentModality!=="pointer")};return gt.add(s),()=>{gt.delete(s),Ss()}},r))}var qe=K(F(),1);function $t(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,i=(0,qe.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=Qe(),f=(0,qe.useCallback)(c=>{c.currentTarget.contains(c.target)&&i.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(i.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=Ge({onBlur:f}),b=(0,qe.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let u=q(c.target);if(!u)return;let g=ye(u);if(!i.current.isFocusWithin&&g===dt(c.nativeEvent)){r&&r(c),s&&s(!0),i.current.isFocusWithin=!0,p(c);let S=c.currentTarget;l(u,"focus",T=>{if(i.current.isFocusWithin&&!ft(S,T.target)&&u.defaultView&&typeof u.defaultView.FocusEvent=="function"){let v=new u.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(v,"target",{value:S}),Object.defineProperty(v,"currentTarget",{value:S});let k=vt(v);f(k)}},{capture:!0})}},[r,s,p,l,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:f}}}var ve=K(F(),1);function Qe(){let e=(0,ve.useRef)(new Map),t=(0,ve.useCallback)((s,i,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:i,eventTarget:s,options:d}),s.addEventListener(i,f,d)},[]),r=(0,ve.useCallback)((s,i,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(i,p,d),e.current.delete(l)},[]),o=(0,ve.useCallback)(()=>{e.current.forEach((s,i)=>{s.eventTarget.removeEventListener(s.type,i,s.options)}),e.current.clear()},[]);return(0,ve.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(F(),1);function Os(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[i,l]=(0,te.useState)(!1),d=(0,te.useRef)({hoverCount:0,ignoreEmulated:!1}),f=(0,te.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:p,removeAllGlobalListeners:b}=Qe(),c=(0,te.useCallback)(()=>{d.current.ignoreEmulated=!0,setTimeout(()=>{d.current.ignoreEmulated=!1},50)},[]);(0,te.useEffect)(()=>{let T=k=>{k.pointerType==="touch"&&c()};if(typeof document>"u")return;let v=d.current;return v.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",T):we&&document.addEventListener("touchend",c),()=>{v.hoverCount--,v.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):we&&document.removeEventListener("touchend",c))}},[c]);let u=(0,te.useCallback)((T,v)=>{if(s||v==="touch"||f.isHovered||!(T.currentTarget&&T.currentTarget.contains(T.target)))return;f.isHovered=!0,f.pointerType=v,f.target=T.currentTarget;let k=q(T.target instanceof Element?T.target:null);k&&(p(k,"pointerover",C=>{f.isHovered&&f.target&&!ft(f.target,C.target)&&g(C,C.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:v}),r?.(!0),l(!0))},[s,t,r,p,f]),g=(0,te.useCallback)((T,v)=>{v==="touch"||!f.isHovered||!f.target||(f.isHovered=!1,f.pointerType="",f.target=null,b(),o?.({type:"hoverend",target:T.currentTarget,pointerType:v}),r?.(!1),l(!1))},[o,r,b,f.target,f]),S=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=v=>{d.current.ignoreEmulated&&v.pointerType==="mouse"||u(v,v.pointerType)},T.onPointerLeave=v=>{!s&&v.currentTarget instanceof Element&&v.currentTarget.contains(v.target)&&g(v,v.pointerType)}):we&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=v=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&u(v.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&g(v.nativeEvent,"mouse")}),T},[s,u,g,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&g({currentTarget:f.target},f.pointerType)},[s,g,f.isHovered,f.pointerType,f.target]),{hoverProps:S,isHovered:i}}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Xe=new Map,Ze=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{Xe.delete(e)}):null;var oe=K(F(),1);function _s(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),i=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++Jt.current);return`${we?t:`${t}${Jt.prefix}`}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=Xe.get(d)||[],p={current:i.current};f.some(b=>b===p)||Xe.set(d,[...f,p])}return Ze&&Ze.register(l.current,d),()=>{Ze&&Ze.unregister(l.current),Xe.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=i.current;f&&(s(f),i.current=null)},[]),d}function Yt(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Qt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Qt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var he=K(F(),1);function en(e={}){let{type:t="function"}=e,r=(0,he.useRef)(!1),[o,s]=(0,he.useState)(!1),i=(0,he.useCallback)(()=>r.current,[]);return(0,he.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:i}var V=K(F(),1);function X(e,t,r){return{type:e,pointerType:t,target:r.currentTarget??r.target,shiftKey:r.shiftKey,ctrlKey:r.ctrlKey,metaKey:r.metaKey,altKey:r.altKey}}function ws(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:i,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,u]=(0,V.useState)(!1),g=(0,V.useRef)(!1),S=(0,V.useRef)(null),T=(0,V.useRef)(!1),v=(0,V.useCallback)(E=>{c!==E&&(u(E),f?.(E))},[c,f]),k=(0,V.useCallback)(E=>{if(!T.current)return;let m=S.current&&S.current instanceof Node&&E.target instanceof Node&&S.current.contains(E.target);if(T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&me(S.current),E.target){let D={...X("pressend","mouse",E),target:E.target};d?.(D),p?.(D),m&&i?.(D)}},[d,p,i,v,o]),C=(0,V.useCallback)(E=>{if(t||E.button!==0||g.current)return;r&&E.preventDefault(),o||pt(E.currentTarget),T.current=!0,S.current=E.currentTarget,v(!0);let m=X("pressstart","mouse",E);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,v,k]),P=(0,V.useCallback)(E=>{if(t||E.button!==0||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&me(E.currentTarget);let m=X("pressend","mouse",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","mouse",E))},[t,i,d,p,v,o]),B=(0,V.useCallback)(E=>{c&&(v(!1),d?.(X("pressend","mouse",E)),!o&&E.currentTarget instanceof HTMLElement&&me(E.currentTarget))},[c,v,d,o]),U=(0,V.useCallback)(E=>{T.current&&!c&&(v(!0),l?.(X("pressstart","mouse",E)))},[c,l,v]),Y=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&me(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m),p?.(m)},[d,p,v,o]),j=(0,V.useCallback)(E=>{if(!T.current)return;T.current=!1,v(!1),!o&&S.current instanceof HTMLElement&&me(S.current);let m={...X("pressend","touch",E),target:E.target};d?.(m)},[d,v,o]),G=(0,V.useCallback)(E=>{t||(o||pt(E.currentTarget),g.current=!0,setTimeout(()=>{g.current=!1},100),T.current=!0,S.current=E.currentTarget,v(!0),l?.(X("pressstart","touch",E)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",j,{once:!0}))},[t,l,v,o,Y,j]),fe=(0,V.useCallback)(E=>{if(t||!T.current)return;T.current=!1,v(!1),!o&&E.currentTarget instanceof HTMLElement&&me(E.currentTarget);let m=X("pressend","touch",E);d?.(m),p?.(m),E.currentTarget instanceof Node&&E.currentTarget.contains(E.target)&&i?.(X("press","touch",E))},[t,i,d,p,v,o]),A=(0,V.useCallback)(E=>{if(t)return;(E.key==="Enter"||E.key===" ")&&!c&&(E.key===" "&&E.preventDefault(),o||pt(),v(!0),T.current=!0,l?.(X("pressstart","keyboard",E)))},[t,c,l,v,o]),Re=(0,V.useCallback)(E=>{if(t)return;if((E.key==="Enter"||E.key===" ")&&c){v(!1),T.current=!1,o||me();let D=X("pressend","keyboard",E);d?.(D),p?.(X("pressup","keyboard",E)),i?.(X("press","keyboard",E))}},[t,c,i,d,p,v,o]),ue=(0,V.useCallback)(E=>{if(t){E.preventDefault();return}g.current||b?.(E)},[t,b]);(0,V.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",j)},[k,Y,j]);let ae=(0,V.useMemo)(()=>({onMouseDown:C,onMouseUp:P,onMouseLeave:B,onMouseEnter:U,onTouchStart:G,onTouchEnd:fe,onKeyDown:A,onKeyUp:Re,onClick:ue}),[C,P,B,U,G,fe,A,Re,ue]);return(0,V.useEffect)(()=>{let E=s?.current,m=E?Oe(E):void 0;E&&m&&E instanceof m.Element&&m.getComputedStyle(E).touchAction==="auto"&&(E.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Wr=K(F(),1);function As(e){let{style:t,values:r,children:o,className:s,defaultStyle:i,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Wr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:i||{}}):{...i,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,i,r])}var Gr=K(F(),1);function Nt(e){let{context:t,slot:r}=e,o=(0,Gr.useContext)(t);if(r===null)return null;if(o&&typeof o=="object"&&"slots"in o&&o.slots){let s=r||Symbol("default");if(!o.slots[s]){let i=new Intl.ListFormat().format(Object.keys(o.slots).map(d=>`"${d}"`)),l=r?`Invalid slot name: "${r}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${l} Valid slot names are ${i}.`)}return o.slots[s]}return o}var Fe=K(F(),1);function Ge(e){let{onBlur:t}=e,r=(0,Fe.useRef)({isFocused:!1,observer:null});(0,Fe.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Se(s=>{t?.(s)});return(0,Fe.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let i=s.target,l=d=>{if(r.current.isFocused=!1,i.disabled){let f=vt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};i.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&i.disabled){r.current.observer?.disconnect();let d=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var Te=K(F(),1);function Se(e){let t=(0,Te.useRef)(e);return(typeof window<"u"?Te.useLayoutEffect:Te.useEffect)(()=>{t.current=e},[e]),(0,Te.useCallback)(((...r)=>t.current(...r)),[])}var ht=K(F(),1);function Yu(e){let t=en(),[r,o]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var Ae=K(F(),1);function Ls(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,i]=(0,Ae.useState)(!1),l=(0,Ae.useRef)(null),d=(0,Ae.useRef)(null),f=Se(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let u=l.current===document.body?window.innerWidth:l.current.offsetWidth,g=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,S=u-l.current.scrollWidth;l.current.style.paddingRight=`${S+g}px`}l.current.style.overflow="hidden",i(!0)}),p=Se(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),i(!1)});return(0,Ae.useEffect)(()=>{if(!(typeof window>"u"||typeof document>"u"))return r&&(l.current=typeof r=="string"?document.querySelector(r):r),l.current||(l.current=document.body),t&&f(),()=>{p()}},[t,r,o,f,p]),{isLocked:s,lock:f,unlock:p}}var Yr=K(F(),1);function Cs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:i,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:u,valueMin:g,valueMax:S,valueText:T,label:v,labelledBy:k,describedBy:C,controls:P,owns:B}=e;return(0,Yr.useMemo)(()=>{let U={},Y=[{value:t,attr:W.Invalid},{value:r,attr:W.Disabled},{value:o,attr:W.Readonly},{value:s,attr:W.Required},{value:i,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:j,attr:G}of Y)j!==void 0&&(U[G]=j||void 0);return l!==void 0&&(U[W.Pressed]=l===!1?void 0:l),p!==void 0&&(U[W.Checked]=p===!1?void 0:p),c!==void 0&&(U[W.Haspopup]=c===!1?void 0:c),u!==void 0&&(U[W.Valuenow]=u),g!==void 0&&(U[W.Valuemin]=g),S!==void 0&&(U[W.Valuemax]=S),T!==void 0&&(U[W.Valuetext]=T),v!==void 0&&(U[W.Label]=v),k!==void 0&&(U[W.Labelledby]=k),C!==void 0&&(U[W.Describedby]=C),P!==void 0&&(U[W.Controls]=P),B!==void 0&&(U[W.Owns]=B),U},[t,r,o,s,i,l,d,f,p,b,c,u,g,S,T,v,k,C,P,B])}function Ps({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let i=Array.isArray(t)?t.join(`
18
+ `):t;$r(()=>{if(!(!o||!i))return Ar(i,{id:e,window:s,insertionPoint:r})},[e,i,s,r,o])}var Tt=K(F(),1);function ua(e){let t=(0,Tt.useRef)(e);return(0,Tt.useLayoutEffect)(()=>{t.current=e}),t}var bt=K(F(),1),$r=bt.default.useInsertionEffect??bt.useLayoutEffect;function tn(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function nn(e,t,r=".",o){if(!tn(t))return nn(e,{},r,o);let s=Object.assign({},t);for(let i in e){if(i==="__proto__"||i==="constructor")continue;let l=e[i];l!=null&&(o&&o(s,i,l,r)||(Array.isArray(l)&&Array.isArray(s[i])?s[i]=[...l,...s[i]]:tn(l)&&tn(s[i])?s[i]=nn(l,s[i],(r?`${r}.`:"")+i.toString(),o):s[i]=l))}return s}function rn(e){return(...t)=>t.reduce((r,o)=>nn(r,o,"",e),{})}var Rt=rn(),la=rn((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),fa=rn((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var ne=K(F(),1);function Is(e={}){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,accessibilityDescription:i,threshold:l}=Rt(e,{threshold:500}),d=(0,ne.useRef)(null),f=(0,ne.useRef)(null),p=(0,ne.useRef)(null),b=(0,ne.useRef)(!1),c=(0,ne.useCallback)(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);(0,ne.useEffect)(()=>c,[c]);let u=(0,ne.useCallback)(P=>({type:P,pointerType:f.current??"mouse",target:p.current}),[]),g=(0,ne.useCallback)(P=>{t||P.button!==0||P.pointerType!=="mouse"&&(f.current=P.pointerType,p.current=P.currentTarget,b.current=!1,r?.(u("longpressstart")),d.current=setTimeout(()=>{b.current=!0,P.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),s?.(u("longpress")),d.current=null},l))},[t,l,r,s,u]),S=(0,ne.useCallback)(()=>{f.current!==null&&(c(),!b.current&&o&&o(u("longpressend")),f.current=null,p.current=null)},[c,o,u]),T=(0,ne.useCallback)(()=>{c(),f.current!==null&&o&&o(u("longpressend")),f.current=null,p.current=null},[c,o,u]),v=(0,ne.useCallback)(P=>{b.current&&P.preventDefault()},[]);return{longPressProps:t?{}:{onPointerDown:g,onPointerUp:S,onPointerCancel:T,onContextMenu:v,...!t&&!!s&&!!i&&{"aria-description":i}}}}var eo=K(Zr(),1),ie=K(F(),1);function Fs(e){let{ref:t,isOpen:r,isReady:o=!0}=e,[s,i]=(0,ie.useState)(r),l=s&&o;(0,ie.useLayoutEffect)(()=>{if(l&&t.current&&"getAnimations"in t.current)for(let u of t.current.getAnimations())u instanceof CSSTransition&&u.cancel()},[t,l]),Jr(t,l,(0,ie.useCallback)(()=>i(!1),[]));let[d,f]=(0,ie.useState)(r);r&&!d?(i(!0),f(!0)):!r&&d&&f(!1);let[p,b]=(0,ie.useState)(r?"open":"closed");switch(p){case"open":r||b("exiting");break;case"closed":case"exiting":r&&b("open");break}let c=p==="exiting";return Jr(t,c,(0,ie.useCallback)(()=>{b(u=>u==="exiting"?"closed":u)},[])),{isEntering:l,isExiting:c,isRendered:r||c}}function Jr(e,t,r){(0,ie.useLayoutEffect)(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){r();return}let o=e.current.getAnimations();if(o.length===0){r();return}let s=!1;return Promise.all(o.map(i=>i.finished)).then(()=>{s||(0,eo.flushSync)(()=>{r()})}).catch(()=>{}),()=>{s=!0}}},[e,t,r])}var $=K(F(),1);function ks(e){return at()?e.metaKey:e.ctrlKey}function to(e,t){return e.current?.querySelector(`[data-key="${t}"]`)??null}function Ns(e){let{selectionManager:t,keyboardDelegate:r,ref:o,autoFocus:s,shouldFocusWrap:i,disallowEmptySelection:l,disallowSelectAll:d,escapeBehavior:f,selectOnFocus:p,disallowTypeAhead:b,shouldUseVirtualFocus:c,allowsTabNavigation:u,scrollRef:g,direction:S,orientation:T,onNavigate:v,onFocusItem:k}=Rt(e,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),C=g??o,P=(0,$.useRef)({top:0,left:0}),B=(0,$.useRef)(t.focusedKey),U=(0,$.useRef)(s),Y=(0,$.useRef)(""),j=(0,$.useRef)(null),G=(0,$.useCallback)((m,D,O)=>{m!=null&&(t.setFocusedKey(m,O),v?.(m),D?.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(m):p&&!ks(D)&&t.replaceSelection(m))},[t,p,v]),fe=(0,$.useCallback)(m=>{if(k){k(m);return}let D=to(o,m);D&&!c&&Be(D)},[o,c,k]),A=(0,$.useCallback)(m=>{if(!b&&m.key.length===1&&!m.ctrlKey&&!m.metaKey&&!m.altKey){j.current&&clearTimeout(j.current),Y.current+=m.key;let O=r.getKeyForSearch?.(Y.current,t.focusedKey)??null;O!=null&&(m.preventDefault(),G(O,m)),j.current=setTimeout(()=>{Y.current=""},500);return}let D=S==="rtl";switch(m.key){case"ArrowDown":{if(r.getKeyBelow){let O=t.focusedKey!=null?r.getKeyBelow(t.focusedKey):r.getFirstKey?.()??null;O==null&&i&&(O=r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowUp":{if(r.getKeyAbove){let O=t.focusedKey!=null?r.getKeyAbove(t.focusedKey):r.getLastKey?.()??null;O==null&&i&&(O=r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m))}break}case"ArrowLeft":{if(r.getKeyLeftOf){let O=t.focusedKey!=null?r.getKeyLeftOf(t.focusedKey):null;O==null&&i&&(O=D?r.getFirstKey?.()??null:r.getLastKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"first":"last"))}break}case"ArrowRight":{if(r.getKeyRightOf){let O=t.focusedKey!=null?r.getKeyRightOf(t.focusedKey):null;O==null&&i&&(O=D?r.getLastKey?.()??null:r.getFirstKey?.()??null),O!=null&&(m.preventDefault(),G(O,m,D?"last":"first"))}break}case"Home":{if(r.getFirstKey){m.preventDefault();let O=r.getFirstKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"End":{if(r.getLastKey){m.preventDefault();let O=r.getLastKey();t.setFocusedKey(O),O!=null&&(ct(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(O):p&&t.replaceSelection(O))}break}case"PageDown":{if(r.getKeyPageBelow&&t.focusedKey!=null){let O=r.getKeyPageBelow(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"PageUp":{if(r.getKeyPageAbove&&t.focusedKey!=null){let O=r.getKeyPageAbove(t.focusedKey);O!=null&&(m.preventDefault(),G(O,m))}break}case"a":{ct(m)&&t.selectionMode==="multiple"&&!d&&(m.preventDefault(),t.selectAll());break}case"Escape":{f==="clearSelection"&&!l&&t.selectedKeys.size>0&&(m.stopPropagation(),m.preventDefault(),t.clearSelection());break}case"Tab":{!u&&o.current&&m.shiftKey&&o.current.focus();break}}},[r,t,o,S,i,p,b,d,l,f,u,G]),Re=(0,$.useCallback)(m=>{if(!t.isFocused){if(t.setFocused(!0),t.focusedKey==null){let D=m.relatedTarget,O=D!=null&&!!(m.currentTarget.compareDocumentPosition(D)&Node.DOCUMENT_POSITION_FOLLOWING),ce=null;O?ce=t.lastSelectedKey??r.getLastKey?.()??null:ce=t.firstSelectedKey??r.getFirstKey?.()??null,ce!=null&&(t.setFocusedKey(ce),p&&!t.isSelected(ce)&&t.replaceSelection(ce))}else C.current&&(C.current.scrollTop=P.current.top,C.current.scrollLeft=P.current.left);t.focusedKey!=null&&fe(t.focusedKey)}},[t,r,p,C,fe]),ue=(0,$.useCallback)(m=>{let D=m.relatedTarget;m.currentTarget.contains(D)||t.setFocused(!1)},[t]),ae=(0,$.useCallback)(m=>{C.current===m.target&&m.preventDefault()},[C]);(0,$.useEffect)(()=>{let m=C.current;if(!m)return()=>{};let D=()=>{P.current={top:m.scrollTop,left:m.scrollLeft}};return m.addEventListener("scroll",D,{passive:!0}),()=>{m.removeEventListener("scroll",D)}},[C]),(0,$.useEffect)(()=>{if(!U.current)return;let m=null;if(U.current==="first"?m=r.getFirstKey?.()??null:U.current==="last"&&(m=r.getLastKey?.()??null),t.selectedKeys.size>0){for(let D of t.selectedKeys)if(t.canSelectItem?.(D)!==!1){m=D;break}}t.setFocused(!0),t.setFocusedKey(m),m==null&&!c&&o.current&&o.current.focus(),U.current=!1},[r,t,o,c]),(0,$.useEffect)(()=>{if(!t.isFocused||t.focusedKey==null||t.focusedKey===B.current)return;let m=to(o,t.focusedKey);m&&C.current&&_r(C.current,m),B.current=t.focusedKey},[t.isFocused,t.focusedKey,o,C]),(0,$.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]);let E=c?void 0:t.focusedKey==null?0:-1;return{collectionProps:Ie({onKeyDown:A,onFocus:Re,onBlur:ue,onMouseDown:ae,tabIndex:E,"data-orientation":T})}}var z=K(F(),1),Ot={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ro={...Ot,customError:!0,valid:!1},ke={isInvalid:!1,validationErrors:[],validationDetails:Ot},oo=(0,z.createContext)({}),un="__formValidationState"+Date.now();function Ks(e){if(e[un]){let{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}=e[un];return{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:i}}return Hs(e)}function Hs(e){let{isInvalid:t,validationState:r,name:o,value:s,builtinValidation:i,validate:l,validationBehavior:d="aria"}=e;r&&(t||=r==="invalid");let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:ro}:null,p=(0,z.useMemo)(()=>{if(!l||s==null)return null;let A=Vs(l,s);return no(A)},[l,s]);i?.validationDetails.valid&&(i=void 0);let b=(0,z.useContext)(oo),c=(0,z.useMemo)(()=>o?Array.isArray(o)?o.flatMap(A=>an(b[A])):an(b[o]):[],[b,o]),[u,g]=(0,z.useState)(b),[S,T]=(0,z.useState)(!1);b!==u&&(g(b),T(!1));let v=(0,z.useMemo)(()=>no(S?[]:c),[S,c]),k=(0,z.useRef)(ke),[C,P]=(0,z.useState)(ke),B=(0,z.useRef)(ke),U=()=>{if(!Y)return;j(!1);let A=p||i||k.current;sn(A,B.current)||(B.current=A,P(A))},[Y,j]=(0,z.useState)(!1);return(0,z.useEffect)(U),{realtimeValidation:f||v||p||i||ke,displayValidation:d==="native"?f||v||C:f||v||p||i||C,updateValidation(A){d==="aria"&&!sn(C,A)?P(A):k.current=A},resetValidation(){let A=ke;sn(A,B.current)||(B.current=A,P(A)),d==="native"&&j(!1),T(!0)},commitValidation(){d==="native"&&j(!0),T(!0)}}}function an(e){return e?Array.isArray(e)?e:[e]:[]}function Vs(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return an(r)}return[]}function no(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ro}:null}function sn(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((r,o)=>r===t.validationErrors[o])&&Object.entries(e.validationDetails).every(([r,o])=>t.validationDetails[r]===o)}function js(...e){let t=new Set,r=!1,o={...Ot};for(let s of e){for(let i of s.validationErrors)t.add(i);r||=s.isInvalid;for(let i in o)o[i]||=s.validationDetails[i]}return o.valid=!r,{isInvalid:r,validationErrors:[...t],validationDetails:o}}})();
19
19
  /*! Bundled license information:
20
20
 
21
21
  react/cjs/react.production.js:
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{useRef as nt,useCallback as rt}from"react";import{mergeProps as ot}from"@necto/mergers";function st({props:n,ref:e,context:t}){let r=oe({context:t,slot:n.slot})||{},{ref:o=null,...s}=r,a=nt(null),i=rt(l=>{a.current=l,typeof e=="function"?e(l):e&&(e.current=l),typeof o=="function"?o(l):o&&typeof o=="object"&&(o.current=l)},[e,o]),u=ot(s,n);return"style"in s&&s.style&&"style"in n&&n.style&&(typeof s.style=="function"||typeof n.style=="function"?u.style=l=>{let y=typeof s.style=="function"?s.style(l):s.style,d={...l.defaultStyle,...y},E=typeof n.style=="function"?n.style({...l,defaultStyle:d}):n.style;return{...d,...E}}:u.style={...s.style,...n.style}),[u,i]}import{useRef as Le,useState as se,useCallback as it,useEffect as ut}from"react";function lt(n={}){let{partialVisibility:e=!1,threshold:t=0,rootMargin:r="0px",root:o=null,active:s=!0,once:a=!1,onChange:i}=n,[u,l]=se(null),[y,d]=se(!1),[E,b]=se(null),g=Le(!1),m=Le(null),p=C(T=>{let F=T[0],L=F.isIntersecting,x={isIntersecting:F.isIntersecting,intersectionRatio:F.intersectionRatio,intersectionRect:F.intersectionRect,boundingClientRect:F.boundingClientRect,rootBounds:F.rootBounds,time:F.time};b(x),d(O=>a&&g.current?!0:L&&a?(g.current=!0,O!==!0&&i&&i(!0),!0):O!==L?(i&&i(L),L):O)}),h=it(T=>{l(T)},[]);return ut(()=>{if(!s||!u)return;let T;return e===!0?T=[0,.1,.25,.5,.75,1]:typeof e=="string"?T=.01:T=t,m.current=new IntersectionObserver(p,{root:o,rootMargin:r,threshold:T}),m.current.observe(u),()=>{m.current&&m.current.disconnect()}},[s,u,o,r,t,e]),[h,y,E]}import{useCallback as ie}from"react";import{getOwnerDocument as at,getEventTarget as ct,getActiveElement as Se}from"@necto/dom";function j(n={}){let{isDisabled:e,onFocus:t,onBlur:r,onFocusChange:o}=n,s=ie((l,y)=>{l?(t?.(y),o?.(!0)):(r?.(y),o?.(!1))},[t,r,o]),a=ie(l=>{l.target===l.currentTarget&&s(!1,l)},[s]),i=N({onBlur:a}),u=ie(l=>{let y=at(l.target),d=y?Se(y):Se();l.target===l.currentTarget&&d===ct(l.nativeEvent)&&(s(!0,l),i(l))},[s,i]);return{focusProps:{...e?{}:{onFocus:u,onBlur:a}}}}import{getOwnerDocument as ft,getActiveElement as Ue,runAfterTransition as dt,focusWithoutScrolling as Pe}from"@necto/dom";import{mergeProps as pt}from"@necto/mergers";import{useEffect as mt,useRef as yt}from"react";function vt(n,e){let{autoFocus:t,isDisabled:r,excludeFromTabOrder:o}=n,{focusProps:s}=j(n),{keyboardProps:a}=ue(n),i=yt(t),u=ft(e.current),l=Ue(u);mt(()=>{if(i.current&&e.current)if(G()==="virtual"){let d=l;dt(()=>{Ue(u)===d&&e.current?.isConnected&&Pe(e.current)})}else Pe(e.current);i.current=!1},[e]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:pt(s??{},a,{tabIndex:y})}}import{useRef as Et,useState as Oe,useCallback as we}from"react";var gt=null;function bt(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=Et({isFocused:r,isFocusVisible:r||gt!=="pointer"}),[s,a]=Oe(r),[i,u]=Oe(()=>o.current.isFocused&&o.current.isFocusVisible),l=we(()=>{u(o.current.isFocused&&o.current.isFocusVisible)},[]),y=we(b=>{o.current.isFocused=b,a(b),l()},[l]);_({fn:b=>{o.current.isFocusVisible=b,l()},deps:[],opts:{isTextInput:t}});let{focusProps:d={}}=j({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:E={}}=le({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:i,focusProps:e?E:d}}import{useState as Tt}from"react";function Ft(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=Tt(t||G()!=="pointer");return _({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var I=new Map,X=new Set,Me=!1,ae=null,Ke=!1,w={get hasEventBeforeFocus(){return Me},set hasEventBeforeFocus(n){Me=n},get hasBlurredWindowRecently(){return Ke},set hasBlurredWindowRecently(n){Ke=n},get currentModality(){return ae},set currentModality(n){ae=n}};function G(){return ae}import{isMacOS as Rt}from"std-env";import{useEffect as ht}from"react";import{isKeyboardFocusEvent as xt}from"@necto-react/helpers";import{getOwnerDocument as Ve,getOwnerWindow as Ce}from"@necto/dom";function fe(n,e){X.forEach(t=>t(n,e))}function Lt(n){return!(n.metaKey||Rt&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function ke(n){Lt(n)&&(w.hasEventBeforeFocus=!0,w.currentModality="keyboard",fe("keyboard",n))}function ce(n){["mousedown","pointerdown"].includes(n.type)&&(w.hasEventBeforeFocus=!0,w.currentModality="pointer",fe("pointer",n))}function Ae(n){[window,document].includes(n.target)||!n.isTrusted||!w.hasEventBeforeFocus&&!w.hasBlurredWindowRecently||(!w.hasEventBeforeFocus&&!w.hasBlurredWindowRecently&&(w.currentModality="virtual",fe("virtual",n)),w.hasEventBeforeFocus=!1,w.hasBlurredWindowRecently=!1)}function De(){w.hasEventBeforeFocus=!1,w.hasBlurredWindowRecently=!0}function St(n){let e=Ce(n),t=Ve(n);if(typeof window>"u"||typeof document>"u"||I.has(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(...o){w.hasEventBeforeFocus=!0,r.apply(this,o)},t.addEventListener("keydown",ke,!0),t.addEventListener("click",ce,!0),e.addEventListener("focus",Ae,!0),e.addEventListener("blur",De,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",ce,!0),I.set(e,{focus:r})}function Ut(n){let e=Ce(n),t=Ve(n);if(!I.has(e))return;let{focus:r}=I.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",ke,!0),t.removeEventListener("click",ce,!0),e.removeEventListener("focus",Ae,!0),e.removeEventListener("blur",De,!1),I.delete(e)}function _(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(St(),ht(()=>{let o=(s,a)=>{xt(!!r?.isTextInput,s,a)&&e(w.currentModality!=="pointer")};return X.add(o),()=>{X.delete(o),Ut()}},t))}import{useCallback as Ie,useRef as Pt}from"react";import{createSyntheticEvent as Ot}from"@necto-react/helpers";import{getOwnerDocument as wt,getActiveElement as Mt,getEventTarget as Kt,nodeContains as Vt}from"@necto/dom";function le(n){let{isDisabled:e,onFocusWithin:t,onBlurWithin:r,onFocusWithinChange:o}=n,s=Pt({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=$(),u=Ie(d=>{d.currentTarget.contains(d.target)&&s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,i(),r&&r(d),o&&o(!1))},[r,o,i]),l=N({onBlur:u}),y=Ie(d=>{if(!d.currentTarget.contains(d.target))return;let E=wt(d.target),b=Mt(E);if(!s.current.isFocusWithin&&b===Kt(d.nativeEvent)){t&&t(d),o&&o(!0),s.current.isFocusWithin=!0,l(d);let g=d.currentTarget;a(E,"focus",m=>{if(s.current.isFocusWithin&&!Vt(g,m.target)&&E.defaultView&&typeof E.defaultView.FocusEvent=="function"){let p=new E.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(p,"target",{value:g}),Object.defineProperty(p,"currentTarget",{value:g});let h=Ot(p);u(h)}},{capture:!0})}},[t,o,l,a,u]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:u}}}import{useRef as Ct,useCallback as de,useEffect as kt}from"react";function $(){let n=Ct(new Map),e=de((o,s,a,i)=>{let u=typeof i=="object"&&i?.once?(...l)=>{n.current.delete(a),a(...l)}:a;n.current.set(a,{type:s,eventTarget:o,options:i}),o.addEventListener(s,u,i)},[]),t=de((o,s,a,i)=>{let u=n.current.get(a),l=u?.options?.once?u.fn:a;o.removeEventListener(s,l,i),n.current.delete(a)},[]),r=de(()=>{n.current.forEach((o,s)=>{o.eventTarget.removeEventListener(o.type,s,o.options)}),n.current.clear()},[]);return kt(()=>()=>r(),[r]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:r}}import{isTest as pe}from"std-env";import{getOwnerDocument as At,nodeContains as Dt}from"@necto/dom";import{useRef as He,useState as It,useCallback as me,useEffect as Be,useMemo as Ht}from"react";function Bt(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,a]=It(!1),i=He({hoverCount:0,ignoreEmulated:!1}),u=He({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=$(),d=me(()=>{i.current.ignoreEmulated=!0,setTimeout(()=>{i.current.ignoreEmulated=!1},50)},[]);Be(()=>{let m=h=>{h.pointerType==="touch"&&d()};if(typeof document>"u")return;let p=i.current;return p.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):pe&&document.addEventListener("touchend",d),()=>{p.hoverCount--,p.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):pe&&document.removeEventListener("touchend",d))}},[d]);let E=me((m,p)=>{o||p==="touch"||u.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target))||(u.isHovered=!0,u.pointerType=p,u.target=m.currentTarget,l(At(m.target instanceof Element?m.target:null),"pointerover",h=>{u.isHovered&&u.target&&!Dt(u.target,h.target)&&b(h,h.pointerType)},{capture:!0}),e?.({type:"hoverstart",target:m.currentTarget,pointerType:p}),t?.(!0),a(!0))},[o,e,t,l,u]),b=me((m,p)=>{p==="touch"||!u.isHovered||!u.target||(u.isHovered=!1,u.pointerType="",u.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:p}),t?.(!1),a(!1))},[r,t,y,u.target,u]),g=Ht(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=p=>{i.current.ignoreEmulated&&p.pointerType==="mouse"||E(p,p.pointerType)},m.onPointerLeave=p=>{!o&&p.currentTarget instanceof Element&&p.currentTarget.contains(p.target)&&b(p,p.pointerType)}):pe&&(m.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=p=>{!u.ignoreEmulatedMouseEvents&&!i.current.ignoreEmulated&&E(p.nativeEvent,"mouse"),u.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&b(p.nativeEvent,"mouse")}),m},[o,E,b,u]);return Be(()=>{o&&u.isHovered&&b({currentTarget:u.target},u.pointerType)},[o,b,u.isHovered,u.pointerType,u.target]),{hoverProps:g,isHovered:s}}import{isTest as Wt}from"std-env";var ye={prefix:String(Math.round(Math.random()*1e10)),current:0},z=new Map,q=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{z.delete(n)}):null;import jt,{useRef as We,useState as Nt,useEffect as je,useId as Gt}from"react";function _t(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=Nt(()=>t),s=We(null),a=We({}),i=(()=>{if(t)return t;let u=typeof jt.useId=="function"?Gt():String(++ye.current);return`${Wt?e:`${e}${ye.prefix}`}-${u}`})();return je(()=>{if(typeof window<"u"&&window.document?.createElement){let u=z.get(i)||[],l={current:s.current};u.some(y=>y===l)||z.set(i,[...u,l])}return q&&q.register(a.current,i),()=>{q&&q.unregister(a.current),z.delete(i)}},[i]),je(()=>{let u=s.current;u&&(o(u),s.current=null)},[]),i}import{createEventHandler as Ne}from"@necto-react/helpers";function ue(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?Ne(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?Ne(e=>n.onKeyUp?.(e.nativeEvent)):void 0}}}import{useRef as $t,useState as zt,useCallback as qt,useEffect as Yt}from"react";function ve(n={}){let{type:e="function"}=n,t=$t(!1),[r,o]=zt(!1),s=qt(()=>t.current,[]);return Yt(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}import{getOwnerWindow as Ge,disableTextSelection as Ee,restoreTextSelection as k}from"@necto/dom";import{useState as Qt,useRef as ge,useCallback as V,useEffect as _e,useMemo as Jt}from"react";function M(n,e,t){return{type:n,pointerType:e,target:t.currentTarget??t.target,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Xt(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:a,onPressEnd:i,onPressChange:u,onPressUp:l,onClick:y}=n,[d,E]=Qt(!1),b=ge(!1),g=ge(null),m=ge(!1),p=V(f=>{d!==f&&(E(f),u?.(f))},[d,u]),h=V(f=>{if(!m.current)return;let c=g.current&&g.current instanceof Node&&f.target instanceof Node&&g.current.contains(f.target);if(m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&k(g.current),f.target){let R={...M("pressend","mouse",f),target:f.target};i?.(R),l?.(R),c&&s?.(R)}},[i,l,s,p,r]),T=V(f=>{if(e||f.button!==0||b.current)return;t&&f.preventDefault(),r||Ee(f.currentTarget),m.current=!0,g.current=f.currentTarget,p(!0);let c=M("pressstart","mouse",f);a?.(c),window.addEventListener("mouseup",h,{once:!0})},[e,t,r,a,p,h]),F=V(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget);let c=M("pressend","mouse",f);i?.(c),l?.(c),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(M("press","mouse",f))},[e,s,i,l,p,r]),L=V(f=>{d&&(p(!1),i?.(M("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget))},[d,p,i,r]),x=V(f=>{m.current&&!d&&(p(!0),a?.(M("pressstart","mouse",f)))},[d,a,p]),O=V(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&k(g.current);let c={...M("pressend","touch",f),target:f.target};i?.(c),l?.(c)},[i,l,p,r]),P=V(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&g.current instanceof HTMLElement&&k(g.current);let c={...M("pressend","touch",f),target:f.target};i?.(c)},[i,p,r]),K=V(f=>{e||(r||Ee(f.currentTarget),b.current=!0,setTimeout(()=>{b.current=!1},100),m.current=!0,g.current=f.currentTarget,p(!0),a?.(M("pressstart","touch",f)),window.addEventListener("touchend",O,{once:!0}),window.addEventListener("touchcancel",P,{once:!0}))},[e,a,p,r,O,P]),A=V(f=>{if(e||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget);let c=M("pressend","touch",f);i?.(c),l?.(c),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(M("press","touch",f))},[e,s,i,l,p,r]),S=V(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!d&&(f.key===" "&&f.preventDefault(),r||Ee(),p(!0),m.current=!0,a?.(M("pressstart","keyboard",f)))},[e,d,a,p,r]),Q=V(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&d){p(!1),m.current=!1,r||k();let R=M("pressend","keyboard",f);i?.(R),l?.(M("pressup","keyboard",f)),s?.(M("press","keyboard",f))}},[e,d,s,i,l,p,r]),J=V(f=>{if(e){f.preventDefault();return}b.current||y?.(f)},[e,y]);_e(()=>()=>{window.removeEventListener("mouseup",h),window.removeEventListener("touchend",O),window.removeEventListener("touchcancel",P)},[h,O,P]);let re=Jt(()=>({onMouseDown:T,onMouseUp:F,onMouseLeave:L,onMouseEnter:x,onTouchStart:K,onTouchEnd:A,onKeyDown:S,onKeyUp:Q,onClick:J}),[T,F,L,x,K,A,S,Q,J]);return _e(()=>{let f=o?.current;f&&f instanceof Ge(f).Element&&Ge(f).getComputedStyle(f).touchAction==="auto"&&(f.style.touchAction="pan-x pan-y pinch-zoom")},[o]),{pressProps:re,isPressed:d}}import{useMemo as Zt}from"react";function en(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:a,defaultClassName:i="necto"}=n;return Zt(()=>{let u=typeof o=="function"?o({...t,defaultClassName:i}):o?`${i} ${o}`:i,l=typeof e=="function"?e({...t,defaultStyle:s||{}}):{...s,...e},y=typeof r=="function"?r({...t,defaultChildren:a}):r??a;return{className:u,style:l,children:y}},[o,e,r,i,a,s,t])}import{useContext as tn}from"react";function oe(n){let{context:e,slot:t}=n,r=tn(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let o=t||Symbol("default");if(!r.slots[o]){let s=new Intl.ListFormat().format(Object.keys(r.slots).map(i=>`"${i}"`)),a=t?`Invalid slot name: "${t}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${a} Valid slot names are ${s}.`)}return r.slots[o]}return r}import{createSyntheticEvent as nn}from"@necto-react/helpers";import{useRef as rn,useCallback as on,useLayoutEffect as sn}from"react";function N(n){let{onBlur:e}=n,t=rn({isFocused:!1,observer:null});sn(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=C(o=>{e?.(o)});return on(o=>{if(o.target instanceof HTMLButtonElement||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=o.target,a=i=>{if(t.current.isFocused=!1,s.disabled){let u=nn(i);r(u)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){t.current.observer?.disconnect();let i=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[r])}import{useCallback as un,useRef as ln,useLayoutEffect as an,useEffect as cn}from"react";function C(n){let e=ln(n);return(typeof window<"u"?an:cn)(()=>{e.current=n},[n]),un(((...t)=>e.current(...t)),[])}import{useEffect as fn,useState as dn}from"react";function Ho(n){let e=ve(),[t,r]=dn(!1);return fn(()=>{e()&&r(!!n())},[n,e]),t}import{useRef as $e,useState as pn,useEffect as mn}from"react";function yn(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=pn(!1),a=$e(null),i=$e(null),u=C(()=>{if(typeof window>"u"||!a.current)return;let{overflow:y,paddingRight:d}=a.current.style;if(i.current={overflow:y,paddingRight:d},r){let E=a.current===document.body?window.innerWidth:a.current.offsetWidth,b=parseInt(window.getComputedStyle(a.current).paddingRight,10)||0,g=E-a.current.scrollWidth;a.current.style.paddingRight=`${g+b}px`}a.current.style.overflow="hidden",s(!0)}),l=C(()=>{a.current&&i.current&&(a.current.style.overflow=i.current.overflow,r&&(a.current.style.paddingRight=i.current.paddingRight)),s(!1)});return mn(()=>{if(!(typeof window>"u"||typeof document>"u"))return t&&(a.current=typeof t=="string"?document.querySelector(t):t),a.current||(a.current=document.body),e&&u(),()=>{l()}},[e,t,r,u,l]),{isLocked:o,lock:u,unlock:l}}import{useMemo as vn}from"react";import{AriaProps as U}from"@necto/dom";function En(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:a,isExpanded:i,isSelected:u,isChecked:l,isHidden:y,hasPopup:d,valueCurrent:E,valueMin:b,valueMax:g,valueText:m,label:p,labelledBy:h,describedBy:T,controls:F,owns:L}=n;return vn(()=>{let x={},O=[{value:e,attr:U.Invalid},{value:t,attr:U.Disabled},{value:r,attr:U.Readonly},{value:o,attr:U.Required},{value:s,attr:U.Busy},{value:i,attr:U.Expanded},{value:u,attr:U.Selected},{value:y,attr:U.Hidden}];for(let{value:P,attr:K}of O)P!==void 0&&(x[K]=P||void 0);return a!==void 0&&(x[U.Pressed]=a===!1?void 0:a),l!==void 0&&(x[U.Checked]=l===!1?void 0:l),d!==void 0&&(x[U.Haspopup]=d===!1?void 0:d),E!==void 0&&(x[U.Valuenow]=E),b!==void 0&&(x[U.Valuemin]=b),g!==void 0&&(x[U.Valuemax]=g),m!==void 0&&(x[U.Valuetext]=m),p!==void 0&&(x[U.Label]=p),h!==void 0&&(x[U.Labelledby]=h),T!==void 0&&(x[U.Describedby]=T),F!==void 0&&(x[U.Controls]=F),L!==void 0&&(x[U.Owns]=L),x},[e,t,r,o,s,a,i,u,l,y,d,E,b,g,m,p,h,T,F,L])}import{injectStyle as gn}from"@necto/dom";function bn({id:n,css:e,insertionPoint:t,enabled:r=!0,window:o=typeof window<"u"?window:null}){let s=Array.isArray(e)?e.join(`
2
- `):e;ze(()=>{if(!(!r||!s))return gn(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}import{useRef as Tn,useLayoutEffect as Fn}from"react";function rs(n){let e=Tn(n);return Fn(()=>{e.current=n}),e}import Rn,{useLayoutEffect as hn}from"react";var ze=Rn.useInsertionEffect??hn;import{defu as Ln}from"defu";import{useRef as Z,useCallback as H,useEffect as Sn}from"react";function Un(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:a}=Ln(n,{threshold:500}),i=Z(null),u=Z(null),l=Z(null),y=Z(!1),d=H(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);Sn(()=>d,[d]);let E=H(F=>({type:F,pointerType:u.current??"mouse",target:l.current}),[]),b=H(F=>{e||F.button!==0||F.pointerType!=="mouse"&&(u.current=F.pointerType,l.current=F.currentTarget,y.current=!1,t?.(E("longpressstart")),i.current=setTimeout(()=>{y.current=!0,F.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o?.(E("longpress")),i.current=null},a))},[e,a,t,o,E]),g=H(()=>{u.current!==null&&(d(),!y.current&&r&&r(E("longpressend")),u.current=null,l.current=null)},[d,r,E]),m=H(()=>{d(),u.current!==null&&r&&r(E("longpressend")),u.current=null,l.current=null},[d,r,E]),p=H(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:b,onPointerUp:g,onPointerCancel:m,onContextMenu:p,...!e&&!!o&&!!s&&{"aria-description":s}}}}import{flushSync as Pn}from"react-dom";import{useCallback as qe,useLayoutEffect as Qe,useState as be}from"react";function On(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=be(t),a=o&&r;Qe(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let E of e.current.getAnimations())E instanceof CSSTransition&&E.cancel()},[e,a]),Ye(e,a,qe(()=>s(!1),[]));let[i,u]=be(t);t&&!i?(s(!0),u(!0)):!t&&i&&u(!1);let[l,y]=be(t?"open":"closed");switch(l){case"open":t||y("exiting");break;case"closed":case"exiting":t&&y("open");break}let d=l==="exiting";return Ye(e,d,qe(()=>{y(E=>E==="exiting"?"closed":E)},[])),{isEntering:a,isExiting:d,isRendered:t||d}}function Ye(n,e,t){Qe(()=>{if(e&&n.current){if(!("getAnimations"in n.current)){t();return}let r=n.current.getAnimations();if(r.length===0){t();return}let o=!1;return Promise.all(r.map(s=>s.finished)).then(()=>{o||Pn(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}import{defu as wn}from"defu";import{mergeProps as Mn}from"@necto/mergers";import{useCallback as B,useEffect as ee,useRef as Y}from"react";import{isCtrlKeyPressed as Te,isMac as Kn}from"@necto/platform";import{focusWithoutScrolling as Vn,scrollIntoView as Cn}from"@necto/dom";function kn(n){return Kn()?n.metaKey:n.ctrlKey}function Je(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function An(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:a,disallowSelectAll:i,escapeBehavior:u,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:d,allowsTabNavigation:E,scrollRef:b,direction:g,orientation:m,onNavigate:p,onFocusItem:h}=wn(n,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),T=b??r,F=Y({top:0,left:0}),L=Y(e.focusedKey),x=Y(o),O=Y(""),P=Y(null),K=B((c,R,v)=>{c!=null&&(e.setFocusedKey(c,v),p?.(c),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(c):l&&!kn(R)&&e.replaceSelection(c))},[e,l,p]),A=B(c=>{if(h){h(c);return}let R=Je(r,c);R&&!d&&Vn(R)},[r,d,h]),S=B(c=>{if(!y&&c.key.length===1&&!c.ctrlKey&&!c.metaKey&&!c.altKey){P.current&&clearTimeout(P.current),O.current+=c.key;let v=t.getKeyForSearch?.(O.current,e.focusedKey)??null;v!=null&&(c.preventDefault(),K(v,c)),P.current=setTimeout(()=>{O.current=""},500);return}let R=g==="rtl";switch(c.key){case"ArrowDown":{if(t.getKeyBelow){let v=e.focusedKey!=null?t.getKeyBelow(e.focusedKey):t.getFirstKey?.()??null;v==null&&s&&(v=t.getFirstKey?.()??null),v!=null&&(c.preventDefault(),K(v,c))}break}case"ArrowUp":{if(t.getKeyAbove){let v=e.focusedKey!=null?t.getKeyAbove(e.focusedKey):t.getLastKey?.()??null;v==null&&s&&(v=t.getLastKey?.()??null),v!=null&&(c.preventDefault(),K(v,c))}break}case"ArrowLeft":{if(t.getKeyLeftOf){let v=e.focusedKey!=null?t.getKeyLeftOf(e.focusedKey):null;v==null&&s&&(v=R?t.getFirstKey?.()??null:t.getLastKey?.()??null),v!=null&&(c.preventDefault(),K(v,c,R?"first":"last"))}break}case"ArrowRight":{if(t.getKeyRightOf){let v=e.focusedKey!=null?t.getKeyRightOf(e.focusedKey):null;v==null&&s&&(v=R?t.getLastKey?.()??null:t.getFirstKey?.()??null),v!=null&&(c.preventDefault(),K(v,c,R?"last":"first"))}break}case"Home":{if(t.getFirstKey){c.preventDefault();let v=t.getFirstKey();e.setFocusedKey(v),v!=null&&(Te(c)&&c.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):l&&e.replaceSelection(v))}break}case"End":{if(t.getLastKey){c.preventDefault();let v=t.getLastKey();e.setFocusedKey(v),v!=null&&(Te(c)&&c.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(v):l&&e.replaceSelection(v))}break}case"PageDown":{if(t.getKeyPageBelow&&e.focusedKey!=null){let v=t.getKeyPageBelow(e.focusedKey);v!=null&&(c.preventDefault(),K(v,c))}break}case"PageUp":{if(t.getKeyPageAbove&&e.focusedKey!=null){let v=t.getKeyPageAbove(e.focusedKey);v!=null&&(c.preventDefault(),K(v,c))}break}case"a":{Te(c)&&e.selectionMode==="multiple"&&!i&&(c.preventDefault(),e.selectAll());break}case"Escape":{u==="clearSelection"&&!a&&e.selectedKeys.size>0&&(c.stopPropagation(),c.preventDefault(),e.clearSelection());break}case"Tab":{!E&&r.current&&c.shiftKey&&r.current.focus();break}}},[t,e,r,g,s,l,y,i,a,u,E,K]),Q=B(c=>{if(!e.isFocused){if(e.setFocused(!0),e.focusedKey==null){let R=c.relatedTarget,v=R!=null&&!!(c.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING),D=null;v?D=e.lastSelectedKey??t.getLastKey?.()??null:D=e.firstSelectedKey??t.getFirstKey?.()??null,D!=null&&(e.setFocusedKey(D),l&&!e.isSelected(D)&&e.replaceSelection(D))}else T.current&&(T.current.scrollTop=F.current.top,T.current.scrollLeft=F.current.left);e.focusedKey!=null&&A(e.focusedKey)}},[e,t,l,T,A]),J=B(c=>{let R=c.relatedTarget;c.currentTarget.contains(R)||e.setFocused(!1)},[e]),re=B(c=>{T.current===c.target&&c.preventDefault()},[T]);ee(()=>{let c=T.current;if(!c)return()=>{};let R=()=>{F.current={top:c.scrollTop,left:c.scrollLeft}};return c.addEventListener("scroll",R,{passive:!0}),()=>{c.removeEventListener("scroll",R)}},[T]),ee(()=>{if(!x.current)return;let c=null;if(x.current==="first"?c=t.getFirstKey?.()??null:x.current==="last"&&(c=t.getLastKey?.()??null),e.selectedKeys.size>0){for(let R of e.selectedKeys)if(e.canSelectItem?.(R)!==!1){c=R;break}}e.setFocused(!0),e.setFocusedKey(c),c==null&&!d&&r.current&&r.current.focus(),x.current=!1},[t,e,r,d]),ee(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===L.current)return;let c=Je(r,e.focusedKey);c&&T.current&&Cn(T.current,c),L.current=e.focusedKey},[e.isFocused,e.focusedKey,r,T]),ee(()=>()=>{P.current&&clearTimeout(P.current)},[]);let f=d?void 0:e.focusedKey==null?0:-1;return{collectionProps:Mn({onKeyDown:S,onFocus:Q,onBlur:J,onMouseDown:re,tabIndex:f,"data-orientation":m})}}import{createContext as Dn,useContext as In,useEffect as Hn,useMemo as Fe,useRef as Xe,useState as te}from"react";var ne={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},et={...ne,customError:!0,valid:!1},W={isInvalid:!1,validationErrors:[],validationDetails:ne},tt=Dn({}),he="__formValidationState"+Date.now();function Bn(n){if(n[he]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[he];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return Wn(n)}function Wn(n){let{isInvalid:e,validationState:t,name:r,value:o,builtinValidation:s,validate:a,validationBehavior:i="aria"}=n;t&&(e||=t==="invalid");let u=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:et}:null,l=Fe(()=>{if(!a||o==null)return null;let S=jn(a,o);return Ze(S)},[a,o]);s?.validationDetails.valid&&(s=void 0);let y=In(tt),d=Fe(()=>r?Array.isArray(r)?r.flatMap(S=>xe(y[S])):xe(y[r]):[],[y,r]),[E,b]=te(y),[g,m]=te(!1);y!==E&&(b(y),m(!1));let p=Fe(()=>Ze(g?[]:d),[g,d]),h=Xe(W),[T,F]=te(W),L=Xe(W),x=()=>{if(!O)return;P(!1);let S=l||s||h.current;Re(S,L.current)||(L.current=S,F(S))},[O,P]=te(!1);return Hn(x),{realtimeValidation:u||p||l||s||W,displayValidation:i==="native"?u||p||T:u||p||l||s||T,updateValidation(S){i==="aria"&&!Re(T,S)?F(S):h.current=S},resetValidation(){let S=W;Re(S,L.current)||(L.current=S,F(S)),i==="native"&&P(!1),m(!0)},commitValidation(){i==="native"&&P(!0),m(!0)}}}function xe(n){return n?Array.isArray(n)?n:[n]:[]}function jn(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return xe(t)}return[]}function Ze(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:et}:null}function Re(n,e){return n===e?!0:!!n&&!!e&&n.isInvalid===e.isInvalid&&n.validationErrors.length===e.validationErrors.length&&n.validationErrors.every((t,r)=>t===e.validationErrors[r])&&Object.entries(n.validationDetails).every(([t,r])=>e.validationDetails[t]===r)}function Nn(...n){let e=new Set,t=!1,r={...ne};for(let o of n){for(let s of o.validationErrors)e.add(s);t||=o.isInvalid;for(let s in r)r[s]||=o.validationDetails[s]}return r.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:r}}export{W as DEFAULT_VALIDATION_RESULT,tt as FormValidationContext,ne as VALID_VALIDITY_STATE,G as getInteractionModality,Nn as mergeValidation,he as privateValidationStateProp,On as useAnimation,En as useAriaProps,An as useCollectionNavigation,st as useContextProps,C as useEffectEvent,lt as useElementVisibility,j as useFocus,bt as useFocusRing,Ft as useFocusVisible,_ as useFocusVisibleListener,le as useFocusWithin,vt as useFocusable,Bn as useFormState,$ as useGlobalListeners,Bt as useHover,_t as useId,ze as useIsomorphicInsertionEffect,ue as useKeyboard,rs as useLatestRef,Un as useLongPress,ve as useMounted,Xt as usePress,en as useRenderer,yn as useScrollLock,oe as useSlottedContext,bn as useStyleInjection,Ho as useSupported,N as useSyntheticBlurEvent};
1
+ import{useRef as tt,useCallback as nt}from"react";import{mergeProps as rt}from"@necto/mergers";function ot({props:n,ref:e,context:t}){let r=oe({context:t,slot:n.slot})||{},{ref:o=null,...s}=r,c=tt(null),u=nt(l=>{c.current=l,typeof e=="function"?e(l):e&&(e.current=l),typeof o=="function"?o(l):o&&typeof o=="object"&&(o.current=l)},[e,o]),i=rt(s,n);return"style"in s&&s.style&&"style"in n&&n.style&&(typeof s.style=="function"||typeof n.style=="function"?i.style=l=>{let y=typeof s.style=="function"?s.style(l):s.style,d={...l.defaultStyle,...y},v=typeof n.style=="function"?n.style({...l,defaultStyle:d}):n.style;return{...d,...v}}:i.style={...s.style,...n.style}),[i,u]}import{useRef as Le,useState as se,useCallback as st,useEffect as it}from"react";function ut(n={}){let{partialVisibility:e=!1,threshold:t=0,rootMargin:r="0px",root:o=null,active:s=!0,once:c=!1,onChange:u}=n,[i,l]=se(null),[y,d]=se(!1),[v,T]=se(null),b=Le(!1),m=Le(null),p=C(g=>{let F=g[0],L=F.isIntersecting,h={isIntersecting:F.isIntersecting,intersectionRatio:F.intersectionRatio,intersectionRect:F.intersectionRect,boundingClientRect:F.boundingClientRect,rootBounds:F.rootBounds,time:F.time};T(h),d(w=>c&&b.current?!0:L&&c?(b.current=!0,w!==!0&&u&&u(!0),!0):w!==L?(u&&u(L),L):w)}),x=st(g=>{l(g)},[]);return it(()=>{if(!s||!i)return;let g;return e===!0?g=[0,.1,.25,.5,.75,1]:typeof e=="string"?g=.01:g=t,m.current=new IntersectionObserver(p,{root:o,rootMargin:r,threshold:g}),m.current.observe(i),()=>{m.current&&m.current.disconnect()}},[s,i,o,r,t,e]),[x,y,v]}import{useCallback as ie}from"react";import{getOwnerDocument as lt,getEventTarget as at,getActiveElement as Se}from"@necto/dom";function j(n={}){let{isDisabled:e,onFocus:t,onBlur:r,onFocusChange:o}=n,s=ie((l,y)=>{l?(t?.(y),o?.(!0)):(r?.(y),o?.(!1))},[t,r,o]),c=ie(l=>{l.target===l.currentTarget&&s(!1,l)},[s]),u=N({onBlur:c}),i=ie(l=>{let y=lt(l.target),d=y?Se(y):Se();l.target===l.currentTarget&&d===at(l.nativeEvent)&&(s(!0,l),u(l))},[s,u]);return{focusProps:{...e?{}:{onFocus:i,onBlur:c}}}}import{getOwnerDocument as ct,getActiveElement as Ue,runAfterTransition as ft,focusWithoutScrolling as Pe}from"@necto/dom";import{mergeProps as dt}from"@necto/mergers";import{useEffect as pt,useRef as mt}from"react";function yt(n,e){let{autoFocus:t,isDisabled:r,excludeFromTabOrder:o}=n,{focusProps:s}=j(n),{keyboardProps:c}=ue(n),u=mt(t),i=ct(e.current),l=i?Ue(i):null;pt(()=>{if(u.current&&e.current)if(G()==="virtual"){let d=l;ft(()=>{i&&Ue(i)===d&&e.current?.isConnected&&Pe(e.current)})}else Pe(e.current);u.current=!1},[e]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:dt(s??{},c,{tabIndex:y})}}import{useRef as vt,useState as we,useCallback as Oe}from"react";var Et=null;function gt(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=vt({isFocused:r,isFocusVisible:r||Et!=="pointer"}),[s,c]=we(r),[u,i]=we(()=>o.current.isFocused&&o.current.isFocusVisible),l=Oe(()=>{i(o.current.isFocused&&o.current.isFocusVisible)},[]),y=Oe(T=>{o.current.isFocused=T,c(T),l()},[l]);_({fn:T=>{o.current.isFocusVisible=T,l()},deps:[],opts:{isTextInput:t}});let{focusProps:d={}}=j({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:v={}}=le({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:u,focusProps:e?v:d}}import{useState as bt}from"react";function Tt(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=bt(t||G()!=="pointer");return _({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var I=new Map,X=new Set,Me=!1,ae=null,Ke=!1,O={get hasEventBeforeFocus(){return Me},set hasEventBeforeFocus(n){Me=n},get hasBlurredWindowRecently(){return Ke},set hasBlurredWindowRecently(n){Ke=n},get currentModality(){return ae},set currentModality(n){ae=n}};function G(){return ae}import{isMacOS as Ft}from"std-env";import{useEffect as Rt}from"react";import{isKeyboardFocusEvent as ht}from"@necto-react/helpers";import{getOwnerDocument as Ve,getOwnerWindow as Ce}from"@necto/dom";function fe(n,e){X.forEach(t=>t(n,e))}function xt(n){return!(n.metaKey||Ft&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function ke(n){xt(n)&&(O.hasEventBeforeFocus=!0,O.currentModality="keyboard",fe("keyboard",n))}function ce(n){["mousedown","pointerdown"].includes(n.type)&&(O.hasEventBeforeFocus=!0,O.currentModality="pointer",fe("pointer",n))}function Ae(n){[window,document].includes(n.target)||!n.isTrusted||!O.hasEventBeforeFocus&&!O.hasBlurredWindowRecently||(!O.hasEventBeforeFocus&&!O.hasBlurredWindowRecently&&(O.currentModality="virtual",fe("virtual",n)),O.hasEventBeforeFocus=!1,O.hasBlurredWindowRecently=!1)}function De(){O.hasEventBeforeFocus=!1,O.hasBlurredWindowRecently=!0}function Lt(n){let e=Ce(n),t=Ve(n);if(typeof window>"u"||typeof document>"u"||!e||!t||I.has(e))return;let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(...o){O.hasEventBeforeFocus=!0,r.apply(this,o)},t.addEventListener("keydown",ke,!0),t.addEventListener("click",ce,!0),e.addEventListener("focus",Ae,!0),e.addEventListener("blur",De,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",ce,!0),I.set(e,{focus:r})}function St(n){let e=Ce(n),t=Ve(n);if(!e||!t||!I.has(e))return;let{focus:r}=I.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",ke,!0),t.removeEventListener("click",ce,!0),e.removeEventListener("focus",Ae,!0),e.removeEventListener("blur",De,!1),I.delete(e)}function _(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(Lt(),Rt(()=>{let o=(s,c)=>{ht(!!r?.isTextInput,s,c)&&e(O.currentModality!=="pointer")};return X.add(o),()=>{X.delete(o),St()}},t))}import{useCallback as Ie,useRef as Ut}from"react";import{createSyntheticEvent as Pt}from"@necto-react/helpers";import{getOwnerDocument as wt,getActiveElement as Ot,getEventTarget as Mt,nodeContains as Kt}from"@necto/dom";function le(n){let{isDisabled:e,onFocusWithin:t,onBlurWithin:r,onFocusWithinChange:o}=n,s=Ut({isFocusWithin:!1}),{addGlobalListener:c,removeAllGlobalListeners:u}=$(),i=Ie(d=>{d.currentTarget.contains(d.target)&&s.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(s.current.isFocusWithin=!1,u(),r&&r(d),o&&o(!1))},[r,o,u]),l=N({onBlur:i}),y=Ie(d=>{if(!d.currentTarget.contains(d.target))return;let v=wt(d.target);if(!v)return;let T=Ot(v);if(!s.current.isFocusWithin&&T===Mt(d.nativeEvent)){t&&t(d),o&&o(!0),s.current.isFocusWithin=!0,l(d);let b=d.currentTarget;c(v,"focus",m=>{if(s.current.isFocusWithin&&!Kt(b,m.target)&&v.defaultView&&typeof v.defaultView.FocusEvent=="function"){let p=new v.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(p,"target",{value:b}),Object.defineProperty(p,"currentTarget",{value:b});let x=Pt(p);i(x)}},{capture:!0})}},[t,o,l,c,i]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:y,onBlur:i}}}import{useRef as Vt,useCallback as de,useEffect as Ct}from"react";function $(){let n=Vt(new Map),e=de((o,s,c,u)=>{let i=typeof u=="object"&&u?.once?(...l)=>{n.current.delete(c),c(...l)}:c;n.current.set(c,{type:s,eventTarget:o,options:u}),o.addEventListener(s,i,u)},[]),t=de((o,s,c,u)=>{let i=n.current.get(c),l=i?.options?.once?i.fn:c;o.removeEventListener(s,l,u),n.current.delete(c)},[]),r=de(()=>{n.current.forEach((o,s)=>{o.eventTarget.removeEventListener(o.type,s,o.options)}),n.current.clear()},[]);return Ct(()=>()=>r(),[r]),{addGlobalListener:e,removeGlobalListener:t,removeAllGlobalListeners:r}}import{isTest as pe}from"std-env";import{getOwnerDocument as kt,nodeContains as At}from"@necto/dom";import{useRef as He,useState as Dt,useCallback as me,useEffect as Be,useMemo as It}from"react";function Ht(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,c]=Dt(!1),u=He({hoverCount:0,ignoreEmulated:!1}),i=He({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=$(),d=me(()=>{u.current.ignoreEmulated=!0,setTimeout(()=>{u.current.ignoreEmulated=!1},50)},[]);Be(()=>{let m=x=>{x.pointerType==="touch"&&d()};if(typeof document>"u")return;let p=u.current;return p.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):pe&&document.addEventListener("touchend",d),()=>{p.hoverCount--,p.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):pe&&document.removeEventListener("touchend",d))}},[d]);let v=me((m,p)=>{if(o||p==="touch"||i.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target)))return;i.isHovered=!0,i.pointerType=p,i.target=m.currentTarget;let x=kt(m.target instanceof Element?m.target:null);x&&(l(x,"pointerover",g=>{i.isHovered&&i.target&&!At(i.target,g.target)&&T(g,g.pointerType)},{capture:!0}),e?.({type:"hoverstart",target:m.currentTarget,pointerType:p}),t?.(!0),c(!0))},[o,e,t,l,i]),T=me((m,p)=>{p==="touch"||!i.isHovered||!i.target||(i.isHovered=!1,i.pointerType="",i.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:p}),t?.(!1),c(!1))},[r,t,y,i.target,i]),b=It(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=p=>{u.current.ignoreEmulated&&p.pointerType==="mouse"||v(p,p.pointerType)},m.onPointerLeave=p=>{!o&&p.currentTarget instanceof Element&&p.currentTarget.contains(p.target)&&T(p,p.pointerType)}):pe&&(m.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=p=>{!i.ignoreEmulatedMouseEvents&&!u.current.ignoreEmulated&&v(p.nativeEvent,"mouse"),i.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&T(p.nativeEvent,"mouse")}),m},[o,v,T,i]);return Be(()=>{o&&i.isHovered&&T({currentTarget:i.target},i.pointerType)},[o,T,i.isHovered,i.pointerType,i.target]),{hoverProps:b,isHovered:s}}import{isTest as Bt}from"std-env";var ye={prefix:String(Math.round(Math.random()*1e10)),current:0},z=new Map,q=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{z.delete(n)}):null;import Wt,{useRef as We,useState as jt,useEffect as je,useId as Nt}from"react";function Gt(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=jt(()=>t),s=We(null),c=We({}),u=(()=>{if(t)return t;let i=typeof Wt.useId=="function"?Nt():String(++ye.current);return`${Bt?e:`${e}${ye.prefix}`}-${i}`})();return je(()=>{if(typeof window<"u"&&window.document?.createElement){let i=z.get(u)||[],l={current:s.current};i.some(y=>y===l)||z.set(u,[...i,l])}return q&&q.register(c.current,u),()=>{q&&q.unregister(c.current),z.delete(u)}},[u]),je(()=>{let i=s.current;i&&(o(i),s.current=null)},[]),u}import{createEventHandler as Ne}from"@necto-react/helpers";function ue(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?Ne(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?Ne(e=>n.onKeyUp?.(e.nativeEvent)):void 0}}}import{useRef as _t,useState as $t,useCallback as zt,useEffect as qt}from"react";function ve(n={}){let{type:e="function"}=n,t=_t(!1),[r,o]=$t(!1),s=zt(()=>t.current,[]);return qt(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}import{getOwnerWindow as Yt,disableTextSelection as Ee,restoreTextSelection as k}from"@necto/dom";import{useState as Qt,useRef as ge,useCallback as V,useEffect as Ge,useMemo as Jt}from"react";function M(n,e,t){return{type:n,pointerType:e,target:t.currentTarget??t.target,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function Xt(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:c,onPressEnd:u,onPressChange:i,onPressUp:l,onClick:y}=n,[d,v]=Qt(!1),T=ge(!1),b=ge(null),m=ge(!1),p=V(f=>{d!==f&&(v(f),i?.(f))},[d,i]),x=V(f=>{if(!m.current)return;let a=b.current&&b.current instanceof Node&&f.target instanceof Node&&b.current.contains(f.target);if(m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&k(b.current),f.target){let R={...M("pressend","mouse",f),target:f.target};u?.(R),l?.(R),a&&s?.(R)}},[u,l,s,p,r]),g=V(f=>{if(e||f.button!==0||T.current)return;t&&f.preventDefault(),r||Ee(f.currentTarget),m.current=!0,b.current=f.currentTarget,p(!0);let a=M("pressstart","mouse",f);c?.(a),window.addEventListener("mouseup",x,{once:!0})},[e,t,r,c,p,x]),F=V(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget);let a=M("pressend","mouse",f);u?.(a),l?.(a),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(M("press","mouse",f))},[e,s,u,l,p,r]),L=V(f=>{d&&(p(!1),u?.(M("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget))},[d,p,u,r]),h=V(f=>{m.current&&!d&&(p(!0),c?.(M("pressstart","mouse",f)))},[d,c,p]),w=V(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&k(b.current);let a={...M("pressend","touch",f),target:f.target};u?.(a),l?.(a)},[u,l,p,r]),P=V(f=>{if(!m.current)return;m.current=!1,p(!1),!r&&b.current instanceof HTMLElement&&k(b.current);let a={...M("pressend","touch",f),target:f.target};u?.(a)},[u,p,r]),K=V(f=>{e||(r||Ee(f.currentTarget),T.current=!0,setTimeout(()=>{T.current=!1},100),m.current=!0,b.current=f.currentTarget,p(!0),c?.(M("pressstart","touch",f)),window.addEventListener("touchend",w,{once:!0}),window.addEventListener("touchcancel",P,{once:!0}))},[e,c,p,r,w,P]),A=V(f=>{if(e||!m.current)return;m.current=!1,p(!1),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget);let a=M("pressend","touch",f);u?.(a),l?.(a),f.currentTarget instanceof Node&&f.currentTarget.contains(f.target)&&s?.(M("press","touch",f))},[e,s,u,l,p,r]),S=V(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!d&&(f.key===" "&&f.preventDefault(),r||Ee(),p(!0),m.current=!0,c?.(M("pressstart","keyboard",f)))},[e,d,c,p,r]),Q=V(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&d){p(!1),m.current=!1,r||k();let R=M("pressend","keyboard",f);u?.(R),l?.(M("pressup","keyboard",f)),s?.(M("press","keyboard",f))}},[e,d,s,u,l,p,r]),J=V(f=>{if(e){f.preventDefault();return}T.current||y?.(f)},[e,y]);Ge(()=>()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",w),window.removeEventListener("touchcancel",P)},[x,w,P]);let re=Jt(()=>({onMouseDown:g,onMouseUp:F,onMouseLeave:L,onMouseEnter:h,onTouchStart:K,onTouchEnd:A,onKeyDown:S,onKeyUp:Q,onClick:J}),[g,F,L,h,K,A,S,Q,J]);return Ge(()=>{let f=o?.current,a=f?Yt(f):void 0;f&&a&&f instanceof a.Element&&a.getComputedStyle(f).touchAction==="auto"&&(f.style.touchAction="pan-x pan-y pinch-zoom")},[o]),{pressProps:re,isPressed:d}}import{useMemo as Zt}from"react";function en(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return Zt(()=>{let i=typeof o=="function"?o({...t,defaultClassName:u}):o?`${u} ${o}`:u,l=typeof e=="function"?e({...t,defaultStyle:s||{}}):{...s,...e},y=typeof r=="function"?r({...t,defaultChildren:c}):r??c;return{className:i,style:l,children:y}},[o,e,r,u,c,s,t])}import{useContext as tn}from"react";function oe(n){let{context:e,slot:t}=n,r=tn(e);if(t===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let o=t||Symbol("default");if(!r.slots[o]){let s=new Intl.ListFormat().format(Object.keys(r.slots).map(u=>`"${u}"`)),c=t?`Invalid slot name: "${t}". This slot is not recognized. Please refer to the component's documentation for valid slot names.`:"A slot prop is required. You must provide a valid slot name to render content in this area.";throw new Error(`${c} Valid slot names are ${s}.`)}return r.slots[o]}return r}import{createSyntheticEvent as nn}from"@necto-react/helpers";import{useRef as rn,useCallback as on,useLayoutEffect as sn}from"react";function N(n){let{onBlur:e}=n,t=rn({isFocused:!1,observer:null});sn(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=C(o=>{e?.(o)});return on(o=>{if(o.target instanceof HTMLButtonElement||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=o.target,c=u=>{if(t.current.isFocused=!1,s.disabled){let i=nn(u);r(i)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",c,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){t.current.observer?.disconnect();let u=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[r])}import{useCallback as un,useRef as ln,useLayoutEffect as an,useEffect as cn}from"react";function C(n){let e=ln(n);return(typeof window<"u"?an:cn)(()=>{e.current=n},[n]),un(((...t)=>e.current(...t)),[])}import{useEffect as fn,useState as dn}from"react";function Ho(n){let e=ve(),[t,r]=dn(!1);return fn(()=>{e()&&r(!!n())},[n,e]),t}import{useRef as _e,useState as pn,useEffect as mn}from"react";function yn(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=pn(!1),c=_e(null),u=_e(null),i=C(()=>{if(typeof window>"u"||!c.current)return;let{overflow:y,paddingRight:d}=c.current.style;if(u.current={overflow:y,paddingRight:d},r){let v=c.current===document.body?window.innerWidth:c.current.offsetWidth,T=parseInt(window.getComputedStyle(c.current).paddingRight,10)||0,b=v-c.current.scrollWidth;c.current.style.paddingRight=`${b+T}px`}c.current.style.overflow="hidden",s(!0)}),l=C(()=>{c.current&&u.current&&(c.current.style.overflow=u.current.overflow,r&&(c.current.style.paddingRight=u.current.paddingRight)),s(!1)});return mn(()=>{if(!(typeof window>"u"||typeof document>"u"))return t&&(c.current=typeof t=="string"?document.querySelector(t):t),c.current||(c.current=document.body),e&&i(),()=>{l()}},[e,t,r,i,l]),{isLocked:o,lock:i,unlock:l}}import{useMemo as vn}from"react";import{AriaProps as U}from"@necto/dom";function En(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:c,isExpanded:u,isSelected:i,isChecked:l,isHidden:y,hasPopup:d,valueCurrent:v,valueMin:T,valueMax:b,valueText:m,label:p,labelledBy:x,describedBy:g,controls:F,owns:L}=n;return vn(()=>{let h={},w=[{value:e,attr:U.Invalid},{value:t,attr:U.Disabled},{value:r,attr:U.Readonly},{value:o,attr:U.Required},{value:s,attr:U.Busy},{value:u,attr:U.Expanded},{value:i,attr:U.Selected},{value:y,attr:U.Hidden}];for(let{value:P,attr:K}of w)P!==void 0&&(h[K]=P||void 0);return c!==void 0&&(h[U.Pressed]=c===!1?void 0:c),l!==void 0&&(h[U.Checked]=l===!1?void 0:l),d!==void 0&&(h[U.Haspopup]=d===!1?void 0:d),v!==void 0&&(h[U.Valuenow]=v),T!==void 0&&(h[U.Valuemin]=T),b!==void 0&&(h[U.Valuemax]=b),m!==void 0&&(h[U.Valuetext]=m),p!==void 0&&(h[U.Label]=p),x!==void 0&&(h[U.Labelledby]=x),g!==void 0&&(h[U.Describedby]=g),F!==void 0&&(h[U.Controls]=F),L!==void 0&&(h[U.Owns]=L),h},[e,t,r,o,s,c,u,i,l,y,d,v,T,b,m,p,x,g,F,L])}import{injectStyle as gn}from"@necto/dom";function bn({id:n,css:e,insertionPoint:t,enabled:r=!0,window:o=typeof window<"u"?window:null}){let s=Array.isArray(e)?e.join(`
2
+ `):e;$e(()=>{if(!(!r||!s))return gn(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}import{useRef as Tn,useLayoutEffect as Fn}from"react";function rs(n){let e=Tn(n);return Fn(()=>{e.current=n}),e}import Rn,{useLayoutEffect as hn}from"react";var $e=Rn.useInsertionEffect??hn;import{defu as Ln}from"defu";import{useRef as Z,useCallback as H,useEffect as Sn}from"react";function Un(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=Ln(n,{threshold:500}),u=Z(null),i=Z(null),l=Z(null),y=Z(!1),d=H(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);Sn(()=>d,[d]);let v=H(F=>({type:F,pointerType:i.current??"mouse",target:l.current}),[]),T=H(F=>{e||F.button!==0||F.pointerType!=="mouse"&&(i.current=F.pointerType,l.current=F.currentTarget,y.current=!1,t?.(v("longpressstart")),u.current=setTimeout(()=>{y.current=!0,F.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o?.(v("longpress")),u.current=null},c))},[e,c,t,o,v]),b=H(()=>{i.current!==null&&(d(),!y.current&&r&&r(v("longpressend")),i.current=null,l.current=null)},[d,r,v]),m=H(()=>{d(),i.current!==null&&r&&r(v("longpressend")),i.current=null,l.current=null},[d,r,v]),p=H(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:T,onPointerUp:b,onPointerCancel:m,onContextMenu:p,...!e&&!!o&&!!s&&{"aria-description":s}}}}import{flushSync as Pn}from"react-dom";import{useCallback as ze,useLayoutEffect as Ye,useState as be}from"react";function wn(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=be(t),c=o&&r;Ye(()=>{if(c&&e.current&&"getAnimations"in e.current)for(let v of e.current.getAnimations())v instanceof CSSTransition&&v.cancel()},[e,c]),qe(e,c,ze(()=>s(!1),[]));let[u,i]=be(t);t&&!u?(s(!0),i(!0)):!t&&u&&i(!1);let[l,y]=be(t?"open":"closed");switch(l){case"open":t||y("exiting");break;case"closed":case"exiting":t&&y("open");break}let d=l==="exiting";return qe(e,d,ze(()=>{y(v=>v==="exiting"?"closed":v)},[])),{isEntering:c,isExiting:d,isRendered:t||d}}function qe(n,e,t){Ye(()=>{if(e&&n.current){if(!("getAnimations"in n.current)){t();return}let r=n.current.getAnimations();if(r.length===0){t();return}let o=!1;return Promise.all(r.map(s=>s.finished)).then(()=>{o||Pn(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}import{defu as On}from"defu";import{mergeProps as Mn}from"@necto/mergers";import{useCallback as B,useEffect as ee,useRef as Y}from"react";import{isCtrlKeyPressed as Te,isMac as Kn}from"@necto/platform";import{focusWithoutScrolling as Vn,scrollIntoView as Cn}from"@necto/dom";function kn(n){return Kn()?n.metaKey:n.ctrlKey}function Qe(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function An(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:c,disallowSelectAll:u,escapeBehavior:i,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:d,allowsTabNavigation:v,scrollRef:T,direction:b,orientation:m,onNavigate:p,onFocusItem:x}=On(n,{autoFocus:!1,shouldFocusWrap:!1,disallowEmptySelection:!1,disallowSelectAll:!1,escapeBehavior:"clearSelection",selectOnFocus:!1,disallowTypeAhead:!1,shouldUseVirtualFocus:!1,allowsTabNavigation:!1,isVirtualized:!1,direction:"ltr",orientation:"vertical"}),g=T??r,F=Y({top:0,left:0}),L=Y(e.focusedKey),h=Y(o),w=Y(""),P=Y(null),K=B((a,R,E)=>{a!=null&&(e.setFocusedKey(a,E),p?.(a),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(a):l&&!kn(R)&&e.replaceSelection(a))},[e,l,p]),A=B(a=>{if(x){x(a);return}let R=Qe(r,a);R&&!d&&Vn(R)},[r,d,x]),S=B(a=>{if(!y&&a.key.length===1&&!a.ctrlKey&&!a.metaKey&&!a.altKey){P.current&&clearTimeout(P.current),w.current+=a.key;let E=t.getKeyForSearch?.(w.current,e.focusedKey)??null;E!=null&&(a.preventDefault(),K(E,a)),P.current=setTimeout(()=>{w.current=""},500);return}let R=b==="rtl";switch(a.key){case"ArrowDown":{if(t.getKeyBelow){let E=e.focusedKey!=null?t.getKeyBelow(e.focusedKey):t.getFirstKey?.()??null;E==null&&s&&(E=t.getFirstKey?.()??null),E!=null&&(a.preventDefault(),K(E,a))}break}case"ArrowUp":{if(t.getKeyAbove){let E=e.focusedKey!=null?t.getKeyAbove(e.focusedKey):t.getLastKey?.()??null;E==null&&s&&(E=t.getLastKey?.()??null),E!=null&&(a.preventDefault(),K(E,a))}break}case"ArrowLeft":{if(t.getKeyLeftOf){let E=e.focusedKey!=null?t.getKeyLeftOf(e.focusedKey):null;E==null&&s&&(E=R?t.getFirstKey?.()??null:t.getLastKey?.()??null),E!=null&&(a.preventDefault(),K(E,a,R?"first":"last"))}break}case"ArrowRight":{if(t.getKeyRightOf){let E=e.focusedKey!=null?t.getKeyRightOf(e.focusedKey):null;E==null&&s&&(E=R?t.getLastKey?.()??null:t.getFirstKey?.()??null),E!=null&&(a.preventDefault(),K(E,a,R?"last":"first"))}break}case"Home":{if(t.getFirstKey){a.preventDefault();let E=t.getFirstKey();e.setFocusedKey(E),E!=null&&(Te(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(E):l&&e.replaceSelection(E))}break}case"End":{if(t.getLastKey){a.preventDefault();let E=t.getLastKey();e.setFocusedKey(E),E!=null&&(Te(a)&&a.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(E):l&&e.replaceSelection(E))}break}case"PageDown":{if(t.getKeyPageBelow&&e.focusedKey!=null){let E=t.getKeyPageBelow(e.focusedKey);E!=null&&(a.preventDefault(),K(E,a))}break}case"PageUp":{if(t.getKeyPageAbove&&e.focusedKey!=null){let E=t.getKeyPageAbove(e.focusedKey);E!=null&&(a.preventDefault(),K(E,a))}break}case"a":{Te(a)&&e.selectionMode==="multiple"&&!u&&(a.preventDefault(),e.selectAll());break}case"Escape":{i==="clearSelection"&&!c&&e.selectedKeys.size>0&&(a.stopPropagation(),a.preventDefault(),e.clearSelection());break}case"Tab":{!v&&r.current&&a.shiftKey&&r.current.focus();break}}},[t,e,r,b,s,l,y,u,c,i,v,K]),Q=B(a=>{if(!e.isFocused){if(e.setFocused(!0),e.focusedKey==null){let R=a.relatedTarget,E=R!=null&&!!(a.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING),D=null;E?D=e.lastSelectedKey??t.getLastKey?.()??null:D=e.firstSelectedKey??t.getFirstKey?.()??null,D!=null&&(e.setFocusedKey(D),l&&!e.isSelected(D)&&e.replaceSelection(D))}else g.current&&(g.current.scrollTop=F.current.top,g.current.scrollLeft=F.current.left);e.focusedKey!=null&&A(e.focusedKey)}},[e,t,l,g,A]),J=B(a=>{let R=a.relatedTarget;a.currentTarget.contains(R)||e.setFocused(!1)},[e]),re=B(a=>{g.current===a.target&&a.preventDefault()},[g]);ee(()=>{let a=g.current;if(!a)return()=>{};let R=()=>{F.current={top:a.scrollTop,left:a.scrollLeft}};return a.addEventListener("scroll",R,{passive:!0}),()=>{a.removeEventListener("scroll",R)}},[g]),ee(()=>{if(!h.current)return;let a=null;if(h.current==="first"?a=t.getFirstKey?.()??null:h.current==="last"&&(a=t.getLastKey?.()??null),e.selectedKeys.size>0){for(let R of e.selectedKeys)if(e.canSelectItem?.(R)!==!1){a=R;break}}e.setFocused(!0),e.setFocusedKey(a),a==null&&!d&&r.current&&r.current.focus(),h.current=!1},[t,e,r,d]),ee(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===L.current)return;let a=Qe(r,e.focusedKey);a&&g.current&&Cn(g.current,a),L.current=e.focusedKey},[e.isFocused,e.focusedKey,r,g]),ee(()=>()=>{P.current&&clearTimeout(P.current)},[]);let f=d?void 0:e.focusedKey==null?0:-1;return{collectionProps:Mn({onKeyDown:S,onFocus:Q,onBlur:J,onMouseDown:re,tabIndex:f,"data-orientation":m})}}import{createContext as Dn,useContext as In,useEffect as Hn,useMemo as Fe,useRef as Je,useState as te}from"react";var ne={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Ze={...ne,customError:!0,valid:!1},W={isInvalid:!1,validationErrors:[],validationDetails:ne},et=Dn({}),he="__formValidationState"+Date.now();function Bn(n){if(n[he]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[he];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return Wn(n)}function Wn(n){let{isInvalid:e,validationState:t,name:r,value:o,builtinValidation:s,validate:c,validationBehavior:u="aria"}=n;t&&(e||=t==="invalid");let i=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Ze}:null,l=Fe(()=>{if(!c||o==null)return null;let S=jn(c,o);return Xe(S)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=In(et),d=Fe(()=>r?Array.isArray(r)?r.flatMap(S=>xe(y[S])):xe(y[r]):[],[y,r]),[v,T]=te(y),[b,m]=te(!1);y!==v&&(T(y),m(!1));let p=Fe(()=>Xe(b?[]:d),[b,d]),x=Je(W),[g,F]=te(W),L=Je(W),h=()=>{if(!w)return;P(!1);let S=l||s||x.current;Re(S,L.current)||(L.current=S,F(S))},[w,P]=te(!1);return Hn(h),{realtimeValidation:i||p||l||s||W,displayValidation:u==="native"?i||p||g:i||p||l||s||g,updateValidation(S){u==="aria"&&!Re(g,S)?F(S):x.current=S},resetValidation(){let S=W;Re(S,L.current)||(L.current=S,F(S)),u==="native"&&P(!1),m(!0)},commitValidation(){u==="native"&&P(!0),m(!0)}}}function xe(n){return n?Array.isArray(n)?n:[n]:[]}function jn(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return xe(t)}return[]}function Xe(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Ze}:null}function Re(n,e){return n===e?!0:!!n&&!!e&&n.isInvalid===e.isInvalid&&n.validationErrors.length===e.validationErrors.length&&n.validationErrors.every((t,r)=>t===e.validationErrors[r])&&Object.entries(n.validationDetails).every(([t,r])=>e.validationDetails[t]===r)}function Nn(...n){let e=new Set,t=!1,r={...ne};for(let o of n){for(let s of o.validationErrors)e.add(s);t||=o.isInvalid;for(let s in r)r[s]||=o.validationDetails[s]}return r.valid=!t,{isInvalid:t,validationErrors:[...e],validationDetails:r}}export{W as DEFAULT_VALIDATION_RESULT,et as FormValidationContext,ne as VALID_VALIDITY_STATE,G as getInteractionModality,Nn as mergeValidation,he as privateValidationStateProp,wn as useAnimation,En as useAriaProps,An as useCollectionNavigation,ot as useContextProps,C as useEffectEvent,ut as useElementVisibility,j as useFocus,gt as useFocusRing,Tt as useFocusVisible,_ as useFocusVisibleListener,le as useFocusWithin,yt as useFocusable,Bn as useFormState,$ as useGlobalListeners,Ht as useHover,Gt as useId,$e as useIsomorphicInsertionEffect,ue as useKeyboard,rs as useLatestRef,Un as useLongPress,ve as useMounted,Xt as usePress,en as useRenderer,yn as useScrollLock,oe as useSlottedContext,bn as useStyleInjection,Ho as useSupported,N as useSyntheticBlurEvent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@necto-react/hooks",
3
- "version": "2.14.11",
3
+ "version": "2.14.12",
4
4
  "type": "module",
5
5
  "description": "Necto's standard library for providing utility hooks for React applications.",
6
6
  "files": [
@@ -41,14 +41,14 @@
41
41
  "defu": "^6.1.4",
42
42
  "react-aria": "^3.39.0",
43
43
  "std-env": "^3.9.0",
44
- "@necto-react/helpers": "2.6.9",
45
- "@necto-react/types": "2.4.1",
46
- "@necto/id": "1.6.5",
47
- "@necto/strings": "1.6.1",
44
+ "@necto-react/helpers": "2.6.10",
45
+ "@necto/dom": "1.6.10",
48
46
  "@necto/mergers": "1.5.1",
49
47
  "@necto/platform": "1.5.1",
50
48
  "@necto/types": "1.3.1",
51
- "@necto/dom": "1.6.9"
49
+ "@necto/strings": "1.6.1",
50
+ "@necto/id": "1.6.5",
51
+ "@necto-react/types": "2.4.1"
52
52
  },
53
53
  "scripts": {
54
54
  "test": "vitest",