@shumai-one/shumai 0.3.7 → 0.3.8
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/bin/{chunk-9nyhmtp9.js → chunk-0mmw31pj.js} +2 -2
- package/bin/{chunk-gjn3w26y.js → chunk-0pm8c9bq.js} +2 -2
- package/bin/{chunk-50keqtz9.js → chunk-0qpz48vc.js} +1 -1
- package/bin/{chunk-zjj9qj6y.js → chunk-0zbwpfsk.js} +2 -2
- package/bin/chunk-15jsnygy.js +5 -0
- package/bin/chunk-16s5kfy8.css +1 -0
- package/bin/{chunk-hqkmdp31.js → chunk-21rp4vzr.js} +2 -2
- package/bin/chunk-24ke0th1.css +1 -0
- package/bin/{chunk-260wywfb.js → chunk-28n8xqhm.js} +1 -1
- package/bin/{chunk-7hnw6y6d.js → chunk-2dxd0bar.js} +2 -2
- package/bin/{chunk-3dx0p1ge.js → chunk-2ejky9qv.js} +1 -1
- package/bin/{chunk-dej1gq35.js → chunk-2em77vjv.js} +1 -1
- package/bin/{chunk-zg60j9x2.js → chunk-2q26gz0p.js} +1 -1
- package/bin/{chunk-9s02m95j.js → chunk-2t0asg3w.js} +2 -2
- package/bin/{chunk-rfyaphas.js → chunk-2xaq1y16.js} +2 -2
- package/bin/{chunk-qmpph1gt.js → chunk-33r4w0yv.js} +2 -2
- package/bin/{chunk-1xzc6z02.js → chunk-3bm3be9d.js} +1 -1
- package/bin/{chunk-1sqz0va1.js → chunk-3mx22sn7.js} +2 -2
- package/bin/chunk-4cmw4qmt.js +1 -0
- package/bin/chunk-4d3wm83a.js +2 -0
- package/bin/{chunk-0jkqmbcx.js → chunk-4g4g02e0.js} +1 -1
- package/bin/{chunk-tpp9qf5m.js → chunk-5386brz2.js} +2 -2
- package/bin/{chunk-98j2z6he.js → chunk-5f9fk8x0.js} +3 -3
- package/bin/chunk-5fj5w0gg.js +2 -0
- package/bin/chunk-61bxmjd9.js +2 -0
- package/bin/{chunk-ptw49k86.js → chunk-6pcs8810.js} +1 -1
- package/bin/{chunk-x3ynjbt5.js → chunk-6pmsknnk.js} +2 -2
- package/bin/{chunk-9xhnmnnb.js → chunk-6vwqg1ra.js} +2 -2
- package/bin/{chunk-2mqqghrz.js → chunk-75segwsp.js} +2 -2
- package/bin/{chunk-ftc48rbb.js → chunk-7c85cyn0.js} +3 -3
- package/bin/chunk-7eyg2kgv.js +1 -0
- package/bin/chunk-7r22vcjy.js +2 -0
- package/bin/{chunk-0ycwr0kb.js → chunk-80g5kcm0.js} +1 -1
- package/bin/{chunk-5gtew41y.js → chunk-8bhsdk1v.js} +1 -1
- package/bin/{chunk-1khzycf9.js → chunk-8fsrs7mh.js} +1 -1
- package/bin/chunk-8jfm1j41.js +1 -0
- package/bin/chunk-8n6segk5.js +1 -0
- package/bin/chunk-99f9r6xm.js +2 -0
- package/bin/{chunk-2086rsb2.js → chunk-9acfydwy.js} +1 -1
- package/bin/{chunk-vxpnp4xg.js → chunk-9ntwrvhz.js} +2 -2
- package/bin/{chunk-s0hgykza.js → chunk-agdza65r.js} +2 -2
- package/bin/{chunk-6zs49mef.js → chunk-antsxrw9.js} +1 -1
- package/bin/chunk-bapy3qv8.js +1 -0
- package/bin/chunk-bc2bf144.js +2 -0
- package/bin/{chunk-v8w2nxew.js → chunk-bznz6h19.js} +1 -1
- package/bin/{chunk-qcqw7wnv.js → chunk-c24an5j3.js} +1 -1
- package/bin/chunk-cm74nd4n.js +1 -0
- package/bin/{chunk-87wqbn4g.js → chunk-cynjx7ha.js} +2 -2
- package/bin/chunk-cyq3m4qz.js +1 -0
- package/bin/chunk-ddff7vm3.js +2 -0
- package/bin/{chunk-br5xkaf7.js → chunk-djqs6m7w.js} +3 -3
- package/bin/{chunk-60hpa5kf.js → chunk-dn8k5ef5.js} +1 -1
- package/bin/chunk-dqdqs0d9.js +1 -0
- package/bin/chunk-drjaw6a5.js +14 -0
- package/bin/chunk-drvwchyn.js +2 -0
- package/bin/{chunk-esrtafz0.js → chunk-e4se9q6n.js} +1 -1
- package/bin/chunk-eb551xw7.js +1 -0
- package/bin/{chunk-nvjp2rnh.js → chunk-en96pr5c.js} +2 -2
- package/bin/{chunk-r5dv0rfv.js → chunk-ep138kb3.js} +2 -2
- package/bin/{chunk-jszpvg8e.js → chunk-eqf7k7ax.js} +2 -2
- package/bin/{chunk-f2j2cqd1.js → chunk-f3rqamey.js} +2 -2
- package/bin/{chunk-3kqdgddm.js → chunk-fvwz4mgw.js} +2 -2
- package/bin/chunk-g3p6h6sw.js +68 -0
- package/bin/{chunk-81tb4v5v.js → chunk-h9f55mjv.js} +2 -2
- package/bin/{chunk-n4gghgrj.js → chunk-jfjjh86p.js} +2 -2
- package/bin/{chunk-83k0wa5k.js → chunk-jg31cnqc.js} +2 -2
- package/bin/chunk-jk87gxbb.js +2 -0
- package/bin/{chunk-4bn9eb9h.js → chunk-jqzvazsf.js} +1 -1
- package/bin/chunk-jyk483r4.js +1 -0
- package/bin/{chunk-48nzw50r.js → chunk-k0ysbh3h.js} +1 -1
- package/bin/{chunk-fcs4v6jq.js → chunk-k5yxntns.js} +2 -2
- package/bin/chunk-khjybf4y.js +1 -0
- package/bin/{chunk-38g3s1f3.js → chunk-kmt9fj1z.js} +2 -2
- package/bin/{chunk-503qq6sa.js → chunk-m49ar48r.js} +2 -2
- package/bin/{chunk-a0k1b4sq.js → chunk-m7d52gfe.js} +1 -1
- package/bin/{chunk-x6532q76.js → chunk-mjxay7yv.js} +1 -1
- package/bin/{chunk-zqg4f56h.js → chunk-mp5etccz.js} +1 -1
- package/bin/{chunk-9gzy30zm.js → chunk-n8pas7tj.js} +2 -2
- package/bin/{chunk-b8v7jvkb.js → chunk-nc632fxz.js} +2 -2
- package/bin/{chunk-6fv38qdc.js → chunk-nffrjwb7.js} +2 -2
- package/bin/{chunk-7k3ccca6.js → chunk-p1rrkrn4.js} +1 -1
- package/bin/chunk-p6ep6grv.js +1 -0
- package/bin/{chunk-p4c4z0f2.js → chunk-ph43tgr6.js} +1 -1
- package/bin/{chunk-3xzgddev.js → chunk-pqtwzb3s.js} +1 -1
- package/bin/chunk-q0xv46wa.js +2 -0
- package/bin/{chunk-qh9rz2ee.js → chunk-qhxznkjk.js} +5 -5
- package/bin/chunk-qmja7bsr.js +2 -0
- package/bin/{chunk-v98e3gex.js → chunk-qyegjbzd.js} +1 -1
- package/bin/{chunk-gjdmnfms.js → chunk-r5rf62aa.js} +1 -1
- package/bin/{chunk-2xmsrq7f.js → chunk-rjkj0dr9.js} +2 -2
- package/bin/chunk-rjr8c8be.js +3 -0
- package/bin/{chunk-af6wbhkv.js → chunk-rq4h4p2g.js} +2 -2
- package/bin/{chunk-zwgf211t.js → chunk-scmhhrte.js} +2 -2
- package/bin/chunk-sjr6mvgm.js +78 -0
- package/bin/{chunk-t9t9evan.js → chunk-ssz62jfs.js} +2 -2
- package/bin/{chunk-g60v3jc1.js → chunk-ta02azkp.js} +1 -1
- package/bin/{chunk-tzt4c1dm.js → chunk-tfnh9sk9.js} +2 -2
- package/bin/{chunk-cqq8e3hc.js → chunk-thqahbva.js} +2 -2
- package/bin/chunk-tvzfm7g8.js +2 -0
- package/bin/{chunk-k48y9e5s.js → chunk-twm329fs.js} +1 -1
- package/bin/{chunk-0t8q76ac.js → chunk-ve826t5r.js} +1 -1
- package/bin/chunk-vpfj3q7r.js +1 -0
- package/bin/chunk-vqakgjsf.js +1 -0
- package/bin/chunk-wgjghs54.js +7 -0
- package/bin/chunk-wy1ytxw7.js +41 -0
- package/bin/{chunk-t3tp9trj.js → chunk-x788nk6z.js} +2 -2
- package/bin/{chunk-b3jh3hf1.js → chunk-x8ksced7.js} +2 -2
- package/bin/{chunk-qdycy714.js → chunk-xexxh1zq.js} +1 -1
- package/bin/{chunk-6v39c8eg.js → chunk-xktnqktj.js} +2 -2
- package/bin/{chunk-7872prvg.js → chunk-xpce3j7g.js} +1 -1
- package/bin/{chunk-karn564z.js → chunk-xyzsmjtk.js} +2 -2
- package/bin/chunk-y03s8bkz.js +1 -0
- package/bin/{chunk-kpn9d97x.js → chunk-y5g2ge6f.js} +1 -1
- package/bin/{chunk-qy93r7tm.js → chunk-ygcmv04c.js} +2 -2
- package/bin/{chunk-ytzk81tr.js → chunk-ykarhcph.js} +1 -1
- package/bin/{chunk-bancgvrc.js → chunk-yr8a8nzv.js} +2 -2
- package/bin/chunk-yxtb7xn8.js +2 -0
- package/bin/{chunk-n76r6s9k.js → chunk-zaft3sfe.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +237 -215
- package/package.json +7 -7
- package/prisma/migrations/20260814090300_add_asset_agentmd/migration.sql +2 -0
- package/prisma/migrations/20260814125921_create_asset_agentmd_table/migration.sql +21 -0
- package/prisma/schema.prisma +12 -0
- package/bin/chunk-0xern7e4.js +0 -1
- package/bin/chunk-0yngn45x.js +0 -2
- package/bin/chunk-4egayx81.js +0 -2
- package/bin/chunk-4rbzswqs.js +0 -71
- package/bin/chunk-69tt1pvr.js +0 -2
- package/bin/chunk-815ezj20.js +0 -1
- package/bin/chunk-85eg9xqx.js +0 -1
- package/bin/chunk-86aagej8.js +0 -1
- package/bin/chunk-8y1v9dm9.js +0 -2
- package/bin/chunk-9gq9782d.js +0 -1
- package/bin/chunk-bv88se28.css +0 -1
- package/bin/chunk-dv1zpd2p.js +0 -15
- package/bin/chunk-eetrc0j1.js +0 -3
- package/bin/chunk-eztggp8r.js +0 -1
- package/bin/chunk-gf5ds9r9.js +0 -2
- package/bin/chunk-h9emz0zb.js +0 -2
- package/bin/chunk-h9k2atte.js +0 -1
- package/bin/chunk-kkq4wvnc.js +0 -1
- package/bin/chunk-ksx113sp.js +0 -1
- package/bin/chunk-m6a4rzdt.js +0 -62
- package/bin/chunk-mw8f8ngt.js +0 -7
- package/bin/chunk-rvspnthy.js +0 -1
- package/bin/chunk-sjjndwt4.js +0 -2
- package/bin/chunk-tvg9gvqs.js +0 -1
- package/bin/chunk-xp4dcyk3.js +0 -1
- package/bin/chunk-y8aehqr8.js +0 -2
- package/bin/chunk-yvxt48r4.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "A fullstack AI-powered media workspace and workflow engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"zod": "4.4.3"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@shumai-one/shumai-darwin-arm64": "0.3.
|
|
31
|
-
"@shumai-one/shumai-darwin-x64": "0.3.
|
|
32
|
-
"@shumai-one/shumai-linux-arm64": "0.3.
|
|
33
|
-
"@shumai-one/shumai-linux-x64": "0.3.
|
|
34
|
-
"@shumai-one/shumai-win32-arm64": "0.3.
|
|
35
|
-
"@shumai-one/shumai-win32-x64": "0.3.
|
|
30
|
+
"@shumai-one/shumai-darwin-arm64": "0.3.8",
|
|
31
|
+
"@shumai-one/shumai-darwin-x64": "0.3.8",
|
|
32
|
+
"@shumai-one/shumai-linux-arm64": "0.3.8",
|
|
33
|
+
"@shumai-one/shumai-linux-x64": "0.3.8",
|
|
34
|
+
"@shumai-one/shumai-win32-arm64": "0.3.8",
|
|
35
|
+
"@shumai-one/shumai-win32-x64": "0.3.8"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `agentmd` on the `assets` table. All the data in the column will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "assets" DROP COLUMN "agentmd";
|
|
9
|
+
|
|
10
|
+
-- CreateTable
|
|
11
|
+
CREATE TABLE "asset_agentmd" (
|
|
12
|
+
"asset_id" TEXT NOT NULL,
|
|
13
|
+
"content" TEXT NOT NULL,
|
|
14
|
+
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
15
|
+
"updated_at" TIMESTAMP(3) NOT NULL,
|
|
16
|
+
|
|
17
|
+
CONSTRAINT "asset_agentmd_pkey" PRIMARY KEY ("asset_id")
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
-- AddForeignKey
|
|
21
|
+
ALTER TABLE "asset_agentmd" ADD CONSTRAINT "asset_agentmd_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -490,6 +490,7 @@ model Asset {
|
|
|
490
490
|
shareLinkRootFolder ShareLink? @relation("ShareLinkToRootFolder")
|
|
491
491
|
agentSessions AgentSession[] @relation("AssetToAgentSession")
|
|
492
492
|
watermarkFiles WatermarkFile[] @relation("AssetToWatermarkFile")
|
|
493
|
+
agentMd AssetAgentMd? @relation("AssetToAgentMd")
|
|
493
494
|
|
|
494
495
|
@@map("assets")
|
|
495
496
|
@@index([type])
|
|
@@ -537,6 +538,17 @@ model AssetMetadataValue {
|
|
|
537
538
|
@@map("asset_metadata_values")
|
|
538
539
|
}
|
|
539
540
|
|
|
541
|
+
model AssetAgentMd {
|
|
542
|
+
assetId String @id @map("asset_id")
|
|
543
|
+
content String @db.Text
|
|
544
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
545
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
546
|
+
|
|
547
|
+
asset Asset @relation("AssetToAgentMd", fields: [assetId], references: [id], onDelete: Cascade)
|
|
548
|
+
|
|
549
|
+
@@map("asset_agentmd")
|
|
550
|
+
}
|
|
551
|
+
|
|
540
552
|
model AssetComment {
|
|
541
553
|
id String @id @default(ulid())
|
|
542
554
|
message String?
|
package/bin/chunk-0xern7e4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as x}from"./chunk-zwgf211t.js";import"./chunk-sjjndwt4.js";import"./chunk-qcqw7wnv.js";import"./chunk-x3ynjbt5.js";import"./chunk-dv1zpd2p.js";import"./chunk-mw8f8ngt.js";import"./chunk-y8aehqr8.js";import"./chunk-9nyhmtp9.js";import"./chunk-r5dv0rfv.js";import"./chunk-83k0wa5k.js";import"./chunk-8y1v9dm9.js";import"./chunk-tpp9qf5m.js";import"./chunk-4rbzswqs.js";import"./chunk-rfyaphas.js";import"./chunk-0yngn45x.js";import"./chunk-5gtew41y.js";import"./chunk-3kqdgddm.js";import"./chunk-karn564z.js";import{Bf as f}from"./chunk-9gzy30zm.js";import{Sf as p}from"./chunk-s0hgykza.js";import"./chunk-38g3s1f3.js";import"./chunk-qmpph1gt.js";import"./chunk-zjj9qj6y.js";import"./chunk-eetrc0j1.js";import"./chunk-9s02m95j.js";import"./chunk-87wqbn4g.js";import"./chunk-69tt1pvr.js";import"./chunk-f2j2cqd1.js";import"./chunk-2xmsrq7f.js";import"./chunk-af6wbhkv.js";import"./chunk-2mqqghrz.js";import{th as h}from"./chunk-n4gghgrj.js";import{Eh as l,Fh as r,Rh as o,bi as c,xh as w,zh as a}from"./chunk-m6a4rzdt.js";import{Nl as m}from"./chunk-dej1gq35.js";var g=m(w(),1);function v(){let{projectId:e}=d.useParams(),{teamId:s,ensureTeamIdForProject:n}=h();g.useEffect(()=>{n(e)},[e,n]);let{data:i}=r(f(e)),t=i?.rootFolder,{data:b}=l({queryKey:["folders",t],queryFn:()=>(async()=>{return await(await c.api.folders[":folderId"].$get({param:{folderId:t}})).json()})(),enabled:!!t});if(!s||!t||!b)return a(p,{});return a(x,{teamId:s,projectId:e,projectName:i.name??"",assetId:"recently-deleted",rootFolderId:t})}var d=o("/projects/$projectId/recently-deleted")({component:v});export{d as Route};
|
package/bin/chunk-0yngn45x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ib as Vq}from"./chunk-5gtew41y.js";import{kb as Qq,lb as Wq,mb as Xq,nb as Yq,ob as Zq,pb as _q,qb as $q,rb as Hq}from"./chunk-karn564z.js";import{Hg as o,Ig as r,Jg as m,Kg as e}from"./chunk-2xmsrq7f.js";import{hh as P,jh as k,kh as G,mh as B,nh as Y}from"./chunk-n4gghgrj.js";import{$h as W,Ah as K,Ck as X,Dk as h,Ek as C,Fk as O,Ik as J,Jk as qq,Ki as H,Kk as Eq,Mk as Jq,Nk as Kq,Pk as Nq,Ui as n,Xj as s,ni as z,xh as Cq,yh as t,zh as E}from"./chunk-m6a4rzdt.js";import{Nl as hq}from"./chunk-dej1gq35.js";var Z=hq(Cq(),1);function uq({open:fq,onOpenChange:Fq,title:zq,members:g,isOwner:_,onInvite:c,onUpdateRole:I,onRemoveMember:v,currentUserId:Pq,availableMembersToAdd:M,onAddMember:L,type:V="team"}){let[T,u]=Z.useState("editor"),[S,p]=Z.useState(null),[l,x]=Z.useState(!1),[D,U]=Z.useState(null),[f,A]=Z.useState(null),[j,i]=Z.useState({}),[$,F]=Z.useState(null),y=(q)=>{if(!q)return"";switch(q.toLowerCase()){case"owner":return J.owner();case"editor":return J.editor();case"reviewer":return J.reviewer();default:return q}},a=(q,N)=>{i((Q)=>({...Q,[q]:N}))},kq=async(q,N)=>{if(!I)return;U(q);try{await I(q,N),W.success(J.member_role_updated())}catch(Q){console.error(Q),W.error(J.failed_to_update_member_role())}finally{U(null)}},Gq=async()=>{if(!v||!f?.id)return;U(f.id);try{await v(f.id),W.success(J.member_removed()),A(null)}catch(q){console.error(q),W.error(J.failed_to_remove_member())}finally{U(null)}},Bq=async()=>{if(!c)return;x(!0);try{let q=await c(T),N=`${window.location.origin}/signup?inviteCode=${q}`;p(N)}catch(q){console.error(q),W.error(J.failed_to_generate_invite_link())}finally{x(!1)}},Lq=async()=>{if(S){if(await Vq(S))W.success(J.invite_link_copied())}},R=(q)=>{if(!q)return"??";return q.split(" ").map((N)=>N[0]).slice(0,2).join("").toUpperCase()},Sq=(q)=>{if(!q)p(null),u("editor"),i({}),F(null);Fq(q)},w=Array.isArray(g)?g:[],Uq=Array.isArray(M)?M:[],yq=V==="project"&&_?w.filter((q)=>q.role==="owner"||q.scope==="project"||q.hasCustomRole):w,d=V==="project"&&_?w.filter((q)=>q.scope==="team"&&q.role!=="owner"&&!q.hasCustomRole):[],b=V==="project"&&_?Uq.filter((q)=>q.scope==="project"):[];return E(Eq,{open:fq,onOpenChange:Sq,children:K(Jq,{className:"sm:max-w-xl",onOpenAutoFocus:(q)=>q.preventDefault(),children:[E(Kq,{children:E(Nq,{children:zq})}),K("div",{className:"space-y-4",children:[E("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:yq.map((q)=>{let N=V==="team"&&q.scope==="project";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),K("div",{className:"flex items-center gap-2",children:[!N&&E("span",{className:"text-xs text-muted-foreground capitalize",children:y(q.role)}),q.scope&&K(t,{children:[!N&&E("span",{className:"text-[10px] text-muted-foreground/70",children:"•"}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]})]})]}),_&&q.role!=="owner"&&q.id!==Pq&&K("div",{className:"flex items-center gap-2",children:[N?E(o,{children:K(r,{children:[E(m,{asChild:!0,children:E("span",{children:E(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26 justify-between",disabled:!0,children:E(H,{className:"ml-auto h-3 w-3 opacity-50"})})})}),E(e,{side:"top",children:E("p",{className:"text-xs",children:J.project_member_role_tooltip()})})]})}):K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:D===q.id,children:[y(q.role),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:q.role,onValueChange:(Q)=>kq(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>A(q),disabled:D===q.id,children:D===q.id?E(z,{className:"h-3 w-3 animate-spin"}):E(s,{className:"h-3 w-3"})})]})]},q.id)})}),E(Qq,{open:!!f,onOpenChange:(q)=>!q&&A(null),children:K(Wq,{children:[K(Xq,{children:[E(Zq,{children:J.remove_member()}),E(_q,{children:J.remove_member_confirmation({name:f?.name||"",type:V==="project"?J.project():J.team()})})]}),K(Yq,{children:[E(Hq,{children:J.cancel()}),E($q,{onClick:Gq,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:J.remove()})]})]})})," ",_&&L&&d.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_team_member_to_project()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_team_member_to_project_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:d.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{onClick:async()=>{F(q.id);try{await L(q.id,N),W.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),W.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.set_role()})]})]},q.id)})})]}),_&&L&&b.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_members_from_other_projects()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_members_from_other_projects_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:b.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(X,{onClick:async()=>{F(q.id);try{await L(q.id,N),W.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),W.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.add_to_project()})]})]},q.id)})})]}),_&&c&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-3",children:J.invite_new_member()}),K("div",{className:"space-y-3",children:[K("div",{className:"flex gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(X,{variant:"outline",className:"w-[120px] justify-between",children:[T==="editor"?J.editor():J.reviewer(),E(H,{className:"h-4 w-4 opacity-50"})]})}),E(G,{children:K(B,{value:T,onValueChange:(q)=>u(q),children:[E(Y,{value:"editor",children:J.editor()}),E(Y,{value:"reviewer",children:J.reviewer()})]})})]}),K(X,{onClick:Bq,disabled:l,className:"flex-1",children:[l&&E(z,{className:"mr-2 h-4 w-4 animate-spin"}),J.generate_link()]})]}),S&&K("div",{className:"flex gap-2",children:[E(qq,{value:S,readOnly:!0}),E(X,{variant:"outline",size:"icon",onClick:Lq,children:E(n,{className:"h-4 w-4"})})]})]})]})]})]})})}
|
|
2
|
-
export{uq as hb};
|
package/bin/chunk-4egayx81.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ac as e,bc as p,cc as t}from"./chunk-br5xkaf7.js";import"./chunk-ftc48rbb.js";import"./chunk-bancgvrc.js";import"./chunk-7hnw6y6d.js";import"./chunk-4bn9eb9h.js";import"./chunk-nvjp2rnh.js";import"./chunk-dej1gq35.js";export{t as kyselyAdapter,e as getKyselyDatabaseType,p as createKyselyAdapter};
|
package/bin/chunk-4rbzswqs.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import{Ah as PZ,Nh as N5,xh as x0,zh as TJ}from"./chunk-m6a4rzdt.js";import{Nl as TZ}from"./chunk-dej1gq35.js";var FQ=TZ(x0(),1);var b5=({onResize:J,className:Q=""})=>{let[Z,$]=FQ.useState(!1),q=FQ.useRef(0);FQ.useEffect(()=>{if(!Z)return;let K=(B)=>{let N=B.clientX-q.current;q.current=B.clientX,J(N)},X=()=>{$(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",K),document.addEventListener("mouseup",X),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X),document.body.style.cursor=""}},[Z,J]);let Y=(K)=>{K.preventDefault(),K.stopPropagation(),$(!0),q.current=K.clientX},H=()=>TJ("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return PZ("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${Q}`,onMouseDown:Y,children:[TJ(H,{}),TJ("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
|
|
2
|
-
${Z?"bg-blue-600 shadow-[0_0_15px_rgba(37,99,235,0.6)] opacity-100":"bg-blue-400 opacity-0 group-hover:opacity-100 group-hover:shadow-[0_0_8px_rgba(96,165,250,0.5)]"}
|
|
3
|
-
`}),TJ("div",{className:`absolute top-1/2 left-1/2 h-10 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-600 transition-all duration-300 ease-out
|
|
4
|
-
${Z?"opacity-100 scale-100 shadow-[0_0_10px_rgba(37,99,235,0.5)]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100"}`})]})};var e$=Symbol.for("preact-signals");function xZ(){if(!(PJ>1)){var J,Q=!1;(function(){var q=SZ;SZ=void 0;while(q!==void 0){if(q.S.v===q.v)q.S.i=q.i;q=q.o}})();while(cQ!==void 0){var Z=cQ;cQ=void 0,EZ++;while(Z!==void 0){var $=Z.u;if(Z.u=void 0,Z.f&=-3,!(8&Z.f)&&_9(Z))try{Z.c()}catch(q){if(!Q)J=q,Q=!0}Z=$}}if(EZ=0,PJ--,Q)throw J}else PJ--}function JJ(J){if(PJ>0)return J();h0=++Jq,PJ++;try{return J()}finally{xZ()}}var k=void 0;function C(J){var Q=k;k=void 0;try{return J()}finally{k=Q}}var p9,cQ=void 0,PJ=0,EZ=0,Jq=0,h0=0,SZ=void 0,kZ=0;function d9(J){if(k!==void 0){var Q=J.n;if(Q===void 0||Q.t!==k){if(Q={i:0,S:J,p:k.s,n:void 0,t:k,e:void 0,x:void 0,r:Q},k.s!==void 0)k.s.n=Q;if(k.s=Q,J.n=Q,32&k.f)J.S(Q);return Q}else if(Q.i===-1){if(Q.i=0,Q.n!==void 0){if(Q.n.p=Q.p,Q.p!==void 0)Q.p.n=Q.n;Q.p=k.s,Q.n=void 0,k.s.n=Q,k.s=Q}return Q}}}function r(J,Q){this.v=J,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}r.prototype.brand=e$;r.prototype.h=function(){return!0};r.prototype.S=function(J){var Q=this,Z=this.t;if(Z!==J&&J.e===void 0)if(J.x=Z,this.t=J,Z!==void 0)Z.e=J;else C(function(){var $;($=Q.W)==null||$.call(Q)})};r.prototype.U=function(J){var Q=this;if(this.t!==void 0){var{e:Z,x:$}=J;if(Z!==void 0)Z.x=$,J.e=void 0;if($!==void 0)$.e=Z,J.x=void 0;if(J===this.t){if(this.t=$,$===void 0)C(function(){var q;(q=Q.Z)==null||q.call(Q)})}}};r.prototype.subscribe=function(J){var Q=this;return o(function(){var Z=Q.value,$=k;k=void 0;try{J(Z)}finally{k=$}},{name:"sub"})};r.prototype.valueOf=function(){return this.value};r.prototype.toString=function(){return this.value+""};r.prototype.toJSON=function(){return this.value};r.prototype.peek=function(){var J=this;return C(function(){return J.value})};Object.defineProperty(r.prototype,"value",{get:function(){var J=d9(this);if(J!==void 0)J.i=this.i;return this.v},set:function(J){if(J!==this.v){if(EZ>100)throw Error("Cycle detected");(function(Z){if(PJ!==0&&EZ===0){if(Z.l!==h0)Z.l=h0,SZ={S:Z,v:Z.v,i:Z.i,o:SZ}}})(this),this.v=J,this.i++,kZ++,PJ++;try{for(var Q=this.t;Q!==void 0;Q=Q.x)Q.t.N()}finally{xZ()}}}});function IJ(J,Q){return new r(J,Q)}function _9(J){for(var Q=J.s;Q!==void 0;Q=Q.n)if(Q.S.i!==Q.i||!Q.S.h()||Q.S.i!==Q.i)return!0;return!1}function c9(J){for(var Q=J.s;Q!==void 0;Q=Q.n){var Z=Q.S.n;if(Z!==void 0)Q.r=Z;if(Q.S.n=Q,Q.i=-1,Q.n===void 0){J.s=Q;break}}}function l9(J){var Q=J.s,Z=void 0;while(Q!==void 0){var $=Q.p;if(Q.i===-1){if(Q.S.U(Q),$!==void 0)$.n=Q.n;if(Q.n!==void 0)Q.n.p=$}else Z=Q;if(Q.S.n=Q.r,Q.r!==void 0)Q.r=void 0;Q=$}J.s=Z}function sJ(J,Q){r.call(this,void 0),this.x=J,this.s=void 0,this.g=kZ-1,this.f=4,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}sJ.prototype=new r;sJ.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===kZ)return!0;if(this.g=kZ,this.f|=1,this.i>0&&!_9(this))return this.f&=-2,!0;var J=k;try{c9(this),k=this;var Q=this.x();if(16&this.f||this.v!==Q||this.i===0)this.v=Q,this.f&=-17,this.i++}catch(Z){this.v=Z,this.f|=16,this.i++}return k=J,l9(this),this.f&=-2,!0};sJ.prototype.S=function(J){if(this.t===void 0){this.f|=36;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.S(Q)}r.prototype.S.call(this,J)};sJ.prototype.U=function(J){if(this.t!==void 0){if(r.prototype.U.call(this,J),this.t===void 0){this.f&=-33;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.U(Q)}}};sJ.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var J=this.t;J!==void 0;J=J.x)J.t.N()}};Object.defineProperty(sJ.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var J=d9(this);if(this.h(),J!==void 0)J.i=this.i;if(16&this.f)throw this.v;return this.v}});function y0(J,Q){return new sJ(J,Q)}function s9(J){var Q=J.m;if(J.m=void 0,typeof Q=="function"){PJ++;var Z=k;k=void 0;try{Q()}catch($){throw J.f&=-2,J.f|=8,f0(J),$}finally{k=Z,xZ()}}}function f0(J){for(var Q=J.s;Q!==void 0;Q=Q.n)Q.S.U(Q);J.x=void 0,J.s=void 0,s9(J)}function Qq(J){if(k!==this)throw Error("Out-of-order effect");if(l9(this),k=J,this.f&=-2,8&this.f)f0(this);xZ()}function zQ(J,Q){if(this.x=J,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=Q==null?void 0:Q.name,p9)p9.push(this)}zQ.prototype.c=function(){var J=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var Q=this.x();if(typeof Q=="function")this.m=Q}finally{J()}};zQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,s9(this),c9(this),PJ++;var J=k;return k=this,Qq.bind(this,J)};zQ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=cQ,cQ=this};zQ.prototype.d=function(){if(this.f|=8,!(1&this.f))f0(this)};zQ.prototype.dispose=function(){this.d()};function o(J,Q){var Z=new zQ(J,Q);try{Z.c()}catch(q){throw Z.d(),q}var $=Z.d.bind(Z);return $[Symbol.dispose]=$,$}var{create:Zq,defineProperty:s0,defineProperties:$q,getOwnPropertyDescriptor:qq,getOwnPropertyDescriptors:Yq,getOwnPropertySymbols:o9}=Object,Kq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,n9=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),MQ=(J)=>{throw TypeError(J)},m0=(J,Q,Z)=>(Q in J)?s0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Xq=(J,Q)=>{for(var Z in Q||(Q={}))if(Kq.call(Q,Z))m0(J,Z,Q[Z]);if(o9){for(var Z of o9(Q))if(Hq.call(Q,Z))m0(J,Z,Q[Z])}return J},Wq=(J,Q)=>$q(J,Yq(Q)),i9=(J,Q)=>s0(J,"name",{value:Q,configurable:!0}),Bq=(J)=>{var Q;return[,,,Zq((Q=J==null?void 0:J[n9("metadata")])!=null?Q:null)]},a9=["class","method","getter","setter","accessor","field","value","get","set"],lQ=(J)=>J!==void 0&&typeof J!=="function"?MQ("Function expected"):J,Nq=(J,Q,Z,$,q)=>({kind:a9[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?MQ("Already initialized"):q.push(lQ(Y||null))}),r9=(J,Q)=>m0(Q,n9("metadata"),J[3]),oJ=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},wQ=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=a9[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&qq(W<4?q:{get[Z](){return LJ(this,Y)},set[Z](V){return vJ(this,Y,V)}},Z));W?L&&W<4&&i9(Y,(W>2?"set ":W>1?"get ":"")+Z):i9(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Nq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>Uq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?LJ:Lq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>vJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)lQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)MQ("Object expected");else lQ(H=K.get)&&(U.get=H),lQ(H=K.set)&&(U.set=H),lQ(H=K.init)&&A.unshift(H)}return W||r9(J,q),U&&s0(q,Z,U),L?W^4?Y:U:q},o0=(J,Q,Z)=>Q.has(J)||MQ("Cannot "+Z),Uq=(J,Q)=>Object(Q)!==Q?MQ('Cannot use the "in" operator on this value'):J.has(Q),LJ=(J,Q,Z)=>(o0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),sQ=(J,Q,Z)=>Q.has(J)?MQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),vJ=(J,Q,Z,$)=>(o0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Lq=(J,Q,Z)=>(o0(J,Q,"access private method"),Z);function AQ(J,Q){if(Q){let Z;return y0(()=>{let $=J();if($&&Z&&Q(Z,$))return Z;return Z=$,$})}return y0(J)}function EJ(J,Q){if(Object.is(J,Q))return!0;if(J===null||Q===null)return!1;if(typeof J==="function"&&typeof Q==="function")return J===Q;if(J instanceof Set&&Q instanceof Set){if(J.size!==Q.size)return!1;for(let Z of J)if(!Q.has(Z))return!1;return!0}if(Array.isArray(J)){if(!Array.isArray(Q)||J.length!==Q.length)return!1;return!J.some(($,q)=>!EJ($,Q[q]))}if(typeof J==="object"&&typeof Q==="object"){let Z=Object.keys(J),$=Object.keys(Q);if(Z.length!==$.length)return!1;return!Z.some((Y)=>!EJ(J[Y],Q[Y]))}return!1}function T({get:J},Q){return{init(Z){return IJ(Z)},get(){return J.call(this).value},set(Z){let $=J.call(this);if($.peek()===Z)return;$.value=Z}}}function h(J,Q){let Z=new WeakMap;return function(){let $=Z.get(this);if(!$)$=AQ(J.bind(this)),Z.set(this,$);return $.value}}function v0(J=!0){return function(Q,Z){Z.addInitializer(function(){let $=Z.kind==="field"?this:Z.static?this:Object.getPrototypeOf(this),q=Object.getOwnPropertyDescriptor($,Z.name);if(q)Object.defineProperty($,Z.name,Wq(Xq({},q),{enumerable:J}))})}}function nJ(...J){let Q=J.map((Z)=>o(Z));return()=>Q.forEach((Z)=>Z())}var t9,e9,J8,Q8,Z8,$8,QJ,i0,b0,p0,d0,t,n0,g0,q8,_0,a0,u0,c0,l0;$8=[T],Z8=[T],Q8=[T],J8=[v0()],e9=[v0()],t9=[v0()];var jJ=class{constructor(J,Q=Object.is){this.defaultValue=J,this.equals=Q,oJ(QJ,5,this),sQ(this,t),sQ(this,i0,oJ(QJ,8,this)),oJ(QJ,11,this),sQ(this,n0,oJ(QJ,12,this)),oJ(QJ,15,this),sQ(this,a0,oJ(QJ,16,this)),oJ(QJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return LJ(this,t,c0)}get initial(){return LJ(this,t,p0)}get previous(){return LJ(this,t,q8)}set current(J){let Q=C(()=>LJ(this,t,c0));if(J&&Q&&this.equals(Q,J))return;JJ(()=>{if(!LJ(this,t,p0))vJ(this,t,J,d0);vJ(this,t,Q,_0),vJ(this,t,J,l0)})}reset(J=this.defaultValue){JJ(()=>{vJ(this,t,void 0,_0),vJ(this,t,J,d0),vJ(this,t,J,l0)})}};QJ=Bq(null);i0=new WeakMap;t=new WeakSet;n0=new WeakMap;a0=new WeakMap;b0=wQ(QJ,20,"#initial",$8,t,i0),p0=b0.get,d0=b0.set;g0=wQ(QJ,20,"#previous",Z8,t,n0),q8=g0.get,_0=g0.set;u0=wQ(QJ,20,"#current",Q8,t,a0),c0=u0.get,l0=u0.set;wQ(QJ,2,"current",J8,jJ);wQ(QJ,2,"initial",e9,jJ);wQ(QJ,2,"previous",t9,jJ);r9(QJ,jJ);function hZ(J){return C(()=>{let Q={};for(let Z in J)Q[Z]=J[Z];return Q})}var iJ,o5=class{constructor(){sQ(this,iJ,new WeakMap)}get(J,Q){var Z;return J?(Z=LJ(this,iJ).get(J))==null?void 0:Z.get(Q):void 0}set(J,Q,Z){var $;if(!J)return;if(!LJ(this,iJ).has(J))LJ(this,iJ).set(J,new Map);return($=LJ(this,iJ).get(J))==null?void 0:$.set(Q,Z)}clear(J){var Q;return J?(Q=LJ(this,iJ).get(J))==null?void 0:Q.clear():void 0}};iJ=new WeakMap;var{create:Gq,defineProperty:Q1,getOwnPropertyDescriptor:Vq,getOwnPropertySymbols:Y8}=Object,Fq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,X8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),IQ=(J)=>{throw TypeError(J)},K8=Math.pow,r0=(J,Q,Z)=>(Q in J)?Q1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Mq=(J,Q)=>{for(var Z in Q||(Q={}))if(Fq.call(Q,Z))r0(J,Z,Q[Z]);if(Y8){for(var Z of Y8(Q))if(zq.call(Q,Z))r0(J,Z,Q[Z])}return J},H8=(J,Q)=>Q1(J,"name",{value:Q,configurable:!0}),wq=(J)=>{var Q;return[,,,Gq((Q=J==null?void 0:J[X8("metadata")])!=null?Q:null)]},W8=["class","method","getter","setter","accessor","field","value","get","set"],oQ=(J)=>J!==void 0&&typeof J!=="function"?IQ("Function expected"):J,Aq=(J,Q,Z,$,q)=>({kind:W8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?IQ("Already initialized"):q.push(oQ(Y||null))}),B8=(J,Q)=>r0(Q,X8("metadata"),J[3]),Iq=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},N8=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=W8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Vq(W<4?q:{get[Z](){return t0(this,Y)},set[Z](V){return e0(this,Y,V)}},Z));W?L&&W<4&&H8(Y,(W>2?"set ":W>1?"get ":"")+Z):H8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Aq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>jq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?t0:Rq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>e0(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)oQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)IQ("Object expected");else oQ(H=K.get)&&(U.get=H),oQ(H=K.set)&&(U.set=H),oQ(H=K.init)&&A.unshift(H)}return W||B8(J,q),U&&Q1(q,Z,U),L?W^4?Y:U:q},Z1=(J,Q,Z)=>Q.has(J)||IQ("Cannot "+Z),jq=(J,Q)=>Object(Q)!==Q?IQ('Cannot use the "in" operator on this value'):J.has(Q),t0=(J,Q,Z)=>(Z1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),Oq=(J,Q,Z)=>Q.has(J)?IQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),e0=(J,Q,Z,$)=>(Z1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Rq=(J,Q,Z)=>(Z1(J,Q,"access private method"),Z),e=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},XJ=class J{constructor(Q,Z,$,q){this.left=Q,this.top=Z,this.width=$,this.height=q,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(Q,Z){let{top:$,left:q,width:Y,height:H,scale:K}=this,X=new J(q+Q,$+Z,Y,H);return X.scale=Mq({},K),X}get boundingRectangle(){let{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}=this;return{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}}get center(){let{left:Q,top:Z,right:$,bottom:q}=this;return new e((Q+$)/2,(Z+q)/2)}get area(){let{width:Q,height:Z}=this;return Q*Z}equals(Q){if(!(Q instanceof J))return!1;let{left:Z,top:$,width:q,height:Y}=this;return Z===Q.left&&$===Q.top&&q===Q.width&&Y===Q.height}containsPoint(Q){let{top:Z,left:$,bottom:q,right:Y}=this;return Z<=Q.y&&Q.y<=q&&$<=Q.x&&Q.x<=Y}intersectionArea(Q){if(Q instanceof J)return Dq(this,Q);return 0}intersectionRatio(Q){let{area:Z}=this,$=this.intersectionArea(Q);return $/(Q.area+Z-$)}get bottom(){let{top:Q,height:Z}=this;return Q+Z}get right(){let{left:Q,width:Z}=this;return Q+Z}get aspectRatio(){let{width:Q,height:Z}=this;return Q/Z}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:Q,left:Z,width:$,height:q}){return new J(Z,Q,$,q)}static delta(Q,Z,$={x:"center",y:"center"}){let q=(Y,H)=>{let K=$[H],X=H==="x"?Y.left:Y.top,B=H==="x"?Y.width:Y.height;if(K=="start")return X;if(K=="end")return X+B;return X+B/2};return e.delta({x:q(Q,"x"),y:q(Q,"y")},{x:q(Z,"x"),y:q(Z,"y")})}static intersectionRatio(Q,Z){return J.from(Q).intersectionRatio(J.from(Z))}};function Dq(J,Q){let Z=Math.max(Q.top,J.top),$=Math.max(Q.left,J.left),q=Math.min(Q.left+Q.width,J.left+J.width),Y=Math.min(Q.top+Q.height,J.top+J.height),H=q-$,K=Y-Z;if($<q&&Z<Y)return H*K;return 0}var U8,L8,J1,yZ,iQ,nQ=class extends(J1=jJ,L8=[h],U8=[h],J1){constructor(J){let Q=e.from(J);super(Q,(Z,$)=>e.equals(Z,$));Iq(iQ,5,this),Oq(this,yZ,0),this.velocity={x:0,y:0}}get delta(){return e.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=e.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-t0(this,yZ),H=(K)=>Math.round(K/Y*100);JJ(()=>{e0(this,yZ,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(e.from(J)),this.velocity={x:0,y:0}}};iQ=wq(J1);yZ=new WeakMap;N8(iQ,2,"delta",L8,nQ);N8(iQ,2,"direction",U8,nQ);B8(iQ,nQ);function fZ({x:J,y:Q},Z){let $=Math.abs(J),q=Math.abs(Q);if(typeof Z==="number")return Math.sqrt(K8($,2)+K8(q,2))>Z;if("x"in Z&&"y"in Z)return $>Z.x&&q>Z.y;if("x"in Z)return $>Z.x;if("y"in Z)return q>Z.y;return!1}var G8=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(G8||{}),$1=Object.values(G8);var{create:Cq,defineProperty:X1,defineProperties:Tq,getOwnPropertyDescriptor:Pq,getOwnPropertyDescriptors:Eq,getOwnPropertySymbols:dZ}=Object,M8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,A8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),TQ=(J)=>{throw TypeError(J)},Y1=(J,Q,Z)=>(Q in J)?X1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,W1=(J,Q)=>{for(var Z in Q||(Q={}))if(M8.call(Q,Z))Y1(J,Z,Q[Z]);if(dZ){for(var Z of dZ(Q))if(w8.call(Q,Z))Y1(J,Z,Q[Z])}return J},B1=(J,Q)=>Tq(J,Eq(Q)),V8=(J,Q)=>X1(J,"name",{value:Q,configurable:!0}),I8=(J,Q)=>{var Z={};for(var $ in J)if(M8.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&dZ){for(var $ of dZ(J))if(Q.indexOf($)<0&&w8.call(J,$))Z[$]=J[$]}return Z},PQ=(J)=>{var Q;return[,,,Cq((Q=J==null?void 0:J[A8("metadata")])!=null?Q:null)]},j8=["class","method","getter","setter","accessor","field","value","get","set"],aQ=(J)=>J!==void 0&&typeof J!=="function"?TQ("Function expected"):J,Sq=(J,Q,Z,$,q)=>({kind:j8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?TQ("Already initialized"):q.push(aQ(Y||null))}),rJ=(J,Q)=>Y1(Q,A8("metadata"),J[3]),O=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},P=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=j8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Pq(W<4?q:{get[Z](){return u(this,Y)},set[Z](V){return WJ(this,Y,V)}},Z));W?L&&W<4&&V8(Y,(W>2?"set ":W>1?"get ":"")+Z):V8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Sq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>kq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?u:O8)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>WJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)aQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)TQ("Object expected");else aQ(H=K.get)&&(U.get=H),aQ(H=K.set)&&(U.set=H),aQ(H=K.init)&&A.unshift(H)}return W||rJ(J,q),U&&X1(q,Z,U),L?W^4?Y:U:q},N1=(J,Q,Z)=>Q.has(J)||TQ("Cannot "+Z),kq=(J,Q)=>Object(Q)!==Q?TQ('Cannot use the "in" operator on this value'):J.has(Q),u=(J,Q,Z)=>(N1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),E=(J,Q,Z)=>Q.has(J)?TQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),WJ=(J,Q,Z,$)=>(N1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),O8=(J,Q,Z)=>(N1(J,Q,"access private method"),Z);function R8(J,Q){return{plugin:J,options:Q}}function EQ(J){return(Q)=>{return R8(J,Q)}}function CQ(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var D8,eQ,U1,bZ;D8=[T];var $J=class{constructor(J,Q){this.manager=J,this.options=Q,E(this,U1,O(eQ,8,this,!1)),O(eQ,11,this),E(this,bZ,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return C(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Q=o(J.bind(this));return u(this,bZ).add(Q),Q}destroy(){u(this,bZ).forEach((J)=>J())}static configure(J){return R8(this,J)}};eQ=PQ(null);U1=new WeakMap;bZ=new WeakMap;P(eQ,4,"disabled",D8,$J,U1);rJ(eQ,$J);var SQ=class extends $J{},gZ,q1=class{constructor(J){this.manager=J,this.instances=new Map,E(this,gZ,[])}get values(){return Array.from(this.instances.values())}set values(J){let Q=J.map(CQ).reduce(($,q)=>{let Y=$.find(({plugin:H})=>H===q.plugin);if(Y)return Y.options=q.options,$;return[...$,q]},[]),Z=Q.map(({plugin:$})=>$);for(let $ of u(this,gZ))if(!Z.includes($)){if($.prototype instanceof SQ)continue;this.unregister($)}for(let{plugin:$,options:q}of Q)this.register($,q);WJ(this,gZ,Z)}get(J){return this.instances.get(J)}register(J,Q){let Z=this.instances.get(J);if(Z){if(Z.options!==Q)Z.options=Q;return Z}let $=new J(this.manager,Q);return this.instances.set(J,$),$}unregister(J){let Q=this.instances.get(J);if(Q)Q.destroy(),this.instances.delete(J)}destroy(){for(let J of this.instances.values())J.destroy();this.instances.clear()}};gZ=new WeakMap;function xq(J,Q){if(J.priority===Q.priority){if(J.type===Q.type)return Q.value-J.value;return Q.type-J.type}return Q.priority-J.priority}var vZ=[],jQ,OQ,hq=class extends $J{constructor(J){super(J);E(this,jQ),E(this,OQ),this.computeCollisions=this.computeCollisions.bind(this),WJ(this,OQ,IJ(vZ)),this.destroy=nJ(()=>{let Q=this.computeCollisions(),Z=C(()=>this.manager.dragOperation.position.current);if(Q!==vZ){let $=u(this,jQ);if(WJ(this,jQ,Z),$&&Z.x==$.x&&Z.y==$.y)return}else WJ(this,jQ,void 0);u(this,OQ).value=Q},()=>{let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){C(()=>{if(J)u(this,OQ).value=this.computeCollisions();else WJ(this,jQ,void 0)})}computeCollisions(J,Q){let{registry:Z,dragOperation:$}=this.manager,{source:q,shape:Y,status:H}=$;if(!H.initialized||!Y)return vZ;let K=[],X=[];for(let B of J!=null?J:Z.droppables){if(B.disabled)continue;if(q&&!B.accepts(q))continue;let N=Q!=null?Q:B.collisionDetector;if(!N)continue;X.push(B),B.shape;let W=C(()=>N({droppable:B,dragOperation:$}));if(W){if(B.collisionPriority!=null)W.priority=B.collisionPriority;K.push(W)}}if(X.length===0)return vZ;return K.sort(xq),K}get collisions(){return u(this,OQ).value}};jQ=new WeakMap;OQ=new WeakMap;var C8,T8,P8,L1,E8,zJ,G1,DQ,V1,F1;P8=[T],T8=[T],C8=[T];var SJ=class J{constructor(Q,Z){E(this,G1,O(zJ,8,this)),O(zJ,11,this),E(this,DQ),E(this,V1,O(zJ,12,this)),O(zJ,15,this),E(this,F1,O(zJ,16,this)),O(zJ,19,this);let{effects:$,id:q,data:Y={},disabled:H=!1,register:K=!0}=Q,X=q;if(WJ(this,DQ,IJ(q)),this.manager=Z,this.data=Y,this.disabled=H,this.effects=()=>{var B;return[()=>{let{id:N,manager:W}=this;if(N===X)return;return X=N,W==null||W.registry.register(this),()=>W==null?void 0:W.registry.unregister(this)},...(B=$==null?void 0:$())!=null?B:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Z&&K)queueMicrotask(this.register)}get id(){var Q,Z;let $=u(this,DQ).value;return(Z=(Q=J.pendingIdChanges)==null?void 0:Q.get(this))!=null?Z:$}set id(Q){var Z,$;let q=($=(Z=J.pendingIdChanges)==null?void 0:Z.get(this))!=null?$:u(this,DQ).peek();if(Q===q)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var Y;return O8(Y=J,L1,E8).call(Y)});J.pendingIdChanges.set(this,Q)}register(){var Q;return(Q=this.manager)==null?void 0:Q.registry.register(this)}unregister(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}destroy(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}};zJ=PQ(null);L1=new WeakSet;E8=function(){let J=SJ.pendingIdChanges;if(SJ.pendingIdChanges=null,J)JJ(()=>{for(let[Q,Z]of J)u(Q,DQ).value=Z})};G1=new WeakMap;DQ=new WeakMap;V1=new WeakMap;F1=new WeakMap;P(zJ,4,"manager",P8,SJ,G1);P(zJ,4,"data",T8,SJ,V1);P(zJ,4,"disabled",C8,SJ,F1);E(SJ,L1);rJ(zJ,SJ);SJ.pendingIdChanges=null;var _Z=SJ,F8=class{constructor(){this.map=IJ(new Map),this.cleanupFunctions=new WeakMap,this.register=(J,Q)=>{let Z=this.map.peek(),$=Z.get(J),q=()=>this.unregister(J,Q);if($===Q)return q;if($){if($.id===J){let K=this.cleanupFunctions.get($);K==null||K(),this.cleanupFunctions.delete($)}}let Y=new Map(Z);for(let[K,X]of Z)if(X===Q&&K!==J){Y.delete(K);break}Y.set(J,Q),this.map.value=Y;let H=nJ(...Q.effects());return this.cleanupFunctions.set(Q,H),q},this.unregister=(J,Q)=>{let Z=this.map.peek();if(Z.get(J)!==Q)return;let $=this.cleanupFunctions.get(Q);$==null||$(),this.cleanupFunctions.delete(Q);let q=new Map(Z);q.delete(J),this.map.value=q}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(J){return this.map.value.has(J)}get(J){return this.map.value.get(J)}destroy(){for(let J of this){let Q=this.cleanupFunctions.get(J);Q==null||Q(),J.destroy()}this.map.value=new Map}},S8,k8,x8,h8,y8,f8,K1,ZJ,z1,M1,w1,MJ=class extends(K1=_Z,f8=[T],y8=[T],h8=[T],x8=[h],k8=[h],S8=[h],K1){constructor(J,Q){var Z=J,{modifiers:$,type:q,sensors:Y,plugins:H,effects:K}=Z,X=I8(Z,["modifiers","type","sensors","plugins","effects"]);super(B1(W1({},X),{effects:()=>{var B;return[...(B=K==null?void 0:K())!=null?B:[],()=>{let{manager:N,plugins:W}=this;if(!N||!W)return;for(let G of W){let{plugin:L}=CQ(G);N.registry.plugins.register(L)}}]}}),Q);O(ZJ,5,this),E(this,z1,O(ZJ,8,this)),O(ZJ,11,this),E(this,M1,O(ZJ,12,this)),O(ZJ,15,this),E(this,w1,O(ZJ,16,this,this.isDragSource?"dragging":"idle")),O(ZJ,19,this),this.type=q,this.sensors=Y,this.modifiers=$,this.alignment=X.alignment,this.plugins=H}pluginConfig(J){if(!this.plugins)return;for(let Q of this.plugins){let Z=CQ(Q);if(Z.plugin===J)return Z.options}return}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.source)==null?void 0:Q.id)===this.id}};ZJ=PQ(K1);z1=new WeakMap;M1=new WeakMap;w1=new WeakMap;P(ZJ,4,"type",f8,MJ,z1);P(ZJ,4,"modifiers",y8,MJ,M1);P(ZJ,4,"status",h8,MJ,w1);P(ZJ,2,"isDropping",x8,MJ);P(ZJ,2,"isDragging",k8,MJ);P(ZJ,2,"isDragSource",S8,MJ);rJ(ZJ,MJ);var v8,b8,g8,u8,m8,p8,H1,c,A1,I1,j1,O1,R1,wJ=class extends(H1=_Z,p8=[T],m8=[T],u8=[T],g8=[T],b8=[T],v8=[h],H1){constructor(J,Q){var Z=J,{accept:$,collisionDetector:q,collisionPriority:Y,type:H}=Z,K=I8(Z,["accept","collisionDetector","collisionPriority","type"]);super(K,Q);O(c,5,this),E(this,A1,O(c,8,this)),O(c,11,this),E(this,I1,O(c,12,this)),O(c,15,this),E(this,j1,O(c,16,this)),O(c,19,this),E(this,O1,O(c,20,this)),O(c,23,this),E(this,R1,O(c,24,this)),O(c,27,this),this.accept=$,this.collisionDetector=q,this.collisionPriority=Y,this.type=H}accepts(J){let{accept:Q}=this;if(!Q)return!0;if(typeof Q==="function")return Q(J);if(!J.type)return!1;if(Array.isArray(Q))return Q.includes(J.type);return J.type===Q}get isDropTarget(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.target)==null?void 0:Q.id)===this.id}};c=PQ(H1);A1=new WeakMap;I1=new WeakMap;j1=new WeakMap;O1=new WeakMap;R1=new WeakMap;P(c,4,"accept",p8,wJ,A1);P(c,4,"type",m8,wJ,I1);P(c,4,"collisionDetector",u8,wJ,j1);P(c,4,"collisionPriority",g8,wJ,O1);P(c,4,"shape",b8,wJ,R1);P(c,2,"isDropTarget",v8,wJ);rJ(c,wJ);var yq=class{constructor(){this.registry=new Map}addEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));return $.add(Q),Z.set(J,$),()=>this.removeEventListener(J,Q)}removeEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));$.delete(Q),Z.set(J,$)}dispatch(J,...Q){let{registry:Z}=this,$=Z.get(J);if(!$)return;for(let q of $)q(...Q)}},fq=class extends yq{constructor(J){super();this.manager=J}dispatch(J,Q){let Z=[Q,this.manager];super.dispatch(J,...Z)}};function uZ(J,Q=!0){let Z=!1;return B1(W1({},J),{cancelable:Q,get defaultPrevented(){return Z},preventDefault(){if(!Q)return;Z=!0}})}var vq=class extends SQ{constructor(J){super(J);let Q=($,q)=>$.map(({id:Y})=>Y).join("")===q.map(({id:Y})=>Y).join(""),Z=[];this.destroy=nJ(()=>{let{dragOperation:$,collisionObserver:q}=J;if($.status.initializing)Z=[],q.enable()},()=>{let{collisionObserver:$,monitor:q}=J,{collisions:Y}=$;if($.isDisabled())return;if(_Z.pendingIdChanges)return;let H=uZ({collisions:Y});if(q.dispatch("collision",H),H.defaultPrevented)return;if(Q(Y,Z))return;else Z=Y;let[K]=Y;C(()=>{var X;if((K==null?void 0:K.id)!==((X=J.dragOperation.target)==null?void 0:X.id))$.disable(),J.actions.setDropTarget(K==null?void 0:K.id).then(()=>{$.enable()})})})}},OJ=((J)=>{return J[J.Lowest=0]="Lowest",J[J.Low=1]="Low",J[J.Normal=2]="Normal",J[J.High=3]="High",J[J.Highest=4]="Highest",J})(OJ||{}),RJ=((J)=>{return J[J.Collision=0]="Collision",J[J.ShapeIntersection=1]="ShapeIntersection",J[J.PointerIntersection=2]="PointerIntersection",J})(RJ||{}),d8,_8,c8,l8,s8,o8,i8,GJ,D1;i8=[T],o8=[h],s8=[h],l8=[h],c8=[h],_8=[h],d8=[h];var kJ=class{constructor(){O(GJ,5,this),E(this,D1,O(GJ,8,this,"idle")),O(GJ,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){let{value:J}=this;return J!=="idle"&&J!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(J){this.value=J}};GJ=PQ(null);D1=new WeakMap;P(GJ,4,"value",i8,kJ,D1);P(GJ,2,"current",o8,kJ);P(GJ,2,"idle",s8,kJ);P(GJ,2,"initializing",l8,kJ);P(GJ,2,"initialized",c8,kJ);P(GJ,2,"dragging",_8,kJ);P(GJ,2,"dropped",d8,kJ);rJ(GJ,kJ);var bq=class{constructor(J){this.manager=J}setDragSource(J){let{dragOperation:Q}=this.manager;Q.sourceIdentifier=typeof J==="string"||typeof J==="number"?J:J.id}setDropTarget(J){return C(()=>{let{dragOperation:Q}=this.manager,Z=J!=null?J:null;if(Q.targetIdentifier===Z)return Promise.resolve(!1);Q.targetIdentifier=Z;let $=uZ({operation:Q.snapshot()});if(Q.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return C(()=>{let{dragOperation:Q}=this.manager;if(J.source!=null)this.setDragSource(J.source);if(!Q.source)throw Error("Cannot start a drag operation without a drag source");if(!Q.status.idle)throw Error("Cannot start a drag operation while another is active");let $=new AbortController,{event:q,coordinates:Y}=J;JJ(()=>{Q.status.set("initialization-pending"),Q.shape=null,Q.canceled=!1,Q.activatorEvent=q!=null?q:null,Q.position.reset(Y)});let H=uZ({operation:Q.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",H),H.defaultPrevented)return Q.reset(),$.abort(),$;return Q.status.set("initializing"),Q.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:K}=Q;if(K.current!=="initializing")return;JJ(()=>{Q.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:q,operation:Q.snapshot(),cancelable:!1})})}),$})}move(J){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{status:q,controller:Y}=$;if(!q.dragging||!Y||Y.signal.aborted)return;let H=uZ({nativeEvent:J.event,operation:$.snapshot(),by:J.by,to:J.to},(Q=J.cancelable)!=null?Q:!0);if((Z=J.propagate)!=null?Z:!0)this.manager.monitor.dispatch("dragmove",H);queueMicrotask(()=>{var K,X,B,N,W;if(H.defaultPrevented)return;let G=(W=J.to)!=null?W:{x:$.position.current.x+((X=(K=J.by)==null?void 0:K.x)!=null?X:0),y:$.position.current.y+((N=(B=J.by)==null?void 0:B.y)!=null?N:0)};$.position.current=G})})}stop(J={}){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{controller:q}=$;if(!q||q.signal.aborted)return;let Y,H=()=>{let X={resume:()=>{},abort:()=>{}};return Y=new Promise((B,N)=>{X.resume=B,X.abort=N}),X};q.abort();let K=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let X=C(()=>{var N;return((N=$.source)==null?void 0:N.status)==="dropping"}),B=()=>{if($.controller===q)$.controller=void 0;$.reset()};if(X){let{source:N}=$,W=o(()=>{if((N==null?void 0:N.status)==="idle")W(),B()})}else this.manager.renderer.rendering.then(B)})};if($.canceled=(Q=J.canceled)!=null?Q:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:J.event,operation:$.snapshot(),canceled:(Z=J.canceled)!=null?Z:!1,suspend:H}),Y)Y.then(K).catch(()=>$.reset());else K()})}},aJ=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}},n8=class extends AbortController{constructor(J,Q){super();this.constraints=J,this.onActivate=Q,this.activated=!1;for(let Z of J!=null?J:[])Z.controller=this}onEvent(J){var Q;if(this.activated)return;if((Q=this.constraints)==null?void 0:Q.length)for(let Z of this.constraints)Z.onEvent(J);else this.activate(J)}activate(J){if(this.activated)return;this.activated=!0,this.onActivate(J)}abort(J){this.activated=!1,super.abort(J)}},mZ,C1=class{constructor(J){this.options=J,E(this,mZ)}set controller(J){WJ(this,mZ,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Q;(Q=u(this,mZ))==null||Q.activate(J)}};mZ=new WeakMap;var z8=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}apply(J){return J.transform}},gq=class{constructor(J){this.draggables=new F8,this.droppables=new F8,this.plugins=new q1(J),this.sensors=new q1(J),this.modifiers=new q1(J)}register(J,Q){if(J instanceof MJ)return this.draggables.register(J.id,J);if(J instanceof wJ)return this.droppables.register(J.id,J);if(J.prototype instanceof z8)return this.modifiers.register(J,Q);if(J.prototype instanceof aJ)return this.sensors.register(J,Q);if(J.prototype instanceof $J)return this.plugins.register(J,Q);throw Error("Invalid instance type")}unregister(J){if(J instanceof _Z){if(J instanceof MJ)return this.draggables.unregister(J.id,J);if(J instanceof wJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof z8)return this.modifiers.unregister(J);if(J.prototype instanceof aJ)return this.sensors.unregister(J);if(J.prototype instanceof $J)return this.plugins.unregister(J);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},a8,r8,t8,e8,J2,Q2,Z2,$2,q2,rQ,pZ,RQ,g,T1,P1,E1,S1,k1,tQ;q2=[h],$2=[T],Z2=[T],Q2=[T],J2=[T],e8=[T],t8=[h],r8=[h],a8=[h];var AJ=class{constructor(J){O(g,5,this),E(this,rQ),E(this,pZ),E(this,RQ,new jJ(void 0,(Q,Z)=>Q&&Z?Q.equals(Z):Q===Z)),this.status=new kJ,E(this,T1,O(g,8,this,!1)),O(g,11,this),E(this,P1,O(g,12,this,null)),O(g,15,this),E(this,E1,O(g,16,this,null)),O(g,19,this),E(this,S1,O(g,20,this,null)),O(g,23,this),E(this,k1,O(g,24,this,[])),O(g,27,this),this.position=new nQ({x:0,y:0}),E(this,tQ,{x:0,y:0}),WJ(this,rQ,J)}get shape(){let{current:J,initial:Q,previous:Z}=u(this,RQ);if(!J||!Q)return null;return{current:J,initial:Q,previous:Z}}set shape(J){if(!J)u(this,RQ).reset();else u(this,RQ).current=J}get source(){var J;let Q=this.sourceIdentifier;if(Q==null)return null;let Z=u(this,rQ).registry.draggables.get(Q);if(Z)WJ(this,pZ,Z);return(J=Z!=null?Z:u(this,pZ))!=null?J:null}get target(){var J;let Q=this.targetIdentifier;return Q!=null?(J=u(this,rQ).registry.droppables.get(Q))!=null?J:null:null}get transform(){let{x:J,y:Q}=this.position.delta,Z={x:J,y:Q};for(let $ of this.modifiers)Z=$.apply(B1(W1({},this.snapshot()),{transform:Z}));return WJ(this,tQ,Z),Z}snapshot(){return C(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:u(this,tQ),shape:this.shape?hZ(this.shape):null,position:hZ(this.position),status:hZ(this.status),canceled:this.canceled}))}reset(){JJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,u(this,RQ).reset(),this.position.reset({x:0,y:0}),WJ(this,tQ,{x:0,y:0}),this.modifiers=[]})}};g=PQ(null);rQ=new WeakMap;pZ=new WeakMap;RQ=new WeakMap;T1=new WeakMap;P1=new WeakMap;E1=new WeakMap;S1=new WeakMap;k1=new WeakMap;tQ=new WeakMap;P(g,2,"shape",q2,AJ);P(g,4,"canceled",$2,AJ,T1);P(g,4,"activatorEvent",Z2,AJ,P1);P(g,4,"sourceIdentifier",Q2,AJ,E1);P(g,4,"targetIdentifier",J2,AJ,S1);P(g,4,"modifiers",e8,AJ,k1);P(g,2,"source",t8,AJ);P(g,2,"target",r8,AJ);P(g,2,"transform",a8,AJ);rJ(g,AJ);var uq={get rendering(){return Promise.resolve()}};function VJ(J,Q){if(typeof J==="function")return J(Q);return J!=null?J:Q}var Y2=class{constructor(J){this.destroy=()=>{if(!this.dragOperation.status.idle)this.actions.stop({canceled:!0});this.dragOperation.modifiers.forEach((W)=>W.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Q;let Z=J!=null?J:{},$=VJ(Z.plugins,[]),q=VJ(Z.sensors,[]),Y=VJ(Z.modifiers,[]),H=(Q=Z.renderer)!=null?Q:uq,K=new fq(this),X=new gq(this);this.registry=X,this.monitor=K,this.renderer=H,this.actions=new bq(this),this.dragOperation=new AJ(this),this.collisionObserver=new hq(this),this.plugins=[vq,...$],this.modifiers=Y,this.sensors=q;let{destroy:B}=this,N=nJ(()=>{var W,G,L;let F=C(()=>this.dragOperation.modifiers),z=this.modifiers;for(let A of F)if(!z.includes(A))A.destroy();this.dragOperation.modifiers=(L=(G=(W=this.dragOperation.source)==null?void 0:W.modifiers)==null?void 0:G.map((A)=>{let{plugin:I,options:U}=CQ(A);return new I(this,U)}))!=null?L:z});this.destroy=()=>{N(),B()}}get plugins(){return this.registry.plugins.values}set plugins(J){this.registry.plugins.values=J}get modifiers(){return this.registry.modifiers.values}set modifiers(J){this.registry.modifiers.values=J}get sensors(){return this.registry.sensors.values}set sensors(J){this.registry.sensors.values=J}};var U2=(J)=>{throw TypeError(J)},y1=(J,Q,Z)=>Q.has(J)||U2("Cannot "+Z),R=(J,Q,Z)=>(y1(J,Q,"read from private field"),Q.get(J)),YJ=(J,Q,Z)=>Q.has(J)?U2("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),BJ=(J,Q,Z,$)=>(y1(J,Q,"write to private field"),Q.set(J,Z),Z),L2=(J,Q,Z)=>(y1(J,Q,"access private method"),Z);function eZ(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function f1(J,Q){let Z=J.getAnimations(),$=null;for(let q of Z){if(q.playState!=="running")continue;let{effect:Y}=q,K=(eZ(Y)?Y.getKeyframes():[]).filter(Q);if(K.length>0)$=[K[K.length-1],q]}return $}function J0(J){let{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}=J.getBoundingClientRect();return{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}}function v1(J){let Q=Object.prototype.toString.call(J);return Q==="[object Window]"||Q==="[object global]"}function KZ(J){return"nodeType"in J}function NJ(J){var Q,Z,$;if(!J)return window;if(v1(J))return J;if(!KZ(J))return window;if("defaultView"in J)return(Q=J.defaultView)!=null?Q:window;return($=(Z=J.ownerDocument)==null?void 0:Z.defaultView)!=null?$:window}function Q0(J){let{Document:Q}=NJ(J);return J instanceof Q||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function xJ(J){if(!J||v1(J))return!1;return J instanceof NJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function G2(J){return J instanceof NJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function QQ(J){if(!J)return document;if(v1(J))return J.document;if(!KZ(J))return document;if(Q0(J))return J;if(xJ(J)||G2(J))return J.ownerDocument;return document}function mq(J){var Q,Z,$,q;let{documentElement:Y}=QQ(J),H=NJ(J).visualViewport,K=(Q=H==null?void 0:H.width)!=null?Q:Y.clientWidth,X=(Z=H==null?void 0:H.height)!=null?Z:Y.clientHeight,B=($=H==null?void 0:H.offsetTop)!=null?$:0,N=(q=H==null?void 0:H.offsetLeft)!=null?q:0;return{top:B,left:N,right:N+K,bottom:B+X,width:K,height:X}}function pq(J,Q){if(dq(J)&&J.open===!1)return!1;let{overflow:Z,overflowX:$,overflowY:q}=getComputedStyle(J);return Z==="visible"&&$==="visible"&&q==="visible"}function dq(J){return J.tagName==="DETAILS"}function iZ(J,Q=J.getBoundingClientRect(),Z=0){var $,q,Y,H,K;let X=Q,{ownerDocument:B}=J,N=($=B.defaultView)!=null?$:window,W=J.parentElement;while(W&&W!==B.documentElement){if(!pq(W)){let M=W.getBoundingClientRect(),V=Z*(M.bottom-M.top),w=Z*(M.right-M.left),f=Z*(M.bottom-M.top),j=Z*(M.right-M.left);X={top:Math.max(X.top,M.top-V),right:Math.min(X.right,M.right+w),bottom:Math.min(X.bottom,M.bottom+f),left:Math.max(X.left,M.left-j),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top}W=W.parentElement}let G=N.visualViewport,L=(q=G==null?void 0:G.offsetTop)!=null?q:0,F=(Y=G==null?void 0:G.offsetLeft)!=null?Y:0,z=(H=G==null?void 0:G.width)!=null?H:N.innerWidth,A=(K=G==null?void 0:G.height)!=null?K:N.innerHeight,I=Z*A,U=Z*z;if(X={top:Math.max(X.top,L-I),right:Math.min(X.right,F+z+U),bottom:Math.min(X.bottom,L+A+I),left:Math.max(X.left,F-U),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top,X.width<0)X.width=0;if(X.height<0)X.height=0;return X}function ZQ(J){return{x:J.clientX,y:J.clientY}}var V2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nZ(J=document,Q=new Set){if(Q.has(J))return[];Q.add(J);let Z=[J];for(let $ of Array.from(J.querySelectorAll("iframe, frame")))try{let q=$.contentDocument;if(q&&!Q.has(q))Z.push(...nZ(q,Q))}catch(q){}try{let $=J.defaultView;if($&&$!==window.top){let q=$.parent;if(q&&q.document&&q.document!==J)Z.push(...nZ(q.document,Q))}}catch($){}return Z}function Z0(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b1(){var J,Q;let Z=Z0()?window.visualViewport:null;return{x:(J=Z==null?void 0:Z.offsetLeft)!=null?J:0,y:(Q=Z==null?void 0:Z.offsetTop)!=null?Q:0}}function $0(J){if(!J||!KZ(J))return!1;return J instanceof NJ(J).ShadowRoot}function HZ(J){if(J&&KZ(J)){let Q=J.getRootNode();if($0(Q))return Q;else if(Q instanceof Document)return Q}return QQ(J)}function g1(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function F2(J){let Z=J.cloneNode(!0),$=Array.from(J.querySelectorAll("input, textarea, select, canvas, [contenteditable]"));return Array.from(Z.querySelectorAll("input, textarea, select, canvas, [contenteditable]")).forEach((Y,H)=>{let K=$[H];if(K2(Y)&&K2(K)){if(Y.type!=="file")Y.value=K.value;if(Y.type==="radio"&&Y.name)Y.name=`Cloned__${Y.name}`}if(H2(Y)&&H2(K)&&K.width>0&&K.height>0){let X=Y.getContext("2d");X==null||X.drawImage(K,0,0)}}),Z}function K2(J){return"value"in J}function H2(J){return J.tagName==="CANVAS"}function u1(J,{x:Q,y:Z}){let $=J.elementFromPoint(Q,Z);if(_q($)){let{contentDocument:q}=$;if(q){let{left:Y,top:H}=$.getBoundingClientRect();return u1(q,{x:Q-Y,y:Z-H})}}return $}function _q(J){return(J==null?void 0:J.tagName)==="IFRAME"}var m1=new WeakMap;function z2(J){return Boolean(J.closest(`
|
|
5
|
-
input:not([disabled]),
|
|
6
|
-
select:not([disabled]),
|
|
7
|
-
textarea:not([disabled]),
|
|
8
|
-
button:not([disabled]),
|
|
9
|
-
a[href],
|
|
10
|
-
[contenteditable]:not([contenteditable="false"])
|
|
11
|
-
`))}var p1=class{constructor(){this.entries=new Set,this.clear=()=>{for(let J of this.entries){let[Q,{type:Z,listener:$,options:q}]=J;Q.removeEventListener(Z,$,q)}this.entries.clear()}}bind(J,Q){let Z=Array.isArray(J)?J:[J],$=Array.isArray(Q)?Q:[Q],q=[];for(let H of Z)for(let K of $){let{type:X,listener:B,options:N}=K,W=[H,K];H.addEventListener(X,B,N),this.entries.add(W),q.push(W)}let Y=this.entries;return function(){for(let K of q){let[X,{type:B,listener:N,options:W}]=K;X.removeEventListener(B,N,W),Y.delete(K)}}}};function JQ(J){let Q=J==null?void 0:J.ownerDocument.defaultView;if(Q&&Q.self!==Q.parent)return Q.frameElement}function cq(J){let Q=new Set,Z=JQ(J);while(Z)Q.add(Z),Z=JQ(Z);return Q}function lq(J,Q){let Z=setTimeout(J,Q);return()=>clearTimeout(Z)}function M2(J,Q){let Z=()=>performance.now(),$,q;return function(...Y){let H=this;if(!q)J.apply(H,Y),q=Z();else $==null||$(),$=lq(()=>{J.apply(H,Y),q=Z()},Q-(Z()-q))}}function sq(J,Q){if(J===Q)return!0;if(!J||!Q)return!1;return J.top==Q.top&&J.left==Q.left&&J.right==Q.right&&J.bottom==Q.bottom}function oq(J,Q=J.getBoundingClientRect()){let{width:Z,height:$}=iZ(J,Q);return Z>0&&$>0}var iq=V2?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},sZ,nq=class extends iq{constructor(J){super((Q)=>{if(!R(this,sZ)){BJ(this,sZ,!0);return}J(Q,this)});YJ(this,sZ,!1)}};sZ=new WeakMap;var X2=Array.from({length:100},(J,Q)=>Q/100),w2=75,tJ,aZ,bJ,eJ,JZ,i,qZ,QZ,rZ,A2,I2,j2=class{constructor(J,Q,Z={debug:!1,skipInitial:!1}){this.element=J,this.callback=Q,YJ(this,rZ),this.disconnect=()=>{var Y,H,K;BJ(this,qZ,!0),(Y=R(this,bJ))==null||Y.disconnect(),(H=R(this,eJ))==null||H.disconnect(),R(this,JZ).disconnect(),(K=R(this,i))==null||K.remove()},YJ(this,tJ,!0),YJ(this,aZ),YJ(this,bJ),YJ(this,eJ),YJ(this,JZ),YJ(this,i),YJ(this,qZ,!1),YJ(this,QZ,M2(()=>{var Y,H,K;let{element:X}=this;if((Y=R(this,eJ))==null||Y.disconnect(),R(this,qZ)||!R(this,tJ)||!X.isConnected)return;let B=(H=X.ownerDocument)!=null?H:document,{innerHeight:N,innerWidth:W}=(K=B.defaultView)!=null?K:window,G=X.getBoundingClientRect(),L=iZ(X,G),{top:F,left:z,bottom:A,right:I}=L,U=-Math.floor(F),M=-Math.floor(z),V=-Math.floor(W-I),w=-Math.floor(N-A),f=`${U}px ${V}px ${w}px ${M}px`;this.boundingClientRect=G,BJ(this,eJ,new IntersectionObserver((j)=>{let[p]=j,{intersectionRect:b}=p;if((p.intersectionRatio!==1?p.intersectionRatio:XJ.intersectionRatio(b,iZ(X)))!==1)R(this,QZ).call(this)},{threshold:X2,rootMargin:f,root:B})),R(this,eJ).observe(X),L2(this,rZ,A2).call(this)},w2)),this.boundingClientRect=J.getBoundingClientRect(),BJ(this,tJ,oq(J,this.boundingClientRect));let $=!0;this.callback=(Y)=>{if($){if($=!1,Z.skipInitial)return}Q(Y)};let q=J.ownerDocument;if(Z==null?void 0:Z.debug)BJ(this,i,document.createElement("div")),R(this,i).style.background="rgba(0,0,0,0.15)",R(this,i).style.position="fixed",R(this,i).style.pointerEvents="none",q.body.appendChild(R(this,i));if(BJ(this,JZ,new IntersectionObserver((Y)=>{var H,K;let X=Y[Y.length-1],{boundingClientRect:B,isIntersecting:N}=X,{width:W,height:G}=B,L=R(this,tJ);if(BJ(this,tJ,N),!W&&!G)return;if(L&&!N){if((H=R(this,eJ))==null||H.disconnect(),this.callback(null),(K=R(this,bJ))==null||K.disconnect(),BJ(this,bJ,void 0),R(this,i))R(this,i).style.visibility="hidden"}else R(this,QZ).call(this);if(N&&!R(this,bJ))BJ(this,bJ,new nq(R(this,QZ))),R(this,bJ).observe(J)},{threshold:X2,root:q})),R(this,tJ)&&!Z.skipInitial)this.callback(this.boundingClientRect);R(this,JZ).observe(J)}};tJ=new WeakMap;aZ=new WeakMap;bJ=new WeakMap;eJ=new WeakMap;JZ=new WeakMap;i=new WeakMap;qZ=new WeakMap;QZ=new WeakMap;rZ=new WeakSet;A2=function(){if(R(this,qZ))return;if(L2(this,rZ,I2).call(this),sq(this.boundingClientRect,R(this,aZ)))return;this.callback(this.boundingClientRect),BJ(this,aZ,this.boundingClientRect)};I2=function(){if(R(this,i)){let{top:J,left:Q,width:Z,height:$}=iZ(this.element);R(this,i).style.overflow="hidden",R(this,i).style.visibility="visible",R(this,i).style.top=`${Math.floor(J)}px`,R(this,i).style.left=`${Math.floor(Q)}px`,R(this,i).style.width=`${Math.floor(Z)}px`,R(this,i).style.height=`${Math.floor($)}px`}};var cZ=new WeakMap,lZ=new WeakMap;function aq(J,Q){let Z=cZ.get(J);if(!Z)Z={disconnect:new j2(J,(q)=>{let Y=cZ.get(J);if(!Y)return;Y.callbacks.forEach((H)=>H(q))},{skipInitial:!0}).disconnect,callbacks:new Set};return Z.callbacks.add(Q),cZ.set(J,Z),()=>{if(Z.callbacks.delete(Q),Z.callbacks.size===0)cZ.delete(J),Z.disconnect()}}function rq(J,Q){let Z=new Set;for(let $ of J){let q=aq($,Q);Z.add(q)}return()=>Z.forEach(($)=>$())}function tq(J,Q){var Z;let $=J.ownerDocument;if(!lZ.has($)){let H=new AbortController,K=new Set;document.addEventListener("scroll",(X)=>K.forEach((B)=>B(X)),{capture:!0,passive:!0,signal:H.signal}),lZ.set($,{disconnect:()=>H.abort(),listeners:K})}let{listeners:q,disconnect:Y}=(Z=lZ.get($))!=null?Z:{};if(!q||!Y)return()=>{};return q.add(Q),()=>{if(q.delete(Q),q.size===0)Y(),lZ.delete($)}}var ZZ,$Z,oZ,h1,O2=class{constructor(J,Q,Z){this.callback=Q,YJ(this,ZZ),YJ(this,$Z,!1),YJ(this,oZ),YJ(this,h1,M2((H)=>{if(R(this,$Z))return;if(!H.target)return;if("contains"in H.target&&typeof H.target.contains==="function"){for(let K of R(this,oZ))if(H.target.contains(K)){this.callback(R(this,ZZ).boundingClientRect);break}}},w2));let $=cq(J),q=rq($,Q),Y=tq(J,R(this,h1));BJ(this,oZ,$),BJ(this,ZZ,new j2(J,Q,Z)),this.disconnect=()=>{if(R(this,$Z))return;BJ(this,$Z,!0),q(),Y(),R(this,ZZ).disconnect()}}};ZZ=new WeakMap;$Z=new WeakMap;oZ=new WeakMap;h1=new WeakMap;function q0(J){return"showPopover"in J&&"hidePopover"in J&&typeof J.showPopover==="function"&&typeof J.hidePopover==="function"}function $Q(J){try{if(q0(J)&&J.isConnected&&J.hasAttribute("popover")&&!J.matches(":popover-open"))J.showPopover()}catch(Q){}}function W2(J){if(!V2||!J)return!1;return J===QQ(J).scrollingElement}function R2(J){var Q,Z;let $=NJ(J),q=W2(J)?mq(J):J0(J),Y=$.visualViewport,H=W2(J)?{height:(Q=Y==null?void 0:Y.height)!=null?Q:$.innerHeight,width:(Z=Y==null?void 0:Y.width)!=null?Z:$.innerWidth}:{height:J.clientHeight,width:J.clientWidth},K={current:{x:J.scrollLeft,y:J.scrollTop},max:{x:J.scrollWidth-H.width,y:J.scrollHeight-H.height}},X=K.current.y<=0,B=K.current.x<=0,N=K.current.y>=K.max.y,W=K.current.x>=K.max.x;return{rect:q,position:K,isTop:X,isLeft:B,isBottom:N,isRight:W}}function D2(J,Q){let{isTop:Z,isBottom:$,isLeft:q,isRight:Y,position:H}=R2(J),{x:K,y:X}=Q!=null?Q:{x:0,y:0},B=!Z&&H.current.y+X>0,N=!$&&H.current.y+X<H.max.y,W=!q&&H.current.x+K>0,G=!Y&&H.current.x+K<H.max.x;return{top:B,bottom:N,left:W,right:G,x:W||G,y:B||N}}var d1=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Q,resolvers:Z}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Q)$();for(let $ of Z)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Q)=>this.resolvers.add(Q))}},XZ=new d1((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),eq=new d1((J)=>setTimeout(J,50)),tZ=new Map,JY=tZ.clear.bind(tZ);function DJ(J,Q=!1){if(!Q)return B2(J);let Z=tZ.get(J);if(Z)return Z;return Z=B2(J),tZ.set(J,Z),eq.schedule(JY),Z}function B2(J){return NJ(J).getComputedStyle(J)}function QY(J,Q=DJ(J,!0)){return Q.position==="fixed"||Q.position==="sticky"}function ZY(J,Q=DJ(J,!0)){let Z=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((q)=>{let Y=Q[q];return typeof Y==="string"?Z.test(Y):!1})}var $Y={excludeElement:!0,escapeShadowDOM:!0};function Y0(J,Q=$Y){let{limit:Z,excludeElement:$,escapeShadowDOM:q}=Q,Y=new Set;function H(K){if(Z!=null&&Y.size>=Z)return Y;if(!K)return Y;if(Q0(K)&&K.scrollingElement!=null&&!Y.has(K.scrollingElement))return Y.add(K.scrollingElement),Y;if(q&&$0(K))return H(K.host);if(!xJ(K)){if(G2(K))return H(K.parentElement);return Y}if(Y.has(K))return Y;let X=DJ(K,!0);if($&&K===J);else if(ZY(K,X))Y.add(K);if(QY(K,X)){let{scrollingElement:B}=K.ownerDocument;if(B)Y.add(B);return Y}return H(K.parentNode)}if(!J)return Y;return H(J)}function qQ(J,Q=window.frameElement){let Z={x:0,y:0,scaleX:1,scaleY:1};if(!J)return Z;let $=JQ(J);while($){if($===Q)return Z;let q=J0($),{x:Y,y:H}=qY($,q);Z.x=Z.x+q.left,Z.y=Z.y+q.top,Z.scaleX=Z.scaleX*Y,Z.scaleY=Z.scaleY*H,$=JQ($)}return Z}function qY(J,Q=J0(J)){let Z=Math.round(Q.width),$=Math.round(Q.height);if(xJ(J))return{x:Z/J.offsetWidth,y:$/J.offsetHeight};let q=DJ(J,!0);return{x:(parseFloat(q.width)||Z)/Z,y:(parseFloat(q.height)||$)/$}}function YY(J){if(J==="none")return null;let Q=J.split(" "),Z=parseFloat(Q[0]),$=parseFloat(Q[1]);if(isNaN(Z)&&isNaN($))return null;return{x:isNaN(Z)?$:Z,y:isNaN($)?Z:$}}function xQ(J){if(J==="none")return null;let[Q,Z,$="0"]=J.split(" "),q={x:parseFloat(Q),y:parseFloat(Z),z:parseInt($,10)};if(isNaN(q.x)&&isNaN(q.y))return null;return{x:isNaN(q.x)?0:q.x,y:isNaN(q.y)?0:q.y,z:isNaN(q.z)?0:q.z}}function WZ(J){var Q,Z,$,q,Y,H,K,X,B;let{scale:N,transform:W,translate:G}=J,L=YY(N),F=xQ(G),z=KY(W);if(!z&&!L&&!F)return null;let A={x:(Q=L==null?void 0:L.x)!=null?Q:1,y:(Z=L==null?void 0:L.y)!=null?Z:1},I={x:($=F==null?void 0:F.x)!=null?$:0,y:(q=F==null?void 0:F.y)!=null?q:0},U={x:(Y=z==null?void 0:z.x)!=null?Y:0,y:(H=z==null?void 0:z.y)!=null?H:0,scaleX:(K=z==null?void 0:z.scaleX)!=null?K:1,scaleY:(X=z==null?void 0:z.scaleY)!=null?X:1};return{x:I.x+U.x,y:I.y+U.y,z:(B=F==null?void 0:F.z)!=null?B:0,scaleX:A.x*U.scaleX,scaleY:A.y*U.scaleY}}function KY(J){if(J.startsWith("matrix3d(")){let Q=J.slice(9,-1).split(/, /);return{x:+Q[12],y:+Q[13],scaleX:+Q[0],scaleY:+Q[5]}}else if(J.startsWith("matrix(")){let Q=J.slice(7,-1).split(/, /);return{x:+Q[4],y:+Q[5],scaleX:+Q[0],scaleY:+Q[3]}}return null}var UJ=((J)=>{return J[J.Idle=0]="Idle",J[J.Forward=1]="Forward",J[J.Reverse=-1]="Reverse",J})(UJ||{}),HY={x:0.2,y:0.2},XY={x:10,y:10};function C2(J,Q,Z,$=25,q=HY,Y=XY){let{x:H,y:K}=Q,{rect:X,isTop:B,isBottom:N,isLeft:W,isRight:G}=R2(J),L=qQ(J),F=DJ(J,!0),z=WZ(F),A=z!==null?(z==null?void 0:z.scaleX)<0:!1,I=z!==null?(z==null?void 0:z.scaleY)<0:!1,U=new XJ(X.left*L.scaleX+L.x,X.top*L.scaleY+L.y,X.width*L.scaleX,X.height*L.scaleY),M={x:0,y:0},V={x:0,y:0},w={height:U.height*q.y,width:U.width*q.x};if(w.height>0&&(!B||I&&!N)&&K<=U.top+w.height&&(Z==null?void 0:Z.y)!==1&&H>=U.left-Y.x&&H<=U.right+Y.x)M.y=I?1:-1,V.y=$*Math.abs((U.top+w.height-K)/w.height);else if(w.height>0&&(!N||I&&!B)&&K>=U.bottom-w.height&&(Z==null?void 0:Z.y)!==-1&&H>=U.left-Y.x&&H<=U.right+Y.x)M.y=I?-1:1,V.y=$*Math.abs((U.bottom-w.height-K)/w.height);if(w.width>0&&(!G||A&&!W)&&H>=U.right-w.width&&(Z==null?void 0:Z.x)!==-1&&K>=U.top-Y.y&&K<=U.bottom+Y.y)M.x=A?-1:1,V.x=$*Math.abs((U.right-w.width-H)/w.width);else if(w.width>0&&(!W||A&&!G)&&H<=U.left+w.width&&(Z==null?void 0:Z.x)!==1&&K>=U.top-Y.y&&K<=U.bottom+Y.y)M.x=A?1:-1,V.x=$*Math.abs((U.left+w.width-H)/w.width);return{direction:M,speed:V}}function T2(J,{block:Q="nearest",inline:Z="nearest"}={}){if(!xJ(J))return;let $=Y0(J),q=[];for(let Y of $){if(!xJ(Y))continue;let{top:H,left:K}=WY(J,Y),X=H,B=K;for(let N of q)X-=N.scrollTop,B-=N.scrollLeft;if(Q!=="none"){let N=X<Y.scrollTop,W=X+J.offsetHeight>Y.scrollTop+Y.clientHeight;if(N!==W)if(Q==="center")Y.scrollTop=X-Y.clientHeight/2+J.offsetHeight/2;else if(N)Y.scrollTop=X;else Y.scrollTop=X+J.offsetHeight-Y.clientHeight}if(Z!=="none"){let N=B<Y.scrollLeft,W=B+J.offsetWidth>Y.scrollLeft+Y.clientWidth;if(N!==W)if(Z==="center")Y.scrollLeft=B-Y.clientWidth/2+J.offsetWidth/2;else if(N)Y.scrollLeft=B;else Y.scrollLeft=B+J.offsetWidth-Y.clientWidth}q.push(Y)}}function N2(J){let Q=0,Z=0,$=J;while($){Q+=$.offsetTop,Z+=$.offsetLeft;let q=$.offsetParent;if(!xJ(q))break;Q+=q.clientTop,Z+=q.clientLeft,$=q}return{top:Q,left:Z}}function WY(J,Q){let Z=N2(J),$=N2(Q);return{top:Z.top-$.top-Q.clientTop,left:Z.left-$.left-Q.clientLeft}}function BY(J,Q,Z){let{scaleX:$,scaleY:q,x:Y,y:H}=Q,K=J.left+Y+(1-$)*parseFloat(Z),X=J.top+H+(1-q)*parseFloat(Z.slice(Z.indexOf(" ")+1)),B=$?J.width*$:J.width,N=q?J.height*q:J.height;return{width:B,height:N,top:X,right:K+B,bottom:X+N,left:K}}function NY(J,Q,Z){let{scaleX:$,scaleY:q,x:Y,y:H}=Q,K=J.left-Y-(1-$)*parseFloat(Z),X=J.top-H-(1-q)*parseFloat(Z.slice(Z.indexOf(" ")+1)),B=$?J.width/$:J.width,N=q?J.height/q:J.height;return{width:B,height:N,top:X,right:K+B,bottom:X+N,left:K}}function P2({element:J,keyframes:Q,options:Z}){return J.animate(Q,Z).finished}function OK(J,Q=DJ(J).translate,Z=!0){if(Z){let $=f1(J,(q)=>("translate"in q));if($){let{translate:q=""}=$[0];if(typeof q==="string"){let Y=xQ(q);if(Y)return Y}}}if(Q){let $=xQ(Q);if($)return $}return{x:0,y:0,z:0}}var UY=new d1((J)=>setTimeout(J,0)),YZ=new Map,LY=YZ.clear.bind(YZ);function GY(J){let Q=J.ownerDocument,Z=YZ.get(Q);if(Z)return Z;Z=Q.getAnimations(),YZ.set(Q,Z),UY.schedule(LY);let $=Z.filter((q)=>eZ(q.effect)&&q.effect.target===J);return YZ.set(J,$),Z}function VY(J,Q){let Z=GY(J).filter(($)=>{var q,Y;if(eZ($.effect)){let{target:H}=$.effect;if((Y=H&&((q=Q.isValidTarget)==null?void 0:q.call(Q,H)))!=null?Y:!0)return $.effect.getKeyframes().some((X)=>{for(let B of Q.properties)if(X[B])return!0})}}).map(($)=>{let{effect:q,currentTime:Y}=$,H=q==null?void 0:q.getComputedTiming().duration;if($.pending||$.playState==="finished")return;if(typeof H=="number"&&typeof Y=="number"&&Y<H)return $.currentTime=H,()=>{$.currentTime=Y}});if(Z.length>0)return()=>Z.forEach(($)=>$==null?void 0:$())}var hJ=class extends XJ{constructor(J,Q={}){var Z,$,q,Y;let{frameTransform:H=qQ(J),ignoreTransforms:K,getBoundingClientRect:X=J0}=Q,B=VY(J,{properties:["transform","translate","scale","width","height"],isValidTarget:(w)=>(w!==J||Z0())&&w.contains(J)}),N=X(J),{top:W,left:G,width:L,height:F}=N,z,A=DJ(J),I=WZ(A),U={x:(Z=I==null?void 0:I.scaleX)!=null?Z:1,y:($=I==null?void 0:I.scaleY)!=null?$:1},M=FY(J,A);if(B==null||B(),I){if(z=NY(N,I,A.transformOrigin),K||M)W=z.top,G=z.left,L=z.width,F=z.height}let V={width:(q=z==null?void 0:z.width)!=null?q:L,height:(Y=z==null?void 0:z.height)!=null?Y:F};if(M&&!K&&z){let w=BY(z,M,A.transformOrigin);W=w.top,G=w.left,L=w.width,F=w.height,U.x=M.scaleX,U.y=M.scaleY}if(H){if(!K)G*=H.scaleX,L*=H.scaleX,W*=H.scaleY,F*=H.scaleY;G+=H.x,W+=H.y}super(G,W,L,F);this.scale=U,this.intrinsicWidth=V.width,this.intrinsicHeight=V.height}};function FY(J,Q){let Z=J.getAnimations();if(!Z.length)return null;let $,q,Y,H=!1;for(let K of Z){if(K.playState!=="running")continue;let X=eZ(K.effect)?K.effect.getKeyframes():[],B=X[X.length-1];if(!B)continue;let{transform:N,translate:W,scale:G}=B;if(typeof N==="string"&&N)$=N,H=!0;if(typeof W==="string"&&W)q=W,H=!0;if(typeof G==="string"&&G)Y=G,H=!0}if(!H)return null;return WZ({transform:$!=null?$:Q.transform,translate:q!=null?q:Q.translate,scale:Y!=null?Y:Q.scale})}function kQ(J){return"style"in J&&typeof J.style==="object"&&J.style!==null&&"setProperty"in J.style&&"removeProperty"in J.style&&typeof J.style.setProperty==="function"&&typeof J.style.removeProperty==="function"}var E2=class{constructor(J){this.element=J,this.initial=new Map}set(J,Q=""){let{element:Z}=this;if(!kQ(Z))return;for(let[$,q]of Object.entries(J)){let Y=`${Q}${$}`;if(!this.initial.has(Y))this.initial.set(Y,Z.style.getPropertyValue(Y));Z.style.setProperty(Y,typeof q==="string"?q:`${q}px`)}}remove(J,Q=""){let{element:Z}=this;if(!kQ(Z))return;for(let $ of J){let q=`${Q}${$}`;Z.style.removeProperty(q)}}reset(){let{element:J}=this;if(!kQ(J))return;for(let[Q,Z]of this.initial)J.style.setProperty(Q,Z);if(J.getAttribute("style")==="")J.removeAttribute("style")}};function gJ(J){if(!J)return!1;return J instanceof NJ(J).Element||KZ(J)&&J.nodeType===Node.ELEMENT_NODE}function K0(J){if(!J)return!1;let{KeyboardEvent:Q}=NJ(J.target);return J instanceof Q}function S2(J){if(!J)return!1;let{PointerEvent:Q}=NJ(J.target);return J instanceof Q}function k2(J){if(!gJ(J))return!1;let{tagName:Q}=J;return Q==="INPUT"||Q==="TEXTAREA"||zY(J)}function zY(J){return J.hasAttribute("contenteditable")&&J.getAttribute("contenteditable")!=="false"}var x1={};function H0(J){let Q=x1[J]==null?0:x1[J]+1;return x1[J]=Q,`${J}-${Q}`}var MY=({dragOperation:J,droppable:Q})=>{let Z=J.position.current;if(!Z)return null;let{id:$}=Q;if(!Q.shape)return null;if(Q.shape.containsPoint(Z)){let q=e.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:OJ.High}}return null},wY=({dragOperation:J,droppable:Q})=>{let{shape:Z}=J;if(!Q.shape||!(Z==null?void 0:Z.current))return null;let $=Z.current.intersectionArea(Q.shape);if($){let{position:q}=J,Y=e.distance(Q.shape.center,q.current),K=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:K,type:RJ.ShapeIntersection,priority:OJ.Normal}}return null},x2=(J)=>{var Q;return(Q=MY(J))!=null?Q:wY(J)},gK=(J)=>{let{dragOperation:Q,droppable:Z}=J,{shape:$,position:q}=Q;if(!Z.shape)return null;let Y=$?XJ.from($.current.boundingRectangle).corners:void 0,K=XJ.from(Z.shape.boundingRectangle).corners.reduce((X,B,N)=>{var W;return X+e.distance(e.from(B),(W=Y==null?void 0:Y[N])!=null?W:q.current)},0)/4;return{id:Z.id,value:1/K,type:RJ.Collision,priority:OJ.Normal}};var{create:AY,defineProperty:Z9,defineProperties:IY,getOwnPropertyDescriptor:jY,getOwnPropertyDescriptors:OY,getOwnPropertySymbols:B0}=Object,p2=Object.prototype.hasOwnProperty,d2=Object.prototype.propertyIsEnumerable,_2=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),mQ=(J)=>{throw TypeError(J)},l1=(J,Q,Z)=>(Q in J)?Z9(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,FZ=(J,Q)=>{for(var Z in Q||(Q={}))if(p2.call(Q,Z))l1(J,Z,Q[Z]);if(B0){for(var Z of B0(Q))if(d2.call(Q,Z))l1(J,Z,Q[Z])}return J},$9=(J,Q)=>IY(J,OY(Q)),h2=(J,Q)=>Z9(J,"name",{value:Q,configurable:!0}),c2=(J,Q)=>{var Z={};for(var $ in J)if(p2.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&B0){for(var $ of B0(J))if(Q.indexOf($)<0&&d2.call(J,$))Z[$]=J[$]}return Z},pQ=(J)=>{var Q;return[,,,AY((Q=J==null?void 0:J[_2("metadata")])!=null?Q:null)]},l2=["class","method","getter","setter","accessor","field","value","get","set"],NZ=(J)=>J!==void 0&&typeof J!=="function"?mQ("Function expected"):J,RY=(J,Q,Z,$,q)=>({kind:l2[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?mQ("Already initialized"):q.push(NZ(Y||null))}),WQ=(J,Q)=>l1(Q,_2("metadata"),J[3]),l=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},FJ=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=l2[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&jY(W<4?q:{get[Z](){return x(this,Y)},set[Z](V){return qJ(this,Y,V)}},Z));W?L&&W<4&&h2(Y,(W>2?"set ":W>1?"get ":"")+Z):h2(q,Z);for(var M=$.length-1;M>=0;M--){if(B=RY(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>DY(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?x:XQ)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>qJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)NZ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)mQ("Object expected");else NZ(H=K.get)&&(U.get=H),NZ(H=K.set)&&(U.set=H),NZ(H=K.init)&&A.unshift(H)}return W||WQ(J,q),U&&Z9(q,Z,U),L?W^4?Y:U:q},q9=(J,Q,Z)=>Q.has(J)||mQ("Cannot "+Z),DY=(J,Q)=>Object(Q)!==Q?mQ('Cannot use the "in" operator on this value'):J.has(Q),x=(J,Q,Z)=>(q9(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),m=(J,Q,Z)=>Q.has(J)?mQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),qJ=(J,Q,Z,$)=>(q9(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),XQ=(J,Q,Z)=>(q9(J,Q,"access private method"),Z),y2={role:"button",roleDescription:"draggable"},CY="dnd-kit-description",TY="dnd-kit-announcement",PY={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},EY={dragstart({operation:{source:J}}){if(!J)return;return`Picked up draggable item ${J.id}.`},dragover({operation:{source:J,target:Q}}){if(!J||J.id===(Q==null?void 0:Q.id))return;if(Q)return`Draggable item ${J.id} was moved over droppable target ${Q.id}.`;return`Draggable item ${J.id} is no longer over a droppable target.`},dragend({operation:{source:J,target:Q},canceled:Z}){if(!J)return;if(Z)return`Dragging was cancelled. Draggable item ${J.id} was dropped.`;if(Q)return`Draggable item ${J.id} was dropped over droppable target ${Q.id}`;return`Draggable item ${J.id} was dropped.`}};function SY(J){let Q=J.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(Q)}function kY(J,Q){let Z=document.createElement("div");return Z.id=J,Z.style.setProperty("display","none"),Z.textContent=Q,Z}function xY(J){let Q=document.createElement("div");return Q.id=J,Q.setAttribute("role","status"),Q.setAttribute("aria-live","polite"),Q.setAttribute("aria-atomic","true"),Q.style.setProperty("position","fixed"),Q.style.setProperty("width","1px"),Q.style.setProperty("height","1px"),Q.style.setProperty("margin","-1px"),Q.style.setProperty("border","0"),Q.style.setProperty("padding","0"),Q.style.setProperty("overflow","hidden"),Q.style.setProperty("clip","rect(0 0 0 0)"),Q.style.setProperty("clip-path","inset(100%)"),Q.style.setProperty("white-space","nowrap"),Q}var hY=["dragover","dragmove"],yY=class extends $J{constructor(J,Q){super(J);let{id:Z,idPrefix:{description:$=CY,announcement:q=TY}={},announcements:Y=EY,screenReaderInstructions:H=PY,debounce:K=500}=Q!=null?Q:{},X=Z?`${$}-${Z}`:H0($),B=Z?`${q}-${Z}`:H0(q),N,W,G,L,F=(w=L)=>{if(!G||!w)return;if((G==null?void 0:G.nodeValue)!==w)G.nodeValue=w},z=()=>XZ.schedule(F),A=fY(z,K),I=Object.entries(Y).map(([w,f])=>{return this.manager.monitor.addEventListener(w,(j,p)=>{let b=G;if(!b)return;let y=f==null?void 0:f(j,p);if(y&&b.nodeValue!==y)if(L=y,hY.includes(w))A();else z(),A.cancel()})}),U=()=>{let w=[];if(!(N==null?void 0:N.isConnected))N=kY(X,H.draggable),w.push(N);if(!(W==null?void 0:W.isConnected))W=xY(B),G=document.createTextNode(""),W.appendChild(G),w.push(W);if(w.length>0)document.body.append(...w)},M=new Set;function V(){for(let w of M)w()}this.registerEffect(()=>{var w;M.clear();for(let f of this.manager.registry.draggables.value){let j=(w=f.handle)!=null?w:f.element;if(j){if(!N||!W)M.add(U);if((!SY(j)||Z0())&&!j.hasAttribute("tabindex"))M.add(()=>j.setAttribute("tabindex","0"));if(!j.hasAttribute("role")&&j.tagName.toLowerCase()!=="button")M.add(()=>j.setAttribute("role",y2.role));if(!j.hasAttribute("aria-roledescription"))M.add(()=>j.setAttribute("aria-roledescription",y2.roleDescription));if(!j.hasAttribute("aria-describedby"))M.add(()=>j.setAttribute("aria-describedby",X));for(let b of["aria-pressed","aria-grabbed"]){let y=String(f.isDragging);if(j.getAttribute(b)!==y)M.add(()=>j.setAttribute(b,y))}let p=String(f.disabled);if(j.getAttribute("aria-disabled")!==p)M.add(()=>j.setAttribute("aria-disabled",p))}}if(M.size>0)XZ.schedule(V)}),this.destroy=()=>{super.destroy(),N==null||N.remove(),W==null||W.remove(),I.forEach((w)=>w())}}};function fY(J,Q){let Z,$=()=>{clearTimeout(Z),Z=setTimeout(J,Q)};return $.cancel=()=>clearTimeout(Z),$}var N0=new Map,s2,o2,i2,n2,s1,GZ,yJ,Y9,gQ,a2,r2,t2,e2,_J=class extends(s1=SQ,n2=[T],i2=[h],o2=[h],s2=[h],s1){constructor(Q,Z){super(Q,Z);l(yJ,5,this),m(this,gQ),m(this,GZ,new Set),m(this,Y9,l(yJ,8,this,new Set)),l(yJ,11,this),this.registerEffect(XQ(this,gQ,a2))}register(Q){return x(this,GZ).add(Q),()=>{x(this,GZ).delete(Q)}}addRoot(Q){return C(()=>{let Z=new Set(this.additionalRoots);Z.add(Q),this.additionalRoots=Z}),()=>{C(()=>{let Z=new Set(this.additionalRoots);Z.delete(Q),this.additionalRoots=Z})}}get sourceRoot(){var Q;let{source:Z}=this.manager.dragOperation;return HZ((Q=Z==null?void 0:Z.element)!=null?Q:null)}get targetRoot(){var Q;let{target:Z}=this.manager.dragOperation;return HZ((Q=Z==null?void 0:Z.element)!=null?Q:null)}get roots(){let{status:Q}=this.manager.dragOperation;if(Q.initializing||Q.initialized){let Z=[this.sourceRoot,this.targetRoot].filter(($)=>$!=null);return new Set([...Z,...this.additionalRoots])}return new Set}};yJ=pQ(s1);GZ=new WeakMap;Y9=new WeakMap;gQ=new WeakSet;a2=function(){let{roots:J}=this,Q=[];for(let Z of J)for(let $ of x(this,GZ))Q.push(XQ(this,gQ,r2).call(this,Z,$));return()=>{for(let Z of Q)Z()}};r2=function(J,Q){let Z=N0.get(J);if(!Z)Z=new Map,N0.set(J,Z);let $=Z.get(Q);if(!$){let Y=Q0(J)?XQ(this,gQ,t2).call(this,J,Z,Q):XQ(this,gQ,e2).call(this,J,Z,Q);if(!Y)return()=>{};$=Y,Z.set(Q,$)}$.refCount++;let q=!1;return()=>{if(q)return;if(q=!0,$.refCount--,$.refCount===0)$.cleanup()}};t2=function(J,Q,Z){var $;let q=J.createElement("style"),{nonce:Y}=($=this.options)!=null?$:{};if(Y)q.setAttribute("nonce",Y);q.textContent=Z,J.head.prepend(q);let H=new MutationObserver((K)=>{for(let X of K)for(let B of Array.from(X.removedNodes))if(B===q){J.head.prepend(q);return}});return H.observe(J.head,{childList:!0}),{refCount:0,cleanup:()=>{if(H.disconnect(),q.remove(),Q.delete(Z),Q.size===0)N0.delete(J)}}};e2=function(J,Q,Z){"adoptedStyleSheets"in J&&Array.isArray(J.adoptedStyleSheets);let $=J.ownerDocument.defaultView,{CSSStyleSheet:q}=$!=null?$:{};if(!q)return null;let Y=new q;return Y.replaceSync(Z),J.adoptedStyleSheets.push(Y),{refCount:0,cleanup:()=>{var H;if($0(J)&&((H=J.host)==null?void 0:H.isConnected)){let K=J.adoptedStyleSheets.indexOf(Y);if(K!==-1)J.adoptedStyleSheets.splice(K,1)}if(Q.delete(Z),Q.size===0)N0.delete(J)}}};FJ(yJ,4,"additionalRoots",n2,_J,Y9);FJ(yJ,2,"sourceRoot",i2,_J);FJ(yJ,2,"targetRoot",o2,_J);FJ(yJ,2,"roots",s2,_J);WQ(yJ,_J);_J.configure=EQ(_J);var V0=_J,vY=class extends $J{constructor(J,Q){super(J,Q);this.manager=J;let{cursor:Z="grabbing"}=Q!=null?Q:{},$=J.registry.plugins.get(V0),q=$==null?void 0:$.register(`* { cursor: ${Z} !important; }`);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}}},AZ="data-dnd-",o1=`${AZ}dropping`,n="--dnd-",CJ=`${AZ}dragging`,U0=`${AZ}placeholder`,bY=[CJ,U0,"popover","aria-pressed","aria-grabbing"],gY=["view-transition-name"],uY=`
|
|
12
|
-
:is(:root,:host) [${CJ}] {
|
|
13
|
-
position: fixed !important;
|
|
14
|
-
pointer-events: none !important;
|
|
15
|
-
touch-action: none;
|
|
16
|
-
z-index: calc(infinity);
|
|
17
|
-
will-change: translate;
|
|
18
|
-
top: var(${n}top, 0px) !important;
|
|
19
|
-
left: var(${n}left, 0px) !important;
|
|
20
|
-
right: unset !important;
|
|
21
|
-
bottom: unset !important;
|
|
22
|
-
width: var(${n}width, auto);
|
|
23
|
-
max-width: var(${n}width, auto);
|
|
24
|
-
height: var(${n}height, auto);
|
|
25
|
-
max-height: var(${n}height, auto);
|
|
26
|
-
transform: var(${n}transform, none) !important;
|
|
27
|
-
transition: var(${n}transition) !important;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:is(:root,:host) [${U0}] {
|
|
31
|
-
transition: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:is(:root,:host) [${U0}='hidden'] {
|
|
35
|
-
visibility: hidden;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
[${CJ}] * {
|
|
39
|
-
pointer-events: none !important;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[${CJ}]:not([${o1}]) {
|
|
43
|
-
translate: var(${n}translate) !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[${CJ}][style*='${n}scale'] {
|
|
47
|
-
scale: var(${n}scale) !important;
|
|
48
|
-
transform-origin: var(${n}transform-origin) !important;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@layer dnd-kit {
|
|
52
|
-
:where([${CJ}][popover]) {
|
|
53
|
-
overflow: visible;
|
|
54
|
-
background: unset;
|
|
55
|
-
border: unset;
|
|
56
|
-
margin: unset;
|
|
57
|
-
padding: unset;
|
|
58
|
-
color: inherit;
|
|
59
|
-
|
|
60
|
-
&:is(input, button) {
|
|
61
|
-
border: revert;
|
|
62
|
-
background: revert;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
[${CJ}]::backdrop, [${AZ}overlay]:not([${CJ}]) {
|
|
67
|
-
display: none;
|
|
68
|
-
visibility: hidden;
|
|
69
|
-
}
|
|
70
|
-
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function mY(J,Q="hidden"){return C(()=>{let{element:Z,manager:$}=J;if(!Z||!$)return;let q=pY(Z,$.registry.droppables),Y=[],H=F2(Z),{remove:K}=H;return dY(q,H,Y),_Y(H,Q),H.remove=()=>{Y.forEach((X)=>X()),K.call(H)},H})}function pY(J,Q){let Z=new Map;for(let $ of Q){if(!$.element)continue;if(J===$.element||J.contains($.element)){let q=`${AZ}${H0("dom-id")}`;$.element.setAttribute(q,""),Z.set($,q)}}return Z}function dY(J,Q,Z){for(let[$,q]of J){if(!$.element)continue;let Y=`[${q}]`,H=Q.matches(Y)?Q:Q.querySelector(Y);if($.element.removeAttribute(q),!H)continue;let K=$.element;$.proxy=H,H.removeAttribute(q),m1.set(K,H),Z.push(()=>{m1.delete(K),$.proxy=void 0})}}function _Y(J,Q="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(U0,Q)}function J$(J,Q){if(J===Q)return!0;return JQ(J)===JQ(Q)}function f2(J){let{target:Q}=J;if("newState"in J&&J.newState==="closed"&&gJ(Q)&&Q.hasAttribute("popover"))requestAnimationFrame(()=>$Q(Q))}function i1(J){return J.tagName==="TR"}function cY(J,Q,Z){let $=new MutationObserver((q)=>{let Y=!1;for(let H of q){if(H.target!==J){Y=!0;continue}if(H.type!=="attributes")continue;let K=H.attributeName;if(K.startsWith("aria-")||bY.includes(K))continue;let X=J.getAttribute(K);if(K==="style"){if(kQ(J)&&kQ(Q)){let B=J.style;for(let N of Array.from(Q.style))if(B.getPropertyValue(N)==="")Q.style.removeProperty(N);for(let N of Array.from(B)){if(gY.includes(N)||N.startsWith(n))continue;let W=B.getPropertyValue(N);Q.style.setProperty(N,W)}}}else if(X!==null)Q.setAttribute(K,X);else Q.removeAttribute(K)}if(Y&&Z)Q.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function lY(J,Q,Z){let $=new MutationObserver((q)=>{for(let Y of q){if(Y.addedNodes.length===0)continue;for(let H of Array.from(Y.addedNodes)){if(H.contains(J)&&J.nextElementSibling!==Q){J.insertAdjacentElement("afterend",Q),$Q(Z);return}if(H.contains(Q)&&Q.previousElementSibling!==J){Q.insertAdjacentElement("beforebegin",J),$Q(Z);return}}}if(J.isConnected&&Q.isConnected&&J.nextElementSibling!==Q)J.insertAdjacentElement("afterend",Q),$Q(Z)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function sY(J){return new ResizeObserver(()=>{var Q,Z,$;let q=new hJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),Y=(Q=J.transformOrigin)!=null?Q:{x:1,y:1},H=(J.width-q.width)*Y.x+J.delta.x,K=(J.height-q.height)*Y.y+J.delta.y,X=b1();if(J.styles.set({width:q.width-J.widthOffset,height:q.height-J.heightOffset,top:J.top+K+X.y,left:J.left+H+X.x},n),(Z=J.getElementMutationObserver())==null||Z.takeRecords(),i1(J.element)&&i1(J.placeholder)){let z=Array.from(J.element.cells),A=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(z.map((I)=>I.style.width));for(let[I,U]of z.entries()){let M=A[I];U.style.width=`${M.getBoundingClientRect().width}px`}}let B=($=J.getTranslate())!=null?$:{x:0,y:0},N=J.left+H+X.x+B.x,W=J.top+K+X.y+B.y,G=q.width-J.widthOffset,L=q.height-J.heightOffset,F=J.frameTransform;J.dragOperation.shape=new XJ(N*F.scaleX+F.x,W*F.scaleY+F.y,G*F.scaleX,L*F.scaleY)})}var oY=250,iY="ease";function nY(J){var Q,Z,$,q;let{animation:Y}=J;if(typeof Y==="function"){let U=Y({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(U).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:H=oY,easing:K=iY}=Y!=null?Y:{};$Q(J.feedbackElement);let[,X]=(Q=f1(J.feedbackElement,(U)=>("translate"in U)))!=null?Q:[];X==null||X.pause();let B=(Z=J.placeholder)!=null?Z:J.element,N={frameTransform:J$(J.feedbackElement,B)?null:void 0},W=new hJ(J.feedbackElement,N),G=($=xQ(DJ(J.feedbackElement).translate))!=null?$:J.translate,L=new hJ(B,N),F=XJ.delta(W,L,J.alignment),z={x:G.x-F.x,y:G.y-F.y},A=Math.round(W.intrinsicHeight)!==Math.round(L.intrinsicHeight)?{minHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`],maxHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`]}:{},I=Math.round(W.intrinsicWidth)!==Math.round(L.intrinsicWidth)?{minWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`],maxWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},n),J.feedbackElement.setAttribute(o1,""),(q=J.getElementMutationObserver())==null||q.takeRecords(),P2({element:J.feedbackElement,keyframes:$9(FZ(FZ({},A),I),{translate:[`${G.x}px ${G.y}px 0`,`${z.x}px ${z.y}px 0`]}),options:{duration:g1(NJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?H:0,easing:K}}).then(()=>{J.feedbackElement.removeAttribute(o1),X==null||X.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var Q$,n1,zZ,K9,W0,Z$,$$,uQ=class extends(n1=$J,Q$=[T],n1){constructor(Q,Z){super(Q,Z);m(this,W0),m(this,K9,l(zZ,8,this)),l(zZ,11,this),this.state={initial:{},current:{}};let $=Q.registry.plugins.get(V0),q=$==null?void 0:$.register(uY);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}this.registerEffect(XQ(this,W0,Z$).bind(this,$)),this.registerEffect(XQ(this,W0,$$))}};zZ=pQ(n1);K9=new WeakMap;W0=new WeakSet;Z$=function(J){let{overlay:Q}=this;if(!Q||!J)return;let Z=HZ(Q);if(!Z)return;return J.addRoot(Z)};$$=function(){var J,Q,Z,$,q,Y,H;let{state:K,manager:X,options:B}=this,{dragOperation:N}=X,{position:W,source:G,status:L}=N;if(L.idle){K.current={},K.initial={};return}if(!G)return;let{element:F}=G,z=G.pluginConfig(uQ),A=(Q=(J=z==null?void 0:z.feedback)!=null?J:B==null?void 0:B.feedback)!=null?Q:"default",I=typeof A==="function"?A(G,X):A;if(!F||I==="none"||!L.initialized||L.initializing)return;let{initial:U}=K,M=(Z=this.overlay)!=null?Z:F,V=qQ(M),w=qQ(F),f=!J$(F,M),j=new hJ(F,{frameTransform:f?w:null,ignoreTransforms:!f}),p={x:w.scaleX/V.scaleX,y:w.scaleY/V.scaleY},{width:b,height:y,top:GQ,left:s}=j;if(f)b=b/p.x,y=y/p.y;let v=new E2(M),R0=DJ(F),{transition:A9,translate:I9,boxSizing:v$,paddingBlockStart:b$,paddingBlockEnd:g$,paddingInlineStart:u$,paddingInlineEnd:m$,borderInlineStartWidth:p$,borderInlineEndWidth:d$,borderBlockStartWidth:_$,borderBlockEndWidth:c$}=R0,OZ=A9.split(",").filter((S)=>!/^\s*(transform|translate|scale)\b/.test(S)).join(","),cJ=WZ(R0),l$=R0.transform,j9=I==="clone",O9=v$==="content-box",R9=O9?parseInt(u$)+parseInt(m$)+parseInt(p$)+parseInt(d$):0,D9=O9?parseInt(b$)+parseInt(g$)+parseInt(_$)+parseInt(c$):0,KJ=I!=="move"&&!this.overlay?mY(G,j9?"clone":"hidden"):null,D0=C(()=>K0(X.dragOperation.activatorEvent));if(!U.translate){if(this.overlay&&cJ)U.translate={x:cJ.x,y:cJ.y};else if(I9!=="none"){let S=xQ(I9);if(S)U.translate=S}}if(!U.transformOrigin){let S=C(()=>W.current),_=s+(($=cJ==null?void 0:cJ.x)!=null?$:0),HJ=GQ+((q=cJ==null?void 0:cJ.y)!=null?q:0);U.transformOrigin={x:(S.x-_*V.scaleX-V.x)/(b*V.scaleX),y:(S.y-HJ*V.scaleY-V.y)/(y*V.scaleY)}}let{transformOrigin:VQ}=U,C9=GQ*V.scaleY+V.y,T9=s*V.scaleX+V.x;if(!U.coordinates){if(U.coordinates={x:T9,y:C9},p.x!==1||p.y!==1){let{scaleX:S,scaleY:_}=w,{x:HJ,y:fJ}=VQ;U.coordinates.x+=(b*S-b)*HJ,U.coordinates.y+=(y*_-y)*fJ}}if(!U.dimensions)U.dimensions={width:b,height:y};if(!U.frameTransform)U.frameTransform=V;let P9={x:U.coordinates.x-T9,y:U.coordinates.y-C9},E9={width:(U.dimensions.width*U.frameTransform.scaleX-b*V.scaleX)*VQ.x,height:(U.dimensions.height*U.frameTransform.scaleY-y*V.scaleY)*VQ.y},C0={x:P9.x/V.scaleX+E9.width,y:P9.y/V.scaleY+E9.height},S9={left:s+C0.x,top:GQ+C0.y};M.setAttribute(CJ,"true");let k9=C(()=>N.transform),x9=(Y=U.translate)!=null?Y:{x:0,y:0},s$=k9.x*V.scaleX+x9.x,o$=k9.y*V.scaleY+x9.y,h9=b1();if(v.set({width:b-R9,height:y-D9,top:S9.top+h9.y,left:S9.left+h9.x,translate:`${s$}px ${o$}px 0`,transform:this.overlay?"none":l$,transition:OZ?`${OZ}, translate 0ms linear`:"translate 0ms linear",scale:f?`${p.x} ${p.y}`:"","transform-origin":`${VQ.x*100}% ${VQ.y*100}%`},n),KJ){if(F.insertAdjacentElement("afterend",KJ),B==null?void 0:B.rootElement)(typeof B.rootElement==="function"?B.rootElement(G):B.rootElement).appendChild(F)}if(q0(M)){if(!M.hasAttribute("popover"))M.setAttribute("popover","manual");$Q(M),M.addEventListener("beforetoggle",f2)}let lJ,T0,RZ,y9=sY({placeholder:KJ,element:F,feedbackElement:M,frameTransform:V,transformOrigin:VQ,width:b,height:y,top:GQ,left:s,widthOffset:R9,heightOffset:D9,delta:C0,styles:v,dragOperation:N,getTranslate:()=>K.current.translate,getElementMutationObserver:()=>lJ,getSavedCellWidths:()=>RZ,setSavedCellWidths:(S)=>{RZ=S}}),f9=new hJ(M);C(()=>N.shape=f9);let P0=NJ(M),v9=(S)=>{this.manager.actions.stop({event:S})},i$=g1(P0);if(D0)P0.addEventListener("resize",v9);if(C(()=>G.status)==="idle")requestAnimationFrame(()=>G.status="dragging");if(KJ)y9.observe(KJ),lJ=cY(F,KJ,j9),T0=lY(F,KJ,M);let b9=(H=X.dragOperation.source)==null?void 0:H.id,n$=()=>{var S;if(!D0||b9==null)return;let _=X.registry.draggables.get(b9),HJ=(S=_==null?void 0:_.handle)!=null?S:_==null?void 0:_.element;if(xJ(HJ))HJ.focus()},E0=()=>{var S;if(lJ==null||lJ.disconnect(),T0==null||T0.disconnect(),y9.disconnect(),P0.removeEventListener("resize",v9),q0(M))M.removeEventListener("beforetoggle",f2),M.removeAttribute("popover");if(M.removeAttribute(CJ),v.reset(),RZ&&i1(F)){let fJ=Array.from(F.cells);for(let[S0,DZ]of fJ.entries())DZ.style.width=(S=RZ[S0])!=null?S:""}G.status="idle";let _=K.current.translate!=null,HJ=N.status.dragging;if(KJ&&(!HJ&&_||KJ.parentElement!==M.parentElement)&&M.isConnected)KJ.replaceWith(M);KJ==null||KJ.remove()},a$=B==null?void 0:B.dropAnimation,g9=this,r$=nJ(()=>{var S,_,HJ;let{transform:fJ,status:S0}=N;if(!fJ.x&&!fJ.y&&!K.current.translate)return;if(S0.dragging){let DZ=(S=U.translate)!=null?S:{x:0,y:0},CZ={x:fJ.x/V.scaleX+DZ.x,y:fJ.y/V.scaleY+DZ.y},u9=K.current.translate,t$=C(()=>N.modifiers),k0=C(()=>{var _Q;return(_Q=N.shape)==null?void 0:_Q.current}),dQ=B==null?void 0:B.keyboardTransition,m9=D0&&!i$&&dQ!==null?`${(_=dQ==null?void 0:dQ.duration)!=null?_:250}ms ${(HJ=dQ==null?void 0:dQ.easing)!=null?HJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(v.set({transition:OZ?`${OZ}, translate ${m9}`:`translate ${m9}`,translate:`${CZ.x}px ${CZ.y}px 0`},n),lJ==null||lJ.takeRecords(),k0&&k0!==f9&&u9&&!t$.length){let _Q=e.delta(CZ,u9);N.shape=XJ.from(k0.boundingRectangle).translate(_Q.x*V.scaleX,_Q.y*V.scaleY)}else N.shape=new hJ(M);K.current.translate=CZ}},function(){if(N.status.dropped){this.dispose(),G.status="dropping";let S=(z==null?void 0:z.dropAnimation)!==void 0?z.dropAnimation:g9.dropAnimation!==void 0?g9.dropAnimation:a$,_=K.current.translate,HJ=_!=null;if(!_&&F!==M)_={x:0,y:0};if(!_||S===null){E0();return}X.renderer.rendering.then(()=>{nY({source:G,element:F,feedbackElement:M,placeholder:KJ,translate:_,moved:HJ,transition:A9,alignment:G.alignment,styles:v,animation:S!=null?S:void 0,getElementMutationObserver:()=>lJ,cleanup:E0,restoreFocus:n$})})}});return()=>{E0(),r$()}};FJ(zZ,4,"overlay",Q$,uQ,K9);WQ(zZ,uQ);uQ.configure=EQ(uQ);var F0=uQ,BZ=!0,aY=!1,q$,Y$,K$,H$,mJ,H9,X9;H$=(K$=[T],UJ.Forward),Y$=(q$=[T],UJ.Reverse);var MZ=class{constructor(){m(this,H9,l(mJ,8,this,BZ)),l(mJ,11,this),m(this,X9,l(mJ,12,this,BZ)),l(mJ,15,this)}isLocked(J){if(J===UJ.Idle)return!1;if(J==null)return this[UJ.Forward]===BZ&&this[UJ.Reverse]===BZ;return this[J]===BZ}unlock(J){if(J===UJ.Idle)return;this[J]=aY}};mJ=pQ(null);H9=new WeakMap;X9=new WeakMap;FJ(mJ,4,H$,K$,MZ,H9);FJ(mJ,4,Y$,q$,MZ,X9);WQ(mJ,MZ);var rY=[UJ.Forward,UJ.Reverse],v2=class{constructor(){this.x=new MZ,this.y=new MZ}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tY=class extends $J{constructor(J){super(J);let Q=IJ(new v2),Z=null;this.signal=Q,o(()=>{let{status:$}=J.dragOperation;if(!$.initialized){Z=null,Q.value=new v2;return}let{delta:q}=J.dragOperation.position;if(Z){let Y={x:b2(q.x,Z.x),y:b2(q.y,Z.y)},H=Q.peek();JJ(()=>{for(let K of $1)for(let X of rY)if(Y[K]===X)H[K].unlock(X);Q.value=H})}Z=q})}get current(){return this.signal.peek()}};function b2(J,Q){return Math.sign(J-Q)}var X$,a1,wZ,W9,uJ,r1,z0=class extends(a1=SQ,X$=[T],a1){constructor(J){super(J);m(this,W9,l(wZ,8,this,!1)),l(wZ,11,this),m(this,uJ),m(this,r1,()=>{if(!x(this,uJ))return;let{element:Y,by:H}=x(this,uJ);if(H.y)Y.scrollTop+=H.y;if(H.x)Y.scrollLeft+=H.x}),this.scroll=(Y,H)=>{var K;if(this.disabled)return!1;let X=this.getScrollableElements();if(!X)return qJ(this,uJ,void 0),!1;let{position:B}=this.manager.dragOperation,N=B==null?void 0:B.current;if(N){let{by:W}=Y!=null?Y:{},G=W?{x:g2(W.x),y:g2(W.y)}:void 0,L=G?void 0:this.scrollIntentTracker.current;if(L==null?void 0:L.isLocked())return!1;for(let F of X){let z=D2(F,W);if(z.x||z.y){let{speed:A,direction:I}=C2(F,N,G,H==null?void 0:H.acceleration,H==null?void 0:H.threshold);if(L){for(let U of $1)if(L[U].isLocked(I[U]))A[U]=0,I[U]=0}if(I.x||I.y){let{x:U,y:M}=W!=null?W:I,V=U*A.x,w=M*A.y;if(V||w){let f=(K=x(this,uJ))==null?void 0:K.by;if(this.autoScrolling&&f){if(f.x&&!V||f.y&&!w)continue}return qJ(this,uJ,{element:F,by:{x:V,y:w}}),XZ.schedule(x(this,r1)),!0}}}}}return qJ(this,uJ,void 0),!1};let Q=null,Z=null,$=AQ(()=>{let{position:Y,source:H}=J.dragOperation;if(!Y)return null;let K=u1(HZ(H==null?void 0:H.element),Y.current);if(K)Q=K;return K!=null?K:Q}),q=AQ(()=>{let Y=$.value,{documentElement:H}=QQ(Y);if(!Y||Y===H){let{target:K}=J.dragOperation,X=K==null?void 0:K.element;if(X){let B=Y0(X,{excludeElement:!1});return Z=B,B}}if(Y){let K=Y0(Y,{excludeElement:!1});if(this.autoScrolling&&Z&&K.size<(Z==null?void 0:Z.size))return Z;return Z=K,K}return Z=null,null},EJ);this.getScrollableElements=()=>{return q.value},this.scrollIntentTracker=new tY(J),this.destroy=J.monitor.addEventListener("dragmove",(Y)=>{if(this.disabled||Y.defaultPrevented||!K0(J.dragOperation.activatorEvent)||!Y.by)return;if(this.scroll({by:Y.by}))Y.preventDefault()})}};wZ=pQ(a1);W9=new WeakMap;uJ=new WeakMap;r1=new WeakMap;FJ(wZ,4,"autoScrolling",X$,z0,W9);WQ(wZ,z0);function g2(J){if(J>0)return UJ.Forward;if(J<0)return UJ.Reverse;return UJ.Idle}var eY=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Q,resolvers:Z}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Q)$();for(let $ of Z)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Q)=>this.resolvers.add(Q))}},J5=new eY((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),Q5=10,t1=class extends $J{constructor(Q,Z){super(Q,Z);let $=Q.registry.plugins.get(z0);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=o(()=>{var q,Y,H;if(this.disabled)return;let{position:K,status:X}=Q.dragOperation;if(X.dragging){let B={acceleration:(q=this.options)==null?void 0:q.acceleration,threshold:typeof((Y=this.options)==null?void 0:Y.threshold)==="number"?{x:this.options.threshold,y:this.options.threshold}:(H=this.options)==null?void 0:H.threshold};if($.scroll(void 0,B)){$.autoScrolling=!0;let W=setInterval(()=>J5.schedule(()=>$.scroll(void 0,B)),Q5);return()=>{clearInterval(W)}}else $.autoScrolling=!1}})}};t1.configure=EQ(t1);var W$=t1,u2={capture:!0,passive:!0},UZ,Z5=class extends SQ{constructor(J){super(J);m(this,UZ),this.handleScroll=()=>{if(x(this,UZ)==null)qJ(this,UZ,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),qJ(this,UZ,void 0)},50))};let{dragOperation:Q}=this.manager;this.destroy=o(()=>{var Z,$,q;if(Q.status.dragging){let H=(q=($=(Z=Q.source)==null?void 0:Z.element)==null?void 0:$.ownerDocument)!=null?q:document;return H.addEventListener("scroll",this.handleScroll,u2),()=>{H.removeEventListener("scroll",this.handleScroll,u2)}}})}};UZ=new WeakMap;var $5="* { user-select: none !important; -webkit-user-select: none !important; }",q5=class extends $J{constructor(J){super(J);this.manager=J;let Q=J.registry.plugins.get(V0),Z=Q==null?void 0:Q.register($5);if(this.destroy=o(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return _1(),document.addEventListener("selectionchange",_1,{capture:!0}),()=>{document.removeEventListener("selectionchange",_1,{capture:!0})}}),Z){let $=this.destroy.bind(this);this.destroy=()=>{Z(),$()}}}};function _1(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var LZ=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(J,Q){var Z;let $=(Z=Q.handle)!=null?Z:Q.element;return J.target!==$}}),yQ,L0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,yQ,[]),this.listeners=new p1,this.handleSourceKeyDown=($,q,Y)=>{if(this.disabled||$.defaultPrevented)return;if(!gJ($.target))return;if(q.disabled)return;let{keyboardCodes:H=LZ.keyboardCodes,preventActivation:K=LZ.preventActivation}=Y!=null?Y:{};if(!H.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(K==null?void 0:K($,q))return;this.handleStart($,q,Y)}}bind(Q,Z=this.options){return o(()=>{var q;let Y=(q=Q.handle)!=null?q:Q.element,H=(K)=>{if(K0(K))this.handleSourceKeyDown(K,Q,Z)};if(Y)return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}})}handleStart(Q,Z,$){let{element:q}=Z;if(!q)throw Error("Source draggable does not have an associated element");Q.preventDefault(),Q.stopImmediatePropagation(),T2(q);let{center:Y}=new hJ(q);if(this.manager.actions.start({event:Q,coordinates:{x:Y.x,y:Y.y},source:Z}).signal.aborted)return this.cleanup();this.sideEffects();let K=QQ(q),X=[this.listeners.bind(K,[{type:"keydown",listener:(B)=>this.handleKeyDown(B,Z,$),options:{capture:!0}}])];x(this,yQ).push(...X)}handleKeyDown(Q,Z,$){let{keyboardCodes:q=LZ.keyboardCodes}=$!=null?$:{};if(hQ(Q,[...q.end,...q.cancel])){Q.preventDefault();let Y=hQ(Q,q.cancel);this.handleEnd(Q,Y);return}if(hQ(Q,q.up))this.handleMove("up",Q);else if(hQ(Q,q.down))this.handleMove("down",Q);if(hQ(Q,q.left))this.handleMove("left",Q);else if(hQ(Q,q.right))this.handleMove("right",Q)}handleEnd(Q,Z){this.manager.actions.stop({event:Q,canceled:Z}),this.cleanup()}handleMove(Q,Z){var $,q;let{shape:Y}=this.manager.dragOperation,H=Z.shiftKey?5:1,K={x:0,y:0},X=(q=($=this.options)==null?void 0:$.offset)!=null?q:LZ.offset;if(typeof X==="number")X={x:X,y:X};if(!Y)return;switch(Q){case"up":K={x:0,y:-X.y*H};break;case"down":K={x:0,y:X.y*H};break;case"left":K={x:-X.x*H,y:0};break;case"right":K={x:X.x*H,y:0};break}if(K.x||K.y)Z.preventDefault(),this.manager.actions.move({event:Z,by:K})}sideEffects(){let Q=this.manager.registry.plugins.get(W$);if((Q==null?void 0:Q.disabled)===!1)Q.disable(),x(this,yQ).push(()=>{Q.enable()})}cleanup(){x(this,yQ).forEach((Q)=>Q()),qJ(this,yQ,[])}destroy(){this.cleanup(),this.listeners.clear()}};yQ=new WeakMap;L0.configure=EQ(L0);L0.defaults=LZ;var B$=L0;function hQ(J,Q){return Q.includes(J.code)}var YQ,Y5=class extends C1{constructor(){super(...arguments);m(this,YQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,YQ,ZQ(J));break;case"pointermove":if(!x(this,YQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,YQ).x,y:Z-x(this,YQ).y},{tolerance:q}=this.options;if(q&&fZ($,q)){this.abort();return}if(fZ($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){qJ(this,YQ,void 0)}};YQ=new WeakMap;var fQ,KQ,K5=class extends C1{constructor(){super(...arguments);m(this,fQ),m(this,KQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,KQ,ZQ(J)),qJ(this,fQ,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!x(this,KQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,KQ).x,y:Z-x(this,KQ).y};if(fZ($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(x(this,fQ))clearTimeout(x(this,fQ)),qJ(this,KQ,void 0),qJ(this,fQ,void 0)}};fQ=new WeakMap;KQ=new WeakMap;var bQ=class{};bQ.Delay=K5;bQ.Distance=Y5;var e1=Object.freeze({activationConstraints(J,Q){var Z;let{pointerType:$,target:q}=J;if($==="mouse"&&gJ(q)&&(Q.handle===q||((Z=Q.handle)==null?void 0:Z.contains(q))))return;if($==="touch")return[new bQ.Delay({value:250,tolerance:5})];if(k2(q)&&!J.defaultPrevented)return[new bQ.Delay({value:200,tolerance:0})];return[new bQ.Delay({value:200,tolerance:10}),new bQ.Distance({value:5})]},preventActivation(J,Q){var Z;let{target:$}=J;if($===Q.element)return!1;if($===Q.handle)return!1;if(!gJ($))return!1;if((Z=Q.handle)==null?void 0:Z.contains($))return!1;return z2($)}}),vQ,G0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,vQ,new Set),this.listeners=new p1,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:$,coordinates:q}=this.latest;if(!$||!q)return;this.manager.actions.move({event:$,to:q})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(Q,Z,$=this.options){let{activationConstraints:q=e1.activationConstraints}=$!=null?$:{};return typeof q==="function"?q(Q,Z):q}bind(Q,Z=this.options){return o(()=>{var q;let Y=new AbortController,{signal:H}=Y,K=(B)=>{if(S2(B))this.handlePointerDown(B,Q,Z)},X=[(q=Q.handle)!=null?q:Q.element];if(Z==null?void 0:Z.activatorElements)if(Array.isArray(Z.activatorElements))X=Z.activatorElements;else X=Z.activatorElements(Q);for(let B of X){if(!B)continue;W5(B.ownerDocument.defaultView),B.addEventListener("pointerdown",K,{signal:H})}return()=>Y.abort()})}handlePointerDown(Q,Z,$){if(this.disabled||!Q.isPrimary||Q.button!==0||!gJ(Q.target)||Z.disabled||H5(Q)||!this.manager.dragOperation.status.idle)return;let{preventActivation:q=e1.preventActivation}=$!=null?$:{};if(q==null?void 0:q(Q,Z))return;let{target:Y}=Q,H=xJ(Y)&&Y.draggable&&Y.getAttribute("draggable")==="true",K=qQ(Z.element),{x:X,y:B}=ZQ(Q);this.initialCoordinates={x:X*K.scaleX+K.x,y:B*K.scaleY+K.y};let N=this.activationConstraints(Q,Z,$);Q.sensor=this;let W=new n8(N,(z)=>this.handleStart(Z,z));W.signal.onabort=()=>this.handleCancel(Q),W.onEvent(Q),this.controller=W;let G=nZ(),L=this.listeners.bind(G,[{type:"pointermove",listener:(z)=>this.handlePointerMove(z,Z)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:H?this.handleCancel:X0,options:{capture:!0}}]),F=()=>{L(),this.initialCoordinates=void 0};x(this,vQ).add(F)}handlePointerMove(Q,Z){var $,q;if((($=this.controller)==null?void 0:$.activated)===!1){(q=this.controller)==null||q.onEvent(Q);return}if(this.manager.dragOperation.status.dragging){let Y=ZQ(Q),H=qQ(Z.element);Y.x=Y.x*H.scaleX+H.x,Y.y=Y.y*H.scaleY+H.y,Q.preventDefault(),Q.stopPropagation(),this.latest.event=Q,this.latest.coordinates=Y,XZ.schedule(this.handleMove)}}handlePointerUp(Q){let{status:Z}=this.manager.dragOperation;if(!Z.idle){Q.preventDefault(),Q.stopPropagation();let $=!Z.initialized;this.manager.actions.stop({event:Q,canceled:$})}this.cleanup()}handleKeyDown(Q){if(Q.key==="Escape")Q.preventDefault(),this.handleCancel(Q)}handleStart(Q,Z){let{manager:$,initialCoordinates:q}=this;if(!q||!$.dragOperation.status.idle)return;if(Z.defaultPrevented)return;if($.actions.start({coordinates:q,event:Z,source:Q}).signal.aborted)return this.cleanup();Z.preventDefault();let K=QQ(Z.target).body;try{K.setPointerCapture(Z.pointerId)}catch(N){this.handleCancel(Z);return}let X=gJ(Z.target)?[Z.target,K]:K,B=this.listeners.bind(X,[{type:"touchmove",listener:X0,options:{passive:!1}},{type:"click",listener:X0},{type:"contextmenu",listener:X0},{type:"keydown",listener:this.handleKeyDown}]);x(this,vQ).add(B)}handleCancel(Q){let{dragOperation:Z}=this.manager;if(Z.status.initialized)this.manager.actions.stop({event:Q,canceled:!0});this.cleanup()}cleanup(){let{controller:Q}=this;if(this.controller=void 0,Q&&!Q.signal.aborted)Q.abort();this.latest={event:void 0,coordinates:void 0},x(this,vQ).forEach((Z)=>Z()),x(this,vQ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};vQ=new WeakMap;G0.configure=EQ(G0);G0.defaults=e1;var N$=G0;function H5(J){return"sensor"in J}function X0(J){J.preventDefault()}function X5(){}var m2=new WeakSet;function W5(J){if(!J||m2.has(J))return;J.addEventListener("touchmove",X5,{capture:!1,passive:!1}),m2.add(J)}var HQ={modifiers:[],plugins:[yY,W$,vY,F0,q5],sensors:[N$,B$]},B9=class extends Y2{constructor(J={}){let Q=VJ(J.plugins,HQ.plugins),Z=VJ(J.sensors,HQ.sensors),$=VJ(J.modifiers,HQ.modifiers);super($9(FZ({},J),{plugins:[Z5,z0,V0,...Q],sensors:Z,modifiers:$}))}},U$,L$,J9,pJ,N9,U9,IZ=class extends(J9=MJ,L$=[T],U$=[T],J9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[],handle:Y}=Z,H=c2(Z,["element","effects","handle"]);super(FZ({effects:()=>[...q(),()=>{var K,X;let{manager:B}=this;if(!B)return;let W=((X=(K=this.sensors)==null?void 0:K.map(CQ))!=null?X:[...B.sensors]).map((G)=>{let L=G instanceof aJ?G:B.registry.register(G.plugin),F=G instanceof aJ?void 0:G.options;return L.bind(this,F)});return function(){W.forEach((L)=>L())}}]},H),Q);m(this,N9,l(pJ,8,this)),l(pJ,11,this),m(this,U9,l(pJ,12,this)),l(pJ,15,this),this.element=$,this.handle=Y}};pJ=pQ(J9);N9=new WeakMap;U9=new WeakMap;FJ(pJ,4,"handle",L$,IZ,N9);FJ(pJ,4,"element",U$,IZ,U9);WQ(pJ,IZ);var G$,V$,Q9,dJ,L9,c1,F$,z$,VZ,G9,M0=class extends(Q9=wJ,V$=[T],G$=[T],Q9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[]}=Z,Y=c2(Z,["element","effects"]);let{collisionDetector:H=x2}=Y,K=(B)=>{let{manager:N,element:W}=this;if(!W||B===null){this.shape=void 0;return}if(!N)return;let G=new hJ(W),L=C(()=>this.shape);if(G&&(L==null?void 0:L.equals(G)))return L;return this.shape=G,G},X=IJ(!1);super($9(FZ({},Y),{collisionDetector:H,effects:()=>[...q(),()=>{let{element:B,manager:N}=this;if(!N)return;let{dragOperation:W}=N,{source:G}=W;X.value=Boolean(G&&W.status.initialized&&B&&!this.disabled&&this.accepts(G))},()=>{let{element:B}=this;if(X.value&&B){let N=new O2(B,K);return()=>{N.disconnect(),this.shape=void 0}}},()=>{var B;if((B=this.manager)==null?void 0:B.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Q);m(this,VZ),m(this,L9,l(dJ,8,this)),l(dJ,11,this),m(this,G9,l(dJ,12,this)),l(dJ,15,this),this.element=$,this.refreshShape=()=>K()}set element(J){qJ(this,VZ,J,z$)}get element(){var J;return(J=this.proxy)!=null?J:x(this,VZ,F$)}};dJ=pQ(Q9);L9=new WeakMap;VZ=new WeakSet;G9=new WeakMap;c1=FJ(dJ,20,"#element",V$,VZ,L9),F$=c1.get,z$=c1.set;FJ(dJ,4,"proxy",G$,M0,G9);WQ(dJ,M0);var D=TZ(x0(),1);var d=TZ(x0(),1);var V9=TZ(N5(),1);function B5(J){return J!=null&&typeof J==="object"&&"current"in J}function BQ(J){var Q;if(J==null)return;if(B5(J))return(Q=J.current)!=null?Q:void 0;return J}var U5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NQ=U5?d.useLayoutEffect:d.useEffect;function M$(){let J=d.useState(0)[1];return d.useCallback(()=>{J((Q)=>Q+1)},[J])}function L5(J,Q=!1){let Z=d.useRef(J.peek()),$=d.useRef(!1),q=M$();return NQ(()=>o(()=>{let Y=Z.current,H=J.value;if(Y!==H){if(Z.current=H,!$.current)return;if(Q)V9.flushSync(q);else q()}}),[J,Q,q]),{get value(){return $.current=!0,J.peek()}}}function w$(J,Q=[],Z=!1){let $=d.useRef(J);return $.current=J,L5(d.useMemo(()=>AQ(()=>$.current()),Q),Z)}function w0(J,Q){let Z=d.useRef(new Map),$=M$();return NQ(()=>{if(!J){Z.current.clear();return}return o(()=>{var q;let Y=!1,H=!1;for(let K of Z.current){let[X]=K,B=C(()=>K[1]),N=J[X];if(B!==N)Y=!0,Z.current.set(X,N),H=(q=Q==null?void 0:Q(X,B,N))!=null?q:!1}if(Y)if(H)queueMicrotask(()=>V9.flushSync($));else $()})},[J]),d.useMemo(()=>J?new Proxy(J,{get(q,Y){let H=q[Y];return Z.current.set(Y,H),H}}):J,[J])}function NH(J,Q){J()}function UQ(J){let Q=d.useRef(J);return NQ(()=>{Q.current=J},[J]),Q}function a(J,Q,Z=d.useEffect,$=Object.is){let q=d.useRef(J);Z(()=>{let Y=q.current;if(!$(J,Y))q.current=J,Q(J,Y)},[Q,J])}function A0(J,Q){let Z=d.useRef(BQ(J));NQ(()=>{let $=BQ(J);if($!==Z.current)Z.current=$,Q($)})}var{defineProperty:G5,defineProperties:V5,getOwnPropertyDescriptors:F5,getOwnPropertySymbols:j0}=Object,I$=Object.prototype.hasOwnProperty,j$=Object.prototype.propertyIsEnumerable,A$=(J,Q,Z)=>(Q in J)?G5(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,O$=(J,Q)=>{for(var Z in Q||(Q={}))if(I$.call(Q,Z))A$(J,Z,Q[Z]);if(j0){for(var Z of j0(Q))if(j$.call(Q,Z))A$(J,Z,Q[Z])}return J},R$=(J,Q)=>V5(J,F5(Q)),z5=(J,Q)=>{var Z={};for(var $ in J)if(I$.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&j0){for(var $ of j0(J))if(Q.indexOf($)<0&&j$.call(J,$))Z[$]=J[$]}return Z},M5=new B9,M9=D.createContext(M5),w5=D.memo(D.forwardRef(({children:J},Q)=>{let[Z,$]=D.useState(0),q=D.useRef(null),Y=D.useRef(null),H=D.useMemo(()=>({renderer:{get rendering(){var K;return(K=q.current)!=null?K:Promise.resolve()}},trackRendering(K){if(!q.current)q.current=new Promise((X)=>{Y.current=X});D.startTransition(()=>{K(),$((X)=>X+1)})}}),[]);return NQ(()=>{var K;(K=Y.current)==null||K.call(Y),q.current=null},[J,Z]),D.useImperativeHandle(Q,()=>H),null})),F9=[void 0,EJ];function wH(J){var Q=J,{children:Z,onCollision:$,onBeforeDragStart:q,onDragStart:Y,onDragMove:H,onDragOver:K,onDragEnd:X}=Q,B=z5(Q,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let N=D.useRef(null),{plugins:W,modifiers:G,sensors:L}=B,F=VJ(W,HQ.plugins),z=VJ(L,HQ.sensors),A=VJ(G,HQ.modifiers),I=UQ(q),U=UQ(Y),M=UQ(K),V=UQ(H),w=UQ(X),f=UQ($),j=A5(()=>{var p;return(p=B.manager)!=null?p:new B9(B)});return D.useEffect(()=>{if(!N.current)throw Error("Renderer not found");let{renderer:p,trackRendering:b}=N.current,{monitor:y}=j;j.renderer=p;let GQ=[y.addEventListener("beforedragstart",(s)=>{let v=I.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragstart",(s)=>{var v;return(v=U.current)==null?void 0:v.call(U,s,j)}),y.addEventListener("dragover",(s)=>{let v=M.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragmove",(s)=>{let v=V.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragend",(s)=>{let v=w.current;if(v)b(()=>v(s,j))}),y.addEventListener("collision",(s)=>{var v;return(v=f.current)==null?void 0:v.call(f,s,j)})];return()=>GQ.forEach((s)=>s())},[j]),a(F,()=>j&&(j.plugins=F),...F9),a(z,()=>j&&(j.sensors=z),...F9),a(A,()=>j&&(j.modifiers=A),...F9),PZ(M9.Provider,{value:j,children:[TJ(w5,{ref:N,children:Z}),Z]})}function A5(J){let Q=D.useRef(null);if(!Q.current)Q.current=J();return D.useInsertionEffect(()=>{return()=>{var Z;return(Z=Q.current)==null?void 0:Z.destroy()}},[]),Q.current}function D$(){return D.useContext(M9)}function C$(J){var Q;let Z=(Q=D$())!=null?Q:void 0,[$]=D.useState(()=>J(Z));if($.manager!==Z)$.manager=Z;return NQ($.register,[Z,$]),$}function AH(J){let{disabled:Q,data:Z,element:$,handle:q,id:Y,modifiers:H,sensors:K,plugins:X}=J,B=C$((W)=>new IZ(R$(O$({},J),{register:!1,handle:BQ(q),element:BQ($)}),W)),N=w0(B,I5);return a(Y,()=>B.id=Y),A0(q,(W)=>B.handle=W),A0($,(W)=>B.element=W),a(Z,()=>Z&&(B.data=Z)),a(Q,()=>B.disabled=Q===!0),a(K,()=>B.sensors=K),a(H,()=>B.modifiers=H,void 0,EJ),a(X,()=>B.plugins=X,void 0,EJ),a(J.alignment,()=>B.alignment=J.alignment),{draggable:N,get isDragging(){return N.isDragging},get isDropping(){return N.isDropping},get isDragSource(){return N.isDragSource},handleRef:D.useCallback((W)=>{B.handle=W!=null?W:void 0},[B]),ref:D.useCallback((W)=>{var G,L;if(!W&&((G=B.element)==null?void 0:G.isConnected)&&!((L=B.manager)==null?void 0:L.dragOperation.status.idle))return;B.element=W!=null?W:void 0},[B])}}function I5(J,Q,Z){if(J==="isDragSource"&&!Z&&Q)return!0;return!1}function IH({children:J,className:Q,dropAnimation:Z,style:$,tag:q,disabled:Y}){var H;let K=D.useRef(null),X=D$(),B=(H=w$(()=>X==null?void 0:X.dragOperation.source,[X]).value)!=null?H:null,N=typeof Y==="function"?Y(B):Y;D.useEffect(()=>{if(!K.current||!X||N)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.overlay=K.current,()=>{L.overlay=void 0}},[X,N]),D.useEffect(()=>{if(!X)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.dropAnimation=Z,()=>{L.dropAnimation=void 0}},[X,Z]);let W=D.useMemo(()=>{if(!X)return null;let L=new Proxy(X.registry,{get(F,z){if(z==="register"||z==="unregister")return j5;return F[z]}});return new Proxy(X,{get(F,z){if(z==="registry")return L;return F[z]}})},[X]);return TJ(M9.Provider,{value:W,children:D.createElement(q||"div",{ref:K,className:Q,style:$,"data-dnd-overlay":!0},G())});function G(){if(!B||N)return null;if(typeof J==="function")return TJ(O5,{source:B,children:J});return J}}function j5(){return()=>{}}function O5({children:J,source:Q}){return J(w0(Q))}var{create:R5,defineProperty:T$,getOwnPropertyDescriptor:D5}=Object,P$=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),O0=(J)=>{throw TypeError(J)},C5=(J,Q,Z)=>(Q in J)?T$(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,T5=(J)=>{var Q;return[,,,R5((Q=J==null?void 0:J[P$("metadata")])!=null?Q:null)]},E$=["class","method","getter","setter","accessor","field","value","get","set"],S$=(J)=>J!==void 0&&typeof J!=="function"?O0("Function expected"):J,P5=(J,Q,Z,$,q)=>({kind:E$[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?O0("Already initialized"):q.push(S$(Y||null))}),E5=(J,Q)=>C5(Q,P$("metadata"),J[3]),S5=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Y[q].call(Z);return $},k$=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N=Q&7,W=!1,G=!1,L=2,F=E$[N+5],z=J[L]||(J[L]=[]),A=(q=q.prototype,D5(q,Z));for(var I=$.length-1;I>=0;I--)X=P5(N,Z,K={},J[3],z),X.static=W,X.private=G,B=X.access={has:(U)=>(Z in U)},B.get=(U)=>U[Z],H=(0,$[I])(A[F],X),K._=1,S$(H)&&(A[F]=H);return A&&T$(q,Z,A),q},x$=(J,Q,Z)=>Q.has(J)||O0("Cannot "+Z),k5=(J,Q,Z)=>(x$(J,Q,"read from private field"),Q.get(J)),x5=(J,Q,Z)=>Q.has(J)?O0("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),h5=(J,Q,Z,$)=>(x$(J,Q,"write to private field"),Q.set(J,Z),Z),LQ=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},h$,y$,z9,I0,jZ,w9=class extends(z9=jJ,y$=[h],h$=[h],z9){constructor(J){let Q=LQ.from(J);super(Q,(Z,$)=>LQ.equals(Z,$));S5(jZ,5,this),x5(this,I0,0),this.velocity={x:0,y:0}}get delta(){return LQ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=LQ.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-k5(this,I0),H=(K)=>Math.round(K/Y*100);JJ(()=>{h5(this,I0,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(LQ.from(J)),this.velocity={x:0,y:0}}};jZ=T5(z9);I0=new WeakMap;k$(jZ,2,"delta",y$,w9);k$(jZ,2,"direction",h$,w9);E5(jZ,w9);var f$=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(f$||{});Object.values(f$);var y5=({dragOperation:J,droppable:Q})=>{let Z=J.position.current;if(!Z)return null;let{id:$}=Q;if(!Q.shape)return null;if(Q.shape.containsPoint(Z)){let q=LQ.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:OJ.High}}return null},f5=({dragOperation:J,droppable:Q})=>{let{shape:Z}=J;if(!Q.shape||!(Z==null?void 0:Z.current))return null;let $=Z.current.intersectionArea(Q.shape);if($){let{position:q}=J,Y=LQ.distance(Q.shape.center,q.current),K=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:K,type:RJ.ShapeIntersection,priority:OJ.Normal}}return null},v5=(J)=>{var Q;return(Q=y5(J))!=null?Q:f5(J)};function jH(J){let{collisionDetector:Q,data:Z,disabled:$,element:q,id:Y,accept:H,type:K}=J,X=C$((N)=>new M0(R$(O$({},J),{register:!1,element:BQ(q)}),N)),B=w0(X);return a(Y,()=>X.id=Y),A0(q,(N)=>X.element=N),a(H,()=>X.accept=H,void 0,EJ),a(Q,()=>X.collisionDetector=Q!=null?Q:v5),a(Z,()=>Z&&(X.data=Z)),a($,()=>X.disabled=$===!0),a(K,()=>X.type=K),{droppable:B,get isDropTarget(){return B.isDropTarget},ref:D.useCallback((N)=>{var W,G;if(!N&&((W=X.element)==null?void 0:W.isConnected)&&!((G=X.manager)==null?void 0:G.dragOperation.status.idle))return;X.element=N!=null?N:void 0},[X])}}
|
|
71
|
-
export{JJ as ra,C as sa,o as ta,EJ as ua,T as va,o5 as wa,XJ as xa,EQ as ya,$J as za,z8 as Aa,VJ as Ba,NJ as Ca,iZ as Da,g1 as Ea,m1 as Fa,DJ as Ga,T2 as Ha,P2 as Ia,OK as Ja,hJ as Ka,K0 as La,x2 as Ma,gK as Na,F0 as Oa,z0 as Pa,B$ as Qa,bQ as Ra,N$ as Sa,IZ as Ta,M0 as Ua,BQ as Va,NQ as Wa,w0 as Xa,NH as Ya,a as Za,A0 as _a,wH as $a,C$ as ab,AH as bb,IH as cb,jH as db,b5 as eb};
|
package/bin/chunk-69tt1pvr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Wh as a,Yh as l,Zh as o}from"./chunk-m6a4rzdt.js";var p=a()(o((i)=>({fileViewLeftSidebarCollapsed:!0,setFileViewLeftSidebarCollapsed:(e)=>i({fileViewLeftSidebarCollapsed:e}),fileViewRightSidebarCollapsed:!1,setFileViewRightSidebarCollapsed:(e)=>i({fileViewRightSidebarCollapsed:e}),fileListLeftSidebarCollapsed:!1,setFileListLeftSidebarCollapsed:(e)=>i({fileListLeftSidebarCollapsed:e}),fileListRightSidebarCollapsed:!0,setFileListRightSidebarCollapsed:(e)=>i({fileListRightSidebarCollapsed:e}),shareConfigLeftSidebarCollapsed:!1,setShareConfigLeftSidebarCollapsed:(e)=>i({shareConfigLeftSidebarCollapsed:e}),shareConfigRightSidebarCollapsed:!1,setShareConfigRightSidebarCollapsed:(e)=>i({shareConfigRightSidebarCollapsed:e}),viewModes:{},setViewMode:(e,d)=>i((s)=>({viewModes:{...s.viewModes,[e]:d}})),videoTimeDisplayMode:"standard",setVideoTimeDisplayMode:(e)=>i({videoTimeDisplayMode:e})}),{name:"ui-storage",storage:l(()=>localStorage)}));
|
|
2
|
-
export{p as Eg};
|
package/bin/chunk-815ezj20.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as P,b as A,c as C,d as D,e as z,f as _}from"./chunk-b3jh3hf1.js";import{t as VJ}from"./chunk-dv1zpd2p.js";import{ba as ZJ}from"./chunk-r5dv0rfv.js";import{ca as $J,da as OJ,ea as XJ}from"./chunk-83k0wa5k.js";import{ma as DJ,na as KJ,oa as S}from"./chunk-8y1v9dm9.js";import{Kf as u,Lf as g,Mf as b,Nf as c,Of as n}from"./chunk-6v39c8eg.js";import{zg as Q}from"./chunk-9s02m95j.js";import"./chunk-87wqbn4g.js";import{Fg as t}from"./chunk-f2j2cqd1.js";import{fh as m}from"./chunk-2mqqghrz.js";import{Ah as K,Ak as e,Ck as d,Dh as _J,Dk as v,Eh as f,Ek as p,Fk as I,Hh as r,Ik as Y,Jk as kJ,Lj as GJ,Pj as wJ,Rh as NJ,bi as M,ei as RJ,fk as QJ,mi as YJ,ni as N,ui as s,xh as o,xj as i,zh as J}from"./chunk-m6a4rzdt.js";import{Nl as l}from"./chunk-dej1gq35.js";var yJ=l(o(),1);var WJ=l(o(),1);function EJ({teamId:O}){let[X,k]=WJ.useState("team"),[V,R]=WJ.useState("1h"),{data:q,isLoading:F}=f({queryKey:["teams",O,"ai-usage",V,"team"],queryFn:async()=>{let Z=await M.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:O},query:{timeframe:V}});if(!Z.ok)throw Error("Failed to fetch team AI usage");return await Z.json()},enabled:!!O&&X==="team"}),{data:T,isLoading:B}=f({queryKey:["teams",O,"members"],queryFn:async()=>{let Z=await M.api.teams[":teamId"].members.$get({param:{teamId:O},query:{}});if(!Z.ok)throw Error("Failed to fetch team members");return await Z.json()},enabled:!!O&&X==="members"}),h=_J({queries:(T||[]).map((Z)=>({queryKey:["teams",O,"ai-usage",V,Z.id],queryFn:async()=>{let G=await M.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:O},query:{timeframe:V,userId:Z.id}});if(!G.ok)throw Error(`Failed to fetch AI usage for member ${Z.id}`);return await G.json()},enabled:!!O&&X==="members"}))}),y=B||h.some((Z)=>Z.isLoading),H=(Z)=>{if(!Z)return"U";let G=Z.split(" ");if(G.length>1)return`${G[0][0]}${G[G.length-1][0]}`.toUpperCase();return Z.substring(0,2).toUpperCase()},x=(Z)=>{if(!Z)return"";switch(Z.toLowerCase()){case"owner":return Y.owner();case"editor":return Y.editor();case"reviewer":return Y.reviewer();default:return Z}},$=(Z)=>(Z??0).toLocaleString(),L=(Z)=>`$${(Z??0).toFixed(6)}`;return K(u,{className:"border-border/60 shadow-sm",children:[K(g,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between pb-6",children:[K("div",{children:[J(b,{className:"text-xl font-semibold tracking-tight",children:Y.ai_usage()}),J(c,{className:"text-sm text-muted-foreground mt-1",children:Y.ai_usage_description()})]}),K("div",{className:"flex flex-wrap items-center gap-3",children:[K(KJ,{type:"single",value:X,onValueChange:(Z)=>{if(Z)k(Z)},className:"border rounded-lg p-1 bg-muted/30",children:[J(S,{value:"team",className:"px-3 py-1.5 text-xs font-medium",children:Y.team_view()}),J(S,{value:"members",className:"px-3 py-1.5 text-xs font-medium",children:Y.members_view()})]}),K(KJ,{type:"single",value:V,onValueChange:(Z)=>{if(Z)R(Z)},className:"border rounded-lg p-1 bg-muted/30",children:[J(S,{value:"1h",className:"px-2.5 py-1.5 text-xs font-medium",children:"1h"}),J(S,{value:"24h",className:"px-2.5 py-1.5 text-xs font-medium",children:"24h"}),J(S,{value:"7d",className:"px-2.5 py-1.5 text-xs font-medium",children:"7d"}),J(S,{value:"30d",className:"px-2.5 py-1.5 text-xs font-medium",children:"30d"})]})]})]}),J(n,{children:X==="team"?F?J("div",{className:"flex h-48 items-center justify-center",children:J(N,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):J("div",{className:"rounded-md border",children:K(P,{children:[J(A,{children:K(D,{children:[J(z,{children:Y.team()}),J(z,{className:"text-right",children:Y.input_tokens()}),J(z,{className:"text-right",children:Y.output_tokens()}),J(z,{className:"text-right",children:Y.cache_read_tokens()}),J(z,{className:"text-right",children:Y.total_tokens()}),J(z,{className:"text-right",children:Y.cost()})]})}),J(C,{children:K(D,{children:[J(_,{className:"font-medium",children:Y.team()}),J(_,{className:"text-right",children:$(q?.team?.inputTokens)}),J(_,{className:"text-right",children:$(q?.team?.outputTokens)}),J(_,{className:"text-right",children:$(q?.team?.cacheReadTokens)}),J(_,{className:"text-right font-medium",children:$(q?.team?.totalTokens)}),J(_,{className:"text-right font-medium",children:L(q?.team?.cost)})]})})]})}):y?J("div",{className:"flex h-48 items-center justify-center",children:J(N,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):J("div",{className:"rounded-md border",children:K(P,{children:[J(A,{children:K(D,{children:[J(z,{children:Y.members()}),J(z,{children:Y.role()}),J(z,{className:"text-right",children:Y.input_tokens()}),J(z,{className:"text-right",children:Y.output_tokens()}),J(z,{className:"text-right",children:Y.cache_read_tokens()}),J(z,{className:"text-right",children:Y.total_tokens()}),J(z,{className:"text-right",children:Y.cost()})]})}),J(C,{children:(T||[]).map((Z,G)=>{let U=h[G]?.data?.member;return K(D,{children:[J(_,{children:K("div",{className:"flex items-center gap-3",children:[K(v,{className:"h-8 w-8 rounded-full",children:[Z.image&&J(p,{src:Z.image,alt:Z.name,className:"object-cover"}),J(I,{className:"bg-primary/20 text-xs",children:H(Z.name)})]}),K("div",{className:"flex flex-col",children:[J("span",{className:"text-sm font-medium leading-none",children:Z.name}),J("span",{className:"text-xs text-muted-foreground mt-0.5",children:Z.email})]})]})}),J(_,{className:"text-xs text-muted-foreground",children:x(Z.role)}),J(_,{className:"text-right",children:$(U?.inputTokens)}),J(_,{className:"text-right",children:$(U?.outputTokens)}),J(_,{className:"text-right",children:$(U?.cacheReadTokens)}),J(_,{className:"text-right font-medium",children:$(U?.totalTokens)}),J(_,{className:"text-right font-medium",children:L(U?.cost)})]},Z.id)})})]})})})]})}var a=l(o(),1);function qJ({teamId:O}){let[X,k]=a.useState(null),{ref:V,inView:R}=t(),{data:q,isLoading:F,isError:T,fetchNextPage:B,hasNextPage:h,isFetchingNextPage:y}=r({queryKey:["teams",O,"agent-sessions"],queryFn:async({pageParam:$})=>{let L=await M.api.teams[":teamId"]["agent-sessions"].$get({param:{teamId:O},query:{first:"20",after:$?String($):void 0}});if(!L.ok)throw Error("Failed to fetch agent sessions");return await L.json()},initialPageParam:"",getNextPageParam:($)=>$.pageInfo.cursor||void 0,enabled:!!O});a.useEffect(()=>{if(R&&h&&!y)B()},[R,h,y,B]);let H=q?.pages.flatMap(($)=>$.data).filter(($)=>$.id!=="pending")||[],x=($)=>{switch($){case"comment":return J(Q,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",children:Y.session_type_comment()});case"chat":return J(Q,{variant:"outline",className:"bg-violet-500/10 text-violet-600 dark:text-violet-400 border-violet-500/20",children:Y.session_type_chat()});case"naming":return J(Q,{variant:"outline",className:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",children:Y.session_type_naming()});default:return J(Q,{variant:"outline",className:"bg-muted text-muted-foreground border-border",children:$})}};return K("div",{className:"space-y-6",children:[K(u,{className:"border border-border/50 shadow-xs",children:[J(g,{className:"pb-4",children:J("div",{className:"flex items-center justify-between",children:K("div",{children:[K(b,{className:"text-xl font-bold flex items-center gap-2",children:[J(i,{className:"w-5 h-5 text-violet-500"}),Y.sessions()]}),J(c,{className:"mt-1 text-sm text-muted-foreground",children:Y.sessions_description()})]})})}),J(n,{children:F?J("div",{className:"flex h-64 items-center justify-center",children:J(N,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):T?J("div",{className:"flex h-64 items-center justify-center text-destructive",children:"Failed to load agent sessions."}):H.length===0?K("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[J(i,{className:"w-10 h-10 text-muted-foreground/40 mb-3"}),J("p",{className:"text-base font-medium",children:Y.no_sessions_found()})]}):K("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[K(P,{children:[J(A,{className:"bg-muted/40",children:K(D,{children:[J(z,{children:Y.session_name()}),J(z,{children:Y.creator()}),J(z,{children:Y.session_type()}),J(z,{className:"text-right",children:Y.create_time()})]})}),J(C,{children:H.map(($)=>K(D,{onClick:()=>k($.id),className:"cursor-pointer hover:bg-muted/50 transition-colors",children:[J(_,{className:"font-medium",children:K("div",{className:"flex flex-col",children:[J("span",{className:"text-sm font-semibold text-foreground",children:$.name||Y.untitled_session()}),J("span",{className:"text-xs font-mono text-muted-foreground/70",children:$.id})]})}),J(_,{children:K("div",{className:"flex items-center gap-2",children:[K(v,{className:"h-6 w-6",children:[J(p,{src:$.creator?.image||void 0}),J(I,{className:"text-[10px]",children:$.creator?.name?.[0]?.toUpperCase()||"?"})]}),J("span",{className:"text-sm text-foreground/90",children:$.creator?.name||"System / Agent"})]})}),J(_,{children:x($.type)}),J(_,{className:"text-right text-xs text-muted-foreground",children:m($.createdAt)})]},$.id))})]}),J("div",{ref:V,className:"py-4 flex justify-center",children:y&&J(N,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})})]}),J(VJ,{sessionId:X,open:!!X,onOpenChange:($)=>{if(!$)k(null)}})]})}var j=l(o(),1);var hJ=Object.values(DJ);function MJ({teamId:O}){let[X,k]=j.useState([]),[V,R]=j.useState([]),[q,F]=j.useState(""),{ref:T,inView:B}=t(),{data:h}=f({queryKey:["teams",O,"members"],queryFn:async()=>{let W=await M.api.teams[":teamId"].members.$get({param:{teamId:O},query:{}});if(!W.ok)return[];return await W.json()},enabled:!!O}),y=h||[],{data:H,isLoading:x,isError:$,fetchNextPage:L,hasNextPage:Z,isFetchingNextPage:G}=r({queryKey:["teams",O,"audit-logs",X,V,q],queryFn:async({pageParam:W})=>{let E=await M.api.teams[":teamId"]["audit-logs"].$get({param:{teamId:O},query:{first:"20",after:W?String(W):void 0,actions:X.length>0?X:void 0,userIds:V.length>0?V:void 0,itemId:q.trim()||void 0}});if(!E.ok)throw Error("Failed to fetch audit logs");return await E.json()},initialPageParam:"",getNextPageParam:(W)=>W.pageInfo.endCursor||void 0,enabled:!!O});j.useEffect(()=>{if(B&&Z&&!G)L()},[B,Z,G,L]);let U=H?.pages.flatMap((W)=>W.nodes)||[],zJ=H?.pages[0]?.total??0,LJ=(W)=>{k((E)=>E.includes(W)?E.filter((w)=>w!==W):[...E,W])},UJ=(W)=>{R((E)=>E.includes(W)?E.filter((w)=>w!==W):[...E,W])},FJ=(W)=>{if(W.includes("delete")||W.includes("remove")||W.includes("revoke"))return J(Q,{variant:"outline",className:"bg-destructive/10 text-destructive border-destructive/20 font-mono text-xs",children:W});if(W.includes("create")||W.includes("add"))return J(Q,{variant:"outline",className:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20 font-mono text-xs",children:W});if(W.includes("update")||W.includes("reparent")||W.includes("copy"))return J(Q,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 font-mono text-xs",children:W});return J(Q,{variant:"outline",className:"bg-muted text-muted-foreground border-border font-mono text-xs",children:W})},BJ=new Map(y.map((W)=>[W.userId||W.id,W]));return J("div",{className:"space-y-6",children:K(u,{className:"border border-border/50 shadow-xs",children:[K(g,{className:"pb-4",children:[K("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[K("div",{children:[K(b,{className:"text-xl font-bold flex items-center gap-2",children:[J(s,{className:"h-5 w-5 text-primary"}),Y.audit_logs()]}),J(c,{className:"mt-1",children:Y.audit_logs_description()})]}),zJ>0&&K(Q,{variant:"secondary",className:"w-fit text-xs font-normal",children:[zJ," ",Y.audit_logs()]})]}),K("div",{className:"mt-4 flex flex-wrap items-center gap-3 pt-4 border-t border-border/40",children:[K($J,{children:[J(OJ,{asChild:!0,children:K(d,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[J(YJ,{className:"h-3.5 w-3.5"}),Y.filter_by_action(),X.length>0&&J(Q,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:X.length})]})}),K(XJ,{className:"w-64 p-2",align:"start",children:[J("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:Y.select_actions()}),J("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:hJ.map((W)=>K("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[J(ZJ,{checked:X.includes(W),onCheckedChange:()=>LJ(W)}),J("span",{className:"font-mono",children:W})]},W))}),X.length>0&&J(d,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>k([]),children:"Clear Actions"})]})]}),K($J,{children:[J(OJ,{asChild:!0,children:K(d,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[J(YJ,{className:"h-3.5 w-3.5"}),Y.filter_by_user(),V.length>0&&J(Q,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:V.length})]})}),K(XJ,{className:"w-64 p-2",align:"start",children:[J("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:Y.select_users()}),J("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:y.map((W)=>{let E=W.userId||W.user?.id||W.id,w=W.user?.name||W.name||E,JJ=W.user?.image||W.image;return K("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[J(ZJ,{checked:V.includes(E),onCheckedChange:()=>UJ(E)}),K(v,{className:"h-5 w-5",children:[J(p,{src:JJ||void 0}),J(I,{className:"text-[10px]",children:w.slice(0,2).toUpperCase()})]}),J("span",{className:"truncate",children:w})]},E)})}),V.length>0&&J(d,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>R([]),children:"Clear Users"})]})]}),K("div",{className:"relative flex-1 min-w-[200px] max-w-xs",children:[J(GJ,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),J(kJ,{type:"text",placeholder:Y.search_item_id(),value:q,onChange:(W)=>F(W.target.value),className:"pl-8 pr-8 h-9 text-xs"}),q&&J("button",{onClick:()=>F(""),className:"absolute right-2.5 top-2.5 text-muted-foreground hover:text-foreground",children:J(QJ,{className:"h-4 w-4"})})]}),(X.length>0||V.length>0||q)&&J(d,{variant:"ghost",size:"sm",className:"h-9 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{k([]),R([]),F("")},children:"Clear all"})]})]}),K(n,{className:"p-0",children:[x?J("div",{className:"flex h-64 items-center justify-center",children:J(N,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):$?J("div",{className:"p-8 text-center text-sm text-destructive",children:"Failed to load audit logs."}):U.length===0?J("div",{className:"p-12 text-center text-sm text-muted-foreground",children:Y.no_audit_logs()}):K(P,{children:[J(A,{children:K(D,{className:"hover:bg-transparent border-b border-border/50",children:[J(z,{className:"w-[180px] text-xs font-semibold",children:Y.action()}),J(z,{className:"w-[200px] text-xs font-semibold",children:Y.user()}),J(z,{className:"text-xs font-semibold",children:Y.item_id()}),J(z,{className:"text-xs font-semibold",children:Y.project_id()}),J(z,{className:"w-[160px] text-right text-xs font-semibold",children:Y.timestamp()})]})}),J(C,{children:U.map((W)=>{let E=W.userId?BJ.get(W.userId):null,w=E?.user?.name||E?.name||W.userId||"System",JJ=E?.user?.image||E?.image;return K(D,{className:"hover:bg-muted/40 transition-colors",children:[J(_,{className:"py-3 font-medium",children:FJ(W.action)}),J(_,{className:"py-3",children:K("div",{className:"flex items-center gap-2",children:[K(v,{className:"h-6 w-6",children:[J(p,{src:JJ||void 0}),J(I,{className:"text-[10px]",children:w.slice(0,2).toUpperCase()})]}),J("span",{className:"text-xs font-medium text-foreground truncate max-w-[140px]",children:w})]})}),J(_,{className:"py-3 text-xs font-mono text-muted-foreground",children:W.itemId||"-"}),J(_,{className:"py-3 text-xs font-mono text-muted-foreground",children:W.projectId||"-"}),J(_,{className:"py-3 text-right text-xs text-muted-foreground",children:m(W.createdAt)})]},W.id)})})]}),J("div",{ref:T,className:"py-4 flex justify-center",children:G&&J(N,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})]})})}function HJ(){let{teamId:O}=SJ.useParams(),[X,k]=yJ.useState("audit-logs"),{data:V,isLoading:R}=f({queryKey:["teams",O,"me"],queryFn:async()=>{let q=await M.api.teams[":teamId"].me.$get({param:{teamId:O}});if(!q.ok)throw Error("Failed to fetch me");return await q.json()},enabled:!!O});if(R)return J("div",{className:"flex h-screen items-center justify-center",children:J(N,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(V?.role?.toLowerCase()!=="owner")return K("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[J(wJ,{className:"h-12 w-12 text-destructive mb-4"}),J("h2",{className:"text-xl font-bold tracking-tight mb-2",children:Y.access_denied()}),J("p",{className:"text-sm text-muted-foreground max-w-md",children:Y.only_owner_dashboard()})]});return J("div",{className:"h-full bg-background font-sans selection:bg-primary/20 transition-colors duration-300",children:K("div",{className:"flex flex-col md:flex-row h-full",children:[J("div",{className:"w-full h-full md:w-72 bg-sidebar border-b md:border-b-0 md:border-r border-sidebar-border z-10 md:left-16 overflow-y-auto transition-colors duration-300",children:K("nav",{className:"p-4 space-y-1 mt-4",children:[J("div",{className:"mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider",children:Y.dashboard()}),J("div",{className:"mt-4 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border",children:Y.team_category()}),K("button",{onClick:()=>k("audit-logs"),className:e("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",X==="audit-logs"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[J(s,{className:"w-5 h-5"}),Y.audit_logs(),X==="audit-logs"&&J("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),J("div",{className:"mt-4 mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider pt-4 border-t border-sidebar-border",children:Y.ai()}),K("button",{onClick:()=>k("ai-usage"),className:e("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",X==="ai-usage"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[J(RJ,{className:"w-5 h-5"}),Y.usage(),X==="ai-usage"&&J("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),K("button",{onClick:()=>k("ai-sessions"),className:e("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",X==="ai-sessions"?"bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"),children:[J(i,{className:"w-5 h-5"}),Y.sessions(),X==="ai-sessions"&&J("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]})]})}),J("div",{className:"flex-1 overflow-y-auto p-4 md:p-8",children:K("div",{className:"max-w-6xl mx-auto space-y-8",children:[X==="audit-logs"&&J(MJ,{teamId:O}),X==="ai-usage"&&J(EJ,{teamId:O}),X==="ai-sessions"&&J(qJ,{teamId:O})]})})]})})}var SJ=NJ("/teams/$teamId/dashboard")({component:HJ});export{SJ as Route};
|
package/bin/chunk-85eg9xqx.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b as s,c as e,d as E,e as $,f as q}from"./chunk-b3jh3hf1.js";import{qa as t}from"./chunk-tpp9qf5m.js";import{eb as r}from"./chunk-4rbzswqs.js";import"./chunk-rfyaphas.js";import{ib as x}from"./chunk-5gtew41y.js";import{jb as j}from"./chunk-3kqdgddm.js";import"./chunk-karn564z.js";import{Df as l}from"./chunk-jszpvg8e.js";import{Sf as o}from"./chunk-s0hgykza.js";import{Eg as i}from"./chunk-69tt1pvr.js";import{Fg as d}from"./chunk-f2j2cqd1.js";import{th as h}from"./chunk-n4gghgrj.js";import{$h as B,Ah as K,Bh as L,Ck as m,Dk as p,Ek as c,Fh as y,Fk as n,Gh as F,Hh as S,Hi as T,Ik as X,Mh as P,Oj as u,Rh as C,Ui as g,Yi as b,bi as A,lj as I,ni as f,xh as OG,yh as k,zh as G}from"./chunk-m6a4rzdt.js";import{Nl as qG}from"./chunk-dej1gq35.js";var _=qG(OG(),1);var zG=(Y)=>{if(!Y)return"??";return Y.split(" ").map((z)=>z[0]).slice(0,2).join("").toUpperCase()};function BG(){let{projectId:Y}=MG.useParams(),{teamId:z,ensureTeamIdForProject:U}=h(),GG=L(),JG=P();_.useEffect(()=>{U(Y)},[Y,U]);let{data:M}=y(l(Y)),D=M?.rootFolder,[KG,XG]=_.useState(240),{shareConfigLeftSidebarCollapsed:Q,setShareConfigLeftSidebarCollapsed:YG}=i(),{data:V,isLoading:ZG,fetchNextPage:R,hasNextPage:v,isFetchingNextPage:W}=S({queryKey:["shares",Y],queryFn:async({pageParam:J})=>{let Z=await A.api.projects[":projectId"].shares.$get({param:{projectId:Y},query:{first:"20",after:J}});if(!Z.ok)throw Error("Failed to fetch share links");return await Z.json()},initialPageParam:"",getNextPageParam:(J)=>J.pageInfo?.cursor||void 0,enabled:!!Y}),{ref:_G,inView:w}=d();_.useEffect(()=>{if(w&&v&&!W)R()},[w,v,W,R]);let H=_.useMemo(()=>V?.pages.flatMap((J)=>J.data)||[],[V]),{mutate:$G}=F({mutationFn:async({id:J,isDisabled:Z})=>{let O=await A.api.shares[":shareId"].$put({param:{shareId:J},json:{isDisabled:Z}});if(!O.ok)throw Error("Failed to update share link");return await O.json()},onSuccess:()=>{GG.invalidateQueries({queryKey:["shares",Y]}),B.success(X.share_link_status_updated())},onError:(J)=>{B.error(X.error_message({message:J.message}))}});if(!z||!D||!M)return G(o,{});let N=async(J)=>{let Z=`${window.location.origin}/share/${J}`;if(await x(Z))B.success(X.link_copied())};return G("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:K("div",{className:"flex flex-1 overflow-hidden relative",children:[!Q&&G("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>YG(!0)}),!Q&&K(k,{children:[G("div",{className:"bg-background",style:{width:KG},children:G(t,{teamId:z,projectId:Y,projectName:M.name??"",rootFolderId:D})}),G(r,{onResize:(J)=>{XG((Z)=>Math.max(180,Math.min(400,Z+J)))},className:"hidden md:block"})]}),K("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[G("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:K("div",{className:"flex items-center gap-2",children:[G(u,{className:"h-5 w-5 text-primary"}),G("h1",{className:"font-bold text-lg text-foreground",children:X.all_share_links()})]})}),G("div",{className:"flex-1 overflow-y-auto p-6",children:ZG?G("div",{className:"flex justify-center items-center h-64",children:G("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):H.length===0?K("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[G(I,{className:"h-10 w-10 text-muted-foreground/50"}),G("p",{children:X.no_share_links_yet()})]}):K("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[K(a,{children:[G(s,{children:K(E,{className:"hover:bg-transparent bg-muted/20",children:[G($,{className:"font-semibold px-4 py-3",children:X.name()}),G($,{className:"font-semibold px-4 py-3",children:X.public_link()}),G($,{className:"font-semibold px-4 py-3",children:X.creator()}),G($,{className:"font-semibold px-4 py-3 w-[150px]",children:X.created_date()}),G($,{className:"font-semibold px-4 py-3 text-right w-[120px]",children:X.active()})]})}),G(e,{children:H.map((J)=>{let Z=`${window.location.origin}/share/${J.id}`;return K(E,{className:"hover:bg-muted/10 transition-colors",children:[G(q,{className:"font-medium px-4 py-3.5",children:G("span",{className:"cursor-pointer hover:underline text-foreground",onClick:()=>JG({to:"/projects/$projectId/shares/$shareId",params:{projectId:Y,shareId:J.id}}),children:J.name})}),G(q,{className:"px-4 py-3.5 max-w-[300px]",children:K("div",{className:"flex items-center gap-2 group",children:[G("span",{className:"truncate text-xs font-mono bg-muted/50 text-muted-foreground px-2 py-1 rounded-md border border-border cursor-pointer hover:bg-muted transition-colors flex-1",onClick:()=>N(J.id),title:X.click_to_copy_link(),children:Z}),G(m,{variant:"ghost",size:"icon-sm",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>N(J.id),children:G(g,{className:"h-3.5 w-3.5"})}),G("a",{href:Z,target:"_blank",rel:"noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center",children:G(b,{className:"h-3.5 w-3.5"})})]})}),G(q,{className:"px-4 py-3.5",children:K("div",{className:"flex items-center gap-2",children:[K(p,{className:"h-6 w-6",children:[J.creator?.image&&G(c,{src:J.creator.image,alt:J.creator.name,className:"object-cover"}),G(n,{className:"text-[10px]",children:zG(J.creator?.name)})]}),G("span",{className:"text-sm font-medium text-foreground truncate max-w-[150px]",children:J.creator?.name||X.unknown()})]})}),G(q,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:K("div",{className:"flex items-center gap-2",children:[G(T,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),G("span",{children:new Date(J.createdAt).toLocaleDateString()})]})}),G(q,{className:"px-4 py-3.5 text-right",children:G("div",{className:"flex justify-end",children:G(j,{checked:!J.isDisabled,onCheckedChange:(O)=>$G({id:J.id,isDisabled:!O})})})})]},J.id)})})]}),G("div",{ref:_G,className:"h-10 w-full flex items-center justify-center",children:W&&G(f,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var MG=C("/projects/$projectId/shares/")({component:BG});export{MG as Route};
|
package/bin/chunk-86aagej8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{hb as cz}from"./chunk-0yngn45x.js";import"./chunk-5gtew41y.js";import{jb as r}from"./chunk-3kqdgddm.js";import{kb as Cz,lb as fz,mb as Iz,nb as gz,ob as uz,pb as lz,qb as dz,rb as pz}from"./chunk-karn564z.js";import{Uf as Dz}from"./chunk-38g3s1f3.js";import"./chunk-2xmsrq7f.js";import{Lg as m}from"./chunk-af6wbhkv.js";import{gh as yz}from"./chunk-2mqqghrz.js";import{hh as C,jh as f,kh as I,lh as w,uh as bz}from"./chunk-n4gghgrj.js";import{$h as Yz,Ah as J,Ak as _z,Bh as i,Ci as Rz,Ck as F,Dk as hz,Eh as o,Ek as Sz,Fj as Zz,Fk as wz,Gh as q,Ik as V,Ji as a,Jk as j,Kk as kz,Mh as n,Mk as qz,Nk as Az,Ok as Ez,Pk as Fz,Qk as Uz,Rh as Bz,_j as Jz,bi as X,ci as Vz,di as Pz,fk as Kz,li as vz,ni as Gz,pi as Tz,qi as Lz,vh as Mz,xh as $z,yh as P,zh as z}from"./chunk-m6a4rzdt.js";import{Nl as Wz}from"./chunk-dej1gq35.js";var k=Wz($z(),1);function Nz({open:Z,onOpenChange:T,mode:L,teamId:U,project:W}){let A=i(),K=n(),[H,O]=k.useState(""),[y,B]=k.useState(!0),[g,M]=k.useState(void 0),[b,N]=k.useState(void 0),[E,D]=k.useState(!1),v=k.useRef(null);k.useEffect(()=>{if(Z)if(L==="edit"&&W)O(W.name||""),M(W.coverImageKey),N(W.coverImage),B(W.enableNotification!==!1);else O(""),M(void 0),N(void 0),B(!0)},[Z,L,W]);let u=X.api.teams[":teamId"].projects.$post,{mutate:t}=q({mutationFn:async(Q)=>{let _=await u({param:{teamId:U},json:Q});if(!_.ok)throw Error(V.failed_create_project());return await _.json()},onSuccess:(Q)=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1);let _=Q;if(_&&typeof _.id==="string")K({to:"/projects/$projectId",params:{projectId:_.id}})}}),l=X.api.projects[":projectId"].$put,{mutate:s}=q({mutationFn:async(Q)=>{let _=await l({param:{projectId:W.id},json:Q});if(!_.ok)throw Error(V.failed_update_project());return await _.json()},onSuccess:()=>{A.invalidateQueries({queryKey:["teams",U,"projects"]}),T(!1)}}),e=X.api.teams[":teamId"].files.$post,{mutate:d}=q({mutationFn:async({file:Q})=>{let _=await e({param:{teamId:U},form:{file:Q}});if(!_.ok)throw Error(V.failed_upload_file());return await _.json()},onSuccess:(Q)=>{let _=Q;if(_&&typeof _.key==="string")M(_.key);D(!1)},onError:()=>{D(!1)}}),R=(Q)=>{let _=Q.target.files?.[0];if(_){D(!0);let zz=URL.createObjectURL(_);N(zz),d({file:_})}},h=()=>{v.current?.click()},p=(Q)=>{Q.stopPropagation(),M(void 0),N(void 0)},S=()=>{if(!H.trim())return;if(L==="create")t({name:H.trim(),coverImageKey:g,enableNotification:y});else if(L==="edit"&&W?.id)s({name:H.trim(),coverImageKey:g,enableNotification:y})};return z(kz,{open:Z,onOpenChange:T,children:J(qz,{className:"sm:max-w-[550px] overflow-hidden rounded-2xl border border-border/60 bg-background/95 backdrop-blur-md shadow-2xl p-0 gap-0",children:[J(Az,{className:"relative overflow-hidden bg-gradient-to-br from-primary/5 to-transparent p-6 border-b border-border/40",children:[z("div",{className:"absolute top-0 right-0 w-24 h-24 bg-primary/10 rounded-full blur-2xl pointer-events-none"}),z("div",{className:"absolute bottom-0 left-10 w-32 h-12 bg-primary/5 rounded-full blur-xl pointer-events-none"}),z("div",{className:"flex items-center gap-3",children:J("div",{children:[z(Fz,{className:"text-xl font-semibold tracking-tight text-foreground",children:L==="create"?V.create_new_project():V.project_settings()}),z(Uz,{className:"text-xs text-muted-foreground/80 mt-1",children:L==="create"?V.configure_new_project_description():V.manage_project_description()})]})})]}),J("div",{className:"space-y-6 p-6 max-h-[75vh] overflow-y-auto",children:[J("div",{className:"space-y-2",children:[z(m,{htmlFor:"name",className:"text-sm font-semibold tracking-tight text-foreground",children:V.project_name()}),J("div",{className:"relative",children:[z(j,{id:"name",value:H,onChange:(Q)=>O(Q.target.value),placeholder:V.project_name_placeholder(),className:"h-11 px-4 rounded-xl border-border/80 focus-visible:ring-ring/25 focus-visible:border-primary transition-all shadow-xs pr-10"}),H.trim()&&z("div",{className:"absolute inset-y-0 right-3 flex items-center",children:z(a,{className:"w-4 h-4 text-primary"})})]}),z("p",{className:"text-[11px] text-muted-foreground",children:V.project_name_hint()})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J("div",{className:"flex items-center justify-between",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Lz,{className:"w-4 h-4 text-primary"}),V.project_cover()]}),b&&J("button",{type:"button",onClick:p,className:"text-xs text-muted-foreground hover:text-destructive hover:bg-destructive/5 px-2.5 py-1 rounded-lg transition-all flex items-center gap-1 font-medium",children:[z(Kz,{className:"w-3.5 h-3.5"}),V.remove_cover()]})]}),J("div",{className:"relative aspect-square w-48 mx-auto rounded-2xl border border-dashed border-border flex items-center justify-center cursor-pointer overflow-hidden group shadow-inner bg-muted/20 transition-all duration-300 hover:border-primary/50 hover:bg-muted/40",onClick:h,children:[z("input",{type:"file",ref:v,className:"hidden",accept:"image/*",onChange:R}),E&&z("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-xs flex flex-col items-center justify-center gap-2 z-20",children:J("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-background border rounded-full shadow-lg",children:[z(Gz,{className:"w-4 h-4 animate-spin text-primary"}),z("span",{className:"text-xs font-semibold text-foreground",children:V.uploading()})]})}),b?J(P,{children:[z("img",{src:b,alt:V.cover_preview(),className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),J("div",{className:"absolute inset-0 bg-black/45 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col items-center justify-center gap-1.5 text-white z-10",children:[z(Jz,{className:"w-5 h-5 transform translate-y-1 group-hover:translate-y-0 transition-transform duration-300"}),z("span",{className:"text-xs font-semibold",children:V.upload_image()})]})]}):J("div",{className:"flex flex-col items-center gap-2 text-center p-4",children:[z("div",{className:"p-2.5 rounded-full bg-background border shadow-xs group-hover:scale-110 transition-transform duration-300",children:z(Jz,{className:"w-4 h-4 text-muted-foreground"})}),J("div",{children:[z("p",{className:"text-xs font-medium text-foreground",children:V.upload_cover()}),z("p",{className:"text-[11px] text-muted-foreground mt-0.5 max-w-[140px] mx-auto leading-normal",children:V.upload_cover_hint()})]})]})]})]}),J("div",{className:"space-y-3 border-t border-border/40 pt-5",children:[J(m,{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[z(Tz,{className:"w-4 h-4 text-primary"}),V.project_preferences()]}),J("div",{className:"flex items-start justify-between rounded-xl border border-border/50 bg-muted/10 p-4 transition-all duration-300 hover:bg-muted/20",children:[J("div",{className:"space-y-1 pr-4",children:[J("div",{className:"text-sm font-semibold flex items-center gap-2 text-foreground",children:[z(Rz,{className:"w-4 h-4 text-primary"}),V.activity_notifications()]}),z("p",{className:"text-xs text-muted-foreground leading-normal",children:V.activity_notifications_description()})]}),z(r,{checked:y,onCheckedChange:B,disabled:E,className:"mt-0.5"})]})]})]}),J(Ez,{className:"flex items-center justify-end gap-3 px-6 py-4 bg-muted/20 border-t border-border/40",children:[z(F,{type:"button",variant:"ghost",onClick:()=>T(!1),disabled:E,className:"rounded-xl h-10 px-4 hover:bg-muted font-medium text-sm text-muted-foreground hover:text-foreground transition-colors",children:V.cancel()}),z(F,{type:"submit",onClick:S,disabled:!H.trim()||E,className:"rounded-xl h-10 px-5 bg-primary text-primary-foreground hover:bg-primary/90 font-semibold text-sm shadow-lg shadow-primary/10 hover:shadow-primary/20 active:scale-98 transition-all flex items-center gap-2",children:E?J(P,{children:[z(Gz,{className:"w-4 h-4 animate-spin"}),V.processing()]}):L==="create"?V.create_project():V.save_changes()})]})]})})}function Oz({sortBy:Z,sortDirection:T,onSortChange:L}){let U=(H)=>{L(H,T)},W=()=>{L(Z,T==="asc"?"desc":"asc")},A=(H)=>{switch(H){case"name":return V.sort_name();case"created_at":return V.sort_created();case"updated_at":return V.sort_updated();default:return H}},K=T==="asc";return J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"outline",className:"gap-2 bg-muted/50",children:[z("span",{className:"text-muted-foreground",children:V.sorted_by_label()}),z("span",{className:"font-medium text-foreground",children:A(Z)})]})}),J(I,{align:"end",className:"w-56 p-2",children:[z("div",{className:"text-xs font-semibold text-muted-foreground mb-2 px-2",children:V.sort_by()}),J(C,{children:[z(f,{asChild:!0,children:J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted mb-2 border",children:[z("span",{children:A(Z)}),z(Vz,{className:"h-4 w-4 opacity-50"})]})}),z(I,{className:"w-52",children:["name","created_at","updated_at"].map((H)=>J(w,{onClick:()=>U(H),className:"justify-between",children:[A(H),Z===H&&z(a,{className:"h-4 w-4"})]},H))})]}),J(F,{variant:"ghost",className:"w-full justify-between font-normal px-2 h-10 bg-muted/50 hover:bg-muted border",onClick:W,children:[z("span",{className:"text-muted-foreground",children:Z==="name"?K?z(P,{children:V.sort_a_to_z()}):z(P,{children:V.sort_z_to_a()}):K?z(P,{children:V.sort_oldest_to_newest()}):z(P,{children:V.sort_newest_to_oldest()})}),K?z(Pz,{className:"h-4 w-4 opacity-50"}):z(Vz,{className:"h-4 w-4 opacity-50"})]})]})]})}var $=Wz($z(),1);function JG(){let{teamId:Z}=VG.useParams(),{canEdit:T,canAdmin:L}=bz(),U=n(),W=i(),[A,K]=$.useState(null),[H,O]=$.useState(!1),[y,B]=$.useState("create"),[g,M]=$.useState(void 0),[b,N]=$.useState(!1),[E,D]=$.useState(void 0),[v,u]=$.useState(""),[t,l]=$.useState(!1),{metadata:s,setMetadata:e}=Dz(),d=`team:${Z}:projects:sort`,R=s[d],[h,p]=$.useState(()=>R?.sortBy||"name"),[S,Q]=$.useState(()=>R?.sortDirection||"asc");$.useEffect(()=>{if(R?.sortBy&&R.sortBy!==h)p(R.sortBy);if(R?.sortDirection&&R.sortDirection!==S)Q(R.sortDirection)},[R]);let _=X.api.teams[":teamId"].projects.$get,{data:zz}=o({queryKey:["teams",Z,"projects",h,S],queryFn:async()=>{let G=await _({param:{teamId:Z},query:{sortBy:h,sortDirection:S}});if(!G.ok)throw Error("Failed to fetch projects");return await G.json()},placeholderData:Mz}),{data:Hz}=o({queryKey:["teams",Z,"members"],queryFn:async()=>{let G=await X.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{}});if(!G.ok)throw Error("Failed to fetch members");return await G.json()}}),{data:Qz}=o({queryKey:["teams",Z,"me"],queryFn:async()=>{let G=await X.api.teams[":teamId"].me.$get({param:{teamId:Z}});if(!G.ok)throw Error("Failed to fetch me");return await G.json()}}),xz=X.api.teams[":teamId"].invite.$post,mz=q({mutationFn:async(G)=>{let Y=await xz(G);if(!Y.ok)throw Error("Failed to invite");return await Y.json()}}),c=q({mutationFn:async(G)=>{if(!(await X.api.projects[":projectId"].$delete({param:{projectId:G}})).ok)throw Error("Failed to delete project")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]})}}),iz=q({mutationFn:async(G)=>{let Y=await X.api.projects[":projectId"].$put({param:{projectId:G.id},json:{enableNotification:!G.enableNotification}});if(!Y.ok)throw Error("Failed to update project notification settings");return await Y.json()},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"projects"]}),Yz.success(V.project_notification_updated())},onError:(G)=>{Yz.error(G instanceof Error?G.message:V.failed_update_project_notification())}}),Xz=()=>{B("create"),M(void 0),O(!0)},nz=()=>{K("create"),setTimeout(()=>{K(null)},100),setTimeout(()=>{Xz()},200)},az=(G)=>{B("edit"),M(G),O(!0)},jz=(G)=>{D(G),u(""),N(!0)},rz=async()=>{if(E&&v==="delete")try{await c.mutateAsync(E.id),N(!1)}catch(G){console.error(G)}},oz=(G,Y)=>{if(Y.detail>1)return;K(G),setTimeout(()=>{K(null)},100),setTimeout(()=>{U({to:"/projects/$projectId",params:{projectId:G}})},200)},tz=async(G)=>{return(await mz.mutateAsync({param:{teamId:Z},json:{role:G}})).code},sz=q({mutationFn:async({userId:G,role:Y})=>{if(!(await X.api.teams[":teamId"].members[":userId"].$patch({param:{teamId:Z,userId:G},json:{role:Y}})).ok)throw Error("Failed to update member role")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),ez=q({mutationFn:async(G)=>{if(!(await X.api.teams[":teamId"].members[":userId"].$delete({param:{teamId:Z,userId:G}})).ok)throw Error("Failed to remove member")},onSuccess:()=>{W.invalidateQueries({queryKey:["teams",Z,"members"]})}}),zG=(G)=>{if(!G)return"??";return G.split(" ").map((Y)=>Y[0]).slice(0,2).join("").toUpperCase()},GG=(G,Y)=>{p(G),Q(Y),e(Z,d,{sortBy:G,sortDirection:Y})},x=Array.isArray(Hz)?Hz:[];return J("div",{className:"flex-1 overflow-y-auto p-4",children:[J("div",{className:"flex flex-wrap items-center justify-between mb-4 gap-4",children:[z("h1",{className:"text-2xl font-bold",children:V.projects()}),J("div",{className:"flex flex-wrap items-center gap-4",children:[J("div",{className:"flex items-center -space-x-2 cursor-pointer hover:opacity-90",onClick:()=>l(!0),"data-testid":"team-members-trigger",children:[x.slice(0,3).map((G)=>J(hz,{className:"border-2 border-background w-8 h-8",children:[G.image&&z(Sz,{src:G.image,alt:G.name,className:"object-cover"}),z(wz,{className:"text-[10px]",children:zG(G.name)})]},G.id)),x.length>3&&J("div",{className:"flex items-center justify-center w-8 h-8 rounded-full border-2 border-background bg-muted text-[10px] font-medium",children:["+",x.length-3]})]}),z(Oz,{sortBy:h,sortDirection:S,onSortChange:GG}),T&&J(F,{className:"bg-orange-600 hover:bg-orange-700 text-white gap-2",onClick:Xz,children:[z(Zz,{className:"w-4 h-4"}),V.create_project()]})]})]}),J("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4",children:[zz?.data?.map((G)=>z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out",A===G.id?"scale-95":"scale-100"),onClick:(Y)=>oz(G.id,Y),children:J("div",{className:"flex flex-col",children:[J("div",{className:"relative w-full h-full aspect-square flex items-center justify-center bg-zinc-400/20",children:[G.coverImage?z("img",{src:G.coverImage,alt:G.name,className:"w-full h-full object-cover rounded"}):J("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 180.95 164.7",preserveAspectRatio:"xMidYMid slice",className:"w-full h-full object-cover rounded",children:[z("polygon",{fill:"#FC9F8E",points:"0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FEBAB8",points:"0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0"}),z("polyline",{fill:"#FAA5A5",points:"0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"}),z("polygon",{fill:"#EC5B6C",points:"0 76.0 0 164.7 151.69 164.7"}),z("polygon",{fill:"#E85C71",points:"180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6"}),z("polygon",{fill:"#C8405B",points:"117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"}),z("polygon",{fill:"#FFCCBE",points:"90.53 51.6 63.69 68.1 90.53 83.4"}),z("path",{fill:"#FB9991",d:"M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"}),z("path",{fill:"#FFEACD",d:"M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"}),z("polygon",{fill:"#FFCFB5",points:"64.02 99.3 90.53 114.9 90.53 83.4"}),z("path",{fill:"#F67D73",d:"M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z"}),z("path",{fill:"#F26560",d:"M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z"}),z("polygon",{fill:"#EB5F5B",points:"80.08 67.5 90.53 73.5 90.53 61.3"}),z("polygon",{fill:"#DB4D50",points:"90.53 61.3 90.53 73.5 100.87 67.4"})]}),z("div",{className:"absolute bottom-0 left-0 w-full h-[65%] bg-linear-to-t from-black/35 to-black/0"}),z("p",{className:"absolute left-1 bottom-2 text-white",children:G.name})]}),J("div",{className:"px-2 h-10 flex justify-between items-center",children:[J("p",{className:"truncate pr-1 text-xs text-muted-foreground",children:[V.updated_ago()," ",yz(G.updatedAt??"")]}),z("div",{onClick:(Y)=>Y.stopPropagation(),children:J(C,{modal:!1,children:[z(f,{asChild:!0,children:z("button",{className:"hover:bg-muted outline-none flex px-1",children:z(vz,{className:"w-5 h-5 text-muted-foreground"})})}),J(I,{align:"end",children:[T&&z(w,{onClick:(Y)=>{Y.stopPropagation(),az(G)},children:V.project_settings()}),J(w,{className:"flex items-center justify-between gap-4 cursor-pointer",onSelect:(Y)=>{Y.preventDefault(),iz.mutate(G)},children:[z("span",{children:V.notification()}),z(r,{checked:G.enableNotification??!0,className:"pointer-events-none"})]}),L&&z(w,{className:"text-destructive focus:text-destructive",onClick:()=>jz(G),children:V.delete()})]})]})})]})]})},G.id)),T&&z("div",{className:_z("shadow-md relative border rounded-xl overflow-hidden cursor-pointer transition-transform duration-100 ease-in-out border-dashed hover:border-orange-600/50 group",A==="create"?"scale-95":"scale-100"),onClick:nz,children:J("div",{className:"flex flex-col",children:[z("div",{className:"relative w-full aspect-square flex items-center justify-center bg-zinc-400/5 group-hover:bg-orange-600/5 transition-colors",children:z(Zz,{className:"w-8 h-8 text-zinc-400 group-hover:text-orange-600 transition-colors"})}),z("div",{className:"px-2 h-10 flex items-center justify-center bg-zinc-400/10 border-t group-hover:bg-orange-600/10 transition-colors",children:z("p",{className:"text-sm text-muted-foreground group-hover:text-orange-600 transition-colors",children:V.create_project()})})]})})]}),z(Nz,{open:H,onOpenChange:O,mode:y,teamId:Z,project:g}),z(Cz,{open:b,onOpenChange:N,children:J(fz,{children:[J(Iz,{children:[z(uz,{children:V.are_you_sure()}),J(lz,{children:[V.delete_project_warning({name:E?.name??""}),J("div",{className:"mt-4 flex flex-col gap-2 text-foreground",children:[z("span",{className:"text-sm font-medium",children:V.type_delete_to_confirm()}),z(j,{value:v,onChange:(G)=>u(G.target.value),placeholder:V.delete_placeholder(),className:"h-9",autoFocus:!0})]})]})]}),J(gz,{children:[z(pz,{disabled:c.isPending,children:V.cancel()}),z(dz,{onClick:(G)=>{G.preventDefault(),rz()},disabled:v!=="delete"||c.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:c.isPending?V.deleting():V.delete()})]})]})}),z(cz,{open:t,onOpenChange:l,title:V.team_members(),type:"team",members:x,isOwner:Qz?.role==="owner",onInvite:tz,onUpdateRole:async(G,Y)=>{await sz.mutateAsync({userId:G,role:Y})},onRemoveMember:async(G)=>{await ez.mutateAsync(G)},currentUserId:Qz?.id})]})}var VG=Bz("/teams/$teamId/")({component:JG});export{VG as Route};
|