@tapflowio/relay 0.9.0 → 0.9.2

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 (98) hide show
  1. package/dist/RelayServer.d.ts +1 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +38 -16
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/SessionManager.d.ts +12 -1
  6. package/dist/SessionManager.d.ts.map +1 -1
  7. package/dist/SessionManager.js +19 -1
  8. package/dist/SessionManager.js.map +1 -1
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/config.d.ts +1 -0
  14. package/dist/lib/config.d.ts.map +1 -1
  15. package/dist/lib/config.js +12 -3
  16. package/dist/lib/config.js.map +1 -1
  17. package/dist/lib/loadEnvFile.d.ts.map +1 -1
  18. package/dist/lib/loadEnvFile.js +3 -1
  19. package/dist/lib/loadEnvFile.js.map +1 -1
  20. package/dist/lib/tlsTasks.d.ts +13 -0
  21. package/dist/lib/tlsTasks.d.ts.map +1 -0
  22. package/dist/lib/tlsTasks.js +21 -0
  23. package/dist/lib/tlsTasks.js.map +1 -0
  24. package/dist/server.js +8 -16
  25. package/dist/server.js.map +1 -1
  26. package/dist/types.d.ts +1 -0
  27. package/dist/types.d.ts.map +1 -1
  28. package/package.json +7 -7
  29. package/public/assets/AppCenter-DMBOeAOk.js +16 -0
  30. package/public/assets/AppCenter-DMBOeAOk.js.br +0 -0
  31. package/public/assets/{Default-DQiKj0NT.js → Default-CNIOwJix.js} +1 -1
  32. package/public/assets/Default-CNIOwJix.js.br +0 -0
  33. package/public/assets/{Invite-B4MMcQtw.js → Invite-CxAak0QY.js} +1 -1
  34. package/public/assets/Invite-CxAak0QY.js.br +0 -0
  35. package/public/assets/{MacResources-BfZAJ5BP.js → MacResources-BkDhO6IY.js} +1 -1
  36. package/public/assets/MacResources-BkDhO6IY.js.br +0 -0
  37. package/public/assets/{NotFound-D85RKzwv.js → NotFound-C_RPjQyM.js} +1 -1
  38. package/public/assets/NotFound-C_RPjQyM.js.br +0 -0
  39. package/public/assets/QASession-BI0UoxxZ.js +130 -0
  40. package/public/assets/QASession-BI0UoxxZ.js.br +0 -0
  41. package/public/assets/{ResetPassword-Degmb6sl.js → ResetPassword-B3B1vO7t.js} +1 -1
  42. package/public/assets/ResetPassword-B3B1vO7t.js.br +0 -0
  43. package/public/assets/{Setup-DKOFxDo2.js → Setup-DAK5iAZn.js} +1 -1
  44. package/public/assets/Setup-DAK5iAZn.js.br +0 -0
  45. package/public/assets/Team-DwGH3nTh.js +6 -0
  46. package/public/assets/Team-DwGH3nTh.js.br +0 -0
  47. package/public/assets/Tokens-DHSzYss8.js +6 -0
  48. package/public/assets/Tokens-DHSzYss8.js.br +0 -0
  49. package/public/assets/alert-dialog-C9JkZxpw.js +1 -0
  50. package/public/assets/alert-dialog-C9JkZxpw.js.br +0 -0
  51. package/public/assets/{badge-Cktrrdvf.js → badge-C4QfN3hf.js} +1 -1
  52. package/public/assets/badge-C4QfN3hf.js.br +0 -0
  53. package/public/assets/build-format-Dgn-J3If.js +11 -0
  54. package/public/assets/build-format-Dgn-J3If.js.br +0 -0
  55. package/public/assets/dialog-BDl6uCtr.js +11 -0
  56. package/public/assets/dialog-BDl6uCtr.js.br +0 -0
  57. package/public/assets/index-BgHk9cIy.js +274 -0
  58. package/public/assets/index-BgHk9cIy.js.br +0 -0
  59. package/public/assets/pencil-Fy1ryeVj.js +6 -0
  60. package/public/assets/pencil-Fy1ryeVj.js.br +0 -0
  61. package/public/assets/plus-Ni9nU3x4.js +6 -0
  62. package/public/assets/plus-Ni9nU3x4.js.br +0 -0
  63. package/public/assets/{table-NBRnBazr.js → table-DAingeQp.js} +1 -1
  64. package/public/assets/table-DAingeQp.js.br +0 -0
  65. package/public/assets/tabs-BCSJZGsw.js +1 -0
  66. package/public/assets/tabs-BCSJZGsw.js.br +0 -0
  67. package/public/index.html +1 -1
  68. package/public/index.html.br +0 -0
  69. package/public/assets/AppCenter-CaY73Tvf.js +0 -16
  70. package/public/assets/AppCenter-CaY73Tvf.js.br +0 -0
  71. package/public/assets/Default-DQiKj0NT.js.br +0 -0
  72. package/public/assets/Invite-B4MMcQtw.js.br +0 -0
  73. package/public/assets/MacResources-BfZAJ5BP.js.br +0 -0
  74. package/public/assets/NotFound-D85RKzwv.js.br +0 -0
  75. package/public/assets/QASession-B9FSUtZo.js +0 -130
  76. package/public/assets/QASession-B9FSUtZo.js.br +0 -0
  77. package/public/assets/ResetPassword-Degmb6sl.js.br +0 -0
  78. package/public/assets/Setup-DKOFxDo2.js.br +0 -0
  79. package/public/assets/Team-Bgspan2B.js +0 -6
  80. package/public/assets/Team-Bgspan2B.js.br +0 -0
  81. package/public/assets/Tokens-C3u48FUG.js +0 -6
  82. package/public/assets/Tokens-C3u48FUG.js.br +0 -0
  83. package/public/assets/alert-dialog-Ci_cWoVo.js +0 -7
  84. package/public/assets/alert-dialog-Ci_cWoVo.js.br +0 -0
  85. package/public/assets/badge-Cktrrdvf.js.br +0 -0
  86. package/public/assets/build-format-Blzidb1D.js +0 -11
  87. package/public/assets/build-format-Blzidb1D.js.br +0 -0
  88. package/public/assets/dialog-BuZjQWBQ.js +0 -11
  89. package/public/assets/dialog-BuZjQWBQ.js.br +0 -0
  90. package/public/assets/index-ClAB0eKw.js +0 -258
  91. package/public/assets/index-ClAB0eKw.js.br +0 -0
  92. package/public/assets/pencil-BoxokH2R.js +0 -6
  93. package/public/assets/pencil-BoxokH2R.js.br +0 -0
  94. package/public/assets/plus-C0Y4Yk9P.js +0 -6
  95. package/public/assets/plus-C0Y4Yk9P.js.br +0 -0
  96. package/public/assets/table-NBRnBazr.js.br +0 -0
  97. package/public/assets/tabs-CB9a8dpY.js +0 -1
  98. package/public/assets/tabs-CB9a8dpY.js.br +0 -0
@@ -1,11 +0,0 @@
1
- import{Z as i,a6 as r,I as o}from"./index-ClAB0eKw.js";/**
2
- * @license lucide-react v0.468.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 d=i("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
7
- * @license lucide-react v0.468.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 c=i("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function p({value:e,onChange:a,placeholder:t,className:n}){return r.jsxs("div",{className:"relative",children:[r.jsx(c,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),r.jsx(o,{placeholder:t,value:e,onChange:s=>a(s.target.value),className:`h-8 pl-8 ${n??"w-48"}`})]})}async function f(){const e=await fetch("/api/v1/apps",{credentials:"include"});return e.ok?(await e.json()).items:[]}async function m({appId:e,search:a,statusFilter:t}){const n=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});a&&n.set("q",a),t&&t!=="all"&&n.set("status",t);const s=await fetch(`/api/v1/builds?${n}`,{credentials:"include"});return s.ok?(await s.json()).items:[]}async function h(e){const a=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return a.status===409?{error:"App with this bundle ID and platform already exists"}:a.ok?a.json():null}async function y(e,a){await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:a})})}async function b(e){const a=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return a.ok?a.json():null}function g(e){const a=new Map;for(const t of e){const n=t.version_name??"Unversioned";a.has(n)||a.set(n,[]),a.get(n).push(t)}return Array.from(a.entries()).map(([t,n])=>({versionName:t,builds:n}))}const v={Backlog:"backlog","In Progress":"progress",Done:"done",Rejected:"rejected"};function j(e){return e.version_name&&e.build_number?`${e.version_name} · build ${e.build_number}`:e.version_name??e.version_label??(e.build_number?`build ${e.build_number}`:"Build")}export{d as P,v as S,c as a,p as b,j as c,h as d,b as e,m as f,f as g,g as h,y as u};
@@ -1,11 +0,0 @@
1
- import{Z as Re,a9 as n,ai as St,ah as Te,a6 as r,t as wt,al as Ne,ag as B,am as G,q as D,$ as Pe,N as yt,V as Ct,A as Nt,K as R,P as bt,a8 as Ee,Q as Tt,af as It,a5 as Rt,aj as Pt,R as Et,F as _t,l as jt,a1 as Dt,i as Mt,a as At,J as _,f as Ot,s as kt,z as Lt,o as Bt,j as _e,h as Vt,X as Ht,T as je,O as De,D as Me}from"./index-ClAB0eKw.js";/**
2
- * @license lucide-react v0.468.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 Ae=Re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
7
- * @license lucide-react v0.468.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 Ft=Re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function Ie(t,[o,e]){return Math.min(e,Math.max(o,t))}function Ut(t){const o=n.useRef({value:t,previous:t});return n.useMemo(()=>(o.current.value!==t&&(o.current.previous=o.current.value,o.current.value=t),o.current.previous),[t])}var Wt=[" ","Enter","ArrowUp","ArrowDown"],Kt=[" ","Enter"],Q="Select",[ce,de,zt]=yt(Q),[oe]=Tt(Q,[zt,Pe]),ue=Pe(),[$t,Y]=oe(Q),[Gt,Yt]=oe(Q),Oe=t=>{const{__scopeSelect:o,children:e,open:s,defaultOpen:c,onOpenChange:p,value:l,defaultValue:i,onValueChange:a,dir:f,name:v,autoComplete:w,disabled:T,required:I,form:b}=t,d=ue(o),[g,y]=n.useState(null),[u,h]=n.useState(null),[M,A]=n.useState(!1),ne=St(f),[P,k]=Te({prop:s,defaultProp:c??!1,onChange:p,caller:Q}),[K,X]=Te({prop:l,defaultProp:i,onChange:a,caller:Q}),V=n.useRef(null),H=g?b||!!g.closest("form"):!0,[z,F]=n.useState(new Set),U=Array.from(z).map(E=>E.props.value).join(";");return r.jsx(wt,{...d,children:r.jsxs($t,{required:I,scope:o,trigger:g,onTriggerChange:y,valueNode:u,onValueNodeChange:h,valueNodeHasChildren:M,onValueNodeHasChildrenChange:A,contentId:Ne(),value:K,onValueChange:X,open:P,onOpenChange:k,dir:ne,triggerPointerDownPosRef:V,disabled:T,children:[r.jsx(ce.Provider,{scope:o,children:r.jsx(Gt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(E=>{F(L=>new Set(L).add(E))},[]),onNativeOptionRemove:n.useCallback(E=>{F(L=>{const W=new Set(L);return W.delete(E),W})},[]),children:e})}),H?r.jsxs(st,{"aria-hidden":!0,required:I,tabIndex:-1,name:v,autoComplete:w,value:K,onChange:E=>X(E.target.value),disabled:T,form:b,children:[K===void 0?r.jsx("option",{value:""}):null,Array.from(z)]},U):null]})})};Oe.displayName=Q;var ke="SelectTrigger",Le=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:s=!1,...c}=t,p=ue(e),l=Y(ke,e),i=l.disabled||s,a=B(o,l.onTriggerChange),f=de(e),v=n.useRef("touch"),[w,T,I]=lt(d=>{const g=f().filter(h=>!h.disabled),y=g.find(h=>h.value===l.value),u=it(g,d,y);u!==void 0&&l.onValueChange(u.value)}),b=d=>{i||(l.onOpenChange(!0),I()),d&&(l.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return r.jsx(Nt,{asChild:!0,...p,children:r.jsx(D.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":at(l.value)?"":void 0,...c,ref:a,onClick:R(c.onClick,d=>{d.currentTarget.focus(),v.current!=="mouse"&&b(d)}),onPointerDown:R(c.onPointerDown,d=>{v.current=d.pointerType;const g=d.target;g.hasPointerCapture(d.pointerId)&&g.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:R(c.onKeyDown,d=>{const g=w.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&T(d.key),!(g&&d.key===" ")&&Wt.includes(d.key)&&(b(),d.preventDefault())})})})});Le.displayName=ke;var Be="SelectValue",Ve=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:c,children:p,placeholder:l="",...i}=t,a=Y(Be,e),{onValueNodeHasChildrenChange:f}=a,v=p!==void 0,w=B(o,a.onValueNodeChange);return G(()=>{f(v)},[f,v]),r.jsx(D.span,{...i,ref:w,style:{pointerEvents:"none"},children:at(a.value)?r.jsx(r.Fragment,{children:l}):p})});Ve.displayName=Be;var qt="SelectIcon",He=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,...c}=t;return r.jsx(D.span,{"aria-hidden":!0,...c,ref:o,children:s||"▼"})});He.displayName=qt;var Xt="SelectPortal",Fe=t=>r.jsx(bt,{asChild:!0,...t});Fe.displayName=Xt;var ee="SelectContent",Ue=n.forwardRef((t,o)=>{const e=Y(ee,t.__scopeSelect),[s,c]=n.useState();if(G(()=>{c(new DocumentFragment)},[]),!e.open){const p=s;return p?Ee.createPortal(r.jsx(We,{scope:t.__scopeSelect,children:r.jsx(ce.Slot,{scope:t.__scopeSelect,children:r.jsx("div",{children:t.children})})}),p):null}return r.jsx(Ke,{...t,ref:o})});Ue.displayName=ee;var O=10,[We,q]=oe(ee),Zt="SelectContentImpl",Jt=Dt("SelectContent.RemoveScroll"),Ke=n.forwardRef((t,o)=>{const{__scopeSelect:e,position:s="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:p,onPointerDownOutside:l,side:i,sideOffset:a,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:T,collisionPadding:I,sticky:b,hideWhenDetached:d,avoidCollisions:g,...y}=t,u=Y(ee,e),[h,M]=n.useState(null),[A,ne]=n.useState(null),P=B(o,m=>M(m)),[k,K]=n.useState(null),[X,V]=n.useState(null),H=de(e),[z,F]=n.useState(!1),U=n.useRef(!1);n.useEffect(()=>{if(h)return Rt(h)},[h]),Pt();const E=n.useCallback(m=>{const[N,...j]=H().map(S=>S.ref.current),[C]=j.slice(-1),x=document.activeElement;for(const S of m)if(S===x||(S==null||S.scrollIntoView({block:"nearest"}),S===N&&A&&(A.scrollTop=0),S===C&&A&&(A.scrollTop=A.scrollHeight),S==null||S.focus(),document.activeElement!==x))return},[H,A]),L=n.useCallback(()=>E([k,h]),[E,k,h]);n.useEffect(()=>{z&&L()},[z,L]);const{onOpenChange:W,triggerPointerDownPosRef:$}=u;n.useEffect(()=>{if(h){let m={x:0,y:0};const N=C=>{var x,S;m={x:Math.abs(Math.round(C.pageX)-(((x=$.current)==null?void 0:x.x)??0)),y:Math.abs(Math.round(C.pageY)-(((S=$.current)==null?void 0:S.y)??0))}},j=C=>{m.x<=10&&m.y<=10?C.preventDefault():h.contains(C.target)||W(!1),document.removeEventListener("pointermove",N),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",j,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",j,{capture:!0})}}},[h,W,$]),n.useEffect(()=>{const m=()=>W(!1);return window.addEventListener("blur",m),window.addEventListener("resize",m),()=>{window.removeEventListener("blur",m),window.removeEventListener("resize",m)}},[W]);const[pe,ae]=lt(m=>{const N=H().filter(x=>!x.disabled),j=N.find(x=>x.ref.current===document.activeElement),C=it(N,m,j);C&&setTimeout(()=>C.ref.current.focus())}),fe=n.useCallback((m,N,j)=>{const C=!U.current&&!j;(u.value!==void 0&&u.value===N||C)&&(K(m),C&&(U.current=!0))},[u.value]),me=n.useCallback(()=>h==null?void 0:h.focus(),[h]),te=n.useCallback((m,N,j)=>{const C=!U.current&&!j;(u.value!==void 0&&u.value===N||C)&&V(m)},[u.value]),le=s==="popper"?xe:ze,re=le===xe?{side:i,sideOffset:a,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:T,collisionPadding:I,sticky:b,hideWhenDetached:d,avoidCollisions:g}:{};return r.jsx(We,{scope:e,content:h,viewport:A,onViewportChange:ne,itemRefCallback:fe,selectedItem:k,onItemLeave:me,itemTextRefCallback:te,focusSelectedItem:L,selectedItemText:X,position:s,isPositioned:z,searchRef:pe,children:r.jsx(Et,{as:Jt,allowPinchZoom:!0,children:r.jsx(_t,{asChild:!0,trapped:u.open,onMountAutoFocus:m=>{m.preventDefault()},onUnmountAutoFocus:R(c,m=>{var N;(N=u.trigger)==null||N.focus({preventScroll:!0}),m.preventDefault()}),children:r.jsx(jt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:()=>u.onOpenChange(!1),children:r.jsx(le,{role:"listbox",id:u.contentId,"data-state":u.open?"open":"closed",dir:u.dir,onContextMenu:m=>m.preventDefault(),...y,...re,onPlaced:()=>F(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,m=>{const N=m.ctrlKey||m.altKey||m.metaKey;if(m.key==="Tab"&&m.preventDefault(),!N&&m.key.length===1&&ae(m.key),["ArrowUp","ArrowDown","Home","End"].includes(m.key)){let C=H().filter(x=>!x.disabled).map(x=>x.ref.current);if(["ArrowUp","End"].includes(m.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(m.key)){const x=m.target,S=C.indexOf(x);C=C.slice(S+1)}setTimeout(()=>E(C)),m.preventDefault()}})})})})})})});Ke.displayName=Zt;var Qt="SelectItemAlignedPosition",ze=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:s,...c}=t,p=Y(ee,e),l=q(ee,e),[i,a]=n.useState(null),[f,v]=n.useState(null),w=B(o,P=>v(P)),T=de(e),I=n.useRef(!1),b=n.useRef(!0),{viewport:d,selectedItem:g,selectedItemText:y,focusSelectedItem:u}=l,h=n.useCallback(()=>{if(p.trigger&&p.valueNode&&i&&f&&d&&g&&y){const P=p.trigger.getBoundingClientRect(),k=f.getBoundingClientRect(),K=p.valueNode.getBoundingClientRect(),X=y.getBoundingClientRect();if(p.dir!=="rtl"){const x=X.left-k.left,S=K.left-x,Z=P.left-S,J=P.width+Z,he=Math.max(J,k.width),ge=window.innerWidth-O,ve=Ie(S,[O,Math.max(O,ge-he)]);i.style.minWidth=J+"px",i.style.left=ve+"px"}else{const x=k.right-X.right,S=window.innerWidth-K.right-x,Z=window.innerWidth-P.right-S,J=P.width+Z,he=Math.max(J,k.width),ge=window.innerWidth-O,ve=Ie(S,[O,Math.max(O,ge-he)]);i.style.minWidth=J+"px",i.style.right=ve+"px"}const V=T(),H=window.innerHeight-O*2,z=d.scrollHeight,F=window.getComputedStyle(f),U=parseInt(F.borderTopWidth,10),E=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),W=parseInt(F.paddingBottom,10),$=U+E+z+W+L,pe=Math.min(g.offsetHeight*5,$),ae=window.getComputedStyle(d),fe=parseInt(ae.paddingTop,10),me=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-O,le=H-te,re=g.offsetHeight/2,m=g.offsetTop+re,N=U+E+m,j=$-N;if(N<=te){const x=V.length>0&&g===V[V.length-1].ref.current;i.style.bottom="0px";const S=f.clientHeight-d.offsetTop-d.offsetHeight,Z=Math.max(le,re+(x?me:0)+S+L),J=N+Z;i.style.height=J+"px"}else{const x=V.length>0&&g===V[0].ref.current;i.style.top="0px";const Z=Math.max(te,U+d.offsetTop+(x?fe:0)+re)+j;i.style.height=Z+"px",d.scrollTop=N-te+d.offsetTop}i.style.margin=`${O}px 0`,i.style.minHeight=pe+"px",i.style.maxHeight=H+"px",s==null||s(),requestAnimationFrame(()=>I.current=!0)}},[T,p.trigger,p.valueNode,i,f,d,g,y,p.dir,s]);G(()=>h(),[h]);const[M,A]=n.useState();G(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const ne=n.useCallback(P=>{P&&b.current===!0&&(h(),u==null||u(),b.current=!1)},[h,u]);return r.jsx(to,{scope:e,contentWrapper:i,shouldExpandOnScrollRef:I,onScrollButtonChange:ne,children:r.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:r.jsx(D.div,{...c,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});ze.displayName=Qt;var eo="SelectPopperPosition",xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:s="start",collisionPadding:c=O,...p}=t,l=ue(e);return r.jsx(Mt,{...l,...p,ref:o,align:s,collisionPadding:c,style:{boxSizing:"border-box",...p.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)"}})});xe.displayName=eo;var[to,be]=oe(ee,{}),Se="SelectViewport",$e=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:s,...c}=t,p=q(Se,e),l=be(Se,e),i=B(o,p.onViewportChange),a=n.useRef(0);return r.jsxs(r.Fragment,{children:[r.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:s}),r.jsx(ce.Slot,{scope:e,children:r.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:R(c.onScroll,f=>{const v=f.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:T}=l;if(T!=null&&T.current&&w){const I=Math.abs(a.current-v.scrollTop);if(I>0){const b=window.innerHeight-O*2,d=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),y=Math.max(d,g);if(y<b){const u=y+I,h=Math.min(b,u),M=u-h;w.style.height=h+"px",w.style.bottom==="0px"&&(v.scrollTop=M>0?M:0,w.style.justifyContent="flex-end")}}}a.current=v.scrollTop})})})]})});$e.displayName=Se;var Ge="SelectGroup",[oo,no]=oe(Ge),ro=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,c=Ne();return r.jsx(oo,{scope:e,id:c,children:r.jsx(D.div,{role:"group","aria-labelledby":c,...s,ref:o})})});ro.displayName=Ge;var Ye="SelectLabel",qe=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,c=no(Ye,e);return r.jsx(D.div,{id:c.id,...s,ref:o})});qe.displayName=Ye;var ie="SelectItem",[so,Xe]=oe(ie),Ze=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:s,disabled:c=!1,textValue:p,...l}=t,i=Y(ie,e),a=q(ie,e),f=i.value===s,[v,w]=n.useState(p??""),[T,I]=n.useState(!1),b=B(o,u=>{var h;return(h=a.itemRefCallback)==null?void 0:h.call(a,u,s,c)}),d=Ne(),g=n.useRef("touch"),y=()=>{c||(i.onValueChange(s),i.onOpenChange(!1))};if(s==="")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 r.jsx(so,{scope:e,value:s,disabled:c,textId:d,isSelected:f,onItemTextChange:n.useCallback(u=>{w(h=>h||((u==null?void 0:u.textContent)??"").trim())},[]),children:r.jsx(ce.ItemSlot,{scope:e,value:s,disabled:c,textValue:v,children:r.jsx(D.div,{role:"option","aria-labelledby":d,"data-highlighted":T?"":void 0,"aria-selected":f&&T,"data-state":f?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...l,ref:b,onFocus:R(l.onFocus,()=>I(!0)),onBlur:R(l.onBlur,()=>I(!1)),onClick:R(l.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:R(l.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:R(l.onPointerDown,u=>{g.current=u.pointerType}),onPointerMove:R(l.onPointerMove,u=>{var h;g.current=u.pointerType,c?(h=a.onItemLeave)==null||h.call(a):g.current==="mouse"&&u.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(l.onPointerLeave,u=>{var h;u.currentTarget===document.activeElement&&((h=a.onItemLeave)==null||h.call(a))}),onKeyDown:R(l.onKeyDown,u=>{var M;((M=a.searchRef)==null?void 0:M.current)!==""&&u.key===" "||(Kt.includes(u.key)&&y(),u.key===" "&&u.preventDefault())})})})})});Ze.displayName=ie;var se="SelectItemText",Je=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:c,...p}=t,l=Y(se,e),i=q(se,e),a=Xe(se,e),f=Yt(se,e),[v,w]=n.useState(null),T=B(o,y=>w(y),a.onItemTextChange,y=>{var u;return(u=i.itemTextRefCallback)==null?void 0:u.call(i,y,a.value,a.disabled)}),I=v==null?void 0:v.textContent,b=n.useMemo(()=>r.jsx("option",{value:a.value,disabled:a.disabled,children:I},a.value),[a.disabled,a.value,I]),{onNativeOptionAdd:d,onNativeOptionRemove:g}=f;return G(()=>(d(b),()=>g(b)),[d,g,b]),r.jsxs(r.Fragment,{children:[r.jsx(D.span,{id:a.textId,...p,ref:T}),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ee.createPortal(p.children,l.valueNode):null]})});Je.displayName=se;var Qe="SelectItemIndicator",et=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return Xe(Qe,e).isSelected?r.jsx(D.span,{"aria-hidden":!0,...s,ref:o}):null});et.displayName=Qe;var we="SelectScrollUpButton",tt=n.forwardRef((t,o)=>{const e=q(we,t.__scopeSelect),s=be(we,t.__scopeSelect),[c,p]=n.useState(!1),l=B(o,s.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let i=function(){const f=a.scrollTop>0;p(f)};const a=e.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),c?r.jsx(nt,{...t,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=e;i&&a&&(i.scrollTop=i.scrollTop-a.offsetHeight)}}):null});tt.displayName=we;var ye="SelectScrollDownButton",ot=n.forwardRef((t,o)=>{const e=q(ye,t.__scopeSelect),s=be(ye,t.__scopeSelect),[c,p]=n.useState(!1),l=B(o,s.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let i=function(){const f=a.scrollHeight-a.clientHeight,v=Math.ceil(a.scrollTop)<f;p(v)};const a=e.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),c?r.jsx(nt,{...t,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=e;i&&a&&(i.scrollTop=i.scrollTop+a.offsetHeight)}}):null});ot.displayName=ye;var nt=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:s,...c}=t,p=q("SelectScrollButton",e),l=n.useRef(null),i=de(e),a=n.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>a(),[a]),G(()=>{var v;const f=i().find(w=>w.ref.current===document.activeElement);(v=f==null?void 0:f.ref.current)==null||v.scrollIntoView({block:"nearest"})},[i]),r.jsx(D.div,{"aria-hidden":!0,...c,ref:o,style:{flexShrink:0,...c.style},onPointerDown:R(c.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:R(c.onPointerMove,()=>{var f;(f=p.onItemLeave)==null||f.call(p),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:R(c.onPointerLeave,()=>{a()})})}),ao="SelectSeparator",rt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return r.jsx(D.div,{"aria-hidden":!0,...s,ref:o})});rt.displayName=ao;var Ce="SelectArrow",lo=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,c=ue(e),p=Y(Ce,e),l=q(Ce,e);return p.open&&l.position==="popper"?r.jsx(At,{...c,...s,ref:o}):null});lo.displayName=Ce;var io="SelectBubbleInput",st=n.forwardRef(({__scopeSelect:t,value:o,...e},s)=>{const c=n.useRef(null),p=B(s,c),l=Ut(o);return n.useEffect(()=>{const i=c.current;if(!i)return;const a=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==o&&v){const w=new Event("change",{bubbles:!0});v.call(i,o),i.dispatchEvent(w)}},[l,o]),r.jsx(D.select,{...e,style:{...Ct,...e.style},ref:p,defaultValue:o})});st.displayName=io;function at(t){return t===""||t===void 0}function lt(t){const o=It(t),e=n.useRef(""),s=n.useRef(0),c=n.useCallback(l=>{const i=e.current+l;o(i),(function a(f){e.current=f,window.clearTimeout(s.current),f!==""&&(s.current=window.setTimeout(()=>a(""),1e3))})(i)},[o]),p=n.useCallback(()=>{e.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[e,c,p]}function it(t,o,e){const c=o.length>1&&Array.from(o).every(f=>f===o[0])?o[0]:o,p=e?t.indexOf(e):-1;let l=co(t,Math.max(p,0));c.length===1&&(l=l.filter(f=>f!==e));const a=l.find(f=>f.textValue.toLowerCase().startsWith(c.toLowerCase()));return a!==e?a:void 0}function co(t,o){return t.map((e,s)=>t[(o+s)%t.length])}var uo=Oe,ct=Le,po=Ve,fo=He,mo=Fe,dt=Ue,ho=$e,ut=qe,pt=Ze,go=Je,vo=et,ft=tt,mt=ot,ht=rt;const _o=uo,jo=po,xo=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(ct,{ref:s,className:_("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",t),...e,children:[o,r.jsx(fo,{asChild:!0,children:r.jsx(Ae,{className:"h-4 w-4 opacity-50"})})]}));xo.displayName=ct.displayName;const gt=n.forwardRef(({className:t,...o},e)=>r.jsx(ft,{ref:e,className:_("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(Ft,{className:"h-4 w-4"})}));gt.displayName=ft.displayName;const vt=n.forwardRef(({className:t,...o},e)=>r.jsx(mt,{ref:e,className:_("flex cursor-default items-center justify-center py-1",t),...o,children:r.jsx(Ae,{className:"h-4 w-4"})}));vt.displayName=mt.displayName;const So=n.forwardRef(({className:t,children:o,position:e="popper",...s},c)=>r.jsx(mo,{children:r.jsxs(dt,{ref:c,className:_("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]",e==="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",t),position:e,...s,children:[r.jsx(gt,{}),r.jsx(ho,{className:_("p-1",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),r.jsx(vt,{})]})}));So.displayName=dt.displayName;const wo=n.forwardRef(({className:t,...o},e)=>r.jsx(ut,{ref:e,className:_("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...o}));wo.displayName=ut.displayName;const yo=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(pt,{ref:s,className:_("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",t),...e,children:[r.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(vo,{children:r.jsx(Ot,{className:"h-4 w-4"})})}),r.jsx(go,{children:o})]}));yo.displayName=pt.displayName;const Co=n.forwardRef(({className:t,...o},e)=>r.jsx(ht,{ref:e,className:_("-mx-1 my-1 h-px bg-muted",t),...o}));Co.displayName=ht.displayName;const Do=kt,Mo=Lt,No=Bt,xt=n.forwardRef(({className:t,...o},e)=>r.jsx(De,{ref:e,className:_("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",t),...o}));xt.displayName=De.displayName;const bo=n.forwardRef(({className:t,children:o,...e},s)=>r.jsxs(No,{children:[r.jsx(xt,{}),r.jsxs(_e,{ref:s,className:_("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",t),...e,children:[o,r.jsxs(Vt,{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:[r.jsx(Ht,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bo.displayName=_e.displayName;const To=({className:t,...o})=>r.jsx("div",{className:_("flex flex-col space-y-1.5 text-center sm:text-left",t),...o});To.displayName="DialogHeader";const Io=({className:t,...o})=>r.jsx("div",{className:_("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...o});Io.displayName="DialogFooter";const Ro=n.forwardRef(({className:t,...o},e)=>r.jsx(je,{ref:e,className:_("text-lg font-semibold leading-none tracking-tight",t),...o}));Ro.displayName=je.displayName;const Po=n.forwardRef(({className:t,...o},e)=>r.jsx(Me,{ref:e,className:_("text-sm text-muted-foreground",t),...o}));Po.displayName=Me.displayName;export{Ae as C,Do as D,_o as S,bo as a,Po as b,Io as c,To as d,Ro as e,Mo as f,So as g,yo as h,xo as i,jo as j,Ie as k,Ut as u};
Binary file