@shumai-one/shumai 0.5.3 → 0.6.1
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-hsx4pns6.js → chunk-0502p2k7.js} +1 -1
- package/bin/chunk-0b0t6y8h.js +11 -0
- package/bin/{chunk-rh8dy99a.js → chunk-0tvnfy4k.js} +2 -2
- package/bin/{chunk-fpjvr3qw.js → chunk-16n160h1.js} +1 -1
- package/bin/{chunk-wbmqbpgm.js → chunk-1eqw2dpx.js} +2 -2
- package/bin/chunk-1vt9ss7d.js +2 -0
- package/bin/chunk-2cpsfc87.js +1 -0
- package/bin/{chunk-nmd1901j.js → chunk-2w0d9veg.js} +1 -1
- package/bin/{chunk-zzbn0b6c.js → chunk-2xp9prpq.js} +1 -1
- package/bin/chunk-3gqs15zq.js +2 -0
- package/bin/{chunk-929abwgr.js → chunk-3j82q2gj.js} +1 -1
- package/bin/{chunk-5bpvwv66.js → chunk-3me1v3z5.js} +2 -2
- package/bin/chunk-3pw7z25v.js +3 -0
- package/bin/{chunk-vsnq4381.js → chunk-3tx9v8kj.js} +1 -1
- package/bin/chunk-3wdtp4ht.js +1 -0
- package/bin/chunk-57axjy7y.js +1 -0
- package/bin/{chunk-6pwf7qa6.js → chunk-5aqthcm6.js} +2 -2
- package/bin/{chunk-scvepfv8.js → chunk-5gq4q1bb.js} +1 -1
- package/bin/{chunk-zq5j9wsc.js → chunk-5r1br11d.js} +1 -1
- package/bin/chunk-61hrdg0g.js +1 -0
- package/bin/chunk-6aa4xmnw.js +2 -0
- package/bin/{chunk-y5h5d5gx.js → chunk-6mrgtn78.js} +7 -7
- package/bin/chunk-6s55r0z9.js +1 -0
- package/bin/chunk-6vkfzzvt.js +5 -0
- package/bin/chunk-7dprpnm6.js +2 -0
- package/bin/chunk-7rycq6wb.js +129 -0
- package/bin/{chunk-26am2rzm.js → chunk-895gzdtp.js} +2 -2
- package/bin/chunk-8d1p8qpv.js +1 -0
- package/bin/chunk-8qdtvfx3.css +1 -0
- package/bin/chunk-8r3k84dh.js +2 -0
- package/bin/{chunk-24da4wg9.js → chunk-99sarrvt.js} +1 -1
- package/bin/{chunk-5y3kx4kk.js → chunk-9s0k533c.js} +1 -1
- package/bin/{chunk-b6dbqs39.js → chunk-acmr8v0d.js} +1 -1
- package/bin/{chunk-tqdde9bj.js → chunk-agcnbjxk.js} +1 -1
- package/bin/{chunk-y6xyc4wp.js → chunk-ahgq10a7.js} +2 -2
- package/bin/{chunk-b3tkvdfk.js → chunk-am6dg0a5.js} +2 -2
- package/bin/chunk-b21z62fj.js +1 -0
- package/bin/{chunk-zsg61vr0.js → chunk-b7qs7hxg.js} +2 -2
- package/bin/{chunk-8ts3xkme.js → chunk-b9d8xdhb.js} +1 -1
- package/bin/{chunk-rq2h2bwt.js → chunk-bg6waaf9.js} +2 -2
- package/bin/{chunk-sbyyn9yw.js → chunk-bs6saf4d.js} +2 -2
- package/bin/{chunk-b88tdt79.js → chunk-bv589v2m.js} +2 -2
- package/bin/{chunk-qjdvs1s5.js → chunk-c60j1b4w.js} +1 -1
- package/bin/{chunk-q7t5zs7n.js → chunk-c6f8x05m.js} +2 -2
- package/bin/chunk-c8kjpmfe.js +2 -0
- package/bin/chunk-c9xyejnk.js +2 -0
- package/bin/{chunk-srv5kvm4.js → chunk-cb9peqy5.js} +1 -1
- package/bin/chunk-ckczqmrz.js +5 -0
- package/bin/chunk-cr33cs6j.js +2 -0
- package/bin/chunk-cxet91kt.js +2 -0
- package/bin/{chunk-hy5ncvpf.js → chunk-d18v5vmp.js} +2 -2
- package/bin/{chunk-xdrpahym.js → chunk-d4hk62q2.js} +4 -4
- package/bin/{chunk-j420aqk8.js → chunk-d7e351jd.js} +3 -3
- package/bin/{chunk-ppb4aj0y.js → chunk-dfecgpce.js} +12 -12
- package/bin/chunk-ebcfbn00.js +2 -0
- package/bin/chunk-f0b4a9y3.js +2 -0
- package/bin/{chunk-2pt9h882.js → chunk-fkn6f4qt.js} +3 -3
- package/bin/chunk-fre31bhw.js +2 -0
- package/bin/{chunk-fxg81vtx.js → chunk-fxtzy5f5.js} +2 -2
- package/bin/{chunk-k3ds96cb.js → chunk-g78vapcm.js} +2 -2
- package/bin/{chunk-q4qqmes7.js → chunk-gdpfwxea.js} +2 -2
- package/bin/chunk-gwqqq0b1.js +32 -0
- package/bin/chunk-h3cwf9aw.js +2 -0
- package/bin/{chunk-cvfznrnt.js → chunk-h4ty530v.js} +5 -5
- package/bin/{chunk-p7zw53ep.js → chunk-h58yfx7w.js} +1 -1
- package/bin/chunk-h6f2gyt5.js +3 -0
- package/bin/chunk-h9ngpxyd.js +1 -0
- package/bin/chunk-hbr17jvr.js +13 -0
- package/bin/{chunk-4bc3gqmn.js → chunk-hc0xbmtt.js} +2 -2
- package/bin/{chunk-68xsb3t8.js → chunk-ht5rht98.js} +2 -2
- package/bin/{chunk-hn2g40r6.js → chunk-hzv1mhr5.js} +1 -1
- package/bin/{chunk-909h3qzp.js → chunk-j9t7tvt5.js} +2 -2
- package/bin/{chunk-m41tbrvt.js → chunk-jb8vbeb0.js} +2 -2
- package/bin/{chunk-wperd2h9.js → chunk-jq3pq545.js} +2 -2
- package/bin/{chunk-9ca8a5f2.js → chunk-jvt8q0eg.js} +1 -1
- package/bin/chunk-jzgtthsj.js +3 -0
- package/bin/chunk-jzjhg7ng.js +1 -0
- package/bin/{chunk-gvcjqcjf.js → chunk-k547syp2.js} +1 -1
- package/bin/chunk-k7sjpke6.js +2 -0
- package/bin/chunk-k8ct1qgv.js +3 -0
- package/bin/chunk-k9q4nn8b.js +11 -0
- package/bin/{chunk-s9sf37dv.js → chunk-keetdtxb.js} +2 -2
- package/bin/chunk-kjjw8mbg.js +1 -0
- package/bin/{chunk-pwq6dbb5.js → chunk-kywdke0y.js} +5 -5
- package/bin/chunk-mey80kv9.js +54 -0
- package/bin/chunk-n412a1hp.js +20 -0
- package/bin/chunk-nfncawpm.js +12 -0
- package/bin/chunk-nvwt8atc.js +1 -0
- package/bin/chunk-p1d500sf.js +211 -0
- package/bin/{chunk-9fyb95r5.js → chunk-p1ed0pa6.js} +1 -1
- package/bin/chunk-q0vs124k.js +2 -0
- package/bin/{chunk-fsr83nb1.js → chunk-q5795f3s.js} +1 -1
- package/bin/{chunk-b5r0be06.js → chunk-q5j3b0h5.js} +2 -2
- package/bin/chunk-qd7pvaxb.js +2 -0
- package/bin/{chunk-s0vfj06y.js → chunk-qhpt7170.js} +1 -1
- package/bin/{chunk-40tmh04g.js → chunk-qqj2m1b1.js} +2 -2
- package/bin/chunk-qt78vs3g.js +2 -0
- package/bin/{chunk-fnkkwna8.js → chunk-r5g84kj4.js} +3 -3
- package/bin/{chunk-59ayg5am.js → chunk-r9gp9yqw.js} +1 -1
- package/bin/chunk-ra6mdjr0.js +1 -0
- package/bin/{chunk-jt6v15wx.js → chunk-ryfvaz6v.js} +2 -2
- package/bin/{chunk-xbw7ffrz.js → chunk-s01p4w8d.js} +2 -2
- package/bin/{chunk-qcpeefhr.js → chunk-s22eapcc.js} +1 -1
- package/bin/chunk-sbg86tch.js +2 -0
- package/bin/chunk-sbqy6m8t.js +1 -0
- package/bin/{chunk-ncv8v6mj.js → chunk-sd6w0z6a.js} +2 -2
- package/bin/chunk-sdp9w627.js +14 -0
- package/bin/chunk-sn0nypvd.js +42 -0
- package/bin/chunk-sv92vkyh.js +2 -0
- package/bin/{chunk-mzme3m82.js → chunk-swz6v48q.js} +1 -1
- package/bin/{chunk-a8bymrv1.js → chunk-t6cn018t.js} +2 -2
- package/bin/{chunk-4nkwe7dz.js → chunk-ts4d1mxf.js} +2 -2
- package/bin/{chunk-cdk8vqeg.js → chunk-w4ydfy9d.js} +2 -2
- package/bin/chunk-wkdkc12e.js +4 -0
- package/bin/chunk-wsprap60.js +3 -0
- package/bin/chunk-xgnvktq6.js +10 -0
- package/bin/{chunk-2rrcdhkj.js → chunk-xjw3mpvx.js} +1 -1
- package/bin/{chunk-qqapw198.js → chunk-xsfy8hz3.js} +1 -1
- package/bin/chunk-xznq2axj.js +1 -0
- package/bin/chunk-y4v08wq7.js +1 -0
- package/bin/chunk-yncvy335.js +3 -0
- package/bin/chunk-ytzddcj2.js +1 -0
- package/bin/{chunk-03zkxckm.js → chunk-zxqasmvz.js} +1 -1
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +466 -458
- package/package.json +8 -11
- package/bin/chunk-04nqnkzs.js +0 -4
- package/bin/chunk-157axqz1.js +0 -1
- package/bin/chunk-1tesbv8w.js +0 -2
- package/bin/chunk-24nx3krz.js +0 -2
- package/bin/chunk-2w2bknn2.js +0 -10
- package/bin/chunk-3ahax79y.js +0 -11
- package/bin/chunk-3fjgf7eb.js +0 -3
- package/bin/chunk-3wcvema0.js +0 -32
- package/bin/chunk-45p7d22e.js +0 -2
- package/bin/chunk-461gcgrs.js +0 -2
- package/bin/chunk-5ebb2pdf.js +0 -5
- package/bin/chunk-6hs63sva.js +0 -42
- package/bin/chunk-6sq6dfa1.js +0 -3
- package/bin/chunk-87secbzy.js +0 -1
- package/bin/chunk-8pykp70z.js +0 -1
- package/bin/chunk-axeq2pq5.js +0 -2
- package/bin/chunk-bcyvxp1c.js +0 -12
- package/bin/chunk-bn0taqr3.js +0 -3
- package/bin/chunk-cb37q6t0.js +0 -1
- package/bin/chunk-cfqny70c.js +0 -3
- package/bin/chunk-cqnected.js +0 -2
- package/bin/chunk-d1q1tn36.js +0 -1
- package/bin/chunk-d1rjpbgv.js +0 -2
- package/bin/chunk-eshwjf91.js +0 -2
- package/bin/chunk-fa9yq17g.js +0 -129
- package/bin/chunk-fznchvm7.js +0 -1
- package/bin/chunk-g2z0c39g.js +0 -1
- package/bin/chunk-gnt9gewm.js +0 -2
- package/bin/chunk-hbnpx0a5.js +0 -1
- package/bin/chunk-hgy9rqt1.js +0 -1
- package/bin/chunk-hk659cg2.css +0 -1
- package/bin/chunk-k97axrc4.js +0 -13
- package/bin/chunk-m9f21ye9.js +0 -1
- package/bin/chunk-md7pgk86.js +0 -2
- package/bin/chunk-me3zmpj5.js +0 -14
- package/bin/chunk-mg6sybt0.js +0 -1
- package/bin/chunk-n08h1jgx.js +0 -2
- package/bin/chunk-np39aknv.js +0 -2
- package/bin/chunk-q1gfypy3.js +0 -2
- package/bin/chunk-qx553512.js +0 -211
- package/bin/chunk-r3s1x5wp.js +0 -1
- package/bin/chunk-s6g2mzpn.js +0 -2
- package/bin/chunk-sjbvt3wa.js +0 -2
- package/bin/chunk-srmx5z3v.js +0 -3
- package/bin/chunk-t1h12r3q.js +0 -54
- package/bin/chunk-t6myw0jf.js +0 -2
- package/bin/chunk-t8jfp3vx.js +0 -1
- package/bin/chunk-v5hz09a1.js +0 -3
- package/bin/chunk-vk9ecq8n.js +0 -2
- package/bin/chunk-w4adkd0a.js +0 -20
- package/bin/chunk-xfmnfcv2.js +0 -5
- package/bin/chunk-xhngtwn9.js +0 -1
- package/bin/chunk-xjnehexk.js +0 -2
- package/bin/chunk-xzb0t8mx.js +0 -1
- package/bin/chunk-zpk87b33.js +0 -11
- package/bin/chunk-zts21ft7.js +0 -1
package/bin/chunk-cqnected.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{lt,F,P,pt,D,_,S,t,C,ps,gt,Y,Lt,se,$n,yi,vl,wl}from"./chunk-qx553512.js";S();S();var M=Object.defineProperty,k=(s,e)=>M(s,"name",{value:e,configurable:!0}),A="Toggle",T=F(k(function(e,o){let{pressed:r,defaultPressed:n,onPressedChange:a,...g}=e,[l,i]=Lt({prop:r,onChange:a,defaultProp:n??!1,caller:A});return t(se.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...g,ref:o,onClick:Y(e.onClick,()=>{if(!e.disabled)i(!l)})})},"Toggle"));S();var E=Object.defineProperty,p=(s,e)=>E(s,"name",{value:e,configurable:!0}),m="ToggleGroup",[R,ie]=gt(m,[yi]),h=yi(),N=F(p(function(e,o){let{type:r,...n}=e;if(r==="single")return t(O,{role:"radiogroup",...n,ref:o});if(r==="multiple")return t(j,{role:"toolbar",...n,ref:o});throw Error(`Missing prop \`type\` expected on \`${m}\``)},"ToggleGroup")),[x,I]=R(m),O=F(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Lt({prop:r,defaultProp:n??"",onChange:a,caller:m});return t(x,{scope:e.__scopeToggleGroup,type:"single",value:D(()=>l?[l]:[],[l]),onItemActivate:i,onItemDeactivate:P(()=>i(""),[i]),children:t(V,{...g,ref:o})})},"ToggleGroupImplSingle")),j=F(p(function(e,o){let{value:r,defaultValue:n,onValueChange:a=p(()=>{},"onValueChange"),...g}=e,[l,i]=Lt({prop:r,defaultProp:n??[],onChange:a,caller:m}),u=P((c)=>i((d=[])=>[...d,c]),[i]),f=P((c)=>i((d=[])=>d.filter((z)=>z!==c)),[i]);return t(x,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:f,children:t(V,{...g,ref:o})})},"ToggleGroupImplMultiple")),[B,H]=R(m),V=F(p(function(e,o){let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:g,dir:l,loop:i=!0,...u}=e,f=h(r),c=$n(l),d={dir:c,...u};return t(B,{scope:r,rovingFocus:a,disabled:n,children:a?t(vl,{asChild:!0,...f,orientation:g,dir:c,loop:i,children:t(se.div,{...d,ref:o})}):t(se.div,{...d,ref:o})})},"ToggleGroupImpl")),v="ToggleGroupItem",L=F(p(function(e,o){let r=I(v,e.__scopeToggleGroup),n=H(v,e.__scopeToggleGroup),a=h(e.__scopeToggleGroup),g=r.value.includes(e.value),l=n.disabled||e.disabled,i={...e,pressed:g,disabled:l},u=_(null);return n.rovingFocus?t(wl,{asChild:!0,...a,focusable:!l,active:g,ref:u,children:t(b,{...i,ref:o})}):t(b,{...i,ref:o})},"ToggleGroupItem")),b=F(p(function(e,o){let{__scopeToggleGroup:r,value:n,...a}=e,g=I(v,r),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=g.type==="single"?l:void 0;return t(T,{...i,...a,ref:o,onPressedChange:(u)=>{if(u)g.onItemActivate(n);else g.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var y=ps("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var w=lt({size:"default",variant:"default",spacing:0});function Ro({className:s,variant:e,size:o,spacing:r=0,children:n,...a}){return t(N,{"data-slot":"toggle-group","data-variant":e,"data-size":o,"data-spacing":r,style:{"--gap":r},className:C("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",s),...a,children:t(w.Provider,{value:{variant:e,size:o,spacing:r},children:n})})}function yr({className:s,children:e,variant:o,size:r,...n}){let a=pt(w);return t(L,{"data-slot":"toggle-group-item","data-variant":a.variant||o,"data-size":a.size||r,"data-spacing":a.spacing,className:C(y({variant:a.variant||o,size:a.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",s),...n,children:e})}
|
|
2
|
-
export{Ro,yr};
|
package/bin/chunk-d1q1tn36.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F,P,m,D,_,u,Xn,S,L,t,o,V,Hu,$u,br,Dc,Yi,wo,Ht,Yo,Gu,Vu,Qu,Ku,Oc,Wu,Z,B,mt,ze,A,I,ir,O,Tt,ve,er,Ut,Jo,Ne,C,gt,ye,Y,Pt,Er,Lt,se,cr,E,Ce,Ie,Te,qA,HA,V0,W0,Y0,Rf,b_,sh,De,na,uh,Ty,qc,mh,Hs,Xo,kh,Rh,Rv,Pv,$h,Nw,Nx,Dx,pS,dp,fp,IS,BS,bg,Kc,NE,Ug,XE,tC,vp,nC,iC,jg,lC,cC,qg,uC,fC,Ld,Zd,Bd,Nl,Ip,bC,vC,wC,xC,Ud,Gs,qC,oI,aI,wI,NI,OI,FI,LI,ZI,uA,BI,$d,FT,UT,t1,xA,An,Qp,O1,F1,tu,Xe,et,tt,rt,nt,ot,st,it,z,Nt,M,Bl,kn,em,me,At,_t,yt,wr,af,Ke,vt,wt,kt,at}from"./chunk-qx553512.js";import{Ro,yr}from"./chunk-cqnected.js";import{Yl}from"./chunk-2pt9h882.js";import{Ys,zo,tc,Xa,Oi,rc}from"./chunk-eshwjf91.js";import{Pn,Nn,Dn,xr,It,xt}from"./chunk-k3ds96cb.js";import"./chunk-tqdde9bj.js";import"./chunk-03zkxckm.js";import{Kn,co}from"./chunk-4nkwe7dz.js";S();function te(a,e){let s=new Set(e);return a.filter((i)=>!s.has(i))}var ae=class extends wo{#r;#e;#o;#a;#t;#s;#i;#n;#l;#d=[];constructor(a,e,s){super();this.#r=a,this.#a=s,this.#o=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){if(this.listeners.size===1)this.#t.forEach((a)=>{a.subscribe((e)=>{this.#p(a,e)})})}onUnsubscribe(){if(!this.listeners.size)this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach((a)=>{a.destroy()})}setQueries(a,e){this.#o=a,this.#a=e,Ht.batch(()=>{let s=this.#t,i=this.#u(this.#o);i.forEach((p)=>p.observer.setOptions(p.defaultedQueryOptions));let c=i.map((p)=>p.observer),r=c.map((p)=>p.getCurrentResult()),f=s.length!==c.length,g=c.some((p,x)=>p!==s[x]),b=f||g,v=b?!0:r.some((p,x)=>{let N=this.#e[x];return!N||!Yi(p,N)});if(!b&&!v)return;if(b)this.#d=i,this.#t=c;if(this.#e=r,!this.hasListeners())return;if(b)te(s,c).forEach((p)=>{p.destroy()}),te(c,s).forEach((p)=>{p.subscribe((x)=>{this.#p(p,x)})});this.#f()})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map((a)=>a.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(a,e){let s=this.#u(a),i=s.map((r)=>r.observer.getOptimisticResult(r.defaultedQueryOptions)),c=s.map((r)=>r.defaultedQueryOptions.queryHash);return[i,(r)=>this.#c(r??i,e,c),()=>this.#m(i,s)]}#m(a,e){let s=new Set;return e.map((i,c)=>{let r=a[c];return!i.defaultedQueryOptions.notifyOnChangeProps?i.observer.trackResult(r,(f)=>{if(!s.has(f))s.add(f),e.forEach((g)=>{g.observer.trackProp(f)})}):r})}#c(a,e,s){if(e){let i=this.#l,c=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((r,f)=>r!==i[f]));if(this.#e!==this.#n||c||e!==this.#i){if(this.#i=e,this.#n=this.#e,s!==void 0)this.#l=s;this.#s=Dc(this.#s,e(a))}return this.#s}return a}#g(){return!this.#a?.combine||this.#t.some((a,e)=>a.options.suspense&&this.#e[e]?.data===void 0)}#u(a){let e=new Map;this.#t.forEach((i)=>{let c=i.options.queryHash;if(!c)return;let r=e.get(c);if(r)r.push(i);else e.set(c,[i])});let s=[];return a.forEach((i)=>{let c=this.#r.defaultQueryOptions(i),r=e.get(c.queryHash)?.shift()??new Yo(this.#r,c);s.push({defaultedQueryOptions:c,observer:r})}),s}#p(a,e){let s=this.#t.indexOf(a);if(s!==-1)this.#e=this.#e.slice(),this.#e[s]=e,this.#f()}#f(){if(this.hasListeners()){let a=this.#g(),e=this.#s,s=a?e:this.#c(this.#m(this.#e,this.#d),this.#a?.combine);if(a||e!==s)Ht.batch(()=>{this.listeners.forEach((i)=>{i(this.#e)})})}}};S();function re({queries:a,...e},s){let i=V(s),c=Hu(),r=$u(),f=e.subscribed!==!1,g=D(()=>a.map((d)=>{let h=i.defaultQueryOptions(d);return h._optimisticResults=c?"isRestoring":f?"optimistic":void 0,h}),[a,i,c,f]);g.forEach((d)=>{Ku(d);let h=i.getQueryCache().get(d.queryHash);Gu(d,r,h)}),Vu(r);let[b]=u(()=>new ae(i,g,e)),[v,p,x]=b.getOptimisticResult(g,e.combine),N=!c&&f;Xn(P((d)=>N?b.subscribe(Ht.batchCalls(d)):br,[b,N]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),m(()=>{b.setQueries(g,e)},[g,e,b]);let n=v.some((d,h)=>Oc(g[h],d))?v.flatMap((d,h)=>{let w=g[h];if(w&&Oc(w,d)){let q=new Yo(i,w);return Wu(w,q,r)}return[]}):[];if(n.length>0)throw Promise.all(n);let y=v.find((d,h)=>{let w=g[h];return w&&Qu({result:d,errorResetBoundary:r,throwOnError:w.throwOnError,query:i.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(y)throw y.error;return p(x())}S();S();var xe=Object.defineProperty,H=(a,e)=>xe(a,"name",{value:e,configurable:!0}),W="Collapsible",[we,Mt]=gt(W),[_e,X]=we(W),Re=F(H(function(e,s){let{__scopeCollapsible:i,open:c,defaultOpen:r,disabled:f,onOpenChange:g,...b}=e,[v,p]=Lt({prop:c,defaultProp:r??!1,onChange:g,caller:W});return t(_e,{scope:i,disabled:f,contentId:Er(),open:v,onOpenToggle:P(()=>p((x)=>!x),[p]),children:t(se.div,{"data-state":U(v),"data-disabled":f?"":void 0,...b,ref:s})})},"Collapsible")),ke="CollapsibleTrigger",Ae=F(H(function(e,s){let{__scopeCollapsible:i,...c}=e,r=X(ke,i);return t(se.button,{type:"button","aria-controls":r.open?r.contentId:void 0,"aria-expanded":r.open||!1,"data-state":U(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...c,ref:s,onClick:Y(e.onClick,r.onOpenToggle)})},"CollapsibleTrigger")),oe="CollapsibleContent",qe=F(H(function(e,s){let{forceMount:i,...c}=e,r=X(oe,e.__scopeCollapsible);return t(cr,{present:i||r.open,children:({present:f})=>t(Pe,{...c,ref:s,present:f})})},"CollapsibleContent")),Pe=F(H(function(e,s){let{__scopeCollapsible:i,present:c,children:r,...f}=e,g=X(oe,i),[b,v]=u(c),p=_(null),x=ye(s,p),N=_(0),n=N.current,y=_(0),d=y.current,h=g.open||b,w=_(h),q=_(void 0);return m(()=>{let R=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(R)},[]),Pt(()=>{let R=p.current;if(R){q.current=q.current||{transitionDuration:R.style.transitionDuration,animationName:R.style.animationName},R.style.transitionDuration="0s",R.style.animationName="none";let j=R.getBoundingClientRect();if(N.current=j.height,y.current=j.width,!w.current)R.style.transitionDuration=q.current.transitionDuration,R.style.animationName=q.current.animationName;v(c)}},[g.open,c]),t(se.div,{"data-state":U(g.open),"data-disabled":g.disabled?"":void 0,id:g.contentId,hidden:!h,...f,ref:x,style:{["--radix-collapsible-content-height"]:n?`${n}px`:void 0,["--radix-collapsible-content-width"]:d?`${d}px`:void 0,...e.style},children:h&&r})},"CollapsibleContentImpl"));function U(a){return a?"open":"closed"}H(U,"getState");var Se=Re;var He=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],ie=I("chart-no-axes-column",He);var Oe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],J=I("funnel",Oe);var Qe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Q=I("messages-square",Qe);function ne({teamId:a}){let[e,s]=u("team"),[i,c]=u("1h"),{data:r,isLoading:f}=Z({queryKey:["teams",a,"ai-usage",i,"team"],queryFn:async()=>{let d=await A.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:a},query:{timeframe:i}});if(!d.ok)throw Error("Failed to fetch team AI usage");return await d.json()},enabled:!!a&&e==="team"}),{data:g,isLoading:b}=Z({queryKey:["teams",a,"members"],queryFn:async()=>{let d=await A.api.teams[":teamId"].members.$get({param:{teamId:a},query:{}});if(!d.ok)throw Error("Failed to fetch team members");return await d.json()},enabled:!!a&&e==="members"}),v=re({queries:(g||[]).map((d)=>({queryKey:["teams",a,"ai-usage",i,d.id],queryFn:async()=>{let h=await A.api.teams[":teamId"]["ai-usage"].$get({param:{teamId:a},query:{timeframe:i,userId:d.id}});if(!h.ok)throw Error(`Failed to fetch AI usage for member ${d.id}`);return await h.json()},enabled:!!a&&e==="members"}))}),p=b||v.some((d)=>d.isLoading),x=(d)=>{if(!d)return"U";let h=d.split(" ");if(h.length>1)return`${h[0][0]}${h[h.length-1][0]}`.toUpperCase();return d.substring(0,2).toUpperCase()},N=(d)=>{if(!d)return"";switch(d.toLowerCase()){case"owner":return Kc();case"editor":return Hs();case"reviewer":return Gs();default:return d}},n=(d)=>(d??0).toLocaleString(),y=(d)=>`$${(d??0).toFixed(6)}`;return o(Ke,{className:"border-border/60 shadow-sm",children:[o(vt,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between pb-6",children:[o("div",{children:[t(wt,{className:"text-xl font-semibold tracking-tight",children:W0()}),t(kt,{className:"text-sm text-muted-foreground mt-1",children:Y0()})]}),o("div",{className:"flex flex-wrap items-center gap-3",children:[o(Ro,{type:"single",value:e,onValueChange:(d)=>{if(d)s(d)},className:"border rounded-lg p-1 bg-muted/30",children:[t(yr,{value:"team",className:"px-3 py-1.5 text-xs font-medium",children:UT()}),t(yr,{value:"members",className:"px-3 py-1.5 text-xs font-medium",children:Dx()})]}),o(Ro,{type:"single",value:i,onValueChange:(d)=>{if(d)c(d)},className:"border rounded-lg p-1 bg-muted/30",children:[t(yr,{value:"1h",className:"px-2.5 py-1.5 text-xs font-medium",children:"1h"}),t(yr,{value:"24h",className:"px-2.5 py-1.5 text-xs font-medium",children:"24h"}),t(yr,{value:"7d",className:"px-2.5 py-1.5 text-xs font-medium",children:"7d"}),t(yr,{value:"30d",className:"px-2.5 py-1.5 text-xs font-medium",children:"30d"})]})]})]}),t(at,{children:e==="team"?f?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t("div",{className:"rounded-md border",children:o(Pn,{children:[t(Nn,{children:o(xr,{children:[t(It,{children:$d()}),t(It,{className:"text-right",children:$h()}),t(It,{className:"text-right",children:bg()}),t(It,{className:"text-right",children:sh()}),t(It,{className:"text-right",children:xA()}),t(It,{className:"text-right",children:uh()})]})}),t(Dn,{children:o(xr,{children:[t(xt,{className:"font-medium",children:$d()}),t(xt,{className:"text-right",children:n(r?.team?.inputTokens)}),t(xt,{className:"text-right",children:n(r?.team?.outputTokens)}),t(xt,{className:"text-right",children:n(r?.team?.cacheReadTokens)}),t(xt,{className:"text-right font-medium",children:n(r?.team?.totalTokens)}),t(xt,{className:"text-right font-medium",children:y(r?.team?.cost)})]})})]})}):p?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t("div",{className:"rounded-md border",children:o(Pn,{children:[t(Nn,{children:o(xr,{children:[t(It,{children:Nx()}),t(It,{children:qC()}),t(It,{className:"text-right",children:$h()}),t(It,{className:"text-right",children:bg()}),t(It,{className:"text-right",children:sh()}),t(It,{className:"text-right",children:xA()}),t(It,{className:"text-right",children:uh()})]})}),t(Dn,{children:(g||[]).map((d,h)=>{let w=v[h]?.data?.member;return o(xr,{children:[t(xt,{children:o("div",{className:"flex items-center gap-3",children:[o(Ce,{className:"h-8 w-8 rounded-full",children:[d.image&&t(Ie,{src:d.image,alt:d.name,className:"object-cover"}),t(Te,{className:"bg-primary/20 text-xs",children:x(d.name)})]}),o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-medium leading-none",children:d.name}),t("span",{className:"text-xs text-muted-foreground mt-0.5",children:d.email})]})]})}),t(xt,{className:"text-xs text-muted-foreground",children:N(d.role)}),t(xt,{className:"text-right",children:n(w?.inputTokens)}),t(xt,{className:"text-right",children:n(w?.outputTokens)}),t(xt,{className:"text-right",children:n(w?.cacheReadTokens)}),t(xt,{className:"text-right font-medium",children:n(w?.totalTokens)}),t(xt,{className:"text-right font-medium",children:y(w?.cost)})]},d.id)})})]})})})]})}S();function le({teamId:a}){let[e,s]=u(null),{ref:i,inView:c}=Nt(),{data:r,isLoading:f,isError:g,fetchNextPage:b,hasNextPage:v,isFetchingNextPage:p}=mt({queryKey:["teams",a,"agent-sessions"],queryFn:async({pageParam:n})=>{let y=await A.api.teams[":teamId"]["agent-sessions"].$get({param:{teamId:a},query:{first:"20",after:n?String(n):void 0}});if(!y.ok)throw Error("Failed to fetch agent sessions");return await y.json()},initialPageParam:"",getNextPageParam:(n)=>n.pageInfo.cursor||void 0,enabled:!!a});m(()=>{if(c&&v&&!p)b()},[c,v,p,b]);let x=r?.pages.flatMap((n)=>n.data).filter((n)=>n.id!=="pending")||[],N=(n)=>{switch(n){case"comment":return t(me,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",children:LI()});case"chat":return t(me,{variant:"outline",className:"bg-violet-500/10 text-violet-600 dark:text-violet-400 border-violet-500/20",children:FI()});case"naming":return t(me,{variant:"outline",className:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",children:ZI()});default:return t(me,{variant:"outline",className:"bg-muted text-muted-foreground border-border",children:n})}};return o("div",{className:"space-y-6",children:[o(Ke,{className:"border border-border/50 shadow-xs",children:[t(vt,{className:"pb-4",children:t("div",{className:"flex items-center justify-between",children:o("div",{children:[o(wt,{className:"text-xl font-bold flex items-center gap-2",children:[t(Q,{className:"w-5 h-5 text-violet-500"}),uA()]}),t(kt,{className:"mt-1 text-sm text-muted-foreground",children:BI()})]})})}),t(at,{children:f?t("div",{className:"flex h-64 items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):g?t("div",{className:"flex h-64 items-center justify-center text-destructive",children:"Failed to load agent sessions."}):x.length===0?o("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[t(Q,{className:"w-10 h-10 text-muted-foreground/40 mb-3"}),t("p",{className:"text-base font-medium",children:IS()})]}):o("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[o(Pn,{children:[t(Nn,{className:"bg-muted/40",children:o(xr,{children:[t(It,{children:NI()}),t(It,{children:qc()}),t(It,{children:OI()}),t(It,{className:"text-right",children:Ty()})]})}),t(Dn,{children:x.map((n)=>o(xr,{onClick:()=>s(n.id),className:"cursor-pointer hover:bg-muted/50 transition-colors",children:[t(xt,{className:"font-medium",children:o("div",{className:"flex flex-col",children:[t("span",{className:"text-sm font-semibold text-foreground",children:n.name||Qp()}),t("span",{className:"text-xs font-mono text-muted-foreground/70",children:n.id})]})}),t(xt,{children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[t(Ie,{src:n.creator?.image||void 0}),t(Te,{className:"text-[10px]",children:n.creator?.name?.[0]?.toUpperCase()||"?"})]}),t("span",{className:"text-sm text-foreground/90",children:n.creator?.name||"System / Agent"})]})}),t(xt,{children:N(n.type)}),t(xt,{className:"text-right text-xs text-muted-foreground",children:kn(n.createdAt)})]},n.id))})]}),t("div",{ref:i,className:"py-4 flex justify-center",children:p&&t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})})]}),t(Yl,{sessionId:e,open:!!e,onOpenChange:(n)=>{if(!n)s(null)}})]})}S();function de({...a}){return t(Se,{"data-slot":"collapsible",...a})}function ce({...a}){return t(Ae,{"data-slot":"collapsible-trigger",...a})}function ue({...a}){return t(qe,{"data-slot":"collapsible-content",...a})}function ee(a){switch(a.toLowerCase()){case"owner":return Kc();case"editor":return Hs();case"reviewer":return Gs();default:return a}}function Le(a,e){if(typeof a==="object"&&a!==null&&"message"in a){let s=a.message;if(typeof s==="string")return s}return e}function Be({rule:a}){let e=a.resourceData??{};if(a.resource==="agent_mcp_call_count")return t("span",{children:vC({value:String(e.id??"")})});if(a.resource==="agent_bash_call_count")return t("span",{children:bC({value:String(e.match??"*")})});if(a.resource==="agent_tool_call_count")return t("span",{children:wC({value:String(e.name??e.toolName??"*")})});return null}function Me({rule:a}){if(a.scopeMode==="all_members")return o(me,{variant:"secondary",className:"gap-1 text-xs",children:[t(co,{className:"h-3 w-3"}),o("span",{children:[Ld(),a.role?` (${ee(a.role)})`:` (${Nl()})`]})]});if(a.scopeMode==="each_member")return o(me,{variant:"secondary",className:"gap-1 text-xs",children:[t(Kn,{className:"h-3 w-3"}),o("span",{children:[Zd(),a.role?` (${ee(a.role)})`:` (${Nl()})`]})]});return o(me,{variant:"secondary",className:"gap-1 text-xs",children:[t(Jo,{className:"h-3 w-3"}),o("span",{children:[Bd()," (",a.userIds?.length||0,")"]})]})}function Fe({teamId:a,rule:e,record:s}){let i=V(),[c,r]=u(!1),[f,g]=u(()=>new Date),b=Xa[e.resource],v=e.scopeMode==="all_members",p=s.percent>=100,x=v?e.role?`${fC()}: ${ee(e.role)}`:xC():s.user?.name||s.userId||An();m(()=>{if(!s.isWindowActive||!s.periodEnd)return;let n=window.setInterval(()=>g(new Date),60000);return()=>window.clearInterval(n)},[s.isWindowActive,s.periodEnd]);let N=B({mutationFn:async()=>{let n=await A.api.teams[":teamId"].quotas[":id"].records.reset.$post({param:{teamId:a,id:e.id},json:{userId:s.userId??null}});if(!n.ok){let y=await n.json().catch(()=>null);throw Error(Le(y,Rh()))}return await n.json()},onSuccess:()=>{i.invalidateQueries({queryKey:["teams",a,"quotas",e.id,"records"]}),i.invalidateQueries({queryKey:["teams",a,"quotas"]}),r(!1),M.success(cC())},onError:(n)=>{let y=n instanceof Error?n.message:Rh();r(!1),M.error(y)}});return o(L,{children:[o("div",{className:"space-y-3 rounded-xl border border-border/70 bg-card p-4 text-card-foreground shadow-2xs",children:[o("div",{className:"flex items-center justify-between gap-3",children:[o("div",{className:"flex min-w-0 items-center gap-3",children:[v?t("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t(co,{className:"h-5 w-5"})}):o(Ce,{className:"h-9 w-9 shrink-0 border border-border/50",children:[t(Ie,{src:s.user?.image||void 0}),t(Te,{className:"text-xs font-semibold",children:s.user?.name?.[0]?.toUpperCase()||"U"})]}),o("div",{className:"min-w-0",children:[t("div",{className:"truncate text-sm font-semibold text-foreground",children:x}),!v&&s.user?.email&&t("div",{className:"truncate text-xs text-muted-foreground",children:s.user.email})]})]}),o("div",{className:"flex shrink-0 items-center gap-2",children:[s.isWindowActive&&s.periodEnd?o(me,{variant:"outline",className:"hidden gap-1 border-primary/30 bg-primary/5 text-xs text-primary sm:flex",children:[t(er,{className:"h-3 w-3"}),t("span",{children:jg({time:em(s.periodEnd,f)})})]}):o(me,{variant:"secondary",className:"hidden gap-1 text-xs text-muted-foreground sm:flex",children:[t(ir,{className:"h-3 w-3 text-primary"}),t("span",{children:Ug()})]}),o(E,{type:"button",variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>r(!0),disabled:N.isPending,children:[N.isPending?t(O,{className:"h-3.5 w-3.5 animate-spin"}):t(Ys,{className:"h-3.5 w-3.5"}),qg()]})]})]}),o("div",{className:"space-y-1.5 pt-1",children:[t(af,{value:Math.min(100,Math.max(0,s.percent)),className:"h-2"}),o("div",{className:"flex items-center justify-between gap-2 text-xs font-medium",children:[o("span",{className:p?"font-bold text-destructive":"text-foreground",children:[Oi(e.resource,s.consumed)," /"," ",Oi(e.resource,e.limit)," ",b?.unit]}),o("span",{className:p?"font-bold text-destructive":"text-muted-foreground",children:[s.percent,"%"]})]})]}),o("div",{className:"flex items-center justify-between gap-2 text-xs text-muted-foreground sm:hidden",children:[s.isWindowActive&&s.periodEnd?o("span",{className:"flex items-center gap-1 text-primary",children:[t(er,{className:"h-3 w-3"}),jg({time:em(s.periodEnd,f)})]}):o("span",{className:"flex items-center gap-1",children:[t(ir,{className:"h-3 w-3 text-primary"}),Ug()]}),o("span",{children:[lC(),": ",Oi(e.resource,s.remaining)," ",b?.unit]})]})]}),t(Xe,{open:c,onOpenChange:r,children:o(et,{children:[o(tt,{children:[t(nt,{children:qg()}),t(ot,{children:uC({target:x})})]}),o(rt,{children:[t(it,{disabled:N.isPending,children:De()}),o(st,{onClick:(n)=>{n.preventDefault(),N.mutate()},disabled:N.isPending,children:[N.isPending&&t(O,{className:"mr-2 h-4 w-4 animate-spin"}),na()]})]})]})})]})}function je({teamId:a,rule:e}){let[s,i]=u(!1),[c,r]=u(""),f=Xa[e.resource],g=f?.icon||zo,{data:b,isLoading:v,isError:p}=Z({queryKey:["teams",a,"quotas",e.id,"records"],queryFn:async()=>{let n=await A.api.teams[":teamId"].quotas[":id"].records.$get({param:{teamId:a,id:e.id}});if(!n.ok)throw Error(kh());return await n.json()},enabled:s,refetchInterval:s?1e4:!1}),x=b?.records??[],N=x.filter((n)=>{if(!c.trim())return!0;let y=c.toLowerCase();return n.user?.name.toLowerCase().includes(y)||n.user?.email.toLowerCase().includes(y)});return o(de,{open:s,onOpenChange:i,className:"rounded-xl border border-border/70",children:[t(ce,{asChild:!0,children:o("button",{type:"button","aria-label":s?XE():nC(),className:"flex w-full items-center justify-between gap-4 p-4 text-left transition-colors hover:bg-muted/40",children:[o("div",{className:"flex min-w-0 items-start gap-3",children:[t("div",{className:"mt-0.5 rounded-lg bg-primary/10 p-2 text-primary",children:t(g,{className:"h-5 w-5"})}),o("div",{className:"min-w-0",children:[o("div",{className:"flex flex-wrap items-center gap-2",children:[t("span",{className:"font-semibold text-foreground",children:f?.label()||e.resource}),!e.enabled&&t(me,{variant:"secondary",children:vp()})]}),o("div",{className:"mt-1 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[t(Me,{rule:e}),o(me,{variant:"outline",className:"gap-1 text-xs",children:[t(er,{className:"h-3 w-3"}),Oi(e.resource,e.limit)," ",f?.unit," /"," ",rc(e.period)]}),t(Be,{rule:e})]})]})]}),t(ve,{className:`h-5 w-5 shrink-0 text-muted-foreground transition-transform ${s?"rotate-180":""}`})]})}),t(ue,{children:o("div",{className:"space-y-3 border-t border-border/60 bg-muted/10 p-4",children:[e.scopeMode!=="all_members"&&x.length>3&&o("div",{className:"relative",children:[t(Ut,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),t(z,{value:c,onChange:(n)=>r(n.target.value),placeholder:Ip(),className:"h-9 pl-9 text-sm"})]}),v?t("div",{className:"flex justify-center py-10",children:t(O,{className:"h-7 w-7 animate-spin text-primary"})}):p?t("div",{className:"py-8 text-center text-sm text-destructive",children:kh()}):N.length===0?t("div",{className:"py-8 text-center text-sm text-muted-foreground",children:iC()}):N.map((n,y)=>t(Fe,{teamId:a,rule:e,record:n},n.id||n.userId||`record-${y}`))]})})]})}function pe({teamId:a}){let{data:e,isLoading:s,isError:i}=Z({queryKey:["teams",a,"quotas"],queryFn:async()=>{let r=await A.api.teams[":teamId"].quotas.$get({param:{teamId:a}});if(!r.ok)throw Error(Xo());return await r.json()},enabled:!!a}),c=e?.rules??[];return o(Ke,{className:"border-border/60 shadow-sm",children:[o(vt,{children:[o(wt,{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[t(zo,{className:"h-5 w-5 text-primary"}),Ud()]}),t(kt,{children:tC()})]}),t(at,{children:s?t("div",{className:"flex h-48 items-center justify-center",children:t(O,{className:"h-7 w-7 animate-spin text-muted-foreground"})}):i?t("div",{className:"py-10 text-center text-sm text-destructive",children:Xo()}):c.length===0?o("div",{className:"flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-border py-12 text-center",children:[t(zo,{className:"mb-3 h-10 w-10 text-muted-foreground/50"}),t("p",{className:"text-base font-medium text-foreground",children:fp()}),t("p",{className:"mt-1 max-w-md text-sm text-muted-foreground",children:dp()})]}):t("div",{className:"space-y-3",children:c.map((r)=>t(je,{teamId:a,rule:r},r.id))})})]})}S();var Ue=Object.values(Bl);function fe({teamId:a}){let[e,s]=u([]),[i,c]=u([]),[r,f]=u(""),{ref:g,inView:b}=Nt(),{data:v}=Z({queryKey:["teams",a,"members"],queryFn:async()=>{let l=await A.api.teams[":teamId"].members.$get({param:{teamId:a},query:{}});if(!l.ok)return[];return await l.json()},enabled:!!a}),p=v||[],{data:x,isLoading:N,isError:n,fetchNextPage:y,hasNextPage:d,isFetchingNextPage:h}=mt({queryKey:["teams",a,"audit-logs",e,i,r],queryFn:async({pageParam:l})=>{let T=await A.api.teams[":teamId"]["audit-logs"].$get({param:{teamId:a},query:{first:"20",after:l?String(l):void 0,actions:e.length>0?e:void 0,userIds:i.length>0?i:void 0,itemId:r.trim()||void 0}});if(!T.ok)throw Error("Failed to fetch audit logs");return await T.json()},initialPageParam:"",getNextPageParam:(l)=>l.pageInfo.endCursor||void 0,enabled:!!a});m(()=>{if(b&&d&&!h)y()},[b,d,h,y]);let w=x?.pages.flatMap((l)=>l.nodes)||[],q=x?.pages[0]?.total??0,R=(l)=>{s((T)=>T.includes(l)?T.filter((k)=>k!==l):[...T,l])},j=(l)=>{c((T)=>T.includes(l)?T.filter((k)=>k!==l):[...T,l])},ge=(l)=>{if(l.includes("delete")||l.includes("remove")||l.includes("revoke"))return t(me,{variant:"outline",className:"bg-destructive/10 text-destructive border-destructive/20 font-mono text-xs",children:l});if(l.includes("create")||l.includes("add"))return t(me,{variant:"outline",className:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20 font-mono text-xs",children:l});if(l.includes("update")||l.includes("reparent")||l.includes("copy"))return t(me,{variant:"outline",className:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 font-mono text-xs",children:l});return t(me,{variant:"outline",className:"bg-muted text-muted-foreground border-border font-mono text-xs",children:l})},be=new Map(p.map((l)=>[l.userId||l.id,l]));return t("div",{className:"space-y-6",children:o(Ke,{className:"border border-border/50 shadow-xs",children:[o(vt,{className:"pb-4",children:[o("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[o("div",{children:[o(wt,{className:"text-xl font-bold flex items-center gap-2",children:[t(Ys,{className:"h-5 w-5 text-primary"}),Rf()]}),t(kt,{className:"mt-1",children:b_()})]}),q>0&&o(me,{variant:"secondary",className:"w-fit text-xs font-normal",children:[q," ",Rf()]})]}),o("div",{className:"mt-4 flex flex-wrap items-center gap-3 pt-4 border-t border-border/40",children:[o(At,{children:[t(_t,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[t(J,{className:"h-3.5 w-3.5"}),Rv(),e.length>0&&t(me,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:e.length})]})}),o(yt,{className:"w-64 p-2",align:"start",children:[t("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:aI()}),t("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:Ue.map((l)=>o("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[t(wr,{checked:e.includes(l),onCheckedChange:()=>R(l)}),t("span",{className:"font-mono",children:l})]},l))}),e.length>0&&t(E,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>s([]),children:"Clear Actions"})]})]}),o(At,{children:[t(_t,{asChild:!0,children:o(E,{variant:"outline",size:"sm",className:"h-9 gap-2 text-xs border-dashed",children:[t(J,{className:"h-3.5 w-3.5"}),Pv(),i.length>0&&t(me,{variant:"secondary",className:"ml-1 px-1.5 py-0 text-[10px]",children:i.length})]})}),o(yt,{className:"w-64 p-2",align:"start",children:[t("div",{className:"text-xs font-semibold text-muted-foreground px-2 py-1 mb-1",children:wI()}),t("div",{className:"max-h-60 overflow-y-auto space-y-1 pr-1",children:p.map((l)=>{let T=l.userId||l.user?.id||l.id,k=l.user?.name||l.name||T,K=l.user?.image||l.image;return o("label",{className:"flex items-center gap-2 px-2 py-1.5 hover:bg-accent rounded-md cursor-pointer text-xs",children:[t(wr,{checked:i.includes(T),onCheckedChange:()=>j(T)}),o(Ce,{className:"h-5 w-5",children:[t(Ie,{src:K||void 0}),t(Te,{className:"text-[10px]",children:k.slice(0,2).toUpperCase()})]}),t("span",{className:"truncate",children:k})]},T)})}),i.length>0&&t(E,{variant:"ghost",size:"sm",className:"w-full mt-2 h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>c([]),children:"Clear Users"})]})]}),o("div",{className:"relative flex-1 min-w-[200px] max-w-xs",children:[t(Ut,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),t(z,{type:"text",placeholder:oI(),value:r,onChange:(l)=>f(l.target.value),className:"pl-8 pr-8 h-9 text-xs"}),r&&t("button",{onClick:()=>f(""),className:"absolute right-2.5 top-2.5 text-muted-foreground hover:text-foreground",children:t(Ne,{className:"h-4 w-4"})})]}),(e.length>0||i.length>0||r)&&t(E,{variant:"ghost",size:"sm",className:"h-9 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{s([]),c([]),f("")},children:"Clear all"})]})]}),o(at,{className:"p-0",children:[N?t("div",{className:"flex h-64 items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?t("div",{className:"p-8 text-center text-sm text-destructive",children:"Failed to load audit logs."}):w.length===0?t("div",{className:"p-12 text-center text-sm text-muted-foreground",children:pS()}):o(Pn,{children:[t(Nn,{children:o(xr,{className:"hover:bg-transparent border-b border-border/50",children:[t(It,{className:"w-[180px] text-xs font-semibold",children:HA()}),t(It,{className:"w-[200px] text-xs font-semibold",children:F1()}),t(It,{className:"text-xs font-semibold",children:Nw()}),t(It,{className:"text-xs font-semibold",children:NE()}),t(It,{className:"w-[160px] text-right text-xs font-semibold",children:t1()})]})}),t(Dn,{children:w.map((l)=>{let T=l.userId?be.get(l.userId):null,k=T?.user?.name||T?.name||l.userId||"System",K=T?.user?.image||T?.image;return o(xr,{className:"hover:bg-muted/40 transition-colors",children:[t(xt,{className:"py-3 font-medium",children:ge(l.action)}),t(xt,{className:"py-3",children:o("div",{className:"flex items-center gap-2",children:[o(Ce,{className:"h-6 w-6",children:[t(Ie,{src:K||void 0}),t(Te,{className:"text-[10px]",children:k.slice(0,2).toUpperCase()})]}),t("span",{className:"text-xs font-medium text-foreground truncate max-w-[160px]",children:l.agent?tu({user:k,agent:l.agent.name}):k}),l.agent&&t(Tt,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"})]})}),t(xt,{className:"py-3 text-xs font-mono text-muted-foreground",children:l.itemId||"-"}),t(xt,{className:"py-3 text-xs font-mono text-muted-foreground",children:l.projectId||"-"}),t(xt,{className:"py-3 text-right text-xs text-muted-foreground",children:kn(l.createdAt)})]},l.id)})})]}),t("div",{ref:g,className:"py-4 flex justify-center",children:h&&t(O,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})]})})}function $e(){let{teamId:a}=Ge.useParams(),[e,s]=u("audit-logs"),{data:i,isLoading:c}=Z({queryKey:["teams",a,"me"],queryFn:async()=>{let r=await A.api.teams[":teamId"].me.$get({param:{teamId:a}});if(!r.ok)throw Error("Failed to fetch me");return await r.json()},enabled:!!a});if(c)return t("div",{className:"flex h-screen items-center justify-center",children:t(O,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(i?.role?.toLowerCase()!=="owner")return o("div",{className:"flex h-full flex-col items-center justify-center p-8 text-center",children:[t(tc,{className:"h-12 w-12 text-destructive mb-4"}),t("h2",{className:"text-xl font-bold tracking-tight mb-2",children:qA()}),t("p",{className:"text-sm text-muted-foreground max-w-md",children:BS()})]});return t("div",{className:"h-full bg-background font-sans selection:bg-primary/20 transition-colors duration-300",children:o("div",{className:"flex flex-col md:flex-row h-full",children:[t("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:o("nav",{className:"p-4 space-y-1 mt-4",children:[t("div",{className:"mb-2 px-4 text-xs font-semibold text-sidebar-foreground/60 uppercase tracking-wider",children:mh()}),t("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:FT()}),o("button",{onClick:()=>s("audit-logs"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="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:[t(Ys,{className:"w-5 h-5"}),Rf(),e==="audit-logs"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),o("button",{onClick:()=>s("quotas"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="quotas"?"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:[t(zo,{className:"w-5 h-5"}),Ud(),e==="quotas"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),t("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:V0()}),o("button",{onClick:()=>s("ai-usage"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="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:[t(ie,{className:"w-5 h-5"}),O1(),e==="ai-usage"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]}),o("button",{onClick:()=>s("ai-sessions"),className:C("w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all",e==="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:[t(Q,{className:"w-5 h-5"}),uA(),e==="ai-sessions"&&t("div",{className:"ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary"})]})]})}),t("div",{className:"flex-1 overflow-y-auto p-4 md:p-8",children:o("div",{className:"max-w-6xl mx-auto space-y-8",children:[e==="audit-logs"&&t(fe,{teamId:a}),e==="ai-usage"&&t(ne,{teamId:a}),e==="ai-sessions"&&t(le,{teamId:a}),e==="quotas"&&t(pe,{teamId:a})]})})]})})}var Ge=ze("/teams/$teamId/dashboard")({component:$e});export{Ge as Route};
|
package/bin/chunk-d1rjpbgv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m,_,u,S,L,t,o,V,B,A,O,Kr,ve,Et,ht,zs,de,E,ge,Ae,_e,K,De,na,lh,ct,Hc,$c,yh,Cb,Ib,Lh,Zh,Bh,ap,lp,cp,up,Tl,mg,pp,mp,Eg,Cg,Mp,Qg,pA,$p,f1,Kp,Wp,Xe,et,tt,rt,nt,ot,st,it,ue,ae,pe,qe,le,Mt,z,Ot,Nt,M,yn,bn,BA}from"./chunk-qx553512.js";import{uu,du,Va,Qa,fu}from"./chunk-me3zmpj5.js";import{Uo}from"./chunk-fa9yq17g.js";import{uo}from"./chunk-wbmqbpgm.js";S();var Se=[];function Ql({teamId:r,projectId:D,assetId:p,folders:a,files:l,totalFolders:Me,totalFiles:Re,totalFoldersSize:ze,totalFilesSize:Ue,selectedItem:J,selectedIds:w,onItemSelect:X,onItemDoubleClick:Y,onSaveField:Be,onClearSelection:$e,fetchNextFoldersPage:Z,hasNextFoldersPage:ee,isFetchingNextFoldersPage:y,fetchNextFilesPage:te,hasNextFilesPage:oe,isFetchingNextFilesPage:b,isRecentlyDeleted:x=!1,isRecents:k=!1,isLoading:se=!1,isShareView:q=!1,isPublic:ie=!1,shareId:Oe,allowDownload:re=!0}){let d=V(),{canEdit:C,canAdmin:We}=Ot(D),ne=_(null),ce=_(null),[W,je]=u(!0),[j,Qe]=u(!0),[He,N]=u(!1),[F,me]=u(""),[Ke,Q]=u(!1),fe=Me??a.length,he=Re??l.length,we=ze??(a.length>0?a.reduce((e,s)=>e+(s.sizeByte||0),0):-1),ye=Ue??(l.length>0?l.reduce((e,s)=>e+(s.sizeByte||0),0):-1),Le=we>-1,Pe=ye>-1,be=(e,s)=>{if(s)return e===1?lp({count:e}):ap({count:e});else return e===1?up({count:e}):cp({count:e})},{editingItemId:xe,setEditingItemId:ke,handleAction:Ce,onRenameSubmit:Ne,isDeleteDialogOpen:Ve,setIsDeleteDialogOpen:Ge,confirmDelete:Je,isDownloadDialogOpen:Ye,setIsDownloadDialogOpen:H,isLoadingLinks:I,resolvedFiles:Fe,startDownload:Ze}=fu({teamId:r,projectId:D,assetId:p,folders:a,files:l,selectedIds:w,isPublic:ie,shareId:Oe}),{ref:at,inView:Ie}=Nt();m(()=>{if(Ie){if(ee&&!y)Z();else if(oe&&!b)te()}},[Ie,ee,y,oe,b,Z,te]);let lt=bn((e)=>e.startTask),dt=A.api.teams[":teamId"].upload.tasks.$post,{mutate:mt}=B({mutationFn:async(e)=>{let s=await dt(e);if(!s.ok)throw Error("Failed to create upload task");return await s.json()},onMutate:()=>({files:[...Se]}),onSuccess:async(e,s,n)=>{let f=n?.files||[],g=f.map((i)=>{let v=e.createdAssets?.find((c)=>c.tempId===i.id),R=e.presignedUrls?.find((c)=>c.id===i.id);return{fileId:v?.assetId||R?.fileId||i.id,name:i.file.name,size:i.file.size}}).filter((i)=>!!i.fileId),h=f.filter((i)=>!i.file.name.startsWith(".")),T=h.length===1?h[0].file.name:`${h.length} Items`;if(e.taskId)lt(e.taskId,T,g);d.invalidateQueries({queryKey:["search",r,p]}),d.invalidateQueries({queryKey:["teams",r,"upload","tasks"]}),await du({files:f,taskId:e.taskId,teamId:r,storageBackend:e.storageBackend||"local",createdAssets:e.createdAssets,presignedUrls:e.presignedUrls,onFileFinished:async()=>{await d.invalidateQueries({queryKey:["search",r,p]})}}),d.invalidateQueries({queryKey:["search",r,p]}),d.invalidateQueries({queryKey:["teams",r,"upload","tasks"]})}}),Te=(e)=>{if(!e||e.length===0)return;let s=[],n=[],f=new Map;for(let g of e){let h=(g.webkitRelativePath||g.name).split("/");if(h.some((U)=>U.startsWith(".")))continue;let T=h.pop(),i=n,v="";for(let U of h)if(v=`${v}/${U}`,!f.has(v)){let G=[],wt={name:U,type:"folder",id:Uo(),children:G,size:0};i.push(wt),f.set(v,G),i=G}else i=f.get(v);let R={file:g,id:Uo()};s.push(R);let c=g.type;if(T.toLowerCase().endsWith(".wma")&&c?.startsWith("video/"))c=c.replace(/^video\//,"audio/");i.push({name:T,size:g.size,type:"file",id:R.id,children:[],mediaType:c})}Se=s,mt({param:{teamId:r},json:{parentId:p,files:n}})},pt=A.api.folders.$post,{mutate:ut,isPending:Ee}=B({mutationFn:async(e)=>{let s=await pt({json:{name:e,parentId:p}});if(!s.ok)throw Error("Failed to create folder");return await s.json()},onSuccess:()=>{M.success(Tl()),N(!1),me(""),d.invalidateQueries({queryKey:["search",r,p]}),d.invalidateQueries({queryKey:["folders"]})},onError:(e)=>{M.error(`Error: ${e.message}`)}}),{mutate:ft,isPending:P}=B({mutationFn:async()=>{let e=await A.api.projects[":projectId"]["empty-trash"].$post({param:{projectId:D}});if(!e.ok)throw Error("Failed to empty trash");return await e.json()},onSuccess:()=>{M.success(f1()),d.invalidateQueries({queryKey:["projects",D,"recently-deleted"]}),$e(),Q(!1)},onError:(e)=>{M.error(`Error: ${e.message}`)}}),gt=(e)=>{if(e.preventDefault(),!F.trim())return;ut(F.trim())},vt=!se&&a.length===0&&l.length===0&&!y&&!b;return o("div",{className:"flex-1 flex flex-col min-h-0 bg-background overflow-hidden relative",children:[C&&o(L,{children:[t("input",{type:"file",ref:ne,multiple:!0,className:"hidden",onChange:(e)=>{if(e.target.files)Te(e.target.files)}}),t("input",{type:"file",ref:ce,multiple:!0,webkitdirectory:"true",className:"hidden",onChange:(e)=>{if(e.target.files)Te(e.target.files)}})]}),x&&o("div",{className:"flex items-center justify-between px-4 py-2.5 bg-muted/20 border-b border-border text-sm shrink-0",children:[o("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t(Kr,{className:"h-4 w-4 text-amber-500 shrink-0"}),t("span",{className:"text-xs",children:Mp()})]}),We&&t(E,{variant:"destructive",size:"sm",disabled:P||a.length===0&&l.length===0,onClick:()=>Q(!0),className:"h-7 px-2.5 text-xs font-medium bg-destructive/10 text-destructive border border-destructive/20 hover:bg-destructive hover:text-destructive-foreground",children:"Delete"})]}),o("div",{className:"flex-1 overflow-y-auto min-h-0 p-3 pb-24",children:[se&&a.length===0&&l.length===0?t(BA,{}):o("div",{className:"max-w-lg mx-auto w-full",children:[fe>0&&o("div",{className:"mb-4",children:[o("button",{onClick:()=>je(!W),className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground mb-3 font-medium select-none cursor-pointer",children:[W?t(ve,{className:"h-4 w-4"}):t(Et,{className:"h-4 w-4"}),o("span",{children:[be(fe,!1),Le?` • ${yn(we)}`:""]})]}),W&&t("div",{className:"grid grid-cols-1 gap-4 w-full",children:a.map((e)=>t(Qa,{item:e,isSelected:J?.id===e.id,isChecked:w.has(e.id),isEditing:xe===e.id,onSelect:X,onDoubleClick:Y,onContextMenu:()=>{},onDragStart:()=>{},onDrop:()=>{},onRename:(s)=>Ne(e,s),onFinishEditing:()=>ke(null),onAction:(s,n)=>Ce(s,n),isRecentlyDeleted:x,isRecents:k,selectedCount:w.size,canEdit:C,isShareView:q,allowDownload:re},e.id))})]}),he>0&&o("div",{className:"mb-4",children:[o("button",{onClick:()=>Qe(!j),className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground mb-3 font-medium select-none cursor-pointer",children:[j?t(ve,{className:"h-4 w-4"}):t(Et,{className:"h-4 w-4"}),o("span",{children:[be(he,!0),Pe?` • ${yn(ye)}`:""]})]}),j&&t("div",{className:"grid grid-cols-1 gap-4 w-full",children:l.map((e)=>t(Va,{teamId:r,item:e,isSelected:J?.id===e.id,isChecked:w.has(e.id),isEditing:xe===e.id,onSelect:X,onDoubleClick:Y,onContextMenu:()=>{},onDragStart:()=>{},onDrop:()=>{},onRename:(s)=>Ne(e,s),onFinishEditing:()=>ke(null),onSaveField:(s,n)=>Be?.(e.id,s,n),fields:[],onAction:(s,n)=>Ce(s,n),isRecentlyDeleted:x,isRecents:k,selectedCount:w.size,canEdit:C,isShareView:q,allowDownload:re},e.id))})]})]}),vt&&t("div",{className:"flex flex-col items-center justify-center h-64 text-sm text-muted-foreground p-6 text-center",children:k?o("div",{className:"flex flex-col items-center gap-2",children:[t(zs,{className:"h-10 w-10 text-muted-foreground/40 mb-1"}),t("p",{className:"font-medium text-foreground",children:pp()}),t("p",{className:"text-xs text-muted-foreground",children:mp()})]}):t("span",{children:$p()})}),t("div",{ref:at,className:"py-4 flex justify-center items-center min-h-6",children:(y||b)&&t(O,{className:"h-5 w-5 animate-spin text-muted-foreground"})})]}),C&&!x&&!k&&!q&&!ie&&t("div",{className:"fixed bottom-6 right-6 z-30",children:o(ge,{modal:!1,children:[t(Ae,{asChild:!0,children:t(E,{size:"icon",className:"h-14 w-14 rounded-full bg-primary text-primary-foreground shadow-lg shadow-primary/25 hover:bg-primary/90 flex items-center justify-center","aria-label":"Actions",children:t(de,{className:"h-6 w-6"})})}),o(_e,{align:"end",side:"top",className:"w-48 mb-2",children:[o(K,{onClick:()=>ne.current?.click(),className:"flex items-center gap-2.5 py-2 cursor-pointer",children:[t(uo,{className:"h-4 w-4"}),t("span",{children:Kp()})]}),o(K,{onClick:()=>ce.current?.click(),className:"flex items-center gap-2.5 py-2 cursor-pointer",children:[t(uo,{className:"h-4 w-4"}),t("span",{children:Wp()})]}),o(K,{onClick:()=>N(!0),className:"flex items-center gap-2.5 py-2 cursor-pointer",children:[t(uu,{className:"h-4 w-4"}),t("span",{children:Tl()})]})]})]})}),t(ue,{open:He,onOpenChange:N,children:t(ae,{className:"sm:max-w-md",children:o("form",{onSubmit:gt,children:[o(pe,{children:[t(le,{children:Tl()}),t(Mt,{children:Zh()})]}),t("div",{className:"py-4",children:t(z,{autoFocus:!0,placeholder:Zh(),value:F,onChange:(e)=>me(e.target.value)})}),o(qe,{children:[t(E,{type:"button",variant:"outline",onClick:()=>N(!1),children:De()}),o(E,{type:"submit",disabled:!F.trim()||Ee,children:[Ee?t(O,{className:"h-4 w-4 animate-spin mr-2"}):null,na()]})]})]})})}),t(Xe,{open:Ve,onOpenChange:Ge,children:o(et,{children:[o(tt,{children:[t(nt,{children:$c()}),t(ot,{children:Hc()})]}),o(rt,{children:[t(it,{children:De()}),t(st,{onClick:()=>Je(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:ct()})]})]})}),t(Xe,{open:Ke,onOpenChange:Q,children:o(et,{children:[o(tt,{children:[t(nt,{children:Ib()}),t(ot,{children:Cb()})]}),o(rt,{children:[t(it,{children:De()}),t(st,{onClick:(e)=>{e.preventDefault(),ft()},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",disabled:P,children:P?"Deleting...":ct()})]})]})}),t(ue,{open:Ye,onOpenChange:H,children:o(ae,{className:"sm:max-w-md",children:[o(pe,{children:[t(le,{children:I?Eg():lh()}),t(Mt,{children:I?Qg():Lh()})]}),I?o("div",{className:"space-y-4 py-6 flex flex-col items-center justify-center",children:[t(O,{className:"h-8 w-8 animate-spin text-primary"}),t("span",{className:"text-sm font-medium text-muted-foreground mt-2",children:Cg()})]}):o("div",{className:"space-y-4 py-2",children:[t("div",{className:"text-sm text-muted-foreground",children:yh({count:Fe.length})}),o("div",{className:"flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30",children:[t(Kr,{className:"h-5 w-5 shrink-0 mt-0.5"}),o("div",{children:[t("p",{className:"font-semibold",children:mg()}),t("p",{className:"mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90",children:Bh()})]})]})]}),t(qe,{children:!I?o(L,{children:[t(E,{variant:"outline",onClick:()=>H(!1),children:De()}),o(E,{onClick:Ze,className:"gap-2",disabled:Fe.length===0,children:[t(ht,{className:"h-4 w-4"}),pA()]})]}):t(E,{variant:"outline",onClick:()=>H(!1),children:De()})})]})})]})}
|
|
2
|
-
export{Ql};
|
package/bin/chunk-eshwjf91.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{I,wp,xp,Sp,Ep,Pd,Nd,Dd,Od,Fd,lu}from"./chunk-qx553512.js";import{Mo}from"./chunk-tqdde9bj.js";import{ko}from"./chunk-03zkxckm.js";var o=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ys=I("activity",o);var a=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],lo=I("cpu",a);var r=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],zo=I("gauge",r);var c=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],wn=I("server",c);var n=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],tc=I("shield-alert",n);var i=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],ha=I("dollar-sign",i);var Xa={agent_total_tokens:{label:()=>Fd(),icon:lo,unit:"tokens"},agent_cost:{label:()=>Nd(),icon:ha,unit:"$"},agent_mcp_call_count:{label:()=>Dd(),icon:wn,unit:"calls"},agent_bash_call_count:{label:()=>Pd(),icon:ko,unit:"calls"},agent_tool_call_count:{label:()=>Od(),icon:Mo,unit:"calls"}};function Oi(e,t){if(e==="agent_cost")return`$${t.toFixed(2)}`;return t.toLocaleString()}function rc(e){switch(lu(e)){case"1hour":return xp();case"5hour":return Sp();case"1day":return wp();case"7day":return Ep();default:return e}}
|
|
2
|
-
export{Ys,lo,ha,zo,wn,tc,Xa,Oi,rc};
|