@necto-react/hooks 2.14.15 → 2.14.17

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 Mt=Object.create;var ye=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Ct=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var At=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},Be=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Vt(e))!kt.call(n,o)&&o!==t&&ye(n,o,{get:()=>e[o],enumerable:!(r=Kt(e,o))||r.enumerable});return n};var We=(n,e,t)=>(t=n!=null?Mt(Ct(n)):{},Be(e||!n||!n.__esModule?ye(t,"default",{value:n,enumerable:!0}):t,n)),Dt=n=>Be(ye({},"__esModule",{value:!0}),n);var qt={};At(qt,{DEFAULT_VALIDATION_RESULT:()=>J,FormValidationContext:()=>He,VALID_VALIDITY_STATE:()=>de,getInteractionModality:()=>ne,mergeValidation:()=>Ot,privateValidationStateProp:()=>Oe,useAnimation:()=>Rt,useAriaProps:()=>yt,useCollectionNavigation:()=>St,useContextProps:()=>Ne,useEffectEvent:()=>N,useElementVisibility:()=>Ge,useFocus:()=>ee,useFocusRing:()=>ze,useFocusVisible:()=>Ye,useFocusVisibleListener:()=>re,useFocusWithin:()=>Fe,useFocusable:()=>$e,useFormState:()=>wt,useGlobalListeners:()=>ie,useHover:()=>st,useId:()=>ut,useIsomorphicInsertionEffect:()=>Ae,useKeyboard:()=>Te,useLatestRef:()=>Nt,useLongPress:()=>bt,useMounted:()=>Le,usePress:()=>lt,useRenderer:()=>ct,useScrollLock:()=>pt,useSlottedContext:()=>Ee,useStyleInjection:()=>Et,useSupported:()=>jt,useSyntheticBlurEvent:()=>te});module.exports=Dt(qt);var ve=require("react"),je=require("@necto/mergers");function Ne({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,je.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 Ge(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 $e(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 It=null;function ze(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=(0,G.useRef)({isFocused:r,isFocusVisible:r||It!=="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 qe=require("react");function Ye(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=(0,qe.useState)(t||ne()!=="pointer");return re({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var oe=new Map,Re=new Set,Qe=!1,Ke=null,Je=!1,V={get hasEventBeforeFocus(){return Qe},set hasEventBeforeFocus(n){Qe=n},get hasBlurredWindowRecently(){return Je},set hasBlurredWindowRecently(n){Je=n},get currentModality(){return Ke},set currentModality(n){Ke=n}};function ne(){return Ke}var Xe=require("std-env"),Ze=require("react"),et=require("@necto-react/helpers"),se=require("@necto/dom");function Ce(n,e){Re.forEach(t=>t(n,e))}function Ht(n){return!(n.metaKey||Xe.isMacOS&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function tt(n){Ht(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 nt(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 rt(){V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!0}function Bt(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",tt,!0),t.addEventListener("click",Ve,!0),e.addEventListener("focus",nt,!0),e.addEventListener("blur",rt,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",Ve,!0),oe.set(e,{focus:r})}function Wt(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",tt,!0),t.removeEventListener("click",Ve,!0),e.removeEventListener("focus",nt,!0),e.removeEventListener("blur",rt,!1),oe.delete(e)}function re(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(Bt(),(0,Ze.useEffect)(()=>{let o=(s,c)=>{(0,et.isKeyboardFocusEvent)(!!r?.isTextInput,s,c)&&e(V.currentModality!=="pointer")};return Re.add(o),()=>{Re.delete(o),Wt()}},t))}var ae=require("react"),ot=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,ot.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 st(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 it={prefix:"",current:0},ce=new Map,fe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{ce.delete(n)}):null;var H=We(require("react"),1);function ut(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(++it.current);return`${e}-${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 ke=require("@necto-react/helpers");function Te(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?(0,ke.createEventHandler)(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?(0,ke.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 lt(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 at=require("react");function ct(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return(0,at.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 ft=require("react");function Ee(n){let{context:e,slot:t}=n,r=(0,ft.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 dt=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,dt.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 jt(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 pt(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 mt=require("react"),S=require("@necto/dom");function yt(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,mt.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 vt=require("@necto/dom");function Et({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;Ae(()=>{if(!(!r||!s))return(0,vt.injectStyle)(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}var Ue=require("react");function Nt(n){let e=(0,Ue.useRef)(n);return(0,Ue.useLayoutEffect)(()=>{e.current=n}),e}var Pe=We(require("react"),1),Ae=Pe.default.useInsertionEffect??Pe.useLayoutEffect;var gt=require("defu"),I=require("react");function bt(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=(0,gt.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 Ft=require("react-dom"),j=require("react");function Rt(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]),Tt(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 Tt(e,d,(0,j.useCallback)(()=>{y(v=>v==="exiting"?"closed":v)},[])),{isEntering:c,isExiting:d,isRendered:t||d}}function Tt(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,Ft.flushSync)(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}var xt=require("defu"),Lt=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 ht(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function St(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,xt.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=ht(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=ht(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,Lt.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},Pt={...de,customError:!0,valid:!1},J={isInvalid:!1,validationErrors:[],validationDetails:de},He=(0,O.createContext)({}),Oe="__formValidationState"+Date.now();function wt(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 $t(n)}function $t(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:Pt}:null,l=(0,O.useMemo)(()=>{if(!c||o==null)return null;let P=zt(c,o);return Ut(P)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=(0,O.useContext)(He),d=(0,O.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>Ie(y[P])):Ie(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)(()=>Ut(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;De(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"&&!De(g,P)?F(P):x.current=P},resetValidation(){let P=J;De(P,U.current)||(U.current=P,F(P)),u==="native"&&M(!1),m(!0)},commitValidation(){u==="native"&&M(!0),m(!0)}}}function Ie(n){return n?Array.isArray(n)?n:[n]:[]}function zt(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return Ie(t)}return[]}function Ut(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Pt}:null}function De(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 Ot(...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 Mt=Object.create;var ye=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Ct=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var At=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},Be=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Vt(e))!kt.call(n,o)&&o!==t&&ye(n,o,{get:()=>e[o],enumerable:!(r=Kt(e,o))||r.enumerable});return n};var We=(n,e,t)=>(t=n!=null?Mt(Ct(n)):{},Be(e||!n||!n.__esModule?ye(t,"default",{value:n,enumerable:!0}):t,n)),Dt=n=>Be(ye({},"__esModule",{value:!0}),n);var qt={};At(qt,{DEFAULT_VALIDATION_RESULT:()=>J,FormValidationContext:()=>He,VALID_VALIDITY_STATE:()=>de,getInteractionModality:()=>ne,mergeValidation:()=>Ot,privateValidationStateProp:()=>Oe,useAnimation:()=>Rt,useAriaProps:()=>yt,useCollectionNavigation:()=>St,useContextProps:()=>Ne,useEffectEvent:()=>N,useElementVisibility:()=>Ge,useFocus:()=>ee,useFocusRing:()=>ze,useFocusVisible:()=>Ye,useFocusVisibleListener:()=>re,useFocusWithin:()=>Fe,useFocusable:()=>$e,useFormState:()=>wt,useGlobalListeners:()=>ie,useHover:()=>st,useId:()=>ut,useIsomorphicInsertionEffect:()=>Ae,useKeyboard:()=>Te,useLatestRef:()=>Nt,useLongPress:()=>bt,useMounted:()=>Le,usePress:()=>lt,useRenderer:()=>ct,useScrollLock:()=>pt,useSlottedContext:()=>Ee,useStyleInjection:()=>Et,useSupported:()=>jt,useSyntheticBlurEvent:()=>te});module.exports=Dt(qt);var ve=require("react"),je=require("@necto/mergers");function Ne({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,je.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,p={...l.defaultStyle,...y},v=typeof n.style=="function"?n.style({...l,defaultStyle:p}):n.style;return{...p,...v}}:i.style={...s.style,...n.style}),[i,u]}var B=require("react");function Ge(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,p]=(0,B.useState)(!1),[v,T]=(0,B.useState)(null),b=(0,B.useRef)(!1),m=(0,B.useRef)(null),d=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),p(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(d,{root:o,rootMargin:r,threshold:g}),m.current.observe(i),()=>{m.current&&m.current.disconnect()}},[s,i,o,r,t,e,d]),[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),p=y?(0,Y.getActiveElement)(y):(0,Y.getActiveElement)();l.target===l.currentTarget&&p===(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 $e(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 p=l;(0,W.runAfterTransition)(()=>{i&&(0,W.getActiveElement)(i)===p&&e.current?.isConnected&&(0,W.focusWithoutScrolling)(e.current)})}else(0,W.focusWithoutScrolling)(e.current);u.current=!1},[e,l,i]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:(0,_e.mergeProps)(s??{},c,{tabIndex:y})}}var G=require("react");var It=null;function ze(n={}){let{within:e=!1,isTextInput:t=!1,autoFocus:r=!1}=n,o=(0,G.useRef)({isFocused:r,isFocusVisible:r||It!=="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:p={}}=ee({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:v={}}=Fe({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:u,focusProps:e?v:p}}var qe=require("react");function Ye(n={}){let{isTextInput:e,autoFocus:t}=n,[r,o]=(0,qe.useState)(t||ne()!=="pointer");return re({fn:s=>o(s),deps:[e],opts:{isTextInput:e}}),{isFocusVisible:r}}var oe=new Map,Re=new Set,Qe=!1,Ke=null,Je=!1,V={get hasEventBeforeFocus(){return Qe},set hasEventBeforeFocus(n){Qe=n},get hasBlurredWindowRecently(){return Je},set hasBlurredWindowRecently(n){Je=n},get currentModality(){return Ke},set currentModality(n){Ke=n}};function ne(){return Ke}var Xe=require("std-env"),Ze=require("react"),et=require("@necto-react/helpers"),se=require("@necto/dom");function Ce(n,e){Re.forEach(t=>t(n,e))}function Ht(n){return!(n.metaKey||Xe.isMacOS&&n.altKey||n.ctrlKey||["Control","Shift","Meta"].includes(n.key))}function tt(n){Ht(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 nt(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 rt(){V.hasEventBeforeFocus=!1,V.hasBlurredWindowRecently=!0}function Bt(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",tt,!0),t.addEventListener("click",Ve,!0),e.addEventListener("focus",nt,!0),e.addEventListener("blur",rt,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",Ve,!0),oe.set(e,{focus:r})}function Wt(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",tt,!0),t.removeEventListener("click",Ve,!0),e.removeEventListener("focus",nt,!0),e.removeEventListener("blur",rt,!1),oe.delete(e)}function re(n){let{fn:e,deps:t,opts:r}=n;typeof window>"u"||typeof document>"u"||(Bt(),(0,Ze.useEffect)(()=>{let o=(s,c)=>{(0,et.isKeyboardFocusEvent)(!!r?.isTextInput,s,c)&&e(V.currentModality!=="pointer")};return Re.add(o),()=>{Re.delete(o),Wt()}},t))}var ae=require("react"),ot=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)(p=>{p.currentTarget.contains(p.target)&&s.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(s.current.isFocusWithin=!1,u(),r&&r(p),o&&o(!1))},[r,o,u]),l=te({onBlur:i}),y=(0,ae.useCallback)(p=>{if(!p.currentTarget.contains(p.target))return;let v=(0,_.getOwnerDocument)(p.target);if(!v)return;let T=(0,_.getActiveElement)(v);if(!s.current.isFocusWithin&&T===(0,_.getEventTarget)(p.nativeEvent)){t&&t(p),o&&o(!0),s.current.isFocusWithin=!0,l(p);let b=p.currentTarget;c(v,"focus",m=>{if(s.current.isFocusWithin&&!(0,_.nodeContains)(b,m.target)&&v.defaultView&&typeof v.defaultView.FocusEvent=="function"){let d=new v.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(d,"target",{value:b}),Object.defineProperty(d,"currentTarget",{value:b});let x=(0,ot.createSyntheticEvent)(d);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 st(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(),p=(0,A.useCallback)(()=>{u.current.ignoreEmulated=!0,setTimeout(()=>{u.current.ignoreEmulated=!1},50)},[]);(0,A.useEffect)(()=>{let m=x=>{x.pointerType==="touch"&&p()};if(typeof document>"u")return;let d=u.current;return d.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):he.isTest&&document.addEventListener("touchend",p),()=>{d.hoverCount--,d.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):he.isTest&&document.removeEventListener("touchend",p))}},[p]);let v=(0,A.useCallback)((m,d)=>{if(o||d==="touch"||i.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target)))return;i.isHovered=!0,i.pointerType=d,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:d}),t?.(!0),c(!0))},[o,e,t,l,i]),T=(0,A.useCallback)((m,d)=>{d==="touch"||!i.isHovered||!i.target||(i.isHovered=!1,i.pointerType="",i.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:d}),t?.(!1),c(!1))},[r,t,y,i.target,i]),b=(0,A.useMemo)(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=d=>{u.current.ignoreEmulated&&d.pointerType==="mouse"||v(d,d.pointerType)},m.onPointerLeave=d=>{!o&&d.currentTarget instanceof Element&&d.currentTarget.contains(d.target)&&T(d,d.pointerType)}):he.isTest&&(m.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=d=>{!i.ignoreEmulatedMouseEvents&&!u.current.ignoreEmulated&&v(d.nativeEvent,"mouse"),i.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=d=>{!o&&d.currentTarget.contains(d.target)&&T(d.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 it={prefix:"",current:0},ce=new Map,fe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{ce.delete(n)}):null;var H=We(require("react"),1);function ut(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(++it.current);return`${e}-${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 ke=require("@necto-react/helpers");function Te(n){return{keyboardProps:n.isDisabled?{}:{onKeyDown:n.onKeyDown?(0,ke.createEventHandler)(e=>n.onKeyDown?.(e.nativeEvent)):void 0,onKeyUp:n.onKeyUp?(0,ke.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 lt(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:c,onPressEnd:u,onPressChange:i,onPressUp:l,onClick:y}=n,[p,v]=(0,L.useState)(!1),T=(0,L.useRef)(!1),b=(0,L.useRef)(null),m=(0,L.useRef)(!1),d=(0,L.useCallback)(f=>{p!==f&&(v(f),i?.(f))},[p,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,d(!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,d,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,d(!0);let a=C("pressstart","mouse",f);c?.(a),window.addEventListener("mouseup",x,{once:!0})},[e,t,r,c,d,x]),F=(0,L.useCallback)(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,d(!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,d,r]),U=(0,L.useCallback)(f=>{p&&(d(!1),u?.(C("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&(0,D.restoreTextSelection)(f.currentTarget))},[p,d,u,r]),h=(0,L.useCallback)(f=>{m.current&&!p&&(d(!0),c?.(C("pressstart","mouse",f)))},[p,c,d]),K=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,d(!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,d,r]),M=(0,L.useCallback)(f=>{if(!m.current)return;m.current=!1,d(!1),!r&&b.current instanceof HTMLElement&&(0,D.restoreTextSelection)(b.current);let a={...C("pressend","touch",f),target:f.target};u?.(a)},[u,d,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,d(!0),c?.(C("pressstart","touch",f)),window.addEventListener("touchend",K,{once:!0}),window.addEventListener("touchcancel",M,{once:!0}))},[e,c,d,r,K,M]),X=(0,L.useCallback)(f=>{if(e||!m.current)return;m.current=!1,d(!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,d,r]),P=(0,L.useCallback)(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!p&&(f.key===" "&&f.preventDefault(),r||(0,D.disableTextSelection)(),d(!0),m.current=!0,c?.(C("pressstart","keyboard",f)))},[e,p,c,d,r]),pe=(0,L.useCallback)(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&p){d(!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,p,s,u,l,d,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:p}}var at=require("react");function ct(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return(0,at.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 ft=require("react");function Ee(n){let{context:e,slot:t}=n,r=(0,ft.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 dt=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,dt.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 jt(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 pt(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:p}=c.current.style;if(u.current={overflow:y,paddingRight:p},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,i,l]),{isLocked:o,lock:i,unlock:l}}var mt=require("react"),S=require("@necto/dom");function yt(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:c,isExpanded:u,isSelected:i,isChecked:l,isHidden:y,hasPopup:p,valueCurrent:v,valueMin:T,valueMax:b,valueText:m,label:d,labelledBy:x,describedBy:g,controls:F,owns:U}=n;return(0,mt.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),p!==void 0&&(h[S.AriaProps.Haspopup]=p===!1?void 0:p),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),d!==void 0&&(h[S.AriaProps.Label]=d),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,p,v,T,b,m,d,x,g,F,U])}var vt=require("@necto/dom");function Et({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;Ae(()=>{if(!(!r||!s))return(0,vt.injectStyle)(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}var Ue=require("react");function Nt(n){let e=(0,Ue.useRef)(n);return(0,Ue.useLayoutEffect)(()=>{e.current=n}),e}var Pe=We(require("react"),1),Ae=Pe.default.useInsertionEffect??Pe.useLayoutEffect;var gt=require("defu"),I=require("react");function bt(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=(0,gt.defu)(n,{threshold:500}),u=(0,I.useRef)(null),i=(0,I.useRef)(null),l=(0,I.useRef)(null),y=(0,I.useRef)(!1),p=(0,I.useCallback)(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);(0,I.useEffect)(()=>p,[p]);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&&(p(),!y.current&&r&&r(v("longpressend")),i.current=null,l.current=null)},[p,r,v]),m=(0,I.useCallback)(()=>{p(),i.current!==null&&r&&r(v("longpressend")),i.current=null,l.current=null},[p,r,v]),d=(0,I.useCallback)(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:T,onPointerUp:b,onPointerCancel:m,onContextMenu:d,...!e&&!!o&&!!s&&{"aria-description":s}}}}var Ft=require("react-dom"),j=require("react");function Rt(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]),Tt(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 p=l==="exiting";return Tt(e,p,(0,j.useCallback)(()=>{y(v=>v==="exiting"?"closed":v)},[])),{isEntering:c,isExiting:p,isRendered:t||p}}function Tt(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,Ft.flushSync)(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}var xt=require("defu"),Lt=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 ht(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function St(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:c,disallowSelectAll:u,escapeBehavior:i,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:p,allowsTabNavigation:v,scrollRef:T,direction:b,orientation:m,onNavigate:d,onFocusItem:x}=(0,xt.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),d?.(a),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(a):l&&!_t(R)&&e.replaceSelection(a))},[e,l,d]),X=(0,w.useCallback)(a=>{if(x){x(a);return}let R=ht(r,a);R&&!p&&(0,we.focusWithoutScrolling)(R)},[r,p,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&&!p&&r.current&&r.current.focus(),h.current=!1},[t,e,r,p]),(0,w.useEffect)(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===U.current)return;let a=ht(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=p?void 0:e.focusedKey==null?0:-1;return{collectionProps:(0,Lt.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},Pt={...de,customError:!0,valid:!1},J={isInvalid:!1,validationErrors:[],validationDetails:de},He=(0,O.createContext)({}),Oe=`__formValidationState${Date.now()}`;function wt(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 $t(n)}function $t(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:Pt}:null,l=(0,O.useMemo)(()=>{if(!c||o==null)return null;let P=zt(c,o);return Ut(P)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=(0,O.useContext)(He),p=(0,O.useMemo)(()=>r?Array.isArray(r)?r.flatMap(P=>Ie(y[P])):Ie(y[r]):[],[y,r]),[v,T]=(0,O.useState)(y),[b,m]=(0,O.useState)(!1);y!==v&&(T(y),m(!1));let d=(0,O.useMemo)(()=>Ut(b?[]:p),[b,p]),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;De(P,U.current)||(U.current=P,F(P))},[K,M]=(0,O.useState)(!1);return(0,O.useEffect)(h),{realtimeValidation:i||d||l||s||J,displayValidation:u==="native"?i||d||g:i||d||l||s||g,updateValidation(P){u==="aria"&&!De(g,P)?F(P):x.current=P},resetValidation(){let P=J;De(P,U.current)||(U.current=P,F(P)),u==="native"&&M(!1),m(!0)},commitValidation(){u==="native"&&M(!0),m(!0)}}}function Ie(n){return n?Array.isArray(n)?n:[n]:[]}function zt(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return Ie(t)}return[]}function Ut(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Pt}:null}function De(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 Ot(...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});
package/dist/index.d.cts CHANGED
@@ -707,6 +707,14 @@ interface UsePressReturn {
707
707
  isPressed: boolean;
708
708
  }
709
709
 
710
+ /**
711
+ * Copyright (c) Corinvo, LLC. and affiliates.
712
+ *
713
+ * This source code is licensed under the MIT license found in the
714
+ * LICENSE file in the root directory of this source tree.
715
+ *
716
+ */
717
+
710
718
  /**
711
719
  * Provides press (mouse, touch, keyboard) interaction logic for UI components.
712
720
  * Handles accessibility, text selection, and emulated event quirks for consistent press behavior.
package/dist/index.d.ts CHANGED
@@ -707,6 +707,14 @@ interface UsePressReturn {
707
707
  isPressed: boolean;
708
708
  }
709
709
 
710
+ /**
711
+ * Copyright (c) Corinvo, LLC. and affiliates.
712
+ *
713
+ * This source code is licensed under the MIT license found in the
714
+ * LICENSE file in the root directory of this source tree.
715
+ *
716
+ */
717
+
710
718
  /**
711
719
  * Provides press (mouse, touch, keyboard) interaction logic for UI components.
712
720
  * Handles accessibility, text selection, and emulated event quirks for consistent press behavior.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var so=Object.create;var On=Object.defineProperty;var uo=Object.getOwnPropertyDescriptor;var io=Object.getOwnPropertyNames;var ao=Object.getPrototypeOf,co=Object.prototype.hasOwnProperty;var we=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var lo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of io(t))!co.call(e,s)&&s!==r&&On(e,s,{get:()=>t[s],enumerable:!(o=uo(t,s))||o.enumerable});return e};var K=(e,t,r)=>(r=e!=null?so(ao(e)):{},lo(t||!e||!e.__esModule?On(r,"default",{value:e,enumerable:!0}):r,e));var In=we(A=>{"use strict";var Lt=Symbol.for("react.transitional.element"),fo=Symbol.for("react.portal"),po=Symbol.for("react.fragment"),yo=Symbol.for("react.strict_mode"),mo=Symbol.for("react.profiler"),Eo=Symbol.for("react.consumer"),go=Symbol.for("react.context"),vo=Symbol.for("react.forward_ref"),ho=Symbol.for("react.suspense"),To=Symbol.for("react.memo"),Cn=Symbol.for("react.lazy"),bo=Symbol.for("react.activity"),Sn=Symbol.iterator;function Ro(e){return e===null||typeof e!="object"?null:(e=Sn&&e[Sn]||e["@@iterator"],typeof e=="function"?e:null)}var Ln={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pn=Object.assign,Dn={};function Le(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Ln}Le.prototype.isReactComponent={};Le.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")};Le.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mn(){}Mn.prototype=Le.prototype;function Pt(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Ln}var Dt=Pt.prototype=new Mn;Dt.constructor=Pt;Pn(Dt,Le.prototype);Dt.isPureReactComponent=!0;var _n=Array.isArray;function Ct(){}var B={H:null,A:null,T:null,S:null},Fn=Object.prototype.hasOwnProperty;function Mt(e,t,r){var o=r.ref;return{$$typeof:Lt,type:e,key:t,ref:o!==void 0?o:null,props:r}}function Oo(e,t){return Mt(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lt}function So(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var An=/\/+/g;function wt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?So(""+e.key):t.toString(36)}function _o(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ct,Ct):(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 Ce(e,t,r,o,s){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(u){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Lt:case fo:l=!0;break;case Cn:return l=e._init,Ce(l(e._payload),t,r,o,s)}}if(l)return s=s(e),l=o===""?"."+wt(e,0):o,_n(s)?(r="",l!=null&&(r=l.replace(An,"$&/")+"/"),Ce(s,t,r,"",function(p){return p})):s!=null&&(Ft(s)&&(s=Oo(s,r+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(An,"$&/")+"/")+l)),t.push(s)),1;l=0;var d=o===""?".":o+":";if(_n(e))for(var f=0;f<e.length;f++)o=e[f],u=d+wt(o,f),l+=Ce(o,t,r,u,s);else if(f=Ro(e),typeof f=="function")for(e=f.call(e),f=0;!(o=e.next()).done;)o=o.value,u=d+wt(o,f++),l+=Ce(o,t,r,u,s);else if(u==="object"){if(typeof e.then=="function")return Ce(_o(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 tt(e,t,r){if(e==null)return e;var o=[],s=0;return Ce(e,o,"","",function(u){return t.call(r,u,s++)}),o}function Ao(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 wn=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)},wo={map:tt,forEach:function(e,t,r){tt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return tt(e,function(){t++}),t},toArray:function(e){return tt(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}};A.Activity=bo;A.Children=wo;A.Component=Le;A.Fragment=po;A.Profiler=mo;A.PureComponent=Pt;A.StrictMode=yo;A.Suspense=ho;A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B;A.__COMPILER_RUNTIME={__proto__:null,c:function(e){return B.H.useMemoCache(e)}};A.cache=function(e){return function(){return e.apply(null,arguments)}};A.cacheSignal=function(){return null};A.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Pn({},e.props),s=e.key;if(t!=null)for(u in t.key!==void 0&&(s=""+t.key),t)!Fn.call(t,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&t.ref===void 0||(o[u]=t[u]);var u=arguments.length-2;if(u===1)o.children=r;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];o.children=l}return Mt(e.type,s,o)};A.createContext=function(e){return e={$$typeof:go,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Eo,_context:e},e};A.createElement=function(e,t,r){var o,s={},u=null;if(t!=null)for(o in t.key!==void 0&&(u=""+t.key),t)Fn.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 Mt(e,u,s)};A.createRef=function(){return{current:null}};A.forwardRef=function(e){return{$$typeof:vo,render:e}};A.isValidElement=Ft;A.lazy=function(e){return{$$typeof:Cn,_payload:{_status:-1,_result:e},_init:Ao}};A.memo=function(e,t){return{$$typeof:To,type:e,compare:t===void 0?null:t}};A.startTransition=function(e){var t=B.T,r={};B.T=r;try{var o=e(),s=B.S;s!==null&&s(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Ct,wn)}catch(u){wn(u)}finally{t!==null&&r.types!==null&&(t.types=r.types),B.T=t}};A.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()};A.use=function(e){return B.H.use(e)};A.useActionState=function(e,t,r){return B.H.useActionState(e,t,r)};A.useCallback=function(e,t){return B.H.useCallback(e,t)};A.useContext=function(e){return B.H.useContext(e)};A.useDebugValue=function(){};A.useDeferredValue=function(e,t){return B.H.useDeferredValue(e,t)};A.useEffect=function(e,t){return B.H.useEffect(e,t)};A.useEffectEvent=function(e){return B.H.useEffectEvent(e)};A.useId=function(){return B.H.useId()};A.useImperativeHandle=function(e,t,r){return B.H.useImperativeHandle(e,t,r)};A.useInsertionEffect=function(e,t){return B.H.useInsertionEffect(e,t)};A.useLayoutEffect=function(e,t){return B.H.useLayoutEffect(e,t)};A.useMemo=function(e,t){return B.H.useMemo(e,t)};A.useOptimistic=function(e,t){return B.H.useOptimistic(e,t)};A.useReducer=function(e,t,r){return B.H.useReducer(e,t,r)};A.useRef=function(e){return B.H.useRef(e)};A.useState=function(e){return B.H.useState(e)};A.useSyncExternalStore=function(e,t,r){return B.H.useSyncExternalStore(e,t,r)};A.useTransition=function(){return B.H.useTransition()};A.version="19.2.0"});var Un=we((_,nt)=>{"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=cn&&n[cn]||n["@@iterator"],typeof n=="function"?n:null)}function r(n,a){n=(n=n.constructor)&&(n.displayName||n.name)||"ReactClass";var y=n+"."+a;ln[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),ln[y]=!0)}function o(n,a,y){this.props=n,this.context=a,this.refs=_t,this.updater=y||fn}function s(){}function u(n,a,y){this.props=n,this.context=a,this.refs=_t,this.updater=y||fn}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===eo?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Rt:return"Fragment";case rn:return"Profiler";case nn:return"StrictMode";case un:return"Suspense";case Jr:return"SuspenseList";case an: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 on:return n.displayName||"Context";case Ot:return(n._context.displayName||"Context")+".Consumer";case sn:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case St:return a=n.displayName||null,a!==null?a:p(n.type)||"Memo";case xe:a=n._payload,n=n._init;try{return p(n(a))}catch{}}return null}function b(n){if(n===Rt)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===xe)return"<...>";try{var a=p(n);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function c(){var n=D.A;return n===null?null:n.getOwner()}function i(){return Error("react-stack-top-frame")}function E(n){if(Xe.call(n,"key")){var a=Object.getOwnPropertyDescriptor(n,"key").get;if(a&&a.isReactWarning)return!1}return n.key!==void 0}function O(n,a){function y(){mn||(mn=!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 gn[n]||(gn[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,M){var C=y.ref;return n={$$typeof:S,type:n,key:a,props:y,_owner:h},(C!==void 0?C: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,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 L(n){P(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===xe&&(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===S}function j(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),j(""+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 V(n,a,y,h,R){var M=typeof n;(M==="undefined"||M==="boolean")&&(n=null);var C=!1;if(n===null)C=!0;else switch(M){case"bigint":case"string":case"number":C=!0;break;case"object":switch(n.$$typeof){case S:case ce:C=!0;break;case xe:return C=n._init,V(C(n._payload),a,y,h,R)}}if(C){C=n,R=R(C);var N=h===""?"."+U(C,0):h;return pn(R)?(y="",N!=null&&(y=N.replace(hn,"$&/")+"/"),V(R,a,y,"",function(fe){return fe})):R!=null&&(P(R)&&(R.key!=null&&(C&&C.key===R.key||f(R.key)),y=k(R,y+(R.key==null||C&&C.key===R.key?"":(""+R.key).replace(hn,"$&/")+"/")+N),h!==""&&C!=null&&P(C)&&C.key==null&&C._store&&!C._store.validated&&(y._store.validated=2),R=y),a.push(R)),1}if(C=0,N=h===""?".":h+":",pn(n))for(var F=0;F<n.length;F++)h=n[F],M=N+U(h,F),C+=V(h,a,y,M,R);else if(F=t(n),typeof F=="function")for(F===n.entries&&(vn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vn=!0),n=F.call(n),F=0;!(h=n.next()).done;)h=h.value,M=N+U(h,F++),C+=V(h,a,y,M,R);else if(M==="object"){if(typeof n.then=="function")return V(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 C}function G(n,a,y){if(n==null)return n;var h=[],R=0;return V(n,h,"","",function(M){return a.call(y,M,R++)}),h}function le(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 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)}}),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
1
+ "use strict";(()=>{var so=Object.create;var On=Object.defineProperty;var uo=Object.getOwnPropertyDescriptor;var io=Object.getOwnPropertyNames;var ao=Object.getPrototypeOf,co=Object.prototype.hasOwnProperty;var we=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var lo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of io(t))!co.call(e,s)&&s!==r&&On(e,s,{get:()=>t[s],enumerable:!(o=uo(t,s))||o.enumerable});return e};var K=(e,t,r)=>(r=e!=null?so(ao(e)):{},lo(t||!e||!e.__esModule?On(r,"default",{value:e,enumerable:!0}):r,e));var In=we(A=>{"use strict";var Lt=Symbol.for("react.transitional.element"),fo=Symbol.for("react.portal"),po=Symbol.for("react.fragment"),yo=Symbol.for("react.strict_mode"),mo=Symbol.for("react.profiler"),Eo=Symbol.for("react.consumer"),go=Symbol.for("react.context"),vo=Symbol.for("react.forward_ref"),ho=Symbol.for("react.suspense"),To=Symbol.for("react.memo"),Cn=Symbol.for("react.lazy"),bo=Symbol.for("react.activity"),Sn=Symbol.iterator;function Ro(e){return e===null||typeof e!="object"?null:(e=Sn&&e[Sn]||e["@@iterator"],typeof e=="function"?e:null)}var Ln={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pn=Object.assign,Dn={};function Le(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Ln}Le.prototype.isReactComponent={};Le.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")};Le.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mn(){}Mn.prototype=Le.prototype;function Pt(e,t,r){this.props=e,this.context=t,this.refs=Dn,this.updater=r||Ln}var Dt=Pt.prototype=new Mn;Dt.constructor=Pt;Pn(Dt,Le.prototype);Dt.isPureReactComponent=!0;var _n=Array.isArray;function Ct(){}var B={H:null,A:null,T:null,S:null},Fn=Object.prototype.hasOwnProperty;function Mt(e,t,r){var o=r.ref;return{$$typeof:Lt,type:e,key:t,ref:o!==void 0?o:null,props:r}}function Oo(e,t){return Mt(e.type,t,e.props)}function Ft(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lt}function So(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var An=/\/+/g;function wt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?So(""+e.key):t.toString(36)}function _o(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ct,Ct):(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 Ce(e,t,r,o,s){var u=typeof e;(u==="undefined"||u==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(u){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Lt:case fo:l=!0;break;case Cn:return l=e._init,Ce(l(e._payload),t,r,o,s)}}if(l)return s=s(e),l=o===""?"."+wt(e,0):o,_n(s)?(r="",l!=null&&(r=l.replace(An,"$&/")+"/"),Ce(s,t,r,"",function(p){return p})):s!=null&&(Ft(s)&&(s=Oo(s,r+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(An,"$&/")+"/")+l)),t.push(s)),1;l=0;var d=o===""?".":o+":";if(_n(e))for(var f=0;f<e.length;f++)o=e[f],u=d+wt(o,f),l+=Ce(o,t,r,u,s);else if(f=Ro(e),typeof f=="function")for(e=f.call(e),f=0;!(o=e.next()).done;)o=o.value,u=d+wt(o,f++),l+=Ce(o,t,r,u,s);else if(u==="object"){if(typeof e.then=="function")return Ce(_o(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 tt(e,t,r){if(e==null)return e;var o=[],s=0;return Ce(e,o,"","",function(u){return t.call(r,u,s++)}),o}function Ao(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 wn=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)},wo={map:tt,forEach:function(e,t,r){tt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return tt(e,function(){t++}),t},toArray:function(e){return tt(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}};A.Activity=bo;A.Children=wo;A.Component=Le;A.Fragment=po;A.Profiler=mo;A.PureComponent=Pt;A.StrictMode=yo;A.Suspense=ho;A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B;A.__COMPILER_RUNTIME={__proto__:null,c:function(e){return B.H.useMemoCache(e)}};A.cache=function(e){return function(){return e.apply(null,arguments)}};A.cacheSignal=function(){return null};A.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Pn({},e.props),s=e.key;if(t!=null)for(u in t.key!==void 0&&(s=""+t.key),t)!Fn.call(t,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&t.ref===void 0||(o[u]=t[u]);var u=arguments.length-2;if(u===1)o.children=r;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];o.children=l}return Mt(e.type,s,o)};A.createContext=function(e){return e={$$typeof:go,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Eo,_context:e},e};A.createElement=function(e,t,r){var o,s={},u=null;if(t!=null)for(o in t.key!==void 0&&(u=""+t.key),t)Fn.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 Mt(e,u,s)};A.createRef=function(){return{current:null}};A.forwardRef=function(e){return{$$typeof:vo,render:e}};A.isValidElement=Ft;A.lazy=function(e){return{$$typeof:Cn,_payload:{_status:-1,_result:e},_init:Ao}};A.memo=function(e,t){return{$$typeof:To,type:e,compare:t===void 0?null:t}};A.startTransition=function(e){var t=B.T,r={};B.T=r;try{var o=e(),s=B.S;s!==null&&s(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Ct,wn)}catch(u){wn(u)}finally{t!==null&&r.types!==null&&(t.types=r.types),B.T=t}};A.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()};A.use=function(e){return B.H.use(e)};A.useActionState=function(e,t,r){return B.H.useActionState(e,t,r)};A.useCallback=function(e,t){return B.H.useCallback(e,t)};A.useContext=function(e){return B.H.useContext(e)};A.useDebugValue=function(){};A.useDeferredValue=function(e,t){return B.H.useDeferredValue(e,t)};A.useEffect=function(e,t){return B.H.useEffect(e,t)};A.useEffectEvent=function(e){return B.H.useEffectEvent(e)};A.useId=function(){return B.H.useId()};A.useImperativeHandle=function(e,t,r){return B.H.useImperativeHandle(e,t,r)};A.useInsertionEffect=function(e,t){return B.H.useInsertionEffect(e,t)};A.useLayoutEffect=function(e,t){return B.H.useLayoutEffect(e,t)};A.useMemo=function(e,t){return B.H.useMemo(e,t)};A.useOptimistic=function(e,t){return B.H.useOptimistic(e,t)};A.useReducer=function(e,t,r){return B.H.useReducer(e,t,r)};A.useRef=function(e){return B.H.useRef(e)};A.useState=function(e){return B.H.useState(e)};A.useSyncExternalStore=function(e,t,r){return B.H.useSyncExternalStore(e,t,r)};A.useTransition=function(){return B.H.useTransition()};A.version="19.2.0"});var Un=we((_,nt)=>{"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=cn&&n[cn]||n["@@iterator"],typeof n=="function"?n:null)}function r(n,a){n=(n=n.constructor)&&(n.displayName||n.name)||"ReactClass";var y=n+"."+a;ln[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),ln[y]=!0)}function o(n,a,y){this.props=n,this.context=a,this.refs=_t,this.updater=y||fn}function s(){}function u(n,a,y){this.props=n,this.context=a,this.refs=_t,this.updater=y||fn}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===eo?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Rt:return"Fragment";case rn:return"Profiler";case nn:return"StrictMode";case un:return"Suspense";case Jr:return"SuspenseList";case an: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 on:return n.displayName||"Context";case Ot:return(n._context.displayName||"Context")+".Consumer";case sn:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case St:return a=n.displayName||null,a!==null?a:p(n.type)||"Memo";case xe:a=n._payload,n=n._init;try{return p(n(a))}catch{}}return null}function b(n){if(n===Rt)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===xe)return"<...>";try{var a=p(n);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function c(){var n=D.A;return n===null?null:n.getOwner()}function i(){return Error("react-stack-top-frame")}function E(n){if(Xe.call(n,"key")){var a=Object.getOwnPropertyDescriptor(n,"key").get;if(a&&a.isReactWarning)return!1}return n.key!==void 0}function O(n,a){function y(){mn||(mn=!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 gn[n]||(gn[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 g(n,a,y,h,R,M){var C=y.ref;return n={$$typeof:S,type:n,key:a,props:y,_owner:h},(C!==void 0?C: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,a){return a=g(n.type,a,n.props,n._owner,n._debugStack,n._debugTask),n._store&&(a._store.validated=n._store.validated),a}function L(n){P(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===xe&&(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===S}function j(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),j(""+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 V(n,a,y,h,R){var M=typeof n;(M==="undefined"||M==="boolean")&&(n=null);var C=!1;if(n===null)C=!0;else switch(M){case"bigint":case"string":case"number":C=!0;break;case"object":switch(n.$$typeof){case S:case ce:C=!0;break;case xe:return C=n._init,V(C(n._payload),a,y,h,R)}}if(C){C=n,R=R(C);var N=h===""?"."+U(C,0):h;return pn(R)?(y="",N!=null&&(y=N.replace(hn,"$&/")+"/"),V(R,a,y,"",function(fe){return fe})):R!=null&&(P(R)&&(R.key!=null&&(C&&C.key===R.key||f(R.key)),y=k(R,y+(R.key==null||C&&C.key===R.key?"":(""+R.key).replace(hn,"$&/")+"/")+N),h!==""&&C!=null&&P(C)&&C.key==null&&C._store&&!C._store.validated&&(y._store.validated=2),R=y),a.push(R)),1}if(C=0,N=h===""?".":h+":",pn(n))for(var F=0;F<n.length;F++)h=n[F],M=N+U(h,F),C+=V(h,a,y,M,R);else if(F=t(n),typeof F=="function")for(F===n.entries&&(vn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vn=!0),n=F.call(n),F=0;!(h=n.next()).done;)h=h.value,M=N+U(h,F++),C+=V(h,a,y,M,R);else if(M==="object"){if(typeof n.then=="function")return V(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 C}function G(n,a,y){if(n==null)return n;var h=[],R=0;return V(n,h,"","",function(M){return a.call(y,M,R++)}),h}function le(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 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)}}),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'))
@@ -10,12 +10,12 @@ Your code should look like:
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 be(){D.asyncTransitions--}function ie(n){if(Ze===null)try{var a=("require"+Math.random()).slice(0,7);Ze=(nt&&nt[a]).call(nt,"timers").setImmediate}catch{Ze=function(h){bn===!1&&(bn=!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 Ze(n)}function ae(n){return 1<n.length&&typeof AggregateError=="function"?new AggregateError(n):n[0]}function g(n,a){a!==Je-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. "),Je=a}function m(n,a,y){var h=D.actQueue;if(h!==null)if(h.length!==0)try{I(h),ie(function(){return m(n,a,y)});return}catch(R){D.thrownErrors.push(R)}else D.actQueue=null;0<D.thrownErrors.length?(h=ae(D.thrownErrors),D.thrownErrors.length=0,y(h)):a(n)}function I(n){if(!At){At=!0;var a=0;try{for(;a<n.length;a++){var y=n[a];do{D.didUsePromise=!1;var h=y(!1);if(h!==null){if(D.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),D.thrownErrors.push(R)}finally{At=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var S=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),Rt=Symbol.for("react.fragment"),nn=Symbol.for("react.strict_mode"),rn=Symbol.for("react.profiler"),Ot=Symbol.for("react.consumer"),on=Symbol.for("react.context"),sn=Symbol.for("react.forward_ref"),un=Symbol.for("react.suspense"),Jr=Symbol.for("react.suspense_list"),St=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),an=Symbol.for("react.activity"),cn=Symbol.iterator,ln={},fn={isMounted:function(){return!1},enqueueForceUpdate:function(n){r(n,"forceUpdate")},enqueueReplaceState:function(n){r(n,"replaceState")},enqueueSetState:function(n){r(n,"setState")}},dn=Object.assign,_t={};Object.freeze(_t),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=u.prototype=new s,re.constructor=u,dn(re,o.prototype),re.isPureReactComponent=!0;var pn=Array.isArray,eo=Symbol.for("react.client.reference"),D={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Xe=Object.prototype.hasOwnProperty,yn=console.createTask?console.createTask:function(){return null};re={react_stack_bottom_frame:function(n){return n()}};var mn,En,gn={},to=re.react_stack_bottom_frame.bind(re,i)(),no=yn(b(i)),vn=!1,hn=/\/+/g,Tn=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)},bn=!1,Ze=null,Je=0,et=!1,At=!1,Rn=typeof queueMicrotask=="function"?function(n){queueMicrotask(function(){return queueMicrotask(n)})}:ie;re=Object.freeze({__proto__:null,c:function(n){return w().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=an,_.Children=ke,_.Component=o,_.Fragment=Rt,_.Profiler=rn,_.PureComponent=u,_.StrictMode=nn,_.Suspense=un,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,_.__COMPILER_RUNTIME=re,_.act=function(n){var a=D.actQueue,y=Je;Je++;var h=D.actQueue=a!==null?a:[],R=!1;try{var M=n()}catch(F){D.thrownErrors.push(F)}if(0<D.thrownErrors.length)throw g(a,y),n=ae(D.thrownErrors),D.thrownErrors.length=0,n;if(M!==null&&typeof M=="object"&&typeof M.then=="function"){var C=M;return Rn(function(){R||et||(et=!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(F,fe){R=!0,C.then(function(Ae){if(g(a,y),y===0){try{I(h),ie(function(){return m(Ae,F,fe)})}catch(oo){D.thrownErrors.push(oo)}if(0<D.thrownErrors.length){var ro=ae(D.thrownErrors);D.thrownErrors.length=0,fe(ro)}}else F(Ae)},function(Ae){g(a,y),0<D.thrownErrors.length&&(Ae=ae(D.thrownErrors),D.thrownErrors.length=0),fe(Ae)})}}}var N=M;if(g(a,y),y===0&&(I(h),h.length!==0&&Rn(function(){R||et||(et=!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(() => ...)"))}),D.actQueue=null),0<D.thrownErrors.length)throw n=ae(D.thrownErrors),D.thrownErrors.length=0,n;return{then:function(F,fe){R=!0,y===0?(D.actQueue=h,ie(function(){return m(N,F,fe)})):F(N)}}},_.cache=function(n){return function(){return n.apply(null,arguments)}},_.cacheSignal=function(){return null},_.captureOwnerStack=function(){var n=D.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=dn({},n.props),R=n.key,M=n._owner;if(a!=null){var C;e:{if(Xe.call(a,"ref")&&(C=Object.getOwnPropertyDescriptor(a,"ref").get)&&C.isReactWarning){C=!1;break e}C=a.ref!==void 0}C&&(M=c()),E(a)&&(f(a.key),R=""+a.key);for(N in a)!Xe.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){C=Array(N);for(var F=0;F<N;F++)C[F]=arguments[F+2];h.children=C}for(h=v(n.type,R,h,M,n._debugStack,n._debugTask),R=2;R<arguments.length;R++)L(arguments[R]);return h},_.createContext=function(n){return n={$$typeof:on,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:Ot,_context:n},n._currentRenderer=null,n._currentRenderer2=null,n},_.createElement=function(n,a,y){for(var h=2;h<arguments.length;h++)L(arguments[h]);h={};var R=null;if(a!=null)for(F in En||!("__self"in a)||"key"in a||(En=!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")),E(a)&&(f(a.key),R=""+a.key),a)Xe.call(a,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(h[F]=a[F]);var M=arguments.length-2;if(M===1)h.children=y;else if(1<M){for(var C=Array(M),N=0;N<M;N++)C[N]=arguments[N+2];Object.freeze&&Object.freeze(C),h.children=C}if(n&&n.defaultProps)for(F in M=n.defaultProps,M)h[F]===void 0&&(h[F]=M[F]);R&&O(h,typeof n=="function"?n.displayName||n.name||"Unknown":n);var F=1e4>D.recentlyCreatedOwnerStacks++;return v(n,R,h,c(),F?Error("react-stack-top-frame"):to,F?yn(b(n)):no)},_.createRef=function(){var n={current:null};return Object.seal(n),n},_.forwardRef=function(n){n!=null&&n.$$typeof===St?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:sn,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:xe,_payload:n,_init:le},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:St,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=D.T,y={};y._updatedFibers=new Set,D.T=y;try{var h=n(),R=D.S;R!==null&&R(y,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&(D.asyncTransitions++,h.then(be,be),h.then(l,Tn))}catch(M){Tn(M)}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),D.T=a}},_.unstable_useCacheRefresh=function(){return w().useCacheRefresh()},_.use=function(n){return w().use(n)},_.useActionState=function(n,a,y){return w().useActionState(n,a,y)},_.useCallback=function(n,a){return w().useCallback(n,a)},_.useContext=function(n){var a=w();return n.$$typeof===Ot&&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 w().useDebugValue(n,a)},_.useDeferredValue=function(n,a){return w().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?"),w().useEffect(n,a)},_.useEffectEvent=function(n){return w().useEffectEvent(n)},_.useId=function(){return w().useId()},_.useImperativeHandle=function(n,a,y){return w().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?"),w().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?"),w().useLayoutEffect(n,a)},_.useMemo=function(n,a){return w().useMemo(n,a)},_.useOptimistic=function(n,a){return w().useOptimistic(n,a)},_.useReducer=function(n,a,y){return w().useReducer(n,a,y)},_.useRef=function(n){return w().useRef(n)},_.useState=function(n){return w().useState(n)},_.useSyncExternalStore=function(n,a,y){return w().useSyncExternalStore(n,a,y)},_.useTransition=function(){return w().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 x=we((ks,It)=>{"use strict";process.env.NODE_ENV==="production"?It.exports=In():It.exports=Un()});var jr=we(J=>{"use strict";var _s=x();function Vr(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 Te(){}var Z={d:{f:Te,r:function(){throw Error(Vr(522))},D:Te,C:Te,L:Te,m:Te,X:Te,S:Te,M:Te},p:0,findDOMNode:null},As=Symbol.for("react.portal");function ws(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:As,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var Qe=_s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Tt(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(Vr(299));return ws(e,t,null,r)};J.flushSync=function(e){var t=Qe.T,r=Z.p;try{if(Qe.T=null,Z.p=2,e)return e()}finally{Qe.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=Tt(r,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,u=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:u}):r==="script"&&Z.d.X(e,{crossOrigin:o,integrity:s,fetchPriority:u,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=Tt(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=Tt(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=Tt(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 Qe.H.useFormState(e,t,r)};J.useFormStatus=function(){return Qe.H.useHostTransitionStatus()};J.version="19.2.0"});var Wr=we(ee=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(c){return""+c}function r(c,i,E){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(O);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&&O[Symbol.toStringTag]||O.constructor.name||"Object"),t(O)),{$$typeof:p,key:O==null?null:""+O,children:c,containerInfo:i,implementation:E}}function o(c,i){if(c==="font")return"";if(typeof i=="string")return i==="use-credentials"?i:""}function s(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":'something with type "'+typeof c+'"'}function u(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 be(){D.asyncTransitions--}function ie(n){if(Ze===null)try{var a=("require"+Math.random()).slice(0,7);Ze=(nt&&nt[a]).call(nt,"timers").setImmediate}catch{Ze=function(h){bn===!1&&(bn=!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 Ze(n)}function ae(n){return 1<n.length&&typeof AggregateError=="function"?new AggregateError(n):n[0]}function v(n,a){a!==Je-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. "),Je=a}function m(n,a,y){var h=D.actQueue;if(h!==null)if(h.length!==0)try{I(h),ie(function(){return m(n,a,y)});return}catch(R){D.thrownErrors.push(R)}else D.actQueue=null;0<D.thrownErrors.length?(h=ae(D.thrownErrors),D.thrownErrors.length=0,y(h)):a(n)}function I(n){if(!At){At=!0;var a=0;try{for(;a<n.length;a++){var y=n[a];do{D.didUsePromise=!1;var h=y(!1);if(h!==null){if(D.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),D.thrownErrors.push(R)}finally{At=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var S=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),Rt=Symbol.for("react.fragment"),nn=Symbol.for("react.strict_mode"),rn=Symbol.for("react.profiler"),Ot=Symbol.for("react.consumer"),on=Symbol.for("react.context"),sn=Symbol.for("react.forward_ref"),un=Symbol.for("react.suspense"),Jr=Symbol.for("react.suspense_list"),St=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),an=Symbol.for("react.activity"),cn=Symbol.iterator,ln={},fn={isMounted:function(){return!1},enqueueForceUpdate:function(n){r(n,"forceUpdate")},enqueueReplaceState:function(n){r(n,"replaceState")},enqueueSetState:function(n){r(n,"setState")}},dn=Object.assign,_t={};Object.freeze(_t),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=u.prototype=new s,re.constructor=u,dn(re,o.prototype),re.isPureReactComponent=!0;var pn=Array.isArray,eo=Symbol.for("react.client.reference"),D={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Xe=Object.prototype.hasOwnProperty,yn=console.createTask?console.createTask:function(){return null};re={react_stack_bottom_frame:function(n){return n()}};var mn,En,gn={},to=re.react_stack_bottom_frame.bind(re,i)(),no=yn(b(i)),vn=!1,hn=/\/+/g,Tn=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)},bn=!1,Ze=null,Je=0,et=!1,At=!1,Rn=typeof queueMicrotask=="function"?function(n){queueMicrotask(function(){return queueMicrotask(n)})}:ie;re=Object.freeze({__proto__:null,c:function(n){return w().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=an,_.Children=ke,_.Component=o,_.Fragment=Rt,_.Profiler=rn,_.PureComponent=u,_.StrictMode=nn,_.Suspense=un,_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,_.__COMPILER_RUNTIME=re,_.act=function(n){var a=D.actQueue,y=Je;Je++;var h=D.actQueue=a!==null?a:[],R=!1;try{var M=n()}catch(F){D.thrownErrors.push(F)}if(0<D.thrownErrors.length)throw v(a,y),n=ae(D.thrownErrors),D.thrownErrors.length=0,n;if(M!==null&&typeof M=="object"&&typeof M.then=="function"){var C=M;return Rn(function(){R||et||(et=!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(F,fe){R=!0,C.then(function(Ae){if(v(a,y),y===0){try{I(h),ie(function(){return m(Ae,F,fe)})}catch(oo){D.thrownErrors.push(oo)}if(0<D.thrownErrors.length){var ro=ae(D.thrownErrors);D.thrownErrors.length=0,fe(ro)}}else F(Ae)},function(Ae){v(a,y),0<D.thrownErrors.length&&(Ae=ae(D.thrownErrors),D.thrownErrors.length=0),fe(Ae)})}}}var N=M;if(v(a,y),y===0&&(I(h),h.length!==0&&Rn(function(){R||et||(et=!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(() => ...)"))}),D.actQueue=null),0<D.thrownErrors.length)throw n=ae(D.thrownErrors),D.thrownErrors.length=0,n;return{then:function(F,fe){R=!0,y===0?(D.actQueue=h,ie(function(){return m(N,F,fe)})):F(N)}}},_.cache=function(n){return function(){return n.apply(null,arguments)}},_.cacheSignal=function(){return null},_.captureOwnerStack=function(){var n=D.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=dn({},n.props),R=n.key,M=n._owner;if(a!=null){var C;e:{if(Xe.call(a,"ref")&&(C=Object.getOwnPropertyDescriptor(a,"ref").get)&&C.isReactWarning){C=!1;break e}C=a.ref!==void 0}C&&(M=c()),E(a)&&(f(a.key),R=""+a.key);for(N in a)!Xe.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){C=Array(N);for(var F=0;F<N;F++)C[F]=arguments[F+2];h.children=C}for(h=g(n.type,R,h,M,n._debugStack,n._debugTask),R=2;R<arguments.length;R++)L(arguments[R]);return h},_.createContext=function(n){return n={$$typeof:on,_currentValue:n,_currentValue2:n,_threadCount:0,Provider:null,Consumer:null},n.Provider=n,n.Consumer={$$typeof:Ot,_context:n},n._currentRenderer=null,n._currentRenderer2=null,n},_.createElement=function(n,a,y){for(var h=2;h<arguments.length;h++)L(arguments[h]);h={};var R=null;if(a!=null)for(F in En||!("__self"in a)||"key"in a||(En=!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")),E(a)&&(f(a.key),R=""+a.key),a)Xe.call(a,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(h[F]=a[F]);var M=arguments.length-2;if(M===1)h.children=y;else if(1<M){for(var C=Array(M),N=0;N<M;N++)C[N]=arguments[N+2];Object.freeze&&Object.freeze(C),h.children=C}if(n&&n.defaultProps)for(F in M=n.defaultProps,M)h[F]===void 0&&(h[F]=M[F]);R&&O(h,typeof n=="function"?n.displayName||n.name||"Unknown":n);var F=1e4>D.recentlyCreatedOwnerStacks++;return g(n,R,h,c(),F?Error("react-stack-top-frame"):to,F?yn(b(n)):no)},_.createRef=function(){var n={current:null};return Object.seal(n),n},_.forwardRef=function(n){n!=null&&n.$$typeof===St?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:sn,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:xe,_payload:n,_init:le},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:St,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=D.T,y={};y._updatedFibers=new Set,D.T=y;try{var h=n(),R=D.S;R!==null&&R(y,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&(D.asyncTransitions++,h.then(be,be),h.then(l,Tn))}catch(M){Tn(M)}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),D.T=a}},_.unstable_useCacheRefresh=function(){return w().useCacheRefresh()},_.use=function(n){return w().use(n)},_.useActionState=function(n,a,y){return w().useActionState(n,a,y)},_.useCallback=function(n,a){return w().useCallback(n,a)},_.useContext=function(n){var a=w();return n.$$typeof===Ot&&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 w().useDebugValue(n,a)},_.useDeferredValue=function(n,a){return w().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?"),w().useEffect(n,a)},_.useEffectEvent=function(n){return w().useEffectEvent(n)},_.useId=function(){return w().useId()},_.useImperativeHandle=function(n,a,y){return w().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?"),w().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?"),w().useLayoutEffect(n,a)},_.useMemo=function(n,a){return w().useMemo(n,a)},_.useOptimistic=function(n,a){return w().useOptimistic(n,a)},_.useReducer=function(n,a,y){return w().useReducer(n,a,y)},_.useRef=function(n){return w().useRef(n)},_.useState=function(n){return w().useState(n)},_.useSyncExternalStore=function(n,a,y){return w().useSyncExternalStore(n,a,y)},_.useTransition=function(){return w().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 x=we((Ns,It)=>{"use strict";process.env.NODE_ENV==="production"?It.exports=In():It.exports=Un()});var jr=we(J=>{"use strict";var As=x();function Vr(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 Te(){}var Z={d:{f:Te,r:function(){throw Error(Vr(522))},D:Te,C:Te,L:Te,m:Te,X:Te,S:Te,M:Te},p:0,findDOMNode:null},ws=Symbol.for("react.portal");function Cs(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ws,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var Qe=As.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Tt(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(Vr(299));return Cs(e,t,null,r)};J.flushSync=function(e){var t=Qe.T,r=Z.p;try{if(Qe.T=null,Z.p=2,e)return e()}finally{Qe.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=Tt(r,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,u=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:u}):r==="script"&&Z.d.X(e,{crossOrigin:o,integrity:s,fetchPriority:u,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=Tt(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=Tt(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=Tt(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 Qe.H.useFormState(e,t,r)};J.useFormStatus=function(){return Qe.H.useHostTransitionStatus()};J.version="19.2.0"});var Wr=we(ee=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(c){return""+c}function r(c,i,E){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(O);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&&O[Symbol.toStringTag]||O.constructor.name||"Object"),t(O)),{$$typeof:p,key:O==null?null:""+O,children:c,containerInfo:i,implementation:E}}function o(c,i){if(c==="font")return"";if(typeof i=="string")return i==="use-credentials"?i:""}function s(c){return c===null?"`null`":c===void 0?"`undefined`":c===""?"an empty string":'something with type "'+typeof c+'"'}function u(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=x(),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,i){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,i,null,E)},ee.flushSync=function(c){var i=b.T,E=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=i,f.p=E,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,i){typeof c=="string"&&c?i!=null&&typeof i!="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.",u(i)):i!=null&&typeof i.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(i.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"&&(i?(i=i.crossOrigin,i=typeof i=="string"?i==="use-credentials"?i:"":void 0):i=null,f.d.C(c,i))},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 i=arguments[1];typeof i=="object"&&i.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`.",u(i)):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`.",u(i))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,i){if(typeof c=="string"&&c?i==null||typeof i!="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.",u(i)):i.as!=="style"&&i.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".',u(i.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"&&i&&typeof i.as=="string"){var E=i.as,O=o(E,i.crossOrigin),T=typeof i.integrity=="string"?i.integrity:void 0,v=typeof i.fetchPriority=="string"?i.fetchPriority:void 0;E==="style"?f.d.S(c,typeof i.precedence=="string"?i.precedence:void 0,{crossOrigin:O,integrity:T,fetchPriority:v}):E==="script"&&f.d.X(c,{crossOrigin:O,integrity:T,fetchPriority:v,nonce:typeof i.nonce=="string"?i.nonce:void 0})}},ee.preinitModule=function(c,i){var E="";if(typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i!==void 0&&typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":i&&"as"in i&&i.as!=="script"&&(E+=" The `as` option encountered was "+u(i.as)+"."),E)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",E);else switch(E=i&&typeof i.as=="string"?i.as:"script",E){case"script":break;default:E=u(E),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)',E,c)}typeof c=="string"&&(typeof i=="object"&&i!==null?(i.as==null||i.as==="script")&&(E=o(i.as,i.crossOrigin),f.d.M(c,{crossOrigin:E,integrity:typeof i.integrity=="string"?i.integrity:void 0,nonce:typeof i.nonce=="string"?i.nonce:void 0})):i==null&&f.d.M(c))},ee.preload=function(c,i){var E="";if(typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i==null||typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":typeof i.as=="string"&&i.as||(E+=" The `as` option encountered was "+s(i.as)+"."),E&&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',E),typeof c=="string"&&typeof i=="object"&&i!==null&&typeof i.as=="string"){E=i.as;var O=o(E,i.crossOrigin);f.d.L(c,E,{crossOrigin:O,integrity:typeof i.integrity=="string"?i.integrity:void 0,nonce:typeof i.nonce=="string"?i.nonce:void 0,type:typeof i.type=="string"?i.type:void 0,fetchPriority:typeof i.fetchPriority=="string"?i.fetchPriority:void 0,referrerPolicy:typeof i.referrerPolicy=="string"?i.referrerPolicy:void 0,imageSrcSet:typeof i.imageSrcSet=="string"?i.imageSrcSet:void 0,imageSizes:typeof i.imageSizes=="string"?i.imageSizes:void 0,media:typeof i.media=="string"?i.media:void 0})}},ee.preloadModule=function(c,i){var E="";typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i!==void 0&&typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":i&&"as"in i&&typeof i.as!="string"&&(E+=" The `as` option encountered was "+s(i.as)+"."),E&&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',E),typeof c=="string"&&(i?(E=o(i.as,i.crossOrigin),f.d.m(c,{as:typeof i.as=="string"&&i.as!=="script"?i.as:void 0,crossOrigin:E,integrity:typeof i.integrity=="string"?i.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,i){return c(i)},ee.useFormState=function(c,i,E){return l().useFormState(c,i,E)},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 Yr=we((fa,Zt)=>{"use strict";function Gr(){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(Gr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Gr(),Zt.exports=jr()):Zt.exports=Wr()});var rt=K(x(),1);function Pe(...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 u=o[s];s.startsWith("on")&&typeof u=="function"?(r[s]??=[],r[s].push(u)):t[s]=u}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let u of r[o])u?.(...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 Co({props:e,ref:t,context:r}){let o=Ut({context:r,slot:e.slot})||{},{ref:s=null,...u}=o,l=(0,rt.useRef)(null),d=(0,rt.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=Pe(u,e);return"style"in u&&u.style&&"style"in e&&e.style&&(typeof u.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof u.style=="function"?u.style(p):u.style,c={...p.defaultStyle,...b},i=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...i}}:f.style={...u.style,...e.style}),[f,d]}var se=K(x(),1);function Lo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:u=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[i,E]=(0,se.useState)(null),O=(0,se.useRef)(!1),T=(0,se.useRef)(null),v=Re(L=>{let P=L[0],j=P.isIntersecting,U={isIntersecting:P.isIntersecting,intersectionRatio:P.intersectionRatio,intersectionRect:P.intersectionRect,boundingClientRect:P.boundingClientRect,rootBounds:P.rootBounds,time:P.time};E(U),c(Y=>l&&O.current?!0:j&&l?(O.current=!0,Y!==!0&&d&&d(!0),!0):Y!==j?(d&&d(j),j):Y)}),k=(0,se.useCallback)(L=>{p(L)},[]);return(0,se.useEffect)(()=>{if(!u||!f)return;let L;return t===!0?L=[0,.1,.25,.5,.75,1]:typeof t=="string"?L=.01:L=r,T.current=new IntersectionObserver(v,{root:s,rootMargin:o,threshold:L}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[u,f,s,o,r,t]),[k,b,i]}var ft=K(x(),1);var Po=Object.defineProperty,ot=(e,t)=>{for(var r in t)Po(e,r,{get:t[r],enumerable:!0})},De={};ot(De,{ARIA_ATTRIBUTES:()=>xn,HTML_TAGS:()=>Nn,PRIMITIVE_TAGS:()=>kn,default:()=>Do});var xn=["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"],kn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nn=["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"],Do={ARIA_ATTRIBUTES:xn,PRIMITIVE_TAGS:kn,HTML_TAGS:Nn},Mo={};ot(Mo,{NUMERIC_DIGITS:()=>Kn,default:()=>Fo});var Kn=["1","2","3","4","5","6","7","8","9","0"],Fo={NUMERIC_DIGITS:Kn},Io={};ot(Io,{AMPERSAND:()=>qn,ASTERISK:()=>Xn,BACKSLASH:()=>ar,BOM:()=>Bn,CARRIAGE_RETURN:()=>jn,COLON:()=>nr,COMMA:()=>Jn,COMMERCIAL_AT:()=>ur,DOT:()=>tr,DOUBLE_QUOTE:()=>Yn,EXCLAMATION:()=>Gn,GRAVE_ACCENT:()=>lr,GREATER_THAN:()=>or,LEFT_CURLY_BRACKET:()=>fr,LEFT_SQUARE_BRACKET:()=>ir,LINE_FEED:()=>Vn,MINUS:()=>er,PERCENT:()=>zn,PLUS:()=>Zn,QUESTION:()=>sr,RIGHT_CURLY_BRACKET:()=>pr,RIGHT_SQUARE_BRACKET:()=>cr,SHARP:()=>$n,SINGLE_QUOTE:()=>Qn,SMALLER_THAN:()=>rr,SPACE:()=>Wn,TAB:()=>Hn,VERTICAL_LINE:()=>dr,default:()=>Uo});var Bn=65279,Hn=9,Vn=10,jn=13,Wn=32,Gn=33,Yn=34,$n=35,zn=37,qn=38,Qn=39,Xn=42,Zn=43,Jn=44,er=45,tr=46,nr=58,rr=60,or=62,sr=63,ur=64,ir=91,ar=92,cr=93,lr=96,fr=123,dr=124,pr=125,Uo={BOM:Bn,TAB:Hn,LINE_FEED:Vn,CARRIAGE_RETURN:jn,SPACE:Wn,EXCLAMATION:Gn,DOUBLE_QUOTE:Yn,SHARP:$n,PERCENT:zn,AMPERSAND:qn,SINGLE_QUOTE:Qn,ASTERISK:Xn,PLUS:Zn,COMMA:Jn,MINUS:er,DOT:tr,COLON:nr,SMALLER_THAN:rr,GREATER_THAN:or,QUESTION:sr,COMMERCIAL_AT:ur,LEFT_SQUARE_BRACKET:ir,BACKSLASH:ar,RIGHT_SQUARE_BRACKET:cr,GRAVE_ACCENT:lr,LEFT_CURLY_BRACKET:fr,VERTICAL_LINE:dr,RIGHT_CURLY_BRACKET:pr},xo={};ot(xo,{CAPITALIZED:()=>yr,LOWERCASE:()=>mr,VOWELS:()=>Er,default:()=>ko});var yr=["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"],mr=["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"],Er=["A","E","I","O","U","a","e","i","o","u"],ko={CAPITALIZED:yr,LOWERCASE:mr,VOWELS:Er};function No(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var st=()=>No(/^Mac/i);function gr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Ko=()=>gr(/^iPhone/i),Bo=()=>gr(/^iPad/i)||st()&&navigator.maxTouchPoints>1,xt=()=>Ko()||Bo();function ut(e){return st()?e.metaKey??!1:e.ctrlKey??!1}function q(e){return e?.ownerDocument??document}function Oe(e){return e&&"window"in e&&e.window===e?e:q(e).defaultView||window}var it=null;function hr(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},u=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<u.top,f=l.bottom>u.bottom,p=l.left<u.left,b=l.right>u.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-u.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-u.bottom);else if(o==="center"){let i=u.top+u.height/2,E=l.top+l.height/2;c=e.scrollTop+(E-i)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-u.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-u.right);else if(s==="center"){let i=u.left+u.width/2,E=l.left+l.width/2;c=e.scrollLeft+(E-i)}e.scrollLeft=c}}function Ho(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function at(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:Ho(o)?o.host:o.parentNode}return!1}var pe=(e=document,t=!0)=>{if(!t)return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&r.shadowRoot?.activeElement;)r=r.shadowRoot.activeElement;return r};function ct(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ke(e){if((function(){if(it==null){it=!1;try{document.createElement("div").focus({get preventScroll(){return it=!0,!0}})}catch{}}return it})())e.focus({preventScroll:!0});else{let t=(function(r){let o=r.parentNode,s=Array.from({length:0}),u=document.scrollingElement||document.documentElement;for(;o instanceof HTMLElement&&o!==u;)(o.offsetHeight<o.scrollHeight||o.offsetWidth<o.scrollWidth)&&s.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),o=o.parentNode;return u instanceof HTMLElement&&s.push({element:u,scrollTop:u.scrollTop,scrollLeft:u.scrollLeft}),s})(e);e.focus();for(let{element:r,scrollTop:o,scrollLeft:s}of t)r.scrollTop=o,r.scrollLeft=s}}var Tr="necto-style",vr=new WeakMap;function Vo(e,t={}){let{id:r=Tr,insertionPoint:o}=t,s=o?q(o):document,u=s.createElement("style");return u.setAttribute("type","text/css"),u.setAttribute("necto-style-id",r),u.textContent=e,o?s.head.insertBefore(u,o):s.head.appendChild(u),u}function br(e,t={}){let{id:r=Tr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let u=(function(f){let p=vr.get(f);return p||(p=new Map,vr.set(f,p)),p})(o),l=`${r}:${e}`,d=u.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:Vo(e,{id:r,insertionPoint:s}),count:1},u.set(l,d)),()=>{let f=u.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,u.delete(l)))}}var de=new Map,kt=new Set;function jo(e){if(!("propertyName"in e)||!e.target)return;let t=de.get(e.target);t||(t=new Set,de.set(e.target,t),e.target.addEventListener("transitioncancel",Kt,{once:!0})),t.add(e.propertyName)}function Kt(e){if(!("propertyName"in e)||!e.target)return;let t=de.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Kt),de.delete(e.target)),de.size===0)){for(let r of kt)r();kt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",jo),t.addEventListener("transitionend",Kt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Bt(e){requestAnimationFrame(()=>{for(let[t]of de)"isConnected"in t&&!t.isConnected&&de.delete(t);de.size===0?e():kt.add(e)})}var Xs=De.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),Nt="",Me="default",Ne=new WeakMap;function lt(e){if(xt()){if(Me==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(Nt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",Me="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";Ne.has(e)||(Ne.set(e,t[r]??""),t[r]="none")}}function ye(e){if(xt()){if(Me!=="disabled")return;Me="restoring",setTimeout(()=>{Bt(()=>{if(Me==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Nt||""),Nt="",Me="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&Ne.has(e)){let t=Ne.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),Ne.delete(e)}}var W=De.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Wo=De.ARIA_ATTRIBUTES,eu=new Set(Wo);function Be(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,u=(0,ft.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,ft.useCallback)(p=>{p.target===p.currentTarget&&u(!1,p)},[u]),d=He({onBlur:l}),f=(0,ft.useCallback)(p=>{let b=q(p.target),c=b?pe(b):pe();p.target===p.currentTarget&&c===ct(p.nativeEvent)&&(u(!0,p),d(p))},[u,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var dt=K(x(),1);function Go(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:u}=Be(e),{keyboardProps:l}=Ht(e),d=(0,dt.useRef)(r),f=q(t.current),p=f?pe(f):null;(0,dt.useEffect)(()=>{if(d.current&&t.current)if(Ve()==="virtual"){let c=p;Bt(()=>{f&&pe(f)===c&&t.current?.isConnected&&Ke(t.current)})}else Ke(t.current);d.current=!1},[t]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Pe(u??{},l,{tabIndex:b})}}var me=K(x(),1);var Yo=null;function $o(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,me.useRef)({isFocused:o,isFocusVisible:o||Yo!=="pointer"}),[u,l]=(0,me.useState)(o),[d,f]=(0,me.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,me.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,me.useCallback)(E=>{s.current.isFocused=E,l(E),p()},[p]);je({fn:E=>{s.current.isFocusVisible=E,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=Be({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:i={}}=Vt({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:u,isFocusVisible:d,focusProps:t?i:c}}var Rr=K(x(),1);function zo(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Rr.useState)(r||Ve()!=="pointer");return je({fn:u=>s(u),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Fe=new Map,pt=new Set,Or=!1,jt=null,Sr=!1,Q={get hasEventBeforeFocus(){return Or},set hasEventBeforeFocus(e){Or=e},get hasBlurredWindowRecently(){return Sr},set hasBlurredWindowRecently(e){Sr=e},get currentModality(){return jt},set currentModality(e){jt=e}};function Ve(){return jt}var ls={},yt=Object.create(null),We=e=>globalThis.process?.env||ls.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?yt:globalThis),Ee=new Proxy(yt,{get(e,t){return We()[t]??yt[t]},has(e,t){let r=We();return t in r||t in yt},set(e,t,r){let o=We(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=We(!0);return delete r[t],!0},ownKeys(){let e=We(!0);return Object.keys(e)}}),Ar=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",qo=[["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 Qo(){if(globalThis.process?.env)for(let e of qo){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 wr=Qo(),Su=wr.name;function Se(e){return e?e!=="false":!1}var Wt=globalThis.process?.platform||"",Cr=Se(Ee.CI)||wr.ci!==!1,Lr=Se(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var _u=Se(Ee.DEBUG),Ge=Ar==="test"||Se(Ee.TEST),Pr=Ar==="production";var Au=Se(Ee.MINIMAL)||Cr||Ge||!Lr,Xo=/^win/i.test(Wt),wu=/^linux/i.test(Wt),Dr=/^darwin/i.test(Wt),Cu=!Se(Ee.NO_COLOR)&&(Se(Ee.FORCE_COLOR)||(Lr||Xo)&&Ee.TERM!=="dumb"||Cr),Zo=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Lu=Number(Zo?.split(".")[0])||null,Jo=globalThis.process||Object.create(null),_r={versions:{}},Pu=new Proxy(Jo,{get(e,t){if(t==="env")return Ee;if(t in e)return e[t];if(t in _r)return _r[t]}}),es=globalThis.process?.release?.name==="node",ts=!!globalThis.Bun||!!globalThis.process?.versions?.bun,ns=!!globalThis.Deno,rs=!!globalThis.fastly,os=!!globalThis.Netlify,ss=!!globalThis.EdgeRuntime,us=globalThis.navigator?.userAgent==="Cloudflare-Workers",is=[[os,"netlify"],[ss,"edge-light"],[us,"workerd"],[rs,"fastly"],[ns,"deno"],[ts,"bun"],[es,"node"]];function as(){let e=is.find(t=>t[0]);if(e)return{name:e[1]}}var cs=as(),Du=cs?.name||"";var Fr=K(x(),1);function Gt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&Pr?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 mt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var fs=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),ds={Tab:!0,Escape:!0};function Mr(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 u=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 u&&!fs.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!ds[r.key])}function $t(e,t){pt.forEach(r=>r(e,t))}function ps(e){return!(e.metaKey||Dr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Ir(e){ps(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",$t("keyboard",e))}function Yt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",$t("pointer",e))}function Ur(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",$t("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function xr(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function ys(e){let t=Oe(e),r=q(e);if(typeof window>"u"||typeof document>"u"||!t||!r||Fe.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",Ir,!0),r.addEventListener("click",Yt,!0),t.addEventListener("focus",Ur,!0),t.addEventListener("blur",xr,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Yt,!0),Fe.set(t,{focus:o})}function ms(e){let t=Oe(e),r=q(e);if(!t||!r||!Fe.has(t))return;let{focus:o}=Fe.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Ir,!0),r.removeEventListener("click",Yt,!0),t.removeEventListener("focus",Ur,!0),t.removeEventListener("blur",xr,!1),Fe.delete(t)}function je(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(ys(),(0,Fr.useEffect)(()=>{let s=(u,l)=>{Mr(!!o?.isTextInput,u,l)&&t(Q.currentModality!=="pointer")};return pt.add(s),()=>{pt.delete(s),ms()}},r))}var Ye=K(x(),1);function Vt(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,u=(0,Ye.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=$e(),f=(0,Ye.useCallback)(c=>{c.currentTarget.contains(c.target)&&u.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(u.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=He({onBlur:f}),b=(0,Ye.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let i=q(c.target);if(!i)return;let E=pe(i);if(!u.current.isFocusWithin&&E===ct(c.nativeEvent)){r&&r(c),s&&s(!0),u.current.isFocusWithin=!0,p(c);let O=c.currentTarget;l(i,"focus",T=>{if(u.current.isFocusWithin&&!at(O,T.target)&&i.defaultView&&typeof i.defaultView.FocusEvent=="function"){let v=new i.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(v,"target",{value:O}),Object.defineProperty(v,"currentTarget",{value:O});let k=mt(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 ge=K(x(),1);function $e(){let e=(0,ge.useRef)(new Map),t=(0,ge.useCallback)((s,u,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:u,eventTarget:s,options:d}),s.addEventListener(u,f,d)},[]),r=(0,ge.useCallback)((s,u,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(u,p,d),e.current.delete(l)},[]),o=(0,ge.useCallback)(()=>{e.current.forEach((s,u)=>{s.eventTarget.removeEventListener(s.type,u,s.options)}),e.current.clear()},[]);return(0,ge.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(x(),1);function Es(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[u,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}=$e(),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):Ge&&document.addEventListener("touchend",c),()=>{v.hoverCount--,v.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):Ge&&document.removeEventListener("touchend",c))}},[c]);let i=(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",L=>{f.isHovered&&f.target&&!at(f.target,L.target)&&E(L,L.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:v}),r?.(!0),l(!0))},[s,t,r,p,f]),E=(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]),O=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=v=>{d.current.ignoreEmulated&&v.pointerType==="mouse"||i(v,v.pointerType)},T.onPointerLeave=v=>{!s&&v.currentTarget instanceof Element&&v.currentTarget.contains(v.target)&&E(v,v.pointerType)}):Ge&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=v=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&i(v.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&E(v.nativeEvent,"mouse")}),T},[s,i,E,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&E({currentTarget:f.target},f.pointerType)},[s,E,f.isHovered,f.pointerType,f.target]),{hoverProps:O,isHovered:u}}var kr={prefix:"",current:0},ze=new Map,qe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{ze.delete(e)}):null;var oe=K(x(),1);function gs(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),u=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++kr.current);return`${t}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=ze.get(d)||[],p={current:u.current};f.some(b=>b===p)||ze.set(d,[...f,p])}return qe&&qe.register(l.current,d),()=>{qe&&qe.unregister(l.current),ze.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=u.current;f&&(s(f),u.current=null)},[]),d}function Ht(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Gt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Gt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var ve=K(x(),1);function zt(e={}){let{type:t="function"}=e,r=(0,ve.useRef)(!1),[o,s]=(0,ve.useState)(!1),u=(0,ve.useCallback)(()=>r.current,[]);return(0,ve.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:u}var H=K(x(),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 vs(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:u,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,i]=(0,H.useState)(!1),E=(0,H.useRef)(!1),O=(0,H.useRef)(null),T=(0,H.useRef)(!1),v=(0,H.useCallback)(g=>{c!==g&&(i(g),f?.(g))},[c,f]),k=(0,H.useCallback)(g=>{if(!T.current)return;let m=O.current&&O.current instanceof Node&&g.target instanceof Node&&O.current.contains(g.target);if(T.current=!1,v(!1),!o&&O.current instanceof HTMLElement&&ye(O.current),g.target){let I={...X("pressend","mouse",g),target:g.target};d?.(I),p?.(I),m&&u?.(I)}},[d,p,u,v,o]),L=(0,H.useCallback)(g=>{if(t||g.button!==0||E.current)return;r&&g.preventDefault(),o||lt(g.currentTarget),T.current=!0,O.current=g.currentTarget,v(!0);let m=X("pressstart","mouse",g);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,v,k]),P=(0,H.useCallback)(g=>{if(t||g.button!==0||!T.current)return;T.current=!1,v(!1),!o&&g.currentTarget instanceof HTMLElement&&ye(g.currentTarget);let m=X("pressend","mouse",g);d?.(m),p?.(m),g.currentTarget instanceof Node&&g.currentTarget.contains(g.target)&&u?.(X("press","mouse",g))},[t,u,d,p,v,o]),j=(0,H.useCallback)(g=>{c&&(v(!1),d?.(X("pressend","mouse",g)),!o&&g.currentTarget instanceof HTMLElement&&ye(g.currentTarget))},[c,v,d,o]),U=(0,H.useCallback)(g=>{T.current&&!c&&(v(!0),l?.(X("pressstart","mouse",g)))},[c,l,v]),Y=(0,H.useCallback)(g=>{if(!T.current)return;T.current=!1,v(!1),!o&&O.current instanceof HTMLElement&&ye(O.current);let m={...X("pressend","touch",g),target:g.target};d?.(m),p?.(m)},[d,p,v,o]),V=(0,H.useCallback)(g=>{if(!T.current)return;T.current=!1,v(!1),!o&&O.current instanceof HTMLElement&&ye(O.current);let m={...X("pressend","touch",g),target:g.target};d?.(m)},[d,v,o]),G=(0,H.useCallback)(g=>{t||(o||lt(g.currentTarget),E.current=!0,setTimeout(()=>{E.current=!1},100),T.current=!0,O.current=g.currentTarget,v(!0),l?.(X("pressstart","touch",g)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",V,{once:!0}))},[t,l,v,o,Y,V]),le=(0,H.useCallback)(g=>{if(t||!T.current)return;T.current=!1,v(!1),!o&&g.currentTarget instanceof HTMLElement&&ye(g.currentTarget);let m=X("pressend","touch",g);d?.(m),p?.(m),g.currentTarget instanceof Node&&g.currentTarget.contains(g.target)&&u?.(X("press","touch",g))},[t,u,d,p,v,o]),w=(0,H.useCallback)(g=>{if(t)return;(g.key==="Enter"||g.key===" ")&&!c&&(g.key===" "&&g.preventDefault(),o||lt(),v(!0),T.current=!0,l?.(X("pressstart","keyboard",g)))},[t,c,l,v,o]),be=(0,H.useCallback)(g=>{if(t)return;if((g.key==="Enter"||g.key===" ")&&c){v(!1),T.current=!1,o||ye();let I=X("pressend","keyboard",g);d?.(I),p?.(X("pressup","keyboard",g)),u?.(X("press","keyboard",g))}},[t,c,u,d,p,v,o]),ie=(0,H.useCallback)(g=>{if(t){g.preventDefault();return}E.current||b?.(g)},[t,b]);(0,H.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",V)},[k,Y,V]);let ae=(0,H.useMemo)(()=>({onMouseDown:L,onMouseUp:P,onMouseLeave:j,onMouseEnter:U,onTouchStart:G,onTouchEnd:le,onKeyDown:w,onKeyUp:be,onClick:ie}),[L,P,j,U,G,le,w,be,ie]);return(0,H.useEffect)(()=>{let g=s?.current,m=g?Oe(g):void 0;g&&m&&g instanceof m.Element&&m.getComputedStyle(g).touchAction==="auto"&&(g.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Nr=K(x(),1);function hs(e){let{style:t,values:r,children:o,className:s,defaultStyle:u,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Nr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:u||{}}):{...u,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,u,r])}var Kr=K(x(),1);function Ut(e){let{context:t,slot:r}=e,o=(0,Kr.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 u=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 ${u}.`)}return o.slots[s]}return o}var Ie=K(x(),1);function He(e){let{onBlur:t}=e,r=(0,Ie.useRef)({isFocused:!1,observer:null});(0,Ie.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Re(s=>{t?.(s)});return(0,Ie.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let u=s.target,l=d=>{if(r.current.isFocused=!1,u.disabled){let f=mt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};u.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&u.disabled){r.current.observer?.disconnect();let d=u===document.activeElement?null:document.activeElement;u.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var he=K(x(),1);function Re(e){let t=(0,he.useRef)(e);return(typeof window<"u"?he.useLayoutEffect:he.useEffect)(()=>{t.current=e},[e]),(0,he.useCallback)(((...r)=>t.current(...r)),[])}var Et=K(x(),1);function xi(e){let t=zt(),[r,o]=(0,Et.useState)(!1);return(0,Et.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var _e=K(x(),1);function Ts(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,u]=(0,_e.useState)(!1),l=(0,_e.useRef)(null),d=(0,_e.useRef)(null),f=Re(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let i=l.current===document.body?window.innerWidth:l.current.offsetWidth,E=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,O=i-l.current.scrollWidth;l.current.style.paddingRight=`${O+E}px`}l.current.style.overflow="hidden",u(!0)}),p=Re(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),u(!1)});return(0,_e.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 Br=K(x(),1);function bs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:u,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:i,valueMin:E,valueMax:O,valueText:T,label:v,labelledBy:k,describedBy:L,controls:P,owns:j}=e;return(0,Br.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:u,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:V,attr:G}of Y)V!==void 0&&(U[G]=V||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),i!==void 0&&(U[W.Valuenow]=i),E!==void 0&&(U[W.Valuemin]=E),O!==void 0&&(U[W.Valuemax]=O),T!==void 0&&(U[W.Valuetext]=T),v!==void 0&&(U[W.Label]=v),k!==void 0&&(U[W.Labelledby]=k),L!==void 0&&(U[W.Describedby]=L),P!==void 0&&(U[W.Controls]=P),j!==void 0&&(U[W.Owns]=j),U},[t,r,o,s,u,l,d,f,p,b,c,i,E,O,T,v,k,L,P,j])}function Rs({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let u=Array.isArray(t)?t.join(`
18
- `):t;Hr(()=>{if(!(!o||!u))return br(u,{id:e,window:s,insertionPoint:r})},[e,u,s,r,o])}var gt=K(x(),1);function Xi(e){let t=(0,gt.useRef)(e);return(0,gt.useLayoutEffect)(()=>{t.current=e}),t}var vt=K(x(),1),Hr=vt.default.useInsertionEffect??vt.useLayoutEffect;function qt(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 Qt(e,t,r=".",o){if(!qt(t))return Qt(e,{},r,o);let s=Object.assign({},t);for(let u in e){if(u==="__proto__"||u==="constructor")continue;let l=e[u];l!=null&&(o&&o(s,u,l,r)||(Array.isArray(l)&&Array.isArray(s[u])?s[u]=[...l,...s[u]]:qt(l)&&qt(s[u])?s[u]=Qt(l,s[u],(r?`${r}.`:"")+u.toString(),o):s[u]=l))}return s}function Xt(e){return(...t)=>t.reduce((r,o)=>Qt(r,o,"",e),{})}var ht=Xt(),ea=Xt((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),ta=Xt((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var ne=K(x(),1);function Ss(e={}){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,accessibilityDescription:u,threshold:l}=ht(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 i=(0,ne.useCallback)(P=>({type:P,pointerType:f.current??"mouse",target:p.current}),[]),E=(0,ne.useCallback)(P=>{t||P.button!==0||P.pointerType!=="mouse"&&(f.current=P.pointerType,p.current=P.currentTarget,b.current=!1,r?.(i("longpressstart")),d.current=setTimeout(()=>{b.current=!0,P.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),s?.(i("longpress")),d.current=null},l))},[t,l,r,s,i]),O=(0,ne.useCallback)(()=>{f.current!==null&&(c(),!b.current&&o&&o(i("longpressend")),f.current=null,p.current=null)},[c,o,i]),T=(0,ne.useCallback)(()=>{c(),f.current!==null&&o&&o(i("longpressend")),f.current=null,p.current=null},[c,o,i]),v=(0,ne.useCallback)(P=>{b.current&&P.preventDefault()},[]);return{longPressProps:t?{}:{onPointerDown:E,onPointerUp:O,onPointerCancel:T,onContextMenu:v,...!t&&!!s&&!!u&&{"aria-description":u}}}}var zr=K(Yr(),1),ue=K(x(),1);function Cs(e){let{ref:t,isOpen:r,isReady:o=!0}=e,[s,u]=(0,ue.useState)(r),l=s&&o;(0,ue.useLayoutEffect)(()=>{if(l&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,l]),$r(t,l,(0,ue.useCallback)(()=>u(!1),[]));let[d,f]=(0,ue.useState)(r);r&&!d?(u(!0),f(!0)):!r&&d&&f(!1);let[p,b]=(0,ue.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 $r(t,c,(0,ue.useCallback)(()=>{b(i=>i==="exiting"?"closed":i)},[])),{isEntering:l,isExiting:c,isRendered:r||c}}function $r(e,t,r){(0,ue.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(u=>u.finished)).then(()=>{s||(0,zr.flushSync)(()=>{r()})}).catch(()=>{}),()=>{s=!0}}},[e,t,r])}var $=K(x(),1);function Ls(e){return st()?e.metaKey:e.ctrlKey}function qr(e,t){return e.current?.querySelector(`[data-key="${t}"]`)??null}function Ps(e){let{selectionManager:t,keyboardDelegate:r,ref:o,autoFocus:s,shouldFocusWrap:u,disallowEmptySelection:l,disallowSelectAll:d,escapeBehavior:f,selectOnFocus:p,disallowTypeAhead:b,shouldUseVirtualFocus:c,allowsTabNavigation:i,scrollRef:E,direction:O,orientation:T,onNavigate:v,onFocusItem:k}=ht(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"}),L=E??o,P=(0,$.useRef)({top:0,left:0}),j=(0,$.useRef)(t.focusedKey),U=(0,$.useRef)(s),Y=(0,$.useRef)(""),V=(0,$.useRef)(null),G=(0,$.useCallback)((m,I,S)=>{m!=null&&(t.setFocusedKey(m,S),v?.(m),I?.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(m):p&&!Ls(I)&&t.replaceSelection(m))},[t,p,v]),le=(0,$.useCallback)(m=>{if(k){k(m);return}let I=qr(o,m);I&&!c&&Ke(I)},[o,c,k]),w=(0,$.useCallback)(m=>{if(!b&&m.key.length===1&&!m.ctrlKey&&!m.metaKey&&!m.altKey){V.current&&clearTimeout(V.current),Y.current+=m.key;let S=r.getKeyForSearch?.(Y.current,t.focusedKey)??null;S!=null&&(m.preventDefault(),G(S,m)),V.current=setTimeout(()=>{Y.current=""},500);return}let I=O==="rtl";switch(m.key){case"ArrowDown":{if(r.getKeyBelow){let S=t.focusedKey!=null?r.getKeyBelow(t.focusedKey):r.getFirstKey?.()??null;S==null&&u&&(S=r.getFirstKey?.()??null),S!=null&&(m.preventDefault(),G(S,m))}break}case"ArrowUp":{if(r.getKeyAbove){let S=t.focusedKey!=null?r.getKeyAbove(t.focusedKey):r.getLastKey?.()??null;S==null&&u&&(S=r.getLastKey?.()??null),S!=null&&(m.preventDefault(),G(S,m))}break}case"ArrowLeft":{if(r.getKeyLeftOf){let S=t.focusedKey!=null?r.getKeyLeftOf(t.focusedKey):null;S==null&&u&&(S=I?r.getFirstKey?.()??null:r.getLastKey?.()??null),S!=null&&(m.preventDefault(),G(S,m,I?"first":"last"))}break}case"ArrowRight":{if(r.getKeyRightOf){let S=t.focusedKey!=null?r.getKeyRightOf(t.focusedKey):null;S==null&&u&&(S=I?r.getLastKey?.()??null:r.getFirstKey?.()??null),S!=null&&(m.preventDefault(),G(S,m,I?"last":"first"))}break}case"Home":{if(r.getFirstKey){m.preventDefault();let S=r.getFirstKey();t.setFocusedKey(S),S!=null&&(ut(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(S):p&&t.replaceSelection(S))}break}case"End":{if(r.getLastKey){m.preventDefault();let S=r.getLastKey();t.setFocusedKey(S),S!=null&&(ut(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(S):p&&t.replaceSelection(S))}break}case"PageDown":{if(r.getKeyPageBelow&&t.focusedKey!=null){let S=r.getKeyPageBelow(t.focusedKey);S!=null&&(m.preventDefault(),G(S,m))}break}case"PageUp":{if(r.getKeyPageAbove&&t.focusedKey!=null){let S=r.getKeyPageAbove(t.focusedKey);S!=null&&(m.preventDefault(),G(S,m))}break}case"a":{ut(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":{!i&&o.current&&m.shiftKey&&o.current.focus();break}}},[r,t,o,O,u,p,b,d,l,f,i,G]),be=(0,$.useCallback)(m=>{if(!t.isFocused){if(t.setFocused(!0),t.focusedKey==null){let I=m.relatedTarget,S=I!=null&&!!(m.currentTarget.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING),ce=null;S?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 L.current&&(L.current.scrollTop=P.current.top,L.current.scrollLeft=P.current.left);t.focusedKey!=null&&le(t.focusedKey)}},[t,r,p,L,le]),ie=(0,$.useCallback)(m=>{let I=m.relatedTarget;m.currentTarget.contains(I)||t.setFocused(!1)},[t]),ae=(0,$.useCallback)(m=>{L.current===m.target&&m.preventDefault()},[L]);(0,$.useEffect)(()=>{let m=L.current;if(!m)return()=>{};let I=()=>{P.current={top:m.scrollTop,left:m.scrollLeft}};return m.addEventListener("scroll",I,{passive:!0}),()=>{m.removeEventListener("scroll",I)}},[L]),(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 I of t.selectedKeys)if(t.canSelectItem?.(I)!==!1){m=I;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===j.current)return;let m=qr(o,t.focusedKey);m&&L.current&&hr(L.current,m),j.current=t.focusedKey},[t.isFocused,t.focusedKey,o,L]),(0,$.useEffect)(()=>()=>{V.current&&clearTimeout(V.current)},[]);let g=c?void 0:t.focusedKey==null?0:-1;return{collectionProps:Pe({onKeyDown:w,onFocus:be,onBlur:ie,onMouseDown:ae,tabIndex:g,"data-orientation":T})}}var z=K(x(),1),bt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Xr={...bt,customError:!0,valid:!1},Ue={isInvalid:!1,validationErrors:[],validationDetails:bt},Zr=(0,z.createContext)({}),en="__formValidationState"+Date.now();function Ds(e){if(e[en]){let{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:u}=e[en];return{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:u}}return Ms(e)}function Ms(e){let{isInvalid:t,validationState:r,name:o,value:s,builtinValidation:u,validate:l,validationBehavior:d="aria"}=e;r&&(t||=r==="invalid");let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:Xr}:null,p=(0,z.useMemo)(()=>{if(!l||s==null)return null;let w=Fs(l,s);return Qr(w)},[l,s]);u?.validationDetails.valid&&(u=void 0);let b=(0,z.useContext)(Zr),c=(0,z.useMemo)(()=>o?Array.isArray(o)?o.flatMap(w=>tn(b[w])):tn(b[o]):[],[b,o]),[i,E]=(0,z.useState)(b),[O,T]=(0,z.useState)(!1);b!==i&&(E(b),T(!1));let v=(0,z.useMemo)(()=>Qr(O?[]:c),[O,c]),k=(0,z.useRef)(Ue),[L,P]=(0,z.useState)(Ue),j=(0,z.useRef)(Ue),U=()=>{if(!Y)return;V(!1);let w=p||u||k.current;Jt(w,j.current)||(j.current=w,P(w))},[Y,V]=(0,z.useState)(!1);return(0,z.useEffect)(U),{realtimeValidation:f||v||p||u||Ue,displayValidation:d==="native"?f||v||L:f||v||p||u||L,updateValidation(w){d==="aria"&&!Jt(L,w)?P(w):k.current=w},resetValidation(){let w=Ue;Jt(w,j.current)||(j.current=w,P(w)),d==="native"&&V(!1),T(!0)},commitValidation(){d==="native"&&V(!0),T(!0)}}}function tn(e){return e?Array.isArray(e)?e:[e]:[]}function Fs(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return tn(r)}return[]}function Qr(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Xr}:null}function Jt(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 Is(...e){let t=new Set,r=!1,o={...bt};for(let s of e){for(let u of s.validationErrors)t.add(u);r||=s.isInvalid;for(let u in o)o[u]||=s.validationDetails[u]}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=x(),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,i){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)throw Error("Target container is not a DOM element.");return r(c,i,null,E)},ee.flushSync=function(c){var i=b.T,E=f.p;try{if(b.T=null,f.p=2,c)return c()}finally{b.T=i,f.p=E,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,i){typeof c=="string"&&c?i!=null&&typeof i!="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.",u(i)):i!=null&&typeof i.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(i.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"&&(i?(i=i.crossOrigin,i=typeof i=="string"?i==="use-credentials"?i:"":void 0):i=null,f.d.C(c,i))},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 i=arguments[1];typeof i=="object"&&i.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`.",u(i)):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`.",u(i))}typeof c=="string"&&f.d.D(c)},ee.preinit=function(c,i){if(typeof c=="string"&&c?i==null||typeof i!="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.",u(i)):i.as!=="style"&&i.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".',u(i.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"&&i&&typeof i.as=="string"){var E=i.as,O=o(E,i.crossOrigin),T=typeof i.integrity=="string"?i.integrity:void 0,g=typeof i.fetchPriority=="string"?i.fetchPriority:void 0;E==="style"?f.d.S(c,typeof i.precedence=="string"?i.precedence:void 0,{crossOrigin:O,integrity:T,fetchPriority:g}):E==="script"&&f.d.X(c,{crossOrigin:O,integrity:T,fetchPriority:g,nonce:typeof i.nonce=="string"?i.nonce:void 0})}},ee.preinitModule=function(c,i){var E="";if(typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i!==void 0&&typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":i&&"as"in i&&i.as!=="script"&&(E+=" The `as` option encountered was "+u(i.as)+"."),E)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",E);else switch(E=i&&typeof i.as=="string"?i.as:"script",E){case"script":break;default:E=u(E),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)',E,c)}typeof c=="string"&&(typeof i=="object"&&i!==null?(i.as==null||i.as==="script")&&(E=o(i.as,i.crossOrigin),f.d.M(c,{crossOrigin:E,integrity:typeof i.integrity=="string"?i.integrity:void 0,nonce:typeof i.nonce=="string"?i.nonce:void 0})):i==null&&f.d.M(c))},ee.preload=function(c,i){var E="";if(typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i==null||typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":typeof i.as=="string"&&i.as||(E+=" The `as` option encountered was "+s(i.as)+"."),E&&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',E),typeof c=="string"&&typeof i=="object"&&i!==null&&typeof i.as=="string"){E=i.as;var O=o(E,i.crossOrigin);f.d.L(c,E,{crossOrigin:O,integrity:typeof i.integrity=="string"?i.integrity:void 0,nonce:typeof i.nonce=="string"?i.nonce:void 0,type:typeof i.type=="string"?i.type:void 0,fetchPriority:typeof i.fetchPriority=="string"?i.fetchPriority:void 0,referrerPolicy:typeof i.referrerPolicy=="string"?i.referrerPolicy:void 0,imageSrcSet:typeof i.imageSrcSet=="string"?i.imageSrcSet:void 0,imageSizes:typeof i.imageSizes=="string"?i.imageSizes:void 0,media:typeof i.media=="string"?i.media:void 0})}},ee.preloadModule=function(c,i){var E="";typeof c=="string"&&c||(E+=" The `href` argument encountered was "+s(c)+"."),i!==void 0&&typeof i!="object"?E+=" The `options` argument encountered was "+s(i)+".":i&&"as"in i&&typeof i.as!="string"&&(E+=" The `as` option encountered was "+s(i.as)+"."),E&&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',E),typeof c=="string"&&(i?(E=o(i.as,i.crossOrigin),f.d.m(c,{as:typeof i.as=="string"&&i.as!=="script"?i.as:void 0,crossOrigin:E,integrity:typeof i.integrity=="string"?i.integrity:void 0})):f.d.m(c))},ee.requestFormReset=function(c){f.d.r(c)},ee.unstable_batchedUpdates=function(c,i){return c(i)},ee.useFormState=function(c,i,E){return l().useFormState(c,i,E)},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 Yr=we((da,Zt)=>{"use strict";function Gr(){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(Gr)}catch(e){console.error(e)}}}process.env.NODE_ENV==="production"?(Gr(),Zt.exports=jr()):Zt.exports=Wr()});var rt=K(x(),1);function Pe(...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 u=o[s];s.startsWith("on")&&typeof u=="function"?(r[s]??=[],r[s].push(u)):t[s]=u}}for(let o in r)Object.hasOwn(r,o)&&r[o].length>0&&(t[o]=(...s)=>{for(let u of r[o])u?.(...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 Co({props:e,ref:t,context:r}){let o=Ut({context:r,slot:e.slot})||{},{ref:s=null,...u}=o,l=(0,rt.useRef)(null),d=(0,rt.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=Pe(u,e);return"style"in u&&u.style&&"style"in e&&e.style&&(typeof u.style=="function"||typeof e.style=="function"?f.style=p=>{let b=typeof u.style=="function"?u.style(p):u.style,c={...p.defaultStyle,...b},i=typeof e.style=="function"?e.style({...p,defaultStyle:c}):e.style;return{...c,...i}}:f.style={...u.style,...e.style}),[f,d]}var se=K(x(),1);function Lo(e={}){let{partialVisibility:t=!1,threshold:r=0,rootMargin:o="0px",root:s=null,active:u=!0,once:l=!1,onChange:d}=e,[f,p]=(0,se.useState)(null),[b,c]=(0,se.useState)(!1),[i,E]=(0,se.useState)(null),O=(0,se.useRef)(!1),T=(0,se.useRef)(null),g=Re(L=>{let P=L[0],j=P.isIntersecting,U={isIntersecting:P.isIntersecting,intersectionRatio:P.intersectionRatio,intersectionRect:P.intersectionRect,boundingClientRect:P.boundingClientRect,rootBounds:P.rootBounds,time:P.time};E(U),c(Y=>l&&O.current?!0:j&&l?(O.current=!0,Y!==!0&&d&&d(!0),!0):Y!==j?(d&&d(j),j):Y)}),k=(0,se.useCallback)(L=>{p(L)},[]);return(0,se.useEffect)(()=>{if(!u||!f)return;let L;return t===!0?L=[0,.1,.25,.5,.75,1]:typeof t=="string"?L=.01:L=r,T.current=new IntersectionObserver(g,{root:s,rootMargin:o,threshold:L}),T.current.observe(f),()=>{T.current&&T.current.disconnect()}},[u,f,s,o,r,t,g]),[k,b,i]}var ft=K(x(),1);var Po=Object.defineProperty,ot=(e,t)=>{for(var r in t)Po(e,r,{get:t[r],enumerable:!0})},De={};ot(De,{ARIA_ATTRIBUTES:()=>xn,HTML_TAGS:()=>Nn,PRIMITIVE_TAGS:()=>kn,default:()=>Do});var xn=["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"],kn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nn=["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"],Do={ARIA_ATTRIBUTES:xn,PRIMITIVE_TAGS:kn,HTML_TAGS:Nn},Mo={};ot(Mo,{NUMERIC_DIGITS:()=>Kn,default:()=>Fo});var Kn=["1","2","3","4","5","6","7","8","9","0"],Fo={NUMERIC_DIGITS:Kn},Io={};ot(Io,{AMPERSAND:()=>qn,ASTERISK:()=>Xn,BACKSLASH:()=>ar,BOM:()=>Bn,CARRIAGE_RETURN:()=>jn,COLON:()=>nr,COMMA:()=>Jn,COMMERCIAL_AT:()=>ur,DOT:()=>tr,DOUBLE_QUOTE:()=>Yn,EXCLAMATION:()=>Gn,GRAVE_ACCENT:()=>lr,GREATER_THAN:()=>or,LEFT_CURLY_BRACKET:()=>fr,LEFT_SQUARE_BRACKET:()=>ir,LINE_FEED:()=>Vn,MINUS:()=>er,PERCENT:()=>zn,PLUS:()=>Zn,QUESTION:()=>sr,RIGHT_CURLY_BRACKET:()=>pr,RIGHT_SQUARE_BRACKET:()=>cr,SHARP:()=>$n,SINGLE_QUOTE:()=>Qn,SMALLER_THAN:()=>rr,SPACE:()=>Wn,TAB:()=>Hn,VERTICAL_LINE:()=>dr,default:()=>Uo});var Bn=65279,Hn=9,Vn=10,jn=13,Wn=32,Gn=33,Yn=34,$n=35,zn=37,qn=38,Qn=39,Xn=42,Zn=43,Jn=44,er=45,tr=46,nr=58,rr=60,or=62,sr=63,ur=64,ir=91,ar=92,cr=93,lr=96,fr=123,dr=124,pr=125,Uo={BOM:Bn,TAB:Hn,LINE_FEED:Vn,CARRIAGE_RETURN:jn,SPACE:Wn,EXCLAMATION:Gn,DOUBLE_QUOTE:Yn,SHARP:$n,PERCENT:zn,AMPERSAND:qn,SINGLE_QUOTE:Qn,ASTERISK:Xn,PLUS:Zn,COMMA:Jn,MINUS:er,DOT:tr,COLON:nr,SMALLER_THAN:rr,GREATER_THAN:or,QUESTION:sr,COMMERCIAL_AT:ur,LEFT_SQUARE_BRACKET:ir,BACKSLASH:ar,RIGHT_SQUARE_BRACKET:cr,GRAVE_ACCENT:lr,LEFT_CURLY_BRACKET:fr,VERTICAL_LINE:dr,RIGHT_CURLY_BRACKET:pr},xo={};ot(xo,{CAPITALIZED:()=>yr,LOWERCASE:()=>mr,VOWELS:()=>Er,default:()=>ko});var yr=["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"],mr=["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"],Er=["A","E","I","O","U","a","e","i","o","u"],ko={CAPITALIZED:yr,LOWERCASE:mr,VOWELS:Er};function No(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var st=()=>No(/^Mac/i);function gr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):!1}var Ko=()=>gr(/^iPhone/i),Bo=()=>gr(/^iPad/i)||st()&&navigator.maxTouchPoints>1,xt=()=>Ko()||Bo();function ut(e){return st()?e.metaKey??!1:e.ctrlKey??!1}function q(e){return e?.ownerDocument?e.ownerDocument:typeof document<"u"?document:null}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:null}var it=null;function Ho(){if(it==null&&(it=!1,typeof document<"u"))try{document.createElement("div").focus({get preventScroll(){return it=!0,!0}})}catch{}return it}function hr(e,t,r){let{block:o="nearest",inline:s="nearest"}=r??{},u=e.getBoundingClientRect(),l=t.getBoundingClientRect(),d=l.top<u.top,f=l.bottom>u.bottom,p=l.left<u.left,b=l.right>u.right;if(d||f){let c=e.scrollTop;if(o==="start"||o==="nearest"&&d)c=e.scrollTop+(l.top-u.top);else if(o==="end"||o==="nearest"&&f)c=e.scrollTop+(l.bottom-u.bottom);else if(o==="center"){let i=u.top+u.height/2,E=l.top+l.height/2;c=e.scrollTop+(E-i)}e.scrollTop=c}if(p||b){let c=e.scrollLeft;if(s==="start"||s==="nearest"&&p)c=e.scrollLeft+(l.left-u.left);else if(s==="end"||s==="nearest"&&b)c=e.scrollLeft+(l.right-u.right);else if(s==="center"){let i=u.left+u.width/2,E=l.left+l.width/2;c=e.scrollLeft+(E-i)}e.scrollLeft=c}}function Vo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function at(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??null:Vo(o)?o.host:o.parentNode}return!1}var pe=(e=typeof document<"u"?document:null,t=!0)=>{if(!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 ct(e,t=!0){return t&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ke(e){if(Ho())e.focus({preventScroll:!0});else{let t=e.parentNode,r=[],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;o instanceof HTMLElement&&r.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),e.focus();for(let{element:s,scrollTop:u,scrollLeft:l}of r)s.scrollTop=u,s.scrollLeft=l}}var Tr="necto-style",vr=new WeakMap;function jo(e,t={}){let{id:r=Tr,insertionPoint:o}=t,s=o?q(o):typeof document<"u"?document:null;if(!s)return null;let u=s.createElement("style");return u.setAttribute("type","text/css"),u.setAttribute("necto-style-id",r),u.textContent=e,o?s.head.insertBefore(u,o):s.head.appendChild(u),u}function br(e,t={}){let{id:r=Tr,window:o=typeof window<"u"?window:null,insertionPoint:s}=t;if(!o||!e)return()=>{};let u=(function(f){let p=vr.get(f);return p||(p=new Map,vr.set(f,p)),p})(o),l=`${r}:${e}`,d=u.get(l);return d?d.element&&(d.element.textContent=e,d.count++):(d={element:jo(e,{id:r,insertionPoint:s}),count:1},u.set(l,d)),()=>{let f=u.get(l);f?.element&&(f.count--,f.count<1&&(f.element.remove(),f.element=null,u.delete(l)))}}var de=new Map,kt=new Set;function Wo(e){if(!("propertyName"in e)||!e.target)return;let t=de.get(e.target);t||(t=new Set,de.set(e.target,t),e.target.addEventListener("transitioncancel",Kt,{once:!0})),t.add(e.propertyName)}function Kt(e){if(!("propertyName"in e)||!e.target)return;let t=de.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",Kt),de.delete(e.target)),de.size===0)){for(let r of kt)r();kt.clear()}}if(typeof window<"u"&&typeof document<"u"){let e=()=>{let t=document.body;t&&(t.addEventListener("transitionrun",Wo),t.addEventListener("transitionend",Kt))};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}function Bt(e){requestAnimationFrame(()=>{for(let[t]of de)"isConnected"in t&&!t.isConnected&&de.delete(t);de.size===0?e():kt.add(e)})}var Zs=De.HTML_TAGS.reduce((e,t)=>{var r;return e[r=t,r.charAt(0).toUpperCase()+r.slice(1)]=t,e},{}),Nt="",Me="default",Ne=new WeakMap;function lt(e){if(xt()){if(Me==="default"){let t=q(e);t?.documentElement?.style.webkitUserSelect!==void 0&&(Nt=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none",Me="disabled")}}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=e.style,r="userSelect"in t?"userSelect":"webkitUserSelect";Ne.has(e)||(Ne.set(e,t[r]??""),t[r]="none")}}function ye(e){if(xt()){if(Me!=="disabled")return;Me="restoring",setTimeout(()=>{Bt(()=>{if(Me==="restoring"){let t=q(e);t?.documentElement?.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Nt||""),Nt="",Me="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&Ne.has(e)){let t=Ne.get(e)??"",r=e.style,o="userSelect"in r?"userSelect":"webkitUserSelect";r[o]==="none"&&(r[o]=t),e.getAttribute("style")?.trim()===""&&e.removeAttribute("style"),Ne.delete(e)}}var W=De.ARIA_ATTRIBUTES.reduce((e,t)=>(e[(r=>{let o=r.replace("aria-","");return o.charAt(0).toUpperCase()+o.slice(1)})(t)]=t,e),{}),Go=De.ARIA_ATTRIBUTES,tu=new Set(Go);function Be(e={}){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e,u=(0,ft.useCallback)((p,b)=>{p?(r?.(b),s?.(!0)):(o?.(b),s?.(!1))},[r,o,s]),l=(0,ft.useCallback)(p=>{p.target===p.currentTarget&&u(!1,p)},[u]),d=He({onBlur:l}),f=(0,ft.useCallback)(p=>{let b=q(p.target),c=b?pe(b):pe();p.target===p.currentTarget&&c===ct(p.nativeEvent)&&(u(!0,p),d(p))},[u,d]);return{focusProps:{...t?{}:{onFocus:f,onBlur:l}}}}var dt=K(x(),1);function Yo(e,t){let{autoFocus:r,isDisabled:o,excludeFromTabOrder:s}=e,{focusProps:u}=Be(e),{keyboardProps:l}=Ht(e),d=(0,dt.useRef)(r),f=q(t.current),p=f?pe(f):null;(0,dt.useEffect)(()=>{if(d.current&&t.current)if(Ve()==="virtual"){let c=p;Bt(()=>{f&&pe(f)===c&&t.current?.isConnected&&Ke(t.current)})}else Ke(t.current);d.current=!1},[t,p,f]);let b=s?-1:0;return o&&(b=void 0),{focusableProps:Pe(u??{},l,{tabIndex:b})}}var me=K(x(),1);var $o=null;function zo(e={}){let{within:t=!1,isTextInput:r=!1,autoFocus:o=!1}=e,s=(0,me.useRef)({isFocused:o,isFocusVisible:o||$o!=="pointer"}),[u,l]=(0,me.useState)(o),[d,f]=(0,me.useState)(()=>s.current.isFocused&&s.current.isFocusVisible),p=(0,me.useCallback)(()=>{f(s.current.isFocused&&s.current.isFocusVisible)},[]),b=(0,me.useCallback)(E=>{s.current.isFocused=E,l(E),p()},[p]);je({fn:E=>{s.current.isFocusVisible=E,p()},deps:[],opts:{isTextInput:r}});let{focusProps:c={}}=Be({isDisabled:t,onFocusChange:b})||{},{focusWithinProps:i={}}=Vt({isDisabled:!t,onFocusWithinChange:b})||{};return{isFocused:u,isFocusVisible:d,focusProps:t?i:c}}var Rr=K(x(),1);function qo(e={}){let{isTextInput:t,autoFocus:r}=e,[o,s]=(0,Rr.useState)(r||Ve()!=="pointer");return je({fn:u=>s(u),deps:[t],opts:{isTextInput:t}}),{isFocusVisible:o}}var Fe=new Map,pt=new Set,Or=!1,jt=null,Sr=!1,Q={get hasEventBeforeFocus(){return Or},set hasEventBeforeFocus(e){Or=e},get hasBlurredWindowRecently(){return Sr},set hasBlurredWindowRecently(e){Sr=e},get currentModality(){return jt},set currentModality(e){jt=e}};function Ve(){return jt}var fs={},yt=Object.create(null),We=e=>globalThis.process?.env||fs.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?yt:globalThis),Ee=new Proxy(yt,{get(e,t){return We()[t]??yt[t]},has(e,t){let r=We();return t in r||t in yt},set(e,t,r){let o=We(!0);return o[t]=r,!0},deleteProperty(e,t){if(!t)return!1;let r=We(!0);return delete r[t],!0},ownKeys(){let e=We(!0);return Object.keys(e)}}),Ar=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Qo=[["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 Xo(){if(globalThis.process?.env)for(let e of Qo){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 wr=Xo(),_u=wr.name;function Se(e){return e?e!=="false":!1}var Wt=globalThis.process?.platform||"",Cr=Se(Ee.CI)||wr.ci!==!1,Lr=Se(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);var Au=Se(Ee.DEBUG),Ge=Ar==="test"||Se(Ee.TEST),Pr=Ar==="production";var wu=Se(Ee.MINIMAL)||Cr||Ge||!Lr,Zo=/^win/i.test(Wt),Cu=/^linux/i.test(Wt),Dr=/^darwin/i.test(Wt),Lu=!Se(Ee.NO_COLOR)&&(Se(Ee.FORCE_COLOR)||(Lr||Zo)&&Ee.TERM!=="dumb"||Cr),Jo=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,Pu=Number(Jo?.split(".")[0])||null,es=globalThis.process||Object.create(null),_r={versions:{}},Du=new Proxy(es,{get(e,t){if(t==="env")return Ee;if(t in e)return e[t];if(t in _r)return _r[t]}}),ts=globalThis.process?.release?.name==="node",ns=!!globalThis.Bun||!!globalThis.process?.versions?.bun,rs=!!globalThis.Deno,os=!!globalThis.fastly,ss=!!globalThis.Netlify,us=!!globalThis.EdgeRuntime,is=globalThis.navigator?.userAgent==="Cloudflare-Workers",as=[[ss,"netlify"],[us,"edge-light"],[is,"workerd"],[os,"fastly"],[rs,"deno"],[ns,"bun"],[ts,"node"]];function cs(){let e=as.find(t=>t[0]);if(e)return{name:e[1]}}var ls=cs(),Mu=ls?.name||"";var Fr=K(x(),1);function Gt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&Pr?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 mt(e){let t=e;return Object.assign(t,{nativeEvent:e,isDefaultPrevented:()=>t.defaultPrevented,isPropagationStopped:()=>t.cancelBubble,persist:()=>{}}),t}var ds=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),ps={Tab:!0,Escape:!0};function Mr(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 u=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 u&&!ds.has(p.type)||p instanceof l||p instanceof d&&p.isContentEditable,!(e&&t==="keyboard"&&r instanceof f&&!ps[r.key])}function $t(e,t){pt.forEach(r=>r(e,t))}function ys(e){return!(e.metaKey||Dr&&e.altKey||e.ctrlKey||["Control","Shift","Meta"].includes(e.key))}function Ir(e){ys(e)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="keyboard",$t("keyboard",e))}function Yt(e){["mousedown","pointerdown"].includes(e.type)&&(Q.hasEventBeforeFocus=!0,Q.currentModality="pointer",$t("pointer",e))}function Ur(e){[window,document].includes(e.target)||!e.isTrusted||!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently||(!Q.hasEventBeforeFocus&&!Q.hasBlurredWindowRecently&&(Q.currentModality="virtual",$t("virtual",e)),Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!1)}function xr(){Q.hasEventBeforeFocus=!1,Q.hasBlurredWindowRecently=!0}function ms(e){let t=Oe(e),r=q(e);if(typeof window>"u"||typeof document>"u"||!t||!r||Fe.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",Ir,!0),r.addEventListener("click",Yt,!0),t.addEventListener("focus",Ur,!0),t.addEventListener("blur",xr,!1),typeof PointerEvent<"u"&&r.addEventListener("pointerdown",Yt,!0),Fe.set(t,{focus:o})}function Es(e){let t=Oe(e),r=q(e);if(!t||!r||!Fe.has(t))return;let{focus:o}=Fe.get(t);t.HTMLElement.prototype.focus=o,r.removeEventListener("keydown",Ir,!0),r.removeEventListener("click",Yt,!0),t.removeEventListener("focus",Ur,!0),t.removeEventListener("blur",xr,!1),Fe.delete(t)}function je(e){let{fn:t,deps:r,opts:o}=e;typeof window>"u"||typeof document>"u"||(ms(),(0,Fr.useEffect)(()=>{let s=(u,l)=>{Mr(!!o?.isTextInput,u,l)&&t(Q.currentModality!=="pointer")};return pt.add(s),()=>{pt.delete(s),Es()}},r))}var Ye=K(x(),1);function Vt(e){let{isDisabled:t,onFocusWithin:r,onBlurWithin:o,onFocusWithinChange:s}=e,u=(0,Ye.useRef)({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:d}=$e(),f=(0,Ye.useCallback)(c=>{c.currentTarget.contains(c.target)&&u.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(u.current.isFocusWithin=!1,d(),o&&o(c),s&&s(!1))},[o,s,d]),p=He({onBlur:f}),b=(0,Ye.useCallback)(c=>{if(!c.currentTarget.contains(c.target))return;let i=q(c.target);if(!i)return;let E=pe(i);if(!u.current.isFocusWithin&&E===ct(c.nativeEvent)){r&&r(c),s&&s(!0),u.current.isFocusWithin=!0,p(c);let O=c.currentTarget;l(i,"focus",T=>{if(u.current.isFocusWithin&&!at(O,T.target)&&i.defaultView&&typeof i.defaultView.FocusEvent=="function"){let g=new i.defaultView.FocusEvent("blur",{relatedTarget:T.target});Object.defineProperty(g,"target",{value:O}),Object.defineProperty(g,"currentTarget",{value:O});let k=mt(g);f(k)}},{capture:!0})}},[r,s,p,l,f]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:b,onBlur:f}}}var ge=K(x(),1);function $e(){let e=(0,ge.useRef)(new Map),t=(0,ge.useCallback)((s,u,l,d)=>{let f=typeof d=="object"&&d?.once?(...p)=>{e.current.delete(l),l(...p)}:l;e.current.set(l,{type:u,eventTarget:s,options:d}),s.addEventListener(u,f,d)},[]),r=(0,ge.useCallback)((s,u,l,d)=>{let f=e.current.get(l),p=f?.options?.once?f.fn:l;s.removeEventListener(u,p,d),e.current.delete(l)},[]),o=(0,ge.useCallback)(()=>{e.current.forEach((s,u)=>{s.eventTarget.removeEventListener(s.type,u,s.options)}),e.current.clear()},[]);return(0,ge.useEffect)(()=>()=>o(),[o]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:o}}var te=K(x(),1);function gs(e={}){let{onHoverStart:t,onHoverChange:r,onHoverEnd:o,isDisabled:s}=e,[u,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}=$e(),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 g=d.current;return g.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",T):Ge&&document.addEventListener("touchend",c),()=>{g.hoverCount--,g.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",T):Ge&&document.removeEventListener("touchend",c))}},[c]);let i=(0,te.useCallback)((T,g)=>{if(s||g==="touch"||f.isHovered||!(T.currentTarget&&T.currentTarget.contains(T.target)))return;f.isHovered=!0,f.pointerType=g,f.target=T.currentTarget;let k=q(T.target instanceof Element?T.target:null);k&&(p(k,"pointerover",L=>{f.isHovered&&f.target&&!at(f.target,L.target)&&E(L,L.pointerType)},{capture:!0}),t?.({type:"hoverstart",target:T.currentTarget,pointerType:g}),r?.(!0),l(!0))},[s,t,r,p,f]),E=(0,te.useCallback)((T,g)=>{g==="touch"||!f.isHovered||!f.target||(f.isHovered=!1,f.pointerType="",f.target=null,b(),o?.({type:"hoverend",target:T.currentTarget,pointerType:g}),r?.(!1),l(!1))},[o,r,b,f.target,f]),O=(0,te.useMemo)(()=>{let T={};return typeof PointerEvent<"u"?(T.onPointerEnter=g=>{d.current.ignoreEmulated&&g.pointerType==="mouse"||i(g,g.pointerType)},T.onPointerLeave=g=>{!s&&g.currentTarget instanceof Element&&g.currentTarget.contains(g.target)&&E(g,g.pointerType)}):Ge&&(T.onTouchStart=()=>{f.ignoreEmulatedMouseEvents=!0},T.onMouseEnter=g=>{!f.ignoreEmulatedMouseEvents&&!d.current.ignoreEmulated&&i(g.nativeEvent,"mouse"),f.ignoreEmulatedMouseEvents=!1},T.onMouseLeave=g=>{!s&&g.currentTarget.contains(g.target)&&E(g.nativeEvent,"mouse")}),T},[s,i,E,f]);return(0,te.useEffect)(()=>{s&&f.isHovered&&E({currentTarget:f.target},f.pointerType)},[s,E,f.isHovered,f.pointerType,f.target]),{hoverProps:O,isHovered:u}}var kr={prefix:"",current:0},ze=new Map,qe=typeof FinalizationRegistry<"u"?new FinalizationRegistry(e=>{ze.delete(e)}):null;var oe=K(x(),1);function vs(e={}){let{prefix:t="necto",defaultId:r}=e,[o,s]=(0,oe.useState)(()=>r),u=(0,oe.useRef)(null),l=(0,oe.useRef)({}),d=(()=>{if(r)return r;let f=typeof oe.default.useId=="function"?(0,oe.useId)():String(++kr.current);return`${t}-${f}`})();return(0,oe.useEffect)(()=>{if(typeof window<"u"&&window.document?.createElement){let f=ze.get(d)||[],p={current:u.current};f.some(b=>b===p)||ze.set(d,[...f,p])}return qe&&qe.register(l.current,d),()=>{qe&&qe.unregister(l.current),ze.delete(d)}},[d]),(0,oe.useEffect)(()=>{let f=u.current;f&&(s(f),u.current=null)},[]),d}function Ht(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:e.onKeyDown?Gt(t=>e.onKeyDown?.(t.nativeEvent)):void 0,onKeyUp:e.onKeyUp?Gt(t=>e.onKeyUp?.(t.nativeEvent)):void 0}}}var ve=K(x(),1);function zt(e={}){let{type:t="function"}=e,r=(0,ve.useRef)(!1),[o,s]=(0,ve.useState)(!1),u=(0,ve.useCallback)(()=>r.current,[]);return(0,ve.useEffect)(()=>(r.current=!0,s(!0),()=>{r.current=!1,s(!1)}),[]),t==="ref"?r:t==="boolean"?o:u}var H=K(x(),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 hs(e={}){let{isDisabled:t,preventFocusOnPress:r,allowTextSelectionOnPress:o,ref:s,onPress:u,onPressStart:l,onPressEnd:d,onPressChange:f,onPressUp:p,onClick:b}=e,[c,i]=(0,H.useState)(!1),E=(0,H.useRef)(!1),O=(0,H.useRef)(null),T=(0,H.useRef)(!1),g=(0,H.useCallback)(v=>{c!==v&&(i(v),f?.(v))},[c,f]),k=(0,H.useCallback)(v=>{if(!T.current)return;let m=O.current&&O.current instanceof Node&&v.target instanceof Node&&O.current.contains(v.target);if(T.current=!1,g(!1),!o&&O.current instanceof HTMLElement&&ye(O.current),v.target){let I={...X("pressend","mouse",v),target:v.target};d?.(I),p?.(I),m&&u?.(I)}},[d,p,u,g,o]),L=(0,H.useCallback)(v=>{if(t||v.button!==0||E.current)return;r&&v.preventDefault(),o||lt(v.currentTarget),T.current=!0,O.current=v.currentTarget,g(!0);let m=X("pressstart","mouse",v);l?.(m),window.addEventListener("mouseup",k,{once:!0})},[t,r,o,l,g,k]),P=(0,H.useCallback)(v=>{if(t||v.button!==0||!T.current)return;T.current=!1,g(!1),!o&&v.currentTarget instanceof HTMLElement&&ye(v.currentTarget);let m=X("pressend","mouse",v);d?.(m),p?.(m),v.currentTarget instanceof Node&&v.currentTarget.contains(v.target)&&u?.(X("press","mouse",v))},[t,u,d,p,g,o]),j=(0,H.useCallback)(v=>{c&&(g(!1),d?.(X("pressend","mouse",v)),!o&&v.currentTarget instanceof HTMLElement&&ye(v.currentTarget))},[c,g,d,o]),U=(0,H.useCallback)(v=>{T.current&&!c&&(g(!0),l?.(X("pressstart","mouse",v)))},[c,l,g]),Y=(0,H.useCallback)(v=>{if(!T.current)return;T.current=!1,g(!1),!o&&O.current instanceof HTMLElement&&ye(O.current);let m={...X("pressend","touch",v),target:v.target};d?.(m),p?.(m)},[d,p,g,o]),V=(0,H.useCallback)(v=>{if(!T.current)return;T.current=!1,g(!1),!o&&O.current instanceof HTMLElement&&ye(O.current);let m={...X("pressend","touch",v),target:v.target};d?.(m)},[d,g,o]),G=(0,H.useCallback)(v=>{t||(o||lt(v.currentTarget),E.current=!0,setTimeout(()=>{E.current=!1},100),T.current=!0,O.current=v.currentTarget,g(!0),l?.(X("pressstart","touch",v)),window.addEventListener("touchend",Y,{once:!0}),window.addEventListener("touchcancel",V,{once:!0}))},[t,l,g,o,Y,V]),le=(0,H.useCallback)(v=>{if(t||!T.current)return;T.current=!1,g(!1),!o&&v.currentTarget instanceof HTMLElement&&ye(v.currentTarget);let m=X("pressend","touch",v);d?.(m),p?.(m),v.currentTarget instanceof Node&&v.currentTarget.contains(v.target)&&u?.(X("press","touch",v))},[t,u,d,p,g,o]),w=(0,H.useCallback)(v=>{if(t)return;(v.key==="Enter"||v.key===" ")&&!c&&(v.key===" "&&v.preventDefault(),o||lt(),g(!0),T.current=!0,l?.(X("pressstart","keyboard",v)))},[t,c,l,g,o]),be=(0,H.useCallback)(v=>{if(t)return;if((v.key==="Enter"||v.key===" ")&&c){g(!1),T.current=!1,o||ye();let I=X("pressend","keyboard",v);d?.(I),p?.(X("pressup","keyboard",v)),u?.(X("press","keyboard",v))}},[t,c,u,d,p,g,o]),ie=(0,H.useCallback)(v=>{if(t){v.preventDefault();return}E.current||b?.(v)},[t,b]);(0,H.useEffect)(()=>()=>{window.removeEventListener("mouseup",k),window.removeEventListener("touchend",Y),window.removeEventListener("touchcancel",V)},[k,Y,V]);let ae=(0,H.useMemo)(()=>({onMouseDown:L,onMouseUp:P,onMouseLeave:j,onMouseEnter:U,onTouchStart:G,onTouchEnd:le,onKeyDown:w,onKeyUp:be,onClick:ie}),[L,P,j,U,G,le,w,be,ie]);return(0,H.useEffect)(()=>{let v=s?.current,m=v?Oe(v):void 0;v&&m&&v instanceof m.Element&&m.getComputedStyle(v).touchAction==="auto"&&(v.style.touchAction="pan-x pan-y pinch-zoom")},[s]),{pressProps:ae,isPressed:c}}var Nr=K(x(),1);function Ts(e){let{style:t,values:r,children:o,className:s,defaultStyle:u,defaultChildren:l,defaultClassName:d="necto"}=e;return(0,Nr.useMemo)(()=>{let f=typeof s=="function"?s({...r,defaultClassName:d}):s?`${d} ${s}`:d,p=typeof t=="function"?t({...r,defaultStyle:u||{}}):{...u,...t},b=typeof o=="function"?o({...r,defaultChildren:l}):o??l;return{className:f,style:p,children:b}},[s,t,o,d,l,u,r])}var Kr=K(x(),1);function Ut(e){let{context:t,slot:r}=e,o=(0,Kr.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 u=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 ${u}.`)}return o.slots[s]}return o}var Ie=K(x(),1);function He(e){let{onBlur:t}=e,r=(0,Ie.useRef)({isFocused:!1,observer:null});(0,Ie.useLayoutEffect)(()=>{let s=r.current;return()=>{s.observer&&(s.observer.disconnect(),s.observer=null)}},[]);let o=Re(s=>{t?.(s)});return(0,Ie.useCallback)(s=>{if(s.target instanceof HTMLButtonElement||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement||s.target instanceof HTMLSelectElement){r.current.isFocused=!0;let u=s.target,l=d=>{if(r.current.isFocused=!1,u.disabled){let f=mt(d);o(f)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};u.addEventListener("focusout",l,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&u.disabled){r.current.observer?.disconnect();let d=u===document.activeElement?null:document.activeElement;u.dispatchEvent(new FocusEvent("blur",{relatedTarget:d})),u.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:d}))}}),r.current.observer.observe(u,{attributes:!0,attributeFilter:["disabled"]})}},[o])}var he=K(x(),1);function Re(e){let t=(0,he.useRef)(e);return(typeof window<"u"?he.useLayoutEffect:he.useEffect)(()=>{t.current=e},[e]),(0,he.useCallback)(((...r)=>t.current(...r)),[])}var Et=K(x(),1);function ki(e){let t=zt(),[r,o]=(0,Et.useState)(!1);return(0,Et.useEffect)(()=>{t()&&o(!!e())},[e,t]),r}var _e=K(x(),1);function bs(e={}){let{autoLock:t=!1,target:r,widthReflow:o=!0}=e,[s,u]=(0,_e.useState)(!1),l=(0,_e.useRef)(null),d=(0,_e.useRef)(null),f=Re(()=>{if(typeof window>"u"||!l.current)return;let{overflow:b,paddingRight:c}=l.current.style;if(d.current={overflow:b,paddingRight:c},o){let i=l.current===document.body?window.innerWidth:l.current.offsetWidth,E=parseInt(window.getComputedStyle(l.current).paddingRight,10)||0,O=i-l.current.scrollWidth;l.current.style.paddingRight=`${O+E}px`}l.current.style.overflow="hidden",u(!0)}),p=Re(()=>{l.current&&d.current&&(l.current.style.overflow=d.current.overflow,o&&(l.current.style.paddingRight=d.current.paddingRight)),u(!1)});return(0,_e.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,f,p]),{isLocked:s,lock:f,unlock:p}}var Br=K(x(),1);function Rs(e={}){let{isInvalid:t,isDisabled:r,isReadOnly:o,isRequired:s,isBusy:u,isPressed:l,isExpanded:d,isSelected:f,isChecked:p,isHidden:b,hasPopup:c,valueCurrent:i,valueMin:E,valueMax:O,valueText:T,label:g,labelledBy:k,describedBy:L,controls:P,owns:j}=e;return(0,Br.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:u,attr:W.Busy},{value:d,attr:W.Expanded},{value:f,attr:W.Selected},{value:b,attr:W.Hidden}];for(let{value:V,attr:G}of Y)V!==void 0&&(U[G]=V||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),i!==void 0&&(U[W.Valuenow]=i),E!==void 0&&(U[W.Valuemin]=E),O!==void 0&&(U[W.Valuemax]=O),T!==void 0&&(U[W.Valuetext]=T),g!==void 0&&(U[W.Label]=g),k!==void 0&&(U[W.Labelledby]=k),L!==void 0&&(U[W.Describedby]=L),P!==void 0&&(U[W.Controls]=P),j!==void 0&&(U[W.Owns]=j),U},[t,r,o,s,u,l,d,f,p,b,c,i,E,O,T,g,k,L,P,j])}function Os({id:e,css:t,insertionPoint:r,enabled:o=!0,window:s=typeof window<"u"?window:null}){let u=Array.isArray(t)?t.join(`
18
+ `):t;Hr(()=>{if(!(!o||!u))return br(u,{id:e,window:s,insertionPoint:r})},[e,u,s,r,o])}var gt=K(x(),1);function Zi(e){let t=(0,gt.useRef)(e);return(0,gt.useLayoutEffect)(()=>{t.current=e}),t}var vt=K(x(),1),Hr=vt.default.useInsertionEffect??vt.useLayoutEffect;function qt(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 Qt(e,t,r=".",o){if(!qt(t))return Qt(e,{},r,o);let s=Object.assign({},t);for(let u in e){if(u==="__proto__"||u==="constructor")continue;let l=e[u];l!=null&&(o&&o(s,u,l,r)||(Array.isArray(l)&&Array.isArray(s[u])?s[u]=[...l,...s[u]]:qt(l)&&qt(s[u])?s[u]=Qt(l,s[u],(r?`${r}.`:"")+u.toString(),o):s[u]=l))}return s}function Xt(e){return(...t)=>t.reduce((r,o)=>Qt(r,o,"",e),{})}var ht=Xt(),ta=Xt((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),na=Xt((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});var ne=K(x(),1);function _s(e={}){let{isDisabled:t,onLongPressStart:r,onLongPressEnd:o,onLongPress:s,accessibilityDescription:u,threshold:l}=ht(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 i=(0,ne.useCallback)(P=>({type:P,pointerType:f.current??"mouse",target:p.current}),[]),E=(0,ne.useCallback)(P=>{t||P.button!==0||P.pointerType!=="mouse"&&(f.current=P.pointerType,p.current=P.currentTarget,b.current=!1,r?.(i("longpressstart")),d.current=setTimeout(()=>{b.current=!0,P.currentTarget?.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),s?.(i("longpress")),d.current=null},l))},[t,l,r,s,i]),O=(0,ne.useCallback)(()=>{f.current!==null&&(c(),!b.current&&o&&o(i("longpressend")),f.current=null,p.current=null)},[c,o,i]),T=(0,ne.useCallback)(()=>{c(),f.current!==null&&o&&o(i("longpressend")),f.current=null,p.current=null},[c,o,i]),g=(0,ne.useCallback)(P=>{b.current&&P.preventDefault()},[]);return{longPressProps:t?{}:{onPointerDown:E,onPointerUp:O,onPointerCancel:T,onContextMenu:g,...!t&&!!s&&!!u&&{"aria-description":u}}}}var zr=K(Yr(),1),ue=K(x(),1);function Ls(e){let{ref:t,isOpen:r,isReady:o=!0}=e,[s,u]=(0,ue.useState)(r),l=s&&o;(0,ue.useLayoutEffect)(()=>{if(l&&t.current&&"getAnimations"in t.current)for(let i of t.current.getAnimations())i instanceof CSSTransition&&i.cancel()},[t,l]),$r(t,l,(0,ue.useCallback)(()=>u(!1),[]));let[d,f]=(0,ue.useState)(r);r&&!d?(u(!0),f(!0)):!r&&d&&f(!1);let[p,b]=(0,ue.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 $r(t,c,(0,ue.useCallback)(()=>{b(i=>i==="exiting"?"closed":i)},[])),{isEntering:l,isExiting:c,isRendered:r||c}}function $r(e,t,r){(0,ue.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(u=>u.finished)).then(()=>{s||(0,zr.flushSync)(()=>{r()})}).catch(()=>{}),()=>{s=!0}}},[e,t,r])}var $=K(x(),1);function Ps(e){return st()?e.metaKey:e.ctrlKey}function qr(e,t){return e.current?.querySelector(`[data-key="${t}"]`)??null}function Ds(e){let{selectionManager:t,keyboardDelegate:r,ref:o,autoFocus:s,shouldFocusWrap:u,disallowEmptySelection:l,disallowSelectAll:d,escapeBehavior:f,selectOnFocus:p,disallowTypeAhead:b,shouldUseVirtualFocus:c,allowsTabNavigation:i,scrollRef:E,direction:O,orientation:T,onNavigate:g,onFocusItem:k}=ht(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"}),L=E??o,P=(0,$.useRef)({top:0,left:0}),j=(0,$.useRef)(t.focusedKey),U=(0,$.useRef)(s),Y=(0,$.useRef)(""),V=(0,$.useRef)(null),G=(0,$.useCallback)((m,I,S)=>{m!=null&&(t.setFocusedKey(m,S),g?.(m),I?.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(m):p&&!Ps(I)&&t.replaceSelection(m))},[t,p,g]),le=(0,$.useCallback)(m=>{if(k){k(m);return}let I=qr(o,m);I&&!c&&Ke(I)},[o,c,k]),w=(0,$.useCallback)(m=>{if(!b&&m.key.length===1&&!m.ctrlKey&&!m.metaKey&&!m.altKey){V.current&&clearTimeout(V.current),Y.current+=m.key;let S=r.getKeyForSearch?.(Y.current,t.focusedKey)??null;S!=null&&(m.preventDefault(),G(S,m)),V.current=setTimeout(()=>{Y.current=""},500);return}let I=O==="rtl";switch(m.key){case"ArrowDown":{if(r.getKeyBelow){let S=t.focusedKey!=null?r.getKeyBelow(t.focusedKey):r.getFirstKey?.()??null;S==null&&u&&(S=r.getFirstKey?.()??null),S!=null&&(m.preventDefault(),G(S,m))}break}case"ArrowUp":{if(r.getKeyAbove){let S=t.focusedKey!=null?r.getKeyAbove(t.focusedKey):r.getLastKey?.()??null;S==null&&u&&(S=r.getLastKey?.()??null),S!=null&&(m.preventDefault(),G(S,m))}break}case"ArrowLeft":{if(r.getKeyLeftOf){let S=t.focusedKey!=null?r.getKeyLeftOf(t.focusedKey):null;S==null&&u&&(S=I?r.getFirstKey?.()??null:r.getLastKey?.()??null),S!=null&&(m.preventDefault(),G(S,m,I?"first":"last"))}break}case"ArrowRight":{if(r.getKeyRightOf){let S=t.focusedKey!=null?r.getKeyRightOf(t.focusedKey):null;S==null&&u&&(S=I?r.getLastKey?.()??null:r.getFirstKey?.()??null),S!=null&&(m.preventDefault(),G(S,m,I?"last":"first"))}break}case"Home":{if(r.getFirstKey){m.preventDefault();let S=r.getFirstKey();t.setFocusedKey(S),S!=null&&(ut(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(S):p&&t.replaceSelection(S))}break}case"End":{if(r.getLastKey){m.preventDefault();let S=r.getLastKey();t.setFocusedKey(S),S!=null&&(ut(m)&&m.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(S):p&&t.replaceSelection(S))}break}case"PageDown":{if(r.getKeyPageBelow&&t.focusedKey!=null){let S=r.getKeyPageBelow(t.focusedKey);S!=null&&(m.preventDefault(),G(S,m))}break}case"PageUp":{if(r.getKeyPageAbove&&t.focusedKey!=null){let S=r.getKeyPageAbove(t.focusedKey);S!=null&&(m.preventDefault(),G(S,m))}break}case"a":{ut(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":{!i&&o.current&&m.shiftKey&&o.current.focus();break}}},[r,t,o,O,u,p,b,d,l,f,i,G]),be=(0,$.useCallback)(m=>{if(!t.isFocused){if(t.setFocused(!0),t.focusedKey==null){let I=m.relatedTarget,S=I!=null&&!!(m.currentTarget.compareDocumentPosition(I)&Node.DOCUMENT_POSITION_FOLLOWING),ce=null;S?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 L.current&&(L.current.scrollTop=P.current.top,L.current.scrollLeft=P.current.left);t.focusedKey!=null&&le(t.focusedKey)}},[t,r,p,L,le]),ie=(0,$.useCallback)(m=>{let I=m.relatedTarget;m.currentTarget.contains(I)||t.setFocused(!1)},[t]),ae=(0,$.useCallback)(m=>{L.current===m.target&&m.preventDefault()},[L]);(0,$.useEffect)(()=>{let m=L.current;if(!m)return()=>{};let I=()=>{P.current={top:m.scrollTop,left:m.scrollLeft}};return m.addEventListener("scroll",I,{passive:!0}),()=>{m.removeEventListener("scroll",I)}},[L]),(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 I of t.selectedKeys)if(t.canSelectItem?.(I)!==!1){m=I;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===j.current)return;let m=qr(o,t.focusedKey);m&&L.current&&hr(L.current,m),j.current=t.focusedKey},[t.isFocused,t.focusedKey,o,L]),(0,$.useEffect)(()=>()=>{V.current&&clearTimeout(V.current)},[]);let v=c?void 0:t.focusedKey==null?0:-1;return{collectionProps:Pe({onKeyDown:w,onFocus:be,onBlur:ie,onMouseDown:ae,tabIndex:v,"data-orientation":T})}}var z=K(x(),1),bt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Xr={...bt,customError:!0,valid:!1},Ue={isInvalid:!1,validationErrors:[],validationDetails:bt},Zr=(0,z.createContext)({}),en=`__formValidationState${Date.now()}`;function Ms(e){if(e[en]){let{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:u}=e[en];return{realtimeValidation:t,displayValidation:r,updateValidation:o,resetValidation:s,commitValidation:u}}return Fs(e)}function Fs(e){let{isInvalid:t,validationState:r,name:o,value:s,builtinValidation:u,validate:l,validationBehavior:d="aria"}=e;r&&(t||=r==="invalid");let f=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:Xr}:null,p=(0,z.useMemo)(()=>{if(!l||s==null)return null;let w=Is(l,s);return Qr(w)},[l,s]);u?.validationDetails.valid&&(u=void 0);let b=(0,z.useContext)(Zr),c=(0,z.useMemo)(()=>o?Array.isArray(o)?o.flatMap(w=>tn(b[w])):tn(b[o]):[],[b,o]),[i,E]=(0,z.useState)(b),[O,T]=(0,z.useState)(!1);b!==i&&(E(b),T(!1));let g=(0,z.useMemo)(()=>Qr(O?[]:c),[O,c]),k=(0,z.useRef)(Ue),[L,P]=(0,z.useState)(Ue),j=(0,z.useRef)(Ue),U=()=>{if(!Y)return;V(!1);let w=p||u||k.current;Jt(w,j.current)||(j.current=w,P(w))},[Y,V]=(0,z.useState)(!1);return(0,z.useEffect)(U),{realtimeValidation:f||g||p||u||Ue,displayValidation:d==="native"?f||g||L:f||g||p||u||L,updateValidation(w){d==="aria"&&!Jt(L,w)?P(w):k.current=w},resetValidation(){let w=Ue;Jt(w,j.current)||(j.current=w,P(w)),d==="native"&&V(!1),T(!0)},commitValidation(){d==="native"&&V(!0),T(!0)}}}function tn(e){return e?Array.isArray(e)?e:[e]:[]}function Is(e,t){if(typeof e=="function"){let r=e(t);if(r&&typeof r!="boolean")return tn(r)}return[]}function Qr(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:Xr}:null}function Jt(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 Us(...e){let t=new Set,r=!1,o={...bt};for(let s of e){for(let u of s.validationErrors)t.add(u);r||=s.isInvalid;for(let u in o)o[u]||=s.validationDetails[u]}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 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 xe,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=xe(!1),m=xe(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 Le}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?Le(y):Le();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 Se,runAfterTransition as ft,focusWithoutScrolling as Ue}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?Se(i):null;pt(()=>{if(u.current&&e.current)if(G()==="virtual"){let d=l;ft(()=>{i&&Se(i)===d&&e.current?.isConnected&&Ue(e.current)})}else Ue(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 Pe,useCallback as we}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]=Pe(r),[u,i]=Pe(()=>o.current.isFocused&&o.current.isFocusVisible),l=we(()=>{i(o.current.isFocused&&o.current.isFocusVisible)},[]),y=we(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,Oe=!1,ae=null,Me=!1,O={get hasEventBeforeFocus(){return Oe},set hasEventBeforeFocus(n){Oe=n},get hasBlurredWindowRecently(){return Me},set hasBlurredWindowRecently(n){Me=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 Ke,getOwnerWindow as Ve}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 Ce(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 ke(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 Ae(){O.hasEventBeforeFocus=!1,O.hasBlurredWindowRecently=!0}function Lt(n){let e=Ve(n),t=Ke(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",Ce,!0),t.addEventListener("click",ce,!0),e.addEventListener("focus",ke,!0),e.addEventListener("blur",Ae,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",ce,!0),I.set(e,{focus:r})}function St(n){let e=Ve(n),t=Ke(n);if(!e||!t||!I.has(e))return;let{focus:r}=I.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",Ce,!0),t.removeEventListener("click",ce,!0),e.removeEventListener("focus",ke,!0),e.removeEventListener("blur",Ae,!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 De,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=De(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=De(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 Ie,useState as Dt,useCallback as me,useEffect as He,useMemo as It}from"react";function Ht(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,c]=Dt(!1),u=Ie({hoverCount:0,ignoreEmulated:!1}),i=Ie({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=$(),d=me(()=>{u.current.ignoreEmulated=!0,setTimeout(()=>{u.current.ignoreEmulated=!1},50)},[]);He(()=>{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 He(()=>{o&&i.isHovered&&T({currentTarget:i.target},i.pointerType)},[o,T,i.isHovered,i.pointerType,i.target]),{hoverProps:b,isHovered:s}}var Be={prefix:"",current:0},z=new Map,q=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{z.delete(n)}):null;import Bt,{useRef as We,useState as Wt,useEffect as je,useId as jt}from"react";function Nt(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=Wt(()=>t),s=We(null),c=We({}),u=(()=>{if(t)return t;let i=typeof Bt.useId=="function"?jt():String(++Be.current);return`${e}-${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 Gt,useState as _t,useCallback as $t,useEffect as zt}from"react";function ye(n={}){let{type:e="function"}=n,t=Gt(!1),[r,o]=_t(!1),s=$t(()=>t.current,[]);return zt(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}import{getOwnerWindow as qt,disableTextSelection as ve,restoreTextSelection as k}from"@necto/dom";import{useState as Yt,useRef as Ee,useCallback as V,useEffect as Ge,useMemo as Qt}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 Jt(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]=Yt(!1),T=Ee(!1),b=Ee(null),m=Ee(!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||ve(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||ve(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||ve(),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=Qt(()=>({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?qt(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 Xt}from"react";function Zt(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return Xt(()=>{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 en}from"react";function oe(n){let{context:e,slot:t}=n,r=en(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 tn}from"@necto-react/helpers";import{useRef as nn,useCallback as rn,useLayoutEffect as on}from"react";function N(n){let{onBlur:e}=n,t=nn({isFocused:!1,observer:null});on(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=C(o=>{e?.(o)});return rn(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=tn(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 sn,useRef as un,useLayoutEffect as ln,useEffect as an}from"react";function C(n){let e=un(n);return(typeof window<"u"?ln:an)(()=>{e.current=n},[n]),sn(((...t)=>e.current(...t)),[])}import{useEffect as cn,useState as fn}from"react";function Do(n){let e=ye(),[t,r]=fn(!1);return cn(()=>{e()&&r(!!n())},[n,e]),t}import{useRef as _e,useState as dn,useEffect as pn}from"react";function mn(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=dn(!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 pn(()=>{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 yn}from"react";import{AriaProps as U}from"@necto/dom";function vn(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 yn(()=>{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 En}from"@necto/dom";function gn({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 En(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}import{useRef as bn,useLayoutEffect as Tn}from"react";function ts(n){let e=bn(n);return Tn(()=>{e.current=n}),e}import Fn,{useLayoutEffect as Rn}from"react";var $e=Fn.useInsertionEffect??Rn;import{defu as xn}from"defu";import{useRef as Z,useCallback as H,useEffect as Ln}from"react";function Sn(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=xn(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)},[]);Ln(()=>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 Un}from"react-dom";import{useCallback as ze,useLayoutEffect as Ye,useState as ge}from"react";function Pn(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=ge(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]=ge(t);t&&!u?(s(!0),i(!0)):!t&&u&&i(!1);let[l,y]=ge(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||Un(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}import{defu as wn}from"defu";import{mergeProps as On}from"@necto/mergers";import{useCallback as B,useEffect as ee,useRef as Y}from"react";import{isCtrlKeyPressed as be,isMac as Mn}from"@necto/platform";import{focusWithoutScrolling as Kn,scrollIntoView as Vn}from"@necto/dom";function Cn(n){return Mn()?n.metaKey:n.ctrlKey}function Qe(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function kn(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}=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"}),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&&!Cn(R)&&e.replaceSelection(a))},[e,l,p]),A=B(a=>{if(x){x(a);return}let R=Qe(r,a);R&&!d&&Kn(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&&(be(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&&(be(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":{be(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&&Vn(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:On({onKeyDown:S,onFocus:Q,onBlur:J,onMouseDown:re,tabIndex:f,"data-orientation":m})}}import{createContext as An,useContext as Dn,useEffect as In,useMemo as Te,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=An({}),Re="__formValidationState"+Date.now();function Hn(n){if(n[Re]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[Re];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return Bn(n)}function Bn(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=Te(()=>{if(!c||o==null)return null;let S=Wn(c,o);return Xe(S)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=Dn(et),d=Te(()=>r?Array.isArray(r)?r.flatMap(S=>he(y[S])):he(y[r]):[],[y,r]),[v,T]=te(y),[b,m]=te(!1);y!==v&&(T(y),m(!1));let p=Te(()=>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;Fe(S,L.current)||(L.current=S,F(S))},[w,P]=te(!1);return In(h),{realtimeValidation:i||p||l||s||W,displayValidation:u==="native"?i||p||g:i||p||l||s||g,updateValidation(S){u==="aria"&&!Fe(g,S)?F(S):x.current=S},resetValidation(){let S=W;Fe(S,L.current)||(L.current=S,F(S)),u==="native"&&P(!1),m(!0)},commitValidation(){u==="native"&&P(!0),m(!0)}}}function he(n){return n?Array.isArray(n)?n:[n]:[]}function Wn(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return he(t)}return[]}function Xe(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Ze}:null}function Fe(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 jn(...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,jn as mergeValidation,Re as privateValidationStateProp,Pn as useAnimation,vn as useAriaProps,kn 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,Hn as useFormState,$ as useGlobalListeners,Ht as useHover,Nt as useId,$e as useIsomorphicInsertionEffect,ue as useKeyboard,ts as useLatestRef,Sn as useLongPress,ye as useMounted,Jt as usePress,Zt as useRenderer,mn as useScrollLock,oe as useSlottedContext,gn as useStyleInjection,Do 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,p={...l.defaultStyle,...y},v=typeof n.style=="function"?n.style({...l,defaultStyle:p}):n.style;return{...p,...v}}:i.style={...s.style,...n.style}),[i,u]}import{useRef as xe,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,p]=se(!1),[v,T]=se(null),b=xe(!1),m=xe(null),d=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),p(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(d,{root:o,rootMargin:r,threshold:g}),m.current.observe(i),()=>{m.current&&m.current.disconnect()}},[s,i,o,r,t,e,d]),[x,y,v]}import{useCallback as ie}from"react";import{getOwnerDocument as lt,getEventTarget as at,getActiveElement as Le}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),p=y?Le(y):Le();l.target===l.currentTarget&&p===at(l.nativeEvent)&&(s(!0,l),u(l))},[s,u]);return{focusProps:{...e?{}:{onFocus:i,onBlur:c}}}}import{getOwnerDocument as ct,getActiveElement as Se,runAfterTransition as ft,focusWithoutScrolling as Ue}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?Se(i):null;pt(()=>{if(u.current&&e.current)if(G()==="virtual"){let p=l;ft(()=>{i&&Se(i)===p&&e.current?.isConnected&&Ue(e.current)})}else Ue(e.current);u.current=!1},[e,l,i]);let y=o?-1:0;return r&&(y=void 0),{focusableProps:dt(s??{},c,{tabIndex:y})}}import{useRef as vt,useState as Pe,useCallback as we}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]=Pe(r),[u,i]=Pe(()=>o.current.isFocused&&o.current.isFocusVisible),l=we(()=>{i(o.current.isFocused&&o.current.isFocusVisible)},[]),y=we(T=>{o.current.isFocused=T,c(T),l()},[l]);_({fn:T=>{o.current.isFocusVisible=T,l()},deps:[],opts:{isTextInput:t}});let{focusProps:p={}}=j({isDisabled:e,onFocusChange:y})||{},{focusWithinProps:v={}}=le({isDisabled:!e,onFocusWithinChange:y})||{};return{isFocused:s,isFocusVisible:u,focusProps:e?v:p}}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,Oe=!1,ae=null,Me=!1,O={get hasEventBeforeFocus(){return Oe},set hasEventBeforeFocus(n){Oe=n},get hasBlurredWindowRecently(){return Me},set hasBlurredWindowRecently(n){Me=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 Ke,getOwnerWindow as Ve}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 Ce(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 ke(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 Ae(){O.hasEventBeforeFocus=!1,O.hasBlurredWindowRecently=!0}function Lt(n){let e=Ve(n),t=Ke(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",Ce,!0),t.addEventListener("click",ce,!0),e.addEventListener("focus",ke,!0),e.addEventListener("blur",Ae,!1),typeof PointerEvent<"u"&&t.addEventListener("pointerdown",ce,!0),I.set(e,{focus:r})}function St(n){let e=Ve(n),t=Ke(n);if(!e||!t||!I.has(e))return;let{focus:r}=I.get(e);e.HTMLElement.prototype.focus=r,t.removeEventListener("keydown",Ce,!0),t.removeEventListener("click",ce,!0),e.removeEventListener("focus",ke,!0),e.removeEventListener("blur",Ae,!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 De,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=De(p=>{p.currentTarget.contains(p.target)&&s.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(s.current.isFocusWithin=!1,u(),r&&r(p),o&&o(!1))},[r,o,u]),l=N({onBlur:i}),y=De(p=>{if(!p.currentTarget.contains(p.target))return;let v=wt(p.target);if(!v)return;let T=Ot(v);if(!s.current.isFocusWithin&&T===Mt(p.nativeEvent)){t&&t(p),o&&o(!0),s.current.isFocusWithin=!0,l(p);let b=p.currentTarget;c(v,"focus",m=>{if(s.current.isFocusWithin&&!Kt(b,m.target)&&v.defaultView&&typeof v.defaultView.FocusEvent=="function"){let d=new v.defaultView.FocusEvent("blur",{relatedTarget:m.target});Object.defineProperty(d,"target",{value:b}),Object.defineProperty(d,"currentTarget",{value:b});let x=Pt(d);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 Ie,useState as Dt,useCallback as me,useEffect as He,useMemo as It}from"react";function Ht(n={}){let{onHoverStart:e,onHoverChange:t,onHoverEnd:r,isDisabled:o}=n,[s,c]=Dt(!1),u=Ie({hoverCount:0,ignoreEmulated:!1}),i=Ie({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current,{addGlobalListener:l,removeAllGlobalListeners:y}=$(),p=me(()=>{u.current.ignoreEmulated=!0,setTimeout(()=>{u.current.ignoreEmulated=!1},50)},[]);He(()=>{let m=x=>{x.pointerType==="touch"&&p()};if(typeof document>"u")return;let d=u.current;return d.hoverCount++,typeof PointerEvent<"u"?document.addEventListener("pointerup",m):pe&&document.addEventListener("touchend",p),()=>{d.hoverCount--,d.hoverCount===0&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",m):pe&&document.removeEventListener("touchend",p))}},[p]);let v=me((m,d)=>{if(o||d==="touch"||i.isHovered||!(m.currentTarget&&m.currentTarget.contains(m.target)))return;i.isHovered=!0,i.pointerType=d,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:d}),t?.(!0),c(!0))},[o,e,t,l,i]),T=me((m,d)=>{d==="touch"||!i.isHovered||!i.target||(i.isHovered=!1,i.pointerType="",i.target=null,y(),r?.({type:"hoverend",target:m.currentTarget,pointerType:d}),t?.(!1),c(!1))},[r,t,y,i.target,i]),b=It(()=>{let m={};return typeof PointerEvent<"u"?(m.onPointerEnter=d=>{u.current.ignoreEmulated&&d.pointerType==="mouse"||v(d,d.pointerType)},m.onPointerLeave=d=>{!o&&d.currentTarget instanceof Element&&d.currentTarget.contains(d.target)&&T(d,d.pointerType)}):pe&&(m.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=d=>{!i.ignoreEmulatedMouseEvents&&!u.current.ignoreEmulated&&v(d.nativeEvent,"mouse"),i.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=d=>{!o&&d.currentTarget.contains(d.target)&&T(d.nativeEvent,"mouse")}),m},[o,v,T,i]);return He(()=>{o&&i.isHovered&&T({currentTarget:i.target},i.pointerType)},[o,T,i.isHovered,i.pointerType,i.target]),{hoverProps:b,isHovered:s}}var Be={prefix:"",current:0},z=new Map,q=typeof FinalizationRegistry<"u"?new FinalizationRegistry(n=>{z.delete(n)}):null;import Bt,{useRef as We,useState as Wt,useEffect as je,useId as jt}from"react";function Nt(n={}){let{prefix:e="necto",defaultId:t}=n,[r,o]=Wt(()=>t),s=We(null),c=We({}),u=(()=>{if(t)return t;let i=typeof Bt.useId=="function"?jt():String(++Be.current);return`${e}-${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 Gt,useState as _t,useCallback as $t,useEffect as zt}from"react";function ye(n={}){let{type:e="function"}=n,t=Gt(!1),[r,o]=_t(!1),s=$t(()=>t.current,[]);return zt(()=>(t.current=!0,o(!0),()=>{t.current=!1,o(!1)}),[]),e==="ref"?t:e==="boolean"?r:s}import{getOwnerWindow as qt,disableTextSelection as ve,restoreTextSelection as k}from"@necto/dom";import{useState as Yt,useRef as Ee,useCallback as V,useEffect as Ge,useMemo as Qt}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 Jt(n={}){let{isDisabled:e,preventFocusOnPress:t,allowTextSelectionOnPress:r,ref:o,onPress:s,onPressStart:c,onPressEnd:u,onPressChange:i,onPressUp:l,onClick:y}=n,[p,v]=Yt(!1),T=Ee(!1),b=Ee(null),m=Ee(!1),d=V(f=>{p!==f&&(v(f),i?.(f))},[p,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,d(!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,d,r]),g=V(f=>{if(e||f.button!==0||T.current)return;t&&f.preventDefault(),r||ve(f.currentTarget),m.current=!0,b.current=f.currentTarget,d(!0);let a=M("pressstart","mouse",f);c?.(a),window.addEventListener("mouseup",x,{once:!0})},[e,t,r,c,d,x]),F=V(f=>{if(e||f.button!==0||!m.current)return;m.current=!1,d(!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,d,r]),L=V(f=>{p&&(d(!1),u?.(M("pressend","mouse",f)),!r&&f.currentTarget instanceof HTMLElement&&k(f.currentTarget))},[p,d,u,r]),h=V(f=>{m.current&&!p&&(d(!0),c?.(M("pressstart","mouse",f)))},[p,c,d]),w=V(f=>{if(!m.current)return;m.current=!1,d(!1),!r&&b.current instanceof HTMLElement&&k(b.current);let a={...M("pressend","touch",f),target:f.target};u?.(a),l?.(a)},[u,l,d,r]),P=V(f=>{if(!m.current)return;m.current=!1,d(!1),!r&&b.current instanceof HTMLElement&&k(b.current);let a={...M("pressend","touch",f),target:f.target};u?.(a)},[u,d,r]),K=V(f=>{e||(r||ve(f.currentTarget),T.current=!0,setTimeout(()=>{T.current=!1},100),m.current=!0,b.current=f.currentTarget,d(!0),c?.(M("pressstart","touch",f)),window.addEventListener("touchend",w,{once:!0}),window.addEventListener("touchcancel",P,{once:!0}))},[e,c,d,r,w,P]),A=V(f=>{if(e||!m.current)return;m.current=!1,d(!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,d,r]),S=V(f=>{if(e)return;(f.key==="Enter"||f.key===" ")&&!p&&(f.key===" "&&f.preventDefault(),r||ve(),d(!0),m.current=!0,c?.(M("pressstart","keyboard",f)))},[e,p,c,d,r]),Q=V(f=>{if(e)return;if((f.key==="Enter"||f.key===" ")&&p){d(!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,p,s,u,l,d,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=Qt(()=>({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?qt(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:p}}import{useMemo as Xt}from"react";function Zt(n){let{style:e,values:t,children:r,className:o,defaultStyle:s,defaultChildren:c,defaultClassName:u="necto"}=n;return Xt(()=>{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 en}from"react";function oe(n){let{context:e,slot:t}=n,r=en(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 tn}from"@necto-react/helpers";import{useRef as nn,useCallback as rn,useLayoutEffect as on}from"react";function N(n){let{onBlur:e}=n,t=nn({isFocused:!1,observer:null});on(()=>{let o=t.current;return()=>{o.observer&&(o.observer.disconnect(),o.observer=null)}},[]);let r=C(o=>{e?.(o)});return rn(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=tn(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 sn,useRef as un,useLayoutEffect as ln,useEffect as an}from"react";function C(n){let e=un(n);return(typeof window<"u"?ln:an)(()=>{e.current=n},[n]),sn(((...t)=>e.current(...t)),[])}import{useEffect as cn,useState as fn}from"react";function Do(n){let e=ye(),[t,r]=fn(!1);return cn(()=>{e()&&r(!!n())},[n,e]),t}import{useRef as _e,useState as dn,useEffect as pn}from"react";function mn(n={}){let{autoLock:e=!1,target:t,widthReflow:r=!0}=n,[o,s]=dn(!1),c=_e(null),u=_e(null),i=C(()=>{if(typeof window>"u"||!c.current)return;let{overflow:y,paddingRight:p}=c.current.style;if(u.current={overflow:y,paddingRight:p},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 pn(()=>{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,i,l]),{isLocked:o,lock:i,unlock:l}}import{useMemo as yn}from"react";import{AriaProps as U}from"@necto/dom";function vn(n={}){let{isInvalid:e,isDisabled:t,isReadOnly:r,isRequired:o,isBusy:s,isPressed:c,isExpanded:u,isSelected:i,isChecked:l,isHidden:y,hasPopup:p,valueCurrent:v,valueMin:T,valueMax:b,valueText:m,label:d,labelledBy:x,describedBy:g,controls:F,owns:L}=n;return yn(()=>{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),p!==void 0&&(h[U.Haspopup]=p===!1?void 0:p),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),d!==void 0&&(h[U.Label]=d),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,p,v,T,b,m,d,x,g,F,L])}import{injectStyle as En}from"@necto/dom";function gn({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 En(s,{id:n,window:o,insertionPoint:t})},[n,s,o,t,r])}import{useRef as bn,useLayoutEffect as Tn}from"react";function ts(n){let e=bn(n);return Tn(()=>{e.current=n}),e}import Fn,{useLayoutEffect as Rn}from"react";var $e=Fn.useInsertionEffect??Rn;import{defu as xn}from"defu";import{useRef as Z,useCallback as H,useEffect as Ln}from"react";function Sn(n={}){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:r,onLongPress:o,accessibilityDescription:s,threshold:c}=xn(n,{threshold:500}),u=Z(null),i=Z(null),l=Z(null),y=Z(!1),p=H(()=>{u.current&&(clearTimeout(u.current),u.current=null)},[]);Ln(()=>p,[p]);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&&(p(),!y.current&&r&&r(v("longpressend")),i.current=null,l.current=null)},[p,r,v]),m=H(()=>{p(),i.current!==null&&r&&r(v("longpressend")),i.current=null,l.current=null},[p,r,v]),d=H(F=>{y.current&&F.preventDefault()},[]);return{longPressProps:e?{}:{onPointerDown:T,onPointerUp:b,onPointerCancel:m,onContextMenu:d,...!e&&!!o&&!!s&&{"aria-description":s}}}}import{flushSync as Un}from"react-dom";import{useCallback as ze,useLayoutEffect as Ye,useState as ge}from"react";function Pn(n){let{ref:e,isOpen:t,isReady:r=!0}=n,[o,s]=ge(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]=ge(t);t&&!u?(s(!0),i(!0)):!t&&u&&i(!1);let[l,y]=ge(t?"open":"closed");switch(l){case"open":t||y("exiting");break;case"closed":case"exiting":t&&y("open");break}let p=l==="exiting";return qe(e,p,ze(()=>{y(v=>v==="exiting"?"closed":v)},[])),{isEntering:c,isExiting:p,isRendered:t||p}}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||Un(()=>{t()})}).catch(()=>{}),()=>{o=!0}}},[n,e,t])}import{defu as wn}from"defu";import{mergeProps as On}from"@necto/mergers";import{useCallback as B,useEffect as ee,useRef as Y}from"react";import{isCtrlKeyPressed as be,isMac as Mn}from"@necto/platform";import{focusWithoutScrolling as Kn,scrollIntoView as Vn}from"@necto/dom";function Cn(n){return Mn()?n.metaKey:n.ctrlKey}function Qe(n,e){return n.current?.querySelector(`[data-key="${e}"]`)??null}function kn(n){let{selectionManager:e,keyboardDelegate:t,ref:r,autoFocus:o,shouldFocusWrap:s,disallowEmptySelection:c,disallowSelectAll:u,escapeBehavior:i,selectOnFocus:l,disallowTypeAhead:y,shouldUseVirtualFocus:p,allowsTabNavigation:v,scrollRef:T,direction:b,orientation:m,onNavigate:d,onFocusItem:x}=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"}),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),d?.(a),R?.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(a):l&&!Cn(R)&&e.replaceSelection(a))},[e,l,d]),A=B(a=>{if(x){x(a);return}let R=Qe(r,a);R&&!p&&Kn(R)},[r,p,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&&(be(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&&(be(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":{be(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&&!p&&r.current&&r.current.focus(),h.current=!1},[t,e,r,p]),ee(()=>{if(!e.isFocused||e.focusedKey==null||e.focusedKey===L.current)return;let a=Qe(r,e.focusedKey);a&&g.current&&Vn(g.current,a),L.current=e.focusedKey},[e.isFocused,e.focusedKey,r,g]),ee(()=>()=>{P.current&&clearTimeout(P.current)},[]);let f=p?void 0:e.focusedKey==null?0:-1;return{collectionProps:On({onKeyDown:S,onFocus:Q,onBlur:J,onMouseDown:re,tabIndex:f,"data-orientation":m})}}import{createContext as An,useContext as Dn,useEffect as In,useMemo as Te,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=An({}),Re=`__formValidationState${Date.now()}`;function Hn(n){if(n[Re]){let{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}=n[Re];return{realtimeValidation:e,displayValidation:t,updateValidation:r,resetValidation:o,commitValidation:s}}return Bn(n)}function Bn(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=Te(()=>{if(!c||o==null)return null;let S=Wn(c,o);return Xe(S)},[c,o]);s?.validationDetails.valid&&(s=void 0);let y=Dn(et),p=Te(()=>r?Array.isArray(r)?r.flatMap(S=>he(y[S])):he(y[r]):[],[y,r]),[v,T]=te(y),[b,m]=te(!1);y!==v&&(T(y),m(!1));let d=Te(()=>Xe(b?[]:p),[b,p]),x=Je(W),[g,F]=te(W),L=Je(W),h=()=>{if(!w)return;P(!1);let S=l||s||x.current;Fe(S,L.current)||(L.current=S,F(S))},[w,P]=te(!1);return In(h),{realtimeValidation:i||d||l||s||W,displayValidation:u==="native"?i||d||g:i||d||l||s||g,updateValidation(S){u==="aria"&&!Fe(g,S)?F(S):x.current=S},resetValidation(){let S=W;Fe(S,L.current)||(L.current=S,F(S)),u==="native"&&P(!1),m(!0)},commitValidation(){u==="native"&&P(!0),m(!0)}}}function he(n){return n?Array.isArray(n)?n:[n]:[]}function Wn(n,e){if(typeof n=="function"){let t=n(e);if(t&&typeof t!="boolean")return he(t)}return[]}function Xe(n){return n.length?{isInvalid:!0,validationErrors:n,validationDetails:Ze}:null}function Fe(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 jn(...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,jn as mergeValidation,Re as privateValidationStateProp,Pn as useAnimation,vn as useAriaProps,kn 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,Hn as useFormState,$ as useGlobalListeners,Ht as useHover,Nt as useId,$e as useIsomorphicInsertionEffect,ue as useKeyboard,ts as useLatestRef,Sn as useLongPress,ye as useMounted,Jt as usePress,Zt as useRenderer,mn as useScrollLock,oe as useSlottedContext,gn as useStyleInjection,Do 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.15",
3
+ "version": "2.14.17",
4
4
  "type": "module",
5
5
  "description": "Necto's standard library for providing utility hooks for React applications.",
6
6
  "files": [
@@ -24,6 +24,11 @@
24
24
  },
25
25
  "author": "Corinvo OSS Team",
26
26
  "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/nectoutil/NodeKit",
30
+ "directory": "packages/@necto-react/necto-react-hooks"
31
+ },
27
32
  "devDependencies": {
28
33
  "@testing-library/react": "^16.3.0",
29
34
  "@types/node": "^22.14.1",
@@ -42,14 +47,14 @@
42
47
  "defu": "^6.1.4",
43
48
  "react-aria": "^3.39.0",
44
49
  "std-env": "^3.9.0",
45
- "@necto/dom": "1.7.1",
46
- "@necto/id": "1.6.5",
50
+ "@necto-react/helpers": "2.6.12",
47
51
  "@necto-react/types": "2.4.1",
48
- "@necto/platform": "1.5.1",
49
- "@necto/types": "1.3.1",
50
- "@necto-react/helpers": "2.6.11",
52
+ "@necto/dom": "1.7.3",
53
+ "@necto/id": "1.6.6",
51
54
  "@necto/mergers": "1.5.1",
52
- "@necto/strings": "1.6.1"
55
+ "@necto/platform": "1.5.1",
56
+ "@necto/strings": "1.7.0",
57
+ "@necto/types": "1.3.1"
53
58
  },
54
59
  "scripts": {
55
60
  "test": "vitest",