@tapflowio/relay 0.15.0 → 0.17.0

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.
Files changed (78) hide show
  1. package/dist/RelayServer.d.ts.map +1 -1
  2. package/dist/RelayServer.js +53 -3
  3. package/dist/RelayServer.js.map +1 -1
  4. package/dist/SessionManager.d.ts +2 -1
  5. package/dist/SessionManager.d.ts.map +1 -1
  6. package/dist/SessionManager.js +2 -1
  7. package/dist/SessionManager.js.map +1 -1
  8. package/dist/types.d.ts +2 -1
  9. package/dist/types.d.ts.map +1 -1
  10. package/package.json +2 -2
  11. package/public/assets/{AppCenter-DHKav0MA.js → AppCenter-BRmG2FEm.js} +2 -2
  12. package/public/assets/AppCenter-BRmG2FEm.js.br +0 -0
  13. package/public/assets/{Default-FOVo8D6L.js → Default-DTr0wqds.js} +1 -1
  14. package/public/assets/Default-DTr0wqds.js.br +0 -0
  15. package/public/assets/{Invite-DdjwJ4DV.js → Invite-DKsNh2GB.js} +1 -1
  16. package/public/assets/Invite-DKsNh2GB.js.br +0 -0
  17. package/public/assets/{MacResources-Dl1w6E1h.js → MacResources-CLDdcibL.js} +1 -1
  18. package/public/assets/MacResources-CLDdcibL.js.br +0 -0
  19. package/public/assets/{NotFound-BMUavI-G.js → NotFound-BtKq2uv6.js} +1 -1
  20. package/public/assets/NotFound-BtKq2uv6.js.br +0 -0
  21. package/public/assets/QASession-B_5aJ67l.js +130 -0
  22. package/public/assets/QASession-B_5aJ67l.js.br +0 -0
  23. package/public/assets/{ResetPassword-Yn2hnB_M.js → ResetPassword-gp6hVQrf.js} +1 -1
  24. package/public/assets/ResetPassword-gp6hVQrf.js.br +0 -0
  25. package/public/assets/{Setup-BaGV0xx6.js → Setup-DiG4Nbs7.js} +1 -1
  26. package/public/assets/Setup-DiG4Nbs7.js.br +0 -0
  27. package/public/assets/{Team-BOwoos5_.js → Team-D1iwg2vL.js} +2 -2
  28. package/public/assets/Team-D1iwg2vL.js.br +0 -0
  29. package/public/assets/{Tokens-Bu1FtE_n.js → Tokens-DGtE4Xcy.js} +1 -1
  30. package/public/assets/Tokens-DGtE4Xcy.js.br +0 -0
  31. package/public/assets/alert-dialog-CXwkFlF3.js +1 -0
  32. package/public/assets/alert-dialog-CXwkFlF3.js.br +0 -0
  33. package/public/assets/{badge-CNtq_oBK.js → badge-CavXTq2x.js} +1 -1
  34. package/public/assets/badge-CavXTq2x.js.br +0 -0
  35. package/public/assets/{build-format-D6egYX-U.js → build-format-BZV6gt41.js} +1 -1
  36. package/public/assets/build-format-BZV6gt41.js.br +0 -0
  37. package/public/assets/dialog-JbKwqqS0.js +11 -0
  38. package/public/assets/dialog-JbKwqqS0.js.br +0 -0
  39. package/public/assets/index-CBnxiD7-.js +274 -0
  40. package/public/assets/index-CBnxiD7-.js.br +0 -0
  41. package/public/assets/index-Ctx3_cYz.css +1 -0
  42. package/public/assets/index-Ctx3_cYz.css.br +0 -0
  43. package/public/assets/{pencil-CzKUUBmE.js → pencil-BGrOEXS6.js} +1 -1
  44. package/public/assets/pencil-BGrOEXS6.js.br +0 -0
  45. package/public/assets/{table-CU0HMyju.js → table-CqOA0Bb1.js} +1 -1
  46. package/public/assets/table-CqOA0Bb1.js.br +0 -0
  47. package/public/assets/tabs-BVBbhCFG.js +1 -0
  48. package/public/assets/tabs-BVBbhCFG.js.br +0 -0
  49. package/public/assets/{trash-2-Bw_edyHa.js → trash-2-CwlFrbEF.js} +1 -1
  50. package/public/assets/trash-2-CwlFrbEF.js.br +0 -0
  51. package/public/index.html +2 -2
  52. package/public/index.html.br +0 -0
  53. package/public/assets/AppCenter-DHKav0MA.js.br +0 -0
  54. package/public/assets/Default-FOVo8D6L.js.br +0 -0
  55. package/public/assets/Invite-DdjwJ4DV.js.br +0 -0
  56. package/public/assets/MacResources-Dl1w6E1h.js.br +0 -0
  57. package/public/assets/NotFound-BMUavI-G.js.br +0 -0
  58. package/public/assets/QASession-BzfWUo9F.js +0 -130
  59. package/public/assets/QASession-BzfWUo9F.js.br +0 -0
  60. package/public/assets/ResetPassword-Yn2hnB_M.js.br +0 -0
  61. package/public/assets/Setup-BaGV0xx6.js.br +0 -0
  62. package/public/assets/Team-BOwoos5_.js.br +0 -0
  63. package/public/assets/Tokens-Bu1FtE_n.js.br +0 -0
  64. package/public/assets/alert-dialog-dsCcQ1NM.js +0 -1
  65. package/public/assets/alert-dialog-dsCcQ1NM.js.br +0 -0
  66. package/public/assets/badge-CNtq_oBK.js.br +0 -0
  67. package/public/assets/build-format-D6egYX-U.js.br +0 -0
  68. package/public/assets/dialog-Blqnc3tq.js +0 -11
  69. package/public/assets/dialog-Blqnc3tq.js.br +0 -0
  70. package/public/assets/index-BI7E3MD-.css +0 -1
  71. package/public/assets/index-BI7E3MD-.css.br +0 -0
  72. package/public/assets/index-IvDXNTVd.js +0 -274
  73. package/public/assets/index-IvDXNTVd.js.br +0 -0
  74. package/public/assets/pencil-CzKUUBmE.js.br +0 -0
  75. package/public/assets/table-CU0HMyju.js.br +0 -0
  76. package/public/assets/tabs-C9nZOMC5.js +0 -1
  77. package/public/assets/tabs-C9nZOMC5.js.br +0 -0
  78. package/public/assets/trash-2-Bw_edyHa.js.br +0 -0
@@ -0,0 +1,11 @@
1
+ import{W as je,a6 as t,ad as U,a3 as n,A as ot,t as L,K as j,P as nt,aj as X,s as rt,ac as we,ai as De,a5 as Me,Y as Oe,N as st,a2 as at,ag as lt,R as ct,F as it,p as dt,O as ut,$ as pt,g as ft,V as mt,af as ht,ae as Te,v as gt,J as M,e as St,D as xt,o as vt,m as wt,j as ke,i as yt,X as Ct,n as Le,l as Ae,k as Be}from"./index-CBnxiD7-.js";/**
2
+ * @license lucide-react v0.577.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const bt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ve=je("chevron-down",bt);/**
7
+ * @license lucide-react v0.577.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const It=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Tt=je("chevron-up",It);function Pe(s,[e,r]){return Math.min(r,Math.max(e,s))}function Pt(s){const e=t.useRef({value:s,previous:s});return t.useMemo(()=>(e.current.value!==s&&(e.current.previous=e.current.value,e.current.value=s),e.current.previous),[s])}var Nt=Object.defineProperty,x=(s,e)=>Nt(s,"name",{value:e,configurable:!0}),Rt=[" ","Enter","ArrowUp","ArrowDown"],_t=[" ","Enter"],ie="Select",[me,he,Et]=st(ie),[re]=ut(ie,[Et,Oe]),ye=Oe(),[jt,Z]=re(ie),[Dt,Mt]=re(ie);function He(s){const{__scopeSelect:e,children:r,open:o,defaultOpen:u,onOpenChange:i,value:f,defaultValue:c,onValueChange:l,dir:a,name:S,autoComplete:v,disabled:C,required:I,form:T,internal_do_not_use_render:R}=s,d=ye(e),[h,y]=t.useState(null),[m,p]=t.useState(null),[_,E]=t.useState(!1),J=ht(a),[k,B]=Te({prop:o,defaultProp:u??!1,onChange:i,caller:ie}),[Q,z]=Te({prop:f,defaultProp:c,onChange:l,caller:ie}),W=t.useRef(null),K=t.useRef(Q);t.useEffect(()=>{const D=T?h==null?void 0:h.ownerDocument.getElementById(T):h==null?void 0:h.form;if(D instanceof HTMLFormElement){const F=x(()=>z(K.current),"reset");return D.addEventListener("reset",F),()=>D.removeEventListener("reset",F)}},[T,h,z]);const ee=h?!!T||!!h.closest("form"):!0,[$,V]=t.useState(new Set),G=De(),Y=Array.from($).map(D=>D.props.value).join(";"),q=t.useCallback(D=>{V(F=>new Set(F).add(D))},[]),H=t.useCallback(D=>{V(F=>{const le=new Set(F);return le.delete(D),le})},[]),ae={required:I,trigger:h,onTriggerChange:y,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:G,value:Q,onValueChange:z,open:k,onOpenChange:B,dir:J,triggerPointerDownPosRef:W,disabled:C,name:S,autoComplete:v,form:T,nativeOptions:$,nativeSelectKey:Y,isFormControl:ee};return n.jsx(gt,{...d,children:n.jsx(jt,{scope:e,...ae,children:n.jsx(me.Provider,{scope:e,children:n.jsx(Dt,{scope:e,onNativeOptionAdd:q,onNativeOptionRemove:H,children:Ze(R)?R(ae):r})})})})}x(He,"SelectProvider");var Ot=x(s=>{const{__scopeSelect:e,children:r,...o}=s;return n.jsx(He,{__scopeSelect:e,...o,internal_do_not_use_render:({isFormControl:u})=>n.jsxs(n.Fragment,{children:[r,u?n.jsx(no,{__scopeSelect:e}):null]})})},"Select"),kt="SelectTrigger",Fe=t.forwardRef(x(function(e,r){const{__scopeSelect:o,disabled:u=!1,...i}=e,f=ye(o),c=Z(kt,o),l=c.disabled||u,a=U(r,c.onTriggerChange),S=he(o),v=t.useRef("touch"),[C,I,T]=be(d=>{const h=S().filter(p=>!p.disabled),y=h.find(p=>p.value===c.value),m=Ie(h,d,y);m!==void 0&&c.onValueChange(m.value)}),R=x(d=>{l||(c.onOpenChange(!0),T()),d&&(c.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})},"handleOpen");return n.jsx(ot,{asChild:!0,...f,children:n.jsx(L.button,{type:"button",role:"combobox","aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":ue(c.value)?"":void 0,...i,ref:a,onClick:j(i.onClick,d=>{d.currentTarget.focus(),v.current!=="mouse"&&R(d)}),onPointerDown:j(i.onPointerDown,d=>{v.current=d.pointerType;const h=d.target;h.hasPointerCapture(d.pointerId)&&h.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(R(d),d.preventDefault())}),onKeyDown:j(i.onKeyDown,d=>{const h=C.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&I(d.key),!(h&&d.key===" ")&&Rt.includes(d.key)&&(R(),d.preventDefault())})})})},"SelectTrigger")),Lt="SelectValue",At=t.forwardRef(x(function(e,r){const{__scopeSelect:o,className:u,style:i,children:f,placeholder:c="",...l}=e,a=Z(Lt,o),{onValueNodeHasChildrenChange:S}=a,v=f!==void 0,C=U(r,a.onValueNodeChange);X(()=>{S(v)},[S,v]);const I=ue(a.value);return n.jsx(L.span,{...l,asChild:I?!1:l.asChild,ref:C,style:{pointerEvents:"none"},children:n.jsx(t.Fragment,{children:I?c:f},I?"placeholder":"value")})},"SelectValue")),Bt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,children:u,...i}=e;return n.jsx(L.span,{"aria-hidden":!0,...i,ref:r,children:u||"▼"})},"SelectIcon")),Vt="SelectPortal",[Ht,Ft]=re(Vt,{forceMount:void 0}),Ut=x(s=>{const{__scopeSelect:e,forceMount:r,...o}=s;return n.jsx(Ht,{scope:s.__scopeSelect,forceMount:r,children:n.jsx(nt,{asChild:!0,...o})})},"SelectPortal"),ne="SelectContent",Ue=t.forwardRef(x(function(e,r){const o=Ft(ne,e.__scopeSelect),{forceMount:u=o.forceMount,...i}=e,f=Z(ne,e.__scopeSelect),[c,l]=t.useState();return X(()=>{l(new DocumentFragment)},[]),n.jsx(rt,{present:u||f.open,children:({present:a})=>a?n.jsx($t,{...i,ref:r}):n.jsx(Wt,{...i,fragment:c})})},"SelectContent")),Wt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,children:u,fragment:i}=e;return i?Me.createPortal(n.jsx(We,{scope:o,children:n.jsx(me.Slot,{scope:o,children:n.jsx("div",{ref:r,children:u})})}),i):null},"SelectContentFragment")),A=10,[We,se]=re(ne),Kt=pt("SelectContent.RemoveScroll"),$t=t.forwardRef(x(function(e,r){const{__scopeSelect:o}=e,{position:u="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:f,onPointerDownOutside:c,side:l,sideOffset:a,align:S,alignOffset:v,arrowPadding:C,collisionBoundary:I,collisionPadding:T,sticky:R,hideWhenDetached:d,avoidCollisions:h,...y}=e,m=Z(ne,o),[p,_]=t.useState(null),[E,J]=t.useState(null),k=U(r,_),[B,Q]=t.useState(null),[z,W]=t.useState(null),K=he(o),[ee,$]=t.useState(!1),V=t.useRef(!1);t.useEffect(()=>{if(p)return at(p)},[p]),lt();const G=t.useCallback(g=>{const[N,...O]=K().map(b=>b.ref.current),[P]=O.slice(-1),w=document.activeElement;for(const b of g)if(b===w||(b==null||b.scrollIntoView({block:"nearest"}),b===N&&E&&(E.scrollTop=0),b===P&&E&&(E.scrollTop=E.scrollHeight),b==null||b.focus(),document.activeElement!==w))return},[K,E]),Y=t.useCallback(()=>G([B,p]),[G,B,p]);t.useEffect(()=>{ee&&Y()},[ee,Y]);const{onOpenChange:q,triggerPointerDownPosRef:H}=m;t.useEffect(()=>{if(p){let g={x:0,y:0};const N=x(P=>{var w,b;g={x:Math.abs(Math.round(P.pageX)-(((w=H.current)==null?void 0:w.x)??0)),y:Math.abs(Math.round(P.pageY)-(((b=H.current)==null?void 0:b.y)??0))}},"handlePointerMove"),O=x(P=>{g.x<=10&&g.y<=10?P.preventDefault():P.composedPath().includes(p)||q(!1),document.removeEventListener("pointermove",N),H.current=null},"handlePointerUp");return H.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[p,q,H]),t.useEffect(()=>{const g=x(()=>q(!1),"close");return window.addEventListener("blur",g),window.addEventListener("resize",g),()=>{window.removeEventListener("blur",g),window.removeEventListener("resize",g)}},[q]);const[ae,D]=be(g=>{const N=K().filter(w=>!w.disabled),O=N.find(w=>w.ref.current===document.activeElement),P=Ie(N,g,O);P&&setTimeout(()=>{var w;return(w=P.ref.current)==null?void 0:w.focus()})}),F=t.useCallback((g,N,O)=>{const P=!V.current&&!O;(m.value!==void 0&&m.value===N||P)&&(Q(g),P&&(V.current=!0))},[m.value]),le=t.useCallback(()=>p==null?void 0:p.focus(),[p]),ce=t.useCallback((g,N,O)=>{const P=!V.current&&!O;(m.value!==void 0&&m.value===N||P)&&W(g)},[m.value]),pe=u==="popper"?Ne:zt,de=pe===Ne?{side:l,sideOffset:a,align:S,alignOffset:v,arrowPadding:C,collisionBoundary:I,collisionPadding:T,sticky:R,hideWhenDetached:d,avoidCollisions:h}:{};return n.jsx(We,{scope:o,content:p,viewport:E,onViewportChange:J,itemRefCallback:F,selectedItem:B,onItemLeave:le,itemTextRefCallback:ce,focusSelectedItem:Y,selectedItemText:z,position:u,isPositioned:ee,searchRef:ae,children:n.jsx(ct,{as:Kt,allowPinchZoom:!0,children:n.jsx(it,{asChild:!0,trapped:m.open,onMountAutoFocus:g=>{g.preventDefault()},onUnmountAutoFocus:j(i,g=>{var N;(N=m.trigger)==null||N.focus({preventScroll:!0}),g.preventDefault()}),children:n.jsx(dt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:n.jsx(pe,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:g=>g.preventDefault(),...y,...de,onPlaced:()=>$(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:j(y.onKeyDown,g=>{const N=g.ctrlKey||g.altKey||g.metaKey;if(g.key==="Tab"&&g.preventDefault(),!N&&g.key.length===1&&D(g.key),["ArrowUp","ArrowDown","Home","End"].includes(g.key)){let P=K().filter(w=>!w.disabled).map(w=>w.ref.current);if(["ArrowUp","End"].includes(g.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(g.key)){const w=g.target,b=P.indexOf(w);P=P.slice(b+1)}setTimeout(()=>G(P)),g.preventDefault()}})})})})})})},"SelectContentImpl")),zt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,onPlaced:u,...i}=e,f=Z(ne,o),c=se(ne,o),[l,a]=t.useState(null),[S,v]=t.useState(null),C=U(r,v),I=he(o),T=t.useRef(!1),R=t.useRef(!0),{viewport:d,selectedItem:h,selectedItemText:y,focusSelectedItem:m}=c,p=t.useCallback(()=>{if(f.trigger&&f.valueNode&&l&&S&&d&&h&&y){const k=f.trigger.getBoundingClientRect(),B=S.getBoundingClientRect(),Q=f.valueNode.getBoundingClientRect(),z=y.getBoundingClientRect();if(f.dir!=="rtl"){const w=z.left-B.left,b=Q.left-w,te=k.left-b,oe=k.width+te,ge=Math.max(oe,B.width),Se=window.innerWidth-A,xe=Pe(b,[A,Math.max(A,Se-ge)]);l.style.minWidth=oe+"px",l.style.left=xe+"px"}else{const w=B.right-z.right,b=window.innerWidth-Q.right-w,te=window.innerWidth-k.right-b,oe=k.width+te,ge=Math.max(oe,B.width),Se=window.innerWidth-A,xe=Pe(b,[A,Math.max(A,Se-ge)]);l.style.minWidth=oe+"px",l.style.right=xe+"px"}const W=I(),K=window.innerHeight-A*2,ee=d.scrollHeight,$=window.getComputedStyle(S),V=parseInt($.borderTopWidth,10),G=parseInt($.paddingTop,10),Y=parseInt($.borderBottomWidth,10),q=parseInt($.paddingBottom,10),H=V+G+ee+q+Y,ae=Math.min(h.offsetHeight*5,H),D=window.getComputedStyle(d),F=parseInt(D.paddingTop,10),le=parseInt(D.paddingBottom,10),ce=k.top+k.height/2-A,pe=K-ce,de=h.offsetHeight/2,g=h.offsetTop+de,N=V+G+g,O=H-N;if(N<=ce){const w=W.length>0&&h===W[W.length-1].ref.current;l.style.bottom="0px";const b=S.clientHeight-d.offsetTop-d.offsetHeight,te=Math.max(pe,de+(w?le:0)+b+Y),oe=N+te;l.style.height=oe+"px"}else{const w=W.length>0&&h===W[0].ref.current;l.style.top="0px";const te=Math.max(ce,V+d.offsetTop+(w?F:0)+de)+O;l.style.height=te+"px",d.scrollTop=N-ce+d.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=ae+"px",l.style.maxHeight=K+"px",u==null||u(),requestAnimationFrame(()=>T.current=!0)}},[I,f.trigger,f.valueNode,l,S,d,h,y,f.dir,u]);X(()=>p(),[p]);const[_,E]=t.useState();X(()=>{S&&E(window.getComputedStyle(S).zIndex)},[S]);const J=t.useCallback(k=>{k&&R.current===!0&&(p(),m==null||m(),R.current=!1)},[p,m]);return n.jsx(Gt,{scope:o,contentWrapper:l,shouldExpandOnScrollRef:T,onScrollButtonChange:J,children:n.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:n.jsx(L.div,{...i,ref:C,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),Ne=t.forwardRef(x(function(e,r){const{__scopeSelect:o,align:u="start",collisionPadding:i=A,...f}=e,c=ye(o);return n.jsx(ft,{...c,...f,ref:r,align:u,collisionPadding:i,style:{boxSizing:"border-box",...f.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)"}})},"SelectPopperPosition")),[Gt,Ce]=re(ne,{}),Re="SelectViewport",Yt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,nonce:u,...i}=e,f=se(Re,o),c=Ce(Re,o),l=U(r,f.onViewportChange),a=t.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:u}),n.jsx(me.Slot,{scope:o,children:n.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:j(i.onScroll,S=>{const v=S.currentTarget,{contentWrapper:C,shouldExpandOnScrollRef:I}=c;if(I!=null&&I.current&&C){const T=Math.abs(a.current-v.scrollTop);if(T>0){const R=window.innerHeight-A*2,d=parseFloat(C.style.minHeight),h=parseFloat(C.style.height),y=Math.max(d,h);if(y<R){const m=y+T,p=Math.min(R,m),_=m-p;C.style.height=p+"px",C.style.bottom==="0px"&&(v.scrollTop=_>0?_:0,C.style.justifyContent="flex-end")}}}a.current=v.scrollTop})})})]})},"SelectViewport")),qt="SelectGroup",[So,Xt]=re(qt),Zt="SelectLabel",Ke=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e,i=Xt(Zt,o);return n.jsx(L.div,{id:i.id,...u,ref:r})},"SelectLabel")),ve="SelectItem",[Jt,$e]=re(ve),ze=t.forwardRef(x(function(e,r){const{__scopeSelect:o,value:u,disabled:i=!1,textValue:f,...c}=e,l=Z(ve,o),a=se(ve,o),S=l.value===u,[v,C]=t.useState(f??""),[I,T]=t.useState(!1),R=we(p=>{var _;return(_=a.itemRefCallback)==null?void 0:_.call(a,p,u,i)}),d=U(r,R),h=De(),y=t.useRef("touch"),m=x(()=>{i||(l.onValueChange(u),l.onOpenChange(!1))},"handleSelect");return n.jsx(Jt,{scope:o,value:u,disabled:i,textId:h,isSelected:S,onItemTextChange:t.useCallback(p=>{C(_=>_||((p==null?void 0:p.textContent)??"").trim())},[]),children:n.jsx(me.ItemSlot,{scope:o,value:u,disabled:i,textValue:v,children:n.jsx(L.div,{role:"option","aria-labelledby":h,"data-highlighted":I?"":void 0,"aria-selected":S&&I,"data-state":S?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...c,ref:d,onFocus:j(c.onFocus,()=>T(!0)),onBlur:j(c.onBlur,()=>T(!1)),onClick:j(c.onClick,()=>{y.current!=="mouse"&&m()}),onPointerUp:j(c.onPointerUp,()=>{y.current==="mouse"&&m()}),onPointerDown:j(c.onPointerDown,p=>{y.current=p.pointerType}),onPointerMove:j(c.onPointerMove,p=>{var _;y.current=p.pointerType,i?(_=a.onItemLeave)==null||_.call(a):y.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(c.onPointerLeave,p=>{var _;p.currentTarget===document.activeElement&&((_=a.onItemLeave)==null||_.call(a))}),onKeyDown:j(c.onKeyDown,p=>{var E;i||p.target!==p.currentTarget||((E=a.searchRef)==null?void 0:E.current)!==""&&p.key===" "||(_t.includes(p.key)&&m(),p.key===" "&&p.preventDefault())})})})})},"SelectItem")),fe="SelectItemText",Qt=t.forwardRef(x(function(e,r){const{__scopeSelect:o,className:u,style:i,...f}=e,c=Z(fe,o),l=se(fe,o),a=$e(fe,o),S=Mt(fe,o),[v,C]=t.useState(null),I=we(m=>{var p;return(p=l.itemTextRefCallback)==null?void 0:p.call(l,m,a.value,a.disabled)}),T=U(r,C,a.onItemTextChange,I),R=v==null?void 0:v.textContent,d=t.useMemo(()=>n.jsx("option",{value:a.value,disabled:a.disabled,children:R},a.value),[a.disabled,a.value,R]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=S;return X(()=>(h(d),()=>y(d)),[h,y,d]),n.jsxs(n.Fragment,{children:[n.jsx(L.span,{id:a.textId,...f,ref:T}),a.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!ue(c.value)?Me.createPortal(f.children,c.valueNode):null]})},"SelectItemText")),eo="SelectItemIndicator",to=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e;return $e(eo,o).isSelected?n.jsx(L.span,{"aria-hidden":!0,...u,ref:r}):null},"SelectItemIndicator")),_e="SelectScrollUpButton",Ge=t.forwardRef(x(function(e,r){const o=se(_e,e.__scopeSelect),u=Ce(_e,e.__scopeSelect),[i,f]=t.useState(!1),c=U(r,u.onScrollButtonChange);return X(()=>{if(o.viewport&&o.isPositioned){let l=function(){const S=a.scrollTop>0;f(S)};x(l,"handleScroll");const a=o.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),i?n.jsx(qe,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=o;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null},"SelectScrollUpButton")),Ee="SelectScrollDownButton",Ye=t.forwardRef(x(function(e,r){const o=se(Ee,e.__scopeSelect),u=Ce(Ee,e.__scopeSelect),[i,f]=t.useState(!1),c=U(r,u.onScrollButtonChange);return X(()=>{if(o.viewport&&o.isPositioned){let l=function(){const S=a.scrollHeight-a.clientHeight,v=Math.ceil(a.scrollTop)<S;f(v)};x(l,"handleScroll");const a=o.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),i?n.jsx(qe,{...e,ref:c,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=o;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null},"SelectScrollDownButton")),qe=t.forwardRef(x(function(e,r){const{__scopeSelect:o,onAutoScroll:u,...i}=e,f=se("SelectScrollButton",o),c=t.useRef(null),l=he(o),a=t.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return t.useEffect(()=>()=>a(),[a]),X(()=>{var v;const S=l().find(C=>C.ref.current===document.activeElement);(v=S==null?void 0:S.ref.current)==null||v.scrollIntoView({block:"nearest"})},[l]),n.jsx(L.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:j(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(u,50))}),onPointerMove:j(i.onPointerMove,()=>{var S;(S=f.onItemLeave)==null||S.call(f),c.current===null&&(c.current=window.setInterval(u,50))}),onPointerLeave:j(i.onPointerLeave,()=>{a()})})},"SelectScrollButtonImpl")),Xe=t.forwardRef(x(function(e,r){const{__scopeSelect:o,...u}=e;return n.jsx(L.div,{"aria-hidden":!0,...u,ref:r})},"SelectSeparator")),oo="SelectBubbleInput",no=t.forwardRef(x(function({__scopeSelect:e,...r},o){const u=Z(oo,e),{value:i,onValueChange:f,required:c,disabled:l,name:a,autoComplete:S,form:v}=u,{nativeOptions:C,nativeSelectKey:I}=u,T=t.useRef(null),R=U(o,T),d=i??"",h=Pt(d),y=Array.from(C).some(m=>(m.props.value??"")==="");return t.useEffect(()=>{const m=T.current;if(!m)return;const p=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(p,"value").set;if(h!==d&&E){const J=new Event("change",{bubbles:!0});E.call(m,d),m.dispatchEvent(J)}},[h,d]),n.jsxs(L.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:a,autoComplete:S,disabled:l,form:v,onChange:m=>f(m.target.value),...r,style:{...mt,...r.style},ref:R,defaultValue:d,children:[ue(i)&&!y?n.jsx("option",{value:""}):null,Array.from(C)]},I)},"SelectBubbleInput"));function Ze(s){return typeof s=="function"}x(Ze,"isFunction");function ue(s){return s===""||s===void 0}x(ue,"shouldShowPlaceholder");function be(s){const e=we(s),r=t.useRef(""),o=t.useRef(0),u=t.useCallback(f=>{const c=r.current+f;e(c),x((function l(a){r.current=a,window.clearTimeout(o.current),a!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}),"updateSearch")(c)},[e]),i=t.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,u,i]}x(be,"useTypeaheadSearch");function Ie(s,e,r){const u=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,i=r?s.indexOf(r):-1;let f=Je(s,Math.max(i,0));u.length===1&&(f=f.filter(a=>a!==r));const l=f.find(a=>a.textValue.toLowerCase().startsWith(u.toLowerCase()));return l!==r?l:void 0}x(Ie,"findNextItem");function Je(s,e){return s.map((r,o)=>s[(e+o)%s.length])}x(Je,"wrapArray");const xo=Ot,vo=At,ro=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(Fe,{ref:o,className:M("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...r,children:[e,n.jsx(Bt,{asChild:!0,children:n.jsx(Ve,{className:"h-4 w-4 opacity-50"})})]}));ro.displayName=Fe.displayName;const Qe=t.forwardRef(({className:s,...e},r)=>n.jsx(Ge,{ref:r,className:M("flex cursor-default items-center justify-center py-1",s),...e,children:n.jsx(Tt,{className:"h-4 w-4"})}));Qe.displayName=Ge.displayName;const et=t.forwardRef(({className:s,...e},r)=>n.jsx(Ye,{ref:r,className:M("flex cursor-default items-center justify-center py-1",s),...e,children:n.jsx(Ve,{className:"h-4 w-4"})}));et.displayName=Ye.displayName;const so=t.forwardRef(({className:s,children:e,position:r="popper",...o},u)=>n.jsx(Ut,{children:n.jsxs(Ue,{ref:u,className:M("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:r,...o,children:[n.jsx(Qe,{}),n.jsx(Yt,{className:M("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),n.jsx(et,{})]})}));so.displayName=Ue.displayName;const ao=t.forwardRef(({className:s,...e},r)=>n.jsx(Ke,{ref:r,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...e}));ao.displayName=Ke.displayName;const lo=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(ze,{ref:o,className:M("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...r,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(to,{children:n.jsx(St,{className:"h-4 w-4"})})}),n.jsx(Qt,{children:e})]}));lo.displayName=ze.displayName;const co=t.forwardRef(({className:s,...e},r)=>n.jsx(Xe,{ref:r,className:M("-mx-1 my-1 h-px bg-muted",s),...e}));co.displayName=Xe.displayName;const wo=xt,yo=vt,io=wt,tt=t.forwardRef(({className:s,...e},r)=>n.jsx(Ae,{ref:r,className:M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...e}));tt.displayName=Ae.displayName;const uo=t.forwardRef(({className:s,children:e,...r},o)=>n.jsxs(io,{children:[n.jsx(tt,{}),n.jsxs(ke,{ref:o,className:M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...r,children:[e,n.jsxs(yt,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[n.jsx(Ct,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));uo.displayName=ke.displayName;const po=({className:s,...e})=>n.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",s),...e});po.displayName="DialogHeader";const fo=({className:s,...e})=>n.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...e});fo.displayName="DialogFooter";const mo=t.forwardRef(({className:s,...e},r)=>n.jsx(Le,{ref:r,className:M("text-lg font-semibold leading-none tracking-tight",s),...e}));mo.displayName=Le.displayName;const ho=t.forwardRef(({className:s,...e},r)=>n.jsx(Be,{ref:r,className:M("text-sm text-muted-foreground",s),...e}));ho.displayName=Be.displayName;export{Ve as C,wo as D,xo as S,uo as a,ho as b,fo as c,po as d,mo as e,yo as f,so as g,lo as h,ro as i,vo as j,Pe as k};