@indxsearch/systm 1.2.4 → 1.2.5
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.es.js +1 -2
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4868,8 +4868,7 @@ const Gc = "_wrapper_1uqw5_1", Jc = "_label_1uqw5_7", Qc = "_trigger_1uqw5_12",
|
|
|
4868
4868
|
{
|
|
4869
4869
|
id: v,
|
|
4870
4870
|
className: `${Oe.trigger} ${o} cursor-pointer`,
|
|
4871
|
-
"aria-label": a,
|
|
4872
|
-
"aria-labelledby": i ? p : void 0,
|
|
4871
|
+
...i ? { "aria-labelledby": p } : a ? { "aria-label": a } : {},
|
|
4873
4872
|
children: [
|
|
4874
4873
|
/* @__PURE__ */ y.jsx(Uc, { placeholder: r }),
|
|
4875
4874
|
/* @__PURE__ */ y.jsx(zc, { className: Oe.icon, "aria-hidden": "true", children: /* @__PURE__ */ y.jsx(zo, { size: 14, color: "currentColor" }) })
|
package/dist/index.umd.js
CHANGED
|
@@ -59,4 +59,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
59
59
|
`)},Lr=function(){var e=parseInt(document.body.getAttribute(He)||"0",10);return isFinite(e)?e:0},pa=function(){f.useEffect(function(){return document.body.setAttribute(He,(Lr()+1).toString()),function(){var e=Lr()-1;e<=0?document.body.removeAttribute(He):document.body.setAttribute(He,e.toString())}},[])},ha=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;pa();var s=f.useMemo(function(){return ua(o)},[o]);return f.createElement(da,{styles:fa(s,!t,o,n?"":"!important")})},fn=!1;if(typeof window<"u")try{var Tt=Object.defineProperty({},"passive",{get:function(){return fn=!0,!0}});window.addEventListener("test",Tt,Tt),window.removeEventListener("test",Tt,Tt)}catch{fn=!1}var Ue=fn?{passive:!1}:!1,ma=function(e){return e.tagName==="TEXTAREA"},Fr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ma(e)&&n[t]==="visible")},va=function(e){return Fr(e,"overflowY")},ga=function(e){return Fr(e,"overflowX")},Br=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$r(e,r);if(o){var s=Vr(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ba=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ya=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$r=function(e,t){return e==="v"?va(t):ga(t)},Vr=function(e,t){return e==="v"?ba(t):ya(t)},wa=function(e,t){return e==="h"&&t==="rtl"?-1:1},xa=function(e,t,n,r,o){var s=wa(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,u=t.contains(a),d=!1,v=i>0,p=0,g=0;do{if(!a)break;var h=Vr(e,a),l=h[0],c=h[1],m=h[2],w=c-m-s*l;(l||w)&&$r(e,a)&&(p+=w,g+=l);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(v&&Math.abs(p)<1||!v&&Math.abs(g)<1)&&(d=!0),d},Pt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wr=function(e){return[e.deltaX,e.deltaY]},Hr=function(e){return e&&"current"in e?e.current:e},Sa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_a=function(e){return`
|
|
60
60
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
61
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},Ea=0,ze=[];function Ca(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Ea++)[0],s=f.useState(jr)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=qs([e.lockRef.current],(e.shards||[]).map(Hr),!0).filter(Boolean);return c.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(c,m){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!i.current.allowPinchZoom;var w=Pt(c),b=n.current,x="deltaX"in c?c.deltaX:b[0]-w[0],_="deltaY"in c?c.deltaY:b[1]-w[1],E,O=c.target,T=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in c&&T==="h"&&O.type==="range")return!1;var j=window.getSelection(),N=j&&j.anchorNode,F=N?N===O||N.contains(O):!1;if(F)return!1;var $=Br(T,O);if(!$)return!0;if($?E=T:(E=T==="v"?"h":"v",$=Br(T,O)),!$)return!1;if(!r.current&&"changedTouches"in c&&(x||_)&&(r.current=E),!E)return!0;var C=r.current||E;return xa(C,m,c,C==="h"?x:_)},[]),u=f.useCallback(function(c){var m=c;if(!(!ze.length||ze[ze.length-1]!==s)){var w="deltaY"in m?Wr(m):Pt(m),b=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&Sa(E.delta,w)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var x=(i.current.shards||[]).map(Hr).filter(Boolean).filter(function(E){return E.contains(m.target)}),_=x.length>0?a(m,x[0]):!i.current.noIsolation;_&&m.cancelable&&m.preventDefault()}}},[]),d=f.useCallback(function(c,m,w,b){var x={name:c,delta:m,target:w,should:b,shadowParent:Ra(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),v=f.useCallback(function(c){n.current=Pt(c),r.current=void 0},[]),p=f.useCallback(function(c){d(c.type,Wr(c),c.target,a(c,e.lockRef.current))},[]),g=f.useCallback(function(c){d(c.type,Pt(c),c.target,a(c,e.lockRef.current))},[]);f.useEffect(function(){return ze.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",v,Ue),function(){ze=ze.filter(function(c){return c!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",v,Ue)}},[]);var h=e.removeScrollBar,l=e.inert;return f.createElement(f.Fragment,null,l?f.createElement(s,{styles:_a(o)}):null,h?f.createElement(ha,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ra(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ta=ta(Dr,Ca);var pn=f.forwardRef(function(e,t){return f.createElement(Rt,be({},e,{ref:t,sideCar:Ta}))});pn.classNames=Rt.classNames;var Pa=[" ","Enter","ArrowUp","ArrowDown"],Oa=[" ","Enter"],Me="Select",[Ot,At,Aa]=Xo(Me),[qe]=lt(Me,[Aa,xt]),kt=xt(),[ka,Ce]=qe(Me),[Ma,Na]=qe(Me),Ur=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:u,dir:d,name:v,autoComplete:p,disabled:g,required:h,form:l}=e,c=kt(t),[m,w]=f.useState(null),[b,x]=f.useState(null),[_,E]=f.useState(!1),O=Go(d),[T,j]=an({prop:r,defaultProp:o??!1,onChange:s,caller:Me}),[N,F]=an({prop:i,defaultProp:a,onChange:u,caller:Me}),$=f.useRef(null),C=m?l||!!m.closest("form"):!0,[R,P]=f.useState(new Set),I=Array.from(R).map(M=>M.props.value).join(";");return y.jsx(Rr,{...c,children:y.jsxs(ka,{required:h,scope:t,trigger:m,onTriggerChange:w,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:ut(),value:N,onValueChange:F,open:T,onOpenChange:j,dir:O,triggerPointerDownPosRef:$,disabled:g,children:[y.jsx(Ot.Provider,{scope:t,children:y.jsx(Ma,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(M=>{P(k=>new Set(k).add(M))},[]),onNativeOptionRemove:f.useCallback(M=>{P(k=>{const A=new Set(k);return A.delete(M),A})},[]),children:n})}),C?y.jsxs(lo,{"aria-hidden":!0,required:h,tabIndex:-1,name:v,autoComplete:p,value:N,onChange:M=>F(M.target.value),disabled:g,form:l,children:[N===void 0?y.jsx("option",{value:""}):null,Array.from(R)]},I):null]})})};Ur.displayName=Me;var zr="SelectTrigger",qr=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=kt(n),i=Ce(zr,n),a=i.disabled||r,u=te(t,i.onTriggerChange),d=At(n),v=f.useRef("touch"),[p,g,h]=fo(c=>{const m=d().filter(x=>!x.disabled),w=m.find(x=>x.value===i.value),b=po(m,c,w);b!==void 0&&i.onValueChange(b.value)}),l=c=>{a||(i.onOpenChange(!0),h()),c&&(i.triggerPointerDownPosRef.current={x:Math.round(c.pageX),y:Math.round(c.pageY)})};return y.jsx(on,{asChild:!0,...s,children:y.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":uo(i.value)?"":void 0,...o,ref:u,onClick:Z(o.onClick,c=>{c.currentTarget.focus(),v.current!=="mouse"&&l(c)}),onPointerDown:Z(o.onPointerDown,c=>{v.current=c.pointerType;const m=c.target;m.hasPointerCapture(c.pointerId)&&m.releasePointerCapture(c.pointerId),c.button===0&&c.ctrlKey===!1&&c.pointerType==="mouse"&&(l(c),c.preventDefault())}),onKeyDown:Z(o.onKeyDown,c=>{const m=p.current!=="";!(c.ctrlKey||c.altKey||c.metaKey)&&c.key.length===1&&g(c.key),!(m&&c.key===" ")&&Pa.includes(c.key)&&(l(),c.preventDefault())})})})});qr.displayName=zr;var Yr="SelectValue",Kr=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,u=Ce(Yr,n),{onValueNodeHasChildrenChange:d}=u,v=s!==void 0,p=te(t,u.onValueNodeChange);return re(()=>{d(v)},[d,v]),y.jsx(J.span,{...a,ref:p,style:{pointerEvents:"none"},children:uo(u.value)?y.jsx(y.Fragment,{children:i}):s})});Kr.displayName=Yr;var Ia="SelectIcon",Xr=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Xr.displayName=Ia;var Da="SelectPortal",Zr=e=>y.jsx(sn,{asChild:!0,...e});Zr.displayName=Da;var Ne="SelectContent",Gr=f.forwardRef((e,t)=>{const n=Ce(Ne,e.__scopeSelect),[r,o]=f.useState();if(re(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?st.createPortal(y.jsx(Jr,{scope:e.__scopeSelect,children:y.jsx(Ot.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),s):null}return y.jsx(Qr,{...e,ref:t})});Gr.displayName=Ne;var pe=10,[Jr,Re]=qe(Ne),ja="SelectContentImpl",La=et("SelectContent.RemoveScroll"),Qr=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:u,align:d,alignOffset:v,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:l,hideWhenDetached:c,avoidCollisions:m,...w}=e,b=Ce(Ne,n),[x,_]=f.useState(null),[E,O]=f.useState(null),T=te(t,D=>_(D)),[j,N]=f.useState(null),[F,$]=f.useState(null),C=At(n),[R,P]=f.useState(!1),I=f.useRef(!1);f.useEffect(()=>{if(x)return kr(x)},[x]),Vn();const M=f.useCallback(D=>{const[U,...ee]=C().map(X=>X.ref.current),[q]=ee.slice(-1),Y=document.activeElement;for(const X of D)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===U&&E&&(E.scrollTop=0),X===q&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[C,E]),k=f.useCallback(()=>M([j,x]),[M,j,x]);f.useEffect(()=>{R&&k()},[R,k]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;f.useEffect(()=>{if(x){let D={x:0,y:0};const U=q=>{var Y,X;D={x:Math.abs(Math.round(q.pageX)-(((Y=L.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(q.pageY)-(((X=L.current)==null?void 0:X.y)??0))}},ee=q=>{D.x<=10&&D.y<=10?q.preventDefault():x.contains(q.target)||A(!1),document.removeEventListener("pointermove",U),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[x,A,L]),f.useEffect(()=>{const D=()=>A(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[A]);const[H,S]=fo(D=>{const U=C().filter(Y=>!Y.disabled),ee=U.find(Y=>Y.ref.current===document.activeElement),q=po(U,D,ee);q&&setTimeout(()=>q.ref.current.focus())}),B=f.useCallback((D,U,ee)=>{const q=!I.current&&!ee;(b.value!==void 0&&b.value===U||q)&&(N(D),q&&(I.current=!0))},[b.value]),V=f.useCallback(()=>x==null?void 0:x.focus(),[x]),W=f.useCallback((D,U,ee)=>{const q=!I.current&&!ee;(b.value!==void 0&&b.value===U||q)&&$(D)},[b.value]),K=r==="popper"?hn:eo,Q=K===hn?{side:a,sideOffset:u,align:d,alignOffset:v,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:l,hideWhenDetached:c,avoidCollisions:m}:{};return y.jsx(Jr,{scope:n,content:x,viewport:E,onViewportChange:O,itemRefCallback:B,selectedItem:j,onItemLeave:V,itemTextRefCallback:W,focusSelectedItem:k,selectedItemText:F,position:r,isPositioned:R,searchRef:H,children:y.jsx(pn,{as:La,allowPinchZoom:!0,children:y.jsx(Ut,{asChild:!0,trapped:b.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:Z(o,D=>{var U;(U=b.trigger)==null||U.focus({preventScroll:!0}),D.preventDefault()}),children:y.jsx($t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:y.jsx(K,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:D=>D.preventDefault(),...w,...Q,onPlaced:()=>P(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Z(w.onKeyDown,D=>{const U=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!U&&D.key.length===1&&S(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let q=C().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(D.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const Y=D.target,X=q.indexOf(Y);q=q.slice(X+1)}setTimeout(()=>M(q)),D.preventDefault()}})})})})})})});Qr.displayName=ja;var Fa="SelectItemAlignedPosition",eo=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ce(Ne,n),i=Re(Ne,n),[a,u]=f.useState(null),[d,v]=f.useState(null),p=te(t,T=>v(T)),g=At(n),h=f.useRef(!1),l=f.useRef(!0),{viewport:c,selectedItem:m,selectedItemText:w,focusSelectedItem:b}=i,x=f.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&d&&c&&m&&w){const T=s.trigger.getBoundingClientRect(),j=d.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),F=w.getBoundingClientRect();if(s.dir!=="rtl"){const Y=F.left-j.left,X=N.left-Y,oe=T.left-X,ce=T.width+oe,le=Math.max(ce,j.width),Pe=window.innerWidth-pe,Oe=In(X,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.left=Oe+"px"}else{const Y=j.right-F.right,X=window.innerWidth-N.right-Y,oe=window.innerWidth-T.right-X,ce=T.width+oe,le=Math.max(ce,j.width),Pe=window.innerWidth-pe,Oe=In(X,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.right=Oe+"px"}const $=g(),C=window.innerHeight-pe*2,R=c.scrollHeight,P=window.getComputedStyle(d),I=parseInt(P.borderTopWidth,10),M=parseInt(P.paddingTop,10),k=parseInt(P.borderBottomWidth,10),A=parseInt(P.paddingBottom,10),L=I+M+R+A+k,H=Math.min(m.offsetHeight*5,L),S=window.getComputedStyle(c),B=parseInt(S.paddingTop,10),V=parseInt(S.paddingBottom,10),W=T.top+T.height/2-pe,K=C-W,Q=m.offsetHeight/2,D=m.offsetTop+Q,U=I+M+D,ee=L-U;if(U<=W){const Y=$.length>0&&m===$[$.length-1].ref.current;a.style.bottom="0px";const X=d.clientHeight-c.offsetTop-c.offsetHeight,oe=Math.max(K,Q+(Y?V:0)+X+k),ce=U+oe;a.style.height=ce+"px"}else{const Y=$.length>0&&m===$[0].ref.current;a.style.top="0px";const oe=Math.max(W,I+c.offsetTop+(Y?B:0)+Q)+ee;a.style.height=oe+"px",c.scrollTop=U-W+c.offsetTop}a.style.margin=`${pe}px 0`,a.style.minHeight=H+"px",a.style.maxHeight=C+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,a,d,c,m,w,s.dir,r]);re(()=>x(),[x]);const[_,E]=f.useState();re(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const O=f.useCallback(T=>{T&&l.current===!0&&(x(),b==null||b(),l.current=!1)},[x,b]);return y.jsx($a,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:y.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:y.jsx(J.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});eo.displayName=Fa;var Ba="SelectPopperPosition",hn=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pe,...s}=e,i=kt(n);return y.jsx(Tr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hn.displayName=Ba;var[$a,mn]=qe(Ne,{}),vn="SelectViewport",to=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Re(vn,n),i=mn(vn,n),a=te(t,s.onViewportChange),u=f.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsx(Ot.Slot,{scope:n,children:y.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Z(o.onScroll,d=>{const v=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const h=Math.abs(u.current-v.scrollTop);if(h>0){const l=window.innerHeight-pe*2,c=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),w=Math.max(c,m);if(w<l){const b=w+h,x=Math.min(l,b),_=b-x;p.style.height=x+"px",p.style.bottom==="0px"&&(v.scrollTop=_>0?_:0,p.style.justifyContent="flex-end")}}}u.current=v.scrollTop})})})]})});to.displayName=vn;var no="SelectGroup",[Va,Wa]=qe(no),Ha=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ut();return y.jsx(Va,{scope:n,id:o,children:y.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ha.displayName=no;var ro="SelectLabel",Ua=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wa(ro,n);return y.jsx(J.div,{id:o.id,...r,ref:t})});Ua.displayName=ro;var Mt="SelectItem",[za,oo]=qe(Mt),io=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ce(Mt,n),u=Re(Mt,n),d=a.value===r,[v,p]=f.useState(s??""),[g,h]=f.useState(!1),l=te(t,b=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,b,r,o)}),c=ut(),m=f.useRef("touch"),w=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(za,{scope:n,value:r,disabled:o,textId:c,isSelected:d,onItemTextChange:f.useCallback(b=>{p(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:y.jsx(Ot.ItemSlot,{scope:n,value:r,disabled:o,textValue:v,children:y.jsx(J.div,{role:"option","aria-labelledby":c,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:l,onFocus:Z(i.onFocus,()=>h(!0)),onBlur:Z(i.onBlur,()=>h(!1)),onClick:Z(i.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:Z(i.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:Z(i.onPointerDown,b=>{m.current=b.pointerType}),onPointerMove:Z(i.onPointerMove,b=>{var x;m.current=b.pointerType,o?(x=u.onItemLeave)==null||x.call(u):m.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(i.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:Z(i.onKeyDown,b=>{var _;((_=u.searchRef)==null?void 0:_.current)!==""&&b.key===" "||(Oa.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});io.displayName=Mt;var ot="SelectItemText",so=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ce(ot,n),a=Re(ot,n),u=oo(ot,n),d=Na(ot,n),[v,p]=f.useState(null),g=te(t,w=>p(w),u.onItemTextChange,w=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,w,u.value,u.disabled)}),h=v==null?void 0:v.textContent,l=f.useMemo(()=>y.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value),[u.disabled,u.value,h]),{onNativeOptionAdd:c,onNativeOptionRemove:m}=d;return re(()=>(c(l),()=>m(l)),[c,m,l]),y.jsxs(y.Fragment,{children:[y.jsx(J.span,{id:u.textId,...s,ref:g}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?st.createPortal(s.children,i.valueNode):null]})});so.displayName=ot;var ao="SelectItemIndicator",qa=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return oo(ao,n).isSelected?y.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});qa.displayName=ao;var gn="SelectScrollUpButton",Ya=f.forwardRef((e,t)=>{const n=Re(gn,e.__scopeSelect),r=mn(gn,e.__scopeSelect),[o,s]=f.useState(!1),i=te(t,r.onScrollButtonChange);return re(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?y.jsx(co,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Ya.displayName=gn;var bn="SelectScrollDownButton",Ka=f.forwardRef((e,t)=>{const n=Re(bn,e.__scopeSelect),r=mn(bn,e.__scopeSelect),[o,s]=f.useState(!1),i=te(t,r.onScrollButtonChange);return re(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=u.scrollHeight-u.clientHeight,v=Math.ceil(u.scrollTop)<d;s(v)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?y.jsx(co,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});Ka.displayName=bn;var co=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Re("SelectScrollButton",n),i=f.useRef(null),a=At(n),u=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>u(),[u]),re(()=>{var v;const d=a().find(p=>p.ref.current===document.activeElement);(v=d==null?void 0:d.ref.current)==null||v.scrollIntoView({block:"nearest"})},[a]),y.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{u()})})}),Xa="SelectSeparator",Za=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Za.displayName=Xa;var yn="SelectArrow",Ga=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=kt(n),s=Ce(yn,n),i=Re(yn,n);return s.open&&i.position==="popper"?y.jsx(Pr,{...o,...r,ref:t}):null});Ga.displayName=yn;var Ja="SelectBubbleInput",lo=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),s=te(r,o),i=$s(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&v){const p=new Event("change",{bubbles:!0});v.call(a,t),a.dispatchEvent(p)}},[i,t]),y.jsx(J.select,{...n,style:{...Or,...n.style},ref:s,defaultValue:t})});lo.displayName=Ja;function uo(e){return e===""||e===void 0}function fo(e){const t=Ae(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(a)},[t]),s=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function po(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Qa(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Qa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ec=Ur,tc=qr,nc=Kr,rc=Xr,oc=Zr,ic=Gr,sc=to,ac=io,cc=so;const Ie={wrapper:"_wrapper_1uqw5_1",label:"_label_1uqw5_7",trigger:"_trigger_1uqw5_12",icon:"_icon_1uqw5_44",content:"_content_1uqw5_50",viewport:"_viewport_1uqw5_58",item:"_item_1uqw5_62"},lc=({value:e,onValueChange:t,options:n,placeholder:r="Select...",className:o="",disabled:s=!1,label:i,"aria-label":a,id:u})=>{const d=z.useId(),v=u||d,p=`${v}-label`,g=y.jsxs(ec,{value:e,onValueChange:t,disabled:s,children:[y.jsxs(tc,{id:v,className:`${Ie.trigger} ${o} cursor-pointer`,"aria-label":a,"aria-labelledby":i?p:void 0,children:[y.jsx(nc,{placeholder:r}),y.jsx(rc,{className:Ie.icon,"aria-hidden":"true",children:y.jsx(Ao,{size:14,color:"currentColor"})})]}),y.jsx(oc,{children:y.jsx(ic,{className:Ie.content,position:"popper",side:"bottom",align:"start",sideOffset:4,children:y.jsx(sc,{className:Ie.viewport,children:n.map(h=>y.jsx(ac,{value:h.value,className:Ie.item,children:y.jsx(cc,{children:h.label})},h.value))})})})]});return i?y.jsxs("div",{className:Ie.wrapper,children:[y.jsx("label",{id:p,htmlFor:v,className:Ie.label,children:i}),g]}):g};function uc(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var wn=e=>{const{present:t,children:n}=e,r=dc(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=te(r.ref,fc(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};wn.displayName="Presence";function dc(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,u]=uc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Nt(r.current);s.current=a==="mounted"?d:"none"},[a]),re(()=>{const d=r.current,v=o.current;if(v!==e){const g=s.current,h=Nt(d);e?u("MOUNT"):h==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(v&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),re(()=>{if(t){let d;const v=t.ownerDocument.defaultView??window,p=h=>{const c=Nt(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&c&&(u("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},g=h=>{h.target===t&&(s.current=Nt(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{v.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Nt(e){return(e==null?void 0:e.animationName)||"none"}function fc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var It="Popover",[ho]=lt(It,[xt]),it=xt(),[pc,Te]=ho(It),mo=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=it(t),u=f.useRef(null),[d,v]=f.useState(!1),[p,g]=an({prop:r,defaultProp:o??!1,onChange:s,caller:It});return y.jsx(Rr,{...a,children:y.jsx(pc,{scope:t,contentId:ut(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:f.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>v(!0),[]),onCustomAnchorRemove:f.useCallback(()=>v(!1),[]),modal:i,children:n})})};mo.displayName=It;var vo="PopoverAnchor",hc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(vo,n),s=it(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return f.useEffect(()=>(i(),()=>a()),[i,a]),y.jsx(on,{...s,...r,ref:t})});hc.displayName=vo;var go="PopoverTrigger",bo=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(go,n),s=it(n),i=te(t,o.triggerRef),a=y.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_o(o.open),...r,ref:i,onClick:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:y.jsx(on,{asChild:!0,...s,children:a})});bo.displayName=go;var xn="PopoverPortal",[mc,vc]=ho(xn,{forceMount:void 0}),yo=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Te(xn,t);return y.jsx(mc,{scope:t,forceMount:n,children:y.jsx(wn,{present:n||s.open,children:y.jsx(sn,{asChild:!0,container:o,children:r})})})};yo.displayName=xn;var Ye="PopoverContent",wo=f.forwardRef((e,t)=>{const n=vc(Ye,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Te(Ye,e.__scopePopover);return y.jsx(wn,{present:r||s.open,children:s.modal?y.jsx(bc,{...o,ref:t}):y.jsx(yc,{...o,ref:t})})});wo.displayName=Ye;var gc=et("PopoverContent.RemoveScroll"),bc=f.forwardRef((e,t)=>{const n=Te(Ye,e.__scopePopover),r=f.useRef(null),o=te(t,r),s=f.useRef(!1);return f.useEffect(()=>{const i=r.current;if(i)return kr(i)},[]),y.jsx(pn,{as:gc,allowPinchZoom:!0,children:y.jsx(xo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),yc=f.forwardRef((e,t)=>{const n=Te(Ye,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return y.jsx(xo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),xo=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:v,...p}=e,g=Te(Ye,n),h=it(n);return Vn(),y.jsx(Ut,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:y.jsx($t,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:v,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:y.jsx(Tr,{"data-state":_o(g.open),role:"dialog",id:g.contentId,...h,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),So="PopoverClose",wc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(So,n);return y.jsx(J.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});wc.displayName=So;var xc="PopoverArrow",Sc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=it(n);return y.jsx(Pr,{...o,...r,ref:t})});Sc.displayName=xc;function _o(e){return e?"open":"closed"}var _c=mo,Ec=bo,Cc=yo,Rc=wo;const Tc={content:"_content_1qahr_1"},Pc=({trigger:e,children:t,open:n,onOpenChange:r,align:o="end",side:s="bottom",sideOffset:i=5,className:a="","aria-label":u,"aria-describedby":d})=>y.jsxs(_c,{open:n,onOpenChange:r,children:[y.jsx(Ec,{asChild:!0,children:e}),y.jsx(Cc,{children:y.jsx(Rc,{className:`${Tc.content} ${a}`,align:o,side:s,sideOffset:i,"aria-label":u,"aria-describedby":d,children:t})})]}),xe={table:"_table_1b0iq_1",caption:"_caption_1b0iq_8",headerRow:"_headerRow_1b0iq_25",dataRow:"_dataRow_1b0iq_33",cellInner:"_cellInner_1b0iq_41",cellLabel:"_cellLabel_1b0iq_47",cellContent:"_cellContent_1b0iq_52",value:"_value_1b0iq_58",icon:"_icon_1b0iq_64"};function Oc({children:e,caption:t,"aria-label":n}){return process.env.NODE_ENV!=="production"&&!t&&!n&&console.warn("Table: Component should have either a caption or aria-label for accessibility."),y.jsxs("table",{className:xe.table,"aria-label":n,children:[t&&y.jsx("caption",{className:xe.caption,children:t}),e]})}function Ac({children:e}){const t=z.Children.map(e,n=>z.isValidElement(n)&&n.type==="td"?y.jsx("th",{scope:"col",...n.props}):n);return y.jsx("thead",{children:y.jsx("tr",{className:xe.headerRow,children:t})})}function kc({children:e}){return y.jsx("tr",{className:xe.dataRow,children:e})}function Mc({label:e,children:t,isHeader:n=!1,scope:r}){const o=n?"th":"td",s=n&&r?{scope:r}:{};return e||t?y.jsx(o,{...s,children:y.jsxs("div",{className:xe.cellInner,children:[e&&y.jsx("span",{className:xe.cellLabel,children:e}),t&&y.jsx("div",{className:xe.cellContent,children:t})]})}):y.jsx(o,{...s,children:t})}function Nc({children:e}){return y.jsx("span",{className:xe.value,children:e})}function Ic({children:e,"aria-label":t}){const n=!t;return y.jsx("span",{className:xe.icon,"aria-hidden":n?"true":void 0,"aria-label":t,children:z.cloneElement(e,{size:"14px",color:"currentColor"})})}G.Base=Oo,G.Button=To,G.Checkbox=Po,G.FilterPanelBase=Io,G.InputField=Lo,G.Popover=Pc,G.RadioButton=Fo,G.SearchField=jo,G.Select=lc,G.Slider=Wo,G.Table=Oc,G.TableCell=Mc,G.TableHeader=Ac,G.TableIcon=Ic,G.TableRow=kc,G.TableValue=Nc,G.ToggleSwitch=Bo,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}));
|
|
62
|
+
`)},Ea=0,ze=[];function Ca(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Ea++)[0],s=f.useState(jr)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var c=qs([e.lockRef.current],(e.shards||[]).map(Hr),!0).filter(Boolean);return c.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),c.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(c,m){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!i.current.allowPinchZoom;var w=Pt(c),b=n.current,x="deltaX"in c?c.deltaX:b[0]-w[0],_="deltaY"in c?c.deltaY:b[1]-w[1],E,O=c.target,T=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in c&&T==="h"&&O.type==="range")return!1;var j=window.getSelection(),N=j&&j.anchorNode,F=N?N===O||N.contains(O):!1;if(F)return!1;var $=Br(T,O);if(!$)return!0;if($?E=T:(E=T==="v"?"h":"v",$=Br(T,O)),!$)return!1;if(!r.current&&"changedTouches"in c&&(x||_)&&(r.current=E),!E)return!0;var C=r.current||E;return xa(C,m,c,C==="h"?x:_)},[]),u=f.useCallback(function(c){var m=c;if(!(!ze.length||ze[ze.length-1]!==s)){var w="deltaY"in m?Wr(m):Pt(m),b=t.current.filter(function(E){return E.name===m.type&&(E.target===m.target||m.target===E.shadowParent)&&Sa(E.delta,w)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var x=(i.current.shards||[]).map(Hr).filter(Boolean).filter(function(E){return E.contains(m.target)}),_=x.length>0?a(m,x[0]):!i.current.noIsolation;_&&m.cancelable&&m.preventDefault()}}},[]),d=f.useCallback(function(c,m,w,b){var x={name:c,delta:m,target:w,should:b,shadowParent:Ra(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),v=f.useCallback(function(c){n.current=Pt(c),r.current=void 0},[]),p=f.useCallback(function(c){d(c.type,Wr(c),c.target,a(c,e.lockRef.current))},[]),g=f.useCallback(function(c){d(c.type,Pt(c),c.target,a(c,e.lockRef.current))},[]);f.useEffect(function(){return ze.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ue),document.addEventListener("touchmove",u,Ue),document.addEventListener("touchstart",v,Ue),function(){ze=ze.filter(function(c){return c!==s}),document.removeEventListener("wheel",u,Ue),document.removeEventListener("touchmove",u,Ue),document.removeEventListener("touchstart",v,Ue)}},[]);var h=e.removeScrollBar,l=e.inert;return f.createElement(f.Fragment,null,l?f.createElement(s,{styles:_a(o)}):null,h?f.createElement(ha,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ra(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ta=ta(Dr,Ca);var pn=f.forwardRef(function(e,t){return f.createElement(Rt,be({},e,{ref:t,sideCar:Ta}))});pn.classNames=Rt.classNames;var Pa=[" ","Enter","ArrowUp","ArrowDown"],Oa=[" ","Enter"],Me="Select",[Ot,At,Aa]=Xo(Me),[qe]=lt(Me,[Aa,xt]),kt=xt(),[ka,Ce]=qe(Me),[Ma,Na]=qe(Me),Ur=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:u,dir:d,name:v,autoComplete:p,disabled:g,required:h,form:l}=e,c=kt(t),[m,w]=f.useState(null),[b,x]=f.useState(null),[_,E]=f.useState(!1),O=Go(d),[T,j]=an({prop:r,defaultProp:o??!1,onChange:s,caller:Me}),[N,F]=an({prop:i,defaultProp:a,onChange:u,caller:Me}),$=f.useRef(null),C=m?l||!!m.closest("form"):!0,[R,P]=f.useState(new Set),I=Array.from(R).map(M=>M.props.value).join(";");return y.jsx(Rr,{...c,children:y.jsxs(ka,{required:h,scope:t,trigger:m,onTriggerChange:w,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:ut(),value:N,onValueChange:F,open:T,onOpenChange:j,dir:O,triggerPointerDownPosRef:$,disabled:g,children:[y.jsx(Ot.Provider,{scope:t,children:y.jsx(Ma,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(M=>{P(k=>new Set(k).add(M))},[]),onNativeOptionRemove:f.useCallback(M=>{P(k=>{const A=new Set(k);return A.delete(M),A})},[]),children:n})}),C?y.jsxs(lo,{"aria-hidden":!0,required:h,tabIndex:-1,name:v,autoComplete:p,value:N,onChange:M=>F(M.target.value),disabled:g,form:l,children:[N===void 0?y.jsx("option",{value:""}):null,Array.from(R)]},I):null]})})};Ur.displayName=Me;var zr="SelectTrigger",qr=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=kt(n),i=Ce(zr,n),a=i.disabled||r,u=te(t,i.onTriggerChange),d=At(n),v=f.useRef("touch"),[p,g,h]=fo(c=>{const m=d().filter(x=>!x.disabled),w=m.find(x=>x.value===i.value),b=po(m,c,w);b!==void 0&&i.onValueChange(b.value)}),l=c=>{a||(i.onOpenChange(!0),h()),c&&(i.triggerPointerDownPosRef.current={x:Math.round(c.pageX),y:Math.round(c.pageY)})};return y.jsx(on,{asChild:!0,...s,children:y.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":uo(i.value)?"":void 0,...o,ref:u,onClick:Z(o.onClick,c=>{c.currentTarget.focus(),v.current!=="mouse"&&l(c)}),onPointerDown:Z(o.onPointerDown,c=>{v.current=c.pointerType;const m=c.target;m.hasPointerCapture(c.pointerId)&&m.releasePointerCapture(c.pointerId),c.button===0&&c.ctrlKey===!1&&c.pointerType==="mouse"&&(l(c),c.preventDefault())}),onKeyDown:Z(o.onKeyDown,c=>{const m=p.current!=="";!(c.ctrlKey||c.altKey||c.metaKey)&&c.key.length===1&&g(c.key),!(m&&c.key===" ")&&Pa.includes(c.key)&&(l(),c.preventDefault())})})})});qr.displayName=zr;var Yr="SelectValue",Kr=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,u=Ce(Yr,n),{onValueNodeHasChildrenChange:d}=u,v=s!==void 0,p=te(t,u.onValueNodeChange);return re(()=>{d(v)},[d,v]),y.jsx(J.span,{...a,ref:p,style:{pointerEvents:"none"},children:uo(u.value)?y.jsx(y.Fragment,{children:i}):s})});Kr.displayName=Yr;var Ia="SelectIcon",Xr=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return y.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Xr.displayName=Ia;var Da="SelectPortal",Zr=e=>y.jsx(sn,{asChild:!0,...e});Zr.displayName=Da;var Ne="SelectContent",Gr=f.forwardRef((e,t)=>{const n=Ce(Ne,e.__scopeSelect),[r,o]=f.useState();if(re(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?st.createPortal(y.jsx(Jr,{scope:e.__scopeSelect,children:y.jsx(Ot.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),s):null}return y.jsx(Qr,{...e,ref:t})});Gr.displayName=Ne;var pe=10,[Jr,Re]=qe(Ne),ja="SelectContentImpl",La=et("SelectContent.RemoveScroll"),Qr=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:u,align:d,alignOffset:v,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:l,hideWhenDetached:c,avoidCollisions:m,...w}=e,b=Ce(Ne,n),[x,_]=f.useState(null),[E,O]=f.useState(null),T=te(t,D=>_(D)),[j,N]=f.useState(null),[F,$]=f.useState(null),C=At(n),[R,P]=f.useState(!1),I=f.useRef(!1);f.useEffect(()=>{if(x)return kr(x)},[x]),Vn();const M=f.useCallback(D=>{const[U,...ee]=C().map(X=>X.ref.current),[q]=ee.slice(-1),Y=document.activeElement;for(const X of D)if(X===Y||(X==null||X.scrollIntoView({block:"nearest"}),X===U&&E&&(E.scrollTop=0),X===q&&E&&(E.scrollTop=E.scrollHeight),X==null||X.focus(),document.activeElement!==Y))return},[C,E]),k=f.useCallback(()=>M([j,x]),[M,j,x]);f.useEffect(()=>{R&&k()},[R,k]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;f.useEffect(()=>{if(x){let D={x:0,y:0};const U=q=>{var Y,X;D={x:Math.abs(Math.round(q.pageX)-(((Y=L.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(q.pageY)-(((X=L.current)==null?void 0:X.y)??0))}},ee=q=>{D.x<=10&&D.y<=10?q.preventDefault():x.contains(q.target)||A(!1),document.removeEventListener("pointermove",U),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[x,A,L]),f.useEffect(()=>{const D=()=>A(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[A]);const[H,S]=fo(D=>{const U=C().filter(Y=>!Y.disabled),ee=U.find(Y=>Y.ref.current===document.activeElement),q=po(U,D,ee);q&&setTimeout(()=>q.ref.current.focus())}),B=f.useCallback((D,U,ee)=>{const q=!I.current&&!ee;(b.value!==void 0&&b.value===U||q)&&(N(D),q&&(I.current=!0))},[b.value]),V=f.useCallback(()=>x==null?void 0:x.focus(),[x]),W=f.useCallback((D,U,ee)=>{const q=!I.current&&!ee;(b.value!==void 0&&b.value===U||q)&&$(D)},[b.value]),K=r==="popper"?hn:eo,Q=K===hn?{side:a,sideOffset:u,align:d,alignOffset:v,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:l,hideWhenDetached:c,avoidCollisions:m}:{};return y.jsx(Jr,{scope:n,content:x,viewport:E,onViewportChange:O,itemRefCallback:B,selectedItem:j,onItemLeave:V,itemTextRefCallback:W,focusSelectedItem:k,selectedItemText:F,position:r,isPositioned:R,searchRef:H,children:y.jsx(pn,{as:La,allowPinchZoom:!0,children:y.jsx(Ut,{asChild:!0,trapped:b.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:Z(o,D=>{var U;(U=b.trigger)==null||U.focus({preventScroll:!0}),D.preventDefault()}),children:y.jsx($t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:y.jsx(K,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:D=>D.preventDefault(),...w,...Q,onPlaced:()=>P(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Z(w.onKeyDown,D=>{const U=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!U&&D.key.length===1&&S(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let q=C().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(D.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const Y=D.target,X=q.indexOf(Y);q=q.slice(X+1)}setTimeout(()=>M(q)),D.preventDefault()}})})})})})})});Qr.displayName=ja;var Fa="SelectItemAlignedPosition",eo=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Ce(Ne,n),i=Re(Ne,n),[a,u]=f.useState(null),[d,v]=f.useState(null),p=te(t,T=>v(T)),g=At(n),h=f.useRef(!1),l=f.useRef(!0),{viewport:c,selectedItem:m,selectedItemText:w,focusSelectedItem:b}=i,x=f.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&d&&c&&m&&w){const T=s.trigger.getBoundingClientRect(),j=d.getBoundingClientRect(),N=s.valueNode.getBoundingClientRect(),F=w.getBoundingClientRect();if(s.dir!=="rtl"){const Y=F.left-j.left,X=N.left-Y,oe=T.left-X,ce=T.width+oe,le=Math.max(ce,j.width),Pe=window.innerWidth-pe,Oe=In(X,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.left=Oe+"px"}else{const Y=j.right-F.right,X=window.innerWidth-N.right-Y,oe=window.innerWidth-T.right-X,ce=T.width+oe,le=Math.max(ce,j.width),Pe=window.innerWidth-pe,Oe=In(X,[pe,Math.max(pe,Pe-le)]);a.style.minWidth=ce+"px",a.style.right=Oe+"px"}const $=g(),C=window.innerHeight-pe*2,R=c.scrollHeight,P=window.getComputedStyle(d),I=parseInt(P.borderTopWidth,10),M=parseInt(P.paddingTop,10),k=parseInt(P.borderBottomWidth,10),A=parseInt(P.paddingBottom,10),L=I+M+R+A+k,H=Math.min(m.offsetHeight*5,L),S=window.getComputedStyle(c),B=parseInt(S.paddingTop,10),V=parseInt(S.paddingBottom,10),W=T.top+T.height/2-pe,K=C-W,Q=m.offsetHeight/2,D=m.offsetTop+Q,U=I+M+D,ee=L-U;if(U<=W){const Y=$.length>0&&m===$[$.length-1].ref.current;a.style.bottom="0px";const X=d.clientHeight-c.offsetTop-c.offsetHeight,oe=Math.max(K,Q+(Y?V:0)+X+k),ce=U+oe;a.style.height=ce+"px"}else{const Y=$.length>0&&m===$[0].ref.current;a.style.top="0px";const oe=Math.max(W,I+c.offsetTop+(Y?B:0)+Q)+ee;a.style.height=oe+"px",c.scrollTop=U-W+c.offsetTop}a.style.margin=`${pe}px 0`,a.style.minHeight=H+"px",a.style.maxHeight=C+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,a,d,c,m,w,s.dir,r]);re(()=>x(),[x]);const[_,E]=f.useState();re(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const O=f.useCallback(T=>{T&&l.current===!0&&(x(),b==null||b(),l.current=!1)},[x,b]);return y.jsx($a,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:y.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:y.jsx(J.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});eo.displayName=Fa;var Ba="SelectPopperPosition",hn=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=pe,...s}=e,i=kt(n);return y.jsx(Tr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hn.displayName=Ba;var[$a,mn]=qe(Ne,{}),vn="SelectViewport",to=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Re(vn,n),i=mn(vn,n),a=te(t,s.onViewportChange),u=f.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),y.jsx(Ot.Slot,{scope:n,children:y.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Z(o.onScroll,d=>{const v=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const h=Math.abs(u.current-v.scrollTop);if(h>0){const l=window.innerHeight-pe*2,c=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),w=Math.max(c,m);if(w<l){const b=w+h,x=Math.min(l,b),_=b-x;p.style.height=x+"px",p.style.bottom==="0px"&&(v.scrollTop=_>0?_:0,p.style.justifyContent="flex-end")}}}u.current=v.scrollTop})})})]})});to.displayName=vn;var no="SelectGroup",[Va,Wa]=qe(no),Ha=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ut();return y.jsx(Va,{scope:n,id:o,children:y.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ha.displayName=no;var ro="SelectLabel",Ua=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wa(ro,n);return y.jsx(J.div,{id:o.id,...r,ref:t})});Ua.displayName=ro;var Mt="SelectItem",[za,oo]=qe(Mt),io=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Ce(Mt,n),u=Re(Mt,n),d=a.value===r,[v,p]=f.useState(s??""),[g,h]=f.useState(!1),l=te(t,b=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,b,r,o)}),c=ut(),m=f.useRef("touch"),w=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(za,{scope:n,value:r,disabled:o,textId:c,isSelected:d,onItemTextChange:f.useCallback(b=>{p(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:y.jsx(Ot.ItemSlot,{scope:n,value:r,disabled:o,textValue:v,children:y.jsx(J.div,{role:"option","aria-labelledby":c,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:l,onFocus:Z(i.onFocus,()=>h(!0)),onBlur:Z(i.onBlur,()=>h(!1)),onClick:Z(i.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:Z(i.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:Z(i.onPointerDown,b=>{m.current=b.pointerType}),onPointerMove:Z(i.onPointerMove,b=>{var x;m.current=b.pointerType,o?(x=u.onItemLeave)==null||x.call(u):m.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(i.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:Z(i.onKeyDown,b=>{var _;((_=u.searchRef)==null?void 0:_.current)!==""&&b.key===" "||(Oa.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});io.displayName=Mt;var ot="SelectItemText",so=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Ce(ot,n),a=Re(ot,n),u=oo(ot,n),d=Na(ot,n),[v,p]=f.useState(null),g=te(t,w=>p(w),u.onItemTextChange,w=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,w,u.value,u.disabled)}),h=v==null?void 0:v.textContent,l=f.useMemo(()=>y.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value),[u.disabled,u.value,h]),{onNativeOptionAdd:c,onNativeOptionRemove:m}=d;return re(()=>(c(l),()=>m(l)),[c,m,l]),y.jsxs(y.Fragment,{children:[y.jsx(J.span,{id:u.textId,...s,ref:g}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?st.createPortal(s.children,i.valueNode):null]})});so.displayName=ot;var ao="SelectItemIndicator",qa=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return oo(ao,n).isSelected?y.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});qa.displayName=ao;var gn="SelectScrollUpButton",Ya=f.forwardRef((e,t)=>{const n=Re(gn,e.__scopeSelect),r=mn(gn,e.__scopeSelect),[o,s]=f.useState(!1),i=te(t,r.onScrollButtonChange);return re(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=u.scrollTop>0;s(d)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?y.jsx(co,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Ya.displayName=gn;var bn="SelectScrollDownButton",Ka=f.forwardRef((e,t)=>{const n=Re(bn,e.__scopeSelect),r=mn(bn,e.__scopeSelect),[o,s]=f.useState(!1),i=te(t,r.onScrollButtonChange);return re(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=u.scrollHeight-u.clientHeight,v=Math.ceil(u.scrollTop)<d;s(v)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?y.jsx(co,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});Ka.displayName=bn;var co=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Re("SelectScrollButton",n),i=f.useRef(null),a=At(n),u=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>u(),[u]),re(()=>{var v;const d=a().find(p=>p.ref.current===document.activeElement);(v=d==null?void 0:d.ref.current)==null||v.scrollIntoView({block:"nearest"})},[a]),y.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{u()})})}),Xa="SelectSeparator",Za=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Za.displayName=Xa;var yn="SelectArrow",Ga=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=kt(n),s=Ce(yn,n),i=Re(yn,n);return s.open&&i.position==="popper"?y.jsx(Pr,{...o,...r,ref:t}):null});Ga.displayName=yn;var Ja="SelectBubbleInput",lo=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),s=te(r,o),i=$s(t);return f.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&v){const p=new Event("change",{bubbles:!0});v.call(a,t),a.dispatchEvent(p)}},[i,t]),y.jsx(J.select,{...n,style:{...Or,...n.style},ref:s,defaultValue:t})});lo.displayName=Ja;function uo(e){return e===""||e===void 0}function fo(e){const t=Ae(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const a=n.current+i;t(a),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(a)},[t]),s=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function po(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Qa(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const u=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function Qa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ec=Ur,tc=qr,nc=Kr,rc=Xr,oc=Zr,ic=Gr,sc=to,ac=io,cc=so;const Ie={wrapper:"_wrapper_1uqw5_1",label:"_label_1uqw5_7",trigger:"_trigger_1uqw5_12",icon:"_icon_1uqw5_44",content:"_content_1uqw5_50",viewport:"_viewport_1uqw5_58",item:"_item_1uqw5_62"},lc=({value:e,onValueChange:t,options:n,placeholder:r="Select...",className:o="",disabled:s=!1,label:i,"aria-label":a,id:u})=>{const d=z.useId(),v=u||d,p=`${v}-label`,g=y.jsxs(ec,{value:e,onValueChange:t,disabled:s,children:[y.jsxs(tc,{id:v,className:`${Ie.trigger} ${o} cursor-pointer`,...i?{"aria-labelledby":p}:a?{"aria-label":a}:{},children:[y.jsx(nc,{placeholder:r}),y.jsx(rc,{className:Ie.icon,"aria-hidden":"true",children:y.jsx(Ao,{size:14,color:"currentColor"})})]}),y.jsx(oc,{children:y.jsx(ic,{className:Ie.content,position:"popper",side:"bottom",align:"start",sideOffset:4,children:y.jsx(sc,{className:Ie.viewport,children:n.map(h=>y.jsx(ac,{value:h.value,className:Ie.item,children:y.jsx(cc,{children:h.label})},h.value))})})})]});return i?y.jsxs("div",{className:Ie.wrapper,children:[y.jsx("label",{id:p,htmlFor:v,className:Ie.label,children:i}),g]}):g};function uc(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var wn=e=>{const{present:t,children:n}=e,r=dc(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=te(r.ref,fc(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};wn.displayName="Presence";function dc(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,u]=uc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const d=Nt(r.current);s.current=a==="mounted"?d:"none"},[a]),re(()=>{const d=r.current,v=o.current;if(v!==e){const g=s.current,h=Nt(d);e?u("MOUNT"):h==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(v&&g!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),re(()=>{if(t){let d;const v=t.ownerDocument.defaultView??window,p=h=>{const c=Nt(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&c&&(u("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},g=h=>{h.target===t&&(s.current=Nt(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{v.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Nt(e){return(e==null?void 0:e.animationName)||"none"}function fc(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var It="Popover",[ho]=lt(It,[xt]),it=xt(),[pc,Te]=ho(It),mo=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=it(t),u=f.useRef(null),[d,v]=f.useState(!1),[p,g]=an({prop:r,defaultProp:o??!1,onChange:s,caller:It});return y.jsx(Rr,{...a,children:y.jsx(pc,{scope:t,contentId:ut(),triggerRef:u,open:p,onOpenChange:g,onOpenToggle:f.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:d,onCustomAnchorAdd:f.useCallback(()=>v(!0),[]),onCustomAnchorRemove:f.useCallback(()=>v(!1),[]),modal:i,children:n})})};mo.displayName=It;var vo="PopoverAnchor",hc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(vo,n),s=it(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return f.useEffect(()=>(i(),()=>a()),[i,a]),y.jsx(on,{...s,...r,ref:t})});hc.displayName=vo;var go="PopoverTrigger",bo=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(go,n),s=it(n),i=te(t,o.triggerRef),a=y.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_o(o.open),...r,ref:i,onClick:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:y.jsx(on,{asChild:!0,...s,children:a})});bo.displayName=go;var xn="PopoverPortal",[mc,vc]=ho(xn,{forceMount:void 0}),yo=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Te(xn,t);return y.jsx(mc,{scope:t,forceMount:n,children:y.jsx(wn,{present:n||s.open,children:y.jsx(sn,{asChild:!0,container:o,children:r})})})};yo.displayName=xn;var Ye="PopoverContent",wo=f.forwardRef((e,t)=>{const n=vc(Ye,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Te(Ye,e.__scopePopover);return y.jsx(wn,{present:r||s.open,children:s.modal?y.jsx(bc,{...o,ref:t}):y.jsx(yc,{...o,ref:t})})});wo.displayName=Ye;var gc=et("PopoverContent.RemoveScroll"),bc=f.forwardRef((e,t)=>{const n=Te(Ye,e.__scopePopover),r=f.useRef(null),o=te(t,r),s=f.useRef(!1);return f.useEffect(()=>{const i=r.current;if(i)return kr(i)},[]),y.jsx(pn,{as:gc,allowPinchZoom:!0,children:y.jsx(xo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),yc=f.forwardRef((e,t)=>{const n=Te(Ye,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return y.jsx(xo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var u,d;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((d=n.triggerRef.current)==null?void 0:d.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),xo=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:v,...p}=e,g=Te(Ye,n),h=it(n);return Vn(),y.jsx(Ut,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:y.jsx($t,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:v,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:y.jsx(Tr,{"data-state":_o(g.open),role:"dialog",id:g.contentId,...h,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),So="PopoverClose",wc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Te(So,n);return y.jsx(J.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});wc.displayName=So;var xc="PopoverArrow",Sc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=it(n);return y.jsx(Pr,{...o,...r,ref:t})});Sc.displayName=xc;function _o(e){return e?"open":"closed"}var _c=mo,Ec=bo,Cc=yo,Rc=wo;const Tc={content:"_content_1qahr_1"},Pc=({trigger:e,children:t,open:n,onOpenChange:r,align:o="end",side:s="bottom",sideOffset:i=5,className:a="","aria-label":u,"aria-describedby":d})=>y.jsxs(_c,{open:n,onOpenChange:r,children:[y.jsx(Ec,{asChild:!0,children:e}),y.jsx(Cc,{children:y.jsx(Rc,{className:`${Tc.content} ${a}`,align:o,side:s,sideOffset:i,"aria-label":u,"aria-describedby":d,children:t})})]}),xe={table:"_table_1b0iq_1",caption:"_caption_1b0iq_8",headerRow:"_headerRow_1b0iq_25",dataRow:"_dataRow_1b0iq_33",cellInner:"_cellInner_1b0iq_41",cellLabel:"_cellLabel_1b0iq_47",cellContent:"_cellContent_1b0iq_52",value:"_value_1b0iq_58",icon:"_icon_1b0iq_64"};function Oc({children:e,caption:t,"aria-label":n}){return process.env.NODE_ENV!=="production"&&!t&&!n&&console.warn("Table: Component should have either a caption or aria-label for accessibility."),y.jsxs("table",{className:xe.table,"aria-label":n,children:[t&&y.jsx("caption",{className:xe.caption,children:t}),e]})}function Ac({children:e}){const t=z.Children.map(e,n=>z.isValidElement(n)&&n.type==="td"?y.jsx("th",{scope:"col",...n.props}):n);return y.jsx("thead",{children:y.jsx("tr",{className:xe.headerRow,children:t})})}function kc({children:e}){return y.jsx("tr",{className:xe.dataRow,children:e})}function Mc({label:e,children:t,isHeader:n=!1,scope:r}){const o=n?"th":"td",s=n&&r?{scope:r}:{};return e||t?y.jsx(o,{...s,children:y.jsxs("div",{className:xe.cellInner,children:[e&&y.jsx("span",{className:xe.cellLabel,children:e}),t&&y.jsx("div",{className:xe.cellContent,children:t})]})}):y.jsx(o,{...s,children:t})}function Nc({children:e}){return y.jsx("span",{className:xe.value,children:e})}function Ic({children:e,"aria-label":t}){const n=!t;return y.jsx("span",{className:xe.icon,"aria-hidden":n?"true":void 0,"aria-label":t,children:z.cloneElement(e,{size:"14px",color:"currentColor"})})}G.Base=Oo,G.Button=To,G.Checkbox=Po,G.FilterPanelBase=Io,G.InputField=Lo,G.Popover=Pc,G.RadioButton=Fo,G.SearchField=jo,G.Select=lc,G.Slider=Wo,G.Table=Oc,G.TableCell=Mc,G.TableHeader=Ac,G.TableIcon=Ic,G.TableRow=kc,G.TableValue=Nc,G.ToggleSwitch=Bo,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indxsearch/systm",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Minimal design system and UI component library for React. Includes buttons, inputs, sliders, checkboxes, tables, and more. Built with CSS modules and customizable via CSS variables.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indx",
|