@plumix/admin 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{-errors-B7tAsyM0.js → -errors-DymGkXzf.js} +1 -1
  3. package/dist/assets/{-locale-param-XM9QLmJ5.js → -locale-param-BBOzOc5c.js} +1 -1
  4. package/dist/assets/{_-o9O44bb8.js → _-DbGPlcLC.js} +1 -1
  5. package/dist/assets/{_authenticated-X8_ZzeVN.js → _authenticated-CxUnTydB.js} +1 -1
  6. package/dist/assets/{_authenticated-BZbICTCy.js → _authenticated-DbZWnirz.js} +1 -1
  7. package/dist/assets/{_name-CsTxHact.js → _name-BWrqcSjK.js} +1 -1
  8. package/dist/assets/{_page-CAfqCxMM.js → _page-BMWM_crl.js} +1 -1
  9. package/dist/assets/{_page-Jgddg0I9.js → _page-ClAHWpJA.js} +1 -1
  10. package/dist/assets/{_slug-CrB5RfaF.js → _slug-BGJ2I-cS.js} +1 -1
  11. package/dist/assets/{_token-9qw8O07B.js → _token-BDyoqyFe.js} +1 -1
  12. package/dist/assets/{allowed-domains-BD1FIWo8.js → allowed-domains-DIQ_LoVq.js} +1 -1
  13. package/dist/assets/{bootstrap-BjA3jejx.js → bootstrap-D1ITzrPN.js} +1 -1
  14. package/dist/assets/{breadcrumb-kPG_yvD8.js → breadcrumb-B-sB8a4_.js} +1 -1
  15. package/dist/assets/{create-CbIyckzX.js → create-BFQqxGF6.js} +1 -1
  16. package/dist/assets/{create-XNWvL9l5.js → create-BrPyaUMW.js} +1 -1
  17. package/dist/assets/{create-c0dH9rwJ.js → create-DwlFRgkL.js} +1 -1
  18. package/dist/assets/{device-CDHXIM5L.js → device-DedwLhBj.js} +1 -1
  19. package/dist/assets/{edit-Q_Ag31Id.js → edit-Ba0VjKvg.js} +1 -1
  20. package/dist/assets/{edit-Cs_d9ypU.js → edit-BdagVECm.js} +1 -1
  21. package/dist/assets/{edit-tkHAT4Yi.js → edit-BgcIFZzf.js} +1 -1
  22. package/dist/assets/{edit-BDJmvbS1.js → edit-CLa1IU8I.js} +1 -1
  23. package/dist/assets/{edit-okoLRzq-.js → edit-CteELL-K.js} +2 -2
  24. package/dist/assets/{edit-D16wc7LS.js → edit-DiaJf7-W.js} +1 -1
  25. package/dist/assets/{index-kTp--tHG.js → index-Ctqj4aiM.js} +2 -2
  26. package/dist/assets/{login-DZOKYIF-.js → login-epTUDW_0.js} +1 -1
  27. package/dist/assets/{mailer-Dyww1jwK.js → mailer-HpDxW8FX.js} +1 -1
  28. package/dist/assets/{meta-box-D-8lfuwU.js → meta-box-Dd1vNvwM.js} +1 -1
  29. package/dist/assets/{meta-box-field-r9w3rM8k.js → meta-box-field-C4Orbu3m.js} +1 -1
  30. package/dist/assets/{meta-box-grid-Dr2ygaxj.js → meta-box-grid-BfWeRDWA.js} +1 -1
  31. package/dist/assets/{plugin-error-boundary-cYpGGruP.js → plugin-error-boundary-DSHOAgQB.js} +1 -1
  32. package/dist/assets/{rich-text-field-B4Til-yn.js → rich-text-field-KC3ZBBIm.js} +1 -1
  33. package/dist/assets/{search-input-BDIFOLpj.js → search-input-J0-6kfsf.js} +1 -1
  34. package/dist/assets/{settings-Bi5BNc6-.js → settings-CkVoTIwd.js} +1 -1
  35. package/dist/assets/{toast-COG8MRHM.js → toast-p1K24g-U.js} +1 -1
  36. package/dist/assets/{use-formatters-ww2p-9js.js → use-formatters-Bq4u-MkS.js} +1 -1
  37. package/dist/assets/{users-CICoUBVu.js → users-S1uN00sD.js} +1 -1
  38. package/dist/assets/{utils-DkCVtsc2.js → utils-ByiwTMhM.js} +1 -1
  39. package/dist/index.html +1 -1
  40. package/package.json +6 -6
@@ -1 +1 @@
1
- import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{n as r}from"./dist-BL2bKHuR.js";import{f as i,t as a}from"./orpc-DURDArDu.js";import{l as o}from"./esm-DfD3iRfG.js";import{t as s}from"./createLucideIcon-C0O-yxZG.js";import{n as c,r as l,t as u}from"./search-input-BDIFOLpj.js";import{N as d,X as f}from"./utils-DkCVtsc2.js";import{t as p}from"./use-label-CykSHq9A.js";import{t as m}from"./use-formatters-ww2p-9js.js";import{A as h,At as g,F as _,I as v,L as y,M as b,Nt as x,Ot as S,P as C,Pt as w,R as T,V as E,jt as D,kt as O,z as k}from"./index-kTp--tHG.js";import{n as A,t as j}from"./alert-cwX3fWUu.js";import{t as M}from"./dates-CSmOj6E-.js";var N=s(`user-plus`,[[`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`}]]),P=e(n()),F=e(t()),I=20;[...b];var L={admin:`default`,editor:`default`,author:`secondary`,contributor:`secondary`,subscriber:`outline`},R={searchPlaceholder:{id:`users.list.searchPlaceholder`},loadingLabel:{id:`users.list.loading`},loadFailed:{id:`users.list.loadFailed`},roleFilterAria:{id:`users.list.roleFilter.aria`},roleFilterAll:{id:`users.list.roleFilter.all`},columnUser:{id:`users.list.column.user`},columnRole:{id:`users.list.column.role`},columnStatus:{id:`users.list.column.status`},columnLastSignIn:{id:`users.list.column.lastSignIn`},columnCreated:{id:`users.list.column.created`}};function z(){let e=h.useNavigate();return{setRole:(0,P.useCallback)(t=>{e({search:e=>({...e,role:t,page:1})})},[e]),setPage:(0,P.useCallback)(t=>{e({search:e=>({...e,page:t})})},[e]),setSearch:(0,P.useCallback)(t=>{e({search:e=>({...e,q:t,page:1})})},[e])}}function B(){let e=h.useSearch(),{user:t}=h.useRouteContext(),n=p(),s=i(a.user.list.queryOptions({input:{limit:I,offset:(e.page-1)*I,...e.role===`all`?{}:{role:e.role},...e.q?{search:e.q}:{}}})),{setRole:d,setPage:f,setSearch:g}=z(),_=s.data??[],v=e.page>1,y=_.length===I,b=E(t.capabilities,`user:create`),{formatDate:x,formatRelative:S}=m(),C=(0,P.useMemo)(()=>V({currentUserId:t.id,formatDate:x,formatRelative:S,label:n}),[t.id,x,S,n]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsx)(`div`,{children:(0,F.jsx)(`h1`,{"data-testid":`users-list-heading`,className:`text-2xl font-semibold`,children:(0,F.jsx)(r,{id:`users.list.title`,message:`Users`})})}),b?(0,F.jsx)(w,{asChild:!0,children:(0,F.jsxs)(o,{to:`/users/create`,"data-testid":`users-list-invite-button`,children:[(0,F.jsx)(N,{}),(0,F.jsx)(r,{id:`users.list.invite`,message:`Add new`})]})}):null]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(H,{value:e.role,onChange:d}),(0,F.jsx)(`div`,{className:`ms-auto`,children:(0,F.jsx)(u,{initialValue:e.q??``,placeholder:n(R.searchPlaceholder),testId:`users-list-search-input`,onCommit:g},e.q??``)})]}),s.isError?(0,F.jsx)(j,{variant:`destructive`,children:(0,F.jsx)(A,{children:n(s.error instanceof Error?s.error.message:R.loadFailed)})}):(0,F.jsx)(l,{columns:C,data:_,isLoading:s.isPending,loadingLabel:n(R.loadingLabel),emptyState:(0,F.jsx)(U,{canInvite:b})}),(0,F.jsx)(c,{page:e.page,canPrev:v,canNext:y,isLoading:s.isPending,onPageChange:f})]})}function V({currentUserId:e,formatDate:t,formatRelative:n,label:i}){return[{accessorKey:`name`,header:i(R.columnUser),cell:({row:t})=>{let n=t.original,i=n.id===e;return(0,F.jsxs)(`div`,{className:`flex flex-col`,"data-testid":`users-list-row-${String(n.id)}`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[n.name??(0,F.jsx)(`span`,{className:`text-muted-foreground italic`,children:(0,F.jsx)(r,{id:`users.list.row.noName`,message:`(no name)`})}),i?(0,F.jsx)(d,{variant:`outline`,className:`text-xs`,"data-testid":`users-list-row-you`,children:(0,F.jsx)(r,{id:`users.list.row.you`,message:`You`})}):null]}),(0,F.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n.email})]})}},{accessorKey:`role`,header:i(R.columnRole),cell:({row:e})=>(0,F.jsx)(d,{variant:L[e.original.role],className:`capitalize`,children:i(k[e.original.role])})},{accessorKey:`disabledAt`,header:i(R.columnStatus),cell:({row:e})=>{let t=e.original.disabledAt!=null;return(0,F.jsx)(d,{variant:t?`destructive`:`secondary`,children:t?(0,F.jsx)(r,{id:`users.list.row.disabled`,message:`Disabled`}):(0,F.jsx)(r,{id:`users.list.row.active`,message:`Active`})})}},{accessorKey:`lastSignInAt`,meta:{className:`text-end`},header:i(R.columnLastSignIn),cell:({row:e})=>{let t=e.original.lastSignInAt;return t==null?(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm italic`,children:(0,F.jsx)(r,{id:`users.list.row.lastSignIn.never`,message:`Never`})}):(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:n(M(t))})}},{accessorKey:`createdAt`,meta:{className:`text-end`},header:i(R.columnCreated),cell:({row:e})=>(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:t(M(e.original.createdAt),{dateStyle:`medium`})})}]}function H({value:e,onChange:t}){let n=p();return(0,F.jsxs)(C,{value:e,onValueChange:e=>{t(e)},children:[(0,F.jsx)(y,{size:`sm`,"aria-label":n(R.roleFilterAria),"data-testid":`users-role-filter`,className:`w-[180px]`,children:(0,F.jsx)(T,{})}),(0,F.jsxs)(_,{children:[(0,F.jsx)(v,{value:`all`,"data-testid":`users-role-filter-all`,children:n(R.roleFilterAll)}),b.map(e=>(0,F.jsx)(v,{value:e,"data-testid":`users-role-filter-${e}`,children:n(k[e])},e))]})]})}function U({canInvite:e}){return(0,F.jsxs)(S,{"data-testid":`users-list-empty-state`,className:`border`,children:[(0,F.jsxs)(D,{children:[(0,F.jsx)(x,{children:(0,F.jsx)(r,{id:`users.list.empty.title`,message:`No users match your filter`})}),(0,F.jsx)(g,{children:(0,F.jsx)(r,{id:`users.list.empty.description`,message:`Clear the filter, or invite someone new to join.`})})]}),(0,F.jsx)(O,{children:e?(0,F.jsx)(w,{asChild:!0,children:(0,F.jsxs)(o,{to:`/users/create`,children:[(0,F.jsx)(f,{}),(0,F.jsx)(r,{id:`users.list.empty.invite`,message:`Invite user`})]})}):(0,F.jsxs)(w,{disabled:!0,children:[(0,F.jsx)(f,{}),(0,F.jsx)(r,{id:`users.list.empty.invite`,message:`Invite user`})]})})]})}export{B as component};
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{n as r}from"./dist-BL2bKHuR.js";import{f as i,t as a}from"./orpc-DURDArDu.js";import{l as o}from"./esm-DfD3iRfG.js";import{t as s}from"./createLucideIcon-C0O-yxZG.js";import{n as c,r as l,t as u}from"./search-input-J0-6kfsf.js";import{N as d,X as f}from"./utils-ByiwTMhM.js";import{t as p}from"./use-label-CykSHq9A.js";import{t as m}from"./use-formatters-Bq4u-MkS.js";import{A as h,At as g,F as _,I as v,L as y,M as b,Nt as x,Ot as S,P as C,Pt as w,R as T,V as E,jt as D,kt as O,z as k}from"./index-Ctqj4aiM.js";import{n as A,t as j}from"./alert-cwX3fWUu.js";import{t as M}from"./dates-CSmOj6E-.js";var N=s(`user-plus`,[[`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`}]]),P=e(n()),F=e(t()),I=20;[...b];var L={admin:`default`,editor:`default`,author:`secondary`,contributor:`secondary`,subscriber:`outline`},R={searchPlaceholder:{id:`users.list.searchPlaceholder`},loadingLabel:{id:`users.list.loading`},loadFailed:{id:`users.list.loadFailed`},roleFilterAria:{id:`users.list.roleFilter.aria`},roleFilterAll:{id:`users.list.roleFilter.all`},columnUser:{id:`users.list.column.user`},columnRole:{id:`users.list.column.role`},columnStatus:{id:`users.list.column.status`},columnLastSignIn:{id:`users.list.column.lastSignIn`},columnCreated:{id:`users.list.column.created`}};function z(){let e=h.useNavigate();return{setRole:(0,P.useCallback)(t=>{e({search:e=>({...e,role:t,page:1})})},[e]),setPage:(0,P.useCallback)(t=>{e({search:e=>({...e,page:t})})},[e]),setSearch:(0,P.useCallback)(t=>{e({search:e=>({...e,q:t,page:1})})},[e])}}function B(){let e=h.useSearch(),{user:t}=h.useRouteContext(),n=p(),s=i(a.user.list.queryOptions({input:{limit:I,offset:(e.page-1)*I,...e.role===`all`?{}:{role:e.role},...e.q?{search:e.q}:{}}})),{setRole:d,setPage:f,setSearch:g}=z(),_=s.data??[],v=e.page>1,y=_.length===I,b=E(t.capabilities,`user:create`),{formatDate:x,formatRelative:S}=m(),C=(0,P.useMemo)(()=>V({currentUserId:t.id,formatDate:x,formatRelative:S,label:n}),[t.id,x,S,n]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsx)(`div`,{children:(0,F.jsx)(`h1`,{"data-testid":`users-list-heading`,className:`text-2xl font-semibold`,children:(0,F.jsx)(r,{id:`users.list.title`,message:`Users`})})}),b?(0,F.jsx)(w,{asChild:!0,children:(0,F.jsxs)(o,{to:`/users/create`,"data-testid":`users-list-invite-button`,children:[(0,F.jsx)(N,{}),(0,F.jsx)(r,{id:`users.list.invite`,message:`Add new`})]})}):null]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(H,{value:e.role,onChange:d}),(0,F.jsx)(`div`,{className:`ms-auto`,children:(0,F.jsx)(u,{initialValue:e.q??``,placeholder:n(R.searchPlaceholder),testId:`users-list-search-input`,onCommit:g},e.q??``)})]}),s.isError?(0,F.jsx)(j,{variant:`destructive`,children:(0,F.jsx)(A,{children:n(s.error instanceof Error?s.error.message:R.loadFailed)})}):(0,F.jsx)(l,{columns:C,data:_,isLoading:s.isPending,loadingLabel:n(R.loadingLabel),emptyState:(0,F.jsx)(U,{canInvite:b})}),(0,F.jsx)(c,{page:e.page,canPrev:v,canNext:y,isLoading:s.isPending,onPageChange:f})]})}function V({currentUserId:e,formatDate:t,formatRelative:n,label:i}){return[{accessorKey:`name`,header:i(R.columnUser),cell:({row:t})=>{let n=t.original,i=n.id===e;return(0,F.jsxs)(`div`,{className:`flex flex-col`,"data-testid":`users-list-row-${String(n.id)}`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[n.name??(0,F.jsx)(`span`,{className:`text-muted-foreground italic`,children:(0,F.jsx)(r,{id:`users.list.row.noName`,message:`(no name)`})}),i?(0,F.jsx)(d,{variant:`outline`,className:`text-xs`,"data-testid":`users-list-row-you`,children:(0,F.jsx)(r,{id:`users.list.row.you`,message:`You`})}):null]}),(0,F.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n.email})]})}},{accessorKey:`role`,header:i(R.columnRole),cell:({row:e})=>(0,F.jsx)(d,{variant:L[e.original.role],className:`capitalize`,children:i(k[e.original.role])})},{accessorKey:`disabledAt`,header:i(R.columnStatus),cell:({row:e})=>{let t=e.original.disabledAt!=null;return(0,F.jsx)(d,{variant:t?`destructive`:`secondary`,children:t?(0,F.jsx)(r,{id:`users.list.row.disabled`,message:`Disabled`}):(0,F.jsx)(r,{id:`users.list.row.active`,message:`Active`})})}},{accessorKey:`lastSignInAt`,meta:{className:`text-end`},header:i(R.columnLastSignIn),cell:({row:e})=>{let t=e.original.lastSignInAt;return t==null?(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm italic`,children:(0,F.jsx)(r,{id:`users.list.row.lastSignIn.never`,message:`Never`})}):(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:n(M(t))})}},{accessorKey:`createdAt`,meta:{className:`text-end`},header:i(R.columnCreated),cell:({row:e})=>(0,F.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:t(M(e.original.createdAt),{dateStyle:`medium`})})}]}function H({value:e,onChange:t}){let n=p();return(0,F.jsxs)(C,{value:e,onValueChange:e=>{t(e)},children:[(0,F.jsx)(y,{size:`sm`,"aria-label":n(R.roleFilterAria),"data-testid":`users-role-filter`,className:`w-[180px]`,children:(0,F.jsx)(T,{})}),(0,F.jsxs)(_,{children:[(0,F.jsx)(v,{value:`all`,"data-testid":`users-role-filter-all`,children:n(R.roleFilterAll)}),b.map(e=>(0,F.jsx)(v,{value:e,"data-testid":`users-role-filter-${e}`,children:n(k[e])},e))]})]})}function U({canInvite:e}){return(0,F.jsxs)(S,{"data-testid":`users-list-empty-state`,className:`border`,children:[(0,F.jsxs)(D,{children:[(0,F.jsx)(x,{children:(0,F.jsx)(r,{id:`users.list.empty.title`,message:`No users match your filter`})}),(0,F.jsx)(g,{children:(0,F.jsx)(r,{id:`users.list.empty.description`,message:`Clear the filter, or invite someone new to join.`})})]}),(0,F.jsx)(O,{children:e?(0,F.jsx)(w,{asChild:!0,children:(0,F.jsxs)(o,{to:`/users/create`,children:[(0,F.jsx)(f,{}),(0,F.jsx)(r,{id:`users.list.empty.invite`,message:`Invite user`})]})}):(0,F.jsxs)(w,{disabled:!0,children:[(0,F.jsx)(f,{}),(0,F.jsx)(r,{id:`users.list.empty.invite`,message:`Invite user`})]})})]})}export{B as component};
@@ -1,4 +1,4 @@
1
- import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{t as r}from"./react-dom-i-Mcm3wj.js";import{Dt as i,Et as a,G as o,H as s,K as c,Ot as l,Pt as u,Tt as d,U as f,W as p,_ as m,at as h,b as g,c as _,ct as v,d as y,dt as b,f as x,ft as ee,g as S,h as C,kt as te,l as ne,lt as w,m as re,nt as T,ot as ie,p as ae,st as E,tt as D,ut as oe,v as se,y as O}from"./dist-9yav4OBD.js";import{t as k}from"./utils-DKOQrNEG.js";import{t as A}from"./dist-B66OmIyr.js";import{t as ce}from"./createLucideIcon-C0O-yxZG.js";import{Y as j}from"./breadcrumb-kPG_yvD8.js";import"./textarea-BsZaGkV-.js";import"./card-L2-kK5VK.js";import"./skeleton-BnBM1862.js";import{Pt as M,Tt as N,wt as P}from"./index-kTp--tHG.js";import{t as F}from"./input-xYuLUQID.js";import{n as le}from"./toggle-BfrQLxbv.js";import{c as I}from"./form-C94uy6_t.js";import"./alert-cwX3fWUu.js";import"./separator-u9O31sRo.js";import"./tooltip-Dm_CbtVl.js";var ue=ce(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),de=ce(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),L=e(t(),1),R=e(n(),1);function z({...e}){return(0,L.jsx)(o,{"data-slot":`popover`,...e})}function B({...e}){return(0,L.jsx)(c,{"data-slot":`popover-trigger`,...e})}function V({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,L.jsx)(p,{children:(0,L.jsx)(f,{"data-slot":`popover-content`,align:t,sideOffset:n,className:k(`bg-popover text-popover-foreground 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}function fe({...e}){return(0,L.jsx)(s,{"data-slot":`popover-anchor`,...e})}function pe({...e}){return(0,L.jsx)(l,{"data-slot":`accordion`,...e})}function me({className:e,...t}){return(0,L.jsx)(i,{"data-slot":`accordion-item`,className:k(`border-b last:border-b-0`,e),...t})}function he({className:e,children:t,...n}){return(0,L.jsx)(a,{className:`flex`,children:(0,L.jsxs)(te,{"data-slot":`accordion-trigger`,className:k(`focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,L.jsx)(P,{className:`text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200`})]})})}function H({className:e,children:t,...n}){return(0,L.jsx)(d,{"data-slot":`accordion-content`,className:`data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm`,...n,children:(0,L.jsx)(`div`,{className:k(`pt-0 pb-4`,e),children:t})})}function U({...e}){return(0,L.jsx)(b,{"data-slot":`alert-dialog`,...e})}function ge({...e}){return(0,L.jsx)(oe,{"data-slot":`alert-dialog-portal`,...e})}function _e({className:e,...t}){return(0,L.jsx)(w,{"data-slot":`alert-dialog-overlay`,className:k(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function W({className:e,size:t=`default`,...n}){return(0,L.jsxs)(ge,{children:[(0,L.jsx)(_e,{}),(0,L.jsx)(E,{"data-slot":`alert-dialog-content`,"data-size":t,className:k(`group/alert-dialog-content bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg rtl:-translate-x-[-50%]`,e),...n})]})}function ve({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:k(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function ye({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:k(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function be({className:e,...t}){return(0,L.jsx)(ee,{"data-slot":`alert-dialog-title`,className:k(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function xe({className:e,...t}){return(0,L.jsx)(v,{"data-slot":`alert-dialog-description`,className:k(`text-muted-foreground text-sm`,e),...t})}function Se({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,L.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,L.jsx)(h,{"data-slot":`alert-dialog-action`,className:k(e),...r})})}function Ce({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,L.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,L.jsx)(ie,{"data-slot":`alert-dialog-cancel`,className:k(e),...r})})}var we=A(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90 text-white`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function Te({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,L.jsx)(n?u:`span`,{"data-slot":`badge`,"data-variant":t,className:k(we({variant:t}),e),...r})}function Ee({className:e,...t}){return(0,L.jsx)(D,{"data-slot":`checkbox`,className:k(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,L.jsx)(T,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,L.jsx)(N,{className:`size-3.5`})})})}function De(){return(De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oe(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function ke(e){var t=(0,R.useRef)(e),n=(0,R.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var Ae=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},je=function(e){return`touches`in e},Me=function(e){return e&&e.ownerDocument.defaultView||self},Ne=function(e,t,n){var r=e.getBoundingClientRect(),i=je(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:Ae((i.pageX-(r.left+Me(e).pageXOffset))/r.width),top:Ae((i.pageY-(r.top+Me(e).pageYOffset))/r.height)}},Pe=function(e){!je(e)&&e.preventDefault()},Fe=R.memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=Oe(e,[`onMove`,`onKey`,`onEnd`]),a=(0,R.useRef)(null),o=ke(t),s=ke(n),c=ke(r),l=(0,R.useRef)(null),u=(0,R.useRef)(!1),d=(0,R.useMemo)(function(){var e=function(e){Pe(e),(je(e)?e.touches.length>0:e.buttons>0)&&a.current?o(Ne(a.current,e,l.current)):(n(!1),c())},t=function(){n(!1),c()};function n(n){var r=u.current,i=Me(a.current),o=n?i.addEventListener:i.removeEventListener;o(r?`touchmove`:`mousemove`,e),o(r?`touchend`:`mouseup`,t)}return[function(e){var t=e.nativeEvent,r=a.current;if(r&&(Pe(t),!function(e,t){return t&&!je(e)}(t,u.current)&&r)){if(je(t)){u.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}r.focus(),o(Ne(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:t===39?.05:t===37?-.05:0,top:t===40?.05:t===38?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&c()},n]},[s,o,c]),f=d[0],p=d[1],m=d[2],h=d[3];return(0,R.useEffect)(function(){return h},[h]),R.createElement(`div`,De({},i,{onTouchStart:f,onMouseDown:f,className:`react-colorful__interactive`,ref:a,onKeyDown:p,onKeyUp:m,tabIndex:0,role:`slider`}))}),Ie=function(e){return e.filter(Boolean).join(` `)},Le=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,a=Ie([`react-colorful__pointer`,e.className]);return R.createElement(`div`,{className:a,style:{top:100*i+`%`,left:100*n+`%`}},R.createElement(`div`,{className:`react-colorful__pointer-fill`,style:{backgroundColor:t}}))},G=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=10**t),Math.round(n*e)/n};360/(2*Math.PI);var Re=function(e){return Ke(ze(e))},ze=function(e){return e[0]===`#`&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?G(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?G(parseInt(e.substring(6,8),16)/255,2):1}},Be=function(e){return Ge(Ue(e))},Ve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:G(e.h),s:G(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:G(i/2),a:G(r,2)}},He=function(e){var t=Ve(e);return`hsl(`+t.h+`, `+t.s+`%, `+t.l+`%)`},Ue=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:G(255*[r,s,o,o,c,r][l]),g:G(255*[c,r,r,s,o,o][l]),b:G(255*[o,o,c,r,r,s][l]),a:G(i,2)}},We=function(e){var t=e.toString(16);return t.length<2?`0`+t:t},Ge=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?We(G(255*i)):``;return`#`+We(t)+We(n)+We(r)+a},Ke=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:G(60*(s<0?s+6:s)),s:G(a?o/a*100:0),v:G(a/255*100),a:i}},qe=R.memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=Ie([`react-colorful__hue`,e.className]);return R.createElement(`div`,{className:i},R.createElement(Fe,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Ae(t+360*e.left,0,360)})},onEnd:r,"aria-label":`Hue`,"aria-valuenow":G(t),"aria-valuemax":`360`,"aria-valuemin":`0`},R.createElement(Le,{className:`react-colorful__hue-pointer`,left:t/360,color:He({h:t,s:100,v:100,a:1})})))}),Je=R.memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:He({h:t.h,s:100,v:100,a:1})};return R.createElement(`div`,{className:`react-colorful__saturation`,style:i},R.createElement(Fe,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Ae(t.s+100*e.left,0,100),v:Ae(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":`Color`,"aria-valuetext":`Saturation `+G(t.s)+`%, Brightness `+G(t.v)+`%`},R.createElement(Le,{className:`react-colorful__saturation-pointer`,top:1-t.v/100,left:t.s/100,color:He(t)})))}),Ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Xe=function(e,t){return e.toLowerCase()===t.toLowerCase()||Ye(ze(e),ze(t))};function Ze(e,t,n,r){var i=ke(n),a=ke(r),o=(0,R.useState)(function(){return e.toHsva(t)}),s=o[0],c=o[1],l=(0,R.useRef)({color:t,hsva:s}),u=(0,R.useRef)(!1);return(0,R.useEffect)(function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},c(n),u.current=!1}},[t,e]),(0,R.useEffect)(function(){var t;Ye(s,l.current.hsva)||e.equal(t=e.fromHsva(s),l.current.color)||(l.current={hsva:s,color:t},i(t),u.current=!0)},[s,e,i]),[s,(0,R.useCallback)(function(e){c(function(t){return Object.assign({},t,e)})},[]),(0,R.useCallback)(function(){u.current&&(u.current=!1,a(l.current.color))},[a])]}var Qe,$e=typeof window<`u`?R.useLayoutEffect:R.useEffect,et=function(){return Qe||(typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0)},tt=new Map,nt=function(e){$e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!tt.has(t)){var n=t.createElement(`style`);n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,tt.set(t,n);var r=et();r&&n.setAttribute(`nonce`,r),t.head.appendChild(n)}},[])},rt=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,a=e.onChange,o=e.onChangeEnd,s=Oe(e,[`className`,`colorModel`,`color`,`onChange`,`onChangeEnd`]),c=(0,R.useRef)(null);nt(c);var l=Ze(n,i,a,o),u=l[0],d=l[1],f=l[2],p=Ie([`react-colorful`,t]);return R.createElement(`div`,De({},s,{ref:c,className:p}),R.createElement(Je,{hsva:u,onChange:d,onChangeEnd:f}),R.createElement(qe,{hue:u.h,onChange:d,onChangeEnd:f,className:`react-colorful__last-control`}))},it={defaultColor:`000`,toHsva:Re,fromHsva:function(e){return Be({h:e.h,s:e.s,v:e.v,a:1})},equal:Xe},at=function(e){return R.createElement(rt,De({},e,{colorModel:it}))};function ot({value:e,onChange:t,disabled:n=!1,required:r=!1,name:i,testId:a,placeholder:o=`#000000`,id:s,"aria-describedby":c,"aria-invalid":l}){let[u,d]=(0,R.useState)(!1),f=st(e)?e:`#000000`;return(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":a,children:[(0,L.jsxs)(z,{open:u,onOpenChange:d,children:[(0,L.jsx)(B,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,disabled:n,"aria-label":`Open color picker`,"data-testid":a?`${a}-swatch`:void 0,className:k(`border-input ring-ring/30 size-9 shrink-0 rounded-md border outline-hidden transition-[box-shadow] hover:ring-2 focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50`),style:{backgroundColor:f}})}),(0,L.jsx)(V,{align:`start`,className:`w-auto p-3`,"data-testid":a?`${a}-popover`:void 0,children:(0,L.jsx)(at,{color:f,onChange:t})})]}),(0,L.jsx)(F,{type:`text`,id:s,value:e,name:i,required:r,disabled:n,placeholder:o,maxLength:7,"aria-describedby":c,"aria-invalid":l,onChange:e=>{t(e.target.value)},"data-testid":a?`${a}-hex`:void 0,className:`font-mono`})]})}function st(e){return typeof e==`string`&&/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(e)}var ct=A(`group/field data-[invalid=true]:text-destructive flex w-full gap-3`,{variants:{orientation:{vertical:[`flex-col [&>*]:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`[&>[data-slot=field-label]]:flex-auto`,`has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto`,`@md/field-group:[&>[data-slot=field-label]]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}});function lt({className:e,orientation:t=`vertical`,...n}){return(0,L.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:k(ct({orientation:t}),e),...n})}function ut({className:e,...t}){return(0,L.jsx)(I,{"data-slot":`field-label`,className:k(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4`,`has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10`,e),...t})}function dt({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`field-label`,className:k(`flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,e),...t})}function ft({className:e,...t}){return(0,L.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:k(`mx-auto flex w-full justify-center`,e),...t})}function pt({className:e,...t}){return(0,L.jsx)(`ul`,{"data-slot":`pagination-content`,className:k(`flex flex-row items-center gap-1`,e),...t})}function mt({...e}){return(0,L.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function ht({className:e,defaultValue:t,value:n,min:r=0,max:i=100,"aria-label":a,"aria-labelledby":o,...s}){let c=R.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r],[n,t,r]);return(0,L.jsxs)(m,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:k(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50`,e),...s,children:[(0,L.jsx)(g,{"data-slot":`slider-track`,className:`bg-muted relative h-1.5 w-full grow overflow-hidden rounded-full`,children:(0,L.jsx)(se,{"data-slot":`slider-range`,className:`bg-primary absolute h-full`})}),c.map((e,t)=>(0,L.jsx)(O,{"data-slot":`slider-thumb`,"aria-label":a,"aria-labelledby":o,className:`border-primary bg-background ring-ring/30 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none`},t))]})}var gt=e(r());function _t(){var e=[...arguments];return(0,R.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var vt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function yt(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function bt(e){return`nodeType`in e}function K(e){return e?yt(e)?e:bt(e)?e.ownerDocument?.defaultView??window:window:window}function xt(e){let{Document:t}=K(e);return e instanceof t}function St(e){return yt(e)?!1:e instanceof K(e).HTMLElement}function Ct(e){return e instanceof K(e).SVGElement}function wt(e){return e?yt(e)?e.document:bt(e)?xt(e)?e:St(e)||Ct(e)?e.ownerDocument:document:document:document}var q=vt?R.useLayoutEffect:R.useEffect;function Tt(e){let t=(0,R.useRef)(e);return q(()=>{t.current=e}),(0,R.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Et(){let e=(0,R.useRef)(null);return[(0,R.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,R.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Dt(e,t){t===void 0&&(t=[e]);let n=(0,R.useRef)(e);return q(()=>{n.current!==e&&(n.current=e)},t),n}function Ot(e,t){let n=(0,R.useRef)();return(0,R.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function kt(e){let t=Tt(e),n=(0,R.useRef)(null);return[n,(0,R.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function At(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current}var jt={};function Mt(e,t){return(0,R.useMemo)(()=>{if(t)return t;let n=jt[e]==null?0:jt[e]+1;return jt[e]=n,e+`-`+n},[e,t])}function Nt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Pt=Nt(1),Ft=Nt(-1);function It(e){return`clientX`in e&&`clientY`in e}function Lt(e){if(!e)return!1;let{KeyboardEvent:t}=K(e.target);return t&&e instanceof t}function Rt(e){if(!e)return!1;let{TouchEvent:t}=K(e.target);return t&&e instanceof t}function zt(e){if(Rt(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return It(e)?{x:e.clientX,y:e.clientY}:null}var Bt=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Vt=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Ht(e){return e.matches(Vt)?e:e.querySelector(Vt)}var Ut={display:`none`};function Wt(e){let{id:t,value:n}=e;return R.createElement(`div`,{id:t,style:Ut},n)}function Gt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return R.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Kt(){let[e,t]=(0,R.useState)(``);return{announce:(0,R.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var qt=(0,R.createContext)(null);function Jt(e){let t=(0,R.useContext)(qt);(0,R.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Yt(){let[e]=(0,R.useState)(()=>new Set),t=(0,R.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,R.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Xt={draggable:`
1
+ import{i as e,t}from"./jsx-runtime-DUAcabCT.js";import{t as n}from"./react-DbyrFoBd.js";import{t as r}from"./react-dom-i-Mcm3wj.js";import{Dt as i,Et as a,G as o,H as s,K as c,Ot as l,Pt as u,Tt as d,U as f,W as p,_ as m,at as h,b as g,c as _,ct as v,d as y,dt as b,f as x,ft as ee,g as S,h as C,kt as te,l as ne,lt as w,m as re,nt as T,ot as ie,p as ae,st as E,tt as D,ut as oe,v as se,y as O}from"./dist-9yav4OBD.js";import{t as k}from"./utils-DKOQrNEG.js";import{t as A}from"./dist-B66OmIyr.js";import{t as ce}from"./createLucideIcon-C0O-yxZG.js";import{Y as j}from"./breadcrumb-B-sB8a4_.js";import"./textarea-BsZaGkV-.js";import"./card-L2-kK5VK.js";import"./skeleton-BnBM1862.js";import{Pt as M,Tt as N,wt as P}from"./index-Ctqj4aiM.js";import{t as F}from"./input-xYuLUQID.js";import{n as le}from"./toggle-BfrQLxbv.js";import{c as I}from"./form-C94uy6_t.js";import"./alert-cwX3fWUu.js";import"./separator-u9O31sRo.js";import"./tooltip-Dm_CbtVl.js";var ue=ce(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),de=ce(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),L=e(t(),1),R=e(n(),1);function z({...e}){return(0,L.jsx)(o,{"data-slot":`popover`,...e})}function B({...e}){return(0,L.jsx)(c,{"data-slot":`popover-trigger`,...e})}function V({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,L.jsx)(p,{children:(0,L.jsx)(f,{"data-slot":`popover-content`,align:t,sideOffset:n,className:k(`bg-popover text-popover-foreground 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...r})})}function fe({...e}){return(0,L.jsx)(s,{"data-slot":`popover-anchor`,...e})}function pe({...e}){return(0,L.jsx)(l,{"data-slot":`accordion`,...e})}function me({className:e,...t}){return(0,L.jsx)(i,{"data-slot":`accordion-item`,className:k(`border-b last:border-b-0`,e),...t})}function he({className:e,children:t,...n}){return(0,L.jsx)(a,{className:`flex`,children:(0,L.jsxs)(te,{"data-slot":`accordion-trigger`,className:k(`focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`,e),...n,children:[t,(0,L.jsx)(P,{className:`text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200`})]})})}function H({className:e,children:t,...n}){return(0,L.jsx)(d,{"data-slot":`accordion-content`,className:`data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm`,...n,children:(0,L.jsx)(`div`,{className:k(`pt-0 pb-4`,e),children:t})})}function U({...e}){return(0,L.jsx)(b,{"data-slot":`alert-dialog`,...e})}function ge({...e}){return(0,L.jsx)(oe,{"data-slot":`alert-dialog-portal`,...e})}function _e({className:e,...t}){return(0,L.jsx)(w,{"data-slot":`alert-dialog-overlay`,className:k(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function W({className:e,size:t=`default`,...n}){return(0,L.jsxs)(ge,{children:[(0,L.jsx)(_e,{}),(0,L.jsx)(E,{"data-slot":`alert-dialog-content`,"data-size":t,className:k(`group/alert-dialog-content bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed start-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg rtl:-translate-x-[-50%]`,e),...n})]})}function ve({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:k(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-start sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function ye({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:k(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function be({className:e,...t}){return(0,L.jsx)(ee,{"data-slot":`alert-dialog-title`,className:k(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function xe({className:e,...t}){return(0,L.jsx)(v,{"data-slot":`alert-dialog-description`,className:k(`text-muted-foreground text-sm`,e),...t})}function Se({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,L.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,L.jsx)(h,{"data-slot":`alert-dialog-action`,className:k(e),...r})})}function Ce({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,L.jsx)(M,{variant:t,size:n,asChild:!0,children:(0,L.jsx)(ie,{"data-slot":`alert-dialog-cancel`,className:k(e),...r})})}var we=A(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90 text-white`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function Te({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,L.jsx)(n?u:`span`,{"data-slot":`badge`,"data-variant":t,className:k(we({variant:t}),e),...r})}function Ee({className:e,...t}){return(0,L.jsx)(D,{"data-slot":`checkbox`,className:k(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,L.jsx)(T,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,L.jsx)(N,{className:`size-3.5`})})})}function De(){return(De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Oe(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function ke(e){var t=(0,R.useRef)(e),n=(0,R.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var Ae=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},je=function(e){return`touches`in e},Me=function(e){return e&&e.ownerDocument.defaultView||self},Ne=function(e,t,n){var r=e.getBoundingClientRect(),i=je(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:Ae((i.pageX-(r.left+Me(e).pageXOffset))/r.width),top:Ae((i.pageY-(r.top+Me(e).pageYOffset))/r.height)}},Pe=function(e){!je(e)&&e.preventDefault()},Fe=R.memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=Oe(e,[`onMove`,`onKey`,`onEnd`]),a=(0,R.useRef)(null),o=ke(t),s=ke(n),c=ke(r),l=(0,R.useRef)(null),u=(0,R.useRef)(!1),d=(0,R.useMemo)(function(){var e=function(e){Pe(e),(je(e)?e.touches.length>0:e.buttons>0)&&a.current?o(Ne(a.current,e,l.current)):(n(!1),c())},t=function(){n(!1),c()};function n(n){var r=u.current,i=Me(a.current),o=n?i.addEventListener:i.removeEventListener;o(r?`touchmove`:`mousemove`,e),o(r?`touchend`:`mouseup`,t)}return[function(e){var t=e.nativeEvent,r=a.current;if(r&&(Pe(t),!function(e,t){return t&&!je(e)}(t,u.current)&&r)){if(je(t)){u.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}r.focus(),o(Ne(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:t===39?.05:t===37?-.05:0,top:t===40?.05:t===38?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&c()},n]},[s,o,c]),f=d[0],p=d[1],m=d[2],h=d[3];return(0,R.useEffect)(function(){return h},[h]),R.createElement(`div`,De({},i,{onTouchStart:f,onMouseDown:f,className:`react-colorful__interactive`,ref:a,onKeyDown:p,onKeyUp:m,tabIndex:0,role:`slider`}))}),Ie=function(e){return e.filter(Boolean).join(` `)},Le=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,a=Ie([`react-colorful__pointer`,e.className]);return R.createElement(`div`,{className:a,style:{top:100*i+`%`,left:100*n+`%`}},R.createElement(`div`,{className:`react-colorful__pointer-fill`,style:{backgroundColor:t}}))},G=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=10**t),Math.round(n*e)/n};360/(2*Math.PI);var Re=function(e){return Ke(ze(e))},ze=function(e){return e[0]===`#`&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?G(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?G(parseInt(e.substring(6,8),16)/255,2):1}},Be=function(e){return Ge(Ue(e))},Ve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:G(e.h),s:G(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:G(i/2),a:G(r,2)}},He=function(e){var t=Ve(e);return`hsl(`+t.h+`, `+t.s+`%, `+t.l+`%)`},Ue=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:G(255*[r,s,o,o,c,r][l]),g:G(255*[c,r,r,s,o,o][l]),b:G(255*[o,o,c,r,r,s][l]),a:G(i,2)}},We=function(e){var t=e.toString(16);return t.length<2?`0`+t:t},Ge=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?We(G(255*i)):``;return`#`+We(t)+We(n)+We(r)+a},Ke=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:G(60*(s<0?s+6:s)),s:G(a?o/a*100:0),v:G(a/255*100),a:i}},qe=R.memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=Ie([`react-colorful__hue`,e.className]);return R.createElement(`div`,{className:i},R.createElement(Fe,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Ae(t+360*e.left,0,360)})},onEnd:r,"aria-label":`Hue`,"aria-valuenow":G(t),"aria-valuemax":`360`,"aria-valuemin":`0`},R.createElement(Le,{className:`react-colorful__hue-pointer`,left:t/360,color:He({h:t,s:100,v:100,a:1})})))}),Je=R.memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:He({h:t.h,s:100,v:100,a:1})};return R.createElement(`div`,{className:`react-colorful__saturation`,style:i},R.createElement(Fe,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Ae(t.s+100*e.left,0,100),v:Ae(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":`Color`,"aria-valuetext":`Saturation `+G(t.s)+`%, Brightness `+G(t.v)+`%`},R.createElement(Le,{className:`react-colorful__saturation-pointer`,top:1-t.v/100,left:t.s/100,color:He(t)})))}),Ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Xe=function(e,t){return e.toLowerCase()===t.toLowerCase()||Ye(ze(e),ze(t))};function Ze(e,t,n,r){var i=ke(n),a=ke(r),o=(0,R.useState)(function(){return e.toHsva(t)}),s=o[0],c=o[1],l=(0,R.useRef)({color:t,hsva:s}),u=(0,R.useRef)(!1);return(0,R.useEffect)(function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},c(n),u.current=!1}},[t,e]),(0,R.useEffect)(function(){var t;Ye(s,l.current.hsva)||e.equal(t=e.fromHsva(s),l.current.color)||(l.current={hsva:s,color:t},i(t),u.current=!0)},[s,e,i]),[s,(0,R.useCallback)(function(e){c(function(t){return Object.assign({},t,e)})},[]),(0,R.useCallback)(function(){u.current&&(u.current=!1,a(l.current.color))},[a])]}var Qe,$e=typeof window<`u`?R.useLayoutEffect:R.useEffect,et=function(){return Qe||(typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0)},tt=new Map,nt=function(e){$e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!tt.has(t)){var n=t.createElement(`style`);n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,tt.set(t,n);var r=et();r&&n.setAttribute(`nonce`,r),t.head.appendChild(n)}},[])},rt=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,a=e.onChange,o=e.onChangeEnd,s=Oe(e,[`className`,`colorModel`,`color`,`onChange`,`onChangeEnd`]),c=(0,R.useRef)(null);nt(c);var l=Ze(n,i,a,o),u=l[0],d=l[1],f=l[2],p=Ie([`react-colorful`,t]);return R.createElement(`div`,De({},s,{ref:c,className:p}),R.createElement(Je,{hsva:u,onChange:d,onChangeEnd:f}),R.createElement(qe,{hue:u.h,onChange:d,onChangeEnd:f,className:`react-colorful__last-control`}))},it={defaultColor:`000`,toHsva:Re,fromHsva:function(e){return Be({h:e.h,s:e.s,v:e.v,a:1})},equal:Xe},at=function(e){return R.createElement(rt,De({},e,{colorModel:it}))};function ot({value:e,onChange:t,disabled:n=!1,required:r=!1,name:i,testId:a,placeholder:o=`#000000`,id:s,"aria-describedby":c,"aria-invalid":l}){let[u,d]=(0,R.useState)(!1),f=st(e)?e:`#000000`;return(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,"data-testid":a,children:[(0,L.jsxs)(z,{open:u,onOpenChange:d,children:[(0,L.jsx)(B,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,disabled:n,"aria-label":`Open color picker`,"data-testid":a?`${a}-swatch`:void 0,className:k(`border-input ring-ring/30 size-9 shrink-0 rounded-md border outline-hidden transition-[box-shadow] hover:ring-2 focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50`),style:{backgroundColor:f}})}),(0,L.jsx)(V,{align:`start`,className:`w-auto p-3`,"data-testid":a?`${a}-popover`:void 0,children:(0,L.jsx)(at,{color:f,onChange:t})})]}),(0,L.jsx)(F,{type:`text`,id:s,value:e,name:i,required:r,disabled:n,placeholder:o,maxLength:7,"aria-describedby":c,"aria-invalid":l,onChange:e=>{t(e.target.value)},"data-testid":a?`${a}-hex`:void 0,className:`font-mono`})]})}function st(e){return typeof e==`string`&&/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(e)}var ct=A(`group/field data-[invalid=true]:text-destructive flex w-full gap-3`,{variants:{orientation:{vertical:[`flex-col [&>*]:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`[&>[data-slot=field-label]]:flex-auto`,`has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto`,`@md/field-group:[&>[data-slot=field-label]]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}});function lt({className:e,orientation:t=`vertical`,...n}){return(0,L.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:k(ct({orientation:t}),e),...n})}function ut({className:e,...t}){return(0,L.jsx)(I,{"data-slot":`field-label`,className:k(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4`,`has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10`,e),...t})}function dt({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`field-label`,className:k(`flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,e),...t})}function ft({className:e,...t}){return(0,L.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:k(`mx-auto flex w-full justify-center`,e),...t})}function pt({className:e,...t}){return(0,L.jsx)(`ul`,{"data-slot":`pagination-content`,className:k(`flex flex-row items-center gap-1`,e),...t})}function mt({...e}){return(0,L.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function ht({className:e,defaultValue:t,value:n,min:r=0,max:i=100,"aria-label":a,"aria-labelledby":o,...s}){let c=R.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r],[n,t,r]);return(0,L.jsxs)(m,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:k(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50`,e),...s,children:[(0,L.jsx)(g,{"data-slot":`slider-track`,className:`bg-muted relative h-1.5 w-full grow overflow-hidden rounded-full`,children:(0,L.jsx)(se,{"data-slot":`slider-range`,className:`bg-primary absolute h-full`})}),c.map((e,t)=>(0,L.jsx)(O,{"data-slot":`slider-thumb`,"aria-label":a,"aria-labelledby":o,className:`border-primary bg-background ring-ring/30 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none`},t))]})}var gt=e(r());function _t(){var e=[...arguments];return(0,R.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var vt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function yt(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function bt(e){return`nodeType`in e}function K(e){return e?yt(e)?e:bt(e)?e.ownerDocument?.defaultView??window:window:window}function xt(e){let{Document:t}=K(e);return e instanceof t}function St(e){return yt(e)?!1:e instanceof K(e).HTMLElement}function Ct(e){return e instanceof K(e).SVGElement}function wt(e){return e?yt(e)?e.document:bt(e)?xt(e)?e:St(e)||Ct(e)?e.ownerDocument:document:document:document}var q=vt?R.useLayoutEffect:R.useEffect;function Tt(e){let t=(0,R.useRef)(e);return q(()=>{t.current=e}),(0,R.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Et(){let e=(0,R.useRef)(null);return[(0,R.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,R.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Dt(e,t){t===void 0&&(t=[e]);let n=(0,R.useRef)(e);return q(()=>{n.current!==e&&(n.current=e)},t),n}function Ot(e,t){let n=(0,R.useRef)();return(0,R.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function kt(e){let t=Tt(e),n=(0,R.useRef)(null);return[n,(0,R.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function At(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current}var jt={};function Mt(e,t){return(0,R.useMemo)(()=>{if(t)return t;let n=jt[e]==null?0:jt[e]+1;return jt[e]=n,e+`-`+n},[e,t])}function Nt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Pt=Nt(1),Ft=Nt(-1);function It(e){return`clientX`in e&&`clientY`in e}function Lt(e){if(!e)return!1;let{KeyboardEvent:t}=K(e.target);return t&&e instanceof t}function Rt(e){if(!e)return!1;let{TouchEvent:t}=K(e.target);return t&&e instanceof t}function zt(e){if(Rt(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return It(e)?{x:e.clientX,y:e.clientY}:null}var Bt=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Vt=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Ht(e){return e.matches(Vt)?e:e.querySelector(Vt)}var Ut={display:`none`};function Wt(e){let{id:t,value:n}=e;return R.createElement(`div`,{id:t,style:Ut},n)}function Gt(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return R.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function Kt(){let[e,t]=(0,R.useState)(``);return{announce:(0,R.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var qt=(0,R.createContext)(null);function Jt(e){let t=(0,R.useContext)(qt);(0,R.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function Yt(){let[e]=(0,R.useState)(()=>new Set),t=(0,R.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,R.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var Xt={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="robots" content="noindex, nofollow" />
7
7
  <title>Plumix Admin</title>
8
- <script type="module" crossorigin src="./assets/index-kTp--tHG.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-Ctqj4aiM.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="./assets/jsx-runtime-DUAcabCT.js">
10
10
  <link rel="modulepreload" crossorigin href="./assets/react-DbyrFoBd.js">
11
11
  <link rel="modulepreload" crossorigin href="./assets/react-dom-i-Mcm3wj.js">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumix/admin",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Plumix admin application (prebuilt SPA assets)",
6
6
  "license": "MIT",
@@ -77,10 +77,10 @@
77
77
  "valibot": "^1.4.2",
78
78
  "vite": "^8.1.3",
79
79
  "vitest": "^4.1.10",
80
- "@plumix/admin-editor": "0.1.3",
81
- "@plumix/admin-ui": "0.1.3",
82
- "@plumix/blocks": "0.1.3",
83
- "@plumix/core": "0.1.3",
80
+ "@plumix/admin-editor": "0.1.4",
81
+ "@plumix/admin-ui": "0.1.4",
82
+ "@plumix/blocks": "0.1.4",
83
+ "@plumix/core": "0.1.4",
84
84
  "@plumix/eslint-config": "0.0.0",
85
85
  "@plumix/lingui-config": "0.0.0",
86
86
  "@plumix/prettier-config": "0.0.0",
@@ -99,7 +99,7 @@
99
99
  "i18n:ratchet:check": "node scripts/ratchet-drift-check.mjs",
100
100
  "lint": "eslint",
101
101
  "publint": "publint",
102
- "test": "vitest run",
102
+ "test:unit": "vitest run",
103
103
  "test:e2e": "playwright test",
104
104
  "typecheck": "tsc --noEmit"
105
105
  }