@tapflowio/relay 0.24.0 → 0.25.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.
- package/dist/RelayServer.d.ts +45 -0
- package/dist/RelayServer.d.ts.map +1 -1
- package/dist/RelayServer.js +245 -30
- package/dist/RelayServer.js.map +1 -1
- package/dist/api/apps.d.ts.map +1 -1
- package/dist/api/apps.js +6 -16
- package/dist/api/apps.js.map +1 -1
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +3 -12
- package/dist/api/auth.js.map +1 -1
- package/dist/api/builds.d.ts.map +1 -1
- package/dist/api/builds.js +7 -5
- package/dist/api/builds.js.map +1 -1
- package/dist/api/comments.d.ts.map +1 -1
- package/dist/api/comments.js +41 -15
- package/dist/api/comments.js.map +1 -1
- package/dist/api/invitations.d.ts +1 -1
- package/dist/api/invitations.d.ts.map +1 -1
- package/dist/api/invitations.js +7 -3
- package/dist/api/invitations.js.map +1 -1
- package/dist/api/passwordReset.js +2 -2
- package/dist/api/team.d.ts +2 -2
- package/dist/api/team.d.ts.map +1 -1
- package/dist/api/team.js +6 -2
- package/dist/api/team.js.map +1 -1
- package/dist/api/tokens.d.ts +1 -1
- package/dist/api/tokens.d.ts.map +1 -1
- package/dist/api/tokens.js +26 -7
- package/dist/api/tokens.js.map +1 -1
- package/dist/api/webhooks.d.ts.map +1 -1
- package/dist/api/webhooks.js +11 -5
- package/dist/api/webhooks.js.map +1 -1
- package/dist/lib/clientAddress.d.ts +7 -0
- package/dist/lib/clientAddress.d.ts.map +1 -1
- package/dist/lib/clientAddress.js +15 -0
- package/dist/lib/clientAddress.js.map +1 -1
- package/dist/lib/connectionAuth.d.ts +57 -2
- package/dist/lib/connectionAuth.d.ts.map +1 -1
- package/dist/lib/connectionAuth.js +65 -6
- package/dist/lib/connectionAuth.js.map +1 -1
- package/dist/middleware/auth.d.ts +44 -4
- package/dist/middleware/auth.d.ts.map +1 -1
- package/dist/middleware/auth.js +99 -27
- package/dist/middleware/auth.js.map +1 -1
- package/package.json +3 -3
- package/public/assets/AppCenter-D_1rFI40.js +26 -0
- package/public/assets/AppCenter-D_1rFI40.js.br +0 -0
- package/public/assets/AppCenter-D_1rFI40.js.gz +0 -0
- package/public/assets/Default-DF_X2_3I.js +1 -0
- package/public/assets/Default-DF_X2_3I.js.br +0 -0
- package/public/assets/Default-DF_X2_3I.js.gz +0 -0
- package/public/assets/{Invite-EVMTsuNz.js → Invite-DETTWdYp.js} +1 -1
- package/public/assets/Invite-DETTWdYp.js.br +0 -0
- package/public/assets/Invite-DETTWdYp.js.gz +0 -0
- package/public/assets/{MacResources-fCn40Tf5.js → MacResources--1Enisxs.js} +1 -1
- package/public/assets/MacResources--1Enisxs.js.br +0 -0
- package/public/assets/MacResources--1Enisxs.js.gz +0 -0
- package/public/assets/{QASession-CL-eyFxG.js → QASession-BjoD9Toj.js} +3 -3
- package/public/assets/QASession-BjoD9Toj.js.br +0 -0
- package/public/assets/QASession-BjoD9Toj.js.gz +0 -0
- package/public/assets/{ResetPassword-D-SFg4ap.js → ResetPassword-B9miyXTP.js} +1 -1
- package/public/assets/ResetPassword-B9miyXTP.js.br +0 -0
- package/public/assets/ResetPassword-B9miyXTP.js.gz +0 -0
- package/public/assets/{Setup-ULjvIfAi.js → Setup-CywZCqHU.js} +1 -1
- package/public/assets/Setup-CywZCqHU.js.br +0 -0
- package/public/assets/Setup-CywZCqHU.js.gz +0 -0
- package/public/assets/{Team-DH91GD4w.js → Team-CxdX_9mY.js} +2 -2
- package/public/assets/Team-CxdX_9mY.js.br +0 -0
- package/public/assets/Team-CxdX_9mY.js.gz +0 -0
- package/public/assets/Tokens-BQnnawvG.js +1 -0
- package/public/assets/Tokens-BQnnawvG.js.br +0 -0
- package/public/assets/Tokens-BQnnawvG.js.gz +0 -0
- package/public/assets/alert-dialog-CuPdBkxF.js +1 -0
- package/public/assets/alert-dialog-CuPdBkxF.js.br +0 -0
- package/public/assets/alert-dialog-CuPdBkxF.js.gz +0 -0
- package/public/assets/{badge-B4QAWrzA.js → badge-CSVsKOK_.js} +1 -1
- package/public/assets/badge-CSVsKOK_.js.br +0 -0
- package/public/assets/badge-CSVsKOK_.js.gz +0 -0
- package/public/assets/{build-format-CtmRXihN.js → build-format-l9BrlbZl.js} +1 -1
- package/public/assets/build-format-l9BrlbZl.js.br +0 -0
- package/public/assets/build-format-l9BrlbZl.js.gz +0 -0
- package/public/assets/{dialog-BAFN_ONP.js → dialog-B6jt7-2f.js} +3 -3
- package/public/assets/dialog-B6jt7-2f.js.br +0 -0
- package/public/assets/dialog-B6jt7-2f.js.gz +0 -0
- package/public/assets/{index-COOWQXpW.js → index-Cm17I31a.js} +32 -32
- package/public/assets/index-Cm17I31a.js.br +0 -0
- package/public/assets/index-Cm17I31a.js.gz +0 -0
- package/public/assets/index-D_P99bPX.css +1 -0
- package/public/assets/index-D_P99bPX.css.br +0 -0
- package/public/assets/{index-ozCdBYxk.css.gz → index-D_P99bPX.css.gz} +0 -0
- package/public/assets/{list-view-Rrqp8TkG.js → list-view-Bp6pvsde.js} +1 -1
- package/public/assets/list-view-Bp6pvsde.js.br +0 -0
- package/public/assets/list-view-Bp6pvsde.js.gz +0 -0
- package/public/assets/{pencil-CAHyK7Qf.js → pencil-g-WiK1F2.js} +1 -1
- package/public/assets/pencil-g-WiK1F2.js.br +0 -0
- package/public/assets/pencil-g-WiK1F2.js.gz +0 -0
- package/public/assets/resource-health-BbeyA8an.js +1 -0
- package/public/assets/resource-health-BbeyA8an.js.br +0 -0
- package/public/assets/resource-health-BbeyA8an.js.gz +0 -0
- package/public/assets/{trash-CkO-5TRA.js → trash-DHPg15P4.js} +1 -1
- package/public/assets/trash-DHPg15P4.js.br +0 -0
- package/public/assets/trash-DHPg15P4.js.gz +0 -0
- package/public/index.html +2 -2
- package/public/index.html.br +0 -0
- package/public/index.html.gz +0 -0
- package/public/assets/AppCenter-BHz6vh5p.js +0 -26
- package/public/assets/AppCenter-BHz6vh5p.js.br +0 -0
- package/public/assets/AppCenter-BHz6vh5p.js.gz +0 -0
- package/public/assets/Default-bCqU0Qz9.js +0 -1
- package/public/assets/Default-bCqU0Qz9.js.br +0 -0
- package/public/assets/Default-bCqU0Qz9.js.gz +0 -0
- package/public/assets/Invite-EVMTsuNz.js.br +0 -0
- package/public/assets/Invite-EVMTsuNz.js.gz +0 -0
- package/public/assets/MacResources-fCn40Tf5.js.br +0 -0
- package/public/assets/MacResources-fCn40Tf5.js.gz +0 -0
- package/public/assets/QASession-CL-eyFxG.js.br +0 -0
- package/public/assets/QASession-CL-eyFxG.js.gz +0 -0
- package/public/assets/ResetPassword-D-SFg4ap.js.br +0 -0
- package/public/assets/ResetPassword-D-SFg4ap.js.gz +0 -0
- package/public/assets/Setup-ULjvIfAi.js.br +0 -0
- package/public/assets/Setup-ULjvIfAi.js.gz +0 -0
- package/public/assets/Team-DH91GD4w.js.br +0 -0
- package/public/assets/Team-DH91GD4w.js.gz +0 -0
- package/public/assets/Tokens-DImLpOVZ.js +0 -1
- package/public/assets/Tokens-DImLpOVZ.js.br +0 -0
- package/public/assets/Tokens-DImLpOVZ.js.gz +0 -0
- package/public/assets/alert-dialog-CwcUyDZQ.js +0 -1
- package/public/assets/alert-dialog-CwcUyDZQ.js.br +0 -0
- package/public/assets/alert-dialog-CwcUyDZQ.js.gz +0 -0
- package/public/assets/badge-B4QAWrzA.js.br +0 -0
- package/public/assets/badge-B4QAWrzA.js.gz +0 -0
- package/public/assets/build-format-CtmRXihN.js.br +0 -0
- package/public/assets/build-format-CtmRXihN.js.gz +0 -0
- package/public/assets/dialog-BAFN_ONP.js.br +0 -0
- package/public/assets/dialog-BAFN_ONP.js.gz +0 -0
- package/public/assets/index-COOWQXpW.js.br +0 -0
- package/public/assets/index-COOWQXpW.js.gz +0 -0
- package/public/assets/index-ozCdBYxk.css +0 -1
- package/public/assets/index-ozCdBYxk.css.br +0 -0
- package/public/assets/list-view-Rrqp8TkG.js.br +0 -0
- package/public/assets/list-view-Rrqp8TkG.js.gz +0 -0
- package/public/assets/pencil-CAHyK7Qf.js.br +0 -0
- package/public/assets/pencil-CAHyK7Qf.js.gz +0 -0
- package/public/assets/resource-health-BRpSwarg.js +0 -1
- package/public/assets/resource-health-BRpSwarg.js.br +0 -0
- package/public/assets/resource-health-BRpSwarg.js.gz +0 -0
- package/public/assets/trash-CkO-5TRA.js.br +0 -0
- package/public/assets/trash-CkO-5TRA.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-react-BlPSzrEe.js";import{
|
|
1
|
+
import{j as e}from"./vendor-react-BlPSzrEe.js";import{aF as F,aw as P,aJ as T,aI as E,C as w,c as h,d as f,b as x,a as I,L as g,I as j,F as i,B as R,aq as v,ap as K,au as y,aN as L}from"./index-Cm17I31a.js";import{b as Q,c as B}from"./vendor-router-B_lVHrKl.js";const J=K({password:y().min(8,"Password must be at least 8 characters"),confirm:y()}).refine(a=>a.password===a.confirm,{message:"Passwords do not match",path:["confirm"]});function H(){var l,m,p;const a=Q(),[b]=B(),r=b.get("token")??"",{register:o,handleSubmit:N,setError:t,formState:{errors:s,isSubmitting:n}}=F({resolver:P(J)}),C=T(),d=E({queryKey:v.resetToken(r),queryFn:()=>L(r),enabled:r!=="",staleTime:1/0}),c=!r||d.isError?"invalid":d.isPending?"loading":"valid";async function k(S){try{const u=await fetch("/api/v1/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:r,password:S.password})});if(!u.ok){const q=await u.json();t("root",{message:q.error??"Failed to reset password"});return}C.removeQueries({queryKey:v.resetToken(r)}),a("/login",{replace:!0})}catch{t("root",{message:"Network error. Please try again."})}}return c==="loading"?e.jsx("div",{className:"flex min-h-svh items-center justify-center"}):c==="invalid"?e.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsx(w,{level:4,className:"w-full max-w-sm text-center",children:e.jsxs(h,{children:[e.jsx(f,{children:"Link expired"}),e.jsx(x,{children:"This password reset link is invalid or has expired. Ask your admin to send a new one."})]})})}):e.jsx("div",{className:"bg-mesh-gradient flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs(w,{level:4,className:"w-full max-w-sm",children:[e.jsxs(h,{className:"text-center",children:[e.jsx(f,{children:"Reset password"}),e.jsx(x,{children:"Enter your new password below."})]}),e.jsx(I,{children:e.jsxs("form",{onSubmit:N(k),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"password",children:"New password"}),e.jsx(j,{id:"password",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!s.password,"aria-describedby":s.password?"password-error":void 0,...o("password")}),e.jsx(i,{id:"password-error",message:(l=s.password)==null?void 0:l.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(j,{id:"confirm",type:"password","aria-required":"true",autoComplete:"new-password","aria-invalid":!!s.confirm,"aria-describedby":s.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(m=s.confirm)==null?void 0:m.message})]}),e.jsx(i,{assertive:!0,id:"resetpassword-error",message:(p=s.root)==null?void 0:p.message}),e.jsx(R,{type:"submit",disabled:n,className:"w-full",children:n?"Saving…":"Set new password"})]})})]})})}export{H as ResetPassword};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-react-BlPSzrEe.js";import{
|
|
1
|
+
import{j as e}from"./vendor-react-BlPSzrEe.js";import{aO as k,aF as A,aw as P,aJ as T,aI as q,C as I,c as O,d as L,a as z,I as t,L as l,F as i,B as D,aq as w,ap as E,au as d,a8 as R}from"./index-Cm17I31a.js";import{b as _,N as M}from"./vendor-router-B_lVHrKl.js";const Q=E({email:d().email("Enter a valid email"),password:d().min(8,"Password must be at least 8 characters"),confirm:d()}).refine(s=>s.password===s.confirm,{message:"Passwords do not match",path:["confirm"]});function K(){var u,p,x,h,g,f;const s=_(),{resolvedTheme:y}=k(),v=y==="dark"?"/logo-dark.svg":"/logo.svg",{register:o,handleSubmit:N,setError:c,formState:{errors:a,isSubmitting:m}}=A({resolver:P(Q)}),b=T(),n=q({queryKey:w.authStatus,queryFn:R,staleTime:1/0});async function C(r){try{const j=await fetch("/api/v1/auth/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r.email,password:r.password})});if(!j.ok){const F=await j.json();c("root",{message:F.error??"Failed to create account"});return}b.setQueryData(w.authStatus,{initialized:!0}),s("/login",{replace:!0})}catch{c("root",{message:"Network error. Please try again."})}}if((u=n.data)!=null&&u.initialized)return e.jsx(M,{to:"/login",replace:!0});if(n.isPending)return null;const S=((p=n.data)==null?void 0:p.canInitialize)===!1;return e.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:e.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:v,alt:"tapflow",className:"w-6 h-6"}),e.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"})]}),e.jsxs(I,{level:4,className:"w-full",children:[e.jsx(O,{className:"text-center",children:e.jsx(L,{className:"text-2xl tracking-display-md",children:"Set up tapflow"})}),e.jsx(z,{children:S?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{id:"setup-remote-command",className:"text-sm text-muted-foreground",children:"The admin account can only be created on the machine running the relay. Run this there, then reload this page:"}),e.jsx(t,{readOnly:!0,value:"tapflow admin init","aria-labelledby":"setup-remote-command",onFocus:r=>r.currentTarget.select(),className:"font-mono text-xs"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Running the relay in Docker? Set ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_EMAIL"})," and ",e.jsx("code",{className:"text-xs",children:"TAPFLOW_ADMIN_PASSWORD"})," on the container and recreate it, e.g. with ",e.jsx("code",{className:"text-xs",children:"docker compose up -d"}),". A restart keeps the old environment."]})]}):e.jsxs("form",{onSubmit:N(C),className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Admin email"}),e.jsx(t,{id:"email",type:"email",placeholder:"admin@yourteam.com",autoComplete:"email","aria-required":"true","aria-invalid":!!a.email,"aria-describedby":a.email?"email-error":void 0,...o("email")}),e.jsx(i,{id:"email-error",message:(x=a.email)==null?void 0:x.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(t,{id:"password",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!a.password,"aria-describedby":a.password?"password-error":void 0,...o("password")}),e.jsx(i,{id:"password-error",message:(h=a.password)==null?void 0:h.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"confirm",children:"Confirm password"}),e.jsx(t,{id:"confirm",type:"password",autoComplete:"new-password","aria-required":"true","aria-invalid":!!a.confirm,"aria-describedby":a.confirm?"confirm-error":void 0,...o("confirm")}),e.jsx(i,{id:"confirm-error",message:(g=a.confirm)==null?void 0:g.message})]}),e.jsx(i,{assertive:!0,id:"setup-error",message:(f=a.root)==null?void 0:f.message}),e.jsx(D,{type:"submit",size:"lg",disabled:m,className:"w-full mt-1",children:m?"Creating account…":"Create admin account"})]})})]})]})})}export{K as Setup};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{
|
|
1
|
+
import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{a2 as ne,aJ as le,aI as re,aF as oe,aw as ce,B as o,I as F,L,F as P,h as de,C as me,c as he,d as ue,a as xe,av as j,ap as H,au as v,aq as $,N as je,ah as ve}from"./index-Cm17I31a.js";import{D as pe,f as ge,a as fe,d as be,e as ye,S as O,i as Q,j as V,g as q,h as t}from"./dialog-B6jt7-2f.js";import{A as Se,c as Ce,f as ke,g as we,d as Te,e as De,b as Ne,a as Ae}from"./alert-dialog-CuPdBkxF.js";import{l as Ie,T as Re,d as Ee,e as M,c,a as Fe,L as Le,b as d}from"./list-view-Bp6pvsde.js";import{j as Pe,l as $e}from"./publicLink-D6zKS_wu.js";import{u as Oe}from"./useFocusAfterSwap-BY3N9f9v.js";import"./vendor-router-B_lVHrKl.js";/**
|
|
2
2
|
* @license lucide-react v1.47.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const B={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};B.node;const Qe=ne(B),Ve=
|
|
6
|
+
*/const B={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};B.node;const Qe=ne(B),Ve=H({email:v().email("Enter a valid email"),role:v().min(1,"Pick a role")}),qe=H({token:v(),emailSent:je(),inviteUrl:v().nullable()});function Ge(){var I,R;const _=le(),m=re({queryKey:$.teamMembers,queryFn:ve}),f=m.data??[],b=Ie(m),y=a.useRef(null),z=Oe(b,y),[J,S]=a.useState({}),[h,C]=a.useState(""),[K,k]=a.useState(!1),[U,u]=a.useState(""),w=a.useId(),T=a.useRef(null),[G,W]=a.useState(!1),[p,g]=a.useState(null),{register:X,handleSubmit:Y,control:Z,reset:ee,formState:{errors:l,isSubmitting:D}}=oe({resolver:ce(Ve),defaultValues:{email:"",role:"QA"}}),N=()=>{_.invalidateQueries({queryKey:$.teamMembers})};a.useEffect(()=>{var s;h&&((s=T.current)==null||s.focus())},[h]);async function se(s){u("");try{const i=await fetch("/api/v1/team/invite",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s.email,role:s.role})});if(!i.ok)throw new Error(`Server error: ${i.status}`);const r=qe.parse(await i.json()),x=r.inviteUrl??Pe((await $e()).linkBase,`/invite?token=${r.token}`),n=await(navigator.clipboard?navigator.clipboard.writeText(x):Promise.reject(new Error("no clipboard"))).then(()=>!0,()=>!1);C(x),k(n),u(`${r.emailSent?`Invite email sent to ${s.email}.`:"Email could not be sent."} ${n?"Invite link copied to clipboard.":"Copy the invite link."}`),r.emailSent?j.success(`Invite email sent to ${s.email}`):n?j.warning("Invite link copied — email could not be sent. Check your SMTP settings."):j.warning("Email could not be sent. Copy the invite link from the dialog, and check your SMTP settings.")}catch{j.error("Failed to create invite link"),u("Failed to create invite link.")}}function A(s){W(s),s||(C(""),k(!1),u(""),ee())}async function ae(s,i){await fetch(`/api/v1/team/members/${s}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:i})}),N()}async function ie(s){const x=(await(await fetch(`/api/v1/team/members/${s}/send-reset`,{method:"POST",credentials:"include"})).json()).emailSent?"Sent":"No SMTP";S(n=>({...n,[s]:x})),setTimeout(()=>S(n=>{const E={...n};return delete E[s],E}),3e3)}async function te(s){await fetch(`/api/v1/team/members/${s}`,{method:"DELETE",credentials:"include"}),g(null),N()}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsx(Se,{open:p!==null,onOpenChange:s=>{s||g(null)},children:e.jsxs(Ce,{children:[e.jsxs(ke,{children:[e.jsx(we,{children:"Remove this member?"}),e.jsx(Te,{children:"This member will lose access to the team immediately."})]}),e.jsxs(De,{children:[e.jsx(Ne,{children:"Cancel"}),e.jsx(Ae,{className:"bg-destructive/10 text-destructive hover:bg-destructive/20 border-0",onClick:()=>p!==null&&te(p),children:"Remove"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Team"}),e.jsxs(pe,{open:G,onOpenChange:A,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(o,{ref:y,size:"sm",children:[e.jsx(Qe,{className:"mr-2 h-4 w-4"}),"Invite member"]})}),e.jsxs(fe,{className:"sm:max-w-md",children:[e.jsx(be,{children:e.jsx(ye,{children:"Invite team member"})}),e.jsx("p",{role:"status",className:"sr-only",children:U}),h?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:w,className:"text-sm text-muted-foreground",children:K?"Invite link copied to clipboard:":"Copy this invite link:"}),e.jsx(F,{ref:T,readOnly:!0,value:h,"aria-labelledby":w,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),e.jsx(o,{onClick:()=>A(!1),children:"Done"})]}):e.jsxs("form",{onSubmit:Y(se),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(L,{htmlFor:"invite-email",children:"Email"}),e.jsx(F,{id:"invite-email",type:"email","aria-required":"true","aria-invalid":!!l.email,"aria-describedby":l.email?"email-error":void 0,...X("email")}),e.jsx(P,{id:"email-error",message:(I=l.email)==null?void 0:I.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(L,{htmlFor:"invite-role",children:"Role"}),e.jsx(de,{name:"role",control:Z,render:({field:s})=>e.jsxs(O,{value:s.value,onValueChange:s.onChange,children:[e.jsx(Q,{id:"invite-role","aria-invalid":!!l.role,"aria-describedby":l.role?"role-error":void 0,children:e.jsx(V,{})}),e.jsxs(q,{children:[e.jsx(t,{value:"Admin",children:"Admin"}),e.jsx(t,{value:"Developer",children:"Developer"}),e.jsx(t,{value:"QA",children:"QA"}),e.jsx(t,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(P,{id:"role-error",message:(R=l.role)==null?void 0:R.message})]}),e.jsx(o,{type:"submit",disabled:D,children:D?"Creating link…":"Generate invite link"})]})]})]})]}),e.jsxs(me,{children:[e.jsx(he,{children:e.jsxs(ue,{children:["Members",m.data?` (${f.length})`:""]})}),e.jsx(xe,{className:"px-4 pt-0 pb-2",children:e.jsxs(Re,{children:[e.jsx(Ee,{children:e.jsxs(M,{children:[e.jsx(c,{children:"Nickname"}),e.jsx(c,{children:"Email"}),e.jsx(c,{children:"Role"}),e.jsx(c,{children:"Joined"}),e.jsx(c,{className:"w-10"})]})}),e.jsxs(Fe,{...z,children:[e.jsx(Le,{view:b,colSpan:5,noun:"team members",emptyText:"No members yet.",onRetry:()=>{m.refetch()}}),f.map(s=>e.jsxs(M,{className:"hover:bg-transparent",children:[e.jsx(d,{className:"font-medium",children:s.display_name||"—"}),e.jsx(d,{className:"text-muted-foreground text-sm",children:s.email}),e.jsx(d,{children:e.jsxs(O,{value:s.role,onValueChange:i=>ae(s.id,i),children:[e.jsx(Q,{className:"h-7 w-28",children:e.jsx(V,{})}),e.jsxs(q,{children:[e.jsx(t,{value:"Admin",children:"Admin"}),e.jsx(t,{value:"Developer",children:"Developer"}),e.jsx(t,{value:"QA",children:"QA"}),e.jsx(t,{value:"Viewer",children:"Viewer"})]})]})}),e.jsx(d,{className:"text-muted-foreground text-sm",children:new Date(s.joined_at).toLocaleDateString()}),e.jsx(d,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{variant:"secondary",size:"nav",onClick:()=>ie(s.id),children:J[s.id]??"Reset pwd"}),e.jsx(o,{variant:"destructive",size:"nav",onClick:()=>g(s.id),children:"Remove"})]})})]},s.id))]})]})})]})]})}export{Ge as TeamSettings};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as a,j as e}from"./vendor-react-BlPSzrEe.js";import{aJ as ie,aI as oe,aF as le,aw as ce,aL as de,B as m,I as y,av as n,L as g,F as W,h as xe,C as ue,c as me,d as pe,b as he,a as je,ap as ye,au as Q,_ as ge,aq as z,ai as fe}from"./index-Cm17I31a.js";import{B as w}from"./badge-CSVsKOK_.js";import{A as ve,c as ke,f as be,g as we,d as Ne,e as Ce,b as Te}from"./alert-dialog-CuPdBkxF.js";import{D as De,f as Se,a as Ae,d as Ie,e as Fe,S as K,i as $,j as J,g as M,h as p}from"./dialog-B6jt7-2f.js";import{l as Re,T as Ee,d as Be,e as G,c as h,a as Le,L as Pe,b as j}from"./list-view-Bp6pvsde.js";import{l as qe}from"./publicLink-D6zKS_wu.js";import{u as Oe}from"./useFocusAfterSwap-BY3N9f9v.js";import{P as _e,T as He}from"./trash-DHPg15P4.js";import"./vendor-router-B_lVHrKl.js";const U=["7","30","60","90"],Ve=ye({name:Q().min(1,"Give the token a name"),expiry:ge([...U,"custom","never"]),expiresDays:Q()}).superRefine((t,d)=>{if(t.expiry!=="custom")return;const x=Number(t.expiresDays);(!Number.isInteger(x)||x<1||x>365)&&d.addIssue({code:"custom",path:["expiresDays"],message:"Must be between 1 and 365"})});function We(t){if(t.expiry!=="never")return Number(t.expiry==="custom"?t.expiresDays:t.expiry)}function Ze(){var H,V;const t=ie(),d=oe({queryKey:z.tokens,queryFn:fe}),x=d.data??[],N=Re(d),C=a.useRef(null),X=Oe(N,C),[Y,Z]=a.useState(!1),[i,T]=a.useState(""),[u,D]=a.useState("api"),[S,A]=a.useState(""),[f,v]=a.useState(null),I=a.useId(),F=a.useId(),k=a.useRef(null),[ee,o]=a.useState(""),R=a.useId(),{register:E,control:B,handleSubmit:se,reset:ae,formState:{errors:l,isSubmitting:L}}=le({resolver:ce(Ve),defaultValues:{name:"",expiry:"30",expiresDays:"30"}}),P=de({control:B,name:"expiry"}),q=()=>{t.invalidateQueries({queryKey:z.tokens})};a.useEffect(()=>{var s;i&&((s=k.current)==null||s.focus())},[i]);async function te(s){o("");try{const r=We(s),b=await fetch("/api/v1/tokens",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,...r!==void 0?{expires_in_days:r}:{},...u==="agent"?{scope:"agent"}:{}})});if(!b.ok){const c=await b.json().catch(()=>null);n.error((c==null?void 0:c.error)??"Failed to create token"),o((c==null?void 0:c.error)??"Failed to create token");return}const ne=await b.json();u==="agent"&&A((await qe()).agentWsBase),n.success("Token created"),T(ne.token),q()}catch{n.error("Network error"),o("Network error")}}function O(s){Z(s),s||(T(""),D("api"),A(""),o(""),ae())}async function re(s){try{return(await fetch(`/api/v1/tokens/${s}`,{method:"DELETE",credentials:"include"})).ok?(n.success("Token revoked"),q(),!0):(n.error("Failed to revoke token"),!1)}catch{return n.error("Network error"),!1}}function _(s){return s.expires_at&&new Date(s.expires_at)<new Date}return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[900px] mx-auto w-full p-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Personal Access Tokens"}),e.jsxs(De,{open:Y,onOpenChange:O,children:[e.jsx(Se,{asChild:!0,children:e.jsxs(m,{ref:C,size:"sm",children:[e.jsx(_e,{className:"mr-2 h-4 w-4"}),"New token"]})}),e.jsxs(Ae,{className:"sm:max-w-md",children:[e.jsx(Ie,{children:e.jsx(Fe,{children:"Create token"})}),e.jsx("p",{role:"status",className:"sr-only",children:ee}),i?e.jsxs("div",{className:"flex flex-col gap-3 pt-2",children:[e.jsx("p",{id:I,className:"text-sm text-muted-foreground",children:"Copy this token now — it won't be shown again."}),e.jsx(y,{ref:k,readOnly:!0,value:i,"aria-labelledby":I,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"}),u==="agent"&&S&&e.jsxs(e.Fragment,{children:[e.jsx("p",{id:F,className:"text-sm text-muted-foreground",children:"Run this on the agent Mac to connect it to this relay:"}),e.jsx(y,{readOnly:!0,value:`tapflow agent start --relay ${S} --token ${i}`,"aria-labelledby":F,onFocus:s=>s.currentTarget.select(),className:"font-mono text-xs"})]}),e.jsx(m,{onClick:()=>{o(""),(navigator.clipboard?navigator.clipboard.writeText(i):Promise.reject(new Error("no clipboard"))).then(()=>{n.success("Token copied to clipboard"),O(!1)}).catch(()=>{var s;n.error("Failed to copy — copy manually"),o("Could not copy the token. Select it and copy it by hand."),(s=k.current)==null||s.focus()})},children:"Copy & close"})]}):e.jsxs("form",{onSubmit:se(te),className:"flex flex-col gap-4 pt-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"token-name",children:"Name"}),e.jsx(y,{id:"token-name",placeholder:"e.g. ci-deploy","aria-required":"true","aria-invalid":!!l.name,"aria-describedby":l.name?"name-error":void 0,...E("name")}),e.jsx(W,{id:"name-error",message:(H=l.name)==null?void 0:H.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"token-expiry",children:"Expiration"}),e.jsx(xe,{control:B,name:"expiry",render:({field:s})=>e.jsxs(K,{value:s.value,onValueChange:r=>s.onChange(r),children:[e.jsx($,{id:"token-expiry",ref:s.ref,onBlur:s.onBlur,"aria-describedby":s.value==="never"?R:void 0,children:e.jsx(J,{})}),e.jsxs(M,{children:[U.map(r=>e.jsxs(p,{value:r,children:[r," days"]},r)),e.jsx(p,{value:"custom",children:"Custom…"}),e.jsx(p,{value:"never",children:"No expiration"})]})]})}),P==="never"&&e.jsx("p",{id:R,className:"text-sm text-amber-700 dark:text-amber-300",children:"A token without an expiry stays valid until you revoke it. For CI, 90 days or less is recommended."})]}),P==="custom"&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"expires",children:"Expires in (days)"}),e.jsx(y,{id:"expires",type:"number","aria-required":"true","aria-invalid":!!l.expiresDays,"aria-describedby":l.expiresDays?"expiresDays-error":void 0,...E("expiresDays")}),e.jsx(W,{id:"expiresDays-error",message:(V=l.expiresDays)==null?void 0:V.message})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(g,{htmlFor:"token-type",children:"Type"}),e.jsxs(K,{value:u,onValueChange:s=>D(s),children:[e.jsx($,{id:"token-type",children:e.jsx(J,{})}),e.jsxs(M,{children:[e.jsx(p,{value:"api",children:"API — CI uploads & API access"}),e.jsx(p,{value:"agent",children:"Agent — connect remote device agents (Admin only)"})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Scope: ",e.jsx(w,{variant:"secondary",children:u==="agent"?"agent":"view, builds:write"})]}),e.jsx(m,{type:"submit",disabled:L,children:L?"Creating…":"Create token"})]})]})]})]}),e.jsxs(ue,{children:[e.jsxs(me,{children:[e.jsx(pe,{children:"Active tokens"}),e.jsxs(he,{children:["Use these tokens with ",e.jsx("code",{className:"text-xs",children:"Authorization: Bearer <token>"})," for API deployments."]})]}),e.jsx(je,{className:"px-4 pt-0 pb-2",children:e.jsxs(Ee,{children:[e.jsx(Be,{children:e.jsxs(G,{children:[e.jsx(h,{children:"Name"}),e.jsx(h,{children:"Scope"}),e.jsx(h,{children:"Last used"}),e.jsx(h,{children:"Expires"}),e.jsx(h,{className:"w-10"})]})}),e.jsxs(Le,{...X,children:[e.jsx(Pe,{view:N,colSpan:5,noun:"tokens",emptyText:"No tokens yet.",onRetry:()=>{d.refetch()}}),x.map(s=>e.jsxs(G,{className:"hover:bg-transparent",children:[e.jsx(j,{className:"font-medium",children:s.name}),e.jsx(j,{children:e.jsx(w,{variant:"secondary",children:s.scope})}),e.jsx(j,{className:"text-muted-foreground text-sm",children:s.last_used_at?new Date(s.last_used_at).toLocaleDateString():"Never"}),e.jsx(j,{children:s.expires_at?e.jsx("span",{className:_(s)?"text-destructive text-sm":"text-muted-foreground text-sm",children:_(s)?"Expired":new Date(s.expires_at).toLocaleDateString()}):e.jsx(w,{variant:"outline",children:"No expiration"})}),e.jsx(j,{children:e.jsx(m,{variant:"destructive",size:"icon",className:"h-7 w-7","aria-label":"Revoke token",onClick:()=>v(s.id),children:e.jsx(He,{className:"h-4 w-4"})})})]},s.id))]})]})})]}),e.jsx(ve,{open:f!==null,onOpenChange:s=>{s||v(null)},children:e.jsxs(ke,{children:[e.jsxs(be,{children:[e.jsx(we,{children:"Revoke token?"}),e.jsx(Ne,{children:"Any active API calls using this token will immediately fail."})]}),e.jsxs(Ce,{children:[e.jsx(Te,{children:"Cancel"}),e.jsx(m,{variant:"destructive",onClick:async()=>{if(f===null)return;await re(f)&&v(null)},children:"Revoke"})]})]})})]})}export{Ze as TokenSettings};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as n,j as i,f as d}from"./vendor-react-BlPSzrEe.js";import{m as O,aB as u,j as S,Y as T,n as b,k as E,i as v,a1 as x,a0 as h,D as k,o as z,l as F,W as f,O as N}from"./index-Cm17I31a.js";var H=Object.defineProperty,c=(s,t)=>H(s,"name",{value:t,configurable:!0}),M="AlertDialog",[B,fe]=h(M,[x]),p=x(),I=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(k,{...a,...e,modal:!0})},"AlertDialog"),L=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(z,{...o,...l,ref:e})},"AlertDialogTrigger")),V=c(s=>{const{__scopeAlertDialog:t,...e}=s,a=p(t);return i.jsx(O,{...a,...e})},"AlertDialogPortal"),W=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(F,{...o,...l,ref:e})},"AlertDialogOverlay")),Y="AlertDialogContent",[q,G]=B(Y),J=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,children:l,...o}=t,r=p(a),g=n.useRef(null),$=u(e,g),m=n.useRef(null);return i.jsx(q,{scope:a,cancelRef:m,children:i.jsx(S,{role:"alertdialog",...r,...o,ref:$,onOpenAutoFocus:T(o.onOpenAutoFocus,D=>{var A;D.preventDefault(),(A=m.current)==null||A.focus({preventScroll:!0})}),onPointerDownOutside:D=>D.preventDefault(),onInteractOutside:D=>D.preventDefault(),children:l})})},"AlertDialogContent")),K=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(b,{...o,...l,ref:e})},"AlertDialogTitle")),Q=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(E,{...o,...l,ref:e})},"AlertDialogDescription")),U=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,o=p(a);return i.jsx(v,{...o,...l,ref:e})},"AlertDialogAction")),X="AlertDialogCancel",Z=n.forwardRef(c(function(t,e){const{__scopeAlertDialog:a,...l}=t,{cancelRef:o}=G(X,a),r=p(a),g=u(e,o);return i.jsx(v,{...r,...l,ref:g})},"AlertDialogCancel")),ee=I,te=L,ae=V,_=W,y=J,j=U,R=Z,C=K,w=Q;const De=ee,me=te,le=ae,P=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("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",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(_,{className:o,...l,ref:t}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});P.displayName=_.displayName;const oe=n.forwardRef((s,t)=>{const e=d.c(10);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(P,{}),e[3]=o):o=e[3];let r;e[4]!==a?(r=f("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",a),e[4]=a,e[5]=r):r=e[5];let g;return e[6]!==l||e[7]!==t||e[8]!==r?(g=i.jsxs(le,{children:[o,i.jsx(y,{ref:t,className:r,...l})]}),e[6]=l,e[7]=t,e[8]=r,e[9]=g):g=e[9],g});oe.displayName=y.displayName;const se=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col space-y-2 text-center sm:text-left",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};se.displayName="AlertDialogHeader";const re=s=>{const t=d.c(8);let e,a;t[0]!==s?({className:e,...a}=s,t[0]=s,t[1]=e,t[2]=a):(e=t[1],a=t[2]);let l;t[3]!==e?(l=f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),t[3]=e,t[4]=l):l=t[4];let o;return t[5]!==a||t[6]!==l?(o=i.jsx("div",{className:l,...a}),t[5]=a,t[6]=l,t[7]=o):o=t[7],o};re.displayName="AlertDialogFooter";const ie=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-lg font-semibold",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(C,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ie.displayName=C.displayName;const ne=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f("text-sm text-muted-foreground",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(w,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ne.displayName=w.displayName;const ce=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N(),a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(j,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});ce.displayName=j.displayName;const pe=n.forwardRef((s,t)=>{const e=d.c(9);let a,l;e[0]!==s?({className:a,...l}=s,e[0]=s,e[1]=a,e[2]=l):(a=e[1],l=e[2]);let o;e[3]!==a?(o=f(N({variant:"outline"}),"mt-2 sm:mt-0",a),e[3]=a,e[4]=o):o=e[4];let r;return e[5]!==l||e[6]!==t||e[7]!==o?(r=i.jsx(R,{ref:t,className:o,...l}),e[5]=l,e[6]=t,e[7]=o,e[8]=r):r=e[8],r});pe.displayName=R.displayName;export{De as A,ce as a,pe as b,oe as c,ne as d,re as e,se as f,ie as g,me as h};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as i,j as b}from"./vendor-react-BlPSzrEe.js";import{
|
|
1
|
+
import{f as i,j as b}from"./vendor-react-BlPSzrEe.js";import{W as l,a6 as g}from"./index-Cm17I31a.js";const x=g("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"},tone:{backlog:"border-transparent bg-zinc-100 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",progress:"border-transparent bg-blue-50 text-blue-700 dark:bg-blue-950 dark:text-blue-300",done:"border-transparent bg-green-50 text-green-700 dark:bg-green-950 dark:text-green-300",rejected:"border-transparent bg-red-50 text-red-700 dark:bg-red-950 dark:text-red-300",ios:"border-transparent bg-sky-50 text-sky-700 dark:bg-sky-950 dark:text-sky-300",android:"border-transparent bg-emerald-50 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-300"}},defaultVariants:{variant:"default"}});function u(o){const e=i.c(12);let r,t,a,n;e[0]!==o?({className:r,variant:n,tone:a,...t}=o,e[0]=o,e[1]=r,e[2]=t,e[3]=a,e[4]=n):(r=e[1],t=e[2],a=e[3],n=e[4]);let d;e[5]!==r||e[6]!==a||e[7]!==n?(d=l(x({variant:n,tone:a}),r),e[5]=r,e[6]=a,e[7]=n,e[8]=d):d=e[8];let s;return e[9]!==t||e[10]!==d?(s=b.jsx("div",{className:d,...t}),e[9]=t,e[10]=d,e[11]=s):s=e[11],s}export{u as B};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a2 as m,I as g}from"./index-Cm17I31a.js";import{f as y,j as f}from"./vendor-react-BlPSzrEe.js";/**
|
|
2
2
|
* @license lucide-react v1.47.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{
|
|
1
|
+
import{k as d,j as u,r as De,f as k}from"./vendor-react-BlPSzrEe.js";import{a2 as Me,aB as U,A as lt,v as L,Y as j,P as at,aH as Z,u as ct,aA as Ce,aG as Oe,a3 as ke,$ as it,al as dt,aE as ut,R as pt,q as ft,p as mt,a0 as ht,a5 as gt,g as St,V as xt,aD as vt,aC as _e,x as wt,W as M,e as yt,D as Ct,o as bt,m as It,j as Ae,n as Le,l as Be,i as Tt,X as Pt,k as Ve}from"./index-Cm17I31a.js";/**
|
|
2
2
|
* @license lucide-react v1.47.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const He={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};He.node;const
|
|
6
|
+
*/const He={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};He.node;const $e=Me(He);/**
|
|
7
7
|
* @license lucide-react v1.47.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const $e={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};$e.node;const _t=Me($e);var Nt=Object.defineProperty,Rt=(l,o)=>Nt(l,"name",{value:o,configurable:!0});function we(l,[o,e]){return Math.min(e,Math.max(o,l))}Rt(we,"clamp");var jt=Object.defineProperty,Et=(l,o)=>jt(l,"name",{value:o,configurable:!0});function Ue(l){const o=d.useRef({value:l,previous:l});return d.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}Et(Ue,"usePrevious");var Dt=Object.defineProperty,x=(l,o)=>Dt(l,"name",{value:o,configurable:!0}),Mt=[" ","Enter","ArrowUp","ArrowDown"],Ot=[" ","Enter"],de="Select",[he,ge,kt]=it(de),[re,bo]=ht(de,[kt,ke]),be=ke(),[At,Q]=re(de),[Lt,Bt]=re(de);function We(l){const{__scopeSelect:o,children:e,open:t,defaultOpen:s,onOpenChange:n,value:r,defaultValue:a,onValueChange:c,dir:i,name:m,autoComplete:v,disabled:w,required:y,form:C,internal_do_not_use_render:I}=l,p=be(o),[g,T]=d.useState(null),[h,f]=d.useState(null),[R,j]=d.useState(!1),J=vt(i),[A,V]=_e({prop:t,defaultProp:s??!1,onChange:n,caller:de}),[ee,G]=_e({prop:r,defaultProp:a,onChange:c,caller:de}),W=d.useRef(null),K=d.useRef(ee);d.useEffect(()=>{const D=C?g==null?void 0:g.ownerDocument.getElementById(C):g==null?void 0:g.form;if(D instanceof HTMLFormElement){const $=x(()=>G(K.current),"reset");return D.addEventListener("reset",$),()=>D.removeEventListener("reset",$)}},[C,g,G]);const te=g?!!C||!!g.closest("form"):!0,[z,H]=d.useState(new Set),Y=Oe(),q=Array.from(z).map(D=>D.props.value).join(";"),X=d.useCallback(D=>{H($=>new Set($).add(D))},[]),F=d.useCallback(D=>{H($=>{const ce=new Set($);return ce.delete(D),ce})},[]),ae={required:y,trigger:g,onTriggerChange:T,valueNode:h,onValueNodeChange:f,valueNodeHasChildren:R,onValueNodeHasChildrenChange:j,contentId:Y,value:ee,onValueChange:G,open:A,onOpenChange:V,dir:J,triggerPointerDownPosRef:W,disabled:w,name:m,autoComplete:v,form:C,nativeOptions:z,nativeSelectKey:q,isFormControl:te};return u.jsx(wt,{...p,children:u.jsx(At,{scope:o,...ae,children:u.jsx(he.Provider,{scope:o,children:u.jsx(Lt,{scope:o,onNativeOptionAdd:X,onNativeOptionRemove:F,children:tt(I)?I(ae):e})})})})}x(We,"SelectProvider");var Vt=x(l=>{const{__scopeSelect:o,children:e,...t}=l;return u.jsx(We,{__scopeSelect:o,...t,internal_do_not_use_render:({isFormControl:s})=>u.jsxs(u.Fragment,{children:[e,s?u.jsx(co,{__scopeSelect:o}):null]})})},"Select"),Ht="SelectTrigger",Ke=d.forwardRef(x(function(o,e){const{__scopeSelect:t,disabled:s=!1,...n}=o,r=be(t),a=Q(Ht,t),c=a.disabled||s,i=U(e,a.onTriggerChange),m=ge(t),v=d.useRef("touch"),[w,y,C]=Te(p=>{const g=m().filter(f=>!f.disabled),T=g.find(f=>f.value===a.value),h=Pe(g,p,T);h!==void 0&&a.onValueChange(h.value)}),I=x(p=>{c||(a.onOpenChange(!0),C()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})},"handleOpen");return u.jsx(lt,{asChild:!0,...r,children:u.jsx(L.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pe(a.value)?"":void 0,...n,ref:i,onClick:E(n.onClick,p=>{p.currentTarget.focus(),v.current!=="mouse"&&I(p)}),onPointerDown:E(n.onPointerDown,p=>{v.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(I(p),p.preventDefault())}),onKeyDown:E(n.onKeyDown,p=>{const g=w.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&Mt.includes(p.key)&&(I(),p.preventDefault())})})})},"SelectTrigger")),Ft="SelectValue",$t=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,children:r,placeholder:a="",...c}=o,i=Q(Ft,t),{onValueNodeHasChildrenChange:m}=i,v=r!==void 0,w=U(e,i.onValueNodeChange);Z(()=>{m(v)},[m,v]);const y=pe(i.value);return u.jsx(L.span,{...c,asChild:y?!1:c.asChild,ref:w,style:{pointerEvents:"none"},children:u.jsx(d.Fragment,{children:y?a:r},y?"placeholder":"value")})},"SelectValue")),Ut=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,...n}=o;return u.jsx(L.span,{"aria-hidden":!0,...n,ref:e,children:s||"▼"})},"SelectIcon")),Wt="SelectPortal",[Kt,zt]=re(Wt,{forceMount:void 0}),Gt=x(l=>{const{__scopeSelect:o,forceMount:e,...t}=l;return u.jsx(Kt,{scope:l.__scopeSelect,forceMount:e,children:u.jsx(at,{asChild:!0,...t})})},"SelectPortal"),se="SelectContent",ze=d.forwardRef(x(function(o,e){const t=zt(se,o.__scopeSelect),{forceMount:s=t.forceMount,...n}=o,r=Q(se,o.__scopeSelect),[a,c]=d.useState();return Z(()=>{c(new DocumentFragment)},[]),u.jsx(ct,{present:s||r.open,children:({present:i})=>i?u.jsx(Xt,{...n,ref:e}):u.jsx(Yt,{...n,fragment:a})})},"SelectContent")),Yt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,fragment:n}=o;return n?De.createPortal(u.jsx(Ge,{scope:t,children:u.jsx(he.Slot,{scope:t,children:u.jsx("div",{ref:e,children:s})})}),n):null},"SelectContentFragment")),B=10,[Ge,le]=re(se),qt=gt("SelectContent.RemoveScroll"),Xt=d.forwardRef(x(function(o,e){const{__scopeSelect:t}=o,{position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:r,onPointerDownOutside:a,side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g,...T}=o,h=Q(se,t),[f,R]=d.useState(null),[j,J]=d.useState(null),A=U(e,R),[V,ee]=d.useState(null),[G,W]=d.useState(null),K=ge(t),[te,z]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(f)return dt(f)},[f]),ut();const Y=d.useCallback(S=>{const[N,...O]=K().map(P=>P.ref.current),[_]=O.slice(-1),b=document.activeElement;for(const P of S)if(P===b||(P==null||P.scrollIntoView({block:"nearest"}),P===N&&j&&(j.scrollTop=0),P===_&&j&&(j.scrollTop=j.scrollHeight),P==null||P.focus(),document.activeElement!==b))return},[K,j]),q=d.useCallback(()=>Y([V,f]),[Y,V,f]);d.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:X,triggerPointerDownPosRef:F}=h;d.useEffect(()=>{if(f){let S={x:0,y:0};const N=x(_=>{var b,P;S={x:Math.abs(Math.round(_.pageX)-(((b=F.current)==null?void 0:b.x)??0)),y:Math.abs(Math.round(_.pageY)-(((P=F.current)==null?void 0:P.y)??0))}},"handlePointerMove"),O=x(_=>{S.x<=10&&S.y<=10?_.preventDefault():_.composedPath().includes(f)||X(!1),document.removeEventListener("pointermove",N),F.current=null},"handlePointerUp");return F.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[f,X,F]),d.useEffect(()=>{const S=x(()=>X(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[X]);const[ae,D]=Te(S=>{const N=K().filter(b=>!b.disabled),O=N.find(b=>b.ref.current===document.activeElement),_=Pe(N,S,O);_&&setTimeout(()=>{var b;return(b=_.ref.current)==null?void 0:b.focus()})}),$=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&(ee(S),_&&(H.current=!0))},[h.value]),ce=d.useCallback(()=>f==null?void 0:f.focus(),[f]),ie=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&W(S)},[h.value]),fe=s==="popper"?Ne:Zt,ue=fe===Ne?{side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g}:{};return u.jsx(Ge,{scope:t,content:f,viewport:j,onViewportChange:J,itemRefCallback:$,selectedItem:V,onItemLeave:ce,itemTextRefCallback:ie,focusSelectedItem:q,selectedItemText:G,position:s,isPositioned:te,searchRef:ae,children:u.jsx(pt,{as:qt,allowPinchZoom:!0,children:u.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:E(n,S=>{var N;(N=h.trigger)==null||N.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:S=>S.preventDefault(),...T,...ue,onPlaced:()=>z(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:E(T.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&D(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let _=K().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(S.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const b=S.target,P=_.indexOf(b);_=_.slice(P+1)}setTimeout(()=>Y(_)),S.preventDefault()}})})})})})})},"SelectContentImpl")),Zt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onPlaced:s,...n}=o,r=Q(se,t),a=le(se,t),[c,i]=d.useState(null),[m,v]=d.useState(null),w=U(e,v),y=ge(t),C=d.useRef(!1),I=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:T,focusSelectedItem:h}=a,f=d.useCallback(()=>{if(r.trigger&&r.valueNode&&c&&m&&p&&g&&T){const A=r.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),ee=r.valueNode.getBoundingClientRect(),G=T.getBoundingClientRect();if(r.dir!=="rtl"){const b=G.left-V.left,P=ee.left-b,oe=A.left-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.left=ve+"px"}else{const b=V.right-G.right,P=window.innerWidth-ee.right-b,oe=window.innerWidth-A.right-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.right=ve+"px"}const W=y(),K=window.innerHeight-B*2,te=p.scrollHeight,z=window.getComputedStyle(m),H=parseInt(z.borderTopWidth,10),Y=parseInt(z.paddingTop,10),q=parseInt(z.borderBottomWidth,10),X=parseInt(z.paddingBottom,10),F=H+Y+te+X+q,ae=Math.min(g.offsetHeight*5,F),D=window.getComputedStyle(p),$=parseInt(D.paddingTop,10),ce=parseInt(D.paddingBottom,10),ie=A.top+A.height/2-B,fe=K-ie,ue=g.offsetHeight/2,S=g.offsetTop+ue,N=H+Y+S,O=F-N;if(N<=ie){const b=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const P=m.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(fe,ue+(b?ce:0)+P+q),ne=N+oe;c.style.height=ne+"px"}else{const b=W.length>0&&g===W[0].ref.current;c.style.top="0px";const oe=Math.max(ie,H+p.offsetTop+(b?$:0)+ue)+O;c.style.height=oe+"px",p.scrollTop=N-ie+p.offsetTop}c.style.margin=`${B}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[y,r.trigger,r.valueNode,c,m,p,g,T,r.dir,s]);Z(()=>f(),[f]);const[R,j]=d.useState();Z(()=>{m&&j(window.getComputedStyle(m).zIndex)},[m]);const J=d.useCallback(A=>{A&&I.current===!0&&(f(),h==null||h(),I.current=!1)},[f,h]);return u.jsx(Qt,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:J,children:u.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(L.div,{...n,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Ne=d.forwardRef(x(function(o,e){const{__scopeSelect:t,align:s="start",collisionPadding:n=B,...r}=o,a=be(t);return u.jsx(St,{...a,...r,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...r.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")),[Qt,Ie]=re(se,{}),Re="SelectViewport",Jt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,nonce:s,...n}=o,r=le(Re,t),a=Ie(Re,t),c=U(e,r.onViewportChange),i=d.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(he.Slot,{scope:t,children:u.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:E(n.onScroll,m=>{const v=m.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&w){const C=Math.abs(i.current-v.scrollTop);if(C>0){const I=window.innerHeight-B*2,p=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),T=Math.max(p,g);if(T<I){const h=T+C,f=Math.min(I,h),R=h-f;w.style.height=f+"px",w.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,w.style.justifyContent="flex-end")}}}i.current=v.scrollTop})})})]})},"SelectViewport")),eo="SelectGroup",[Io,to]=re(eo),oo="SelectLabel",Ye=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o,n=to(oo,t);return u.jsx(L.div,{id:n.id,...s,ref:e})},"SelectLabel")),ye="SelectItem",[no,qe]=re(ye),Xe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,value:s,disabled:n=!1,textValue:r,...a}=o,c=Q(ye,t),i=le(ye,t),m=c.value===s,[v,w]=d.useState(r??""),[y,C]=d.useState(!1),I=Ce(f=>{var R;return(R=i.itemRefCallback)==null?void 0:R.call(i,f,s,n)}),p=U(e,I),g=Oe(),T=d.useRef("touch"),h=x(()=>{n||(c.onValueChange(s),c.onOpenChange(!1))},"handleSelect");return u.jsx(no,{scope:t,value:s,disabled:n,textId:g,isSelected:m,onItemTextChange:d.useCallback(f=>{w(R=>R||((f==null?void 0:f.textContent)??"").trim())},[]),children:u.jsx(he.ItemSlot,{scope:t,value:s,disabled:n,textValue:v,children:u.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...a,ref:p,onFocus:E(a.onFocus,()=>C(!0)),onBlur:E(a.onBlur,()=>C(!1)),onClick:E(a.onClick,()=>{T.current!=="mouse"&&h()}),onPointerUp:E(a.onPointerUp,()=>{T.current==="mouse"&&h()}),onPointerDown:E(a.onPointerDown,f=>{T.current=f.pointerType}),onPointerMove:E(a.onPointerMove,f=>{var R;T.current=f.pointerType,n?(R=i.onItemLeave)==null||R.call(i):T.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(a.onPointerLeave,f=>{var R;f.currentTarget===document.activeElement&&((R=i.onItemLeave)==null||R.call(i))}),onKeyDown:E(a.onKeyDown,f=>{var j;n||f.target!==f.currentTarget||((j=i.searchRef)==null?void 0:j.current)!==""&&f.key===" "||(Ot.includes(f.key)&&h(),f.key===" "&&f.preventDefault())})})})})},"SelectItem")),me="SelectItemText",so=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,...r}=o,a=Q(me,t),c=le(me,t),i=qe(me,t),m=Bt(me,t),[v,w]=d.useState(null),y=Ce(h=>{var f;return(f=c.itemTextRefCallback)==null?void 0:f.call(c,h,i.value,i.disabled)}),C=U(e,w,i.onItemTextChange,y),I=v==null?void 0:v.textContent,p=d.useMemo(()=>u.jsx("option",{value:i.value,disabled:i.disabled,children:I},i.value),[i.disabled,i.value,I]),{onNativeOptionAdd:g,onNativeOptionRemove:T}=m;return Z(()=>(g(p),()=>T(p)),[g,T,p]),u.jsxs(u.Fragment,{children:[u.jsx(L.span,{id:i.textId,...r,ref:C}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!pe(a.value)?De.createPortal(r.children,a.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",lo=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return qe(ro,t).isSelected?u.jsx(L.span,{"aria-hidden":!0,...s,ref:e}):null},"SelectItemIndicator")),je="SelectScrollUpButton",Ze=d.forwardRef(x(function(o,e){const t=le(je,o.__scopeSelect),s=Ie(je,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollTop>0;r(m)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Je,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null},"SelectScrollUpButton")),Ee="SelectScrollDownButton",Qe=d.forwardRef(x(function(o,e){const t=le(Ee,o.__scopeSelect),s=Ie(Ee,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollHeight-i.clientHeight,v=Math.ceil(i.scrollTop)<m;r(v)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Je,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null},"SelectScrollDownButton")),Je=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onAutoScroll:s,...n}=o,r=le("SelectScrollButton",t),a=d.useRef(null),c=ge(t),i=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),Z(()=>{var v;const m=c().find(w=>w.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),u.jsx(L.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:E(n.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:E(n.onPointerMove,()=>{var m;(m=r.onItemLeave)==null||m.call(r),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:E(n.onPointerLeave,()=>{i()})})},"SelectScrollButtonImpl")),et=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return u.jsx(L.div,{"aria-hidden":!0,...s,ref:e})},"SelectSeparator")),ao="SelectBubbleInput",co=d.forwardRef(x(function({__scopeSelect:o,...e},t){const s=Q(ao,o),{value:n,onValueChange:r,required:a,disabled:c,name:i,autoComplete:m,form:v}=s,{nativeOptions:w,nativeSelectKey:y}=s,C=d.useRef(null),I=U(t,C),p=n??"",g=Ue(p),T=Array.from(w).some(h=>(h.props.value??"")==="");return d.useEffect(()=>{const h=C.current;if(!h)return;const f=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(f,"value").set;if(g!==p&&j){const J=new Event("change",{bubbles:!0});j.call(h,p),h.dispatchEvent(J)}},[g,p]),u.jsxs(L.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:i,autoComplete:m,disabled:c,form:v,onChange:h=>r(h.target.value),...e,style:{...xt,...e.style},ref:I,defaultValue:p,children:[pe(n)&&!T?u.jsx("option",{value:""}):null,Array.from(w)]},y)},"SelectBubbleInput"));function tt(l){return typeof l=="function"}x(tt,"isFunction");function pe(l){return l===""||l===void 0}x(pe,"shouldShowPlaceholder");function Te(l){const o=Ce(l),e=d.useRef(""),t=d.useRef(0),s=d.useCallback(r=>{const a=e.current+r;o(a),x((function c(i){e.current=i,window.clearTimeout(t.current),i!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(a)},[o]),n=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,s,n]}x(Te,"useTypeaheadSearch");function Pe(l,o,e){const s=o.length>1&&Array.from(o).every(i=>i===o[0])?o[0]:o,n=e?l.indexOf(e):-1;let r=ot(l,Math.max(n,0));s.length===1&&(r=r.filter(i=>i!==e));const c=r.find(i=>i.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==e?c:void 0}x(Pe,"findNextItem");function ot(l,o){return l.map((e,t)=>l[(o+t)%l.length])}x(ot,"wrapArray");const To=Vt,Po=$t,io=d.forwardRef((l,o)=>{const e=k.c(12);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=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),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(Ut,{asChild:!0,children:u.jsx(Fe,{className:"h-4 w-4 opacity-50"})}),e[6]=a):a=e[6];let c;return e[7]!==t||e[8]!==n||e[9]!==o||e[10]!==r?(c=u.jsxs(Ke,{ref:o,className:r,...n,children:[t,a]}),e[7]=t,e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],c});io.displayName=Ke.displayName;const nt=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(_t,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Ze,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});nt.displayName=Ze.displayName;const st=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(Fe,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Qe,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});st.displayName=Qe.displayName;const uo=d.forwardRef((l,o)=>{const e=k.c(21);let t,s,n,r;e[0]!==l?({className:s,children:t,position:r,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n,e[4]=r):(t=e[1],s=e[2],n=e[3],r=e[4]);const a=r===void 0?"popper":r,c=a==="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";let i;e[5]!==s||e[6]!==c?(i=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]",c,s),e[5]=s,e[6]=c,e[7]=i):i=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=u.jsx(nt,{}),e[8]=m):m=e[8];const v=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]";let w;e[9]!==v?(w=M("p-1",v),e[9]=v,e[10]=w):w=e[10];let y;e[11]!==t||e[12]!==w?(y=u.jsx(Jt,{className:w,children:t}),e[11]=t,e[12]=w,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=u.jsx(st,{}),e[14]=C):C=e[14];let I;return e[15]!==a||e[16]!==n||e[17]!==o||e[18]!==i||e[19]!==y?(I=u.jsx(Gt,{children:u.jsxs(ze,{ref:o,className:i,position:a,...n,children:[m,y,C]})}),e[15]=a,e[16]=n,e[17]=o,e[18]=i,e[19]=y,e[20]=I):I=e[20],I});uo.displayName=ze.displayName;const po=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ye,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});po.displayName=Ye.displayName;const fo=d.forwardRef((l,o)=>{const e=k.c(14);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=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),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(lo,{children:u.jsx(yt,{className:"h-4 w-4"})})}),e[6]=a):a=e[6];let c;e[7]!==t?(c=u.jsx(so,{children:t}),e[7]=t,e[8]=c):c=e[8];let i;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==c?(i=u.jsxs(Xe,{ref:o,className:r,...n,children:[a,c]}),e[9]=n,e[10]=o,e[11]=r,e[12]=c,e[13]=i):i=e[13],i});fo.displayName=Xe.displayName;const mo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(et,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});mo.displayName=et.displayName;const _o=Ct,No=bt,ho=It,rt=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=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",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Be,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});rt.displayName=Be.displayName;const go=d.forwardRef((l,o)=>{const e=k.c(13);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(rt,{}),e[4]=r):r=e[4];let a;e[5]!==s?(a=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),e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsxs(Tt,{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:[u.jsx(Pt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=c):c=e[7];let i;return e[8]!==t||e[9]!==n||e[10]!==o||e[11]!==a?(i=u.jsxs(ho,{children:[r,u.jsxs(Ae,{ref:o,className:a,...n,children:[t,c]})]}),e[8]=t,e[9]=n,e[10]=o,e[11]=a,e[12]=i):i=e[12],i});go.displayName=Ae.displayName;const So=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col space-y-1.5 text-center sm:text-left",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};So.displayName="DialogHeader";const xo=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};xo.displayName="DialogFooter";const vo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-lg font-semibold leading-none tracking-tight",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Le,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});vo.displayName=Le.displayName;const wo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-sm text-muted-foreground",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ve,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});wo.displayName=Ve.displayName;export{Fe as C,_o as D,To as S,go as a,wo as b,xo as c,So as d,vo as e,No as f,uo as g,fo as h,io as i,Po as j,we as k};
|
|
11
|
+
*/const Fe={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};Fe.node;const _t=Me(Fe);var Nt=Object.defineProperty,Rt=(l,o)=>Nt(l,"name",{value:o,configurable:!0});function we(l,[o,e]){return Math.min(e,Math.max(o,l))}Rt(we,"clamp");var Et=Object.defineProperty,jt=(l,o)=>Et(l,"name",{value:o,configurable:!0});function Ue(l){const o=d.useRef({value:l,previous:l});return d.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}jt(Ue,"usePrevious");var Dt=Object.defineProperty,x=(l,o)=>Dt(l,"name",{value:o,configurable:!0}),Mt=[" ","Enter","ArrowUp","ArrowDown"],Ot=[" ","Enter"],de="Select",[he,ge,kt]=it(de),[re,bo]=ht(de,[kt,ke]),be=ke(),[At,J]=re(de),[Lt,Bt]=re(de);function We(l){const{__scopeSelect:o,children:e,open:t,defaultOpen:s,onOpenChange:n,value:r,defaultValue:a,onValueChange:c,dir:i,name:m,autoComplete:v,disabled:w,required:y,form:C,internal_do_not_use_render:I}=l,p=be(o),[g,T]=d.useState(null),[h,f]=d.useState(null),[R,E]=d.useState(!1),Q=vt(i),[A,V]=_e({prop:t,defaultProp:s??!1,onChange:n,caller:de}),[ee,G]=_e({prop:r,defaultProp:a,onChange:c,caller:de}),W=d.useRef(null),K=d.useRef(ee);d.useEffect(()=>{const D=C?g==null?void 0:g.ownerDocument.getElementById(C):g==null?void 0:g.form;if(D instanceof HTMLFormElement){const F=x(()=>G(K.current),"reset");return D.addEventListener("reset",F),()=>D.removeEventListener("reset",F)}},[C,g,G]);const te=g?!!C||!!g.closest("form"):!0,[z,H]=d.useState(new Set),Y=Oe(),q=Array.from(z).map(D=>D.props.value).join(";"),X=d.useCallback(D=>{H(F=>new Set(F).add(D))},[]),$=d.useCallback(D=>{H(F=>{const ce=new Set(F);return ce.delete(D),ce})},[]),ae={required:y,trigger:g,onTriggerChange:T,valueNode:h,onValueNodeChange:f,valueNodeHasChildren:R,onValueNodeHasChildrenChange:E,contentId:Y,value:ee,onValueChange:G,open:A,onOpenChange:V,dir:Q,triggerPointerDownPosRef:W,disabled:w,name:m,autoComplete:v,form:C,nativeOptions:z,nativeSelectKey:q,isFormControl:te};return u.jsx(wt,{...p,children:u.jsx(At,{scope:o,...ae,children:u.jsx(he.Provider,{scope:o,children:u.jsx(Lt,{scope:o,onNativeOptionAdd:X,onNativeOptionRemove:$,children:tt(I)?I(ae):e})})})})}x(We,"SelectProvider");var Vt=x(l=>{const{__scopeSelect:o,children:e,...t}=l;return u.jsx(We,{__scopeSelect:o,...t,internal_do_not_use_render:({isFormControl:s})=>u.jsxs(u.Fragment,{children:[e,s?u.jsx(co,{__scopeSelect:o}):null]})})},"Select"),Ht="SelectTrigger",Ke=d.forwardRef(x(function(o,e){const{__scopeSelect:t,disabled:s=!1,...n}=o,r=be(t),a=J(Ht,t),c=a.disabled||s,i=U(e,a.onTriggerChange),m=ge(t),v=d.useRef("touch"),[w,y,C]=Te(p=>{const g=m().filter(f=>!f.disabled),T=g.find(f=>f.value===a.value),h=Pe(g,p,T);h!==void 0&&a.onValueChange(h.value)}),I=x(p=>{c||(a.onOpenChange(!0),C()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})},"handleOpen");return u.jsx(lt,{asChild:!0,...r,children:u.jsx(L.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pe(a.value)?"":void 0,...n,ref:i,onClick:j(n.onClick,p=>{p.currentTarget.focus(),v.current!=="mouse"&&I(p)}),onPointerDown:j(n.onPointerDown,p=>{v.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(I(p),p.preventDefault())}),onKeyDown:j(n.onKeyDown,p=>{const g=w.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&y(p.key),!(g&&p.key===" ")&&Mt.includes(p.key)&&(I(),p.preventDefault())})})})},"SelectTrigger")),$t="SelectValue",Ft=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,children:r,placeholder:a="",...c}=o,i=J($t,t),{onValueNodeHasChildrenChange:m}=i,v=r!==void 0,w=U(e,i.onValueNodeChange);Z(()=>{m(v)},[m,v]);const y=pe(i.value);return u.jsx(L.span,{...c,asChild:y?!1:c.asChild,ref:w,style:{pointerEvents:"none"},children:u.jsx(d.Fragment,{children:y?a:r},y?"placeholder":"value")})},"SelectValue")),Ut=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,...n}=o;return u.jsx(L.span,{"aria-hidden":!0,...n,ref:e,children:s||"▼"})},"SelectIcon")),Wt="SelectPortal",[Kt,zt]=re(Wt,{forceMount:void 0}),Gt=x(l=>{const{__scopeSelect:o,forceMount:e,...t}=l;return u.jsx(Kt,{scope:l.__scopeSelect,forceMount:e,children:u.jsx(at,{asChild:!0,...t})})},"SelectPortal"),se="SelectContent",ze=d.forwardRef(x(function(o,e){const t=zt(se,o.__scopeSelect),{forceMount:s=t.forceMount,...n}=o,r=J(se,o.__scopeSelect),[a,c]=d.useState();return Z(()=>{c(new DocumentFragment)},[]),u.jsx(ct,{present:s||r.open,children:({present:i})=>i?u.jsx(Xt,{...n,ref:e}):u.jsx(Yt,{...n,fragment:a})})},"SelectContent")),Yt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,children:s,fragment:n}=o;return n?De.createPortal(u.jsx(Ge,{scope:t,children:u.jsx(he.Slot,{scope:t,children:u.jsx("div",{ref:e,children:s})})}),n):null},"SelectContentFragment")),B=10,[Ge,le]=re(se),qt=gt("SelectContent.RemoveScroll"),Xt=d.forwardRef(x(function(o,e){const{__scopeSelect:t}=o,{position:s="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:r,onPointerDownOutside:a,side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g,...T}=o,h=J(se,t),[f,R]=d.useState(null),[E,Q]=d.useState(null),A=U(e,R),[V,ee]=d.useState(null),[G,W]=d.useState(null),K=ge(t),[te,z]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(f)return dt(f)},[f]),ut();const Y=d.useCallback(S=>{const[N,...O]=K().map(P=>P.ref.current),[_]=O.slice(-1),b=document.activeElement;for(const P of S)if(P===b||(P==null||P.scrollIntoView({block:"nearest"}),P===N&&E&&(E.scrollTop=0),P===_&&E&&(E.scrollTop=E.scrollHeight),P==null||P.focus(),document.activeElement!==b))return},[K,E]),q=d.useCallback(()=>Y([V,f]),[Y,V,f]);d.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:X,triggerPointerDownPosRef:$}=h;d.useEffect(()=>{if(f){let S={x:0,y:0};const N=x(_=>{var b,P;S={x:Math.abs(Math.round(_.pageX)-(((b=$.current)==null?void 0:b.x)??0)),y:Math.abs(Math.round(_.pageY)-(((P=$.current)==null?void 0:P.y)??0))}},"handlePointerMove"),O=x(_=>{S.x<=10&&S.y<=10?_.preventDefault():_.composedPath().includes(f)||X(!1),document.removeEventListener("pointermove",N),$.current=null},"handlePointerUp");return $.current!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",O,{capture:!0})}}},[f,X,$]),d.useEffect(()=>{const S=x(()=>X(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[X]);const[ae,D]=Te(S=>{const N=K().filter(b=>!b.disabled),O=N.find(b=>b.ref.current===document.activeElement),_=Pe(N,S,O);_&&setTimeout(()=>{var b;return(b=_.ref.current)==null?void 0:b.focus()})}),F=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&(ee(S),_&&(H.current=!0))},[h.value]),ce=d.useCallback(()=>f==null?void 0:f.focus(),[f]),ie=d.useCallback((S,N,O)=>{const _=!H.current&&!O;(h.value!==void 0&&h.value===N||_)&&W(S)},[h.value]),fe=s==="popper"?Ne:Zt,ue=fe===Ne?{side:c,sideOffset:i,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:y,collisionPadding:C,sticky:I,hideWhenDetached:p,avoidCollisions:g}:{};return u.jsx(Ge,{scope:t,content:f,viewport:E,onViewportChange:Q,itemRefCallback:F,selectedItem:V,onItemLeave:ce,itemTextRefCallback:ie,focusSelectedItem:q,selectedItemText:G,position:s,isPositioned:te,searchRef:ae,children:u.jsx(pt,{as:qt,allowPinchZoom:!0,children:u.jsx(ft,{asChild:!0,trapped:h.open,onMountAutoFocus:S=>{S.preventDefault()},onUnmountAutoFocus:j(n,S=>{var N;(N=h.trigger)==null||N.focus({preventScroll:!0}),S.preventDefault()}),children:u.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:S=>S.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:u.jsx(fe,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:S=>S.preventDefault(),...T,...ue,onPlaced:()=>z(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:j(T.onKeyDown,S=>{const N=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!N&&S.key.length===1&&D(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let _=K().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(S.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const b=S.target,P=_.indexOf(b);_=_.slice(P+1)}setTimeout(()=>Y(_)),S.preventDefault()}})})})})})})},"SelectContentImpl")),Zt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onPlaced:s,...n}=o,r=J(se,t),a=le(se,t),[c,i]=d.useState(null),[m,v]=d.useState(null),w=U(e,v),y=ge(t),C=d.useRef(!1),I=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:T,focusSelectedItem:h}=a,f=d.useCallback(()=>{if(r.trigger&&r.valueNode&&c&&m&&p&&g&&T){const A=r.trigger.getBoundingClientRect(),V=m.getBoundingClientRect(),ee=r.valueNode.getBoundingClientRect(),G=T.getBoundingClientRect();if(r.dir!=="rtl"){const b=G.left-V.left,P=ee.left-b,oe=A.left-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.left=ve+"px"}else{const b=V.right-G.right,P=window.innerWidth-ee.right-b,oe=window.innerWidth-A.right-P,ne=A.width+oe,Se=Math.max(ne,V.width),xe=window.innerWidth-B,ve=we(P,[B,Math.max(B,xe-Se)]);c.style.minWidth=ne+"px",c.style.right=ve+"px"}const W=y(),K=window.innerHeight-B*2,te=p.scrollHeight,z=window.getComputedStyle(m),H=parseInt(z.borderTopWidth,10),Y=parseInt(z.paddingTop,10),q=parseInt(z.borderBottomWidth,10),X=parseInt(z.paddingBottom,10),$=H+Y+te+X+q,ae=Math.min(g.offsetHeight*5,$),D=window.getComputedStyle(p),F=parseInt(D.paddingTop,10),ce=parseInt(D.paddingBottom,10),ie=A.top+A.height/2-B,fe=K-ie,ue=g.offsetHeight/2,S=g.offsetTop+ue,N=H+Y+S,O=$-N;if(N<=ie){const b=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const P=m.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(fe,ue+(b?ce:0)+P+q),ne=N+oe;c.style.height=ne+"px"}else{const b=W.length>0&&g===W[0].ref.current;c.style.top="0px";const oe=Math.max(ie,H+p.offsetTop+(b?F:0)+ue)+O;c.style.height=oe+"px",p.scrollTop=N-ie+p.offsetTop}c.style.margin=`${B}px 0`,c.style.minHeight=ae+"px",c.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>C.current=!0)}},[y,r.trigger,r.valueNode,c,m,p,g,T,r.dir,s]);Z(()=>f(),[f]);const[R,E]=d.useState();Z(()=>{m&&E(window.getComputedStyle(m).zIndex)},[m]);const Q=d.useCallback(A=>{A&&I.current===!0&&(f(),h==null||h(),I.current=!1)},[f,h]);return u.jsx(Jt,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:Q,children:u.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:u.jsx(L.div,{...n,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})},"SelectItemAlignedPosition")),Ne=d.forwardRef(x(function(o,e){const{__scopeSelect:t,align:s="start",collisionPadding:n=B,...r}=o,a=be(t);return u.jsx(St,{...a,...r,ref:e,align:s,collisionPadding:n,style:{boxSizing:"border-box",...r.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")),[Jt,Ie]=re(se,{}),Re="SelectViewport",Qt=d.forwardRef(x(function(o,e){const{__scopeSelect:t,nonce:s,...n}=o,r=le(Re,t),a=Ie(Re,t),c=U(e,r.onViewportChange),i=d.useRef(0);return u.jsxs(u.Fragment,{children:[u.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}),u.jsx(he.Slot,{scope:t,children:u.jsx(L.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:j(n.onScroll,m=>{const v=m.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:y}=a;if(y!=null&&y.current&&w){const C=Math.abs(i.current-v.scrollTop);if(C>0){const I=window.innerHeight-B*2,p=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),T=Math.max(p,g);if(T<I){const h=T+C,f=Math.min(I,h),R=h-f;w.style.height=f+"px",w.style.bottom==="0px"&&(v.scrollTop=R>0?R:0,w.style.justifyContent="flex-end")}}}i.current=v.scrollTop})})})]})},"SelectViewport")),eo="SelectGroup",[Io,to]=re(eo),oo="SelectLabel",Ye=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o,n=to(oo,t);return u.jsx(L.div,{id:n.id,...s,ref:e})},"SelectLabel")),ye="SelectItem",[no,qe]=re(ye),Xe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,value:s,disabled:n=!1,textValue:r,...a}=o,c=J(ye,t),i=le(ye,t),m=c.value===s,[v,w]=d.useState(r??""),[y,C]=d.useState(!1),I=Ce(f=>{var R;return(R=i.itemRefCallback)==null?void 0:R.call(i,f,s,n)}),p=U(e,I),g=Oe(),T=d.useRef("touch"),h=x(()=>{n||(c.onValueChange(s),c.onOpenChange(!1))},"handleSelect");return u.jsx(no,{scope:t,value:s,disabled:n,textId:g,isSelected:m,onItemTextChange:d.useCallback(f=>{w(R=>R||((f==null?void 0:f.textContent)??"").trim())},[]),children:u.jsx(he.ItemSlot,{scope:t,value:s,disabled:n,textValue:v,children:u.jsx(L.div,{role:"option","aria-labelledby":g,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...a,ref:p,onFocus:j(a.onFocus,()=>C(!0)),onBlur:j(a.onBlur,()=>C(!1)),onClick:j(a.onClick,()=>{T.current!=="mouse"&&h()}),onPointerUp:j(a.onPointerUp,()=>{T.current==="mouse"&&h()}),onPointerDown:j(a.onPointerDown,f=>{T.current=f.pointerType}),onPointerMove:j(a.onPointerMove,f=>{var R;T.current=f.pointerType,n?(R=i.onItemLeave)==null||R.call(i):T.current==="mouse"&&f.currentTarget.focus({preventScroll:!0})}),onPointerLeave:j(a.onPointerLeave,f=>{var R;f.currentTarget===document.activeElement&&((R=i.onItemLeave)==null||R.call(i))}),onKeyDown:j(a.onKeyDown,f=>{var E;n||f.target!==f.currentTarget||((E=i.searchRef)==null?void 0:E.current)!==""&&f.key===" "||(Ot.includes(f.key)&&h(),f.key===" "&&f.preventDefault())})})})})},"SelectItem")),me="SelectItemText",so=d.forwardRef(x(function(o,e){const{__scopeSelect:t,className:s,style:n,...r}=o,a=J(me,t),c=le(me,t),i=qe(me,t),m=Bt(me,t),[v,w]=d.useState(null),y=Ce(h=>{var f;return(f=c.itemTextRefCallback)==null?void 0:f.call(c,h,i.value,i.disabled)}),C=U(e,w,i.onItemTextChange,y),I=v==null?void 0:v.textContent,p=d.useMemo(()=>u.jsx("option",{value:i.value,disabled:i.disabled,children:I},i.value),[i.disabled,i.value,I]),{onNativeOptionAdd:g,onNativeOptionRemove:T}=m;return Z(()=>(g(p),()=>T(p)),[g,T,p]),u.jsxs(u.Fragment,{children:[u.jsx(L.span,{id:i.textId,...r,ref:C}),i.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!pe(a.value)?De.createPortal(r.children,a.valueNode):null]})},"SelectItemText")),ro="SelectItemIndicator",lo=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return qe(ro,t).isSelected?u.jsx(L.span,{"aria-hidden":!0,...s,ref:e}):null},"SelectItemIndicator")),Ee="SelectScrollUpButton",Ze=d.forwardRef(x(function(o,e){const t=le(Ee,o.__scopeSelect),s=Ie(Ee,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollTop>0;r(m)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null},"SelectScrollUpButton")),je="SelectScrollDownButton",Je=d.forwardRef(x(function(o,e){const t=le(je,o.__scopeSelect),s=Ie(je,o.__scopeSelect),[n,r]=d.useState(!1),a=U(e,s.onScrollButtonChange);return Z(()=>{if(t.viewport&&t.isPositioned){let c=function(){const m=i.scrollHeight-i.clientHeight,v=Math.ceil(i.scrollTop)<m;r(v)};x(c,"handleScroll");const i=t.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),n?u.jsx(Qe,{...o,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=t;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null},"SelectScrollDownButton")),Qe=d.forwardRef(x(function(o,e){const{__scopeSelect:t,onAutoScroll:s,...n}=o,r=le("SelectScrollButton",t),a=d.useRef(null),c=ge(t),i=d.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),Z(()=>{var v;const m=c().find(w=>w.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[c]),u.jsx(L.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:j(n.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(s,50))}),onPointerMove:j(n.onPointerMove,()=>{var m;(m=r.onItemLeave)==null||m.call(r),a.current===null&&(a.current=window.setInterval(s,50))}),onPointerLeave:j(n.onPointerLeave,()=>{i()})})},"SelectScrollButtonImpl")),et=d.forwardRef(x(function(o,e){const{__scopeSelect:t,...s}=o;return u.jsx(L.div,{"aria-hidden":!0,...s,ref:e})},"SelectSeparator")),ao="SelectBubbleInput",co=d.forwardRef(x(function({__scopeSelect:o,...e},t){const s=J(ao,o),{value:n,onValueChange:r,required:a,disabled:c,name:i,autoComplete:m,form:v}=s,{nativeOptions:w,nativeSelectKey:y}=s,C=d.useRef(null),I=U(t,C),p=n??"",g=Ue(p),T=Array.from(w).some(h=>(h.props.value??"")==="");return d.useEffect(()=>{const h=C.current;if(!h)return;const f=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(f,"value").set;if(g!==p&&E){const Q=new Event("change",{bubbles:!0});E.call(h,p),h.dispatchEvent(Q)}},[g,p]),u.jsxs(L.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:i,autoComplete:m,disabled:c,form:v,onChange:h=>r(h.target.value),...e,style:{...xt,...e.style},ref:I,defaultValue:p,children:[pe(n)&&!T?u.jsx("option",{value:""}):null,Array.from(w)]},y)},"SelectBubbleInput"));function tt(l){return typeof l=="function"}x(tt,"isFunction");function pe(l){return l===""||l===void 0}x(pe,"shouldShowPlaceholder");function Te(l){const o=Ce(l),e=d.useRef(""),t=d.useRef(0),s=d.useCallback(r=>{const a=e.current+r;o(a),x((function c(i){e.current=i,window.clearTimeout(t.current),i!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch")(a)},[o]),n=d.useCallback(()=>{e.current="",window.clearTimeout(t.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(t.current),[]),[e,s,n]}x(Te,"useTypeaheadSearch");function Pe(l,o,e){const s=o.length>1&&Array.from(o).every(i=>i===o[0])?o[0]:o,n=e?l.indexOf(e):-1;let r=ot(l,Math.max(n,0));s.length===1&&(r=r.filter(i=>i!==e));const c=r.find(i=>i.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==e?c:void 0}x(Pe,"findNextItem");function ot(l,o){return l.map((e,t)=>l[(o+t)%l.length])}x(ot,"wrapArray");const To=Vt,Po=Ft,io=d.forwardRef((l,o)=>{const e=k.c(12);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=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),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(Ut,{asChild:!0,children:u.jsx($e,{className:"h-4 w-4 opacity-50"})}),e[6]=a):a=e[6];let c;return e[7]!==t||e[8]!==n||e[9]!==o||e[10]!==r?(c=u.jsxs(Ke,{ref:o,className:r,...n,children:[t,a]}),e[7]=t,e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],c});io.displayName=Ke.displayName;const nt=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(_t,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Ze,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});nt.displayName=Ze.displayName;const st=d.forwardRef((l,o)=>{const e=k.c(10);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx($e,{className:"h-4 w-4"}),e[5]=r):r=e[5];let a;return e[6]!==s||e[7]!==o||e[8]!==n?(a=u.jsx(Je,{ref:o,className:n,...s,children:r}),e[6]=s,e[7]=o,e[8]=n,e[9]=a):a=e[9],a});st.displayName=Je.displayName;const uo=d.forwardRef((l,o)=>{const e=k.c(21);let t,s,n,r;e[0]!==l?({className:s,children:t,position:r,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n,e[4]=r):(t=e[1],s=e[2],n=e[3],r=e[4]);const a=r===void 0?"popper":r,c=a==="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";let i;e[5]!==s||e[6]!==c?(i=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]",c,s),e[5]=s,e[6]=c,e[7]=i):i=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=u.jsx(nt,{}),e[8]=m):m=e[8];const v=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]";let w;e[9]!==v?(w=M("p-1",v),e[9]=v,e[10]=w):w=e[10];let y;e[11]!==t||e[12]!==w?(y=u.jsx(Qt,{className:w,children:t}),e[11]=t,e[12]=w,e[13]=y):y=e[13];let C;e[14]===Symbol.for("react.memo_cache_sentinel")?(C=u.jsx(st,{}),e[14]=C):C=e[14];let I;return e[15]!==a||e[16]!==n||e[17]!==o||e[18]!==i||e[19]!==y?(I=u.jsx(Gt,{children:u.jsxs(ze,{ref:o,className:i,position:a,...n,children:[m,y,C]})}),e[15]=a,e[16]=n,e[17]=o,e[18]=i,e[19]=y,e[20]=I):I=e[20],I});uo.displayName=ze.displayName;const po=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("py-1.5 pl-8 pr-2 text-sm font-semibold",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ye,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});po.displayName=Ye.displayName;const fo=d.forwardRef((l,o)=>{const e=k.c(14);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]!==s?(r=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),e[4]=s,e[5]=r):r=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(lo,{children:u.jsx(yt,{className:"h-4 w-4"})})}),e[6]=a):a=e[6];let c;e[7]!==t?(c=u.jsx(so,{children:t}),e[7]=t,e[8]=c):c=e[8];let i;return e[9]!==n||e[10]!==o||e[11]!==r||e[12]!==c?(i=u.jsxs(Xe,{ref:o,className:r,...n,children:[a,c]}),e[9]=n,e[10]=o,e[11]=r,e[12]=c,e[13]=i):i=e[13],i});fo.displayName=Xe.displayName;const mo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("-mx-1 my-1 h-px bg-muted",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(et,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});mo.displayName=et.displayName;const _o=Ct,No=bt,ho=It,rt=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=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",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Be,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});rt.displayName=Be.displayName;const go=d.forwardRef((l,o)=>{const e=k.c(13);let t,s,n;e[0]!==l?({className:s,children:t,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=u.jsx(rt,{}),e[4]=r):r=e[4];let a;e[5]!==s?(a=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),e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=u.jsxs(Tt,{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:[u.jsx(Pt,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]}),e[7]=c):c=e[7];let i;return e[8]!==t||e[9]!==n||e[10]!==o||e[11]!==a?(i=u.jsxs(ho,{children:[r,u.jsxs(Ae,{ref:o,className:a,...n,children:[t,c]})]}),e[8]=t,e[9]=n,e[10]=o,e[11]=a,e[12]=i):i=e[12],i});go.displayName=Ae.displayName;const So=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col space-y-1.5 text-center sm:text-left",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};So.displayName="DialogHeader";const xo=l=>{const o=k.c(8);let e,t;o[0]!==l?({className:e,...t}=l,o[0]=l,o[1]=e,o[2]=t):(e=o[1],t=o[2]);let s;o[3]!==e?(s=M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),o[3]=e,o[4]=s):s=o[4];let n;return o[5]!==t||o[6]!==s?(n=u.jsx("div",{className:s,...t}),o[5]=t,o[6]=s,o[7]=n):n=o[7],n};xo.displayName="DialogFooter";const vo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-lg font-semibold leading-none tracking-tight",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Le,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});vo.displayName=Le.displayName;const wo=d.forwardRef((l,o)=>{const e=k.c(9);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let n;e[3]!==t?(n=M("text-sm text-muted-foreground",t),e[3]=t,e[4]=n):n=e[4];let r;return e[5]!==s||e[6]!==o||e[7]!==n?(r=u.jsx(Ve,{ref:o,className:n,...s}),e[5]=s,e[6]=o,e[7]=n,e[8]=r):r=e[8],r});wo.displayName=Ve.displayName;export{$e as C,_o as D,To as S,go as a,wo as b,xo as c,So as d,vo as e,No as f,uo as g,fo as h,io as i,Po as j,we as k};
|
|
Binary file
|
|
Binary file
|