@shumai-one/shumai 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-h82r29wm.js → chunk-04avc4fn.js} +49 -49
- package/bin/chunk-0asthrjf.js +2 -0
- package/bin/chunk-0ge2mm8j.js +1 -0
- package/bin/{chunk-3z20b2hz.js → chunk-0j22699g.js} +2 -2
- package/bin/{chunk-j909v9p5.js → chunk-0v9srsdz.js} +1 -1
- package/bin/{chunk-exgtwask.js → chunk-0y4zq3y4.js} +1 -1
- package/bin/{chunk-5yd9cv7f.js → chunk-15vsw36h.js} +5 -5
- package/bin/{chunk-eez1yncf.js → chunk-15w79661.js} +2 -2
- package/bin/{chunk-xvdd04gy.js → chunk-19jpn3r6.js} +1 -1
- package/bin/{chunk-grsgkkrb.js → chunk-19q13a80.js} +6 -6
- package/bin/{chunk-r6gkv98n.js → chunk-1nvj833s.js} +6 -6
- package/bin/chunk-23780yj6.js +3 -0
- package/bin/chunk-2gf95tj0.js +1 -0
- package/bin/{chunk-6vvs18bw.js → chunk-2pw7xcrn.js} +1 -1
- package/bin/chunk-2tk5w3jc.js +1 -0
- package/bin/chunk-2w6gve12.js +4 -0
- package/bin/chunk-301e7g3z.js +2 -0
- package/bin/chunk-3kmjbc3m.js +2 -0
- package/bin/{chunk-zhe16jvg.js → chunk-3pm6q6kg.js} +1 -1
- package/bin/{chunk-zfqz72sd.js → chunk-3q5qkfkc.js} +1 -1
- package/bin/chunk-3td60k1m.js +2 -0
- package/bin/chunk-42hrvk6k.js +211 -0
- package/bin/chunk-4zksqvwj.js +2 -0
- package/bin/chunk-5bk16qdp.js +2 -0
- package/bin/{chunk-y03z5rrg.js → chunk-5nqvqvqp.js} +3 -3
- package/bin/{chunk-e3r1m6rb.js → chunk-5rzxekn4.js} +1 -1
- package/bin/{chunk-h9x81yp6.js → chunk-5vqbzsjv.js} +1 -1
- package/bin/{chunk-628k58ek.js → chunk-6hzktewz.js} +2 -2
- package/bin/{chunk-yfe6hkzk.js → chunk-6jkjx0n2.js} +3 -3
- package/bin/{chunk-gy8z8sd7.js → chunk-6rn094yj.js} +1 -1
- package/bin/{chunk-3cvbb6kh.js → chunk-7qvvf0yd.js} +2 -2
- package/bin/{chunk-35mpp84e.js → chunk-81dawvn4.js} +2 -2
- package/bin/chunk-8abhmarc.js +2 -0
- package/bin/{chunk-51h2bgpf.js → chunk-8ayz61rc.js} +3 -3
- package/bin/{chunk-03bfjh8k.js → chunk-8ny7wvzb.js} +2 -2
- package/bin/{chunk-3btc8a0p.js → chunk-8tzfcqtb.js} +2 -2
- package/bin/{chunk-5patxztz.js → chunk-8zgq5sav.js} +3 -3
- package/bin/{chunk-m1xc3t0p.js → chunk-93p27bbm.js} +6 -6
- package/bin/chunk-951r2rx1.js +1 -0
- package/bin/chunk-965102pf.js +3 -0
- package/bin/{chunk-hr2027z3.js → chunk-98mg3dpd.js} +8 -8
- package/bin/{chunk-v42jcex0.js → chunk-9bakwac0.js} +4 -4
- package/bin/{chunk-z8mmqfm4.js → chunk-9ggwc289.js} +1 -1
- package/bin/{chunk-6bgbx563.js → chunk-9zgqjdx1.js} +2 -2
- package/bin/{chunk-kzsdp31a.js → chunk-a8bymrv1.js} +2 -2
- package/bin/chunk-acn3r2m2.js +1 -0
- package/bin/{chunk-z1r86fna.js → chunk-ae6zgjhd.js} +2 -2
- package/bin/{chunk-trndqdaa.js → chunk-asy868kq.js} +1 -1
- package/bin/{chunk-r1m4q8vw.js → chunk-b5r0be06.js} +2 -2
- package/bin/{chunk-dz33q4v1.js → chunk-bbcmhcvc.js} +2 -2
- package/bin/{chunk-myd3wg9a.js → chunk-bpxw19ez.js} +1 -1
- package/bin/{chunk-sg7n2g3z.js → chunk-cdk8vqeg.js} +4 -4
- package/bin/chunk-ce0bhc72.js +2 -0
- package/bin/chunk-ce75dw3k.css +1 -0
- package/bin/{chunk-m7dp8rqv.js → chunk-cpj562n6.js} +1 -1
- package/bin/{chunk-h153xefb.js → chunk-cx32wsa1.js} +1 -1
- package/bin/{chunk-r5rpdhed.js → chunk-d2dgazjj.js} +1 -1
- package/bin/{chunk-3zvvct3r.js → chunk-d5hbzp7t.js} +1 -1
- package/bin/chunk-d9qpgkek.js +2 -0
- package/bin/{chunk-9h6nn1a3.js → chunk-dche0gy0.js} +1 -1
- package/bin/{chunk-zcrtr8qd.js → chunk-dppfek34.js} +2 -2
- package/bin/chunk-dv6p6n5e.js +1 -0
- package/bin/{chunk-hx76pje1.js → chunk-e439kt05.js} +1 -1
- package/bin/{chunk-gptzcgte.js → chunk-eqr0znmc.js} +1 -1
- package/bin/{chunk-q5mkbnr9.js → chunk-f5z3096k.js} +2 -2
- package/bin/{chunk-b9j5575n.js → chunk-ffj9cq9y.js} +2 -2
- package/bin/{chunk-80qz30dc.js → chunk-fxg81vtx.js} +2 -2
- package/bin/{chunk-5jbx9gqe.js → chunk-ggfx2b0f.js} +1 -1
- package/bin/chunk-gnt9gewm.js +2 -0
- package/bin/{chunk-czny5thj.js → chunk-grjek810.js} +2 -2
- package/bin/chunk-gvas3xkp.js +2 -0
- package/bin/{chunk-ghjhyajn.js → chunk-j53sjkxt.js} +2 -2
- package/bin/{chunk-0tf15vee.js → chunk-jgfye6nf.js} +2 -2
- package/bin/{chunk-tcat7q9p.js → chunk-jt6v15wx.js} +2 -2
- package/bin/{chunk-rn9rktp4.js → chunk-k3prp6c6.js} +4 -4
- package/bin/{chunk-mqr096rn.js → chunk-k97axrc4.js} +1 -1
- package/bin/{chunk-20anqpf1.js → chunk-kvwec0p3.js} +2 -2
- package/bin/{chunk-vbbn4hth.js → chunk-kzr6ecke.js} +1 -1
- package/bin/{chunk-rkq6jvhb.js → chunk-m6v8vt2b.js} +2 -2
- package/bin/{chunk-32japja5.js → chunk-mn108p93.js} +1 -1
- package/bin/{chunk-31vx01aw.js → chunk-mn208vrv.js} +2 -2
- package/bin/chunk-mneeg71d.js +2 -0
- package/bin/{chunk-d7mgjqf8.js → chunk-n76w2wcr.js} +1 -1
- package/bin/{chunk-fyssg02c.js → chunk-n9vp9nbg.js} +29 -29
- package/bin/{chunk-2g5qdx4s.js → chunk-p0j4wpa5.js} +2 -2
- package/bin/chunk-qb178ntp.js +2 -0
- package/bin/{chunk-7vd5yajk.js → chunk-qmrg2jhs.js} +7 -7
- package/bin/{chunk-d9btz95y.js → chunk-qxscgcn9.js} +2 -2
- package/bin/{chunk-0vtk7wrf.js → chunk-r249n1xe.js} +2 -2
- package/bin/{chunk-36r20sj7.js → chunk-r776bhsg.js} +1 -1
- package/bin/{chunk-1k16xsqq.js → chunk-rmvhyqyb.js} +6 -6
- package/bin/{chunk-zwb9kamp.js → chunk-rtaya5wc.js} +2 -2
- package/bin/chunk-rw5h0n0s.js +1 -0
- package/bin/{chunk-m9sp00a9.js → chunk-ryepy5er.js} +4 -4
- package/bin/{chunk-mcd7zas7.js → chunk-rza95y4z.js} +2 -2
- package/bin/chunk-s4r6e6ms.js +1 -0
- package/bin/{chunk-qgkbxw1k.js → chunk-sbyyn9yw.js} +2 -2
- package/bin/chunk-syjjke3f.js +1 -0
- package/bin/chunk-t1yamxgk.js +2 -0
- package/bin/chunk-tgfxe0sb.js +1 -0
- package/bin/chunk-tjretpx8.js +1 -0
- package/bin/chunk-tvkekn4z.js +1 -0
- package/bin/{chunk-5t05jpna.js → chunk-twpc640e.js} +1 -1
- package/bin/{chunk-p5v22g5n.js → chunk-v034sfw8.js} +2 -2
- package/bin/{chunk-wydd7sz7.js → chunk-v5hz09a1.js} +2 -2
- package/bin/{chunk-j3xaq9s3.js → chunk-vm2pz2hm.js} +2 -2
- package/bin/{chunk-mt532a33.js → chunk-vzdgsfkf.js} +1 -1
- package/bin/chunk-w4yjgez6.js +14 -0
- package/bin/{chunk-0yv0nnmh.js → chunk-w73v578p.js} +2 -2
- package/bin/{chunk-edjtb7pk.js → chunk-w9z27p0m.js} +2 -2
- package/bin/chunk-wjcebkpb.js +1 -0
- package/bin/{chunk-cw8z9w5c.js → chunk-wnqxyqrg.js} +2 -2
- package/bin/chunk-ws71fg50.js +2 -0
- package/bin/{chunk-g8h1e1kh.js → chunk-wwkhskce.js} +2 -2
- package/bin/{chunk-kgfa5y9w.js → chunk-xr2v0d6y.js} +5 -5
- package/bin/{chunk-wkxm6yny.js → chunk-y2dhf3p0.js} +2 -2
- package/bin/chunk-yfp3q4da.js +1 -0
- package/bin/{chunk-f22nrm6r.js → chunk-ypkkfwfb.js} +4 -4
- package/bin/chunk-z8e4wc59.js +1 -0
- package/bin/{chunk-fhq5m9ya.js → chunk-zckxc8m6.js} +2 -2
- package/bin/{chunk-3fjgf7eb.js → chunk-zdzkjp4q.js} +2 -2
- package/bin/chunk-zf5cyxnt.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +402 -397
- package/package.json +7 -7
- package/prisma/migrations/20261008134859_add_transcode_3d/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/bin/chunk-12npypek.js +0 -2
- package/bin/chunk-13d525jm.js +0 -2
- package/bin/chunk-1yt1gsyy.js +0 -2
- package/bin/chunk-3ewmtf1c.js +0 -1
- package/bin/chunk-3xw70yr4.js +0 -2
- package/bin/chunk-5seey9ee.js +0 -2
- package/bin/chunk-66hdwm6f.js +0 -2
- package/bin/chunk-756mr32b.js +0 -2
- package/bin/chunk-7wb3dga5.js +0 -2
- package/bin/chunk-9k86d2a3.js +0 -4
- package/bin/chunk-9wk11jtz.js +0 -1
- package/bin/chunk-a1crhhzy.js +0 -1
- package/bin/chunk-axfwh5et.js +0 -2
- package/bin/chunk-cgsxyw07.js +0 -2
- package/bin/chunk-dckdnqc0.js +0 -2
- package/bin/chunk-dx0wz749.js +0 -211
- package/bin/chunk-dz4fdrmk.js +0 -1
- package/bin/chunk-hz9stgvn.js +0 -1
- package/bin/chunk-hzr8100w.js +0 -3
- package/bin/chunk-jb6d142z.js +0 -1
- package/bin/chunk-k9cgfzgk.js +0 -3
- package/bin/chunk-meyvvmgk.js +0 -1
- package/bin/chunk-n1b3pt17.js +0 -14
- package/bin/chunk-n5v48hz5.js +0 -2
- package/bin/chunk-phzemmmy.js +0 -2
- package/bin/chunk-qhzat67w.js +0 -2
- package/bin/chunk-smcn7ep7.js +0 -2
- package/bin/chunk-tf8q7h6b.js +0 -1
- package/bin/chunk-tvr5rm1g.js +0 -1
- package/bin/chunk-ty88m3yg.js +0 -2
- package/bin/chunk-v2x9915x.js +0 -1
- package/bin/chunk-vnk2p7mq.css +0 -1
- package/bin/chunk-x8hky9td.js +0 -1
- package/bin/chunk-y12ah7c6.js +0 -1
- package/bin/chunk-y7jz31ay.js +0 -1
- package/bin/chunk-ydk3edsw.js +0 -1
- package/bin/chunk-zbma2zeh.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shumai-one/shumai",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "A fullstack AI-powered media workspace and workflow engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"exiftool-vendored": "38.1.0"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@shumai-one/shumai-darwin-arm64": "0.5.
|
|
32
|
-
"@shumai-one/shumai-darwin-x64": "0.5.
|
|
33
|
-
"@shumai-one/shumai-linux-arm64": "0.5.
|
|
34
|
-
"@shumai-one/shumai-linux-x64": "0.5.
|
|
35
|
-
"@shumai-one/shumai-win32-arm64": "0.5.
|
|
36
|
-
"@shumai-one/shumai-win32-x64": "0.5.
|
|
31
|
+
"@shumai-one/shumai-darwin-arm64": "0.5.2",
|
|
32
|
+
"@shumai-one/shumai-darwin-x64": "0.5.2",
|
|
33
|
+
"@shumai-one/shumai-linux-arm64": "0.5.2",
|
|
34
|
+
"@shumai-one/shumai-linux-x64": "0.5.2",
|
|
35
|
+
"@shumai-one/shumai-win32-arm64": "0.5.2",
|
|
36
|
+
"@shumai-one/shumai-win32-x64": "0.5.2"
|
|
37
37
|
},
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
package/prisma/schema.prisma
CHANGED
package/bin/chunk-12npypek.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t,C}from"./chunk-dx0wz749.js";function Rn({className:e,...a}){return t("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:t("table",{"data-slot":"table",className:C("w-full caption-bottom text-sm",e),...a})})}function Pn({className:e,...a}){return t("thead",{"data-slot":"table-header",className:C("[&_tr]:border-b",e),...a})}function Nn({className:e,...a}){return t("tbody",{"data-slot":"table-body",className:C("[&_tr:last-child]:border-0",e),...a})}function wr({className:e,...a}){return t("tr",{"data-slot":"table-row",className:C("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a})}function Et({className:e,...a}){return t("th",{"data-slot":"table-head",className:C("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}function yt({className:e,...a}){return t("td",{"data-slot":"table-cell",className:C("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a})}
|
|
2
|
-
export{Rn,Pn,Nn,wr,Et,yt};
|
package/bin/chunk-13d525jm.js
DELETED
package/bin/chunk-1yt1gsyy.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h,N,y,u,S,L,t,o,Q,Z,B,pt,Re,A,C,zg,jg,GC,Dt,_s,Dr,_n,$n,Xc,br,un,zr,$t,lr,Ar,Lo}from"./chunk-dx0wz749.js";import{Fr}from"./chunk-h82r29wm.js";import{Ci}from"./chunk-n1b3pt17.js";import{Ei}from"./chunk-fhq5m9ya.js";import{ua,jl}from"./chunk-mcd7zas7.js";import{ql}from"./chunk-smcn7ep7.js";import{Ii}from"./chunk-yfe6hkzk.js";import{Ir}from"./chunk-myd3wg9a.js";S();function ke(i,s,P,r,c,f){let O=i.type==="folder",x=s.type==="folder";if(O!==x)return null;let b=x?r:c,k=b.findIndex((a)=>a.id===P),v=b.findIndex((a)=>a.id===s.id);if(k===-1||v===-1)return null;let W=Math.min(k,v),U=Math.max(k,v),M=b.slice(W,U+1),l=new Set(f);return M.forEach((a)=>{if(a.id)l.add(a.id)}),l}function Gn({teamId:i,projectId:s,projectName:P,assetId:r,rootFolderId:c,collection:f,onUpdateCollection:O}){let x=Re(),b=Q(),{canEdit:k}=Dt(s),{setFields:v}=Fr(),W=A.api.files[":fileId"].metadata.$patch,{mutate:U}=B({mutationFn:async(e)=>{if(!(await W(e)).ok)throw Error("Failed to patch metadata");return null}}),{data:M}=Z({queryKey:["fields",s],queryFn:async()=>{let e=await A.api.projects[":projectId"].fields.$get({param:{projectId:s}});if(!e.ok)throw Error("Failed to fetch fields");return await e.json()},enabled:!!s});h(()=>{if(M)v(M,s)},[M,s,v]);let l=r==="recently-deleted",a=r==="recents",[_,z]=u(null),[p,R]=u(new Set),[H,E]=u(null),[Ne,Me]=u(240),[Ae,ze]=u(360),{isChatbotOpen:V}=lr(),{members:Le,fetchMembers:oe}=zr(),{metadata:ae,fetchMetadata:re,setMetadata:je}=Ar(),ie=Boolean(ae["appearance.hideAgent"]);h(()=>{if(i)oe(i),re(i)},[i,oe,re]);let X=N(()=>f?.filter?.searchFilter?.conditions||[],[f]),[j,G]=u(X);h(()=>{G(X)},[X]);let le=`project:${s}:sort`,D=ae[le]||{field:"custom",order:"asc"},De=(e)=>{if(e)je(i,le,e)},F=!!f,K=j.length>0||F,{fileListLeftSidebarCollapsed:de,setFileListLeftSidebarCollapsed:$e,fileListRightSidebarCollapsed:ce,setFileListRightSidebarCollapsed:Te,viewModes:qe}=$t(),fe=qe[s]??"card",Ee=y(null),{data:T}=l||a?{data:void 0}:Z({queryKey:["folders",r],queryFn:async()=>{let e=await A.api.folders[":folderId"].$get({param:{folderId:r}});if(!e.ok)throw Error("failed to fetch folder");return await e.json()}}),{setProjectState:pe,clearProjectState:ue}=un();h(()=>(pe({teamId:i,projectId:s,projectName:P,rootFolderId:c,ancestorFolders:T?.ancestorFolders??[],currentAsset:l?{name:zg(),type:"folder"}:a?{name:jg(),type:"folder"}:F?{id:f.id,name:f.name,type:"folder"}:{id:T?.id||r,name:T?.name,type:"folder"},isRootFolder:!l&&!a&&!F&&r===c,onFolderClick:(e)=>{x({to:"/projects/$projectId/folders/$folderId",params:{projectId:s,folderId:e}})}}),()=>ue()),[i,s,P,T,l,a,r,c,pe,ue,x]);let{data:J,fetchNextPage:ge,hasNextPage:he,isFetchingNextPage:me,isLoading:Ke}=pt({queryKey:l?["projects",s,"recently-deleted","folder"]:a?["projects",s,"recents","folder"]:["search",i,r,"folder",j,D,F],queryFn:async({pageParam:e})=>{if(l||F||a){if(l){let d=await A.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:s},query:{assetType:"folder",after:e}});if(!d.ok)throw Error("failed to fetch recently deleted folders");return await d.json()}return{data:[],pageInfo:{total:0}}}if(K)return{data:[],pageInfo:{total:0}};let n=await A.api.folders[":folderId"].search.$post({param:{folderId:r},json:{assetType:"folder",after:e,recursively:!1,sort:D,conditions:[]}});if(!n.ok)throw Error("failed to search folders");return await n.json()},enabled:!K&&!a,initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0}),{data:Y,fetchNextPage:ye,hasNextPage:xe,isFetchingNextPage:Se,isLoading:Qe}=pt({queryKey:l?["projects",s,"recently-deleted","file"]:a?["projects",s,"recents","file"]:["search",i,r,"file",j,D,F],queryFn:async({pageParam:e})=>{if(l){let d=await A.api.projects[":projectId"]["recently-deleted"].$get({param:{projectId:s},query:{assetType:"file",after:e}});if(!d.ok)throw Error("failed to fetch recently deleted files");return await d.json()}if(a){let d=await A.api.projects[":projectId"].recents.$get({param:{projectId:s},query:{after:e,first:"20"}});if(!d.ok)throw Error("failed to fetch recent files");return await d.json()}let n=await A.api.folders[":folderId"].search.$post({param:{folderId:r},json:{assetType:"file",after:e,recursively:K||F,conditions:j,sort:D}});if(!n.ok)throw Error("failed to search files");return await n.json()},initialPageParam:"",getNextPageParam:(e)=>e.pageInfo?.cursor||void 0}),I=J?.pages.flatMap((e)=>e.data??[])??[],g=Y?.pages.flatMap((e)=>e.data??[])??[],Fe=(!K&&!a?Ke:!1)||Qe,we=J?.pages[0]?.pageInfo?.total,be=Y?.pages[0]?.pageInfo?.total,ve=J?.pages[0]?.pageInfo?.totalSize,Ie=Y?.pages[0]?.pageInfo?.totalSize,ee=()=>{R(new Set),z(null),E(null)},{dragState:q,handleDragStart:Oe,handleDragEnd:We}=jl({teamId:i,projectId:s,assetId:r,folders:I,files:g,selectedIds:p,onClearSelection:ee}),te=N(()=>{if(p.size!==1)return null;let e=Array.from(p)[0];return g.find((d)=>d.id===e)||null},[p,g]),Ce=(e)=>{if(l)return;if(e.type==="folder")G([]),x({to:"/projects/$projectId/folders/$folderId",params:{projectId:s,folderId:e.id}});else x({to:"/projects/$projectId/files/$fileId",params:{projectId:s,fileId:e.versionStack?e.versionStack.id:e.id},search:{version:void 0}})},Pe=(e,n)=>{let d=n.metaKey||n.ctrlKey;if(n.shiftKey&&H){let ne=[...I,...g].find((m)=>m.id===H);if(ne){let m=ke(ne,e,H,I,g,p);if(m){R(m),z(e);return}}}if(d){let w=new Set(p);if(w.has(e.id)){if(w.delete(e.id),R(w),_?.id===e.id){let m=[...I,...g].find((Ue)=>w.has(Ue.id));z(m||null),E(m?m.id:null)}}else w.add(e.id),R(w),E(e.id),z(e);return}R(new Set([e.id])),E(e.id),z(e)},se=(e,n,d)=>{U({param:{fileId:e},json:[{key:n,value:d}]},{onSuccess:()=>{b.invalidateQueries({queryKey:["folders",r,"children",{assetType:"file"}]}),b.invalidateQueries({queryKey:["search",i,r]})}})};if(Lo())return t(ql,{teamId:i,projectId:s,assetId:r,folders:I,files:g,totalFolders:we,totalFiles:be,totalFoldersSize:ve,totalFilesSize:Ie,selectedItem:_,selectedIds:p,onItemSelect:Pe,onItemDoubleClick:Ce,onSaveField:se,onClearSelection:ee,fetchNextFoldersPage:ge,hasNextFoldersPage:he||!1,isFetchingNextFoldersPage:me,fetchNextFilesPage:ye,hasNextFilesPage:xe||!1,isFetchingNextFilesPage:Se,isRecentlyDeleted:l,isRecents:a,isLoading:Fe,rootFolderId:c});return o($n,{modifiers:[ua.configure({anchor:{x:0,y:0}})],plugins:(e)=>e.map((n)=>{if(n===_s)return _s.configure({dropAnimation:null});if(typeof n==="object"&&n!==null&&"plugin"in n&&n.plugin===_s)return _s.configure({dropAnimation:null});return n}),sensors:l||a||!k?[]:[_n.configure({activationConstraints:[new Dr.Distance({value:10})]})],onDragStart:Oe,onDragEnd:We,children:[t("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:o("div",{ref:Ee,className:"flex flex-1 overflow-hidden relative",children:[!de&&t("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>$e(!0)}),(!ce||V)&&t("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>{Te(!0),lr.getState().setIsChatbotOpen(!1)}}),!de&&o(L,{children:[t("div",{className:"bg-background",style:{width:Ne},children:t(br,{teamId:i,projectId:s,projectName:P,rootFolderId:c,dragState:q,ancestorFolders:T?.ancestorFolders??[]})}),t(Ir,{onResize:(e)=>{Me((n)=>Math.max(180,Math.min(400,n+e)))},className:"hidden md:block"})]}),t(Ci,{teamId:i,projectId:s,assetId:r,folders:I,files:g,totalFolders:we,totalFiles:be,totalFoldersSize:ve,totalFilesSize:Ie,selectedItem:_,selectedIds:p,onItemSelect:Pe,onItemDoubleClick:Ce,onSaveField:se,displayStyle:fe,onClearSelection:ee,fetchNextFoldersPage:ge,hasNextFoldersPage:he||!1,isFetchingNextFoldersPage:me,fetchNextFilesPage:ye,hasNextFilesPage:xe||!1,isFetchingNextFilesPage:Se,isRecentlyDeleted:l,isRecents:a,isLoading:Fe,filterConditions:j,onFilterChange:G,sort:D,onSortChange:De,dragState:q,collection:f,onUpdateCollection:O,rootFolderId:c}),(!ce||V&&!ie)&&o(L,{children:[t(Ir,{onResize:(e)=>{ze((n)=>Math.max(240,Math.min(600,n-e)))},className:"hidden md:block"}),t("div",{style:{width:Ae},className:"bg-background flex flex-col flex-shrink-0",children:V&&!ie?t(Ei,{projectId:s,contextAssetId:r}):te?t(Ii,{teamId:i,projectId:s,file:te,onSaveField:(e,n)=>se(te.id,e,n),members:Le,hideAnnotationControl:!0}):t("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm text-muted-foreground",children:GC()})})]})]})}),t(Xc,{children:q?.isActive?t("div",{className:C("flex items-center gap-2 rounded-md bg-popover px-3 py-2 text-sm font-medium text-popover-foreground shadow-md ring-1 ring-border cursor-grabbing",fe==="list"&&"w-30 h-[40px] px-0 flex-none overflow-hidden justify-center"),style:{transform:"translate(0px, 0px)"},children:o("span",{children:["Moving ",q.itemCount," item",q.itemCount!==1?"s":""]})}):null})]})}
|
|
2
|
-
export{Gn};
|
package/bin/chunk-3ewmtf1c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,S,t,Z,ze,A,lt,St,em}from"./chunk-dx0wz749.js";import"./chunk-h82r29wm.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import"./chunk-fhq5m9ya.js";import"./chunk-mcd7zas7.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-myd3wg9a.js";import{Gn}from"./chunk-1yt1gsyy.js";import{nr}from"./chunk-n5v48hz5.js";import"./chunk-g8h1e1kh.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();function i(){let{projectId:o}=l.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=nr(em(o)),e=s?.rootFolder,{data:n}=Z({queryKey:["folders",e],queryFn:()=>(async()=>await(await A.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!n)return t(St,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:"recents",rootFolderId:e})}var l=ze("/projects/$projectId/recents")({component:i});export{l as Route};
|
package/bin/chunk-3xw70yr4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{uf,Dn,dc,fc,pc,mc,xu,Su,mm,LA,Cs,jo,jr}from"./chunk-h9x81yp6.js";export{pc as EncryptJWT,fc as SignJWT,mm as UnsecuredJWT,uf as base64url,mc as calculateJwkThumbprint,xu as createLocalJWKSet,Su as createRemoteJWKSet,jr as decodeJwt,jo as decodeProtectedHeader,Cs as importJWK,LA as importPKCS8,dc as jwtDecrypt,Dn as jwtVerify};
|
package/bin/chunk-5seey9ee.js
DELETED
package/bin/chunk-66hdwm6f.js
DELETED
package/bin/chunk-756mr32b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Nt}from"./chunk-f22nrm6r.js";import{Ge}from"./chunk-rn9rktp4.js";import{H}from"./chunk-kzsdp31a.js";var _=H(Nt()),N=H(Ge()),Cc="AWS_ACCESS_KEY_ID",Ic="AWS_SECRET_ACCESS_KEY",S="AWS_SESSION_TOKEN",C="AWS_CREDENTIAL_EXPIRATION",A="AWS_CREDENTIAL_SCOPE",p="AWS_ACCOUNT_ID",zu=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[Cc],E=process.env[Ic],r=process.env[S],n=process.env[C],s=process.env[A],t=process.env[p];if(o&&E){let c={accessKeyId:o,secretAccessKey:E,...r&&{sessionToken:r},...n&&{expiration:new Date(n)},...s&&{credentialScope:s},...t&&{accountId:t}};return _.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new N.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{Cc,Ic,zu};
|
package/bin/chunk-7wb3dga5.js
DELETED
package/bin/chunk-9k86d2a3.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lr,ri,ff,e,m,d,x,U,i,r,T,_,l,s}from"./chunk-7vd5yajk.js";function c(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[u,a]of Object.entries(t)){let p=n[u];if(p===null)continue;o[p??u]=a}return o}function b(t){let n={};for(let[o,u]of Object.entries(t))if(typeof u<"u")n[o]=u;return n}class I extends Error{rawValue;rawMessage;static[Symbol.hasInstance](t){if(!(t instanceof Error))return!1;if(!("rawValue"in t))return!1;if(!("rawMessage"in t))return!1;if(!("pretty"in t))return!1;if(typeof t.pretty!=="function")return!1;return!0}constructor(t,n,o){super(`${t}: ${n}`);this.name="SDKValidationError",this.cause=n,this.rawValue=o,this.rawMessage=t}pretty(){if(this.cause instanceof ri)return`${this.rawMessage}
|
|
3
|
-
${of(this.cause)}`;else return this.toString()}}function of(t){return ff(t)}function _a(t){return{ok:!0,value:t}}function ns(t){return{ok:!1,error:t}}async function P(t){let n=await t;if(!n.ok)throw n.error;return n.value}function v(t,n,o){try{return _a(n(t))}catch(u){return ns(new I(o,u,t))}}var zo=r({prompt_tokens:m().default(0),completion_tokens:m().default(0),total_tokens:m().default(0),prompt_audio_seconds:s(m()).optional()}).catchall(x()).transform((t)=>c(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),lc=r({promptTokens:m().default(0),completionTokens:m().default(0),totalTokens:m().default(0),promptAudioSeconds:s(m()).optional()}).catchall(x()).transform((t)=>({...c(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));function w(t){return O++,t}var O=0,A=0;function N(){A++;let t=O;return{end:(n)=>{let o=O-t;if(O=t+(n??o),--A===0)O=0;return o}}}function J(t){let n=Object.values(t);return T([...n.map((o)=>l(o)),e().transform((o)=>w(o))])}function Ka(t){let n=Object.values(t).filter((o)=>typeof o==="number");return T([...n.map((o)=>l(o)),m().transform((o)=>w(o))])}function dt(t){return e()}function um(t){return m()}var M=Symbol("UNKNOWN");function K(t){return typeof t==="object"&&t!==null&&M in t}function Ke(t,n,o={}){let{unknownValue:u="UNKNOWN",outputPropertyName:a}=o;return U().transform((p)=>{let h=Object.defineProperties({raw:p,[a??t]:u,isUnknown:!0},{[M]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof p==="object"&&p!==null))return h;let S=p[t];if(typeof S!=="string")return h;if(!(S in n))return h;let F=n[S];if(!F)return h;let g=N(),C=F.safeParse(p);if(!C.success)return g.end(0),h;if(g.end(),a)C.data[a]=S;return C.data})}var Y=/^\d{4}-\d{2}-\d{2}$/;class j{serialized;static today(){return new j(new Date)}constructor(t){if(typeof t==="string"&&!Y.test(t))throw RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: "+t);let n=new Date(t);if(isNaN(+n))throw RangeError("RFCDate: invalid date provided: "+t);if(this.serialized=n.toISOString().slice(0,10),!Y.test(this.serialized))throw TypeError(`RFCDate: failed to build valid date with given value: ${t} serialized to ${this.serialized}`)}toJSON(){return this.toString()}toString(){return this.serialized}}function k(t){return U().transform((n,o)=>{let u=[],a=t.map(()=>[]),p=N();for(let[z,S]of t.entries()){let F=N(),g=S.safeParse(n),C=F.end(),ie=0;if(g.success){u.push({data:g.data,inexactCount:C,zeroDefaultCount:0,fieldCount:-1});continue}a[z].push(...g.error.issues)}if(u.length===0)return p.end(0),o.addIssue({input:n,code:"invalid_union",errors:a}),Lr;let h=u[0];for(let z of u){if(u.length>1)z.fieldCount=ne(z.data);h=te(z,h)}return p.end(h.inexactCount),h.data})}function te(t,n){let o=t.inexactCount===0,u=n.inexactCount===0;if(o!==u)return o?t:n;let a=t.fieldCount-t.zeroDefaultCount,p=n.fieldCount-n.zeroDefaultCount;if(a!==p)return a>p?t:n;return t.inexactCount<n.inexactCount?t:n}function ne(t){let n=0,o=[t],u=0;while(u<o.length){let a=o[u++];if(a===void 0||K(a))continue;let p=typeof a;if(a===null||p==="number"||p==="string"||p==="boolean"||p==="bigint"||a instanceof Date||a instanceof j){n++;continue}if(Array.isArray(a)){o.push(...a);continue}if(p==="object")o.push(...Object.values(a))}return n}var B=r({type:l("input_audio"),input_audio:e()}).transform((t)=>c(t,{input_audio:"inputAudio"})),V=r({type:l("input_audio"),inputAudio:e()}).transform((t)=>c(t,{inputAudio:"input_audio"}));var Fi=r({type:l("document_url").default("document_url"),document_url:e(),document_name:s(e()).optional()}).transform((t)=>c(t,{document_url:"documentUrl",document_name:"documentName"})),Ks=r({type:l("document_url").default("document_url"),documentUrl:e(),documentName:s(e()).optional()}).transform((t)=>c(t,{documentUrl:"document_url",documentName:"document_name"}));var W=r({type:l("file").default("file"),file_id:e()}).transform((t)=>c(t,{file_id:"fileId"})),ic=r({type:l("file").default("file"),fileId:e()}).transform((t)=>c(t,{fileId:"file_id"}));var Z={Low:"low",Auto:"auto",High:"high"},q=J(Z),G=dt(Z);var E=r({url:e(),detail:s(q).optional()}),L=r({url:e(),detail:s(G).optional()});var De=k([E,e()]),Ee=k([L,e()]);var Li=r({type:l("image_url").default("image_url"),image_url:k([E,e()])}).transform((t)=>c(t,{image_url:"imageUrl"})),Ws=r({type:l("image_url").default("image_url"),imageUrl:k([L,e()])}).transform((t)=>c(t,{imageUrl:"image_url"}));var Pe=k([m(),e()]),Me=k([m(),e()]);var y=r({type:l("reference").default("reference"),reference_ids:i(k([m(),e()]))}).transform((t)=>c(t,{reference_ids:"referenceIds"})),R=r({type:l("reference").default("reference"),referenceIds:i(k([m(),e()]))}).transform((t)=>c(t,{referenceIds:"reference_ids"}));var os=r({type:l("text").default("text"),text:e()}),ss=r({type:l("text").default("text"),text:e()});var H={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},fn=J(H),Ys=dt(H);var qe=k([fn,e()]),Ge=k([Ys,e()]);var ya=r({type:l("tool_reference").default("tool_reference"),tool:k([fn,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()}),ac=r({type:l("tool_reference").default("tool_reference"),tool:k([Ys,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()});var nt=k([ya,os,y]),ot=k([ac,ss,R]);var Zi=r({type:l("thinking").default("thinking"),thinking:i(k([ya,os,y])),signature:s(e()).optional(),closed:d().optional()}),Bi=r({type:l("thinking").default("thinking"),thinking:i(k([ac,ss,R])),signature:s(e()).optional(),closed:d().optional()});var Wa=Ke("type",{image_url:Li.and(r({type:l("image_url")})),document_url:Fi.and(r({type:l("document_url")})),text:os.and(r({type:l("text")})),reference:y.and(r({type:l("reference")})),file:W.and(r({type:l("file")})),thinking:Zi.and(r({type:l("thinking")})),input_audio:B}),Js=T([Ws.and(r({type:l("image_url")})),Ks.and(r({type:l("document_url")})),ss.and(r({type:l("text")})),R.and(r({type:l("reference")})),ic.and(r({type:l("file")})),Bi.and(r({type:l("thinking")})),V]);var zt=k([_(e(),x()),e()]),St=k([_(e(),x()),e()]);var Q=r({name:e(),arguments:k([_(e(),x()),e()])}),X=r({name:e(),arguments:k([_(e(),x()),e()])});var bu=r({id:e().default("null"),type:e().optional(),function:Q,index:m().default(0)}),dm=r({id:e().default("null"),type:e().optional(),function:X,index:m().default(0)});var Jt=k([e(),i(Wa)]);var vu=r({role:s(e()).optional(),content:s(k([e(),i(Wa)])).optional(),tool_calls:s(i(bu)).optional(),tool_call_id:s(e()).optional(),index:s(m()).optional(),metadata:s(_(e(),x())).optional()}).transform((t)=>c(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var oe={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},re=J(oe),ee=r({index:m(),delta:vu,finish_reason:s(re)}).transform((t)=>c(t,{finish_reason:"finishReason"}));var sf=r({id:e(),object:e().optional(),created:m().optional(),model:e(),usage:zo.optional(),choices:i(ee)});function fm(t){return v(t,(n)=>sf.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
|
|
4
|
-
export{of,_a,ns,P,v,c,b,J,Ka,dt,um,Ke,k,Fi,Ks,ic,Li,Ws,os,ss,fn,Ys,ya,ac,Zi,Bi,Wa,Js,bu,dm,vu,zo,lc,sf,fm};
|
package/bin/chunk-9wk11jtz.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,S,t,Z,ze,A,lt,St,tm}from"./chunk-dx0wz749.js";import"./chunk-h82r29wm.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import"./chunk-fhq5m9ya.js";import"./chunk-mcd7zas7.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-myd3wg9a.js";import{Gn}from"./chunk-1yt1gsyy.js";import{nr}from"./chunk-n5v48hz5.js";import"./chunk-g8h1e1kh.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();function i(){let{projectId:o}=l.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:n}=nr(tm(o)),e=n?.rootFolder,{data:s}=Z({queryKey:["folders",e],queryFn:()=>(async()=>await(await A.api.folders[":folderId"].$get({param:{folderId:e}})).json())(),enabled:!!e});if(!r||!e||!s)return t(St,{});return t(Gn,{teamId:r,projectId:o,projectName:n.name??"",assetId:"recently-deleted",rootFolderId:e})}var l=ze("/projects/$projectId/recently-deleted")({component:i});export{l as Route};
|
package/bin/chunk-a1crhhzy.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,S,t,Z,ze,A,lt,St,Xp}from"./chunk-dx0wz749.js";import"./chunk-h82r29wm.js";import"./chunk-n1b3pt17.js";import"./chunk-edjtb7pk.js";import"./chunk-b9j5575n.js";import"./chunk-cw8z9w5c.js";import"./chunk-m9sp00a9.js";import"./chunk-fhq5m9ya.js";import"./chunk-mcd7zas7.js";import"./chunk-dckdnqc0.js";import"./chunk-smcn7ep7.js";import"./chunk-51h2bgpf.js";import"./chunk-yfe6hkzk.js";import"./chunk-myd3wg9a.js";import{Gn}from"./chunk-1yt1gsyy.js";import{nr}from"./chunk-n5v48hz5.js";import"./chunk-g8h1e1kh.js";import"./chunk-eez1yncf.js";import"./chunk-7wb3dga5.js";import"./chunk-3btc8a0p.js";import"./chunk-6bgbx563.js";import"./chunk-d9btz95y.js";import"./chunk-czny5thj.js";import"./chunk-r5rpdhed.js";S();function l(){let{projectId:o}=c.useParams(),{teamId:r,ensureTeamIdForProject:a}=lt();h(()=>{a(o)},[o,a]);let{data:s}=nr(Xp(o)),e=s?.rootFolder,{data:i}=Z({queryKey:["folders",e],queryFn:async()=>{let n=await A.api.folders[":folderId"].$get({param:{folderId:e}});if(!n.ok)throw Error("failed to fetch folder");return await n.json()},enabled:!!e});if(!r||!e||!i)return t(St,{});return t(Gn,{teamId:r,projectId:o,projectName:s.name??"",assetId:e,rootFolderId:e})}var c=ze("/projects/$projectId/")({component:l});export{c as Route};
|
package/bin/chunk-axfwh5et.js
DELETED
package/bin/chunk-cgsxyw07.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{D,h,N,y,u,S,L,t,o,Q,Z,B,pt,A,I,Sr,O,Do,Pe,ve,nn,vt,wt,tr,we,Ne,C,E,he,ra,ge,Ae,K,Qr,Vt,ps,ms,hs,Ef,De,pd,at,Uc,zc,hr,gd,Fb,Xb,Da,Wf,np,lg,cg,Oa,Sg,gp,Fo,xo,Ud,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,qe,le,q,ce,Dt,Pt,M,So,Eo,Kr,kn,be,bs,zr,ef}from"./chunk-dx0wz749.js";import{Ti,Mi,Fr,mu,hu,ts,rs,vs,xs}from"./chunk-h82r29wm.js";import{Ha,fu}from"./chunk-yfe6hkzk.js";import{Gs}from"./chunk-m9sp00a9.js";var ct=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Qe=I("pencil",ct);S();S();function Ge({teamId:m,projectId:s,file:r,onSaveField:d,members:F,onCommentSelect:x,hideAnnotationControl:R=!1,readOnly:b=!1,publicFields:v,isPublic:c=!1,shareId:k,currentTime:H,onTyping:ee,selectedCommentId:f,heightPercent:V,onHeightPercentChange:U}){let{canEdit:_}=Dt(s),{fields:i,setFields:X}=Fr(),se=Q(),{ref:oe,inView:me}=Pt(),[a,j]=u(null),[Ce,te]=u(!1),[ke,ze]=u(null),G=y(!1),Ve=y(0),Y=y(V),je=(e)=>{G.current=!0,Ve.current=e.clientY,Y.current=V,e.target.setPointerCapture?.(e.pointerId)},Me=D((e)=>{if(!G.current)return;let w=(Ve.current-e.clientY)/window.innerHeight*100,ne=Math.min(85,Math.max(10,Y.current+w));U(ne)},[U]),Te=(e)=>{G.current=!1;try{e.target.releasePointerCapture?.(e.pointerId)}catch{}},{data:J}=Z({queryKey:["fields",s],queryFn:async()=>{let e=await A.api.projects[":projectId"].fields.$get({param:{projectId:s}});if(!e.ok)throw Error("Failed to fetch fields");return await e.json()},enabled:!!s&&!v}),T=ts(r);h(()=>{if(v)X(v,s);else if(J)X(J,s)},[J,v,s,X]);let{data:pe,fetchNextPage:W,hasNextPage:Ie}=pt({queryKey:c?["shares",k,"files",r?.id,"comments"]:["files",r?.id,"comments"],queryFn:async({pageParam:e})=>{if(c){let l=localStorage.getItem(`share_pwd_${k}`)||"",w=await A.api.shares[":shareId"].files[":fileId"].comments.$get({param:{shareId:k,fileId:r.id},query:{after:e}},{headers:{"x-share-password":l}});if(!w.ok)throw Error("Failed to fetch comments");return await w.json()}else{let l=await A.api.files[":fileId"].comments.$get({param:{fileId:r.id},query:{after:e}});if(!l.ok)throw Error("Failed to fetch comments");return await l.json()}},enabled:!!r?.id&&(!c||!!k),initialPageParam:"",refetchInterval:2000,getNextPageParam:(e)=>e.pageInfo?.cursor||void 0}),{mutate:Se}=B({mutationFn:async({text:e,attachmentIds:l,annotations:w,replyToId:ne,guestUserId:xe,second:ye})=>{if(c){let ie=localStorage.getItem(`share_pwd_${k}`)||"",Be=await A.api.shares[":shareId"].files[":fileId"].comments.$post({param:{shareId:k,fileId:r.id},json:{message:e,attachmentIds:l,replyToId:ne??void 0,annotations:w,second:ye??void 0}},{headers:{"x-share-password":ie,...xe?{"x-guest-user-id":xe}:{}}});if(!Be.ok)throw Error("Failed to create comment");return await Be.json()}else{let ie=await A.api.files[":fileId"].comments.$post({param:{fileId:r.id},json:{message:e,attachmentIds:l,replyToId:ne??void 0,annotations:w,second:ye??void 0}});if(!ie.ok)throw Error("Failed to create comment");return await ie.json()}},onSuccess:()=>{se.invalidateQueries({queryKey:c?["shares",k,"files",r?.id,"comments"]:["files",r?.id,"comments"]})},onError:()=>{M.error(Xb?.()||"Failed to post comment")}}),Fe=pe?.pages?.[0]?.pageInfo?.total??pe?.pages.reduce((e,l)=>e+(l.data?.length||0),0)??0;h(()=>{if(me&&Ie)W()},[me,W,Ie]);let z=N(()=>(r?.fieldValues||[]).reduce((e,l)=>(e[l.fieldId]=l,e),{}),[r?.fieldValues]),re=N(()=>[...i].sort((e,l)=>{let w=e.config?.name?.toLowerCase()||"",ne=l.config?.name?.toLowerCase()||"";if(w<ne)return-1;if(w>ne)return 1;return 0}),[i]),Ee=pe?.pages.flatMap((e)=>e.data??[])??[],_e=(e,l,w=[],ne,xe)=>{if(!e.trim()&&l.length===0&&w.length===0)return;let ye=ne||a?.id||null;if(c){let ie=localStorage.getItem(`guest_user_id_${k}`);if(!ie)ze({text:e,attachmentIds:l,annotations:w,replyToId:ye,second:xe}),te(!0);else Se({text:e,attachmentIds:l,annotations:w,replyToId:ye,guestUserId:ie,second:xe})}else Se({text:e,attachmentIds:l,annotations:w,replyToId:ye,second:xe});j(null)},He=(e)=>{if(ke)Se({...ke,guestUserId:e}),ze(null),j(null)},Re=(e)=>{let l=F.find((w)=>w.id===e);if(l)return l;return{id:"unknown",name:"Unknown",role:"unknown"}},Le=V<=15;return o("div",{style:{height:`${V}dvh`},className:"shrink-0 flex flex-col bg-background border-t border-border shadow-2xl rounded-t-2xl overflow-hidden select-none z-20","data-testid":"mobile-bottom-sheet",children:[t("div",{onPointerDown:je,onPointerMove:Me,onPointerUp:Te,onPointerCancel:Te,className:"w-full pt-2 pb-1.5 flex flex-col items-center justify-center cursor-grab active:cursor-grabbing touch-none shrink-0","aria-label":"Drag to resize bottom sheet",children:t("div",{className:"w-10 h-1 rounded-full bg-muted-foreground/30 hover:bg-muted-foreground/50 transition-colors"})}),o(So,{defaultValue:"comments",className:"flex-1 flex flex-col min-h-0 px-2 pb-1 overflow-hidden",children:[o(Eo,{className:"w-full shrink-0 h-9 bg-muted/60 p-1",children:[o(Kr,{value:"comments",className:"flex-1 text-xs font-semibold py-1",children:[pd()," ",Fe>0&&`(${Fe})`]}),t(Kr,{value:"fields",className:"flex-1 text-xs font-semibold py-1",children:Da()})]}),o(kn,{value:"comments",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:[t("div",{className:"flex items-center justify-between px-2 pb-1.5 shrink-0 border-b border-border/50",children:o("span",{className:"text-xs font-bold text-foreground",children:[Ef?.()||"All comments",Fe>0?` (${Fe})`:""]})}),t(ce,{className:"flex-1 min-h-0 px-2 py-2 [&>div>div]:block!",children:Ee.length===0?t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:cg()}):o("div",{className:"space-y-3",children:[Ee.map((e)=>o("div",{children:[t(Ha,{teamId:m,message:e,getUser:Re,onReply:j,hasReplies:!!e.replies?.length,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:f===e.id,onSelect:()=>{x?.(e)},readOnly:b,isPublic:c}),e.replies?.map((l,w)=>t("div",{children:t(Ha,{teamId:m,isReply:!0,message:l,getUser:Re,onReply:j,hasReplies:!1,isLastReply:w===(e.replies?.length??0)-1,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,isSelected:f===l.id,onSelect:()=>{x?.(l)},readOnly:b,isPublic:c})},l.id))]},e.id)),t("div",{ref:oe})]})}),(!b||c)&&t("div",{className:"mt-auto shrink-0 bg-background border-t border-border pt-1",children:t(fu,{isOpen:Ce,onClose:()=>te(!1),onSuccess:He,children:t(Gs,{projectId:s,onSendMessage:_e,replyingTo:a,onCancelReply:()=>j(null),hideAnnotationControl:R,disableMentions:c,currentTime:T?.commentsConfig?.hasTimestamp?H:void 0,formatTimestamp:T?.commentsConfig?.formatTimestamp,frameRate:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.frameRate||30:void 0,startTimecode:T?.commentsConfig?.hasTimestamp?r?.media?.metadata?.startTimecode:void 0,onTyping:ee})})})]}),t(kn,{value:"fields",className:C("flex-1 flex flex-col overflow-hidden min-h-0 mt-2",Le&&"hidden"),children:t(ce,{className:"flex-1 px-3 py-2 min-h-0 [&>div>div]:block!",children:re&&re.length>0?t("div",{className:"space-y-4 pb-6",children:re.map((e)=>o("div",{className:"space-y-1.5",children:[t("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:e.config?.name}),t("div",{className:"min-h-[32px]",children:t(xs,{fieldId:e.id,config:e.config,value:z[e.id]?.value,onSave:_?(l)=>d(e.id,l):void 0,readOnly:b||e.readOnly||!_})})]},e.id))}):t("div",{className:"py-8 text-center text-xs text-muted-foreground",children:"No custom fields defined"})})})]})]})}function Ye({fileName:m,folderName:s,version:r,versions:d,activeFileId:F,isPublic:x=!1,shareId:R,allowDownload:b=!0,downloadInfo:v,canEdit:c=!1,onBack:k,onPrevFile:H,onNextFile:ee,hasPrevFile:f=!1,hasNextFile:V=!1,onSelectVersion:U,onRename:_,onDelete:i,onLinkedTasks:X,linkedTaskCount:se=0}){let oe=async(a)=>{try{let j=x&&R?await A.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:R,fileId:F},json:{key:a}}):await A.api.files["download-url"].$post({json:{key:a,assetId:F}});if(!j.ok)return;let{url:Ce}=await j.json(),te=document.createElement("a");te.href=Ce,te.download="",document.body.appendChild(te),te.click(),document.body.removeChild(te)}catch{}},me=(v?.videoTranscodes?.length??0)>0;return o("header",{className:"flex h-12 w-full items-center justify-between border-b border-border bg-card px-2 py-1.5 shrink-0 select-none z-30",children:[t("div",{className:"flex items-center",children:t(E,{variant:"ghost",size:"icon",onClick:k,className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":gp(),children:t(nn,{className:"h-5 w-5"})})}),o("div",{className:"flex flex-1 items-center justify-center gap-1 min-w-0 px-1",children:[o("div",{className:"flex items-center min-w-0 max-w-[65vw]",children:[s&&o(L,{children:[t("span",{className:"truncate text-xs font-medium text-muted-foreground max-w-[80px]",children:s}),t("span",{className:"text-muted-foreground mx-1 text-xs",children:"/"})]}),d&&d.length>1?o(he,{modal:!1,children:[t(ge,{asChild:!0,children:o("button",{className:"flex items-center gap-1 min-w-0 truncate text-xs font-medium text-foreground hover:bg-accent rounded px-1 py-0.5 transition-colors cursor-pointer",children:[t("span",{className:"truncate max-w-[120px] font-semibold",children:m}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]}),t(ve,{className:"h-3 w-3 shrink-0 text-muted-foreground"})]})}),o(Ae,{align:"center",className:"w-48 z-40",children:[t(Qr,{className:"text-xs",children:Ud()}),d.map((a)=>o(K,{onClick:()=>U?.(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===F?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[11px] text-muted-foreground truncate max-w-[120px]",children:a.name||m})]},a.id))]})]}):o("div",{className:"flex items-center gap-1 min-w-0 truncate",children:[t("span",{className:"truncate text-xs font-semibold text-foreground max-w-[140px]",children:m}),r!==void 0&&o(be,{variant:"outline",className:"px-1 py-0 text-[10px] shrink-0 font-normal",children:["v",r]})]})]}),(f||V)&&o("div",{className:"flex items-center gap-0.5 shrink-0 bg-muted/60 rounded p-0.5 ml-1",children:[t(E,{variant:"ghost",size:"icon",disabled:!f,onClick:H,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:Sg(),"aria-label":Sg(),children:t(nn,{className:"h-3.5 w-3.5"})}),t(E,{variant:"ghost",size:"icon",disabled:!V,onClick:ee,className:"h-5 w-5 p-0 text-muted-foreground hover:text-foreground disabled:opacity-30 cursor-pointer",title:lg(),"aria-label":lg(),children:t(vt,{className:"h-3.5 w-3.5"})})]})]}),t("div",{className:"flex items-center gap-1",children:o(he,{modal:!1,children:[t(ge,{asChild:!0,children:t(E,{variant:"ghost",size:"icon",className:"h-8 w-8 text-foreground hover:bg-accent cursor-pointer","aria-label":np(),children:t(Sr,{className:"h-4 w-4"})})}),o(Ae,{align:"end",className:"w-52 z-40",children:[b&&(me?o(ps,{children:[o(ms,{className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(wt,{className:"h-3.5 w-3.5"}),t("span",{children:hr()})]}),t(ra,{children:o(hs,{className:"w-48 z-50",children:[t(Qr,{className:"text-xs",children:hr()}),v?.videoTranscodes?.map((a)=>{let j=bs(a),Ce=a.hdr?`${j} (HDR)`:j;return o(K,{onClick:()=>oe(a.key),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:Ce}),t("span",{className:"text-[10px] text-muted-foreground",children:"MP4"})]},a.key||`${j}-${a.hdr?"hdr":"sdr"}`)}),v?.originalKey&&o(L,{children:[t(Vt,{}),o(K,{onClick:()=>oe(v.originalKey),className:"flex items-center justify-between text-xs cursor-pointer",children:[t("span",{children:Oa?.()||"Original"}),t("span",{className:"text-[10px] text-muted-foreground",children:m.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):o(K,{onClick:()=>v?.originalKey&&oe(v.originalKey),disabled:!v?.originalKey,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(wt,{className:"h-3.5 w-3.5"}),t("span",{children:hr()})]})),d&&d.length>1&&U&&o(ps,{children:[t(ms,{className:"flex items-center gap-2 text-xs cursor-pointer",children:t("span",{children:Ud?.()||"Switch version"})}),t(ra,{children:o(hs,{className:"w-48 z-50",children:[t(Qr,{className:"text-xs",children:Ud?.()||"Switch version"}),d.map((a)=>o(K,{onClick:()=>U(a.id),className:C("flex items-center justify-between text-xs cursor-pointer",a.id===F?"bg-accent font-semibold text-accent-foreground":""),children:[o("span",{children:["v",a.version]}),t("span",{className:"text-[10px] text-muted-foreground truncate max-w-[120px]",children:a.name||m})]},a.id))]})})]}),X&&o(K,{onClick:X,className:"flex items-center justify-between text-xs cursor-pointer",children:[o("span",{className:"flex items-center gap-2",children:[t(Do,{className:"h-3.5 w-3.5"}),t("span",{children:Wf?.()||"Linked Tasks"})]}),se>0&&t("span",{className:"inline-flex items-center justify-center px-1.5 py-0.2 text-[10px] font-semibold rounded-full bg-muted-foreground/15 text-foreground",children:se})]}),c&&_&&o(K,{onClick:_,className:"flex items-center gap-2 text-xs cursor-pointer",children:[t(Qe,{className:"h-3.5 w-3.5"}),t("span",{children:Fo()})]}),c&&i&&o(L,{children:[t(Vt,{}),o(K,{onClick:i,className:"flex items-center gap-2 text-xs text-destructive focus:text-destructive cursor-pointer",children:[t(we,{className:"h-3.5 w-3.5"}),t("span",{children:at()})]})]})]})]})})]})}function Ul({projectId:m,teamId:s="",fileId:r,file:d,projectInfo:F,ancestorFolders:x=[],versions:R,activeFileId:b,startTime:v,isPublic:c=!1,shareId:k,allowDownload:H=!0,publicFields:ee,siblingFiles:f=[],onNavigateToFile:V,onNavigateBack:U,onRenameFile:_,onDeleteFile:i,onSaveField:X,onSelectVersion:se}){let{canEdit:oe}=Dt(m),{members:me}=zr(),a=y(null),[j,Ce]=u(50),[te,ke]=u([]),[ze,G]=u(0),[Ve,Y]=u(null),[je,Me]=u(!1),[Te,J]=u(""),T=y(null),[pe,W]=u(!1),[Ie,Se]=u(!1),[Fe,z]=u(!1),[re,Ee]=u(!1),{data:_e}=Z({queryKey:["teams",s,"kanban","assets",b,"tasks"],queryFn:async()=>{if(!s||!b||c)return{data:[],total:0};let g=await A.api.teams[":teamId"].kanban.assets[":assetId"].tasks.$get({param:{teamId:s,assetId:b}});if(!g.ok)return{data:[],total:0};return await g.json()},enabled:!!s&&!!b&&!c}),He=_e?.total??_e?.data?.length??0,{prevFile:Re,nextFile:Le}=N(()=>{if(!f||f.length===0)return{prevFile:null,nextFile:null};let g=f.findIndex((de)=>de.id===r||de.id===b);if(g===-1)return{prevFile:null,nextFile:null};return{prevFile:g>0?f[g-1]:null,nextFile:g<f.length-1?f[g+1]:null}},[f,r,b]),e=x.length>0?x[0]?.name:F?.name,w=R?.find((g)=>g.id===b)?.version??(R&&R.length>0?R.length:void 0),ne=N(()=>({originalKey:d.media?.original?.key,videoTranscodes:d.media?.videoTranscodes?.map((g)=>({key:g.key,width:g.width,height:g.height,resolution:g.resolution,hdr:g.hdr}))}),[d.media]),xe=()=>{ke([]),Y(null)},ye=(g)=>{Y(g.id||null);let de=g.annotations;if(de&&de.length>0)ke(de);else ke([]);if(g.second!==null&&g.second!==void 0)a.current?.seekTo(g.second),a.current?.pause();else if(de&&de.length>0)a.current?.pause()},ie=async(g)=>{if(g?.preventDefault(),!Te.trim()||!_)return;try{Se(!0),await _(Te.trim()),Me(!1)}finally{Se(!1)}},Be=async()=>{if(!i)return;try{W(!0),await i(),z(!1)}finally{W(!1)}};return h(()=>{G(0),Y(null),ke([])},[d?.id]),o("div",{className:"flex h-[100dvh] w-full flex-col bg-background overflow-hidden relative",children:[t(Ye,{fileName:d.name,folderName:e,version:w,versions:R,activeFileId:b,isPublic:c,shareId:k,allowDownload:H,downloadInfo:ne,canEdit:oe,onBack:U,hasPrevFile:!!Re,hasNextFile:!!Le,onPrevFile:()=>Re&&V(Re.id),onNextFile:()=>Le&&V(Le.id),onSelectVersion:se,onRename:()=>{J(d.name),Me(!0)},onDelete:()=>z(!0),onLinkedTasks:!c?()=>Ee(!0):void 0,linkedTaskCount:He}),t("div",{className:"relative flex-1 min-h-0 bg-background overflow-hidden flex flex-col",children:t(rs,{file:d,mediaControllerRef:a,onPlay:xe,onTimeUpdate:G,annotations:te,startTime:v,shareId:k,allowDownload:H})}),t(Ge,{teamId:s,projectId:m,file:d,onSaveField:X,members:me,onCommentSelect:ye,hideAnnotationControl:d.proxyType==="audio",readOnly:c||!oe,publicFields:ee,isPublic:c,shareId:k,currentTime:ze,onTyping:()=>a.current?.pause(),selectedCommentId:Ve,heightPercent:j,onHeightPercentChange:Ce}),!c&&re&&t(ef,{teamId:s,assetId:b,assetName:d.name,isOpen:re,onClose:()=>Ee(!1)}),!c&&t(ue,{open:je,onOpenChange:Me,children:t(ae,{children:o("form",{onSubmit:ie,children:[t(fe,{children:t(le,{children:Fo()})}),t("div",{className:"py-4",children:t(q,{ref:T,value:Te,onChange:(g)=>J(g.target.value),placeholder:gd?.()||"Enter new name",onFocus:()=>{setTimeout(()=>{if(T.current)vs(T.current)},0)},autoFocus:!0})}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:()=>Me(!1),children:De()}),o(E,{type:"submit",disabled:Ie||!Te.trim(),children:[Ie&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),xo()]})]})]})})}),!c&&t(Je,{open:Fe,onOpenChange:z,children:o(Xe,{children:[o(et,{children:[t(rt,{children:zc?.()||"Delete Asset?"}),t(nt,{children:Uc?.()||"Deleted items can be recovered for 30 days before being permanently deleted."})]}),o(tt,{children:[t(st,{children:De()}),o(ot,{onClick:Be,disabled:pe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[pe&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),at()]})]})]})})]})}S();function We({activeState:m,activeAsset:s,previewUrl:r,isFullScreen:d,onTogglePlay:F,onToggleLoop:x,onSeek:R,onVolumeChange:b,onToggleMute:v,onChangePlaybackRate:c,onChangeResolution:k,onZoomIn:H,onZoomOut:ee,onFit:f,onDownload:V,onToggleFullScreen:U,allowDownload:_=!0}){if(m?.kind==="video"&&m.video&&s){let i=m.video,X=i.totalFrames/i.frameRate,se=i.currentFrame/i.frameRate,oe={isPlaying:i.isPlaying,progress:X>0?se/X*100:0,currentTime:se,duration:X,volume:i.volume,isMuted:i.isMuted,isLooping:i.isLooping,playbackRate:i.playbackRate,isFullScreen:d,showFrames:!1,currentResolution:i.currentResolution,isCurrentHdr:i.isCurrentHdr,activeAutoResolution:i.activeAutoResolution,isHlsManualSupported:i.isHlsManualSupported,isLoading:i.isLoading},me=r&&!s.media?.videoPreview?{...s,media:{...s.media,videoPreview:{url:r}}}:s;return t(mu,{state:oe,zoom:m.zoom,isControlsVisible:!0,floatOverlayInFullScreen:!1,buffered:i.buffered,data:me,resolutions:i.resolutions,togglePlay:F,toggleLoop:x,toggleMute:v,handleVolumeChange:b,changePlaybackRate:c,changeResolution:(a)=>k(a.resolution,a.hdr),handleDownload:(a)=>V(a),toggleFullScreen:U,onZoomChange:(a)=>a>=m.zoom?H():ee(),onZoomReset:f,frameRate:i.frameRate,totalFrames:i.totalFrames,currentFrame:i.currentFrame,seekToFrame:R,allowDownload:_})}if(m?.kind==="image")return t(hu,{zoom:m.zoom,onZoomIn:H,onZoomOut:ee,onFit:f,onDownload:()=>V(),canDownload:!!s?.media?.original?.key,fullscreen:{isFullScreen:d,onToggle:U},allowDownload:_});return t("div",{className:"relative z-10 flex items-center justify-end gap-2 border-t border-border bg-card px-4 py-3",children:t("button",{onClick:U,className:"text-foreground transition-colors hover:text-primary",title:"Fullscreen",children:d?t(Mi,{className:"h-5 w-5"}):t(Ti,{className:"h-5 w-5"})})})}function Ke({side:m,fileName:s,version:r,activeVersionId:d,versions:F,isActive:x,onActivate:R,onSwitchVersion:b,onExit:v}){let c=C("flex-shrink-0 rounded p-1 transition-colors hover:bg-muted",x?"text-foreground":"text-muted-foreground hover:text-foreground"),k=t("button",{onClick:v,title:Fb(),className:c,children:t(Ne,{className:"h-4 w-4"})}),H=o("button",{onClick:R,className:C("flex min-w-0 items-center gap-1 rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-muted",x?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[t("span",{className:"truncate",children:s}),r!==void 0&&o("span",{className:C("flex-shrink-0 rounded border px-1 py-0 text-xs",x?"border-foreground/40":"border-border"),children:["v",r]})]}),ee=o(he,{children:[t(ge,{onClick:R,title:Ud(),className:c,children:t(ve,{className:"h-4 w-4"})}),t(Ae,{align:m==="left"?"start":"end",className:"w-80 p-1",children:t("div",{className:"flex max-h-96 flex-col gap-1 overflow-y-auto",children:F.map((f)=>{let V=f.id===d;return o(K,{onClick:()=>b(f.id),className:"flex cursor-pointer items-center gap-3 rounded-md px-3 py-2",children:[o("div",{className:"flex min-w-[2rem] flex-shrink-0 items-center justify-center rounded-full bg-muted px-2 py-0.5 text-xs font-semibold text-muted-foreground select-none",children:["v",f.version]}),t("div",{className:"flex h-10 w-16 flex-shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.previewUrl?t("img",{src:f.previewUrl,alt:f.name||void 0,className:"h-full w-full object-cover"}):t(tr,{className:"h-4 w-4 text-muted-foreground"})}),o("div",{className:"flex min-w-0 flex-1 flex-col text-left",children:[t("span",{className:"truncate text-sm font-semibold text-foreground",children:f.name}),t("span",{className:"truncate text-xs text-muted-foreground",children:f.creator?.name||"Unknown"})]}),V&&t(Pe,{className:"ml-auto h-4 w-4 flex-shrink-0 text-primary"})]},f.id)})})})]});return t("div",{onMouseDown:R,className:C("dark flex h-10 flex-shrink-0 items-center gap-1 border-b bg-background px-2 transition-colors",x?"border-b-2 border-primary":"border-border"),children:m==="left"?o(L,{children:[k,H,ee]}):o(L,{children:[H,ee,t("div",{className:"ml-auto"}),k]})})}function it(m,s,r){return Z({queryKey:s?["public-share-file",r,m,localStorage.getItem(`share_pwd_${r}`)||""]:["files",m],queryFn:async()=>{if(s){let F=localStorage.getItem(`share_pwd_${r}`)||"",x=await A.api.shares[":shareId"].files[":fileId"].$get({param:{shareId:r,fileId:m}},{headers:{"x-share-password":F}});if(!x.ok)throw Error("Failed to fetch version asset");return await x.json()}let d=await A.api.files[":fileId"].$get({param:{fileId:m}});if(!d.ok)throw Error("Failed to fetch version asset");return await d.json()},enabled:!!m&&(!s||!!r)})}function zl({isPublic:m=!1,shareId:s,versions:r,leftId:d,rightId:F,activeSide:x,annotations:R,seekRequest:b,onActiveSideChange:v,onSwitchVersion:c,onExit:k,onActiveAssetChange:H,onPlay:ee,onTimeUpdate:f,allowDownload:V=!0}){let U=y(null),_=y(null),i=y(null),[X,se]=u(null),[oe,me]=u(null),[a,j]=u(1),[Ce,te]=u(!1),[ke,ze]=u(!1),{data:G,isLoading:Ve}=it(d,m,s),{data:Y,isLoading:je}=it(F,m,s),Me=ts(G),Te=ts(Y),J=!!G&&!!Y&&Me.id===Te.id,T=x==="left"?G:Y,pe=x==="left"?X:oe,W=D(()=>x==="left"?_.current:i.current,[x]),Ie=D(()=>x==="left"?i.current:_.current,[x]);h(()=>{H(T??null)},[T,H]),h(()=>{if(!b)return;let n=W();if(n?.seekToSecond(b.second),n?.pause(),J){let p=Ie();p?.seekToSecond(b.second),p?.pause()}},[b?.nonce]),h(()=>{let n=()=>ze(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",n),()=>document.removeEventListener("fullscreenchange",n)},[]);let Se=D((n)=>se(n),[]),Fe=D((n)=>me(n),[]),z=D((n)=>{let p=W();if(p)n(p);if(J){let P=Ie();if(P)n(P)}},[W,Ie,J]),re=D(()=>{let n=!pe?.video?.isPlaying;z((p)=>n?p.play():p.pause())},[pe?.video?.isPlaying,z]);h(()=>{let n=(p)=>{let P=document.activeElement;if(P&&(P.tagName==="INPUT"||P.tagName==="TEXTAREA"||P instanceof HTMLElement&&P.isContentEditable))return;let Ue=p.key===" ",Oe=P&&(P.tagName==="BUTTON"||P.tagName==="A"||P.tagName==="SELECT"||P.tagName==="OPTION"||P.getAttribute("role")==="button"||P.getAttribute("role")==="link"||P.getAttribute("role")==="checkbox"||P.getAttribute("role")==="radio"||P.getAttribute("role")==="menuitem");if(Ue&&Oe)return;if(p.key===" "||p.key.toLowerCase()==="k")p.preventDefault(),re()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[re]);let Ee=D((n)=>z((p)=>p.seekToFrame(n)),[z]),_e=D(()=>W()?.toggleLoop(),[W]),He=D((n)=>{j(n),te(n===0)},[]),Re=D(()=>te((n)=>!n),[]),Le=D((n)=>z((p)=>p.setPlaybackRate(n)),[z]),e=D((n,p)=>W()?.changeResolution(n,p),[W]),l=D(()=>z((n)=>n.zoomBy(1.2)),[z]),w=D(()=>z((n)=>n.zoomBy(0.8)),[z]),ne=D(()=>z((n)=>n.fit()),[z]),xe=D((n)=>{W()?.download(n)},[W]),ye=D(()=>{let n=U.current;if(!n||typeof n.requestFullscreen!=="function")return;if(!document.fullscreenElement)n.requestFullscreen().catch(()=>{});else if(document.exitFullscreen)document.exitFullscreen().catch(()=>{})},[]),ie=D((n,p)=>{if(J)i.current?.panBy(n,p)},[J]),Be=D((n,p)=>{if(J)_.current?.panBy(n,p)},[J]),g=D(()=>re(),[re]),de=D((n)=>r.find((p)=>p.id===n)?.version,[r]),lt=N(()=>T?.media?.videoPreview?.url,[T?.media?.videoPreview?.url]),Ze=(n,p)=>{let Ue=ts(p)?.comparePane;if(!Ue)return t("div",{className:"flex flex-1 items-center justify-center bg-gray-100 dark:bg-gray-950",children:t("p",{className:"text-muted-foreground",children:"Preview unavailable"})});let Oe=x===n;return t(Ue,{ref:n==="left"?_:i,file:p,shareId:s,isActive:Oe,annotations:Oe?R:[],onStateChange:n==="left"?Se:Fe,onUserPan:n==="left"?ie:Be,onActivate:()=>v(n),muted:Oe?Ce:!0,volume:a,onPlay:ee,onTimeUpdate:f,onRequestTogglePlay:g},p.id)},dt=!!G&&!!Y,mt=Ve||je;return o("div",{ref:U,className:"flex h-full flex-1 flex-col bg-background",children:[o("div",{className:"flex min-h-0 flex-1",children:[o("div",{className:"flex min-w-0 flex-1 flex-col border-r border-zinc-800",children:[G&&t(Ke,{side:"left",fileName:G.name,version:de(d),activeVersionId:d,versions:r,isActive:x==="left",onActivate:()=>v("left"),onSwitchVersion:(n)=>c("left",n),onExit:k}),t("div",{className:"relative flex min-h-0 flex-1",children:G?Ze("left",G):t("div",{className:"flex flex-1 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-foreground"})})})]}),o("div",{className:"flex min-w-0 flex-1 flex-col",children:[Y&&t(Ke,{side:"right",fileName:Y.name,version:de(F),activeVersionId:F,versions:r,isActive:x==="right",onActivate:()=>v("right"),onSwitchVersion:(n)=>c("right",n),onExit:k}),t("div",{className:"relative flex min-h-0 flex-1",children:Y?Ze("right",Y):t("div",{className:"flex flex-1 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-foreground"})})})]})]}),mt&&!dt&&t("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/30",children:t(O,{className:"h-8 w-8 animate-spin text-foreground"})}),t(We,{activeState:pe,activeAsset:T??null,previewUrl:lt,isFullScreen:ke,onTogglePlay:re,onToggleLoop:_e,onSeek:Ee,onVolumeChange:He,onToggleMute:Re,onChangePlaybackRate:Le,onChangeResolution:e,onZoomIn:l,onZoomOut:w,onFit:ne,onDownload:xe,onToggleFullScreen:ye,allowDownload:V})]})}
|
|
2
|
-
export{Ul,zl};
|
package/bin/chunk-dckdnqc0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u,S,L,t,o,O,ve,we,E,sn,an,ln,cn,Ce,Ie,Te,he,ge,Ae,Nc,_i,WA,YA,n0,o0,s0,Pm,De,Us,Sh,Wb,ev,nv,Lv,mw,hw,hx,gx,$c,hE,Ap,_E,Ml,AC,_C,js,SI,jd,zp,Je,Xe,et,tt,rt,nt,ot,st,ue,ae,fe,le,q,M}from"./chunk-dx0wz749.js";import{co}from"./chunk-80qz30dc.js";import{Nr}from"./chunk-r5rpdhed.js";S();function Vl({open:P,onOpenChange:G,title:F,members:_,isOwner:i,onInvite:g,onUpdateRole:D,onRemoveMember:y,currentUserId:V,availableMembersToAdd:C,onAddMember:c,type:n="team"}){let[x,b]=u("editor"),[m,A]=u(null),[T,j]=u(!1),[f,p]=u(null),[l,w]=u(null),[R,I]=u({}),[s,d]=u(null),v=(e)=>{if(!e)return"";switch(e.toLowerCase()){case"owner":return $c();case"editor":return Us();case"reviewer":return js();default:return e}},k=(e,a)=>{I((r)=>({...r,[e]:a}))},H=async(e,a)=>{if(!D)return;p(e);try{await D(e,a),M.success(gx())}catch(r){console.error(r),M.error(nv())}finally{p(null)}},U=async()=>{if(!y||!l?.id)return;p(l.id);try{await y(l.id),M.success(hx()),w(null)}catch(e){console.error(e),M.error(ev())}finally{p(null)}},J=async()=>{if(!g)return;j(!0);try{let e=await g(x),a=`${window.location.origin}/signup?inviteCode=${e}`;A(a)}catch(e){console.error(e),M.error(Wb())}finally{j(!1)}},K=async()=>{if(m){if(await co(m))M.success(mw())}},h=(e)=>{if(!e)return"??";return e.split(" ").map((a)=>a[0]).slice(0,2).join("").toUpperCase()},Q=(e)=>{if(!e)A(null),b("editor"),I({}),d(null);G(e)},N=Array.isArray(_)?_:[],W=Array.isArray(C)?C:[],X=n==="project"&&i?N.filter((e)=>e.role==="owner"||e.scope==="project"||e.hasCustomRole):N,z=n==="project"&&i?N.filter((e)=>e.scope==="team"&&e.role!=="owner"&&!e.hasCustomRole):[],B=n==="project"&&i?W.filter((e)=>e.scope==="project"):[];return t(ue,{open:P,onOpenChange:Q,children:o(ae,{className:"sm:max-w-xl",onOpenAutoFocus:(e)=>e.preventDefault(),children:[t(fe,{children:t(le,{children:F})}),o("div",{className:"space-y-4",children:[t("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:X.map((e)=>{let a=n==="team"&&e.scope==="project";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),o("div",{className:"flex items-center gap-2",children:[!a&&t("span",{className:"text-xs text-muted-foreground capitalize",children:v(e.role)}),e.scope&&o(L,{children:[!a&&t("span",{className:"text-[10px] text-muted-foreground/70",children:"•"}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]})]})]}),i&&e.role!=="owner"&&e.id!==V&&o("div",{className:"flex items-center gap-2",children:[a?t(sn,{children:o(an,{children:[t(ln,{asChild:!0,children:t("span",{children:t(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26 justify-between",disabled:!0,children:t(ve,{className:"ml-auto h-3 w-3 opacity-50"})})})}),t(cn,{side:"top",children:t("p",{className:"text-xs",children:_E()})})]})}):o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:f===e.id,children:[v(e.role),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:e.role,onValueChange:(r)=>H(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>w(e),disabled:f===e.id,children:f===e.id?t(O,{className:"h-3 w-3 animate-spin"}):t(we,{className:"h-3 w-3"})})]})]},e.id)})}),t(Je,{open:!!l,onOpenChange:(e)=>!e&&w(null),children:o(Xe,{children:[o(et,{children:[t(rt,{children:AC()}),t(nt,{children:_C({name:l?.name||"",type:n==="project"?hE():jd()})})]}),o(tt,{children:[t(st,{children:De()}),t(ot,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ml()})]})]})})," ",i&&c&&z.length>0&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-1",children:n0()}),t("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:o0()}),t("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:z.map((e)=>{let a=R[e.id]||"editor";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]}),o("div",{className:"flex items-center gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:s===e.id,children:[v(a),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:a,onValueChange:(r)=>k(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{onClick:async()=>{d(e.id);try{await c(e.id,a),M.success(Pm({name:e.name||""}))}catch(r){console.error(r),M.error(Sh({name:e.name||""}))}finally{d(null)}},disabled:s!==null,size:"sm",className:"h-8 text-xs px-3",children:s===e.id?t(O,{className:"h-3 w-3 animate-spin"}):SI()})]})]},e.id)})})]}),i&&c&&B.length>0&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-1",children:WA()}),t("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:YA()}),t("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:B.map((e)=>{let a=R[e.id]||"editor";return o("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[o("div",{className:"flex items-center gap-3",children:[o(Ce,{children:[e.image&&t(Ie,{src:e.image,alt:e.name,className:"object-cover"}),t(Te,{children:h(e.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium",children:e.name}),t("span",{className:"text-xs text-muted-foreground capitalize",children:e.scope==="team"?zp():Ap()})]})]}),o("div",{className:"flex items-center gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:s===e.id,children:[v(a),t(ve,{className:"ml-1 h-3 w-3 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:a,onValueChange:(r)=>k(e.id,r),children:[t(_i,{value:"editor",className:"text-xs",children:Us()}),t(_i,{value:"reviewer",className:"text-xs",children:js()})]})})]}),t(E,{onClick:async()=>{d(e.id);try{await c(e.id,a),M.success(Pm({name:e.name||""}))}catch(r){console.error(r),M.error(Sh({name:e.name||""}))}finally{d(null)}},disabled:s!==null,size:"sm",className:"h-8 text-xs px-3",children:s===e.id?t(O,{className:"h-3 w-3 animate-spin"}):s0()})]})]},e.id)})})]}),i&&g&&o("div",{className:"border-t pt-4",children:[t("h4",{className:"text-sm font-medium mb-3",children:hw()}),o("div",{className:"space-y-3",children:[o("div",{className:"flex gap-2",children:[o(he,{children:[t(ge,{asChild:!0,children:o(E,{variant:"outline",className:"w-[120px] justify-between",children:[x==="editor"?Us():js(),t(ve,{className:"h-4 w-4 opacity-50"})]})}),t(Ae,{children:o(Nc,{value:x,onValueChange:(e)=>b(e),children:[t(_i,{value:"editor",children:Us()}),t(_i,{value:"reviewer",children:js()})]})})]}),o(E,{onClick:J,disabled:T,className:"flex-1",children:[T&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),Lv()]})]}),m&&o("div",{className:"flex gap-2",children:[t(q,{value:m,readOnly:!0}),t(E,{variant:"outline",size:"icon",onClick:K,children:t(Nr,{className:"h-4 w-4"})})]})]})]})]})]})})}
|
|
2
|
-
export{Vl};
|