@shumai-one/shumai 0.4.2 → 0.4.3
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-adekdctx.css → chunk-0ccg9ddn.css} +1 -1
- package/bin/chunk-0e4wawpq.js +2 -0
- package/bin/chunk-185qefn1.js +2 -0
- package/bin/chunk-1kw2mbqb.js +1 -0
- package/bin/chunk-1wm6ptdx.js +1 -0
- package/bin/chunk-1yacmegc.js +2 -0
- package/bin/chunk-2291ehh5.js +3 -0
- package/bin/chunk-2520aq8j.js +2 -0
- package/bin/chunk-29zdp63z.js +3 -0
- package/bin/chunk-2yxj593j.js +2 -0
- package/bin/chunk-32pcmaqm.js +3 -0
- package/bin/chunk-3a13dcs1.js +1 -0
- package/bin/chunk-3cyrcgm5.js +13 -0
- package/bin/chunk-3swpwb9v.js +1 -0
- package/bin/chunk-3wmcx2bv.js +2 -0
- package/bin/chunk-4r81ghg8.js +2 -0
- package/bin/chunk-4v5n0ayb.js +2 -0
- package/bin/chunk-5a8nt4me.js +1 -0
- package/bin/chunk-66hsjnw6.js +2 -0
- package/bin/chunk-6bhn1p8v.js +211 -0
- package/bin/chunk-6gg1ymer.js +2 -0
- package/bin/chunk-70c3xrgd.js +2 -0
- package/bin/chunk-7esm0hqb.js +2 -0
- package/bin/chunk-7fst8kdw.js +12 -0
- package/bin/chunk-83e12sjg.js +3 -0
- package/bin/chunk-87zxtf66.js +3 -0
- package/bin/chunk-8fmy5jtp.js +2 -0
- package/bin/chunk-8zqgaxvv.js +1 -0
- package/bin/chunk-9t1ne8xr.js +2 -0
- package/bin/chunk-a32vreya.js +2 -0
- package/bin/chunk-a3dmtt2j.js +1 -0
- package/bin/chunk-abt0azmv.js +2 -0
- package/bin/chunk-ag6p3mbf.js +2 -0
- package/bin/chunk-aqbrzx9z.js +1 -0
- package/bin/chunk-av1a8fqp.js +3 -0
- package/bin/chunk-awfwk64v.js +2 -0
- package/bin/chunk-b235azv4.js +45 -0
- package/bin/chunk-b9yrw9et.js +10 -0
- package/bin/chunk-bay038pj.js +2 -0
- package/bin/chunk-c007p0t8.js +299 -0
- package/bin/chunk-cak32x57.js +2 -0
- package/bin/chunk-ce8m4zeg.js +3 -0
- package/bin/chunk-ck8azecb.js +12 -0
- package/bin/chunk-cnxwmycy.js +6 -0
- package/bin/chunk-cqb415s6.js +5 -0
- package/bin/chunk-e2mvmq2m.js +1 -0
- package/bin/chunk-e7mqtkzn.js +2 -0
- package/bin/chunk-e99dv20z.js +3 -0
- package/bin/chunk-ea79xnn3.js +2 -0
- package/bin/chunk-ehc9adfz.js +2 -0
- package/bin/chunk-ejbvfj4r.js +1 -0
- package/bin/chunk-ekfem7kf.js +1 -0
- package/bin/chunk-etwkk0xh.js +1 -0
- package/bin/chunk-evrdd32b.js +2 -0
- package/bin/chunk-f15qyp41.js +1 -0
- package/bin/chunk-f3ehv01n.js +54 -0
- package/bin/chunk-fm6p03ad.js +2 -0
- package/bin/chunk-fxswt9hc.js +3 -0
- package/bin/chunk-fyha3r13.js +2 -0
- package/bin/chunk-g0vs7k2x.js +1 -0
- package/bin/chunk-g84z2w7v.js +16 -0
- package/bin/chunk-gk3eqd50.js +2 -0
- package/bin/chunk-h3tbf521.js +2 -0
- package/bin/chunk-h837fyed.js +2 -0
- package/bin/chunk-hfh0c082.js +2 -0
- package/bin/chunk-j20e0qsw.js +7 -0
- package/bin/chunk-j8fxp8ej.js +2 -0
- package/bin/chunk-jje8nj8h.js +3 -0
- package/bin/chunk-jy006gcv.js +7 -0
- package/bin/chunk-k7hss0bd.js +4 -0
- package/bin/chunk-m7m9d4fb.js +2 -0
- package/bin/chunk-n1jwdb0a.js +1 -0
- package/bin/chunk-p5gf1zdm.js +4 -0
- package/bin/chunk-pb1zf0vb.js +2 -0
- package/bin/chunk-pfgxggaj.js +11 -0
- package/bin/chunk-q16490pv.js +2 -0
- package/bin/chunk-q2bvyv39.js +8 -0
- package/bin/chunk-qf24e71w.js +2 -0
- package/bin/chunk-qh81zhg1.js +1 -0
- package/bin/chunk-qwp3kwbz.js +2 -0
- package/bin/chunk-qwqvt9v6.js +2 -0
- package/bin/chunk-qydeqgyj.js +5 -0
- package/bin/chunk-r7dty1tg.js +2 -0
- package/bin/chunk-rbj4fad9.js +32 -0
- package/bin/chunk-rhdxwebf.js +2 -0
- package/bin/chunk-rhh716z0.js +42 -0
- package/bin/chunk-rpywcvg1.js +3 -0
- package/bin/chunk-rza4ae5z.js +3 -0
- package/bin/chunk-sfx2588q.js +3 -0
- package/bin/chunk-sk4e6rb1.js +1 -0
- package/bin/chunk-t2n1dbgx.js +4 -0
- package/bin/chunk-tf28796q.js +2 -0
- package/bin/chunk-twdxayky.js +3 -0
- package/bin/chunk-v9b3w8q5.js +3 -0
- package/bin/chunk-v9w25rp2.js +2 -0
- package/bin/chunk-vgn5zcpv.js +3 -0
- package/bin/chunk-wfzqnpc1.js +3 -0
- package/bin/chunk-wry2hvrq.js +24 -0
- package/bin/chunk-x8f4defx.js +3 -0
- package/bin/chunk-xp59apdb.js +2 -0
- package/bin/chunk-xtf3c29c.css +1 -0
- package/bin/chunk-z3gkt8w1.js +3 -0
- package/bin/chunk-zehyn6vd.js +2 -0
- package/bin/chunk-zh6fqq44.js +1 -0
- package/bin/chunk-zmv8cg4s.js +8 -0
- package/bin/chunk-zqv0zhfb.js +3 -0
- package/bin/{pdf.worker.min-szxdj13d.mjs → pdf.worker.min-vf48er29.mjs} +14423 -13889
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +626 -460
- package/package.json +18 -18
- package/prisma/migrations/20260904022457_add_agent_id_to_assets_and_audit_logs/migration.sql +17 -0
- package/prisma/migrations/20260906081230_default_denied_tools_delete_asset/migration.sql +15 -0
- package/prisma/schema.prisma +9 -0
- package/bin/chunk-07h4b77v.js +0 -2
- package/bin/chunk-0t4n4d5w.js +0 -4
- package/bin/chunk-1611z9jg.js +0 -2
- package/bin/chunk-1phqxp6z.js +0 -3
- package/bin/chunk-23hckrrz.js +0 -2
- package/bin/chunk-30z44j1g.js +0 -2
- package/bin/chunk-3j463k1g.js +0 -1
- package/bin/chunk-4181tdds.js +0 -14
- package/bin/chunk-480jtqng.js +0 -4
- package/bin/chunk-4c3g146q.js +0 -2
- package/bin/chunk-4ca0zt5e.js +0 -1
- package/bin/chunk-4d9bgmf2.js +0 -2
- package/bin/chunk-4ev56fss.js +0 -9
- package/bin/chunk-4gk52tjq.js +0 -45
- package/bin/chunk-4mdqkj4d.js +0 -1
- package/bin/chunk-4r91fggc.js +0 -2
- package/bin/chunk-50fb1x3w.js +0 -1
- package/bin/chunk-59gj1njz.js +0 -1
- package/bin/chunk-5pr0t7fb.js +0 -2
- package/bin/chunk-5vewxmz7.js +0 -3
- package/bin/chunk-62zx96pe.js +0 -2
- package/bin/chunk-63y0eb07.js +0 -2
- package/bin/chunk-6d5xrgfx.js +0 -2
- package/bin/chunk-6gbtz5bf.js +0 -67
- package/bin/chunk-6gjg5egq.js +0 -3
- package/bin/chunk-6m4jz9s1.js +0 -44
- package/bin/chunk-6s4x525w.js +0 -2
- package/bin/chunk-6w2wmvqs.js +0 -3
- package/bin/chunk-77d23vcn.js +0 -2
- package/bin/chunk-77m5p188.js +0 -2
- package/bin/chunk-7bvx087f.js +0 -1
- package/bin/chunk-7pfjfrjg.js +0 -5
- package/bin/chunk-7q10s127.js +0 -4
- package/bin/chunk-7thx8ctx.js +0 -3
- package/bin/chunk-8t4s91gh.js +0 -2
- package/bin/chunk-98ey5p2e.js +0 -3
- package/bin/chunk-9amndcyh.js +0 -6
- package/bin/chunk-9bk23g9x.js +0 -1
- package/bin/chunk-9mkcfy43.js +0 -1
- package/bin/chunk-9t3nsq5n.js +0 -2
- package/bin/chunk-9tjq99ds.js +0 -2
- package/bin/chunk-9wm9rwh1.js +0 -2
- package/bin/chunk-ab16fyg4.js +0 -4
- package/bin/chunk-arv0g2av.js +0 -1
- package/bin/chunk-aytj4zxg.js +0 -3
- package/bin/chunk-b1ypjqgp.js +0 -2
- package/bin/chunk-bdjv0ykq.js +0 -2
- package/bin/chunk-c1k86mfa.js +0 -10
- package/bin/chunk-caa96dgd.js +0 -2
- package/bin/chunk-ce4v2yjy.js +0 -1
- package/bin/chunk-cqh60y54.js +0 -3
- package/bin/chunk-cvq7zgw7.js +0 -1
- package/bin/chunk-d9mjbtp2.js +0 -2
- package/bin/chunk-dn7sbjws.js +0 -3
- package/bin/chunk-dxyq9h8n.js +0 -3
- package/bin/chunk-e3cabksx.js +0 -3
- package/bin/chunk-egcrbj94.js +0 -2
- package/bin/chunk-ev17v1mv.js +0 -2
- package/bin/chunk-evtpwg71.js +0 -2
- package/bin/chunk-f3e0nsv2.js +0 -2
- package/bin/chunk-f40gjqpq.js +0 -2
- package/bin/chunk-fe7822ak.js +0 -299
- package/bin/chunk-g8tkhw9j.js +0 -2
- package/bin/chunk-g9r0p4t8.js +0 -2
- package/bin/chunk-gbjyh9ms.js +0 -1
- package/bin/chunk-gtbsb39v.js +0 -3
- package/bin/chunk-gytz1q13.js +0 -13
- package/bin/chunk-h0fxysxs.js +0 -7
- package/bin/chunk-h8bdvsqt.js +0 -2
- package/bin/chunk-hag024w8.js +0 -2
- package/bin/chunk-hc6w5nw4.js +0 -7
- package/bin/chunk-j69dqc48.js +0 -2
- package/bin/chunk-jbtw1zym.js +0 -8
- package/bin/chunk-jc1vb7rj.js +0 -5
- package/bin/chunk-jdv78w9r.js +0 -2
- package/bin/chunk-jjs70y9v.js +0 -3
- package/bin/chunk-jmdar2gz.js +0 -2
- package/bin/chunk-jvwz10n4.js +0 -2
- package/bin/chunk-k47md1g4.js +0 -2
- package/bin/chunk-k4v0brcb.js +0 -2
- package/bin/chunk-k6n7c07e.js +0 -1
- package/bin/chunk-kk2cstsg.js +0 -2
- package/bin/chunk-knz4h56q.js +0 -12
- package/bin/chunk-kqqtt6bd.js +0 -3
- package/bin/chunk-kvyp1t4j.js +0 -7
- package/bin/chunk-kxskpgsq.js +0 -5
- package/bin/chunk-m6srbjcs.js +0 -2
- package/bin/chunk-mcc1scxs.js +0 -12
- package/bin/chunk-mq83a0kk.js +0 -2
- package/bin/chunk-mxm8g4q0.js +0 -1
- package/bin/chunk-nhpgdqq5.js +0 -2
- package/bin/chunk-nne496aa.js +0 -2
- package/bin/chunk-nqpb0r9h.js +0 -11
- package/bin/chunk-ns0zww9g.js +0 -2
- package/bin/chunk-ps4xfp23.js +0 -2
- package/bin/chunk-pz2ec6xt.js +0 -2
- package/bin/chunk-q163k309.js +0 -2
- package/bin/chunk-q1da61ps.js +0 -1
- package/bin/chunk-qrf0ady6.js +0 -68
- package/bin/chunk-qy28f25e.js +0 -2
- package/bin/chunk-r7s4ypw1.js +0 -2
- package/bin/chunk-ran23vm9.js +0 -1
- package/bin/chunk-rfvdc4n0.js +0 -2
- package/bin/chunk-rgthkvgx.js +0 -3
- package/bin/chunk-s39n3yw3.js +0 -2
- package/bin/chunk-s7wdd0g7.js +0 -8
- package/bin/chunk-s88ha5kx.js +0 -3
- package/bin/chunk-sf91bt9m.js +0 -2
- package/bin/chunk-sjwbjf9j.js +0 -2
- package/bin/chunk-t62076pv.js +0 -1
- package/bin/chunk-tbbwss3v.js +0 -3
- package/bin/chunk-tjcc7a6y.js +0 -24
- package/bin/chunk-tp6ab26e.js +0 -2
- package/bin/chunk-v2wxk9p5.js +0 -4
- package/bin/chunk-vbk6y4hk.js +0 -2
- package/bin/chunk-vfgfg5fk.js +0 -2
- package/bin/chunk-vm6c3xx9.js +0 -2
- package/bin/chunk-vsx96mt6.js +0 -3
- package/bin/chunk-wbyw1shz.js +0 -6
- package/bin/chunk-whh2vh50.css +0 -1
- package/bin/chunk-wjkcq65s.js +0 -2
- package/bin/chunk-wkefwkfp.js +0 -41
- package/bin/chunk-x7bsnk1e.js +0 -2
- package/bin/chunk-xbhw6bpz.js +0 -3
- package/bin/chunk-xg5yrcj5.js +0 -2
- package/bin/chunk-xg9xscqz.js +0 -1
- package/bin/chunk-xw2gpcsh.js +0 -3
- package/bin/chunk-ycq8ank7.js +0 -2
- package/bin/chunk-yp9hvkc5.js +0 -73
- package/bin/chunk-ytypyfkc.js +0 -65
- package/bin/chunk-z1kjmf60.js +0 -2
- package/bin/chunk-z36bx86r.js +0 -2
- package/bin/chunk-z7hdnecp.js +0 -3
- package/bin/chunk-zeby1cq7.js +0 -2
- package/bin/chunk-zs5e8z1w.js +0 -1
- package/bin/chunk-zxnyefg5.js +0 -2
- /package/bin/{chunk-24ke0th1.css → chunk-kegybs91.css} +0 -0
package/bin/chunk-qrf0ady6.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{ih as O9}from"./chunk-k47md1g4.js";import{lh as P9}from"./chunk-d9mjbtp2.js";import{ei as D9,gi as I9,hi as E9,ii as zZ,mi as mY,ri as rY}from"./chunk-b1ypjqgp.js";import{Ai as R9,Gi as zJ,Ki as pY,Li as _Y,Mi as dY,Ni as cY,Oi as lY,Pi as sY,Qi as iY,Ri as oY,Si as D2,Ui as I2,Vi as E2,Wi as j2,Xi as k2,Yi as nY,Zi as t,ui as kY,zi as ZZ}from"./chunk-h0fxysxs.js";import{Bj as T9,Ej as P0,Gl as h2,Kj as SY,Mj as hY,Nk as C2,Xj as xY,Xl as jJ,aj as z2,bj as jY,cj as L,ck as yY,dj as D,ek as fY,gj as P2,gk as w9,hj as _Z,hk as A9,ij as C9,jj as NX,jk as vY,jl as T2,pk as S2,rm as QZ,um as R,vk as bY,vl as uY,vm as aY,yk as gY}from"./chunk-yp9hvkc5.js";import{sn as N9}from"./chunk-dxyq9h8n.js";var k=N9(z2(),1);var Jq=Symbol.for("preact-signals");function T1(){if(!(oJ>1)){var J,Z=!1;(function(){var Y=P1;P1=void 0;while(Y!==void 0){if(Y.S.v===Y.v)Y.S.i=Y.i;Y=Y.o}})();while(h0!==void 0){var Q=h0;h0=void 0,R1++;while(Q!==void 0){var $=Q.u;if(Q.u=void 0,Q.f&=-3,!(8&Q.f)&&b2(Q))try{Q.c()}catch(Y){if(!Z)J=Y,Z=!0}Q=$}}if(R1=0,oJ--,Z)throw J}else oJ--}function UJ(J){if(oJ>0)return J();x9=++Zq,oJ++;try{return J()}finally{T1()}}var m=void 0;function S(J){var Z=m;m=void 0;try{return J()}finally{m=Z}}var f2,h0=void 0,oJ=0,R1=0,Zq=0,x9=0,P1=void 0,C1=0;function v2(J){if(m!==void 0){var Z=J.n;if(Z===void 0||Z.t!==m){if(Z={i:0,S:J,p:m.s,n:void 0,t:m,e:void 0,x:void 0,r:Z},m.s!==void 0)m.s.n=Z;if(m.s=Z,J.n=Z,32&m.f)J.S(Z);return Z}else if(Z.i===-1){if(Z.i=0,Z.n!==void 0){if(Z.n.p=Z.p,Z.p!==void 0)Z.p.n=Z.n;Z.p=m.s,Z.n=void 0,m.s.n=Z,m.s=Z}return Z}}}function KJ(J,Z){this.v=J,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=Z==null?void 0:Z.watched,this.Z=Z==null?void 0:Z.unwatched,this.name=Z==null?void 0:Z.name}KJ.prototype.brand=Jq;KJ.prototype.h=function(){return!0};KJ.prototype.S=function(J){var Z=this,Q=this.t;if(Q!==J&&J.e===void 0)if(J.x=Q,this.t=J,Q!==void 0)Q.e=J;else S(function(){var $;($=Z.W)==null||$.call(Z)})};KJ.prototype.U=function(J){var Z=this;if(this.t!==void 0){var{e:Q,x:$}=J;if(Q!==void 0)Q.x=$,J.e=void 0;if($!==void 0)$.e=Q,J.x=void 0;if(J===this.t){if(this.t=$,$===void 0)S(function(){var Y;(Y=Z.Z)==null||Y.call(Z)})}}};KJ.prototype.subscribe=function(J){var Z=this;return $J(function(){var Q=Z.value,$=m;m=void 0;try{J(Q)}finally{m=$}},{name:"sub"})};KJ.prototype.valueOf=function(){return this.value};KJ.prototype.toString=function(){return this.value+""};KJ.prototype.toJSON=function(){return this.value};KJ.prototype.peek=function(){var J=this;return S(function(){return J.value})};Object.defineProperty(KJ.prototype,"value",{get:function(){var J=v2(this);if(J!==void 0)J.i=this.i;return this.v},set:function(J){if(J!==this.v){if(R1>100)throw Error("Cycle detected");(function(Q){if(oJ!==0&&R1===0){if(Q.l!==x9)Q.l=x9,P1={S:Q,v:Q.v,i:Q.i,o:P1}}})(this),this.v=J,this.i++,C1++,oJ++;try{for(var Z=this.t;Z!==void 0;Z=Z.x)Z.t.N()}finally{T1()}}}});function pJ(J,Z){return new KJ(J,Z)}function b2(J){for(var Z=J.s;Z!==void 0;Z=Z.n)if(Z.S.i!==Z.i||!Z.S.h()||Z.S.i!==Z.i)return!0;return!1}function g2(J){for(var Z=J.s;Z!==void 0;Z=Z.n){var Q=Z.S.n;if(Q!==void 0)Z.r=Q;if(Z.S.n=Z,Z.i=-1,Z.n===void 0){J.s=Z;break}}}function u2(J){var Z=J.s,Q=void 0;while(Z!==void 0){var $=Z.p;if(Z.i===-1){if(Z.S.U(Z),$!==void 0)$.n=Z.n;if(Z.n!==void 0)Z.n.p=$}else Q=Z;if(Z.S.n=Z.r,Z.r!==void 0)Z.r=void 0;Z=$}J.s=Q}function AZ(J,Z){KJ.call(this,void 0),this.x=J,this.s=void 0,this.g=C1-1,this.f=4,this.W=Z==null?void 0:Z.watched,this.Z=Z==null?void 0:Z.unwatched,this.name=Z==null?void 0:Z.name}AZ.prototype=new KJ;AZ.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===C1)return!0;if(this.g=C1,this.f|=1,this.i>0&&!b2(this))return this.f&=-2,!0;var J=m;try{g2(this),m=this;var Z=this.x();if(16&this.f||this.v!==Z||this.i===0)this.v=Z,this.f&=-17,this.i++}catch(Q){this.v=Q,this.f|=16,this.i++}return m=J,u2(this),this.f&=-2,!0};AZ.prototype.S=function(J){if(this.t===void 0){this.f|=36;for(var Z=this.s;Z!==void 0;Z=Z.n)Z.S.S(Z)}KJ.prototype.S.call(this,J)};AZ.prototype.U=function(J){if(this.t!==void 0){if(KJ.prototype.U.call(this,J),this.t===void 0){this.f&=-33;for(var Z=this.s;Z!==void 0;Z=Z.n)Z.S.U(Z)}}};AZ.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var J=this.t;J!==void 0;J=J.x)J.t.N()}};Object.defineProperty(AZ.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var J=v2(this);if(this.h(),J!==void 0)J.i=this.i;if(16&this.f)throw this.v;return this.v}});function y9(J,Z){return new AZ(J,Z)}function m2(J){var Z=J.m;if(J.m=void 0,typeof Z=="function"){oJ++;var Q=m;m=void 0;try{Z()}catch($){throw J.f&=-2,J.f|=8,f9(J),$}finally{m=Q,T1()}}}function f9(J){for(var Z=J.s;Z!==void 0;Z=Z.n)Z.S.U(Z);J.x=void 0,J.s=void 0,m2(J)}function Qq(J){if(m!==this)throw Error("Out-of-order effect");if(u2(this),m=J,this.f&=-2,8&this.f)f9(this);T1()}function tZ(J,Z){if(this.x=J,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=Z==null?void 0:Z.name,f2)f2.push(this)}tZ.prototype.c=function(){var J=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var Z=this.x();if(typeof Z=="function")this.m=Z}finally{J()}};tZ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,m2(this),g2(this),oJ++;var J=m;return m=this,Qq.bind(this,J)};tZ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=h0,h0=this};tZ.prototype.d=function(){if(this.f|=8,!(1&this.f))f9(this)};tZ.prototype.dispose=function(){this.d()};function $J(J,Z){var Q=new tZ(J,Z);try{Q.c()}catch(Y){throw Q.d(),Y}var $=Q.d.bind(Q);return $[Symbol.dispose]=$,$}var{create:$q,defineProperty:s9,defineProperties:Yq,getOwnPropertyDescriptor:qq,getOwnPropertyDescriptors:Xq,getOwnPropertySymbols:p2}=Object,Kq=Object.prototype.hasOwnProperty,Wq=Object.prototype.propertyIsEnumerable,d2=(J,Z)=>(Z=Symbol[J])?Z:Symbol.for("Symbol."+J),eZ=(J)=>{throw TypeError(J)},m9=(J,Z,Q)=>(Z in J)?s9(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,Hq=(J,Z)=>{for(var Q in Z||(Z={}))if(Kq.call(Z,Q))m9(J,Q,Z[Q]);if(p2){for(var Q of p2(Z))if(Wq.call(Z,Q))m9(J,Q,Z[Q])}return J},Uq=(J,Z)=>Yq(J,Xq(Z)),_2=(J,Z)=>s9(J,"name",{value:Z,configurable:!0}),Bq=(J)=>{var Z;return[,,,$q((Z=J==null?void 0:J[d2("metadata")])!=null?Z:null)]},c2=["class","method","getter","setter","accessor","field","value","get","set"],x0=(J)=>J!==void 0&&typeof J!=="function"?eZ("Function expected"):J,Nq=(J,Z,Q,$,Y)=>({kind:c2[J],name:Z,metadata:$,addInitializer:(q)=>Q._?eZ("Already initialized"):Y.push(x0(q||null))}),l2=(J,Z)=>m9(Z,d2("metadata"),J[3]),OZ=(J,Z,Q,$)=>{for(var Y=0,q=J[Z>>1],K=q&&q.length;Y<K;Y++)Z&1?q[Y].call(Q):$=q[Y].call(Q,$);return $},J0=(J,Z,Q,$,Y,q)=>{var K,X,W,U,B,H=Z&7,G=!!(Z&8),N=!!(Z&16),M=H>3?J.length+1:H?G?1:2:0,A=c2[H+5],P=H>3&&(J[M-1]=[]),C=J[M]||(J[M]=[]),V=H&&(!N&&!G&&(Y=Y.prototype),H<5&&(H>3||!N)&&qq(H<4?Y:{get[Q](){return TJ(this,q)},set[Q](z){return KZ(this,q,z)}},Q));H?N&&H<4&&_2(q,(H>2?"set ":H>1?"get ":"")+Q):_2(Y,Q);for(var F=$.length-1;F>=0;F--){if(U=Nq(H,Q,W={},J[3],C),H){if(U.static=G,U.private=N,B=U.access={has:N?(z)=>Gq(Y,z):(z)=>(Q in z)},H^3)B.get=N?(z)=>(H^1?TJ:Vq)(z,Y,H^4?q:V.get):(z)=>z[Q];if(H>2)B.set=N?(z,O)=>KZ(z,Y,O,H^4?q:V.set):(z,O)=>z[Q]=O}if(X=(0,$[F])(H?H<4?N?q:V[A]:H>4?void 0:{get:V.get,set:V.set}:Y,U),W._=1,H^4||X===void 0)x0(X)&&(H>4?P.unshift(X):H?N?q=X:V[A]=X:Y=X);else if(typeof X!=="object"||X===null)eZ("Object expected");else x0(K=X.get)&&(V.get=K),x0(K=X.set)&&(V.set=K),x0(K=X.init)&&P.unshift(K)}return H||l2(J,Y),V&&s9(Y,Q,V),N?H^4?q:V:Y},i9=(J,Z,Q)=>Z.has(J)||eZ("Cannot "+Q),Gq=(J,Z)=>Object(Z)!==Z?eZ('Cannot use the "in" operator on this value'):J.has(Z),TJ=(J,Z,Q)=>(i9(J,Z,"read from private field"),Q?Q.call(J):Z.get(J)),y0=(J,Z,Q)=>Z.has(J)?eZ("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),KZ=(J,Z,Q,$)=>(i9(J,Z,"write to private field"),$?$.call(J,Q):Z.set(J,Q),Q),Vq=(J,Z,Q)=>(i9(J,Z,"access private method"),Q);function Z0(J,Z){if(Z){let Q;return y9(()=>{let $=J();if($&&Q&&Z(Q,$))return Q;return Q=$,$})}return y9(J)}function nJ(J,Z){if(Object.is(J,Z))return!0;if(J===null||Z===null)return!1;if(typeof J==="function"&&typeof Z==="function")return J===Z;if(J instanceof Set&&Z instanceof Set){if(J.size!==Z.size)return!1;for(let Q of J)if(!Z.has(Q))return!1;return!0}if(Array.isArray(J)){if(!Array.isArray(Z)||J.length!==Z.length)return!1;return!J.some(($,Y)=>!nJ($,Z[Y]))}if(typeof J==="object"&&typeof Z==="object"){let Q=Object.keys(J),$=Object.keys(Z);if(Q.length!==$.length)return!1;return!Q.some((q)=>!nJ(J[q],Z[q]))}return!1}function x({get:J},Z){return{init(Q){return pJ(Q)},get(){return J.call(this).value},set(Q){let $=J.call(this);if($.peek()===Q)return;$.value=Q}}}function d(J,Z){let Q=new WeakMap;return function(){let $=Q.get(this);if(!$)$=Z0(J.bind(this)),Q.set(this,$);return $.value}}function v9(J=!0){return function(Z,Q){Q.addInitializer(function(){let $=Q.kind==="field"?this:Q.static?this:Object.getPrototypeOf(this),Y=Object.getOwnPropertyDescriptor($,Q.name);if(Y)Object.defineProperty($,Q.name,Uq(Hq({},Y),{enumerable:J}))})}}function PZ(...J){let Z=J.map((Q)=>$J(Q));return()=>Z.forEach((Q)=>Q())}var s2,i2,o2,n2,a2,r2,BJ,o9,b9,p9,_9,WJ,n9,g9,t2,d9,a9,u9,c9,l9;r2=[x],a2=[x],n2=[x],o2=[v9()],i2=[v9()],s2=[v9()];var _J=class{constructor(J,Z=Object.is){this.defaultValue=J,this.equals=Z,OZ(BJ,5,this),y0(this,WJ),y0(this,o9,OZ(BJ,8,this)),OZ(BJ,11,this),y0(this,n9,OZ(BJ,12,this)),OZ(BJ,15,this),y0(this,a9,OZ(BJ,16,this)),OZ(BJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return TJ(this,WJ,c9)}get initial(){return TJ(this,WJ,p9)}get previous(){return TJ(this,WJ,t2)}set current(J){let Z=S(()=>TJ(this,WJ,c9));if(J&&Z&&this.equals(Z,J))return;UJ(()=>{if(!TJ(this,WJ,p9))KZ(this,WJ,J,_9);KZ(this,WJ,Z,d9),KZ(this,WJ,J,l9)})}reset(J=this.defaultValue){UJ(()=>{KZ(this,WJ,void 0,d9),KZ(this,WJ,J,_9),KZ(this,WJ,J,l9)})}};BJ=Bq(null);o9=new WeakMap;WJ=new WeakSet;n9=new WeakMap;a9=new WeakMap;b9=J0(BJ,20,"#initial",r2,WJ,o9),p9=b9.get,_9=b9.set;g9=J0(BJ,20,"#previous",a2,WJ,n9),t2=g9.get,d9=g9.set;u9=J0(BJ,20,"#current",n2,WJ,a9),c9=u9.get,l9=u9.set;J0(BJ,2,"current",o2,_J);J0(BJ,2,"initial",i2,_J);J0(BJ,2,"previous",s2,_J);l2(BJ,_J);function D1(J){return S(()=>{let Z={};for(let Q in J)Z[Q]=J[Q];return Z})}var RZ,sX=class{constructor(){y0(this,RZ,new WeakMap)}get(J,Z){var Q;return J?(Q=TJ(this,RZ).get(J))==null?void 0:Q.get(Z):void 0}set(J,Z,Q){var $;if(!J)return;if(!TJ(this,RZ).has(J))TJ(this,RZ).set(J,new Map);return($=TJ(this,RZ).get(J))==null?void 0:$.set(Z,Q)}clear(J){var Z;return J?(Z=TJ(this,RZ).get(J))==null?void 0:Z.clear():void 0}};RZ=new WeakMap;var{create:zq,defineProperty:Z8,getOwnPropertyDescriptor:Lq,getOwnPropertySymbols:e2}=Object,Mq=Object.prototype.hasOwnProperty,Fq=Object.prototype.propertyIsEnumerable,QQ=(J,Z)=>(Z=Symbol[J])?Z:Symbol.for("Symbol."+J),Q0=(J)=>{throw TypeError(J)},JQ=Math.pow,r9=(J,Z,Q)=>(Z in J)?Z8(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,wq=(J,Z)=>{for(var Q in Z||(Z={}))if(Mq.call(Z,Q))r9(J,Q,Z[Q]);if(e2){for(var Q of e2(Z))if(Fq.call(Z,Q))r9(J,Q,Z[Q])}return J},ZQ=(J,Z)=>Z8(J,"name",{value:Z,configurable:!0}),Aq=(J)=>{var Z;return[,,,zq((Z=J==null?void 0:J[QQ("metadata")])!=null?Z:null)]},$Q=["class","method","getter","setter","accessor","field","value","get","set"],f0=(J)=>J!==void 0&&typeof J!=="function"?Q0("Function expected"):J,Oq=(J,Z,Q,$,Y)=>({kind:$Q[J],name:Z,metadata:$,addInitializer:(q)=>Q._?Q0("Already initialized"):Y.push(f0(q||null))}),YQ=(J,Z)=>r9(Z,QQ("metadata"),J[3]),Rq=(J,Z,Q,$)=>{for(var Y=0,q=J[Z>>1],K=q&&q.length;Y<K;Y++)Z&1?q[Y].call(Q):$=q[Y].call(Q,$);return $},qQ=(J,Z,Q,$,Y,q)=>{var K,X,W,U,B,H=Z&7,G=!!(Z&8),N=!!(Z&16),M=H>3?J.length+1:H?G?1:2:0,A=$Q[H+5],P=H>3&&(J[M-1]=[]),C=J[M]||(J[M]=[]),V=H&&(!N&&!G&&(Y=Y.prototype),H<5&&(H>3||!N)&&Lq(H<4?Y:{get[Q](){return t9(this,q)},set[Q](z){return e9(this,q,z)}},Q));H?N&&H<4&&ZQ(q,(H>2?"set ":H>1?"get ":"")+Q):ZQ(Y,Q);for(var F=$.length-1;F>=0;F--){if(U=Oq(H,Q,W={},J[3],C),H){if(U.static=G,U.private=N,B=U.access={has:N?(z)=>Pq(Y,z):(z)=>(Q in z)},H^3)B.get=N?(z)=>(H^1?t9:Tq)(z,Y,H^4?q:V.get):(z)=>z[Q];if(H>2)B.set=N?(z,O)=>e9(z,Y,O,H^4?q:V.set):(z,O)=>z[Q]=O}if(X=(0,$[F])(H?H<4?N?q:V[A]:H>4?void 0:{get:V.get,set:V.set}:Y,U),W._=1,H^4||X===void 0)f0(X)&&(H>4?P.unshift(X):H?N?q=X:V[A]=X:Y=X);else if(typeof X!=="object"||X===null)Q0("Object expected");else f0(K=X.get)&&(V.get=K),f0(K=X.set)&&(V.set=K),f0(K=X.init)&&P.unshift(K)}return H||YQ(J,Y),V&&Z8(Y,Q,V),N?H^4?q:V:Y},Q8=(J,Z,Q)=>Z.has(J)||Q0("Cannot "+Q),Pq=(J,Z)=>Object(Z)!==Z?Q0('Cannot use the "in" operator on this value'):J.has(Z),t9=(J,Z,Q)=>(Q8(J,Z,"read from private field"),Q?Q.call(J):Z.get(J)),Cq=(J,Z,Q)=>Z.has(J)?Q0("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),e9=(J,Z,Q,$)=>(Q8(J,Z,"write to private field"),$?$.call(J,Q):Z.set(J,Q),Q),Tq=(J,Z,Q)=>(Q8(J,Z,"access private method"),Q),HJ=class J{constructor(Z,Q){this.x=Z,this.y=Q}static delta(Z,Q){return new J(Z.x-Q.x,Z.y-Q.y)}static distance(Z,Q){return Math.hypot(Z.x-Q.x,Z.y-Q.y)}static equals(Z,Q){return Z.x===Q.x&&Z.y===Q.y}static from({x:Z,y:Q}){return new J(Z,Q)}},FJ=class J{constructor(Z,Q,$,Y){this.left=Z,this.top=Q,this.width=$,this.height=Y,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(Z,Q){let{top:$,left:Y,width:q,height:K,scale:X}=this,W=new J(Y+Z,$+Q,q,K);return W.scale=wq({},X),W}get boundingRectangle(){let{width:Z,height:Q,left:$,top:Y,right:q,bottom:K}=this;return{width:Z,height:Q,left:$,top:Y,right:q,bottom:K}}get center(){let{left:Z,top:Q,right:$,bottom:Y}=this;return new HJ((Z+$)/2,(Q+Y)/2)}get area(){let{width:Z,height:Q}=this;return Z*Q}equals(Z){if(!(Z instanceof J))return!1;let{left:Q,top:$,width:Y,height:q}=this;return Q===Z.left&&$===Z.top&&Y===Z.width&&q===Z.height}containsPoint(Z){let{top:Q,left:$,bottom:Y,right:q}=this;return Q<=Z.y&&Z.y<=Y&&$<=Z.x&&Z.x<=q}intersectionArea(Z){if(Z instanceof J)return Dq(this,Z);return 0}intersectionRatio(Z){let{area:Q}=this,$=this.intersectionArea(Z);return $/(Z.area+Q-$)}get bottom(){let{top:Z,height:Q}=this;return Z+Q}get right(){let{left:Z,width:Q}=this;return Z+Q}get aspectRatio(){let{width:Z,height:Q}=this;return Z/Q}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:Z,left:Q,width:$,height:Y}){return new J(Q,Z,$,Y)}static delta(Z,Q,$={x:"center",y:"center"}){let Y=(q,K)=>{let X=$[K],W=K==="x"?q.left:q.top,U=K==="x"?q.width:q.height;if(X=="start")return W;if(X=="end")return W+U;return W+U/2};return HJ.delta({x:Y(Z,"x"),y:Y(Z,"y")},{x:Y(Q,"x"),y:Y(Q,"y")})}static intersectionRatio(Z,Q){return J.from(Z).intersectionRatio(J.from(Q))}};function Dq(J,Z){let Q=Math.max(Z.top,J.top),$=Math.max(Z.left,J.left),Y=Math.min(Z.left+Z.width,J.left+J.width),q=Math.min(Z.top+Z.height,J.top+J.height),K=Y-$,X=q-Q;if($<Y&&Q<q)return K*X;return 0}var XQ,KQ,J8,I1,v0,b0=class extends(J8=_J,KQ=[d],XQ=[d],J8){constructor(J){let Z=HJ.from(J);super(Z,(Q,$)=>HJ.equals(Q,$));Rq(v0,5,this),Cq(this,I1,0),this.velocity={x:0,y:0}}get delta(){return HJ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Z}=this;if(!Z)return null;let Q={x:J.x-Z.x,y:J.y-Z.y};if(!Q.x&&!Q.y)return null;if(Math.abs(Q.x)>Math.abs(Q.y))return Q.x>0?"right":"left";return Q.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Z}=this,Q=HJ.from(J),$={x:Q.x-Z.x,y:Q.y-Z.y},Y=Date.now(),q=Y-t9(this,I1),K=(X)=>Math.round(X/q*100);UJ(()=>{e9(this,I1,Y),this.velocity={x:K($.x),y:K($.y)},super.current=Q})}reset(J=this.defaultValue){super.reset(HJ.from(J)),this.velocity={x:0,y:0}}};v0=Aq(J8);I1=new WeakMap;qQ(v0,2,"delta",KQ,b0);qQ(v0,2,"direction",XQ,b0);YQ(v0,b0);function E1({x:J,y:Z},Q){let $=Math.abs(J),Y=Math.abs(Z);if(typeof Q==="number")return Math.sqrt(JQ($,2)+JQ(Y,2))>Q;if("x"in Q&&"y"in Q)return $>Q.x&&Y>Q.y;if("x"in Q)return $>Q.x;if("y"in Q)return Y>Q.y;return!1}var WQ=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(WQ||{}),$8=Object.values(WQ);var{create:Iq,defineProperty:W8,defineProperties:Eq,getOwnPropertyDescriptor:jq,getOwnPropertyDescriptors:kq,getOwnPropertySymbols:f1}=Object,NQ=Object.prototype.hasOwnProperty,GQ=Object.prototype.propertyIsEnumerable,VQ=(J,Z)=>(Z=Symbol[J])?Z:Symbol.for("Symbol."+J),W0=(J)=>{throw TypeError(J)},q8=(J,Z,Q)=>(Z in J)?W8(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,H8=(J,Z)=>{for(var Q in Z||(Z={}))if(NQ.call(Z,Q))q8(J,Q,Z[Q]);if(f1){for(var Q of f1(Z))if(GQ.call(Z,Q))q8(J,Q,Z[Q])}return J},U8=(J,Z)=>Eq(J,kq(Z)),HQ=(J,Z)=>W8(J,"name",{value:Z,configurable:!0}),zQ=(J,Z)=>{var Q={};for(var $ in J)if(NQ.call(J,$)&&Z.indexOf($)<0)Q[$]=J[$];if(J!=null&&f1){for(var $ of f1(J))if(Z.indexOf($)<0&&GQ.call(J,$))Q[$]=J[$]}return Q},H0=(J)=>{var Z;return[,,,Iq((Z=J==null?void 0:J[VQ("metadata")])!=null?Z:null)]},LQ=["class","method","getter","setter","accessor","field","value","get","set"],g0=(J)=>J!==void 0&&typeof J!=="function"?W0("Function expected"):J,Sq=(J,Z,Q,$,Y)=>({kind:LQ[J],name:Z,metadata:$,addInitializer:(q)=>Q._?W0("Already initialized"):Y.push(g0(q||null))}),TZ=(J,Z)=>q8(Z,VQ("metadata"),J[3]),I=(J,Z,Q,$)=>{for(var Y=0,q=J[Z>>1],K=q&&q.length;Y<K;Y++)Z&1?q[Y].call(Q):$=q[Y].call(Q,$);return $},y=(J,Z,Q,$,Y,q)=>{var K,X,W,U,B,H=Z&7,G=!!(Z&8),N=!!(Z&16),M=H>3?J.length+1:H?G?1:2:0,A=LQ[H+5],P=H>3&&(J[M-1]=[]),C=J[M]||(J[M]=[]),V=H&&(!N&&!G&&(Y=Y.prototype),H<5&&(H>3||!N)&&jq(H<4?Y:{get[Q](){return n(this,q)},set[Q](z){return wJ(this,q,z)}},Q));H?N&&H<4&&HQ(q,(H>2?"set ":H>1?"get ":"")+Q):HQ(Y,Q);for(var F=$.length-1;F>=0;F--){if(U=Sq(H,Q,W={},J[3],C),H){if(U.static=G,U.private=N,B=U.access={has:N?(z)=>hq(Y,z):(z)=>(Q in z)},H^3)B.get=N?(z)=>(H^1?n:MQ)(z,Y,H^4?q:V.get):(z)=>z[Q];if(H>2)B.set=N?(z,O)=>wJ(z,Y,O,H^4?q:V.set):(z,O)=>z[Q]=O}if(X=(0,$[F])(H?H<4?N?q:V[A]:H>4?void 0:{get:V.get,set:V.set}:Y,U),W._=1,H^4||X===void 0)g0(X)&&(H>4?P.unshift(X):H?N?q=X:V[A]=X:Y=X);else if(typeof X!=="object"||X===null)W0("Object expected");else g0(K=X.get)&&(V.get=K),g0(K=X.set)&&(V.set=K),g0(K=X.init)&&P.unshift(K)}return H||TZ(J,Y),V&&W8(Y,Q,V),N?H^4?q:V:Y},B8=(J,Z,Q)=>Z.has(J)||W0("Cannot "+Q),hq=(J,Z)=>Object(Z)!==Z?W0('Cannot use the "in" operator on this value'):J.has(Z),n=(J,Z,Q)=>(B8(J,Z,"read from private field"),Q?Q.call(J):Z.get(J)),b=(J,Z,Q)=>Z.has(J)?W0("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),wJ=(J,Z,Q,$)=>(B8(J,Z,"write to private field"),$?$.call(J,Q):Z.set(J,Q),Q),MQ=(J,Z,Q)=>(B8(J,Z,"access private method"),Q);function FQ(J,Z){return{plugin:J,options:Z}}function U0(J){return(Z)=>{return FQ(J,Z)}}function K0(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var wQ,p0,N8,k1;wQ=[x];var GJ=class{constructor(J,Z){this.manager=J,this.options=Z,b(this,N8,I(p0,8,this,!1)),I(p0,11,this),b(this,k1,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return S(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Z=$J(J.bind(this));return n(this,k1).add(Z),Z}destroy(){n(this,k1).forEach((J)=>J())}static configure(J){return FQ(this,J)}};p0=H0(null);N8=new WeakMap;k1=new WeakMap;y(p0,4,"disabled",wQ,GJ,N8);TZ(p0,GJ);var B0=class extends GJ{},S1,Y8=class{constructor(J){this.manager=J,this.instances=new Map,b(this,S1,[])}get values(){return Array.from(this.instances.values())}set values(J){let Z=J.map(K0).reduce(($,Y)=>{let q=$.find(({plugin:K})=>K===Y.plugin);if(q)return q.options=Y.options,$;return[...$,Y]},[]),Q=Z.map(({plugin:$})=>$);for(let $ of n(this,S1))if(!Q.includes($)){if($.prototype instanceof B0)continue;this.unregister($)}for(let{plugin:$,options:Y}of Z)this.register($,Y);wJ(this,S1,Q)}get(J){return this.instances.get(J)}register(J,Z){let Q=this.instances.get(J);if(Q){if(Q.options!==Z)Q.options=Z;return Q}let $=new J(this.manager,Z);return this.instances.set(J,$),$}unregister(J){let Z=this.instances.get(J);if(Z)Z.destroy(),this.instances.delete(J)}destroy(){for(let J of this.instances.values())J.destroy();this.instances.clear()}};S1=new WeakMap;function xq(J,Z){if(J.priority===Z.priority){if(J.type===Z.type)return Z.value-J.value;return Z.type-J.type}return Z.priority-J.priority}var j1=[],$0,Y0,yq=class extends GJ{constructor(J){super(J);b(this,$0),b(this,Y0),this.computeCollisions=this.computeCollisions.bind(this),wJ(this,Y0,pJ(j1)),this.destroy=PZ(()=>{let Z=this.computeCollisions(),Q=S(()=>this.manager.dragOperation.position.current);if(Z!==j1){let $=n(this,$0);if(wJ(this,$0,Q),$&&Q.x==$.x&&Q.y==$.y)return}else wJ(this,$0,void 0);n(this,Y0).value=Z},()=>{let{dragOperation:Z}=this.manager;if(Z.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){S(()=>{if(J)n(this,Y0).value=this.computeCollisions();else wJ(this,$0,void 0)})}computeCollisions(J,Z){let{registry:Q,dragOperation:$}=this.manager,{source:Y,shape:q,status:K}=$;if(!K.initialized||!q)return j1;let X=[],W=[];for(let U of J!=null?J:Q.droppables){if(U.disabled)continue;if(Y&&!U.accepts(Y))continue;let B=Z!=null?Z:U.collisionDetector;if(!B)continue;W.push(U),U.shape;let H=S(()=>B({droppable:U,dragOperation:$}));if(H){if(U.collisionPriority!=null)H.priority=U.collisionPriority;X.push(H)}}if(W.length===0)return j1;return X.sort(xq),X}get collisions(){return n(this,Y0).value}};$0=new WeakMap;Y0=new WeakMap;var AQ,OQ,RQ,G8,PQ,hJ,V8,X0,z8,L8;RQ=[x],OQ=[x],AQ=[x];var aJ=class J{constructor(Z,Q){b(this,V8,I(hJ,8,this)),I(hJ,11,this),b(this,X0),b(this,z8,I(hJ,12,this)),I(hJ,15,this),b(this,L8,I(hJ,16,this)),I(hJ,19,this);let{effects:$,id:Y,data:q={},disabled:K=!1,register:X=!0}=Z,W=Y;if(wJ(this,X0,pJ(Y)),this.manager=Q,this.data=q,this.disabled=K,this.effects=()=>{var U;return[()=>{let{id:B,manager:H}=this;if(B===W)return;return W=B,H==null||H.registry.register(this),()=>H==null?void 0:H.registry.unregister(this)},...(U=$==null?void 0:$())!=null?U:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Q&&X)queueMicrotask(this.register)}get id(){var Z,Q;let $=n(this,X0).value;return(Q=(Z=J.pendingIdChanges)==null?void 0:Z.get(this))!=null?Q:$}set id(Z){var Q,$;let Y=($=(Q=J.pendingIdChanges)==null?void 0:Q.get(this))!=null?$:n(this,X0).peek();if(Z===Y)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var q;return MQ(q=J,G8,PQ).call(q)});J.pendingIdChanges.set(this,Z)}register(){var Z;return(Z=this.manager)==null?void 0:Z.registry.register(this)}unregister(){var Z;(Z=this.manager)==null||Z.registry.unregister(this)}destroy(){var Z;(Z=this.manager)==null||Z.registry.unregister(this)}};hJ=H0(null);G8=new WeakSet;PQ=function(){let J=aJ.pendingIdChanges;if(aJ.pendingIdChanges=null,J)UJ(()=>{for(let[Z,Q]of J)n(Z,X0).value=Q})};V8=new WeakMap;X0=new WeakMap;z8=new WeakMap;L8=new WeakMap;y(hJ,4,"manager",RQ,aJ,V8);y(hJ,4,"data",OQ,aJ,z8);y(hJ,4,"disabled",AQ,aJ,L8);b(aJ,G8);TZ(hJ,aJ);aJ.pendingIdChanges=null;var v1=aJ,UQ=class{constructor(){this.map=pJ(new Map),this.cleanupFunctions=new WeakMap,this.register=(J,Z)=>{let Q=this.map.peek(),$=Q.get(J),Y=()=>this.unregister(J,Z);if($===Z)return Y;if($){if($.id===J){let X=this.cleanupFunctions.get($);X==null||X(),this.cleanupFunctions.delete($)}}let q=new Map(Q);for(let[X,W]of Q)if(W===Z&&X!==J){q.delete(X);break}q.set(J,Z),this.map.value=q;let K=PZ(...Z.effects());return this.cleanupFunctions.set(Z,K),Y},this.unregister=(J,Z)=>{let Q=this.map.peek();if(Q.get(J)!==Z)return;let $=this.cleanupFunctions.get(Z);$==null||$(),this.cleanupFunctions.delete(Z);let Y=new Map(Q);Y.delete(J),this.map.value=Y}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(J){return this.map.value.has(J)}get(J){return this.map.value.get(J)}destroy(){for(let J of this){let Z=this.cleanupFunctions.get(J);Z==null||Z(),J.destroy()}this.map.value=new Map}},CQ,TQ,DQ,IQ,EQ,jQ,X8,NJ,M8,F8,w8,xJ=class extends(X8=v1,jQ=[x],EQ=[x],IQ=[x],DQ=[d],TQ=[d],CQ=[d],X8){constructor(J,Z){var Q=J,{modifiers:$,type:Y,sensors:q,plugins:K,effects:X}=Q,W=zQ(Q,["modifiers","type","sensors","plugins","effects"]);super(U8(H8({},W),{effects:()=>{var U;return[...(U=X==null?void 0:X())!=null?U:[],()=>{let{manager:B,plugins:H}=this;if(!B||!H)return;for(let G of H){let{plugin:N}=K0(G);B.registry.plugins.register(N)}}]}}),Z);I(NJ,5,this),b(this,M8,I(NJ,8,this)),I(NJ,11,this),b(this,F8,I(NJ,12,this)),I(NJ,15,this),b(this,w8,I(NJ,16,this,this.isDragSource?"dragging":"idle")),I(NJ,19,this),this.type=Y,this.sensors=q,this.modifiers=$,this.alignment=W.alignment,this.plugins=K}pluginConfig(J){if(!this.plugins)return;for(let Z of this.plugins){let Q=K0(Z);if(Q.plugin===J)return Q.options}return}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var J,Z;return((Z=(J=this.manager)==null?void 0:J.dragOperation.source)==null?void 0:Z.id)===this.id}};NJ=H0(X8);M8=new WeakMap;F8=new WeakMap;w8=new WeakMap;y(NJ,4,"type",jQ,xJ,M8);y(NJ,4,"modifiers",EQ,xJ,F8);y(NJ,4,"status",IQ,xJ,w8);y(NJ,2,"isDropping",DQ,xJ);y(NJ,2,"isDragging",TQ,xJ);y(NJ,2,"isDragSource",CQ,xJ);TZ(NJ,xJ);var kQ,SQ,hQ,xQ,yQ,fQ,K8,JJ,A8,O8,R8,P8,C8,yJ=class extends(K8=v1,fQ=[x],yQ=[x],xQ=[x],hQ=[x],SQ=[x],kQ=[d],K8){constructor(J,Z){var Q=J,{accept:$,collisionDetector:Y,collisionPriority:q,type:K}=Q,X=zQ(Q,["accept","collisionDetector","collisionPriority","type"]);super(X,Z);I(JJ,5,this),b(this,A8,I(JJ,8,this)),I(JJ,11,this),b(this,O8,I(JJ,12,this)),I(JJ,15,this),b(this,R8,I(JJ,16,this)),I(JJ,19,this),b(this,P8,I(JJ,20,this)),I(JJ,23,this),b(this,C8,I(JJ,24,this)),I(JJ,27,this),this.accept=$,this.collisionDetector=Y,this.collisionPriority=q,this.type=K}accepts(J){let{accept:Z}=this;if(!Z)return!0;if(typeof Z==="function")return Z(J);if(!J.type)return!1;if(Array.isArray(Z))return Z.includes(J.type);return J.type===Z}get isDropTarget(){var J,Z;return((Z=(J=this.manager)==null?void 0:J.dragOperation.target)==null?void 0:Z.id)===this.id}};JJ=H0(K8);A8=new WeakMap;O8=new WeakMap;R8=new WeakMap;P8=new WeakMap;C8=new WeakMap;y(JJ,4,"accept",fQ,yJ,A8);y(JJ,4,"type",yQ,yJ,O8);y(JJ,4,"collisionDetector",xQ,yJ,R8);y(JJ,4,"collisionPriority",hQ,yJ,P8);y(JJ,4,"shape",SQ,yJ,C8);y(JJ,2,"isDropTarget",kQ,yJ);TZ(JJ,yJ);var fq=class{constructor(){this.registry=new Map}addEventListener(J,Z){let{registry:Q}=this,$=new Set(Q.get(J));return $.add(Z),Q.set(J,$),()=>this.removeEventListener(J,Z)}removeEventListener(J,Z){let{registry:Q}=this,$=new Set(Q.get(J));$.delete(Z),Q.set(J,$)}dispatch(J,...Z){let{registry:Q}=this,$=Q.get(J);if(!$)return;for(let Y of $)Y(...Z)}},vq=class extends fq{constructor(J){super();this.manager=J}dispatch(J,Z){let Q=[Z,this.manager];super.dispatch(J,...Q)}};function h1(J,Z=!0){let Q=!1;return U8(H8({},J),{cancelable:Z,get defaultPrevented(){return Q},preventDefault(){if(!Z)return;Q=!0}})}var bq=class extends B0{constructor(J){super(J);let Z=($,Y)=>$.map(({id:q})=>q).join("")===Y.map(({id:q})=>q).join(""),Q=[];this.destroy=PZ(()=>{let{dragOperation:$,collisionObserver:Y}=J;if($.status.initializing)Q=[],Y.enable()},()=>{let{collisionObserver:$,monitor:Y}=J,{collisions:q}=$;if($.isDisabled())return;if(v1.pendingIdChanges)return;let K=h1({collisions:q});if(Y.dispatch("collision",K),K.defaultPrevented)return;if(Z(q,Q))return;else Q=q;let[X]=q;S(()=>{var W;if((X==null?void 0:X.id)!==((W=J.dragOperation.target)==null?void 0:W.id))$.disable(),J.actions.setDropTarget(X==null?void 0:X.id).then(()=>{$.enable()})})})}},dJ=((J)=>{return J[J.Lowest=0]="Lowest",J[J.Low=1]="Low",J[J.Normal=2]="Normal",J[J.High=3]="High",J[J.Highest=4]="Highest",J})(dJ||{}),cJ=((J)=>{return J[J.Collision=0]="Collision",J[J.ShapeIntersection=1]="ShapeIntersection",J[J.PointerIntersection=2]="PointerIntersection",J})(cJ||{}),vQ,bQ,gQ,uQ,mQ,pQ,_Q,DJ,T8;_Q=[x],pQ=[d],mQ=[d],uQ=[d],gQ=[d],bQ=[d],vQ=[d];var rJ=class{constructor(){I(DJ,5,this),b(this,T8,I(DJ,8,this,"idle")),I(DJ,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){let{value:J}=this;return J!=="idle"&&J!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(J){this.value=J}};DJ=H0(null);T8=new WeakMap;y(DJ,4,"value",_Q,rJ,T8);y(DJ,2,"current",pQ,rJ);y(DJ,2,"idle",mQ,rJ);y(DJ,2,"initializing",uQ,rJ);y(DJ,2,"initialized",gQ,rJ);y(DJ,2,"dragging",bQ,rJ);y(DJ,2,"dropped",vQ,rJ);TZ(DJ,rJ);var gq=class{constructor(J){this.manager=J}setDragSource(J){let{dragOperation:Z}=this.manager;Z.sourceIdentifier=typeof J==="string"||typeof J==="number"?J:J.id}setDropTarget(J){return S(()=>{let{dragOperation:Z}=this.manager,Q=J!=null?J:null;if(Z.targetIdentifier===Q)return Promise.resolve(!1);Z.targetIdentifier=Q;let $=h1({operation:Z.snapshot()});if(Z.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return S(()=>{let{dragOperation:Z}=this.manager;if(J.source!=null)this.setDragSource(J.source);if(!Z.source)throw Error("Cannot start a drag operation without a drag source");if(!Z.status.idle)throw Error("Cannot start a drag operation while another is active");let $=new AbortController,{event:Y,coordinates:q}=J;UJ(()=>{Z.status.set("initialization-pending"),Z.shape=null,Z.canceled=!1,Z.activatorEvent=Y!=null?Y:null,Z.position.reset(q)});let K=h1({operation:Z.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",K),K.defaultPrevented)return Z.reset(),$.abort(),$;return Z.status.set("initializing"),Z.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:X}=Z;if(X.current!=="initializing")return;UJ(()=>{Z.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:Y,operation:Z.snapshot(),cancelable:!1})})}),$})}move(J){return S(()=>{var Z,Q;let{dragOperation:$}=this.manager,{status:Y,controller:q}=$;if(!Y.dragging||!q||q.signal.aborted)return;let K=h1({nativeEvent:J.event,operation:$.snapshot(),by:J.by,to:J.to},(Z=J.cancelable)!=null?Z:!0);if((Q=J.propagate)!=null?Q:!0)this.manager.monitor.dispatch("dragmove",K);queueMicrotask(()=>{var X,W,U,B,H;if(K.defaultPrevented)return;let G=(H=J.to)!=null?H:{x:$.position.current.x+((W=(X=J.by)==null?void 0:X.x)!=null?W:0),y:$.position.current.y+((B=(U=J.by)==null?void 0:U.y)!=null?B:0)};$.position.current=G})})}stop(J={}){return S(()=>{var Z,Q;let{dragOperation:$}=this.manager,{controller:Y}=$;if(!Y||Y.signal.aborted)return;let q,K=()=>{let W={resume:()=>{},abort:()=>{}};return q=new Promise((U,B)=>{W.resume=U,W.abort=B}),W};Y.abort();let X=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let W=S(()=>{var B;return((B=$.source)==null?void 0:B.status)==="dropping"}),U=()=>{if($.controller===Y)$.controller=void 0;$.reset()};if(W){let{source:B}=$,H=$J(()=>{if((B==null?void 0:B.status)==="idle")H(),U()})}else this.manager.renderer.rendering.then(U)})};if($.canceled=(Z=J.canceled)!=null?Z:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:J.event,operation:$.snapshot(),canceled:(Q=J.canceled)!=null?Q:!1,suspend:K}),q)q.then(X).catch(()=>$.reset());else X()})}},CZ=class extends GJ{constructor(J,Z){super(J,Z);this.manager=J,this.options=Z}},dQ=class extends AbortController{constructor(J,Z){super();this.constraints=J,this.onActivate=Z,this.activated=!1;for(let Q of J!=null?J:[])Q.controller=this}onEvent(J){var Z;if(this.activated)return;if((Z=this.constraints)==null?void 0:Z.length)for(let Q of this.constraints)Q.onEvent(J);else this.activate(J)}activate(J){if(this.activated)return;this.activated=!0,this.onActivate(J)}abort(J){this.activated=!1,super.abort(J)}},x1,D8=class{constructor(J){this.options=J,b(this,x1)}set controller(J){wJ(this,x1,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Z;(Z=n(this,x1))==null||Z.activate(J)}};x1=new WeakMap;var BQ=class extends GJ{constructor(J,Z){super(J,Z);this.manager=J,this.options=Z}apply(J){return J.transform}},uq=class{constructor(J){this.draggables=new UQ,this.droppables=new UQ,this.plugins=new Y8(J),this.sensors=new Y8(J),this.modifiers=new Y8(J)}register(J,Z){if(J instanceof xJ)return this.draggables.register(J.id,J);if(J instanceof yJ)return this.droppables.register(J.id,J);if(J.prototype instanceof BQ)return this.modifiers.register(J,Z);if(J.prototype instanceof CZ)return this.sensors.register(J,Z);if(J.prototype instanceof GJ)return this.plugins.register(J,Z);throw Error("Invalid instance type")}unregister(J){if(J instanceof v1){if(J instanceof xJ)return this.draggables.unregister(J.id,J);if(J instanceof yJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof BQ)return this.modifiers.unregister(J);if(J.prototype instanceof CZ)return this.sensors.unregister(J);if(J.prototype instanceof GJ)return this.plugins.unregister(J);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},cQ,lQ,sQ,iQ,oQ,nQ,aQ,rQ,tQ,u0,y1,q0,o,I8,E8,j8,k8,S8,m0;tQ=[d],rQ=[x],aQ=[x],nQ=[x],oQ=[x],iQ=[x],sQ=[d],lQ=[d],cQ=[d];var fJ=class{constructor(J){I(o,5,this),b(this,u0),b(this,y1),b(this,q0,new _J(void 0,(Z,Q)=>Z&&Q?Z.equals(Q):Z===Q)),this.status=new rJ,b(this,I8,I(o,8,this,!1)),I(o,11,this),b(this,E8,I(o,12,this,null)),I(o,15,this),b(this,j8,I(o,16,this,null)),I(o,19,this),b(this,k8,I(o,20,this,null)),I(o,23,this),b(this,S8,I(o,24,this,[])),I(o,27,this),this.position=new b0({x:0,y:0}),b(this,m0,{x:0,y:0}),wJ(this,u0,J)}get shape(){let{current:J,initial:Z,previous:Q}=n(this,q0);if(!J||!Z)return null;return{current:J,initial:Z,previous:Q}}set shape(J){if(!J)n(this,q0).reset();else n(this,q0).current=J}get source(){var J;let Z=this.sourceIdentifier;if(Z==null)return null;let Q=n(this,u0).registry.draggables.get(Z);if(Q)wJ(this,y1,Q);return(J=Q!=null?Q:n(this,y1))!=null?J:null}get target(){var J;let Z=this.targetIdentifier;return Z!=null?(J=n(this,u0).registry.droppables.get(Z))!=null?J:null:null}get transform(){let{x:J,y:Z}=this.position.delta,Q={x:J,y:Z};for(let $ of this.modifiers)Q=$.apply(U8(H8({},this.snapshot()),{transform:Q}));return wJ(this,m0,Q),Q}snapshot(){return S(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:n(this,m0),shape:this.shape?D1(this.shape):null,position:D1(this.position),status:D1(this.status),canceled:this.canceled}))}reset(){UJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,n(this,q0).reset(),this.position.reset({x:0,y:0}),wJ(this,m0,{x:0,y:0}),this.modifiers=[]})}};o=H0(null);u0=new WeakMap;y1=new WeakMap;q0=new WeakMap;I8=new WeakMap;E8=new WeakMap;j8=new WeakMap;k8=new WeakMap;S8=new WeakMap;m0=new WeakMap;y(o,2,"shape",tQ,fJ);y(o,4,"canceled",rQ,fJ,I8);y(o,4,"activatorEvent",aQ,fJ,E8);y(o,4,"sourceIdentifier",nQ,fJ,j8);y(o,4,"targetIdentifier",oQ,fJ,k8);y(o,4,"modifiers",iQ,fJ,S8);y(o,2,"source",sQ,fJ);y(o,2,"target",lQ,fJ);y(o,2,"transform",cQ,fJ);TZ(o,fJ);var mq={get rendering(){return Promise.resolve()}};function IJ(J,Z){if(typeof J==="function")return J(Z);return J!=null?J:Z}var eQ=class{constructor(J){this.destroy=()=>{if(!this.dragOperation.status.idle)this.actions.stop({canceled:!0});this.dragOperation.modifiers.forEach((H)=>H.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Z;let Q=J!=null?J:{},$=IJ(Q.plugins,[]),Y=IJ(Q.sensors,[]),q=IJ(Q.modifiers,[]),K=(Z=Q.renderer)!=null?Z:mq,X=new vq(this),W=new uq(this);this.registry=W,this.monitor=X,this.renderer=K,this.actions=new gq(this),this.dragOperation=new fJ(this),this.collisionObserver=new yq(this),this.plugins=[bq,...$],this.modifiers=q,this.sensors=Y;let{destroy:U}=this,B=PZ(()=>{var H,G,N;let M=S(()=>this.dragOperation.modifiers),A=this.modifiers;for(let P of M)if(!A.includes(P))P.destroy();this.dragOperation.modifiers=(N=(G=(H=this.dragOperation.source)==null?void 0:H.modifiers)==null?void 0:G.map((P)=>{let{plugin:C,options:V}=K0(P);return new C(this,V)}))!=null?N:A});this.destroy=()=>{B(),U()}}get plugins(){return this.registry.plugins.values}set plugins(J){this.registry.plugins.values=J}get modifiers(){return this.registry.modifiers.values}set modifiers(J){this.registry.modifiers.values=J}get sensors(){return this.registry.sensors.values}set sensors(J){this.registry.sensors.values=J}};var X$=(J)=>{throw TypeError(J)},y8=(J,Z,Q)=>Z.has(J)||X$("Cannot "+Q),E=(J,Z,Q)=>(y8(J,Z,"read from private field"),Z.get(J)),LJ=(J,Z,Q)=>Z.has(J)?X$("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),AJ=(J,Z,Q,$)=>(y8(J,Z,"write to private field"),Z.set(J,Q),Q),K$=(J,Z,Q)=>(y8(J,Z,"access private method"),Q);function s1(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function f8(J,Z){let Q=J.getAnimations(),$=null;for(let Y of Q){if(Y.playState!=="running")continue;let{effect:q}=Y,X=(s1(q)?q.getKeyframes():[]).filter(Z);if(X.length>0)$=[X[X.length-1],Y]}return $}function i1(J){let{width:Z,height:Q,top:$,left:Y,bottom:q,right:K}=J.getBoundingClientRect();return{width:Z,height:Q,top:$,left:Y,bottom:q,right:K}}function v8(J){let Z=Object.prototype.toString.call(J);return Z==="[object Window]"||Z==="[object global]"}function o0(J){return"nodeType"in J}function OJ(J){var Z,Q,$;if(!J)return window;if(v8(J))return J;if(!o0(J))return window;if("defaultView"in J)return(Z=J.defaultView)!=null?Z:window;return($=(Q=J.ownerDocument)==null?void 0:Q.defaultView)!=null?$:window}function o1(J){let{Document:Z}=OJ(J);return J instanceof Z||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function tJ(J){if(!J||v8(J))return!1;return J instanceof OJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function W$(J){return J instanceof OJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function jZ(J){if(!J)return document;if(v8(J))return J.document;if(!o0(J))return document;if(o1(J))return J;if(tJ(J)||W$(J))return J.ownerDocument;return document}function pq(J){var Z,Q,$,Y;let{documentElement:q}=jZ(J),K=OJ(J).visualViewport,X=(Z=K==null?void 0:K.width)!=null?Z:q.clientWidth,W=(Q=K==null?void 0:K.height)!=null?Q:q.clientHeight,U=($=K==null?void 0:K.offsetTop)!=null?$:0,B=(Y=K==null?void 0:K.offsetLeft)!=null?Y:0;return{top:U,left:B,right:B+X,bottom:U+W,width:X,height:W}}function _q(J,Z){if(dq(J)&&J.open===!1)return!1;let{overflow:Q,overflowX:$,overflowY:Y}=getComputedStyle(J);return Q==="visible"&&$==="visible"&&Y==="visible"}function dq(J){return J.tagName==="DETAILS"}function p1(J,Z=J.getBoundingClientRect(),Q=0){var $,Y,q,K,X;let W=Z,{ownerDocument:U}=J,B=($=U.defaultView)!=null?$:window,H=J.parentElement;while(H&&H!==U.documentElement){if(!_q(H)){let F=H.getBoundingClientRect(),z=Q*(F.bottom-F.top),O=Q*(F.right-F.left),v=Q*(F.bottom-F.top),T=Q*(F.right-F.left);W={top:Math.max(W.top,F.top-z),right:Math.min(W.right,F.right+O),bottom:Math.min(W.bottom,F.bottom+v),left:Math.max(W.left,F.left-T),width:0,height:0},W.width=W.right-W.left,W.height=W.bottom-W.top}H=H.parentElement}let G=B.visualViewport,N=(Y=G==null?void 0:G.offsetTop)!=null?Y:0,M=(q=G==null?void 0:G.offsetLeft)!=null?q:0,A=(K=G==null?void 0:G.width)!=null?K:B.innerWidth,P=(X=G==null?void 0:G.height)!=null?X:B.innerHeight,C=Q*P,V=Q*A;if(W={top:Math.max(W.top,N-C),right:Math.min(W.right,M+A+V),bottom:Math.min(W.bottom,N+P+C),left:Math.max(W.left,M-V),width:0,height:0},W.width=W.right-W.left,W.height=W.bottom-W.top,W.width<0)W.width=0;if(W.height<0)W.height=0;return W}function kZ(J){return{x:J.clientX,y:J.clientY}}var H$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _1(J=document,Z=new Set){if(Z.has(J))return[];Z.add(J);let Q=[J];for(let $ of Array.from(J.querySelectorAll("iframe, frame")))try{let Y=$.contentDocument;if(Y&&!Z.has(Y))Q.push(..._1(Y,Z))}catch(Y){}try{let $=J.defaultView;if($&&$!==window.top){let Y=$.parent;if(Y&&Y.document&&Y.document!==J)Q.push(..._1(Y.document,Z))}}catch($){}return Q}function n1(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b8(){var J,Z;let Q=n1()?window.visualViewport:null;return{x:(J=Q==null?void 0:Q.offsetLeft)!=null?J:0,y:(Z=Q==null?void 0:Q.offsetTop)!=null?Z:0}}function a1(J){if(!J||!o0(J))return!1;return J instanceof OJ(J).ShadowRoot}function n0(J){if(J&&o0(J)){let Z=J.getRootNode();if(a1(Z))return Z;else if(Z instanceof Document)return Z}return jZ(J)}function g8(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function U$(J){let Q=J.cloneNode(!0),$=Array.from(J.querySelectorAll("input, textarea, select, canvas, [contenteditable]"));return Array.from(Q.querySelectorAll("input, textarea, select, canvas, [contenteditable]")).forEach((q,K)=>{let X=$[K];if(J$(q)&&J$(X)){if(q.type!=="file")q.value=X.value;if(q.type==="radio"&&q.name)q.name=`Cloned__${q.name}`}if(Z$(q)&&Z$(X)&&X.width>0&&X.height>0){let W=q.getContext("2d");W==null||W.drawImage(X,0,0)}}),Q}function J$(J){return"value"in J}function Z$(J){return J.tagName==="CANVAS"}function u8(J,{x:Z,y:Q}){let $=J.elementFromPoint(Z,Q);if(cq($)){let{contentDocument:Y}=$;if(Y){let{left:q,top:K}=$.getBoundingClientRect();return u8(Y,{x:Z-q,y:Q-K})}}return $}function cq(J){return(J==null?void 0:J.tagName)==="IFRAME"}var m8=new WeakMap;function B$(J){return Boolean(J.closest(`
|
|
2
|
-
input:not([disabled]),
|
|
3
|
-
select:not([disabled]),
|
|
4
|
-
textarea:not([disabled]),
|
|
5
|
-
button:not([disabled]),
|
|
6
|
-
a[href],
|
|
7
|
-
[contenteditable]:not([contenteditable="false"])
|
|
8
|
-
`))}var p8=class{constructor(){this.entries=new Set,this.clear=()=>{for(let J of this.entries){let[Z,{type:Q,listener:$,options:Y}]=J;Z.removeEventListener(Q,$,Y)}this.entries.clear()}}bind(J,Z){let Q=Array.isArray(J)?J:[J],$=Array.isArray(Z)?Z:[Z],Y=[];for(let K of Q)for(let X of $){let{type:W,listener:U,options:B}=X,H=[K,X];K.addEventListener(W,U,B),this.entries.add(H),Y.push(H)}let q=this.entries;return function(){for(let X of Y){let[W,{type:U,listener:B,options:H}]=X;W.removeEventListener(U,B,H),q.delete(X)}}}};function EZ(J){let Z=J==null?void 0:J.ownerDocument.defaultView;if(Z&&Z.self!==Z.parent)return Z.frameElement}function lq(J){let Z=new Set,Q=EZ(J);while(Q)Z.add(Q),Q=EZ(Q);return Z}function sq(J,Z){let Q=setTimeout(J,Z);return()=>clearTimeout(Q)}function N$(J,Z){let Q=()=>performance.now(),$,Y;return function(...q){let K=this;if(!Y)J.apply(K,q),Y=Q();else $==null||$(),$=sq(()=>{J.apply(K,q),Y=Q()},Z-(Q()-Y))}}function iq(J,Z){if(J===Z)return!0;if(!J||!Z)return!1;return J.top==Z.top&&J.left==Z.left&&J.right==Z.right&&J.bottom==Z.bottom}function oq(J,Z=J.getBoundingClientRect()){let{width:Q,height:$}=p1(J,Z);return Q>0&&$>0}var nq=H$?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},u1,aq=class extends nq{constructor(J){super((Z)=>{if(!E(this,u1)){AJ(this,u1,!0);return}J(Z,this)});LJ(this,u1,!1)}};u1=new WeakMap;var Q$=Array.from({length:100},(J,Z)=>Z/100),G$=75,DZ,d1,WZ,IZ,_0,YJ,s0,d0,c1,V$,z$,L$=class{constructor(J,Z,Q={debug:!1,skipInitial:!1}){this.element=J,this.callback=Z,LJ(this,c1),this.disconnect=()=>{var q,K,X;AJ(this,s0,!0),(q=E(this,WZ))==null||q.disconnect(),(K=E(this,IZ))==null||K.disconnect(),E(this,_0).disconnect(),(X=E(this,YJ))==null||X.remove()},LJ(this,DZ,!0),LJ(this,d1),LJ(this,WZ),LJ(this,IZ),LJ(this,_0),LJ(this,YJ),LJ(this,s0,!1),LJ(this,d0,N$(()=>{var q,K,X;let{element:W}=this;if((q=E(this,IZ))==null||q.disconnect(),E(this,s0)||!E(this,DZ)||!W.isConnected)return;let U=(K=W.ownerDocument)!=null?K:document,{innerHeight:B,innerWidth:H}=(X=U.defaultView)!=null?X:window,G=W.getBoundingClientRect(),N=p1(W,G),{top:M,left:A,bottom:P,right:C}=N,V=-Math.floor(M),F=-Math.floor(A),z=-Math.floor(H-C),O=-Math.floor(B-P),v=`${V}px ${z}px ${O}px ${F}px`;this.boundingClientRect=G,AJ(this,IZ,new IntersectionObserver((T)=>{let[_]=T,{intersectionRect:u}=_;if((_.intersectionRatio!==1?_.intersectionRatio:FJ.intersectionRatio(u,p1(W)))!==1)E(this,d0).call(this)},{threshold:Q$,rootMargin:v,root:U})),E(this,IZ).observe(W),K$(this,c1,V$).call(this)},G$)),this.boundingClientRect=J.getBoundingClientRect(),AJ(this,DZ,oq(J,this.boundingClientRect));let $=!0;this.callback=(q)=>{if($){if($=!1,Q.skipInitial)return}Z(q)};let Y=J.ownerDocument;if(Q==null?void 0:Q.debug)AJ(this,YJ,document.createElement("div")),E(this,YJ).style.background="rgba(0,0,0,0.15)",E(this,YJ).style.position="fixed",E(this,YJ).style.pointerEvents="none",Y.body.appendChild(E(this,YJ));if(AJ(this,_0,new IntersectionObserver((q)=>{var K,X;let W=q[q.length-1],{boundingClientRect:U,isIntersecting:B}=W,{width:H,height:G}=U,N=E(this,DZ);if(AJ(this,DZ,B),!H&&!G)return;if(N&&!B){if((K=E(this,IZ))==null||K.disconnect(),this.callback(null),(X=E(this,WZ))==null||X.disconnect(),AJ(this,WZ,void 0),E(this,YJ))E(this,YJ).style.visibility="hidden"}else E(this,d0).call(this);if(B&&!E(this,WZ))AJ(this,WZ,new aq(E(this,d0))),E(this,WZ).observe(J)},{threshold:Q$,root:Y})),E(this,DZ)&&!Q.skipInitial)this.callback(this.boundingClientRect);E(this,_0).observe(J)}};DZ=new WeakMap;d1=new WeakMap;WZ=new WeakMap;IZ=new WeakMap;_0=new WeakMap;YJ=new WeakMap;s0=new WeakMap;d0=new WeakMap;c1=new WeakSet;V$=function(){if(E(this,s0))return;if(K$(this,c1,z$).call(this),iq(this.boundingClientRect,E(this,d1)))return;this.callback(this.boundingClientRect),AJ(this,d1,this.boundingClientRect)};z$=function(){if(E(this,YJ)){let{top:J,left:Z,width:Q,height:$}=p1(this.element);E(this,YJ).style.overflow="hidden",E(this,YJ).style.visibility="visible",E(this,YJ).style.top=`${Math.floor(J)}px`,E(this,YJ).style.left=`${Math.floor(Z)}px`,E(this,YJ).style.width=`${Math.floor(Q)}px`,E(this,YJ).style.height=`${Math.floor($)}px`}};var b1=new WeakMap,g1=new WeakMap;function rq(J,Z){let Q=b1.get(J);if(!Q)Q={disconnect:new L$(J,(Y)=>{let q=b1.get(J);if(!q)return;q.callbacks.forEach((K)=>K(Y))},{skipInitial:!0}).disconnect,callbacks:new Set};return Q.callbacks.add(Z),b1.set(J,Q),()=>{if(Q.callbacks.delete(Z),Q.callbacks.size===0)b1.delete(J),Q.disconnect()}}function tq(J,Z){let Q=new Set;for(let $ of J){let Y=rq($,Z);Q.add(Y)}return()=>Q.forEach(($)=>$())}function eq(J,Z){var Q;let $=J.ownerDocument;if(!g1.has($)){let K=new AbortController,X=new Set;document.addEventListener("scroll",(W)=>X.forEach((U)=>U(W)),{capture:!0,passive:!0,signal:K.signal}),g1.set($,{disconnect:()=>K.abort(),listeners:X})}let{listeners:Y,disconnect:q}=(Q=g1.get($))!=null?Q:{};if(!Y||!q)return()=>{};return Y.add(Z),()=>{if(Y.delete(Z),Y.size===0)q(),g1.delete($)}}var c0,l0,m1,x8,M$=class{constructor(J,Z,Q){this.callback=Z,LJ(this,c0),LJ(this,l0,!1),LJ(this,m1),LJ(this,x8,N$((K)=>{if(E(this,l0))return;if(!K.target)return;if("contains"in K.target&&typeof K.target.contains==="function"){for(let X of E(this,m1))if(K.target.contains(X)){this.callback(E(this,c0).boundingClientRect);break}}},G$));let $=lq(J),Y=tq($,Z),q=eq(J,E(this,x8));AJ(this,m1,$),AJ(this,c0,new L$(J,Z,Q)),this.disconnect=()=>{if(E(this,l0))return;AJ(this,l0,!0),Y(),q(),E(this,c0).disconnect()}}};c0=new WeakMap;l0=new WeakMap;m1=new WeakMap;x8=new WeakMap;function r1(J){return"showPopover"in J&&"hidePopover"in J&&typeof J.showPopover==="function"&&typeof J.hidePopover==="function"}function SZ(J){try{if(r1(J)&&J.isConnected&&J.hasAttribute("popover")&&!J.matches(":popover-open"))J.showPopover()}catch(Z){}}function $$(J){if(!H$||!J)return!1;return J===jZ(J).scrollingElement}function F$(J){var Z,Q;let $=OJ(J),Y=$$(J)?pq(J):i1(J),q=$.visualViewport,K=$$(J)?{height:(Z=q==null?void 0:q.height)!=null?Z:$.innerHeight,width:(Q=q==null?void 0:q.width)!=null?Q:$.innerWidth}:{height:J.clientHeight,width:J.clientWidth},X={current:{x:J.scrollLeft,y:J.scrollTop},max:{x:J.scrollWidth-K.width,y:J.scrollHeight-K.height}},W=X.current.y<=0,U=X.current.x<=0,B=X.current.y>=X.max.y,H=X.current.x>=X.max.x;return{rect:Y,position:X,isTop:W,isLeft:U,isBottom:B,isRight:H}}function w$(J,Z){let{isTop:Q,isBottom:$,isLeft:Y,isRight:q,position:K}=F$(J),{x:X,y:W}=Z!=null?Z:{x:0,y:0},U=!Q&&K.current.y+W>0,B=!$&&K.current.y+W<K.max.y,H=!Y&&K.current.x+X>0,G=!q&&K.current.x+X<K.max.x;return{top:U,bottom:B,left:H,right:G,x:H||G,y:U||B}}var _8=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Z,resolvers:Q}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Z)$();for(let $ of Q)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Z)=>this.resolvers.add(Z))}},a0=new _8((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),J5=new _8((J)=>setTimeout(J,50)),l1=new Map,Z5=l1.clear.bind(l1);function lJ(J,Z=!1){if(!Z)return Y$(J);let Q=l1.get(J);if(Q)return Q;return Q=Y$(J),l1.set(J,Q),J5.schedule(Z5),Q}function Y$(J){return OJ(J).getComputedStyle(J)}function Q5(J,Z=lJ(J,!0)){return Z.position==="fixed"||Z.position==="sticky"}function $5(J,Z=lJ(J,!0)){let Q=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((Y)=>{let q=Z[Y];return typeof q==="string"?Q.test(q):!1})}var Y5={excludeElement:!0,escapeShadowDOM:!0};function t1(J,Z=Y5){let{limit:Q,excludeElement:$,escapeShadowDOM:Y}=Z,q=new Set;function K(X){if(Q!=null&&q.size>=Q)return q;if(!X)return q;if(o1(X)&&X.scrollingElement!=null&&!q.has(X.scrollingElement))return q.add(X.scrollingElement),q;if(Y&&a1(X))return K(X.host);if(!tJ(X)){if(W$(X))return K(X.parentElement);return q}if(q.has(X))return q;let W=lJ(X,!0);if($&&X===J);else if($5(X,W))q.add(X);if(Q5(X,W)){let{scrollingElement:U}=X.ownerDocument;if(U)q.add(U);return q}return K(X.parentNode)}if(!J)return q;return K(J)}function hZ(J,Z=window.frameElement){let Q={x:0,y:0,scaleX:1,scaleY:1};if(!J)return Q;let $=EZ(J);while($){if($===Z)return Q;let Y=i1($),{x:q,y:K}=q5($,Y);Q.x=Q.x+Y.left,Q.y=Q.y+Y.top,Q.scaleX=Q.scaleX*q,Q.scaleY=Q.scaleY*K,$=EZ($)}return Q}function q5(J,Z=i1(J)){let Q=Math.round(Z.width),$=Math.round(Z.height);if(tJ(J))return{x:Q/J.offsetWidth,y:$/J.offsetHeight};let Y=lJ(J,!0);return{x:(parseFloat(Y.width)||Q)/Q,y:(parseFloat(Y.height)||$)/$}}function X5(J){if(J==="none")return null;let Z=J.split(" "),Q=parseFloat(Z[0]),$=parseFloat(Z[1]);if(isNaN(Q)&&isNaN($))return null;return{x:isNaN(Q)?$:Q,y:isNaN($)?Q:$}}function G0(J){if(J==="none")return null;let[Z,Q,$="0"]=J.split(" "),Y={x:parseFloat(Z),y:parseFloat(Q),z:parseInt($,10)};if(isNaN(Y.x)&&isNaN(Y.y))return null;return{x:isNaN(Y.x)?0:Y.x,y:isNaN(Y.y)?0:Y.y,z:isNaN(Y.z)?0:Y.z}}function r0(J){var Z,Q,$,Y,q,K,X,W,U;let{scale:B,transform:H,translate:G}=J,N=X5(B),M=G0(G),A=K5(H);if(!A&&!N&&!M)return null;let P={x:(Z=N==null?void 0:N.x)!=null?Z:1,y:(Q=N==null?void 0:N.y)!=null?Q:1},C={x:($=M==null?void 0:M.x)!=null?$:0,y:(Y=M==null?void 0:M.y)!=null?Y:0},V={x:(q=A==null?void 0:A.x)!=null?q:0,y:(K=A==null?void 0:A.y)!=null?K:0,scaleX:(X=A==null?void 0:A.scaleX)!=null?X:1,scaleY:(W=A==null?void 0:A.scaleY)!=null?W:1};return{x:C.x+V.x,y:C.y+V.y,z:(U=M==null?void 0:M.z)!=null?U:0,scaleX:P.x*V.scaleX,scaleY:P.y*V.scaleY}}function K5(J){if(J.startsWith("matrix3d(")){let Z=J.slice(9,-1).split(/, /);return{x:+Z[12],y:+Z[13],scaleX:+Z[0],scaleY:+Z[5]}}else if(J.startsWith("matrix(")){let Z=J.slice(7,-1).split(/, /);return{x:+Z[4],y:+Z[5],scaleX:+Z[0],scaleY:+Z[3]}}return null}var RJ=((J)=>{return J[J.Idle=0]="Idle",J[J.Forward=1]="Forward",J[J.Reverse=-1]="Reverse",J})(RJ||{}),W5={x:0.2,y:0.2},H5={x:10,y:10};function A$(J,Z,Q,$=25,Y=W5,q=H5){let{x:K,y:X}=Z,{rect:W,isTop:U,isBottom:B,isLeft:H,isRight:G}=F$(J),N=hZ(J),M=lJ(J,!0),A=r0(M),P=A!==null?(A==null?void 0:A.scaleX)<0:!1,C=A!==null?(A==null?void 0:A.scaleY)<0:!1,V=new FJ(W.left*N.scaleX+N.x,W.top*N.scaleY+N.y,W.width*N.scaleX,W.height*N.scaleY),F={x:0,y:0},z={x:0,y:0},O={height:V.height*Y.y,width:V.width*Y.x};if(O.height>0&&(!U||C&&!B)&&X<=V.top+O.height&&(Q==null?void 0:Q.y)!==1&&K>=V.left-q.x&&K<=V.right+q.x)F.y=C?1:-1,z.y=$*Math.abs((V.top+O.height-X)/O.height);else if(O.height>0&&(!B||C&&!U)&&X>=V.bottom-O.height&&(Q==null?void 0:Q.y)!==-1&&K>=V.left-q.x&&K<=V.right+q.x)F.y=C?-1:1,z.y=$*Math.abs((V.bottom-O.height-X)/O.height);if(O.width>0&&(!G||P&&!H)&&K>=V.right-O.width&&(Q==null?void 0:Q.x)!==-1&&X>=V.top-q.y&&X<=V.bottom+q.y)F.x=P?-1:1,z.x=$*Math.abs((V.right-O.width-K)/O.width);else if(O.width>0&&(!H||P&&!G)&&K<=V.left+O.width&&(Q==null?void 0:Q.x)!==1&&X>=V.top-q.y&&X<=V.bottom+q.y)F.x=P?1:-1,z.x=$*Math.abs((V.left+O.width-K)/O.width);return{direction:F,speed:z}}function O$(J,{block:Z="nearest",inline:Q="nearest"}={}){if(!tJ(J))return;let $=t1(J),Y=[];for(let q of $){if(!tJ(q))continue;let{top:K,left:X}=U5(J,q),W=K,U=X;for(let B of Y)W-=B.scrollTop,U-=B.scrollLeft;if(Z!=="none"){let B=W<q.scrollTop,H=W+J.offsetHeight>q.scrollTop+q.clientHeight;if(B!==H)if(Z==="center")q.scrollTop=W-q.clientHeight/2+J.offsetHeight/2;else if(B)q.scrollTop=W;else q.scrollTop=W+J.offsetHeight-q.clientHeight}if(Q!=="none"){let B=U<q.scrollLeft,H=U+J.offsetWidth>q.scrollLeft+q.clientWidth;if(B!==H)if(Q==="center")q.scrollLeft=U-q.clientWidth/2+J.offsetWidth/2;else if(B)q.scrollLeft=U;else q.scrollLeft=U+J.offsetWidth-q.clientWidth}Y.push(q)}}function q$(J){let Z=0,Q=0,$=J;while($){Z+=$.offsetTop,Q+=$.offsetLeft;let Y=$.offsetParent;if(!tJ(Y))break;Z+=Y.clientTop,Q+=Y.clientLeft,$=Y}return{top:Z,left:Q}}function U5(J,Z){let Q=q$(J),$=q$(Z);return{top:Q.top-$.top-Z.clientTop,left:Q.left-$.left-Z.clientLeft}}function B5(J,Z,Q){let{scaleX:$,scaleY:Y,x:q,y:K}=Z,X=J.left+q+(1-$)*parseFloat(Q),W=J.top+K+(1-Y)*parseFloat(Q.slice(Q.indexOf(" ")+1)),U=$?J.width*$:J.width,B=Y?J.height*Y:J.height;return{width:U,height:B,top:W,right:X+U,bottom:W+B,left:X}}function N5(J,Z,Q){let{scaleX:$,scaleY:Y,x:q,y:K}=Z,X=J.left-q-(1-$)*parseFloat(Q),W=J.top-K-(1-Y)*parseFloat(Q.slice(Q.indexOf(" ")+1)),U=$?J.width/$:J.width,B=Y?J.height/Y:J.height;return{width:U,height:B,top:W,right:X+U,bottom:W+B,left:X}}function R$({element:J,keyframes:Z,options:Q}){return J.animate(Z,Q).finished}function RK(J,Z=lJ(J).translate,Q=!0){if(Q){let $=f8(J,(Y)=>("translate"in Y));if($){let{translate:Y=""}=$[0];if(typeof Y==="string"){let q=G0(Y);if(q)return q}}}if(Z){let $=G0(Z);if($)return $}return{x:0,y:0,z:0}}var G5=new _8((J)=>setTimeout(J,0)),i0=new Map,V5=i0.clear.bind(i0);function z5(J){let Z=J.ownerDocument,Q=i0.get(Z);if(Q)return Q;Q=Z.getAnimations(),i0.set(Z,Q),G5.schedule(V5);let $=Q.filter((Y)=>s1(Y.effect)&&Y.effect.target===J);return i0.set(J,$),Q}function L5(J,Z){let Q=z5(J).filter(($)=>{var Y,q;if(s1($.effect)){let{target:K}=$.effect;if((q=K&&((Y=Z.isValidTarget)==null?void 0:Y.call(Z,K)))!=null?q:!0)return $.effect.getKeyframes().some((W)=>{for(let U of Z.properties)if(W[U])return!0})}}).map(($)=>{let{effect:Y,currentTime:q}=$,K=Y==null?void 0:Y.getComputedTiming().duration;if($.pending||$.playState==="finished")return;if(typeof K=="number"&&typeof q=="number"&&q<K)return $.currentTime=K,()=>{$.currentTime=q}});if(Q.length>0)return()=>Q.forEach(($)=>$==null?void 0:$())}var eJ=class extends FJ{constructor(J,Z={}){var Q,$,Y,q;let{frameTransform:K=hZ(J),ignoreTransforms:X,getBoundingClientRect:W=i1}=Z,U=L5(J,{properties:["transform","translate","scale","width","height"],isValidTarget:(O)=>(O!==J||n1())&&O.contains(J)}),B=W(J),{top:H,left:G,width:N,height:M}=B,A,P=lJ(J),C=r0(P),V={x:(Q=C==null?void 0:C.scaleX)!=null?Q:1,y:($=C==null?void 0:C.scaleY)!=null?$:1},F=M5(J,P);if(U==null||U(),C){if(A=N5(B,C,P.transformOrigin),X||F)H=A.top,G=A.left,N=A.width,M=A.height}let z={width:(Y=A==null?void 0:A.width)!=null?Y:N,height:(q=A==null?void 0:A.height)!=null?q:M};if(F&&!X&&A){let O=B5(A,F,P.transformOrigin);H=O.top,G=O.left,N=O.width,M=O.height,V.x=F.scaleX,V.y=F.scaleY}if(K){if(!X)G*=K.scaleX,N*=K.scaleX,H*=K.scaleY,M*=K.scaleY;G+=K.x,H+=K.y}super(G,H,N,M);this.scale=V,this.intrinsicWidth=z.width,this.intrinsicHeight=z.height}};function M5(J,Z){let Q=J.getAnimations();if(!Q.length)return null;let $,Y,q,K=!1;for(let X of Q){if(X.playState!=="running")continue;let W=s1(X.effect)?X.effect.getKeyframes():[],U=W[W.length-1];if(!U)continue;let{transform:B,translate:H,scale:G}=U;if(typeof B==="string"&&B)$=B,K=!0;if(typeof H==="string"&&H)Y=H,K=!0;if(typeof G==="string"&&G)q=G,K=!0}if(!K)return null;return r0({transform:$!=null?$:Z.transform,translate:Y!=null?Y:Z.translate,scale:q!=null?q:Z.scale})}function N0(J){return"style"in J&&typeof J.style==="object"&&J.style!==null&&"setProperty"in J.style&&"removeProperty"in J.style&&typeof J.style.setProperty==="function"&&typeof J.style.removeProperty==="function"}var P$=class{constructor(J){this.element=J,this.initial=new Map}set(J,Z=""){let{element:Q}=this;if(!N0(Q))return;for(let[$,Y]of Object.entries(J)){let q=`${Z}${$}`;if(!this.initial.has(q))this.initial.set(q,Q.style.getPropertyValue(q));Q.style.setProperty(q,typeof Y==="string"?Y:`${Y}px`)}}remove(J,Z=""){let{element:Q}=this;if(!N0(Q))return;for(let $ of J){let Y=`${Z}${$}`;Q.style.removeProperty(Y)}}reset(){let{element:J}=this;if(!N0(J))return;for(let[Z,Q]of this.initial)J.style.setProperty(Z,Q);if(J.getAttribute("style")==="")J.removeAttribute("style")}};function HZ(J){if(!J)return!1;return J instanceof OJ(J).Element||o0(J)&&J.nodeType===Node.ELEMENT_NODE}function e1(J){if(!J)return!1;let{KeyboardEvent:Z}=OJ(J.target);return J instanceof Z}function C$(J){if(!J)return!1;let{PointerEvent:Z}=OJ(J.target);return J instanceof Z}function T$(J){if(!HZ(J))return!1;let{tagName:Z}=J;return Z==="INPUT"||Z==="TEXTAREA"||F5(J)}function F5(J){return J.hasAttribute("contenteditable")&&J.getAttribute("contenteditable")!=="false"}var h8={};function J9(J){let Z=h8[J]==null?0:h8[J]+1;return h8[J]=Z,`${J}-${Z}`}var w5=({dragOperation:J,droppable:Z})=>{let Q=J.position.current;if(!Q)return null;let{id:$}=Z;if(!Z.shape)return null;if(Z.shape.containsPoint(Q)){let Y=HJ.distance(Z.shape.center,Q);return{id:$,value:1/Y,type:cJ.PointerIntersection,priority:dJ.High}}return null},A5=({dragOperation:J,droppable:Z})=>{let{shape:Q}=J;if(!Z.shape||!(Q==null?void 0:Q.current))return null;let $=Q.current.intersectionArea(Z.shape);if($){let{position:Y}=J,q=HJ.distance(Z.shape.center,Y.current),X=$/(Q.current.area+Z.shape.area-$)/q;return{id:Z.id,value:X,type:cJ.ShapeIntersection,priority:dJ.Normal}}return null},D$=(J)=>{var Z;return(Z=w5(J))!=null?Z:A5(J)},bK=(J)=>{let{dragOperation:Z,droppable:Q}=J,{shape:$,position:Y}=Z;if(!Q.shape)return null;let q=$?FJ.from($.current.boundingRectangle).corners:void 0,X=FJ.from(Q.shape.boundingRectangle).corners.reduce((W,U,B)=>{var H;return W+HJ.distance(HJ.from(U),(H=q==null?void 0:q[B])!=null?H:Y.current)},0)/4;return{id:Q.id,value:1/X,type:cJ.Collision,priority:dJ.Normal}};var{create:O5,defineProperty:Q2,defineProperties:R5,getOwnPropertyDescriptor:P5,getOwnPropertyDescriptors:C5,getOwnPropertySymbols:$9}=Object,f$=Object.prototype.hasOwnProperty,v$=Object.prototype.propertyIsEnumerable,b$=(J,Z)=>(Z=Symbol[J])?Z:Symbol.for("Symbol."+J),O0=(J)=>{throw TypeError(J)},l8=(J,Z,Q)=>(Z in J)?Q2(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,Y1=(J,Z)=>{for(var Q in Z||(Z={}))if(f$.call(Z,Q))l8(J,Q,Z[Q]);if($9){for(var Q of $9(Z))if(v$.call(Z,Q))l8(J,Q,Z[Q])}return J},$2=(J,Z)=>R5(J,C5(Z)),I$=(J,Z)=>Q2(J,"name",{value:Z,configurable:!0}),g$=(J,Z)=>{var Q={};for(var $ in J)if(f$.call(J,$)&&Z.indexOf($)<0)Q[$]=J[$];if(J!=null&&$9){for(var $ of $9(J))if(Z.indexOf($)<0&&v$.call(J,$))Q[$]=J[$]}return Q},R0=(J)=>{var Z;return[,,,O5((Z=J==null?void 0:J[b$("metadata")])!=null?Z:null)]},u$=["class","method","getter","setter","accessor","field","value","get","set"],e0=(J)=>J!==void 0&&typeof J!=="function"?O0("Function expected"):J,T5=(J,Z,Q,$,Y)=>({kind:u$[J],name:Z,metadata:$,addInitializer:(q)=>Q._?O0("Already initialized"):Y.push(e0(q||null))}),bZ=(J,Z)=>l8(Z,b$("metadata"),J[3]),ZJ=(J,Z,Q,$)=>{for(var Y=0,q=J[Z>>1],K=q&&q.length;Y<K;Y++)Z&1?q[Y].call(Q):$=q[Y].call(Q,$);return $},EJ=(J,Z,Q,$,Y,q)=>{var K,X,W,U,B,H=Z&7,G=!!(Z&8),N=!!(Z&16),M=H>3?J.length+1:H?G?1:2:0,A=u$[H+5],P=H>3&&(J[M-1]=[]),C=J[M]||(J[M]=[]),V=H&&(!N&&!G&&(Y=Y.prototype),H<5&&(H>3||!N)&&P5(H<4?Y:{get[Q](){return p(this,q)},set[Q](z){return VJ(this,q,z)}},Q));H?N&&H<4&&I$(q,(H>2?"set ":H>1?"get ":"")+Q):I$(Y,Q);for(var F=$.length-1;F>=0;F--){if(U=T5(H,Q,W={},J[3],C),H){if(U.static=G,U.private=N,B=U.access={has:N?(z)=>D5(Y,z):(z)=>(Q in z)},H^3)B.get=N?(z)=>(H^1?p:vZ)(z,Y,H^4?q:V.get):(z)=>z[Q];if(H>2)B.set=N?(z,O)=>VJ(z,Y,O,H^4?q:V.set):(z,O)=>z[Q]=O}if(X=(0,$[F])(H?H<4?N?q:V[A]:H>4?void 0:{get:V.get,set:V.set}:Y,U),W._=1,H^4||X===void 0)e0(X)&&(H>4?P.unshift(X):H?N?q=X:V[A]=X:Y=X);else if(typeof X!=="object"||X===null)O0("Object expected");else e0(K=X.get)&&(V.get=K),e0(K=X.set)&&(V.set=K),e0(K=X.init)&&P.unshift(K)}return H||bZ(J,Y),V&&Q2(Y,Q,V),N?H^4?q:V:Y},Y2=(J,Z,Q)=>Z.has(J)||O0("Cannot "+Q),D5=(J,Z)=>Object(Z)!==Z?O0('Cannot use the "in" operator on this value'):J.has(Z),p=(J,Z,Q)=>(Y2(J,Z,"read from private field"),Q?Q.call(J):Z.get(J)),a=(J,Z,Q)=>Z.has(J)?O0("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),VJ=(J,Z,Q,$)=>(Y2(J,Z,"write to private field"),$?$.call(J,Q):Z.set(J,Q),Q),vZ=(J,Z,Q)=>(Y2(J,Z,"access private method"),Q),E$={role:"button",roleDescription:"draggable"},I5="dnd-kit-description",E5="dnd-kit-announcement",j5={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},k5={dragstart({operation:{source:J}}){if(!J)return;return`Picked up draggable item ${J.id}.`},dragover({operation:{source:J,target:Z}}){if(!J||J.id===(Z==null?void 0:Z.id))return;if(Z)return`Draggable item ${J.id} was moved over droppable target ${Z.id}.`;return`Draggable item ${J.id} is no longer over a droppable target.`},dragend({operation:{source:J,target:Z},canceled:Q}){if(!J)return;if(Q)return`Dragging was cancelled. Draggable item ${J.id} was dropped.`;if(Z)return`Draggable item ${J.id} was dropped over droppable target ${Z.id}`;return`Draggable item ${J.id} was dropped.`}};function S5(J){let Z=J.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(Z)}function h5(J,Z){let Q=document.createElement("div");return Q.id=J,Q.style.setProperty("display","none"),Q.textContent=Z,Q}function x5(J){let Z=document.createElement("div");return Z.id=J,Z.setAttribute("role","status"),Z.setAttribute("aria-live","polite"),Z.setAttribute("aria-atomic","true"),Z.style.setProperty("position","fixed"),Z.style.setProperty("width","1px"),Z.style.setProperty("height","1px"),Z.style.setProperty("margin","-1px"),Z.style.setProperty("border","0"),Z.style.setProperty("padding","0"),Z.style.setProperty("overflow","hidden"),Z.style.setProperty("clip","rect(0 0 0 0)"),Z.style.setProperty("clip-path","inset(100%)"),Z.style.setProperty("white-space","nowrap"),Z}var y5=["dragover","dragmove"],f5=class extends GJ{constructor(J,Z){super(J);let{id:Q,idPrefix:{description:$=I5,announcement:Y=E5}={},announcements:q=k5,screenReaderInstructions:K=j5,debounce:X=500}=Z!=null?Z:{},W=Q?`${$}-${Q}`:J9($),U=Q?`${Y}-${Q}`:J9(Y),B,H,G,N,M=(O=N)=>{if(!G||!O)return;if((G==null?void 0:G.nodeValue)!==O)G.nodeValue=O},A=()=>a0.schedule(M),P=v5(A,X),C=Object.entries(q).map(([O,v])=>{return this.manager.monitor.addEventListener(O,(T,_)=>{let u=G;if(!u)return;let f=v==null?void 0:v(T,_);if(f&&u.nodeValue!==f)if(N=f,y5.includes(O))P();else A(),P.cancel()})}),V=()=>{let O=[];if(!(B==null?void 0:B.isConnected))B=h5(W,K.draggable),O.push(B);if(!(H==null?void 0:H.isConnected))H=x5(U),G=document.createTextNode(""),H.appendChild(G),O.push(H);if(O.length>0)document.body.append(...O)},F=new Set;function z(){for(let O of F)O()}this.registerEffect(()=>{var O;F.clear();for(let v of this.manager.registry.draggables.value){let T=(O=v.handle)!=null?O:v.element;if(T){if(!B||!H)F.add(V);if((!S5(T)||n1())&&!T.hasAttribute("tabindex"))F.add(()=>T.setAttribute("tabindex","0"));if(!T.hasAttribute("role")&&T.tagName.toLowerCase()!=="button")F.add(()=>T.setAttribute("role",E$.role));if(!T.hasAttribute("aria-roledescription"))F.add(()=>T.setAttribute("aria-roledescription",E$.roleDescription));if(!T.hasAttribute("aria-describedby"))F.add(()=>T.setAttribute("aria-describedby",W));for(let u of["aria-pressed","aria-grabbed"]){let f=String(v.isDragging);if(T.getAttribute(u)!==f)F.add(()=>T.setAttribute(u,f))}let _=String(v.disabled);if(T.getAttribute("aria-disabled")!==_)F.add(()=>T.setAttribute("aria-disabled",_))}}if(F.size>0)a0.schedule(z)}),this.destroy=()=>{super.destroy(),B==null||B.remove(),H==null||H.remove(),C.forEach((O)=>O())}}};function v5(J,Z){let Q,$=()=>{clearTimeout(Q),Q=setTimeout(J,Z)};return $.cancel=()=>clearTimeout(Q),$}var Y9=new Map,m$,p$,_$,d$,s8,Q1,JZ,q2,w0,c$,l$,s$,i$,VZ=class extends(s8=B0,d$=[x],_$=[d],p$=[d],m$=[d],s8){constructor(Z,Q){super(Z,Q);ZJ(JZ,5,this),a(this,w0),a(this,Q1,new Set),a(this,q2,ZJ(JZ,8,this,new Set)),ZJ(JZ,11,this),this.registerEffect(vZ(this,w0,c$))}register(Z){return p(this,Q1).add(Z),()=>{p(this,Q1).delete(Z)}}addRoot(Z){return S(()=>{let Q=new Set(this.additionalRoots);Q.add(Z),this.additionalRoots=Q}),()=>{S(()=>{let Q=new Set(this.additionalRoots);Q.delete(Z),this.additionalRoots=Q})}}get sourceRoot(){var Z;let{source:Q}=this.manager.dragOperation;return n0((Z=Q==null?void 0:Q.element)!=null?Z:null)}get targetRoot(){var Z;let{target:Q}=this.manager.dragOperation;return n0((Z=Q==null?void 0:Q.element)!=null?Z:null)}get roots(){let{status:Z}=this.manager.dragOperation;if(Z.initializing||Z.initialized){let Q=[this.sourceRoot,this.targetRoot].filter(($)=>$!=null);return new Set([...Q,...this.additionalRoots])}return new Set}};JZ=R0(s8);Q1=new WeakMap;q2=new WeakMap;w0=new WeakSet;c$=function(){let{roots:J}=this,Z=[];for(let Q of J)for(let $ of p(this,Q1))Z.push(vZ(this,w0,l$).call(this,Q,$));return()=>{for(let Q of Z)Q()}};l$=function(J,Z){let Q=Y9.get(J);if(!Q)Q=new Map,Y9.set(J,Q);let $=Q.get(Z);if(!$){let q=o1(J)?vZ(this,w0,s$).call(this,J,Q,Z):vZ(this,w0,i$).call(this,J,Q,Z);if(!q)return()=>{};$=q,Q.set(Z,$)}$.refCount++;let Y=!1;return()=>{if(Y)return;if(Y=!0,$.refCount--,$.refCount===0)$.cleanup()}};s$=function(J,Z,Q){var $;let Y=J.createElement("style"),{nonce:q}=($=this.options)!=null?$:{};if(q)Y.setAttribute("nonce",q);Y.textContent=Q,J.head.prepend(Y);let K=new MutationObserver((X)=>{for(let W of X)for(let U of Array.from(W.removedNodes))if(U===Y){J.head.prepend(Y);return}});return K.observe(J.head,{childList:!0}),{refCount:0,cleanup:()=>{if(K.disconnect(),Y.remove(),Z.delete(Q),Z.size===0)Y9.delete(J)}}};i$=function(J,Z,Q){"adoptedStyleSheets"in J&&Array.isArray(J.adoptedStyleSheets);let $=J.ownerDocument.defaultView,{CSSStyleSheet:Y}=$!=null?$:{};if(!Y)return null;let q=new Y;return q.replaceSync(Q),J.adoptedStyleSheets.push(q),{refCount:0,cleanup:()=>{var K;if(a1(J)&&((K=J.host)==null?void 0:K.isConnected)){let X=J.adoptedStyleSheets.indexOf(q);if(X!==-1)J.adoptedStyleSheets.splice(X,1)}if(Z.delete(Q),Z.size===0)Y9.delete(J)}}};EJ(JZ,4,"additionalRoots",d$,VZ,q2);EJ(JZ,2,"sourceRoot",_$,VZ);EJ(JZ,2,"targetRoot",p$,VZ);EJ(JZ,2,"roots",m$,VZ);bZ(JZ,VZ);VZ.configure=U0(VZ);var W9=VZ,b5=class extends GJ{constructor(J,Z){super(J,Z);this.manager=J;let{cursor:Q="grabbing"}=Z!=null?Z:{},$=J.registry.plugins.get(W9),Y=$==null?void 0:$.register(`* { cursor: ${Q} !important; }`);if(Y){let q=this.destroy.bind(this);this.destroy=()=>{Y(),q()}}}},W1="data-dnd-",i8=`${W1}dropping`,qJ="--dnd-",sJ=`${W1}dragging`,q9=`${W1}placeholder`,g5=[sJ,q9,"popover","aria-pressed","aria-grabbing"],u5=["view-transition-name"],m5=`
|
|
9
|
-
:is(:root,:host) [${sJ}] {
|
|
10
|
-
position: fixed !important;
|
|
11
|
-
pointer-events: none !important;
|
|
12
|
-
touch-action: none;
|
|
13
|
-
z-index: calc(infinity);
|
|
14
|
-
will-change: translate;
|
|
15
|
-
top: var(${qJ}top, 0px) !important;
|
|
16
|
-
left: var(${qJ}left, 0px) !important;
|
|
17
|
-
right: unset !important;
|
|
18
|
-
bottom: unset !important;
|
|
19
|
-
width: var(${qJ}width, auto);
|
|
20
|
-
max-width: var(${qJ}width, auto);
|
|
21
|
-
height: var(${qJ}height, auto);
|
|
22
|
-
max-height: var(${qJ}height, auto);
|
|
23
|
-
transform: var(${qJ}transform, none) !important;
|
|
24
|
-
transition: var(${qJ}transition) !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:is(:root,:host) [${q9}] {
|
|
28
|
-
transition: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
:is(:root,:host) [${q9}='hidden'] {
|
|
32
|
-
visibility: hidden;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[${sJ}] * {
|
|
36
|
-
pointer-events: none !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
[${sJ}]:not([${i8}]) {
|
|
40
|
-
translate: var(${qJ}translate) !important;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[${sJ}][style*='${qJ}scale'] {
|
|
44
|
-
scale: var(${qJ}scale) !important;
|
|
45
|
-
transform-origin: var(${qJ}transform-origin) !important;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@layer dnd-kit {
|
|
49
|
-
:where([${sJ}][popover]) {
|
|
50
|
-
overflow: visible;
|
|
51
|
-
background: unset;
|
|
52
|
-
border: unset;
|
|
53
|
-
margin: unset;
|
|
54
|
-
padding: unset;
|
|
55
|
-
color: inherit;
|
|
56
|
-
|
|
57
|
-
&:is(input, button) {
|
|
58
|
-
border: revert;
|
|
59
|
-
background: revert;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
[${sJ}]::backdrop, [${W1}overlay]:not([${sJ}]) {
|
|
64
|
-
display: none;
|
|
65
|
-
visibility: hidden;
|
|
66
|
-
}
|
|
67
|
-
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function p5(J,Z="hidden"){return S(()=>{let{element:Q,manager:$}=J;if(!Q||!$)return;let Y=_5(Q,$.registry.droppables),q=[],K=U$(Q),{remove:X}=K;return d5(Y,K,q),c5(K,Z),K.remove=()=>{q.forEach((W)=>W()),X.call(K)},K})}function _5(J,Z){let Q=new Map;for(let $ of Z){if(!$.element)continue;if(J===$.element||J.contains($.element)){let Y=`${W1}${J9("dom-id")}`;$.element.setAttribute(Y,""),Q.set($,Y)}}return Q}function d5(J,Z,Q){for(let[$,Y]of J){if(!$.element)continue;let q=`[${Y}]`,K=Z.matches(q)?Z:Z.querySelector(q);if($.element.removeAttribute(Y),!K)continue;let X=$.element;$.proxy=K,K.removeAttribute(Y),m8.set(X,K),Q.push(()=>{m8.delete(X),$.proxy=void 0})}}function c5(J,Z="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(q9,Z)}function o$(J,Z){if(J===Z)return!0;return EZ(J)===EZ(Z)}function j$(J){let{target:Z}=J;if("newState"in J&&J.newState==="closed"&&HZ(Z)&&Z.hasAttribute("popover"))requestAnimationFrame(()=>SZ(Z))}function o8(J){return J.tagName==="TR"}function l5(J,Z,Q){let $=new MutationObserver((Y)=>{let q=!1;for(let K of Y){if(K.target!==J){q=!0;continue}if(K.type!=="attributes")continue;let X=K.attributeName;if(X.startsWith("aria-")||g5.includes(X))continue;let W=J.getAttribute(X);if(X==="style"){if(N0(J)&&N0(Z)){let U=J.style;for(let B of Array.from(Z.style))if(U.getPropertyValue(B)==="")Z.style.removeProperty(B);for(let B of Array.from(U)){if(u5.includes(B)||B.startsWith(qJ))continue;let H=U.getPropertyValue(B);Z.style.setProperty(B,H)}}}else if(W!==null)Z.setAttribute(X,W);else Z.removeAttribute(X)}if(q&&Q)Z.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function s5(J,Z,Q){let $=new MutationObserver((Y)=>{for(let q of Y){if(q.addedNodes.length===0)continue;for(let K of Array.from(q.addedNodes)){if(K.contains(J)&&J.nextElementSibling!==Z){J.insertAdjacentElement("afterend",Z),SZ(Q);return}if(K.contains(Z)&&Z.previousElementSibling!==J){Z.insertAdjacentElement("beforebegin",J),SZ(Q);return}}}if(J.isConnected&&Z.isConnected&&J.nextElementSibling!==Z)J.insertAdjacentElement("afterend",Z),SZ(Q)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function i5(J){return new ResizeObserver(()=>{var Z,Q,$;let Y=new eJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),q=(Z=J.transformOrigin)!=null?Z:{x:1,y:1},K=(J.width-Y.width)*q.x+J.delta.x,X=(J.height-Y.height)*q.y+J.delta.y,W=b8();if(J.styles.set({width:Y.width-J.widthOffset,height:Y.height-J.heightOffset,top:J.top+X+W.y,left:J.left+K+W.x},qJ),(Q=J.getElementMutationObserver())==null||Q.takeRecords(),o8(J.element)&&o8(J.placeholder)){let A=Array.from(J.element.cells),P=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(A.map((C)=>C.style.width));for(let[C,V]of A.entries()){let F=P[C];V.style.width=`${F.getBoundingClientRect().width}px`}}let U=($=J.getTranslate())!=null?$:{x:0,y:0},B=J.left+K+W.x+U.x,H=J.top+X+W.y+U.y,G=Y.width-J.widthOffset,N=Y.height-J.heightOffset,M=J.frameTransform;J.dragOperation.shape=new FJ(B*M.scaleX+M.x,H*M.scaleY+M.y,G*M.scaleX,N*M.scaleY)})}var o5=250,n5="ease";function a5(J){var Z,Q,$,Y;let{animation:q}=J;if(typeof q==="function"){let V=q({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(V).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:K=o5,easing:X=n5}=q!=null?q:{};SZ(J.feedbackElement);let[,W]=(Z=f8(J.feedbackElement,(V)=>("translate"in V)))!=null?Z:[];W==null||W.pause();let U=(Q=J.placeholder)!=null?Q:J.element,B={frameTransform:o$(J.feedbackElement,U)?null:void 0},H=new eJ(J.feedbackElement,B),G=($=G0(lJ(J.feedbackElement).translate))!=null?$:J.translate,N=new eJ(U,B),M=FJ.delta(H,N,J.alignment),A={x:G.x-M.x,y:G.y-M.y},P=Math.round(H.intrinsicHeight)!==Math.round(N.intrinsicHeight)?{minHeight:[`${H.intrinsicHeight}px`,`${N.intrinsicHeight}px`],maxHeight:[`${H.intrinsicHeight}px`,`${N.intrinsicHeight}px`]}:{},C=Math.round(H.intrinsicWidth)!==Math.round(N.intrinsicWidth)?{minWidth:[`${H.intrinsicWidth}px`,`${N.intrinsicWidth}px`],maxWidth:[`${H.intrinsicWidth}px`,`${N.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},qJ),J.feedbackElement.setAttribute(i8,""),(Y=J.getElementMutationObserver())==null||Y.takeRecords(),R$({element:J.feedbackElement,keyframes:$2(Y1(Y1({},P),C),{translate:[`${G.x}px ${G.y}px 0`,`${A.x}px ${A.y}px 0`]}),options:{duration:g8(OJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?K:0,easing:X}}).then(()=>{J.feedbackElement.removeAttribute(i8),W==null||W.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var n$,n8,q1,X2,Q9,a$,r$,A0=class extends(n8=GJ,n$=[x],n8){constructor(Z,Q){super(Z,Q);a(this,Q9),a(this,X2,ZJ(q1,8,this)),ZJ(q1,11,this),this.state={initial:{},current:{}};let $=Z.registry.plugins.get(W9),Y=$==null?void 0:$.register(m5);if(Y){let q=this.destroy.bind(this);this.destroy=()=>{Y(),q()}}this.registerEffect(vZ(this,Q9,a$).bind(this,$)),this.registerEffect(vZ(this,Q9,r$))}};q1=R0(n8);X2=new WeakMap;Q9=new WeakSet;a$=function(J){let{overlay:Z}=this;if(!Z||!J)return;let Q=n0(Z);if(!Q)return;return J.addRoot(Q)};r$=function(){var J,Z,Q,$,Y,q,K;let{state:X,manager:W,options:U}=this,{dragOperation:B}=W,{position:H,source:G,status:N}=B;if(N.idle){X.current={},X.initial={};return}if(!G)return;let{element:M}=G,A=G.pluginConfig(A0),P=(Z=(J=A==null?void 0:A.feedback)!=null?J:U==null?void 0:U.feedback)!=null?Z:"default",C=typeof P==="function"?P(G,W):P;if(!M||C==="none"||!N.initialized||N.initializing)return;let{initial:V}=X,F=(Q=this.overlay)!=null?Q:M,z=hZ(F),O=hZ(M),v=!o$(M,F),T=new eJ(M,{frameTransform:v?O:null,ignoreTransforms:!v}),_={x:O.scaleX/z.scaleX,y:O.scaleY/z.scaleY},{width:u,height:f,top:PJ,left:l}=T;if(v)u=u/_.x,f=f/_.y;let g=new P$(F),iJ=lJ(M),{transition:dZ,translate:LZ,boxSizing:C0,paddingBlockStart:cZ,paddingBlockEnd:T0,paddingInlineStart:D0,paddingInlineEnd:I0,borderInlineStartWidth:s,borderInlineEndWidth:MZ,borderBlockStartWidth:j9,borderBlockEndWidth:k9}=iJ,kJ=dZ.split(",").filter((h)=>!/^\s*(transform|translate|scale)\b/.test(h)).join(","),SJ=r0(iJ),vJ=iJ.transform,lZ=C==="clone",CJ=C0==="content-box",FZ=CJ?parseInt(D0)+parseInt(I0)+parseInt(s)+parseInt(MZ):0,B1=CJ?parseInt(cZ)+parseInt(T0)+parseInt(j9)+parseInt(k9):0,i=C!=="move"&&!this.overlay?p5(G,lZ?"clone":"hidden"):null,wZ=S(()=>e1(W.dragOperation.activatorEvent));if(!V.translate){if(this.overlay&&SJ)V.translate={x:SJ.x,y:SJ.y};else if(LZ!=="none"){let h=G0(LZ);if(h)V.translate=h}}if(!V.transformOrigin){let h=S(()=>H.current),e=l+(($=SJ==null?void 0:SJ.x)!=null?$:0),MJ=PJ+((Y=SJ==null?void 0:SJ.y)!=null?Y:0);V.transformOrigin={x:(h.x-e*z.scaleX-z.x)/(u*z.scaleX),y:(h.y-MJ*z.scaleY-z.y)/(f*z.scaleY)}}let{transformOrigin:bJ}=V,gJ=PJ*z.scaleY+z.y,sZ=l*z.scaleX+z.x;if(!V.coordinates){if(V.coordinates={x:sZ,y:gJ},_.x!==1||_.y!==1){let{scaleX:h,scaleY:e}=O,{x:MJ,y:XZ}=bJ;V.coordinates.x+=(u*h-u)*MJ,V.coordinates.y+=(f*e-f)*XZ}}if(!V.dimensions)V.dimensions={width:u,height:f};if(!V.frameTransform)V.frameTransform=z;let N1={x:V.coordinates.x-sZ,y:V.coordinates.y-gJ},uJ={width:(V.dimensions.width*V.frameTransform.scaleX-u*z.scaleX)*bJ.x,height:(V.dimensions.height*V.frameTransform.scaleY-f*z.scaleY)*bJ.y},iZ={x:N1.x/z.scaleX+uJ.width,y:N1.y/z.scaleY+uJ.height},G1={left:l+iZ.x,top:PJ+iZ.y};F.setAttribute(sJ,"true");let V1=S(()=>B.transform),$Z=(q=V.translate)!=null?q:{x:0,y:0},oZ=V1.x*z.scaleX+$Z.x,z1=V1.y*z.scaleY+$Z.y,nZ=b8();if(g.set({width:u-FZ,height:f-B1,top:G1.top+nZ.y,left:G1.left+nZ.x,translate:`${oZ}px ${z1}px 0`,transform:this.overlay?"none":vJ,transition:kJ?`${kJ}, translate 0ms linear`:"translate 0ms linear",scale:v?`${_.x} ${_.y}`:"","transform-origin":`${bJ.x*100}% ${bJ.y*100}%`},qJ),i){if(M.insertAdjacentElement("afterend",i),U==null?void 0:U.rootElement)(typeof U.rootElement==="function"?U.rootElement(G):U.rootElement).appendChild(M)}if(r1(F)){if(!F.hasAttribute("popover"))F.setAttribute("popover","manual");SZ(F),F.addEventListener("beforetoggle",j$)}let mJ,E0,aZ,j0=i5({placeholder:i,element:M,feedbackElement:F,frameTransform:z,transformOrigin:bJ,width:u,height:f,top:PJ,left:l,widthOffset:FZ,heightOffset:B1,delta:iZ,styles:g,dragOperation:B,getTranslate:()=>X.current.translate,getElementMutationObserver:()=>mJ,getSavedCellWidths:()=>aZ,setSavedCellWidths:(h)=>{aZ=h}}),L1=new eJ(F);S(()=>B.shape=L1);let rZ=OJ(F),M1=(h)=>{this.manager.actions.stop({event:h})},w=g8(rZ);if(wZ)rZ.addEventListener("resize",M1);if(S(()=>G.status)==="idle")requestAnimationFrame(()=>G.status="dragging");if(i)j0.observe(i),mJ=l5(M,i,lZ),E0=s5(M,i,F);let j=(K=W.dragOperation.source)==null?void 0:K.id,QJ=()=>{var h;if(!wZ||j==null)return;let e=W.registry.draggables.get(j),MJ=(h=e==null?void 0:e.handle)!=null?h:e==null?void 0:e.element;if(tJ(MJ))MJ.focus()},YZ=()=>{var h;if(mJ==null||mJ.disconnect(),E0==null||E0.disconnect(),j0.disconnect(),rZ.removeEventListener("resize",M1),r1(F))F.removeEventListener("beforetoggle",j$),F.removeAttribute("popover");if(F.removeAttribute(sJ),g.reset(),aZ&&o8(M)){let XZ=Array.from(M.cells);for(let[S9,A1]of XZ.entries())A1.style.width=(h=aZ[S9])!=null?h:""}G.status="idle";let e=X.current.translate!=null,MJ=B.status.dragging;if(i&&(!MJ&&e||i.parentElement!==F.parentElement)&&F.isConnected)i.replaceWith(F);i==null||i.remove()},qZ=U==null?void 0:U.dropAnimation,F1=this,w1=PZ(()=>{var h,e,MJ;let{transform:XZ,status:S9}=B;if(!XZ.x&&!XZ.y&&!X.current.translate)return;if(S9.dragging){let A1=(h=V.translate)!=null?h:{x:0,y:0},O1={x:XZ.x/z.scaleX+A1.x,y:XZ.y/z.scaleY+A1.y},x2=X.current.translate,eY=S(()=>B.modifiers),h9=S(()=>{var S0;return(S0=B.shape)==null?void 0:S0.current}),k0=U==null?void 0:U.keyboardTransition,y2=wZ&&!w&&k0!==null?`${(e=k0==null?void 0:k0.duration)!=null?e:250}ms ${(MJ=k0==null?void 0:k0.easing)!=null?MJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(g.set({transition:kJ?`${kJ}, translate ${y2}`:`translate ${y2}`,translate:`${O1.x}px ${O1.y}px 0`},qJ),mJ==null||mJ.takeRecords(),h9&&h9!==L1&&x2&&!eY.length){let S0=HJ.delta(O1,x2);B.shape=FJ.from(h9.boundingRectangle).translate(S0.x*z.scaleX,S0.y*z.scaleY)}else B.shape=new eJ(F);X.current.translate=O1}},function(){if(B.status.dropped){this.dispose(),G.status="dropping";let h=(A==null?void 0:A.dropAnimation)!==void 0?A.dropAnimation:F1.dropAnimation!==void 0?F1.dropAnimation:qZ,e=X.current.translate,MJ=e!=null;if(!e&&M!==F)e={x:0,y:0};if(!e||h===null){YZ();return}W.renderer.rendering.then(()=>{a5({source:G,element:M,feedbackElement:F,placeholder:i,translate:e,moved:MJ,transition:dZ,alignment:G.alignment,styles:g,animation:h!=null?h:void 0,getElementMutationObserver:()=>mJ,cleanup:YZ,restoreFocus:QJ})})}});return()=>{YZ(),w1()}};EJ(q1,4,"overlay",n$,A0,X2);bZ(q1,A0);A0.configure=U0(A0);var H9=A0,t0=!0,r5=!1,t$,e$,JY,ZY,BZ,K2,W2;ZY=(JY=[x],RJ.Forward),e$=(t$=[x],RJ.Reverse);var X1=class{constructor(){a(this,K2,ZJ(BZ,8,this,t0)),ZJ(BZ,11,this),a(this,W2,ZJ(BZ,12,this,t0)),ZJ(BZ,15,this)}isLocked(J){if(J===RJ.Idle)return!1;if(J==null)return this[RJ.Forward]===t0&&this[RJ.Reverse]===t0;return this[J]===t0}unlock(J){if(J===RJ.Idle)return;this[J]=r5}};BZ=R0(null);K2=new WeakMap;W2=new WeakMap;EJ(BZ,4,ZY,JY,X1,K2);EJ(BZ,4,e$,t$,X1,W2);bZ(BZ,X1);var t5=[RJ.Forward,RJ.Reverse],k$=class{constructor(){this.x=new X1,this.y=new X1}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},e5=class extends GJ{constructor(J){super(J);let Z=pJ(new k$),Q=null;this.signal=Z,$J(()=>{let{status:$}=J.dragOperation;if(!$.initialized){Q=null,Z.value=new k$;return}let{delta:Y}=J.dragOperation.position;if(Q){let q={x:S$(Y.x,Q.x),y:S$(Y.y,Q.y)},K=Z.peek();UJ(()=>{for(let X of $8)for(let W of t5)if(q[X]===W)K[X].unlock(W);Z.value=K})}Q=Y})}get current(){return this.signal.peek()}};function S$(J,Z){return Math.sign(J-Z)}var QY,a8,K1,H2,UZ,r8,U9=class extends(a8=B0,QY=[x],a8){constructor(J){super(J);a(this,H2,ZJ(K1,8,this,!1)),ZJ(K1,11,this),a(this,UZ),a(this,r8,()=>{if(!p(this,UZ))return;let{element:q,by:K}=p(this,UZ);if(K.y)q.scrollTop+=K.y;if(K.x)q.scrollLeft+=K.x}),this.scroll=(q,K)=>{var X;if(this.disabled)return!1;let W=this.getScrollableElements();if(!W)return VJ(this,UZ,void 0),!1;let{position:U}=this.manager.dragOperation,B=U==null?void 0:U.current;if(B){let{by:H}=q!=null?q:{},G=H?{x:h$(H.x),y:h$(H.y)}:void 0,N=G?void 0:this.scrollIntentTracker.current;if(N==null?void 0:N.isLocked())return!1;for(let M of W){let A=w$(M,H);if(A.x||A.y){let{speed:P,direction:C}=A$(M,B,G,K==null?void 0:K.acceleration,K==null?void 0:K.threshold);if(N){for(let V of $8)if(N[V].isLocked(C[V]))P[V]=0,C[V]=0}if(C.x||C.y){let{x:V,y:F}=H!=null?H:C,z=V*P.x,O=F*P.y;if(z||O){let v=(X=p(this,UZ))==null?void 0:X.by;if(this.autoScrolling&&v){if(v.x&&!z||v.y&&!O)continue}return VJ(this,UZ,{element:M,by:{x:z,y:O}}),a0.schedule(p(this,r8)),!0}}}}}return VJ(this,UZ,void 0),!1};let Z=null,Q=null,$=Z0(()=>{let{position:q,source:K}=J.dragOperation;if(!q)return null;let X=u8(n0(K==null?void 0:K.element),q.current);if(X)Z=X;return X!=null?X:Z}),Y=Z0(()=>{let q=$.value,{documentElement:K}=jZ(q);if(!q||q===K){let{target:X}=J.dragOperation,W=X==null?void 0:X.element;if(W){let U=t1(W,{excludeElement:!1});return Q=U,U}}if(q){let X=t1(q,{excludeElement:!1});if(this.autoScrolling&&Q&&X.size<(Q==null?void 0:Q.size))return Q;return Q=X,X}return Q=null,null},nJ);this.getScrollableElements=()=>{return Y.value},this.scrollIntentTracker=new e5(J),this.destroy=J.monitor.addEventListener("dragmove",(q)=>{if(this.disabled||q.defaultPrevented||!e1(J.dragOperation.activatorEvent)||!q.by)return;if(this.scroll({by:q.by}))q.preventDefault()})}};K1=R0(a8);H2=new WeakMap;UZ=new WeakMap;r8=new WeakMap;EJ(K1,4,"autoScrolling",QY,U9,H2);bZ(K1,U9);function h$(J){if(J>0)return RJ.Forward;if(J<0)return RJ.Reverse;return RJ.Idle}var JX=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Z,resolvers:Q}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Z)$();for(let $ of Q)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Z)=>this.resolvers.add(Z))}},ZX=new JX((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),QX=10,t8=class extends GJ{constructor(Z,Q){super(Z,Q);let $=Z.registry.plugins.get(U9);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=$J(()=>{var Y,q,K;if(this.disabled)return;let{position:X,status:W}=Z.dragOperation;if(W.dragging){let U={acceleration:(Y=this.options)==null?void 0:Y.acceleration,threshold:typeof((q=this.options)==null?void 0:q.threshold)==="number"?{x:this.options.threshold,y:this.options.threshold}:(K=this.options)==null?void 0:K.threshold};if($.scroll(void 0,U)){$.autoScrolling=!0;let H=setInterval(()=>ZX.schedule(()=>$.scroll(void 0,U)),QX);return()=>{clearInterval(H)}}else $.autoScrolling=!1}})}};t8.configure=U0(t8);var $Y=t8,x$={capture:!0,passive:!0},J1,$X=class extends B0{constructor(J){super(J);a(this,J1),this.handleScroll=()=>{if(p(this,J1)==null)VJ(this,J1,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),VJ(this,J1,void 0)},50))};let{dragOperation:Z}=this.manager;this.destroy=$J(()=>{var Q,$,Y;if(Z.status.dragging){let K=(Y=($=(Q=Z.source)==null?void 0:Q.element)==null?void 0:$.ownerDocument)!=null?Y:document;return K.addEventListener("scroll",this.handleScroll,x$),()=>{K.removeEventListener("scroll",this.handleScroll,x$)}}})}};J1=new WeakMap;var YX="* { user-select: none !important; -webkit-user-select: none !important; }",qX=class extends GJ{constructor(J){super(J);this.manager=J;let Z=J.registry.plugins.get(W9),Q=Z==null?void 0:Z.register(YX);if(this.destroy=$J(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return d8(),document.addEventListener("selectionchange",d8,{capture:!0}),()=>{document.removeEventListener("selectionchange",d8,{capture:!0})}}),Q){let $=this.destroy.bind(this);this.destroy=()=>{Q(),$()}}}};function d8(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var Z1=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(J,Z){var Q;let $=(Q=Z.handle)!=null?Q:Z.element;return J.target!==$}}),z0,X9=class extends CZ{constructor(Z,Q){super(Z);this.manager=Z,this.options=Q,a(this,z0,[]),this.listeners=new p8,this.handleSourceKeyDown=($,Y,q)=>{if(this.disabled||$.defaultPrevented)return;if(!HZ($.target))return;if(Y.disabled)return;let{keyboardCodes:K=Z1.keyboardCodes,preventActivation:X=Z1.preventActivation}=q!=null?q:{};if(!K.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(X==null?void 0:X($,Y))return;this.handleStart($,Y,q)}}bind(Z,Q=this.options){return $J(()=>{var Y;let q=(Y=Z.handle)!=null?Y:Z.element,K=(X)=>{if(e1(X))this.handleSourceKeyDown(X,Z,Q)};if(q)return q.addEventListener("keydown",K),()=>{q.removeEventListener("keydown",K)}})}handleStart(Z,Q,$){let{element:Y}=Q;if(!Y)throw Error("Source draggable does not have an associated element");Z.preventDefault(),Z.stopImmediatePropagation(),O$(Y);let{center:q}=new eJ(Y);if(this.manager.actions.start({event:Z,coordinates:{x:q.x,y:q.y},source:Q}).signal.aborted)return this.cleanup();this.sideEffects();let X=jZ(Y),W=[this.listeners.bind(X,[{type:"keydown",listener:(U)=>this.handleKeyDown(U,Q,$),options:{capture:!0}}])];p(this,z0).push(...W)}handleKeyDown(Z,Q,$){let{keyboardCodes:Y=Z1.keyboardCodes}=$!=null?$:{};if(V0(Z,[...Y.end,...Y.cancel])){Z.preventDefault();let q=V0(Z,Y.cancel);this.handleEnd(Z,q);return}if(V0(Z,Y.up))this.handleMove("up",Z);else if(V0(Z,Y.down))this.handleMove("down",Z);if(V0(Z,Y.left))this.handleMove("left",Z);else if(V0(Z,Y.right))this.handleMove("right",Z)}handleEnd(Z,Q){this.manager.actions.stop({event:Z,canceled:Q}),this.cleanup()}handleMove(Z,Q){var $,Y;let{shape:q}=this.manager.dragOperation,K=Q.shiftKey?5:1,X={x:0,y:0},W=(Y=($=this.options)==null?void 0:$.offset)!=null?Y:Z1.offset;if(typeof W==="number")W={x:W,y:W};if(!q)return;switch(Z){case"up":X={x:0,y:-W.y*K};break;case"down":X={x:0,y:W.y*K};break;case"left":X={x:-W.x*K,y:0};break;case"right":X={x:W.x*K,y:0};break}if(X.x||X.y)Q.preventDefault(),this.manager.actions.move({event:Q,by:X})}sideEffects(){let Z=this.manager.registry.plugins.get($Y);if((Z==null?void 0:Z.disabled)===!1)Z.disable(),p(this,z0).push(()=>{Z.enable()})}cleanup(){p(this,z0).forEach((Z)=>Z()),VJ(this,z0,[])}destroy(){this.cleanup(),this.listeners.clear()}};z0=new WeakMap;X9.configure=U0(X9);X9.defaults=Z1;var YY=X9;function V0(J,Z){return Z.includes(J.code)}var xZ,XX=class extends D8{constructor(){super(...arguments);a(this,xZ)}onEvent(J){switch(J.type){case"pointerdown":VJ(this,xZ,kZ(J));break;case"pointermove":if(!p(this,xZ))return;let{x:Z,y:Q}=kZ(J),$={x:Z-p(this,xZ).x,y:Q-p(this,xZ).y},{tolerance:Y}=this.options;if(Y&&E1($,Y)){this.abort();return}if(E1($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){VJ(this,xZ,void 0)}};xZ=new WeakMap;var L0,yZ,KX=class extends D8{constructor(){super(...arguments);a(this,L0),a(this,yZ)}onEvent(J){switch(J.type){case"pointerdown":VJ(this,yZ,kZ(J)),VJ(this,L0,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!p(this,yZ))return;let{x:Z,y:Q}=kZ(J),$={x:Z-p(this,yZ).x,y:Q-p(this,yZ).y};if(E1($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(p(this,L0))clearTimeout(p(this,L0)),VJ(this,yZ,void 0),VJ(this,L0,void 0)}};L0=new WeakMap;yZ=new WeakMap;var F0=class{};F0.Delay=KX;F0.Distance=XX;var e8=Object.freeze({activationConstraints(J,Z){var Q;let{pointerType:$,target:Y}=J;if($==="mouse"&&HZ(Y)&&(Z.handle===Y||((Q=Z.handle)==null?void 0:Q.contains(Y))))return;if($==="touch")return[new F0.Delay({value:250,tolerance:5})];if(T$(Y)&&!J.defaultPrevented)return[new F0.Delay({value:200,tolerance:0})];return[new F0.Delay({value:200,tolerance:10}),new F0.Distance({value:5})]},preventActivation(J,Z){var Q;let{target:$}=J;if($===Z.element)return!1;if($===Z.handle)return!1;if(!HZ($))return!1;if((Q=Z.handle)==null?void 0:Q.contains($))return!1;return B$($)}}),M0,K9=class extends CZ{constructor(Z,Q){super(Z);this.manager=Z,this.options=Q,a(this,M0,new Set),this.listeners=new p8,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:$,coordinates:Y}=this.latest;if(!$||!Y)return;this.manager.actions.move({event:$,to:Y})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(Z,Q,$=this.options){let{activationConstraints:Y=e8.activationConstraints}=$!=null?$:{};return typeof Y==="function"?Y(Z,Q):Y}bind(Z,Q=this.options){return $J(()=>{var Y;let q=new AbortController,{signal:K}=q,X=(U)=>{if(C$(U))this.handlePointerDown(U,Z,Q)},W=[(Y=Z.handle)!=null?Y:Z.element];if(Q==null?void 0:Q.activatorElements)if(Array.isArray(Q.activatorElements))W=Q.activatorElements;else W=Q.activatorElements(Z);for(let U of W){if(!U)continue;UX(U.ownerDocument.defaultView),U.addEventListener("pointerdown",X,{signal:K})}return()=>q.abort()})}handlePointerDown(Z,Q,$){if(this.disabled||!Z.isPrimary||Z.button!==0||!HZ(Z.target)||Q.disabled||WX(Z)||!this.manager.dragOperation.status.idle)return;let{preventActivation:Y=e8.preventActivation}=$!=null?$:{};if(Y==null?void 0:Y(Z,Q))return;let{target:q}=Z,K=tJ(q)&&q.draggable&&q.getAttribute("draggable")==="true",X=hZ(Q.element),{x:W,y:U}=kZ(Z);this.initialCoordinates={x:W*X.scaleX+X.x,y:U*X.scaleY+X.y};let B=this.activationConstraints(Z,Q,$);Z.sensor=this;let H=new dQ(B,(A)=>this.handleStart(Q,A));H.signal.onabort=()=>this.handleCancel(Z),H.onEvent(Z),this.controller=H;let G=_1(),N=this.listeners.bind(G,[{type:"pointermove",listener:(A)=>this.handlePointerMove(A,Q)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:K?this.handleCancel:Z9,options:{capture:!0}}]),M=()=>{N(),this.initialCoordinates=void 0};p(this,M0).add(M)}handlePointerMove(Z,Q){var $,Y;if((($=this.controller)==null?void 0:$.activated)===!1){(Y=this.controller)==null||Y.onEvent(Z);return}if(this.manager.dragOperation.status.dragging){let q=kZ(Z),K=hZ(Q.element);q.x=q.x*K.scaleX+K.x,q.y=q.y*K.scaleY+K.y,Z.preventDefault(),Z.stopPropagation(),this.latest.event=Z,this.latest.coordinates=q,a0.schedule(this.handleMove)}}handlePointerUp(Z){let{status:Q}=this.manager.dragOperation;if(!Q.idle){Z.preventDefault(),Z.stopPropagation();let $=!Q.initialized;this.manager.actions.stop({event:Z,canceled:$})}this.cleanup()}handleKeyDown(Z){if(Z.key==="Escape")Z.preventDefault(),this.handleCancel(Z)}handleStart(Z,Q){let{manager:$,initialCoordinates:Y}=this;if(!Y||!$.dragOperation.status.idle)return;if(Q.defaultPrevented)return;if($.actions.start({coordinates:Y,event:Q,source:Z}).signal.aborted)return this.cleanup();Q.preventDefault();let X=jZ(Q.target).body;try{X.setPointerCapture(Q.pointerId)}catch(B){this.handleCancel(Q);return}let W=HZ(Q.target)?[Q.target,X]:X,U=this.listeners.bind(W,[{type:"touchmove",listener:Z9,options:{passive:!1}},{type:"click",listener:Z9},{type:"contextmenu",listener:Z9},{type:"keydown",listener:this.handleKeyDown}]);p(this,M0).add(U)}handleCancel(Z){let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.manager.actions.stop({event:Z,canceled:!0});this.cleanup()}cleanup(){let{controller:Z}=this;if(this.controller=void 0,Z&&!Z.signal.aborted)Z.abort();this.latest={event:void 0,coordinates:void 0},p(this,M0).forEach((Q)=>Q()),p(this,M0).clear()}destroy(){this.cleanup(),this.listeners.clear()}};M0=new WeakMap;K9.configure=U0(K9);K9.defaults=e8;var qY=K9;function WX(J){return"sensor"in J}function Z9(J){J.preventDefault()}function HX(){}var y$=new WeakSet;function UX(J){if(!J||y$.has(J))return;J.addEventListener("touchmove",HX,{capture:!1,passive:!1}),y$.add(J)}var fZ={modifiers:[],plugins:[f5,$Y,b5,H9,qX],sensors:[qY,YY]},U2=class extends eQ{constructor(J={}){let Z=IJ(J.plugins,fZ.plugins),Q=IJ(J.sensors,fZ.sensors),$=IJ(J.modifiers,fZ.modifiers);super($2(Y1({},J),{plugins:[$X,U9,W9,...Z],sensors:Q,modifiers:$}))}},XY,KY,J2,NZ,B2,N2,H1=class extends(J2=xJ,KY=[x],XY=[x],J2){constructor(J,Z){var Q=J,{element:$,effects:Y=()=>[],handle:q}=Q,K=g$(Q,["element","effects","handle"]);super(Y1({effects:()=>[...Y(),()=>{var X,W;let{manager:U}=this;if(!U)return;let H=((W=(X=this.sensors)==null?void 0:X.map(K0))!=null?W:[...U.sensors]).map((G)=>{let N=G instanceof CZ?G:U.registry.register(G.plugin),M=G instanceof CZ?void 0:G.options;return N.bind(this,M)});return function(){H.forEach((N)=>N())}}]},K),Z);a(this,B2,ZJ(NZ,8,this)),ZJ(NZ,11,this),a(this,N2,ZJ(NZ,12,this)),ZJ(NZ,15,this),this.element=$,this.handle=q}};NZ=R0(J2);B2=new WeakMap;N2=new WeakMap;EJ(NZ,4,"handle",KY,H1,B2);EJ(NZ,4,"element",XY,H1,N2);bZ(NZ,H1);var WY,HY,Z2,GZ,G2,c8,UY,BY,$1,V2,B9=class extends(Z2=yJ,HY=[x],WY=[x],Z2){constructor(J,Z){var Q=J,{element:$,effects:Y=()=>[]}=Q,q=g$(Q,["element","effects"]);let{collisionDetector:K=D$}=q,X=(U)=>{let{manager:B,element:H}=this;if(!H||U===null){this.shape=void 0;return}if(!B)return;let G=new eJ(H),N=S(()=>this.shape);if(G&&(N==null?void 0:N.equals(G)))return N;return this.shape=G,G},W=pJ(!1);super($2(Y1({},q),{collisionDetector:K,effects:()=>[...Y(),()=>{let{element:U,manager:B}=this;if(!B)return;let{dragOperation:H}=B,{source:G}=H;W.value=Boolean(G&&H.status.initialized&&U&&!this.disabled&&this.accepts(G))},()=>{let{element:U}=this;if(W.value&&U){let B=new M$(U,X);return()=>{B.disconnect(),this.shape=void 0}}},()=>{var U;if((U=this.manager)==null?void 0:U.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Z);a(this,$1),a(this,G2,ZJ(GZ,8,this)),ZJ(GZ,11,this),a(this,V2,ZJ(GZ,12,this)),ZJ(GZ,15,this),this.element=$,this.refreshShape=()=>X()}set element(J){VJ(this,$1,J,BY)}get element(){var J;return(J=this.proxy)!=null?J:p(this,$1,UY)}};GZ=R0(Z2);G2=new WeakMap;$1=new WeakSet;V2=new WeakMap;c8=EJ(GZ,20,"#element",HY,$1,G2),UY=c8.get,BY=c8.set;EJ(GZ,4,"proxy",WY,B9,V2);bZ(GZ,B9);var r=N9(z2(),1);var L2=N9(NX(),1);function BX(J){return J!=null&&typeof J==="object"&&"current"in J}function gZ(J){var Z;if(J==null)return;if(BX(J))return(Z=J.current)!=null?Z:void 0;return J}var GX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uZ=GX?r.useLayoutEffect:r.useEffect;function NY(){let J=r.useState(0)[1];return r.useCallback(()=>{J((Z)=>Z+1)},[J])}function VX(J,Z=!1){let Q=r.useRef(J.peek()),$=r.useRef(!1),Y=NY();return uZ(()=>$J(()=>{let q=Q.current,K=J.value;if(q!==K){if(Q.current=K,!$.current)return;if(Z)L2.flushSync(Y);else Y()}}),[J,Z,Y]),{get value(){return $.current=!0,J.peek()}}}function G9(J,Z=[],Q=!1){let $=r.useRef(J);return $.current=J,VX(r.useMemo(()=>Z0(()=>$.current()),Z),Q)}function V9(J,Z){let Q=r.useRef(new Map),$=NY();return uZ(()=>{if(!J){Q.current.clear();return}return $J(()=>{var Y;let q=!1,K=!1;for(let X of Q.current){let[W]=X,U=S(()=>X[1]),B=J[W];if(U!==B)q=!0,Q.current.set(W,B),K=(Y=Z==null?void 0:Z(W,U,B))!=null?Y:!1}if(q)if(K)queueMicrotask(()=>L2.flushSync($));else $()})},[J]),r.useMemo(()=>J?new Proxy(J,{get(Y,q){let K=Y[q];return Q.current.set(q,K),K}}):J,[J])}function U7(J,Z){J()}function mZ(J){let Z=r.useRef(J);return uZ(()=>{Z.current=J},[J]),Z}function XJ(J,Z,Q=r.useEffect,$=Object.is){let Y=r.useRef(J);Q(()=>{let q=Y.current;if(!$(J,q))Y.current=J,Z(J,q)},[Z,J])}function z9(J,Z){let Q=r.useRef(gZ(J));uZ(()=>{let $=gZ(J);if($!==Q.current)Q.current=$,Z($)})}var{defineProperty:zX,defineProperties:LX,getOwnPropertyDescriptors:MX,getOwnPropertySymbols:M9}=Object,VY=Object.prototype.hasOwnProperty,zY=Object.prototype.propertyIsEnumerable,GY=(J,Z,Q)=>(Z in J)?zX(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,LY=(J,Z)=>{for(var Q in Z||(Z={}))if(VY.call(Z,Q))GY(J,Q,Z[Q]);if(M9){for(var Q of M9(Z))if(zY.call(Z,Q))GY(J,Q,Z[Q])}return J},MY=(J,Z)=>LX(J,MX(Z)),FX=(J,Z)=>{var Q={};for(var $ in J)if(VY.call(J,$)&&Z.indexOf($)<0)Q[$]=J[$];if(J!=null&&M9){for(var $ of M9(J))if(Z.indexOf($)<0&&zY.call(J,$))Q[$]=J[$]}return Q},wX=new U2,w2=k.createContext(wX),AX=k.memo(k.forwardRef(({children:J},Z)=>{let[Q,$]=k.useState(0),Y=k.useRef(null),q=k.useRef(null),K=k.useMemo(()=>({renderer:{get rendering(){var X;return(X=Y.current)!=null?X:Promise.resolve()}},trackRendering(X){if(!Y.current)Y.current=new Promise((W)=>{q.current=W});k.startTransition(()=>{X(),$((W)=>W+1)})}}),[]);return uZ(()=>{var X;(X=q.current)==null||X.call(q),Y.current=null},[J,Q]),k.useImperativeHandle(Z,()=>K),null})),M2=[void 0,nJ];function F7(J){var Z=J,{children:Q,onCollision:$,onBeforeDragStart:Y,onDragStart:q,onDragMove:K,onDragOver:X,onDragEnd:W}=Z,U=FX(Z,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let B=k.useRef(null),{plugins:H,modifiers:G,sensors:N}=U,M=IJ(H,fZ.plugins),A=IJ(N,fZ.sensors),P=IJ(G,fZ.modifiers),C=mZ(Y),V=mZ(q),F=mZ(X),z=mZ(K),O=mZ(W),v=mZ($),T=OX(()=>{var _;return(_=U.manager)!=null?_:new U2(U)});return k.useEffect(()=>{if(!B.current)throw Error("Renderer not found");let{renderer:_,trackRendering:u}=B.current,{monitor:f}=T;T.renderer=_;let PJ=[f.addEventListener("beforedragstart",(l)=>{let g=C.current;if(g)u(()=>g(l,T))}),f.addEventListener("dragstart",(l)=>{var g;return(g=V.current)==null?void 0:g.call(V,l,T)}),f.addEventListener("dragover",(l)=>{let g=F.current;if(g)u(()=>g(l,T))}),f.addEventListener("dragmove",(l)=>{let g=z.current;if(g)u(()=>g(l,T))}),f.addEventListener("dragend",(l)=>{let g=O.current;if(g)u(()=>g(l,T))}),f.addEventListener("collision",(l)=>{var g;return(g=v.current)==null?void 0:g.call(v,l,T)})];return()=>PJ.forEach((l)=>l())},[T]),XJ(M,()=>T&&(T.plugins=M),...M2),XJ(A,()=>T&&(T.sensors=A),...M2),XJ(P,()=>T&&(T.modifiers=P),...M2),D(w2.Provider,{value:T,children:[L(AX,{ref:B,children:Q}),Q]})}function OX(J){let Z=k.useRef(null);if(!Z.current)Z.current=J();return k.useInsertionEffect(()=>{return()=>{var Q;return(Q=Z.current)==null?void 0:Q.destroy()}},[]),Z.current}function A2(){return k.useContext(w2)}function FY(J){var Z;let Q=(Z=A2())!=null?Z:void 0,[$]=k.useState(()=>J(Q));if($.manager!==Q)$.manager=Q;return uZ($.register,[Q,$]),$}function wY(J){let{disabled:Z,data:Q,element:$,handle:Y,id:q,modifiers:K,sensors:X,plugins:W}=J,U=FY((H)=>new H1(MY(LY({},J),{register:!1,handle:gZ(Y),element:gZ($)}),H)),B=V9(U,RX);return XJ(q,()=>U.id=q),z9(Y,(H)=>U.handle=H),z9($,(H)=>U.element=H),XJ(Q,()=>Q&&(U.data=Q)),XJ(Z,()=>U.disabled=Z===!0),XJ(X,()=>U.sensors=X),XJ(K,()=>U.modifiers=K,void 0,nJ),XJ(W,()=>U.plugins=W,void 0,nJ),XJ(J.alignment,()=>U.alignment=J.alignment),{draggable:B,get isDragging(){return B.isDragging},get isDropping(){return B.isDropping},get isDragSource(){return B.isDragSource},handleRef:k.useCallback((H)=>{U.handle=H!=null?H:void 0},[U]),ref:k.useCallback((H)=>{var G,N;if(!H&&((G=U.element)==null?void 0:G.isConnected)&&!((N=U.manager)==null?void 0:N.dragOperation.status.idle))return;U.element=H!=null?H:void 0},[U])}}function RX(J,Z,Q){if(J==="isDragSource"&&!Q&&Z)return!0;return!1}function w7({children:J,className:Z,dropAnimation:Q,style:$,tag:Y,disabled:q}){var K;let X=k.useRef(null),W=A2(),U=(K=G9(()=>W==null?void 0:W.dragOperation.source,[W]).value)!=null?K:null,B=typeof q==="function"?q(U):q;k.useEffect(()=>{if(!X.current||!W||B)return;let N=W.plugins.find((M)=>M instanceof H9);if(!N)return;return N.overlay=X.current,()=>{N.overlay=void 0}},[W,B]),k.useEffect(()=>{if(!W)return;let N=W.plugins.find((M)=>M instanceof H9);if(!N)return;return N.dropAnimation=Q,()=>{N.dropAnimation=void 0}},[W,Q]);let H=k.useMemo(()=>{if(!W)return null;let N=new Proxy(W.registry,{get(M,A){if(A==="register"||A==="unregister")return PX;return M[A]}});return new Proxy(W,{get(M,A){if(A==="registry")return N;return M[A]}})},[W]);return L(w2.Provider,{value:H,children:k.createElement(Y||"div",{ref:X,className:Z,style:$,"data-dnd-overlay":!0},G())});function G(){if(!U||B)return null;if(typeof J==="function")return L(CX,{source:U,children:J});return J}}function PX(){return()=>{}}function CX({children:J,source:Z}){return J(V9(Z))}var{create:TX,defineProperty:AY,getOwnPropertyDescriptor:DX}=Object,OY=(J,Z)=>(Z=Symbol[J])?Z:Symbol.for("Symbol."+J),F9=(J)=>{throw TypeError(J)},IX=(J,Z,Q)=>(Z in J)?AY(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:Q}):J[Z]=Q,EX=(J)=>{var Z;return[,,,TX((Z=J==null?void 0:J[OY("metadata")])!=null?Z:null)]},RY=["class","method","getter","setter","accessor","field","value","get","set"],PY=(J)=>J!==void 0&&typeof J!=="function"?F9("Function expected"):J,jX=(J,Z,Q,$,Y)=>({kind:RY[J],name:Z,metadata:$,addInitializer:(q)=>Q._?F9("Already initialized"):Y.push(PY(q||null))}),kX=(J,Z)=>IX(Z,OY("metadata"),J[3]),SX=(J,Z,Q,$)=>{for(var Y=0,q=J[Z>>1],K=q&&q.length;Y<K;Y++)q[Y].call(Q);return $},CY=(J,Z,Q,$,Y,q)=>{var K,X,W,U,B=Z&7,H=!1,G=!1,N=2,M=RY[B+5],A=J[N]||(J[N]=[]),P=(Y=Y.prototype,DX(Y,Q));for(var C=$.length-1;C>=0;C--)W=jX(B,Q,X={},J[3],A),W.static=H,W.private=G,U=W.access={has:(V)=>(Q in V)},U.get=(V)=>V[Q],K=(0,$[C])(P[M],W),X._=1,PY(K)&&(P[M]=K);return P&&AY(Y,Q,P),Y},TY=(J,Z,Q)=>Z.has(J)||F9("Cannot "+Q),hX=(J,Z,Q)=>(TY(J,Z,"read from private field"),Z.get(J)),xX=(J,Z,Q)=>Z.has(J)?F9("Cannot add the same private member more than once"):Z instanceof WeakSet?Z.add(J):Z.set(J,Q),yX=(J,Z,Q,$)=>(TY(J,Z,"write to private field"),Z.set(J,Q),Q),pZ=class J{constructor(Z,Q){this.x=Z,this.y=Q}static delta(Z,Q){return new J(Z.x-Q.x,Z.y-Q.y)}static distance(Z,Q){return Math.hypot(Z.x-Q.x,Z.y-Q.y)}static equals(Z,Q){return Z.x===Q.x&&Z.y===Q.y}static from({x:Z,y:Q}){return new J(Z,Q)}},DY,IY,F2,L9,U1,O2=class extends(F2=_J,IY=[d],DY=[d],F2){constructor(J){let Z=pZ.from(J);super(Z,(Q,$)=>pZ.equals(Q,$));SX(U1,5,this),xX(this,L9,0),this.velocity={x:0,y:0}}get delta(){return pZ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Z}=this;if(!Z)return null;let Q={x:J.x-Z.x,y:J.y-Z.y};if(!Q.x&&!Q.y)return null;if(Math.abs(Q.x)>Math.abs(Q.y))return Q.x>0?"right":"left";return Q.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Z}=this,Q=pZ.from(J),$={x:Q.x-Z.x,y:Q.y-Z.y},Y=Date.now(),q=Y-hX(this,L9),K=(X)=>Math.round(X/q*100);UJ(()=>{yX(this,L9,Y),this.velocity={x:K($.x),y:K($.y)},super.current=Q})}reset(J=this.defaultValue){super.reset(pZ.from(J)),this.velocity={x:0,y:0}}};U1=EX(F2);L9=new WeakMap;CY(U1,2,"delta",IY,O2);CY(U1,2,"direction",DY,O2);kX(U1,O2);var EY=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(EY||{});Object.values(EY);var fX=({dragOperation:J,droppable:Z})=>{let Q=J.position.current;if(!Q)return null;let{id:$}=Z;if(!Z.shape)return null;if(Z.shape.containsPoint(Q)){let Y=pZ.distance(Z.shape.center,Q);return{id:$,value:1/Y,type:cJ.PointerIntersection,priority:dJ.High}}return null},vX=({dragOperation:J,droppable:Z})=>{let{shape:Q}=J;if(!Z.shape||!(Q==null?void 0:Q.current))return null;let $=Q.current.intersectionArea(Z.shape);if($){let{position:Y}=J,q=pZ.distance(Z.shape.center,Y.current),X=$/(Q.current.area+Z.shape.area-$)/q;return{id:Z.id,value:X,type:cJ.ShapeIntersection,priority:dJ.Normal}}return null},bX=(J)=>{var Z;return(Z=fX(J))!=null?Z:vX(J)};function R2(J){let{collisionDetector:Z,data:Q,disabled:$,element:Y,id:q,accept:K,type:X}=J,W=FY((B)=>new B9(MY(LY({},J),{register:!1,element:gZ(Y)}),B)),U=V9(W);return XJ(q,()=>W.id=q),z9(Y,(B)=>W.element=B),XJ(K,()=>W.accept=K,void 0,nJ),XJ(Z,()=>W.collisionDetector=Z!=null?Z:bX),XJ(Q,()=>Q&&(W.data=Q)),XJ($,()=>W.disabled=$===!0),XJ(X,()=>W.type=X),{droppable:U,get isDropTarget(){return U.isDropTarget},ref:k.useCallback((B)=>{var H,G;if(!B&&((H=W.element)==null?void 0:H.isConnected)&&!((G=W.manager)==null?void 0:G.dragOperation.status.idle))return;W.element=B!=null?B:void 0},[W])}}function A7(){let J=A2(),Z=G9(()=>J==null?void 0:J.dragOperation.source,[J]),Q=G9(()=>J==null?void 0:J.dragOperation.target,[J]);return{get source(){return Z.value},get target(){return Q.value}}}var c=N9(z2(),1);function m7({teamId:J,projectId:Z,projectName:Q,rootFolderId:$,dragState:Y,onSelect:q,selectedFolderId:K,hideCollections:X,hideShares:W,hideRecentlyDeleted:U,hideRecents:B,ancestorFolders:H}){let G=C9(),N=kY(),{canEdit:M}=rY(Z),A=P2({from:"/projects/$projectId/recently-deleted",shouldThrow:!1}),P=P2({from:"/projects/$projectId/recents",shouldThrow:!1}),[C,V]=c.useState(!0),[F,z]=c.useState(!0),[O,v]=c.useState(!0),{data:T,fetchNextPage:_,hasNextPage:u,isFetchingNextPage:f}=R9({queryKey:["shares",Z],queryFn:async({pageParam:w})=>{let j=await zJ.api.projects[":projectId"].shares.$get({param:{projectId:Z},query:{first:"20",after:w}});if(!j.ok)throw Error(R.failed_fetch_share_links());return await j.json()},initialPageParam:"",getNextPageParam:(w)=>w.pageInfo?.cursor||void 0,enabled:!!Z}),{data:PJ,fetchNextPage:l,hasNextPage:g,isFetchingNextPage:iJ}=R9({queryKey:["collections",Z],queryFn:async({pageParam:w})=>{let j=await zJ.api.projects[":projectId"].collections.$get({param:{projectId:Z},query:{first:"20",after:w}});if(!j.ok)throw Error(R.failed_fetch_collections());return await j.json()},initialPageParam:"",getNextPageParam:(w)=>w.pageInfo?.cursor||void 0,enabled:!!Z}),{ref:dZ,inView:LZ}=P9(),{ref:C0,inView:cZ}=P9();c.useEffect(()=>{if(LZ&&g&&!iJ)l()},[LZ,g,iJ,l]),c.useEffect(()=>{if(cZ&&u&&!f)_()},[cZ,u,f,_]);let T0=c.useMemo(()=>PJ?.pages.flatMap((w)=>w.data)||[],[PJ]),D0=c.useMemo(()=>T?.pages.flatMap((w)=>w.data)||[],[T]),{mutate:I0}=ZZ({mutationFn:async()=>{let w=await zJ.api.projects[":projectId"].collections.$post({param:{projectId:Z},json:{name:R.untitled_collection(),filter:{sourceFolderId:$,searchFilter:{conditions:[],recursively:!0}}}});if(!w.ok)throw Error(R.failed_create_collection());return await w.json()},onSuccess:(w)=>{N.invalidateQueries({queryKey:["collections",Z]}),t.success(R.collection_created()),G({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:w.id}})},onError:(w)=>{t.error(`Error: ${w.message}`)}}),{mutate:s}=ZZ({mutationFn:async()=>{let w=await zJ.api.projects[":projectId"].shares.$post({param:{projectId:Z},json:{name:new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}});if(!w.ok)throw Error(R.failed_create_share_link());return await w.json()},onSuccess:(w)=>{N.invalidateQueries({queryKey:["shares",Z]}),t.success(R.share_link_created()),G({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:w.id}})},onError:(w)=>{t.error(`Error: ${w.message}`)}}),MZ=_Z({from:"/projects/$projectId/collections/$collectionId",shouldThrow:!1}),j9=_Z({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1}),k9=_Z({from:"/projects/$projectId/folders/$folderId",shouldThrow:!1}),[kJ,SJ]=c.useState(null),[vJ,lZ]=c.useState("collection"),[CJ,FZ]=c.useState(""),[B1,i]=c.useState(!1),[wZ,bJ]=c.useState(null),[gJ,sZ]=c.useState("collection"),[N1,uJ]=c.useState(!1),{mutate:iZ}=ZZ({mutationFn:async({id:w,name:j})=>{let QJ=await zJ.api.folders[":folderId"].$put({param:{folderId:w},json:{name:j}});if(!QJ.ok)throw Error(R.failed_rename_folder());return await QJ.json()},onSuccess:()=>{N.invalidateQueries({queryKey:["search",J]}),N.invalidateQueries({queryKey:["folders"]}),t.success(R.folder_renamed()),i(!1)},onError:(w)=>{t.error(`Error: ${w.message}`)}}),{mutate:G1}=ZZ({mutationFn:async(w)=>{if(!(await zJ.api.folders.$delete({json:{ids:[w]}})).ok)throw Error(R.failed_delete_folder());return w},onSuccess:(w)=>{if(N.invalidateQueries({queryKey:["search",J]}),N.invalidateQueries({queryKey:["folders"]}),t.success(R.folder_deleted()),uJ(!1),k9?.folderId===w)G({to:"/projects/$projectId",params:{projectId:Z}})},onError:(w)=>{t.error(`Error: ${w.message}`)}}),[V1,$Z]=c.useState(!1),[oZ,z1]=c.useState(!1),[nZ,mJ]=c.useState([]),E0=async(w)=>{$Z(!0),z1(!0),mJ([]);try{let j=await zJ.api.files["download-links"].$post({json:{ids:[w]}});if(!j.ok)throw Error(R.failed_to_prepare_download_links());let QJ=await j.json();mJ(QJ.files)}catch(j){t.error(R.failed_to_prepare_download_links()),$Z(!1),console.error(j)}finally{z1(!1)}},aZ=()=>{let w=[...nZ];if($Z(!1),w.length===0)return;t.info(R.starting_download_files({count:w.length}),{duration:5000});let j=(YZ)=>new Promise((qZ)=>setTimeout(qZ,YZ));(async()=>{for(let qZ=0;qZ<w.length;qZ+=5){let F1=w.slice(qZ,qZ+5);for(let w1 of F1){let h=document.createElement("a");h.href=w1.url,h.download=w1.name,h.target="_blank",document.body.appendChild(h),h.click(),h.remove()}await j(1000)}})().catch((YZ)=>{console.error("Background downloads failed:",YZ),t.error(R.some_downloads_failed())})},{mutate:j0}=ZZ({mutationFn:async({id:w,name:j})=>{let QJ=await zJ.api.collections[":collectionId"].$patch({param:{collectionId:w},json:{name:j}});if(!QJ.ok)throw Error(R.failed_rename_collection());return await QJ.json()},onSuccess:()=>{N.invalidateQueries({queryKey:["collections",Z]}),t.success(R.collection_renamed()),i(!1)},onError:(w)=>{t.error(`Error: ${w.message}`)}}),{mutate:L1}=ZZ({mutationFn:async(w)=>{let j=await zJ.api.collections[":collectionId"].$delete({param:{collectionId:w}});if(!j.ok)throw Error(R.failed_delete_collection());return await j.json()},onSuccess:(w,j)=>{if(N.invalidateQueries({queryKey:["collections",Z]}),t.success(R.collection_deleted()),uJ(!1),MZ?.collectionId===j)G({to:"/projects/$projectId",params:{projectId:Z}})},onError:(w)=>{t.error(`Error: ${w.message}`)}}),{mutate:rZ}=ZZ({mutationFn:async({id:w,name:j})=>{let QJ=await zJ.api.shares[":shareId"].$put({param:{shareId:w},json:{name:j}});if(!QJ.ok)throw Error(R.failed_rename_share_link());return await QJ.json()},onSuccess:()=>{N.invalidateQueries({queryKey:["shares",Z]}),t.success(R.share_link_renamed()),i(!1)},onError:(w)=>{t.error(`Error: ${w.message}`)}}),{mutate:M1}=ZZ({mutationFn:async(w)=>{if(!(await zJ.api.shares[":shareId"].$delete({param:{shareId:w}})).ok)throw Error(R.failed_delete_share_link());return w},onSuccess:(w)=>{if(N.invalidateQueries({queryKey:["shares",Z]}),t.success(R.share_link_deleted()),uJ(!1),j9?.shareId===w)G({to:"/projects/$projectId",params:{projectId:Z}})},onError:(w)=>{t.error(`Error: ${w.message}`)}});return D("div",{className:"flex flex-col h-full overflow-hidden p-3 gap-4 bg-background",children:[D("div",{className:jJ("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",C?"flex-1 min-h-[50%] h-full":"flex-none h-[44px] max-h-[44px]"),children:[L("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:D("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>V(!C),children:[L("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:R.folder_tree_assets()}),C?L(w9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):L(A9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]})}),L(O9,{className:jJ("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",C?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:D("div",{className:"space-y-0.5 pr-3",children:[!B&&D("div",{className:jJ("group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",P&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>G({to:"/projects/$projectId/recents",params:{projectId:Z}}),children:[L("div",{className:"flex h-4 w-4 items-center justify-center",children:L(bY,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"flex-1 truncate text-sidebar-foreground",children:R.recents()})]}),L(tY,{teamId:J,projectId:Z,folder:{id:$,name:Q,type:"folder",sizeByte:0,fileCount:0,status:"processed",createdAt:"",updatedAt:""},level:0,isRoot:!0,dragState:Y,onSelect:q,selectedFolderId:K,canEdit:M,onRenameTrigger:(w,j)=>{SJ(w),lZ("folder"),FZ(j),i(!0)},onDeleteTrigger:(w)=>{bJ(w),sZ("folder"),uJ(!0)},onDownloadTrigger:(w)=>{E0(w)},ancestorFolders:H},$),M&&!U&&D("div",{className:jJ("group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",A&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>G({to:"/projects/$projectId/recently-deleted",params:{projectId:Z}}),children:[L("div",{className:"flex h-4 w-4 items-center justify-center",children:L(h2,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"flex-1 truncate text-sidebar-foreground",children:R.recently_deleted()})]})]})})]}),!X&&D("div",{className:jJ("flex flex-col overflow-hidden transition-all duration-300 ease-in-out border-b border-border pb-4",F?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[D("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[D("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>z(!F),children:[L("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:R.collections()}),F?L(w9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):L(A9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),M&&L("button",{"data-testid":"create-collection",onClick:()=>I0(),className:"text-muted-foreground hover:text-foreground flex-none",children:L(T2,{className:"h-3.5 w-3.5"})})]}),L(O9,{className:jJ("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",F?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:D("div",{className:"space-y-0.5 pr-3",children:[D("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>G({to:"/projects/$projectId/collections",params:{projectId:Z}}),children:[L("div",{className:"flex h-4 w-4 items-center justify-center",children:L(C2,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"flex-1 truncate text-sidebar-foreground",children:R.all_collections_count({count:PJ?.pages[0]?.pageInfo?.total||0})})]}),T0.map((w)=>{let j=MZ?.collectionId===w.id;return D("div",{className:jJ("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",j&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium"),onClick:()=>G({to:"/projects/$projectId/collections/$collectionId",params:{projectId:Z,collectionId:w.id}}),children:[D("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[L("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:L(xY,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"truncate text-sidebar-foreground flex-1",children:w.name})]}),M&&L("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(QJ)=>QJ.stopPropagation(),children:D(D9,{modal:!1,children:[L(I9,{asChild:!0,children:L(QZ,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:L(T9,{className:"h-3.5 w-3.5"})})}),D(E9,{align:"end",className:"w-32",children:[L(zZ,{onClick:()=>{SJ(w.id),lZ("collection"),FZ(w.name),i(!0)},children:R.rename()}),L(zZ,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{bJ(w.id),sZ("collection"),uJ(!0)},children:R.delete()})]})]})})]},w.id)}),L("div",{ref:dZ,className:"h-1"}),iJ&&L("div",{className:"flex justify-center p-2",children:L(P0,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),!W&&D("div",{className:jJ("flex flex-col overflow-hidden transition-all duration-300 ease-in-out",O?"flex-1 min-h-0 h-full":"flex-none h-[44px] max-h-[44px]"),children:[D("header",{className:"group flex items-center justify-between px-2 mb-1 flex-none",children:[D("div",{className:"flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors",onClick:()=>v(!O),children:[L("h3",{className:"text-xs font-semibold uppercase tracking-wider",children:R.share_links()}),O?L(w9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"}):L(A9,{className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200"})]}),M&&L("div",{className:"flex items-center gap-1 flex-none",children:L("button",{onClick:()=>s(),className:"text-muted-foreground hover:text-foreground",children:L(T2,{className:"h-3.5 w-3.5"})})})]}),L(O9,{className:jJ("flex-1 min-h-0 transition-all duration-300 ease-in-out [&>div>div]:block!",O?"opacity-100 visible pointer-events-auto":"opacity-0 invisible pointer-events-none h-0"),children:D("div",{className:"space-y-0.5 pr-3",children:[D("div",{className:"group flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:()=>G({to:"/projects/$projectId/shares",params:{projectId:Z}}),children:[L("div",{className:"flex h-4 w-4 items-center justify-center",children:L(C2,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"flex-1 truncate text-sidebar-foreground",children:R.all_share_links_count({count:T?.pages[0]?.pageInfo?.total||0})})]}),D0.map((w)=>L(gX,{link:w,projectId:Z,dragState:Y,canEdit:M,onRenameTrigger:(j,QJ)=>{SJ(j),lZ("share"),FZ(QJ),i(!0)},onDeleteTrigger:(j)=>{bJ(j),sZ("share"),uJ(!0)}},w.id)),L("div",{ref:C0,className:"h-1"}),f&&L("div",{className:"flex justify-center p-2",children:L(P0,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})})]}),L(D2,{open:B1,onOpenChange:i,children:D(I2,{onClick:(w)=>w.stopPropagation(),children:[L(E2,{children:L(k2,{children:vJ==="collection"?R.rename_collection():vJ==="share"?R.rename_share_link():R.rename_folder()})}),L("div",{className:"py-4",children:L(aY,{value:CJ,onChange:(w)=>FZ(w.target.value),placeholder:R.enter_new_name(),onKeyDown:(w)=>{if(w.key==="Enter"&&CJ.trim()){if(vJ==="collection")j0({id:kJ,name:CJ});else if(vJ==="share")rZ({id:kJ,name:CJ});else if(vJ==="folder")iZ({id:kJ,name:CJ})}}})}),D(j2,{children:[L(QZ,{variant:"ghost",onClick:()=>i(!1),children:R.cancel()}),L(QZ,{disabled:!CJ.trim(),onClick:()=>{if(vJ==="collection")j0({id:kJ,name:CJ});else if(vJ==="share")rZ({id:kJ,name:CJ});else if(vJ==="folder")iZ({id:kJ,name:CJ})},children:R.rename()})]})]})}),L(pY,{open:N1,onOpenChange:uJ,children:D(_Y,{onClick:(w)=>w.stopPropagation(),children:[D(dY,{children:[L(lY,{children:gJ==="collection"?R.delete_collection_confirm():gJ==="share"?R.delete_share_link_confirm():R.delete_folder_confirm()}),L(sY,{children:R.delete_confirm_description({type:gJ==="collection"?R.collection():gJ==="share"?R.share_link():R.folder().toLowerCase()})})]}),D(cY,{children:[L(oY,{children:R.cancel()}),L(iY,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{if(gJ==="collection")L1(wZ);else if(gJ==="share")M1(wZ);else if(gJ==="folder")G1(wZ)},children:R.delete()})]})]})}),L(D2,{open:V1,onOpenChange:$Z,children:D(I2,{className:"sm:max-w-md",children:[D(E2,{children:[L(k2,{children:oZ?R.preparing_download():R.confirm_download()}),L(nY,{children:oZ?R.resolving_files_wait():R.folder_files_download_description()})]}),oZ?D("div",{className:"space-y-4 py-6 flex flex-col items-center justify-center",children:[L(P0,{className:"h-8 w-8 animate-spin text-primary"}),L("span",{className:"text-sm font-medium text-muted-foreground mt-2",children:R.preparing_download_links()})]}):D("div",{className:"space-y-4 py-2",children:[L("div",{className:"text-sm text-muted-foreground",children:R.download_includes_files({count:nZ.length})}),D("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:[L(hY,{className:"h-5 w-5 shrink-0 mt-0.5"}),D("div",{children:[L("p",{className:"font-semibold",children:R.no_folder_structure()}),L("p",{className:"mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90",children:R.folder_structure_warning()})]})]})]}),L(j2,{children:!oZ?D(jY,{children:[L(QZ,{variant:"outline",onClick:()=>$Z(!1),children:R.cancel()}),D(QZ,{onClick:aZ,className:"gap-2",disabled:nZ.length===0,children:[L(S2,{className:"h-4 w-4"}),R.start_download()]})]}):L(QZ,{disabled:!0,variant:"outline",children:R.cancel()})})]})})]})}function gX({link:J,projectId:Z,dragState:Q,canEdit:$,onRenameTrigger:Y,onDeleteTrigger:q}){let K=C9(),W=_Z({from:"/projects/$projectId/shares/$shareId",shouldThrow:!1})?.shareId===J.id,{ref:U,isDropTarget:B}=R2({id:`share:${J.id}`,data:{type:"share-link",id:J.id}}),H=!!Q?.isActive;return D("div",{ref:U,className:jJ("group flex cursor-pointer items-center justify-between rounded-md px-2 py-1 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",W&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",B&&H&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),onClick:()=>K({to:"/projects/$projectId/shares/$shareId",params:{projectId:Z,shareId:J.id}}),children:[D("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[L("div",{className:"flex h-4 w-4 items-center justify-center shrink-0",children:L(uY,{className:"h-4 w-4 text-sidebar-primary"})}),L("span",{className:"truncate text-sidebar-foreground flex-1",children:J.name})]}),$&&L("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(G)=>G.stopPropagation(),children:D(D9,{modal:!1,children:[L(I9,{asChild:!0,children:L(QZ,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:L(T9,{className:"h-3.5 w-3.5"})})}),D(E9,{align:"end",className:"w-32",children:[L(zZ,{onClick:()=>{Y(J.id,J.name)},children:R.rename()}),L(zZ,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{q(J.id)},children:R.delete()})]})]})})]})}function tY({teamId:J,projectId:Z,folder:Q,level:$,isRoot:Y,dragState:q,onSelect:K,selectedFolderId:X,canEdit:W,onRenameTrigger:U,onDeleteTrigger:B,onDownloadTrigger:H,ancestorFolders:G}){let N=c.useMemo(()=>{return G?.some((s)=>s.id===Q.id)??!1},[G,Q.id]),[M,A]=c.useState(Y||N);c.useEffect(()=>{if(N)A(!0)},[N]);let P=C9(),C=_Z({from:"/projects/$projectId/folders/$folderId",select:(s)=>({folderId:s.folderId}),shouldThrow:!1}),V=_Z({from:"/projects/$projectId/",shouldThrow:!1}),F=Y?!!V:C?.folderId===Q.id,{data:z,fetchNextPage:O,hasNextPage:v,isFetchingNextPage:T,isLoading:_}=R9({queryKey:["folders",Q.id,"children",{assetType:"folder"}],queryFn:async({pageParam:s})=>{let MZ=await zJ.api.folders[":folderId"].children.$get({param:{folderId:Q.id},query:{assetType:"folder",after:s,first:"20"}});if(!MZ.ok)throw Error(R.failed_to_fetch_folder_children());return await MZ.json()},initialPageParam:"",getNextPageParam:(s)=>{return s.pageInfo?.cursor||void 0},enabled:M||!!Y}),{ref:u,inView:f}=P9();c.useEffect(()=>{if(f&&v&&!T)O()},[f,v,T,O]);let PJ=z?.pages.flatMap((s)=>s.data??[])??[],l=(s)=>{s.stopPropagation(),A(!M)},g=()=>{if(K){K(Q);return}if(Y)P({to:"/projects/$projectId",params:{projectId:Z}});else P({to:"/projects/$projectId/folders/$folderId",params:{projectId:Z,folderId:Q.id}})},{ref:iJ,isDragging:dZ}=wY({id:`tree:${Q.id}`,data:{type:"folder",item:Q},disabled:!!Y||!!K||!W}),{ref:LZ,isDropTarget:C0}=R2({id:`tree:${Q.id}`,data:{type:"folder",item:Q},disabled:q?.draggedIds.has(Q.id)||!!K||!W}),cZ=(s)=>{iJ(s),LZ(s)},T0=c.useMemo(()=>{if(K)return!1;if(!q?.isActive)return!1;if(q.draggedIds.has(Q.id))return!1;return!0},[q,Q.id,K]),D0=C0&&T0,I0=X===Q.id;return D("div",{children:[D("div",{ref:cZ,className:jJ("group flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground min-w-0",(F||I0)&&"bg-sidebar-accent text-sidebar-accent-foreground font-medium",dZ&&"opacity-50",D0&&"bg-sidebar-accent ring-2 ring-primary ring-inset"),style:{...Y?{}:{paddingLeft:`${$*12+8}px`}},onClick:g,children:[!Y&&L("button",{onClick:l,className:"flex h-4 w-4 items-center justify-center shrink-0",children:M?L(yY,{className:"h-3 w-3"}):L(fY,{className:"h-3 w-3"})}),Y?L(vY,{className:"h-4 w-4 text-sidebar-primary shrink-0"}):L(gY,{className:"h-4 w-4 text-sidebar-primary shrink-0"}),L("span",{className:"flex-1 truncate text-sidebar-foreground",children:Q.name}),W&&!Y&&L("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:(s)=>s.stopPropagation(),children:D(D9,{modal:!1,children:[L(I9,{asChild:!0,children:L(QZ,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 shrink-0 hover:bg-muted hover:text-muted-foreground p-0",children:L(T9,{className:"h-3.5 w-3.5"})})}),D(E9,{align:"end",className:"w-32",children:[D(zZ,{onClick:()=>{U(Q.id,Q.name)},children:[L(SY,{className:"mr-2 h-4 w-4"}),R.rename()]}),D(zZ,{onClick:()=>{H(Q.id)},children:[L(S2,{className:"mr-2 h-4 w-4"}),R.download()]}),L(mY,{}),D(zZ,{className:"text-destructive focus:text-destructive focus:bg-destructive/10",onClick:()=>{B(Q.id)},children:[L(h2,{className:"mr-2 h-4 w-4"}),R.delete()]})]})]})})]}),M&&D("div",{children:[_&&L("div",{className:"flex items-center justify-center p-2",style:{paddingLeft:`${($+1)*12+8}px`},children:L(P0,{className:"h-4 w-4 animate-spin"})}),PJ.map((s)=>L(tY,{teamId:J,projectId:Z,folder:s,level:$+1,dragState:q,onSelect:K,selectedFolderId:X,canEdit:W,onRenameTrigger:U,onDeleteTrigger:B,onDownloadTrigger:H,ancestorFolders:G},s.id)),v&&L("div",{ref:u,className:"flex items-center justify-center p-2",style:{paddingLeft:`${($+1)*12+8}px`},children:T&&L(P0,{className:"h-4 w-4 animate-spin"})})]})]})}
|
|
68
|
-
export{UJ as tg,S as ug,$J as vg,nJ as wg,x as xg,sX as yg,FJ as zg,U0 as Ag,GJ as Bg,BQ as Cg,IJ as Dg,OJ as Eg,p1 as Fg,g8 as Gg,m8 as Hg,lJ as Ig,O$ as Jg,R$ as Kg,RK as Lg,eJ as Mg,e1 as Ng,D$ as Og,bK as Pg,H9 as Qg,U9 as Rg,YY as Sg,F0 as Tg,qY as Ug,H1 as Vg,B9 as Wg,gZ as Xg,uZ as Yg,V9 as Zg,U7 as _g,XJ as $g,z9 as ah,F7 as bh,FY as ch,wY as dh,w7 as eh,R2 as fh,A7 as gh,m7 as hh};
|
package/bin/chunk-qy28f25e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$d as C,Ad as b,Bd as c,Cd as d,Dd as e,Ed as f,Fd as g,Gd as h,Hd as i,Id as j,Jd as k,Kd as l,Ld as m,Md as n,Nd as o,Od as p,Pd as q,Qd as r,Rd as s,Sd as t,Td as u,Ud as v,Vd as w,Wd as x,Xd as y,Yd as z,Zd as A,_d as B,ae as D,be as E,ce as F,de as G,ee as H,fe as I,ge as J,he as K,ie as L,yd as a}from"./chunk-wbyw1shz.js";import"./chunk-dxyq9h8n.js";export{r as jwtVerify,s as jwtDecrypt,E as jwksCache,d as importX509,c as importSPKI,e as importPKCS8,f as importJWK,K as generateSecret,J as generateKeyPair,q as generalVerify,l as generalDecrypt,o as flattenedVerify,j as flattenedDecrypt,g as exportSPKI,h as exportPKCS8,i as exportJWK,b as errors,H as decodeProtectedHeader,I as decodeJwt,D as customFetch,L as cryptoRuntime,F as createRemoteJWKSet,C as createLocalJWKSet,p as compactVerify,k as compactDecrypt,A as calculateJwkThumbprintUri,z as calculateJwkThumbprint,a as base64url,G as UnsecuredJWT,x as SignJWT,w as GeneralSign,n as GeneralEncrypt,u as FlattenedSign,m as FlattenedEncrypt,y as EncryptJWT,B as EmbeddedJWK,v as CompactSign,t as CompactEncrypt};
|
package/bin/chunk-r7s4ypw1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Sb as J,Tb as H}from"./chunk-s88ha5kx.js";import{Gc as P,Hc as V,Ic as W}from"./chunk-rgthkvgx.js";import"./chunk-dxyq9h8n.js";var X=class{get supportsCreateIfNotExists(){return!0}get supportsTransactionalDdl(){return!1}get supportsReturning(){return!0}async acquireMigrationLock(){}async releaseMigrationLock(){}get supportsOutput(){return!0}},Y=class{#h;#j=new $;#w;#z;constructor(h){this.#h={...h}}async init(){if(this.#w=this.#h.database,this.#z=new Z(this.#w),this.#h.onCreateConnection)await this.#h.onCreateConnection(this.#z)}async acquireConnection(){return await this.#j.lock(),this.#z}async beginTransaction(h){await h.executeQuery(H.raw("begin"))}async commitTransaction(h){await h.executeQuery(H.raw("commit"))}async rollbackTransaction(h){await h.executeQuery(H.raw("rollback"))}async releaseConnection(){this.#j.unlock()}async destroy(){this.#w?.close()}},Z=class{#h;constructor(h){this.#h=h}executeQuery(h){let{sql:w,parameters:z}=h,j=this.#h.prepare(w);return Promise.resolve({rows:j.all(z)})}async*streamQuery(){throw Error("Streaming query is not supported by SQLite driver.")}},$=class{#h;#j;async lock(){while(this.#h!==void 0)await this.#h;this.#h=new Promise((h)=>{this.#j=h})}unlock(){let h=this.#j;this.#h=void 0,this.#j=void 0,h?.()}},k=class{#h;constructor(h){this.#h=h}async getSchemas(){return[]}async getTables(h={withInternalKyselyTables:!1}){let w=this.#h.selectFrom("sqlite_schema").where("type","=","table").where("name","not like","sqlite_%").select("name").$castTo();if(!h.withInternalKyselyTables)w=w.where("name","!=",V).where("name","!=",W);let z=await w.execute();return Promise.all(z.map(({name:j})=>this.#j(j)))}async getMetadata(h){return{tables:await this.getTables(h)}}async#j(h){let w=this.#h,z=(await w.selectFrom("sqlite_master").where("name","=",h).select("sql").$castTo().execute())[0]?.sql?.split(/[\(\),]/)?.find((j)=>j.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g,"");return{name:h,columns:(await w.selectFrom(J`pragma_table_info(${h})`.as("table_info")).select(["name","type","notnull","dflt_value"]).execute()).map((j)=>({name:j.name,dataType:j.type,isNullable:!j.notnull,isAutoIncrementing:j.name===z,hasDefaultValue:j.dflt_value!=null})),isView:!0}}},K=class extends P{getCurrentParameterPlaceholder(){return"?"}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getAutoIncrement(){return"autoincrement"}},G=class{#h;constructor(h){this.#h={...h}}createDriver(){return new Y(this.#h)}createQueryCompiler(){return new K}createAdapter(){return new X}createIntrospector(h){return new k(h)}};export{G as BunSqliteDialect};
|
package/bin/chunk-ran23vm9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as d,j as x,k as r,l as D,m as G,n as M}from"./chunk-ycq8ank7.js";import{ca as p}from"./chunk-kxskpgsq.js";import{je as m}from"./chunk-q163k309.js";import{og as g,pg as I}from"./chunk-63y0eb07.js";import{hh as u}from"./chunk-qrf0ady6.js";import"./chunk-k47md1g4.js";import"./chunk-77m5p188.js";import{lh as f}from"./chunk-d9mjbtp2.js";import{qi as b}from"./chunk-b1ypjqgp.js";import{Ai as k,Gi as N,Hi as F,Ii as P,Ji as T,yi as R}from"./chunk-h0fxysxs.js";import{$j as C,Ej as h,Nk as S,Xj as z,aj as o,bj as y,cj as q,dj as K,ij as v,nj as L,um as Y}from"./chunk-yp9hvkc5.js";import{sn as t}from"./chunk-dxyq9h8n.js";var Z=t(o(),1);var s=(X)=>{if(!X)return"??";return X.split(" ").map((_)=>_[0]).slice(0,2).join("").toUpperCase()};function e(){let{projectId:X}=qq.useParams(),{teamId:_,ensureTeamIdForProject:E}=b(),j=v();Z.useEffect(()=>{E(X)},[X,E]);let{data:O}=R(m(X)),W=O?.rootFolder,[n,i]=Z.useState(240),{fileListLeftSidebarCollapsed:A,setFileListLeftSidebarCollapsed:c}=g(),{data:B,isLoading:a,fetchNextPage:Q,hasNextPage:V,isFetchingNextPage:U}=k({queryKey:["collections",X],queryFn:async({pageParam:J})=>{let $=await N.api.projects[":projectId"].collections.$get({param:{projectId:X},query:{first:"20",after:J}});if(!$.ok)throw Error("Failed to fetch collections");return await $.json()},initialPageParam:"",getNextPageParam:(J)=>J.pageInfo?.cursor||void 0,enabled:!!X}),{ref:l,inView:H}=f();Z.useEffect(()=>{if(H&&V&&!U)Q()},[H,V,U,Q]);let w=Z.useMemo(()=>B?.pages.flatMap((J)=>J.data)||[],[B]);if(!_||!W||!O)return q(I,{});return q("div",{className:"flex flex-1 flex-col bg-background min-h-0",children:K("div",{className:"flex flex-1 overflow-hidden relative",children:[!A&&q("div",{className:"md:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>c(!0)}),!A&&K(y,{children:[q("div",{className:"bg-background",style:{width:n},children:q(u,{teamId:_,projectId:X,projectName:O.name??"",rootFolderId:W})}),q(p,{onResize:(J)=>{i(($)=>Math.max(180,Math.min(400,$+J)))},className:"hidden md:block"})]}),K("div",{className:"flex-1 flex flex-col min-h-0 bg-card overflow-hidden",children:[q("header",{className:"h-14 border-b flex items-center justify-between px-6 shrink-0 bg-background/50 backdrop-blur-sm sticky top-0 z-10",children:K("div",{className:"flex items-center gap-2",children:[q(z,{className:"h-5 w-5 text-primary"}),q("h1",{className:"font-bold text-lg text-foreground",children:Y.all_collections()})]})}),q("div",{className:"flex-1 overflow-y-auto p-6",children:a?q("div",{className:"flex justify-center items-center h-64",children:q("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):w.length===0?K("div",{className:"flex flex-col items-center justify-center h-64 text-muted-foreground gap-3",children:[q(S,{className:"h-10 w-10 text-muted-foreground/50"}),q("p",{children:Y.no_collections_yet()})]}):K("div",{className:"border border-border rounded-xl bg-background overflow-hidden shadow-xs",children:[K(d,{children:[q(x,{children:K(D,{className:"hover:bg-transparent bg-muted/20",children:[q(G,{className:"font-semibold px-4 py-3",children:Y.collection_name()}),q(G,{className:"font-semibold px-4 py-3",children:Y.creator()}),q(G,{className:"font-semibold px-4 py-3 w-[200px]",children:Y.created_date()})]})}),q(r,{children:w.map((J)=>K(D,{className:"hover:bg-muted/10 transition-colors cursor-pointer",onClick:()=>j({to:"/projects/$projectId/collections/$collectionId",params:{projectId:X,collectionId:J.id}}),children:[q(M,{className:"font-medium px-4 py-3.5",children:K("div",{className:"flex items-center gap-2",children:[q(z,{className:"h-4 w-4 text-primary shrink-0"}),q("span",{className:"text-foreground font-semibold hover:underline",children:J.name})]})}),q(M,{className:"px-4 py-3.5",children:K("div",{className:"flex items-center gap-2",children:[K(F,{className:"h-6 w-6",children:[J.creator?.image&&q(P,{src:J.creator.image,alt:J.creator.name,className:"object-cover"}),q(T,{className:"text-[10px]",children:s(J.creator?.name)})]}),q("span",{className:"text-sm font-medium text-foreground truncate max-w-[200px]",children:J.creator?.name||Y.unknown()})]})}),q(M,{className:"px-4 py-3.5 text-muted-foreground text-sm",children:K("div",{className:"flex items-center gap-2",children:[q(C,{className:"h-3.5 w-3.5 text-muted-foreground/70"}),q("span",{children:new Date(J.createdAt).toLocaleDateString()})]})})]},J.id))})]}),q("div",{ref:l,className:"h-10 w-full flex items-center justify-center",children:U&&q(h,{className:"h-6 w-6 animate-spin text-primary"})})]})})]})]})})}var qq=L("/projects/$projectId/collections/")({component:e});export{qq as Route};
|
package/bin/chunk-rfvdc4n0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ea as Vq}from"./chunk-g9r0p4t8.js";import{Ch as o,Dh as r,Eh as m,Fh as e}from"./chunk-hag024w8.js";import{ei as P,gi as k,hi as G,ji as B,ki as Y}from"./chunk-b1ypjqgp.js";import{Hi as h,Ii as C,Ji as O,Ki as qq,Li as Eq,Mi as Jq,Ni as Kq,Oi as Nq,Pi as Qq,Qi as Wq,Ri as Xq,Si as Yq,Ui as Zq,Vi as _q,Xi as $q,Zi as X}from"./chunk-h0fxysxs.js";import{Ej as z,Gl as s,aj as Cq,bj as t,cj as E,ck as H,dj as K,mk as n,rm as W,um as J,vm as Hq}from"./chunk-yp9hvkc5.js";import{sn as hq}from"./chunk-dxyq9h8n.js";var Z=hq(Cq(),1);function uq({open:fq,onOpenChange:Fq,title:zq,members:g,isOwner:_,onInvite:c,onUpdateRole:I,onRemoveMember:v,currentUserId:Pq,availableMembersToAdd:M,onAddMember:L,type:V="team"}){let[T,u]=Z.useState("editor"),[S,p]=Z.useState(null),[l,x]=Z.useState(!1),[D,U]=Z.useState(null),[f,A]=Z.useState(null),[j,i]=Z.useState({}),[$,F]=Z.useState(null),y=(q)=>{if(!q)return"";switch(q.toLowerCase()){case"owner":return J.owner();case"editor":return J.editor();case"reviewer":return J.reviewer();default:return q}},a=(q,N)=>{i((Q)=>({...Q,[q]:N}))},kq=async(q,N)=>{if(!I)return;U(q);try{await I(q,N),X.success(J.member_role_updated())}catch(Q){console.error(Q),X.error(J.failed_to_update_member_role())}finally{U(null)}},Gq=async()=>{if(!v||!f?.id)return;U(f.id);try{await v(f.id),X.success(J.member_removed()),A(null)}catch(q){console.error(q),X.error(J.failed_to_remove_member())}finally{U(null)}},Bq=async()=>{if(!c)return;x(!0);try{let q=await c(T),N=`${window.location.origin}/signup?inviteCode=${q}`;p(N)}catch(q){console.error(q),X.error(J.failed_to_generate_invite_link())}finally{x(!1)}},Lq=async()=>{if(S){if(await Vq(S))X.success(J.invite_link_copied())}},R=(q)=>{if(!q)return"??";return q.split(" ").map((N)=>N[0]).slice(0,2).join("").toUpperCase()},Sq=(q)=>{if(!q)p(null),u("editor"),i({}),F(null);Fq(q)},w=Array.isArray(g)?g:[],Uq=Array.isArray(M)?M:[],yq=V==="project"&&_?w.filter((q)=>q.role==="owner"||q.scope==="project"||q.hasCustomRole):w,d=V==="project"&&_?w.filter((q)=>q.scope==="team"&&q.role!=="owner"&&!q.hasCustomRole):[],b=V==="project"&&_?Uq.filter((q)=>q.scope==="project"):[];return E(Yq,{open:fq,onOpenChange:Sq,children:K(Zq,{className:"sm:max-w-xl",onOpenAutoFocus:(q)=>q.preventDefault(),children:[E(_q,{children:E($q,{children:zq})}),K("div",{className:"space-y-4",children:[E("div",{className:"max-h-[300px] overflow-y-auto space-y-2",children:yq.map((q)=>{let N=V==="team"&&q.scope==="project";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),K("div",{className:"flex items-center gap-2",children:[!N&&E("span",{className:"text-xs text-muted-foreground capitalize",children:y(q.role)}),q.scope&&K(t,{children:[!N&&E("span",{className:"text-[10px] text-muted-foreground/70",children:"•"}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]})]})]}),_&&q.role!=="owner"&&q.id!==Pq&&K("div",{className:"flex items-center gap-2",children:[N?E(o,{children:K(r,{children:[E(m,{asChild:!0,children:E("span",{children:E(W,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26 justify-between",disabled:!0,children:E(H,{className:"ml-auto h-3 w-3 opacity-50"})})})}),E(e,{side:"top",children:E("p",{className:"text-xs",children:J.project_member_role_tooltip()})})]})}):K(P,{children:[E(k,{asChild:!0,children:K(W,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:D===q.id,children:[y(q.role),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:q.role,onValueChange:(Q)=>kq(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(W,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>A(q),disabled:D===q.id,children:D===q.id?E(z,{className:"h-3 w-3 animate-spin"}):E(s,{className:"h-3 w-3"})})]})]},q.id)})}),E(qq,{open:!!f,onOpenChange:(q)=>!q&&A(null),children:K(Eq,{children:[K(Jq,{children:[E(Nq,{children:J.remove_member()}),E(Qq,{children:J.remove_member_confirmation({name:f?.name||"",type:V==="project"?J.project():J.team()})})]}),K(Kq,{children:[E(Xq,{children:J.cancel()}),E(Wq,{onClick:Gq,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:J.remove()})]})]})})," ",_&&L&&d.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_team_member_to_project()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_team_member_to_project_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:d.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(W,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(W,{onClick:async()=>{F(q.id);try{await L(q.id,N),X.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),X.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.set_role()})]})]},q.id)})})]}),_&&L&&b.length>0&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-1",children:J.add_members_from_other_projects()}),E("p",{className:"text-xs text-muted-foreground mb-3 font-normal",children:J.add_members_from_other_projects_hint()}),E("div",{className:"max-h-[200px] overflow-y-auto space-y-2 pr-1",children:b.map((q)=>{let N=j[q.id]||"editor";return K("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50",children:[K("div",{className:"flex items-center gap-3",children:[K(h,{children:[q.image&&E(C,{src:q.image,alt:q.name,className:"object-cover"}),E(O,{children:R(q.name)})]}),K("div",{className:"flex flex-col",children:[E("span",{className:"text-sm font-medium",children:q.name}),E("span",{className:"text-xs text-muted-foreground capitalize",children:q.scope==="team"?J.team_member():J.project_member()})]})]}),K("div",{className:"flex items-center gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(W,{variant:"outline",size:"sm",className:"h-8 px-2 text-xs capitalize w-26",disabled:$===q.id,children:[y(N),E(H,{className:"ml-1 h-3 w-3 opacity-50"})]})}),E(G,{children:K(B,{value:N,onValueChange:(Q)=>a(q.id,Q),children:[E(Y,{value:"editor",className:"text-xs",children:J.editor()}),E(Y,{value:"reviewer",className:"text-xs",children:J.reviewer()})]})})]}),E(W,{onClick:async()=>{F(q.id);try{await L(q.id,N),X.success(J.added_member_successfully({name:q.name||""}))}catch(Q){console.error(Q),X.error(J.failed_to_add_member({name:q.name||""}))}finally{F(null)}},disabled:$!==null,size:"sm",className:"h-8 text-xs px-3",children:$===q.id?E(z,{className:"h-3 w-3 animate-spin"}):J.add_to_project()})]})]},q.id)})})]}),_&&c&&K("div",{className:"border-t pt-4",children:[E("h4",{className:"text-sm font-medium mb-3",children:J.invite_new_member()}),K("div",{className:"space-y-3",children:[K("div",{className:"flex gap-2",children:[K(P,{children:[E(k,{asChild:!0,children:K(W,{variant:"outline",className:"w-[120px] justify-between",children:[T==="editor"?J.editor():J.reviewer(),E(H,{className:"h-4 w-4 opacity-50"})]})}),E(G,{children:K(B,{value:T,onValueChange:(q)=>u(q),children:[E(Y,{value:"editor",children:J.editor()}),E(Y,{value:"reviewer",children:J.reviewer()})]})})]}),K(W,{onClick:Bq,disabled:l,className:"flex-1",children:[l&&E(z,{className:"mr-2 h-4 w-4 animate-spin"}),J.generate_link()]})]}),S&&K("div",{className:"flex gap-2",children:[E(Hq,{value:S,readOnly:!0}),E(W,{variant:"outline",size:"icon",onClick:Lq,children:E(n,{className:"h-4 w-4"})})]})]})]})]})]})})}
|
|
2
|
-
export{uq as da};
|